.admin-nav { position: relative; }
.admin-nav-link.act { color: var(--dark); position: relative; }
.admin-nav-link.act::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan) 20%, var(--cyan) 80%, transparent); }
.theme-btn { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; transition: border-color .2s; }
.theme-btn svg { width: 16px; height: 16px; stroke: var(--mid); fill: none; stroke-width: 1.6; transition: stroke .2s; }
.theme-btn:hover { border-color: var(--cyan); }
.theme-btn:hover svg { stroke: var(--cyan); }
.theme-btn.floating { position: fixed; top: 18px; right: 18px; z-index: 50; }

html.dark { --dark: #eee; --mid: #a8a8a8; --white: #111; --border: #333; color-scheme: dark; }
html.dark body { background: #111; color: #eee; }
html.dark .admin-nav, html.dark .login-box, html.dark .modal, html.dark .modal-box, html.dark .delete-modal-box { background: #111; }
html.dark input, html.dark textarea, html.dark select { background-color: transparent; color: #eee; }
html.dark input[type="file"] { color: #aaa; }
html.dark .project-table tr:hover td, html.dark .project-table tbody tr:hover { background: #1a1a1a; }
html.dark .gallery-item, html.dark .current-thumb, html.dark .thumb-cell img, html.dark .project-thumb { background-color: #222; }
html.dark .upload-area { background: transparent; border-color: #3a3a3a; }
html.dark .flash.success { background: rgba(110,177,204,.12); color: #98cde1; }
html.dark .flash.error { background: rgba(231,76,60,.12); color: #f08b7e; border-color: rgba(231,76,60,.3); }
html.dark .drag-handle, html.dark .gallery-drag-handle { color: #666; }
html.dark ::placeholder { color: #666; }

.lang-tabs { display: flex; border-bottom: 1px solid var(--border); margin: 0 0 28px; flex-wrap: wrap; }
.lang-tabs a { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 18px; color: var(--mid); position: relative; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.lang-tabs a:hover { color: var(--dark); }
.lang-tabs a.act { color: var(--dark); font-weight: 400; }
.lang-tabs a.act::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan) 20%, var(--cyan) 80%, transparent); }
.tr-badge { display: inline-block; font-size: 0.58rem; letter-spacing: 0.08em; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.tr-badge.warn { background: #fdf3e1; color: #a0670d; }
.tr-badge.ok { background: rgba(110,177,204,.13); color: #306f88; }
html.dark .tr-badge.warn { background: #3a2c12; color: #e8b25a; }
html.dark .tr-badge.ok { color: #98cde1; }
a.tr-badge:hover { outline: 1px solid var(--cyan); }
footer:has(> a.footer-logo) { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 36px; }
footer:has(> a.footer-logo) > a:not(.footer-logo):first-of-type, footer:has(> a.footer-logo) > .footer-admin + a { justify-self: end; }
footer > a.footer-logo { display: flex; align-items: center; justify-content: center; margin: 0; opacity: .9; transition: opacity .2s; }
footer > a.footer-logo ~ a { justify-self: start; }
footer > a.footer-logo:hover { opacity: 1; }
footer > a.footer-logo img { height: 40px; width: auto; display: block; }
html.dark footer > a.footer-logo img { filter: invert(1); }
@media (max-width: 600px) {
  footer:has(> a.footer-logo) { grid-template-columns: 1fr 1fr; column-gap: 28px; row-gap: 14px; }
  footer > a.footer-logo { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  footer > a.footer-logo img { height: 34px; }
}
