/* ====================================================================
   Admin Panel — Dark Theme
   Palette mirrors the setup wizard:
     bg      #0a0a0a   surface  #141414   card  #1c1c1c
     border  #2a2a2a   text     #e8e8e8   muted #888
     accent  #FF6B6B   success  #4CAF50   error #f44336
   ==================================================================== */

:root {
    --bg:       #0a0a0a;
    --surface:  #141414;
    --card:     #1c1c1c;
    --border:   #2a2a2a;
    --border2:  #333;
    --text:     #e8e8e8;
    --muted:    #888;
    --accent:   #FF6B6B;
    --accent-h: #ff4f4f;
    --success:  #4CAF50;
    --error:    #f44336;
    --primary:  #FF6B6B;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    color: var(--text);
}

.container {
    background: var(--surface);
    max-width: 1000px;
    width: 100%;
    padding: 4px;
}

h1 {
    color: var(--text);
    margin-bottom: 2px;
    text-align: center;
    font-size: 22px;
}

.app-version {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 12px;
}

.build-required-badge {
    display: block;
    width: fit-content;
    margin: 0 auto 12px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(240, 180, 41, 0.45);
    background: rgba(240, 180, 41, 0.14);
    color: #ffd978;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-align: center;
}

.user-badge {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

.user-badge strong {
    color: var(--accent);
}

.user-badge a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}

.user-badge a:hover {
    color: var(--accent);
}

.message {
    padding: 10px 14px;
    margin-bottom: 14px;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
}

.message.success {
    background: rgba(76, 175, 80, 0.12);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.message.error {
    background: rgba(244, 67, 54, 0.12);
    color: #e57373;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.admin-toast-host {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
    pointer-events: none;
}

.admin-toast {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
    border-left: 4px solid #60a5fa;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
    animation: toast-in 180ms ease-out;
}

.admin-toast.success {
    border-left-color: #4ade80;
}

.admin-toast.warning {
    border-left-color: #f59e0b;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section { margin-bottom: 20px; }

.section h2 {
    color: var(--accent);
    font-size: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

.form-group { margin-bottom: 10px; }

label {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
}

input[type="text"],
input[type="date"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border2);
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    background: var(--card);
    color: var(--text);
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

input[readonly],
.is-readonly-field {
    background: var(--surface);
    color: var(--muted);
}

button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

button:hover { background: var(--accent-h); }

button.danger { background: var(--error); }
button.danger:hover { background: #d32f2f; }

/* Card component */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.card h3 { margin-top: 0; }

.card-note {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
}

.media-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
}

.media-pills .btn-primary { margin-left: auto; }

.hint {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 14px;
}

.section-label {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
    margin-top: 0;
}

.share-previews {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.share-preview-col {
    flex: 1;
    min-width: 280px;
}

.table-scroll { overflow-x: auto; }

.nowrap { white-space: nowrap; }

.empty-msg {
    color: var(--muted);
    text-align: center;
    padding: 24px 0;
}

.code-editor {
    width: 100%;
    background: #0d0d0d;
    color: #d4d4d4;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 14px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    display: block;
}

.build-log {
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 14px;
    height: 420px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    color: #d4d4d4;
    margin: 0;
}

/* Tab Navigation */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.tabs.sub-tabs {
    border-bottom: 1px solid var(--accent-h);
    background: var(--accent);
    border-radius: 4px 4px 0 0;
    padding: 4px 4px 0;
    min-height: 38px;
    align-items: center;
}

/* ── Help toggle button (ⓘ) in sub-tab bar ── */
.help-toggle-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 15px;
    padding: 5px 12px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    align-self: stretch;
    display: flex;
    align-items: center;
}
.help-toggle-btn:hover { color: rgba(255,255,255,0.9); background: rgba(0,0,0,0.15); }
.help-toggle-btn.active { color: #fff; }

/* ── Admin help box ── */
.admin-help-box {
    background: rgba(96,165,250,0.06);
    border: 1px solid rgba(96,165,250,0.2);
    border-top: none;
    padding: 11px 18px;
    font-size: 13px;
    line-height: 1.65;
    color: #94a3b8;
    overflow: hidden;
    max-height: 200px;
    transition: max-height 0.2s ease, padding 0.2s ease, border-bottom-width 0.2s ease;
    border-radius: 0 0 6px 6px;
    margin-bottom: 14px;
}
.admin-help-box.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom-width: 0;
}
.admin-help-box strong { color: #cbd5e1; }
.admin-help-box code {
    font-family: monospace;
    background: rgba(255,255,255,0.08);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}
.admin-help-box a { color: #60a5fa; }

.tabs.sub-tabs .tab-link {
    font-size: 13px;
    padding: 7px;
    color: rgba(255,255,255,0.75);
    border-bottom: 2px solid transparent;
    font-weight: 500;
    border-radius: 0;
}

.tabs.sub-tabs .tab-link:hover {
    color: #fff;
    background: rgba(0,0,0,0.1);
}

.tabs.sub-tabs .tab-link.active {
    color: var(--bg);
    border-bottom-color: var(--bg);
    background: rgba(255,255,255,0.15);
}

.tabs.sub-tabs .subtab-action {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
}

.tabs.sub-tabs .subtab-action:hover {
    background: rgba(0, 0, 0, 0.32);
}

.tabs.sub-tabs .subtab-spinner,
.tabs.sub-tabs .subtab-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    white-space: nowrap;
    align-self: center;
}

.tabs.sub-tabs .subtab-status {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.build-log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.build-log-head h3 {
    margin: 0;
}

.build-log-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.build-log-spinner {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.build-log-status {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    min-height: 18px;
}

.build-validation-card {
    margin-bottom: 14px;
}

.build-validation-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.build-validation-head h3 {
    margin: 0;
}

.build-validation-summary {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.build-validation-summary p {
    margin: 0;
}

.build-validation-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.build-validation-metric {
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    padding: 6px 10px;
}

.build-validation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.build-validation-item {
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: 8px;
    padding: 12px;
}

.build-validation-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.build-validation-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.build-validation-item-file {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
    word-break: break-word;
}

.build-validation-item-actions {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.build-validation-item-actions li + li {
    margin-top: 4px;
}

.build-validation-item-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.build-validation-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 107, 107, 0.28);
    background: rgba(255, 107, 107, 0.1);
    color: #ffc4c4;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.build-validation-link:hover {
    background: rgba(255, 107, 107, 0.16);
    border-color: rgba(255, 107, 107, 0.45);
}

.build-validation-empty {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 720px) {
    .build-validation-head,
    .build-validation-item-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

.tab-link {
    padding: 7px;
    text-decoration: none;
    color: var(--muted);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    display: inline-block;
}

.tab-link:hover { color: var(--text); }

.tab-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-link.build-required-nudge {
    color: #ffd166;
    border-bottom-color: #ffd166;
    font-weight: 800;
}

.tab-link.build-required-nudge::after {
    content: ' •';
    font-weight: 700;
}

.tab-link.build-required-pulse {
    animation: build-tab-pulse 1.05s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    transform-origin: center bottom;
}

@keyframes build-tab-pulse {
    0% {
        text-shadow: 0 0 0 rgba(255, 209, 102, 0.0);
        transform: scale(1);
    }
    35% {
        text-shadow: 0 0 10px rgba(255, 209, 102, 0.75), 0 0 22px rgba(255, 140, 66, 0.55);
        transform: scale(1.05);
    }
    65% {
        text-shadow: 0 0 14px rgba(255, 209, 102, 0.95), 0 0 28px rgba(255, 140, 66, 0.65);
        transform: scale(1.09);
    }
    100% {
        text-shadow: 0 0 0 rgba(255, 209, 102, 0.0);
        transform: scale(1);
    }
}

.tab-content { display: none; }
.tab-content.active { display: block; }

#tab-files.drag-upload-active {
    border: 1px dashed rgba(96, 165, 250, 0.65);
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0.02));
}

#tab-files.drag-upload-active::before {
    content: 'Drop files to upload';
    display: block;
    text-align: center;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 8px 10px 2px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    border-left: 3px solid var(--accent);
}

.stat-card h3 {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-card .value {
    font-size: 22px;
    font-weight: bold;
    color: var(--text);
}

.stat-card .unit {
    font-size: 11px;
    color: var(--muted);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

table th {
    background: var(--surface);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    border-bottom: 1px solid var(--border2);
    text-transform: uppercase;
    letter-spacing: .04em;
}

table td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text);
}

table tbody tr:hover {
    background: rgba(255,255,255,0.025);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.device {
    background: rgba(0,198,255,0.1);
    color: #60d0ff;
    border: 1px solid rgba(0,198,255,0.2);
}

.badge.original {
    background: rgba(76,175,80,0.12);
    color: #81c784;
    border: 1px solid rgba(76,175,80,0.2);
}

.badge.lq {
    background: rgba(255,152,0,0.12);
    color: #ffb74d;
    border: 1px solid rgba(255,152,0,0.2);
}

.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--card);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.filter-bar label {
    display: inline;
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    margin-right: 4px;
}

.filter-bar input[type="date"],
.filter-bar select {
    padding: 5px 8px;
    border: 1px solid var(--border2);
    border-radius: 5px;
    font-size: 12px;
    background: var(--surface);
    color: var(--text);
}

.filter-bar button {
    padding: 5px 12px;
    font-size: 12px;
}

.filter-preset-btns {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.filter-preset-btns button {
    padding: 4px 10px;
    font-size: 11px;
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--border2);
}

.filter-preset-btns button:hover {
    background: var(--card);
    color: var(--text);
}

.filter-preset-btns button.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.empty-state {
    text-align: center;
    padding: 24px 16px;
    color: var(--muted);
}

.empty-state p { margin: 10px 0; }

canvas { max-width: 100%; height: auto; }

#hourlyChart {
    min-height: 300px;
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 240px;
    margin-bottom: 12px;
}

@media (max-width: 600px) {
    .container { padding: 4px; }
    h1 { font-size: 18px; }
    .user-item { flex-direction: column; align-items: flex-start; }
    .tabs { gap: 4px; }
    .tab-link { padding: 7px; font-size: 12px; }
    .stats-grid { grid-template-columns: 1fr; }
    table { font-size: 12px; }
    table th, table td { padding: 7px; }
}

/* ===== Users toolbar ===== */
.users-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.users-toolbar h2 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover { background: var(--accent-h); }

.btn {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border2);
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s;
}

.btn:hover {
    background: var(--surface);
    border-color: var(--accent);
}

.btn.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn.btn-primary:hover {
    background: var(--accent-h);
    border-color: var(--accent-h);
}

/* ===== Users list ===== */
.users-list {
    background: var(--card);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--surface);
    margin-bottom: 5px;
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.user-item.current {
    border-left-color: var(--success);
}

.user-name {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
}

.user-name:hover {
    color: var(--accent);
    text-decoration: underline;
}

.you-badge {
    color: var(--success);
    font-size: 12px;
    margin-left: 8px;
}

.role-badge {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.role-admin {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: var(--accent);
}

.role-developer {
    background: rgba(96, 208, 255, 0.12);
    border: 1px solid rgba(96, 208, 255, 0.35);
    color: #8ee4ff;
}

.role-user {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border2);
    color: var(--muted);
}

.user-role-select {
    width: auto;
    min-width: 110px;
    padding: 4px 8px;
    font-size: 12px;
}

.user-actions { display: flex; gap: 6px; }

.icon-btn {
    background: none;
    border: 1px solid var(--border2);
    border-radius: 5px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--muted);
    transition: border-color 0.2s, background 0.2s;
    line-height: 1.4;
}

.icon-btn:hover {
    border-color: var(--accent);
    background: rgba(255,107,107,0.08);
    color: var(--text);
}

.icon-btn.danger:hover {
    border-color: var(--error);
    background: rgba(244,67,54,0.1);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.76);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-box {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 10px;
    padding: 22px 26px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-box.modal-wide { max-width: 920px; }

#mediaPickerModal {
    z-index: 1100;
}

.audio-master-cover-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.audio-master-cover-preview-shell {
    display: flex;
    justify-content: center;
}

.audio-master-cover-preview {
    width: 180px;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    padding: 12px;
    position: relative;
}

.audio-master-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audio-master-cover-overlay-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 1;
}

.audio-master-cover-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.72);
    border-color: rgba(255,255,255,0.14);
}

.audio-master-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0;
}

.audio-master-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
}

.audio-master-stat strong {
    font-size: 13px;
}

.audio-master-stat-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.audio-master-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.audio-master-form-grid-compact {
    grid-template-columns: 2fr 1.4fr 1.2fr 0.9fr 0.9fr;
}

.audio-master-form-grid-secondary {
    grid-template-columns: 1fr 1fr 0.9fr;
}

.date-input-shell {
    position: relative;
}

.date-input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}

#audioMasterFieldDate {
    padding-left: 34px;
    color-scheme: dark;
}

#audioMasterFieldDate::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.audio-master-description-note {
    text-align: right;
}

.audio-master-status-error {
    color: var(--error);
}

.audio-master-status-success {
    color: #9ad29a;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--muted);
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
    background: rgba(255,255,255,0.07);
}

.modal-box h3 {
    margin-bottom: 14px;
    color: var(--text);
    font-size: 16px;
}

.user-detail-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.user-detail-header h3 {
    margin: 0;
    color: var(--text);
}

.detail-period {
    font-size: 12px;
    color: var(--muted);
}

/* ===== Activity badge ===== */
.badge.activity-badge {
    background: rgba(255,107,107,0.1);
    color: var(--accent);
    font-size: 11px;
    white-space: nowrap;
    border: 1px solid rgba(255,107,107,0.2);
}

.badge.audit-status-badge {
    min-width: 64px;
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge.audit-status-badge.status-ok {
    background: rgba(76, 175, 80, 0.12);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.badge.audit-status-badge.status-error {
    background: rgba(244, 67, 54, 0.12);
    color: #ef9a9a;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.badge.audit-status-badge.status-warning {
    background: rgba(255, 193, 7, 0.12);
    color: #ffd54f;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge.audit-status-badge.status-neutral {
    background: rgba(255, 255, 255, 0.06);
    color: #cfcfcf;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.docs-browser {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.docs-nav-panel,
.docs-content-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

.docs-nav-panel {
    position: sticky;
    top: 12px;
}

.docs-nav-panel-head,
.docs-content-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.docs-nav-panel-head h3,
.docs-content-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
}

.docs-nav-count,
.docs-content-path,
.docs-nav-path {
    color: var(--muted);
    font-size: 12px;
}

.docs-scope-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.docs-scope-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 124px;
    padding: 7px 12px;
    text-decoration: none;
    color: var(--muted);
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.docs-scope-link.active {
    color: var(--text);
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.4);
}

.docs-scope-note {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 12px;
}

.docs-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-nav-link {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border2);
    background: var(--surface);
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.docs-nav-link:hover {
    border-color: rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.06);
    transform: translateX(1px);
}

.docs-nav-link.active {
    border-color: rgba(255, 107, 107, 0.45);
    background: rgba(255, 107, 107, 0.1);
}

.docs-nav-title {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.docs-markdown {
    color: var(--text);
    line-height: 1.68;
    font-size: 14px;
}

.docs-markdown > :first-child {
    margin-top: 0;
}

.docs-markdown h1,
.docs-markdown h2,
.docs-markdown h3,
.docs-markdown h4,
.docs-markdown h5,
.docs-markdown h6 {
    color: var(--text);
    line-height: 1.25;
    margin: 1.2em 0 0.5em;
}

.docs-markdown h1 {
    font-size: 28px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.docs-markdown h2 {
    font-size: 21px;
    color: #f2b0b0;
}

.docs-markdown h3 {
    font-size: 17px;
    color: #f5caca;
}

.docs-markdown p,
.docs-markdown ul,
.docs-markdown ol,
.docs-markdown blockquote,
.docs-markdown pre {
    margin: 0 0 14px;
}

.docs-markdown ul,
.docs-markdown ol {
    padding-left: 22px;
}

.docs-markdown li {
    margin-bottom: 8px;
}

.docs-markdown hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.docs-markdown code {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    padding: 1px 6px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.95em;
}

.docs-code-block {
    background: #101010;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    overflow-x: auto;
}

.docs-code-block code {
    background: transparent;
    border: 0;
    padding: 0;
    display: block;
    white-space: pre;
}

.docs-markdown blockquote {
    border-left: 3px solid rgba(255, 107, 107, 0.45);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    color: #d9d9d9;
}

.docs-inline-link {
    color: #ff9d9d;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 157, 157, 0.35);
}

.docs-inline-link:hover {
    color: #ffc4c4;
    border-bottom-color: rgba(255, 196, 196, 0.65);
}

.docs-task-item {
    list-style: none;
    margin-left: -22px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.docs-task-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid var(--border2);
    background: var(--surface);
    color: var(--muted);
    flex-shrink: 0;
    margin-top: 2px;
}

.docs-task-check.checked {
    border-color: rgba(76, 175, 80, 0.4);
    background: rgba(76, 175, 80, 0.15);
    color: #9ad29c;
}

.docs-task-check.unchecked {
    color: #b0b0b0;
}

/* ===== Completion bar ===== */
.completion-bar-wrap {
    width: 100%;
    background: var(--border2);
    border-radius: 3px;
    overflow: hidden;
}

.completion-bar {
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 2px;
}

/* ===== Config: drop zones & media pills ===== */
.drop-zone {
    border: 2px dashed var(--border2);
    border-radius: 8px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--bg);
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(255,107,107,0.05);
    color: var(--text);
}

.media-pill {
    background: var(--card);
    border: 1px solid var(--border2);
    color: var(--muted);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.media-pill:hover {
    background: var(--surface);
    color: var(--text);
    border-color: var(--accent);
}

.media-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ===== Media file list ===== */
.media-file-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 40px;
}

.media-file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: var(--bg);
    border-radius: 5px;
    font-size: 13px;
    gap: 12px;
    border: 1px solid transparent;
    transition: border-color 0.15s;
}

.media-file-row:hover { border-color: var(--border2); }

.media-file-row-clickable {
    cursor: pointer;
}

.media-file-row-clickable:hover {
    border-color: rgba(98, 179, 255, 0.45);
    background: rgba(98, 179, 255, 0.05);
}

.media-file-row-clickable:focus-visible {
    outline: none;
    border-color: rgba(98, 179, 255, 0.7);
    box-shadow: 0 0 0 1px rgba(98, 179, 255, 0.3);
}

.media-file-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}

.media-file-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    cursor: pointer;
    background: var(--bg2);
    border: 1px solid var(--border);
    transition: opacity 0.15s;
}
.media-file-thumb:hover { opacity: 0.8; }

.media-file-name {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.media-file-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.media-file-name-wrap .media-file-name {
    flex: initial;
}

.media-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.media-file-badge {
    min-width: 0;
}

.media-file-field-badge {
    min-width: 22px;
    padding-left: 6px;
    padding-right: 6px;
}

.media-file-row-focus {
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.22);
}

.playlist-editor-row-focus {
    border-color: rgba(255, 107, 107, 0.55) !important;
    box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.22);
    background: rgba(255, 107, 107, 0.08);
}

.media-file-size {
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
}

/* ===== Admin preview lightbox ===== */
#adminPreviewLightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}
#adminPreviewLightbox.active { display: flex; }
#adminPreviewClose {
    position: fixed;
    top: 18px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}
#adminPreviewPrev,
#adminPreviewNext {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 48px;
    line-height: 1;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    z-index: 10000;
    user-select: none;
}
#adminPreviewPrev { left: 16px; }
#adminPreviewNext { right: 16px; }
#adminPreviewPrev:hover,
#adminPreviewNext:hover { background: rgba(255,255,255,0.28); }
#adminPreviewImg {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 6px;
    object-fit: contain;
}
#adminPreviewVid {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 6px;
}
#adminPreviewCaption {
    color: #aaa;
    font-size: 13px;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Media panel header ===== */
.media-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
}

.media-panel-summary {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 14px;
    min-width: 0;
}

.media-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.media-count {
    font-size: 13px;
    color: var(--muted);
    font-weight: 400;
}

.media-panel-intro {
    font-size: 13px;
    color: var(--text-soft);
    white-space: normal;
}

.bundled-demo-toggle {
    min-width: 88px;
    color: var(--muted);
    border-color: var(--border2);
    background: var(--surface);
}

.bundled-demo-toggle:hover {
    color: var(--text);
    border-color: #8a919b;
    background: rgba(255, 255, 255, 0.06);
}

.bundled-demo-toggle.active {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
}

.bundled-demo-toggle.active:hover {
    border-color: var(--accent-h);
    background: var(--accent-h);
}

@media (max-width: 720px) {
    .audio-master-cover-layout {
        grid-template-columns: 1fr;
    }

    .audio-master-cover-preview-shell {
        justify-content: flex-start;
    }

    .audio-master-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .audio-master-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .audio-master-summary,
    .audio-master-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Utility ===== */
.text-muted  { color: var(--muted); font-size: 13px; }
.text-error  { color: var(--error); font-size: 13px; }
.status-text { font-size: 13px; }

/* ===== Modal helpers ===== */
.modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.modal-file-list {
    font-size: 13px;
    color: var(--muted);
    margin: 8px 0;
    max-height: 120px;
    overflow-y: auto;
}

.modal-file-row { padding: 2px 0; }

.delete-confirm-name {
    font-size: 14px;
    font-family: monospace;
    color: var(--text);
    word-break: break-all;
    margin: 4px 0 10px;
}

/* ===== Social form grid ===== */
.social-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.config-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    margin-top: 14px;
}

.card-grid.two-up {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.card-grid.two-up .card {
    margin-bottom: 0;
}

.social-form-full {
    grid-column: 1 / -1;
}

.config-form-full {
    grid-column: 1 / -1;
}

.config-form-textarea {
    resize: vertical;
    min-height: 104px;
}

.field-note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.asset-picker-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border2);
    border-radius: 6px;
    background: var(--bg);
}

.asset-picker-value {
    color: var(--text);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-picker-value.empty {
    color: var(--muted);
}

.asset-picker-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.media-picker-tabs {
    margin-top: 16px;
}

.media-picker-list {
    margin-top: 14px;
    max-height: 420px;
    overflow-y: auto;
}

.media-picker-row .icon-btn:last-child {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .social-form-grid { grid-template-columns: 1fr; }
    .social-form-full { grid-column: 1; }
    .config-form-grid { grid-template-columns: 1fr; }
    .config-form-full { grid-column: 1; }
    .card-grid.two-up { grid-template-columns: 1fr; }
    .asset-picker-control {
        flex-direction: column;
        align-items: stretch;
    }
    .asset-picker-actions {
        justify-content: flex-end;
    }
}

/* ===== Gallery admin grid ===== */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 4px 0;
    margin-top: 8px;
}

.gallery-admin-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gallery-admin-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: block;
}

.gallery-admin-label {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-admin-label {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Playlist editor */
.playlist-editor {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.playlist-editor-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: grab;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.playlist-editor-row:active {
    cursor: grabbing;
}

.playlist-editor-row.dragging {
    opacity: 0.4;
}

.playlist-editor-row.drag-over {
    border-color: var(--accent);
    background: rgba(102, 126, 234, 0.1);
}

.playlist-editor-row-demo {
    border-style: dashed;
}

.playlist-drag-handle {
    font-size: 18px;
    color: var(--muted);
    flex-shrink: 0;
    cursor: grab;
    line-height: 1;
}

.playlist-track-num {
    font-size: 12px;
    color: var(--muted);
    min-width: 22px;
    text-align: right;
    flex-shrink: 0;
}

.playlist-track-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.playlist-track-info strong {
    font-size: 14px;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-track-meta {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-track-duration {
    font-size: 12px;
    color: var(--muted);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* Gallery editor */
.gallery-editor {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

@media (max-width: 800px) {
    .gallery-editor { flex-direction: column; }

    .docs-browser {
        grid-template-columns: 1fr;
    }

    .docs-nav-panel {
        position: static;
    }
}

.gallery-editor-col {
    flex: 1;
    min-width: 0;
}

.gallery-editor-col-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px 0;
}

/* Available panel */
.gallery-available-list {
    max-height: 480px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 4px;
}

.gallery-available-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: background 0.12s;
}

.gallery-available-row:hover {
    background: rgba(255,255,255,0.04);
}

.gallery-available-name {
    flex: 1;
    font-size: 13px;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Shared thumbnail */
.gallery-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #1a1a1a;
}

.gallery-thumb--sm {
    width: 36px;
    height: 36px;
}

.gallery-thumb--video {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--muted);
    background: #1a1a2a;
    border: 1px solid var(--border);
}

/* Active list */
.gallery-active-list {
    list-style: none;
    margin: 0 0 12px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 48px;
}

.gallery-active-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: grab;
    user-select: none;
    transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}

.gallery-active-row:active { cursor: grabbing; }
.gallery-active-row.dragging { opacity: 0.4; }
.gallery-active-row.drag-over {
    border-color: var(--accent);
    background: rgba(102, 126, 234, 0.1);
}

.gallery-active-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.gallery-field-name,
.gallery-field-alt {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--fg);
    font-size: 12px;
    padding: 4px 7px;
    outline: none;
    transition: border-color 0.15s;
    cursor: text;
}

.gallery-field-name:focus,
.gallery-field-alt:focus {
    border-color: var(--accent);
}

.gallery-field-alt {
    color: var(--muted);
}

.gallery-remove-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.12s, background 0.12s;
    line-height: 1;
}

.gallery-remove-btn:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.gallery-count-badge {
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
}

/* Small add button */
.btn-sm {
    font-size: 16px;
    line-height: 1;
    padding: 3px 9px;
    border-radius: 4px;
    flex-shrink: 0;
}

/*  Login page  */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    width: 100%;
    max-width: 380px;
    padding: 36px 32px;
}

.login-container h1 { margin-bottom: 2px; text-align: center; font-size: 20px; }
.login-container .app-version { text-align: center; font-size: 11px; color: #888; margin-bottom: 8px; }
.login-container .subtitle { color: #888; text-align: center; margin-bottom: 28px; font-size: 13px; }

.login-container .error {
    background: rgba(244,67,54,0.12);
    color: #e57373;
    border: 1px solid rgba(244,67,54,0.3);
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 13px;
}

.login-container .form-group { margin-bottom: 14px; }

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%; padding: 9px 11px;
    border: 1px solid #333; border-radius: 5px;
    font-size: 14px; font-family: inherit;
    background: #1c1c1c; color: #e8e8e8;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    outline: none; border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255,107,107,0.15);
}

.login-container button {
    width: 100%; background: #FF6B6B; color: #fff;
    border: none; padding: 10px; border-radius: 5px;
    cursor: pointer; font-size: 14px; font-weight: 600;
    transition: background 0.2s;
}

.login-container button:hover { background: var(--accent-h); }
