/* ===================================================
   JAESWIFT — Admin Panel Styles
   Full cyberpunk admin theme
   =================================================== */
:root {
    --bg: #111111;
    --bg2: #141414;
    --bg3: #1a1a1a;
    --accent: #d0d0d0;
    --accent-dim: rgba(255, 255, 255, 0.05);
    --secondary: #ff2d2d;
    --secondary-dim: rgba(255, 45, 45, 0.15);
    --text: #c0c0c0;
    --text-dim: rgba(192, 192, 192, 0.5);
    --danger: #ff2d2d;
    --warn: #c9a227;
    --success: #d0d0d0;
    --info: #c9a227;
    --border: rgba(255, 255, 255, 0.03);
    --border-strong: rgba(255, 255, 255, 0.06);
    --sidebar-w: 220px;
    --topbar-h: 50px;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Orbitron', sans-serif;
    --font-share: 'Share Tech Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    min-height: 100vh;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(208, 208, 208, 0.08);
}

/* ─── Login Screen ─── */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.012) 0%, transparent 70%), var(--bg);
}

.login-box {
    width: 380px;
    max-width: 95vw;
    border: 1px solid var(--border);
    background: var(--bg2);
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    font-size: 2.5rem;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(208,208,208,0.1);
    margin-bottom: 0.5rem;
}

.login-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 4px;
    margin-bottom: 0.3rem;
}

.login-subtitle {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.login-field {
    margin-bottom: 1.2rem;
}

.login-label {
    display: block;
    font-size: 0.6rem;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 0.4rem;
}

.login-input {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.7rem 1rem;
    outline: none;
    transition: border-color 0.3s;
}
.login-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(255,255,255,0.05);
}

.login-error {
    color: var(--danger);
    font-size: 0.7rem;
    letter-spacing: 1px;
    min-height: 1.2rem;
    margin-bottom: 0.5rem;
}

.login-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}
.login-btn:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 15px rgba(255,255,255,0.06);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-status {
    font-size: 0.55rem;
    color: rgba(200,214,229,0.25);
    letter-spacing: 2px;
}

/* ─── App Layout ─── */
.admin-app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    min-height: 100vh;
}

/* ─── Main Content ─── */
.main-content {
    grid-column: 2;
    grid-row: 2;
    padding: 2rem;
    width: 100%;
    min-width: 0;
    overflow-y: auto;
    max-height: calc(100vh - var(--topbar-h));
    background: var(--bg);
}

/* ─── Top Bar ─── */
.admin-topbar {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.topbar-logo {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
}

.topbar-divider {
    color: var(--text-dim);
    font-size: 0.7rem;
}

.topbar-section {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-user {
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 1px;
}

.topbar-btn {
    background: transparent;
    border: 1px solid rgba(255,71,87,0.3);
    color: var(--danger);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 1px;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}
.topbar-btn:hover {
    background: rgba(255,71,87,0.1);
}

/* ─── Mobile Menu Button (hamburger) ─── */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.mobile-menu-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(255,255,255,0.05);
}
.mobile-menu-btn .hamburger-line {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s;
}
.mobile-menu-btn .hamburger-line:nth-child(1) { top: 10px; }
.mobile-menu-btn .hamburger-line:nth-child(2) { top: 17px; }
.mobile-menu-btn .hamburger-line:nth-child(3) { top: 24px; }

/* ─── Sidebar ─── */
.admin-sidebar {
    background: var(--bg2);
    border-right: 1px solid var(--border);
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 1rem;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-end;
    margin: 0 0.8rem 0.5rem;
    align-items: center;
    justify-content: center;
}
.sidebar-close-btn:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.sidebar-group-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 1.2rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}
.sidebar-link:hover {
    color: var(--text);
    background: rgba(255,255,255,0.012);
}
.sidebar-link.active {
    color: var(--accent);
    background: rgba(255,255,255,0.02);
    border-left-color: var(--accent);
}

.sidebar-icon {
    font-size: 0.9rem;
    width: 1.2rem;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Sidebar Overlay (mobile backdrop) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 98;
}
.sidebar-overlay.active {
    display: block;
}

/* ─── Main Content ─── */
.admin-main {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(100vh - var(--topbar-h));
}

.admin-section {
    width: 100%;
    max-width: 1200px;
}

.section-heading {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.section-heading-row .section-heading {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-subheading {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 2px;
    margin: 2rem 0 1rem;
}

.section-description {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

/* ─── Action Buttons ─── */
.action-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}
.action-btn:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 10px rgba(255,255,255,0.05);
}
.action-btn.secondary {
    border-color: var(--text-dim);
    color: var(--text-dim);
}
.action-btn.secondary:hover {
    background: rgba(200,214,229,0.05);
}

.action-sm {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 1px;
    padding: 0.25rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
}
.action-sm.edit:hover { color: var(--accent); border-color: var(--accent); }
.action-sm.delete:hover { color: var(--danger); border-color: var(--danger); }

/* Danger Button */
.danger-btn {
    background: transparent;
    border: 1px solid rgba(255, 71, 87, 0.4);
    color: var(--danger);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}
.danger-btn:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: var(--danger);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.2);
}

/* ─── Dashboard Grid ─── */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.dash-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 1.2rem;
    text-align: center;
}

.dash-card-label {
    display: block;
    font-size: 0.55rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.dash-card-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.06);
}

/* ─── Services Grid (Dashboard) ─── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    font-size: 0.75rem;
}
.service-card.online .service-dot { color: var(--accent); }
.service-card.offline .service-dot { color: var(--danger); }
.service-name { flex: 1; color: var(--text); }
.service-ms { color: var(--text-dim); font-size: 0.6rem; }

/* ─── Threats ─── */
.threat-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.015);
    font-size: 0.7rem;
}
.threat-id {
    color: var(--accent);
    font-size: 0.65rem;
    min-width: 140px;
}
.threat-summary {
    flex: 1;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.threat-cvss {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 35px;
    text-align: center;
}
.cvss-crit { color: #ff0040; text-shadow: 0 0 8px rgba(255,0,64,0.4); }
.cvss-high { color: var(--danger); }
.cvss-med { color: var(--warn); }
.cvss-low { color: var(--accent); }

/* ─── Posts Table ─── */
.posts-table-wrap {
    overflow-x: auto;
}

.posts-table {
    width: 100%;
    border-collapse: collapse;
}

.posts-table th {
    font-size: 0.6rem;
    color: var(--accent);
    letter-spacing: 2px;
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.posts-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.012);
    font-size: 0.75rem;
    vertical-align: middle;
}

.posts-table tr:hover td {
    background: rgba(255,255,255,0.01);
}

.post-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}
.post-link:hover { color: var(--accent); }

.tag-pill {
    display: inline-block;
    font-size: 0.55rem;
    padding: 0.1rem 0.4rem;
    border: 1px solid var(--border);
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-right: 0.3rem;
}

.threat-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.5rem;
    letter-spacing: 1px;
    font-weight: 600;
}
.threat-low { color: #00cc33; border: 1px solid rgba(0,204,51,0.15); }
.threat-medium { color: var(--warn); border: 1px solid rgba(255,165,2,0.2); }
.threat-high { color: var(--danger); border: 1px solid rgba(255,71,87,0.2); }
.threat-critical { color: #ff0040; border: 1px solid rgba(255,0,64,0.3); animation: critPulse 1.5s ease-in-out infinite; }
@keyframes critPulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }

.actions-cell {
    display: flex;
    gap: 0.4rem;
    white-space: nowrap;
}

/* ─── Editor Form ─── */
.editor-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.editor-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.editor-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.editor-field.full { grid-column: 1 / -1; }

.editor-label {
    font-size: 0.6rem;
    color: var(--accent);
    letter-spacing: 2px;
}

.editor-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    outline: none;
    transition: border-color 0.3s;
}
.editor-input:focus {
    border-color: var(--accent);
}

.editor-select {
    cursor: pointer;
}
.editor-small {
    max-width: 100px;
}

.editor-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.035);
    outline: none;
    border-radius: 0;
}
.editor-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(208,208,208,0.15);
}

.range-val {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
}

/* ─── Operator Status (HUD) Section in Editor ─── */
.editor-hud-section {
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 1.2rem;
    margin: 0.5rem 0;
}

.editor-hud-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.editor-hud-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    align-items: end;
}

.hud-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* ─── Editor Toolbar ─── */
.editor-toolbar {
    display: flex;
    gap: 0.3rem;
    padding: 0.5rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-bottom: none;
    flex-wrap: wrap;
    align-items: center;
}

.tb-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 30px;
    text-align: center;
}
.tb-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.tb-wordcount {
    margin-left: auto;
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.editor-textarea {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-share), var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    padding: 1.2rem;
    outline: none;
    resize: vertical;
    min-height: 300px;
}
.editor-textarea:focus {
    border-color: var(--accent);
}

.editor-preview {
    background: var(--bg3);
    border: 1px solid var(--border);
    padding: 1.5rem;
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
}

.editor-preview .post-rendered h1,
.editor-preview .post-rendered h2,
.editor-preview .post-rendered h3 {
    font-family: var(--font-display);
    color: #fff;
    margin: 1rem 0 0.5rem;
}
.editor-preview .post-rendered h2 {
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.3rem;
}
.editor-preview .post-rendered strong { color: #fff; }
.editor-preview .post-rendered em { color: var(--accent); }
.editor-preview .post-rendered pre {
    background: rgba(0,0,0,0.4);
    border-left: 3px solid var(--accent);
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}
.editor-preview .post-rendered code {
    font-family: var(--font-share), monospace;
    color: var(--accent);
}
.editor-preview .post-rendered .inline-code {
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border);
    padding: 0.1rem 0.3rem;
}

.editor-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* ─── Tracks ─── */
.track-add-form {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.track-add-form .editor-input {
    flex: 1;
    min-width: 150px;
}

.track-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.015);
    font-size: 0.75rem;
    transition: background 0.2s;
}
.track-row:hover {
    background: rgba(255,255,255,0.01);
}

.track-num {
    color: var(--text-dim);
    font-size: 0.65rem;
    min-width: 25px;
}
.track-title {
    color: #fff;
    font-weight: 600;
    flex: 2;
}
.track-artist {
    color: var(--accent);
    flex: 2;
}
.track-album {
    color: var(--text-dim);
    flex: 2;
    font-size: 0.7rem;
}

/* ─── Settings ─── */
.settings-form {
    max-width: 500px;
}

.settings-group {
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.settings-group-title {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

/* ─── Toggle Switch ─── */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0;
    cursor: pointer;
}

.toggle-row input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 18px;
    background: rgba(200,214,229,0.1);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}
.toggle-row input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: var(--text-dim);
    transition: all 0.3s;
}
.toggle-row input[type="checkbox"]:checked {
    background: rgba(255,255,255,0.05);
    border-color: var(--accent);
}
.toggle-row input[type="checkbox"]:checked::after {
    left: 20px;
    background: var(--accent);
    box-shadow: 0 0 6px rgba(208,208,208,0.15);
}

.toggle-label {
    font-size: 0.75rem;
    color: var(--text);
}

/* Toggle switch standalone (reusable) */
.toggle-switch {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 18px;
    background: rgba(200,214,229,0.1);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: var(--text-dim);
    transition: all 0.3s;
}
.toggle-switch:checked {
    background: rgba(255,255,255,0.05);
    border-color: var(--accent);
}
.toggle-switch:checked::after {
    left: 20px;
    background: var(--accent);
    box-shadow: 0 0 6px rgba(208,208,208,0.15);
}

/* ===================================================
   NEW SECTIONS
   =================================================== */

/* ─── Section Item (reusable row for homepage sections, nav, links, services) ─── */
.section-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--border);
    margin-bottom: 0.4rem;
    transition: all 0.2s;
    font-size: 0.75rem;
}
.section-item:hover {
    background: rgba(255,255,255,0.012);
    border-color: var(--border-strong);
    box-shadow: 0 0 6px rgba(255,255,255,0.02);
}

.section-item-label {
    flex: 1;
    color: #fff;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.section-item-url {
    flex: 2;
    color: var(--text-dim);
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.section-item-meta {
    color: var(--text-dim);
    font-size: 0.65rem;
    letter-spacing: 1px;
}

.section-item-actions {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-shrink: 0;
}

.section-item-actions .action-sm {
    padding: 0.2rem 0.5rem;
}

/* Arrow buttons for reorder */
.arrow-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.65rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.arrow-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.arrow-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ─── Add Form Row (reusable for services, nav, links) ─── */
.add-form-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.add-form-row .editor-input {
    flex: 1;
    min-width: 120px;
}
.add-form-row .editor-input.input-sm {
    max-width: 80px;
    min-width: 60px;
    flex: 0 0 auto;
}

/* ─── Badges ─── */
.category-badge {
    display: inline-block;
    font-size: 0.55rem;
    padding: 0.1rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.02);
}

.order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    color: var(--accent);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

/* ─── Homepage Editor ─── */
.section-homepage .editor-form {
    max-width: 700px;
}

.homepage-sections-list {
    margin-top: 0.5rem;
}

.homepage-section-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--border);
    margin-bottom: 0.4rem;
    transition: all 0.2s;
    cursor: grab;
}
.homepage-section-item:hover {
    background: rgba(255,255,255,0.012);
    border-color: var(--border-strong);
    box-shadow: 0 0 6px rgba(255,255,255,0.02);
}
.homepage-section-item:active {
    cursor: grabbing;
}

.homepage-section-item .toggle-switch {
    flex-shrink: 0;
}

.homepage-section-item .section-item-label {
    flex: 1;
    font-size: 0.75rem;
    color: #fff;
}

.homepage-section-item .section-item-actions {
    display: flex;
    gap: 0.3rem;
}

.about-textarea {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    padding: 0.8rem;
    outline: none;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s;
}
.about-textarea:focus {
    border-color: var(--accent);
}

/* ─── Services Manager ─── */
.section-services .add-form-row .editor-input {
    min-width: 140px;
}

.services-list {
    margin-top: 0.5rem;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.015);
    font-size: 0.75rem;
    transition: background 0.2s;
}
.service-item:hover {
    background: rgba(255,255,255,0.01);
}

.service-item-name {
    color: #fff;
    font-weight: 600;
    flex: 1;
}

.service-item-url {
    color: var(--accent);
    font-size: 0.7rem;
    flex: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Navigation Editor ─── */
.section-navigation .add-form-row .editor-input {
    min-width: 100px;
}

.nav-list {
    margin-top: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.015);
    font-size: 0.75rem;
    transition: background 0.2s;
}
.nav-item:hover {
    background: rgba(255,255,255,0.01);
}

.nav-item-label {
    color: #fff;
    font-weight: 600;
    flex: 1;
}

.nav-item-url {
    color: var(--text-dim);
    font-size: 0.7rem;
    flex: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Links Manager ─── */
.section-links .add-form-row .editor-input {
    min-width: 100px;
}

.links-list {
    margin-top: 0.5rem;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.015);
    font-size: 0.75rem;
    transition: background 0.2s;
}
.link-item:hover {
    background: rgba(255,255,255,0.01);
}

.link-item-icon {
    font-size: 1rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.link-item-name {
    color: #fff;
    font-weight: 600;
    flex: 1;
}

.link-item-url {
    color: var(--text-dim);
    font-size: 0.7rem;
    flex: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── API Keys ─── */
.apikeys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.2rem;
}

.api-group-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 1.2rem;
    transition: all 0.3s;
}
.api-group-card:hover {
    border-left-color: #fff;
    box-shadow: 0 0 12px rgba(255,255,255,0.025);
}

.api-group-header {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.api-group-header .api-icon {
    color: var(--accent);
    font-size: 0.9rem;
}

.api-group-fields {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.api-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.api-field-label {
    font-size: 0.55rem;
    color: var(--text-dim);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.api-field-input {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    outline: none;
    transition: border-color 0.3s;
    letter-spacing: 1px;
}
.api-field-input:focus {
    border-color: var(--accent);
}
.api-field-input[type="password"] {
    letter-spacing: 3px;
}

.api-group-save {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}
.api-group-save:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 8px rgba(255,255,255,0.05);
}

/* ─── Theme / Appearance ─── */
.section-theme .settings-form {
    max-width: 600px;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.color-picker-row label {
    font-size: 0.6rem;
    color: var(--accent);
    letter-spacing: 2px;
    min-width: 120px;
    flex-shrink: 0;
}

.color-picker-row input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
}
.color-picker-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
.color-picker-row input[type="color"]::-webkit-color-swatch {
    border: none;
}

.color-picker-row .hex-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    width: 100px;
    outline: none;
    transition: border-color 0.3s;
    letter-spacing: 1px;
}
.color-picker-row .hex-input:focus {
    border-color: var(--accent);
}

.effect-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 1rem 0;
}

.font-size-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.font-size-row label {
    font-size: 0.6rem;
    color: var(--accent);
    letter-spacing: 2px;
    min-width: 120px;
    flex-shrink: 0;
}

.font-size-row .editor-range {
    flex: 1;
}

.font-size-row .range-val {
    font-size: 0.85rem;
    min-width: 40px;
    text-align: right;
}

.preview-hint {
    background: rgba(0,0,0,0.2);
    border: 1px dashed var(--border);
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}
.preview-hint .hint-icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
    opacity: 0.5;
}

/* ─── SEO / Meta ─── */
.section-seo .editor-form {
    max-width: 600px;
}

.char-count {
    font-size: 0.55rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-align: right;
    margin-top: 0.2rem;
}
.char-count.warn {
    color: var(--warn);
}
.char-count.danger {
    color: var(--danger);
}

.seo-textarea {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    padding: 0.6rem 0.8rem;
    outline: none;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s;
}
.seo-textarea:focus {
    border-color: var(--accent);
}

/* ─── Contact Settings ─── */
.section-contact .editor-form {
    max-width: 600px;
}

.contact-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0;
}

.auto-reply-textarea {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    padding: 0.6rem 0.8rem;
    outline: none;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s;
}
.auto-reply-textarea:focus {
    border-color: var(--accent);
}

/* ─── Backups ─── */
.backup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.backup-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    transition: all 0.3s;
}
.backup-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 0 10px rgba(255,255,255,0.025);
}

.backup-card.highlight {
    grid-column: 1 / -1;
    max-width: 800px;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.012);
    box-shadow: 0 0 15px rgba(255,255,255,0.025);
}

.backup-icon {
    font-size: 2rem;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(255,255,255,0.06);
}

.backup-card.highlight .backup-icon {
    font-size: 2.5rem;
    text-shadow: 0 0 20px rgba(208,208,208,0.1);
}

.backup-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.backup-size {
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.backup-download-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 0.4rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
}
.backup-download-btn:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 8px rgba(255,255,255,0.05);
}

.backup-download-btn .dl-icon {
    font-size: 0.8rem;
}

.backup-card.highlight .backup-download-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
}

/* ─── Notifications (expanded) ─── */
.admin-notification {
    position: fixed;
    top: -80px;
    right: 20px;
    left: auto;
    transform: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 0.7rem 2rem;
    border: 1px solid var(--accent);
    background: var(--bg2);
    color: var(--accent);
    z-index: 9999;
    transition: top 0.4s ease;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.admin-notification.show {
    top: 15px;
}

.admin-notification.success {
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 0 15px rgba(255,255,255,0.035);
}

.admin-notification.error {
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: 0 0 15px rgba(255,71,87,0.1);
}

.admin-notification.info {
    border-color: var(--info);
    color: var(--info);
    box-shadow: 0 0 15px rgba(0,212,255,0.1);
}

/* Auto-fade animation */
@keyframes notifSlideIn {
    0% { top: -80px; opacity: 0; }
    10% { top: 15px; opacity: 1; }
    90% { top: 15px; opacity: 1; }
    100% { top: -80px; opacity: 0; }
}
.admin-notification.auto-fade {
    animation: notifSlideIn 3.5s ease forwards;
}

/* ─── No Data ─── */
.no-data {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* ─── Loading Spinner ─── */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Scanline Overlay ─── */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.004) 2px,
        rgba(255, 255, 255, 0.004) 4px
    );
}

/* ===================================================
   RESPONSIVE — Tablet
   =================================================== */
@media (max-width: 1024px) {
    .apikeys-grid {
        grid-template-columns: 1fr;
    }

    .editor-hud-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dash-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .backup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================================
   RESPONSIVE — Mobile
   =================================================== */
@media (max-width: 768px) {
    /* Layout: single column */
    .admin-app {
        grid-template-columns: 1fr;
    }

    /* Show hamburger */
    .mobile-menu-btn {
        display: flex;
    }

    /* Sidebar: overlay on mobile */
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--sidebar-w);
        height: 100%;
        z-index: 99;
        transform: translateX(-100%);
        box-shadow: none;
        padding-top: 0.5rem;
    }
    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    }

    /* Show close button in sidebar on mobile */
    .sidebar-close-btn {
        display: flex;
    }

    /* Main content full width */
    .admin-main {
        padding: 1rem;
        grid-column: 1;
        max-height: calc(100vh - var(--topbar-h));
    }

    /* Dashboard cards: 2 col on tablet done above, 1 col here */
    .dash-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Editor: single column */
    .editor-row {
        grid-template-columns: 1fr;
    }

    .editor-hud-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* All form rows stack vertically */
    .add-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .add-form-row .editor-input {
        min-width: 100%;
    }
    .add-form-row .editor-input.input-sm {
        max-width: 100%;
    }

    .track-add-form {
        flex-direction: column;
        align-items: stretch;
    }
    .track-add-form .editor-input {
        min-width: 100%;
    }

    /* Section items stack tighter */
    .section-item {
        flex-wrap: wrap;
    }
    .section-item-url {
        flex: 100%;
        order: 3;
    }

    .track-row {
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .track-album {
        flex: 100%;
        order: 4;
    }

    /* API keys cards single col */
    .apikeys-grid {
        grid-template-columns: 1fr;
    }

    /* Color picker row stack */
    .color-picker-row {
        flex-wrap: wrap;
    }
    .color-picker-row label {
        min-width: 100%;
    }

    /* Font size row stack */
    .font-size-row {
        flex-wrap: wrap;
    }
    .font-size-row label {
        min-width: 100%;
    }

    /* Backup grid single col */
    .backup-grid {
        grid-template-columns: 1fr;
    }
    .backup-card.highlight {
        max-width: 100%;
    }

    /* Posts table: allow scroll */
    .posts-table-wrap {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    /* Nav item row stack */
    .nav-item {
        flex-wrap: wrap;
    }
    .nav-item-url {
        flex: 100%;
        order: 3;
    }

    /* Link item row stack */
    .link-item {
        flex-wrap: wrap;
    }
    .link-item-url {
        flex: 100%;
        order: 3;
    }

    /* Editor actions stack */
    .editor-actions {
        flex-direction: column;
    }
    .editor-actions .action-btn {
        width: 100%;
        text-align: center;
    }

    /* Section heading row stack */
    .section-heading-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    /* Topbar adjustments */
    .topbar-section {
        display: none;
    }
    .topbar-divider {
        display: none;
    }
    .topbar-user {
        font-size: 0.6rem;
    }
}

/* ===================================================
   RESPONSIVE — Small Mobile
   =================================================== */
@media (max-width: 480px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }

    .editor-hud-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .admin-main {
        padding: 0.8rem;
    }

    .section-heading {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

    .login-box {
        padding: 1.5rem;
    }

    .admin-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 0.65rem;
        padding: 0.6rem 1rem;
    }
}

/* ===================================================
   UTILITY CLASSES
   =================================================== */
.hidden { display: none !important; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-sm { gap: 0.4rem; }
.gap-md { gap: 0.8rem; }
.gap-lg { gap: 1.2rem; }

/* ===================================================
   MISSING CLASSES — Added by audit fix 2026-04-01
   =================================================== */

/* ─── LAYOUT: Sidebar ─── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: #060a12;
    border-right: 1px solid rgba(255,255,255,0.035);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 1.2rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #d0d0d0;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-close {
    display: none;
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: none;
    border: 1px solid rgba(255,255,255,0.06);
    color: #d0d0d0;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    margin: 0.5rem 0;
}
.sidebar-header {
    padding: 0.6rem 1rem 0.3rem;
    font-size: 0.6rem;
    color: rgba(208,208,208,0.15);
    text-transform: uppercase;
    letter-spacing: 3px;
}
.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-section-label {
    padding: 0.8rem 1rem 0.3rem;
    font-size: 0.55rem;
    color: rgba(208,208,208,0.3);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
}
.sidebar-version {
    padding: 0.8rem 1rem;
    font-size: 0.6rem;
    color: rgba(255,255,255,0.2);
    border-top: 1px solid rgba(255,255,255,0.025);
    text-align: center;
}

/* ─── LAYOUT: Topbar ─── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    background: rgba(6,10,18,0.9);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-title {
    font-size: 0.75rem;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}
.topbar-logout {
    background: none;
    border: 1px solid rgba(255,50,50,0.3);
    color: #ff3232;
    padding: 0.4rem 1rem;
    font-size: 0.65rem;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}
.topbar-logout:hover {
    background: rgba(255,50,50,0.1);
    border-color: #ff3232;
}

/* ─── AUTH: Login ─── */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #060a12;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}
.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #d0d0d0;
    text-shadow: 0 0 20px rgba(208,208,208,0.1);
    letter-spacing: 4px;
    font-weight: 700;
}

/* ─── UI: Notification ─── */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.notification > * {
    pointer-events: auto;
}

/* ─── EDITOR: Operator HUD ─── */
.operator-hud {
    background: rgba(255,255,255,0.012);
    border: 1px solid rgba(255,255,255,0.035);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}
.hud-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-top: 0.8rem;
}
.hud-range {
    width: 100%;
    accent-color: #d0d0d0;
    height: 4px;
    cursor: pointer;
}
.hud-val {
    display: inline-block;
    min-width: 24px;
    text-align: center;
    color: #d0d0d0;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: "JetBrains Mono", monospace;
}

/* ─── EDITOR: Split view ─── */
.editor-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    min-height: 400px;
}
.editor-pane {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.preview-pane {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 1rem;
    overflow-y: auto;
    max-height: 600px;
    color: #e0e0e0;
    font-size: 0.85rem;
    line-height: 1.6;
}
.editor-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: end;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.025);
    margin-bottom: 0.8rem;
}
.editor-textarea-sm {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 4px;
    color: #e0e0e0;
    padding: 0.5rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
}

/* ─── EDITOR: Toolbar ─── */
.section-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.025);
    border-radius: 6px;
    margin-bottom: 0.8rem;
}
.toolbar-btn {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.04);
    color: #d0d0d0;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
    font-family: "JetBrains Mono", monospace;
}
.toolbar-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: #d0d0d0;
}
.toolbar-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.04);
    margin: 0 0.2rem;
}

/* ─── POSTS: Table ─── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}
.admin-table th,
.admin-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.025);
}
.admin-table th {
    color: #777;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.6rem;
    font-weight: 600;
}
.admin-table tr:hover {
    background: rgba(255,255,255,0.012);
}
.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 6px;
    background: rgba(0,0,0,0.15);
}

/* ─── TRACKS ─── */
.tracks-add-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 6px;
    margin-bottom: 1rem;
}
.tracks-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* ─── SETTINGS ─── */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 800px;
}
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.025);
    border-radius: 6px;
    gap: 1rem;
}
.toggle-slider {
    position: relative;
    width: 42px;
    height: 22px;
    background: rgba(255,255,255,0.1);
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
}
.toggle-slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #888;
    border-radius: 50%;
    transition: all 0.3s;
}
.toggle-slider.active {
    background: rgba(255,255,255,0.06);
}
.toggle-slider.active::after {
    left: 22px;
    background: #d0d0d0;
}

/* ─── HOMEPAGE ─── */
.homepage-section-name {
    font-size: 0.7rem;
    color: #d0d0d0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}
.homepage-section-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ─── SERVICES / NAV / LINKS manage lists ─── */
.services-manage-list,
.nav-manage-list,
.links-manage-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
    max-width: 800px;
    margin-top: 0.8rem;
}
.services-manage-list > div,
.nav-manage-list > div,
.links-manage-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.025);
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ─── API KEYS ─── */
.apikey-group {
    width: 100%;
    max-width: 800px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}

/* ─── THEME ─── */
.color-input {
    width: 50px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    padding: 2px;
}
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: none; border-radius: 2px; }
.color-hex {
    width: 90px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 4px;
    color: #e0e0e0;
    padding: 0.4rem 0.5rem;
    text-align: center;
}

/* ─── UTILITY: Size variants ─── */
.sm { font-size: 0.75rem; }
.lg { font-size: 1.1rem; }

/* ─── BACKUPS ─── */
.backup-card-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}
.backup-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #d0d0d0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}
.backup-card-desc {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.4;
}
.backup-desc {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    padding: 0.8rem 0;
    line-height: 1.5;
}
.backup-export {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.8rem;
}
.backup-status {
    padding: 0.8rem;
    background: rgba(255,255,255,0.012);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 6px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    margin-top: 0.8rem;
}

/* ─── DASHBOARD: Threat Feed ─── */
.threat-feed {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.threat-feed .threat-empty {
    padding: 1rem;
    text-align: center;
    color: #d0d0d0;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ─── RESPONSIVE: Sidebar mobile ─── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close {
        display: block;
    }
    .editor-split {
        grid-template-columns: 1fr;
    }
    .hud-grid {
        grid-template-columns: 1fr 1fr;
    }
}
