/* Chugalkhor News admin panel */
:root {
    --navy: #050D22;
    --navy-2: #081733;
    --panel: #0A1730;
    --panel-2: #0E2144;
    --line: #213A63;
    --line-soft: rgba(33, 58, 99, 0.65);
    --gold: #FFC700;
    --gold-soft: #FFD84A;
    --blue: #2084FF;
    --red: #CE1126;
    --green: #2ECC71;
    --text: #F5F8FF;
    --muted: #9FB0CC;
    --radius: 16px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--navy);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.9em;
    background: rgba(32, 132, 255, 0.12);
    border: 1px solid rgba(32, 132, 255, 0.25);
    padding: 2px 6px;
    border-radius: 6px;
    word-break: break-word;
}
.muted { color: var(--muted); }
.small-text { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hint { color: var(--muted); font-size: 12px; margin-top: 10px; }
.hidden-form { display: none; }

/* ------------------------------------------------------------------ layout */
.shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 22px 18px;
    background: linear-gradient(180deg, #081733, #050D22 65%);
    border-right: 1px solid var(--line-soft);
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-logo {
    width: 50px;
    height: 50px;
    padding: 4px;
    object-fit: contain;
    background: #fff;
    border: 2px solid var(--gold);
    border-radius: 50%;
}
.brand strong {
    display: block;
    font-size: 15px;
    letter-spacing: 1.2px;
    color: var(--gold);
}
.brand small {
    display: block;
    font-size: 10px;
    letter-spacing: 2.4px;
    color: var(--muted);
}

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 11px;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
}
.nav a:hover {
    background: rgba(32, 132, 255, 0.08);
    color: var(--text);
    text-decoration: none;
}
.nav a.active {
    background: linear-gradient(90deg, rgba(255, 199, 0, 0.16), rgba(255, 199, 0, 0.03));
    border-color: rgba(255, 199, 0, 0.35);
    color: var(--gold);
}
.nav-ico {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 12px;
}

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.sync-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 11px;
    background: rgba(46, 204, 113, 0.07);
    border: 1px solid rgba(46, 204, 113, 0.25);
    border-radius: 11px;
}
.sync-note strong { display: block; font-size: 12px; }
.sync-note small { display: block; font-size: 10.5px; color: var(--muted); }
.dot {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    flex: 0 0 auto;
}

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 20px 30px;
    background: rgba(10, 23, 48, 0.72);
    border-bottom: 1px solid var(--line-soft);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar h1 { font-size: 21px; font-weight: 800; letter-spacing: 0.2px; }
.topbar .muted { font-size: 12px; margin-top: 2px; }
.admin-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 13px 6px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    font-weight: 700;
    font-size: 13px;
}
.avatar {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-weight: 900;
}

.content { padding: 26px 30px 30px; max-width: 1500px; width: 100%; margin: 0 auto; }
.page-foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 30px;
    color: var(--muted);
    font-size: 11.5px;
    border-top: 1px solid var(--line-soft);
}

/* ------------------------------------------------------------------ cards */
.panel {
    background: linear-gradient(180deg, rgba(14, 33, 68, 0.65), rgba(10, 23, 48, 0.9));
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}
.panel-head h2 { font-size: 17px; font-weight: 800; letter-spacing: 0.2px; }
.panel-head .muted { font-size: 12px; margin-top: 4px; max-width: 760px; }
.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 199, 0, 0.1);
    border: 1px solid rgba(255, 199, 0, 0.3);
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.stat-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 17px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(160deg, rgba(32, 132, 255, 0.12), rgba(10, 23, 48, 0.9));
}
.stat-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.stat-value { font-size: 28px; font-weight: 900; color: var(--gold); line-height: 1.1; }
.stat-value.small { font-size: 17px; color: var(--text); }
.stat-unit { font-size: 15px; color: var(--muted); }
.stat-hint { color: var(--muted); font-size: 11px; }

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 18px;
    align-items: start;
}
.two-col.narrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.steps { display: grid; gap: 9px; margin-top: 14px; }
.step { display: flex; gap: 11px; align-items: flex-start; }
.step > span {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-weight: 900;
    font-size: 12px;
}
.step p { font-size: 13px; color: var(--muted); }
.step strong { color: var(--text); }

.copy-row {
    display: flex;
    gap: 9px;
    align-items: stretch;
    flex-wrap: wrap;
    margin-top: 6px;
}
.copy-row code {
    flex: 1 1 320px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    font-size: 12.5px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}
.info-grid > div {
    padding: 13px;
    border-left: 3px solid var(--blue);
    background: rgba(32, 132, 255, 0.06);
    border-radius: 0 10px 10px 0;
}
.info-grid strong { display: block; font-size: 13px; margin-bottom: 4px; }
.info-grid p { color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.field > span { font-size: 11px; font-weight: 800; letter-spacing: 0.9px; text-transform: uppercase; color: var(--muted); }
.field small { color: var(--muted); font-size: 11px; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 11px 12px;
    color: var(--text);
    background: var(--navy-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 199, 0, 0.12);
}
.field.compact { margin: 0; }
.field.compact input { padding: 8px 10px; font-size: 12px; }
.form-stack { display: flex; flex-direction: column; gap: 4px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease;
    text-decoration: none !important;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(180deg, #FFD84A, #FFC700);
    color: #050D22;
    box-shadow: 0 10px 26px rgba(255, 199, 0, 0.24);
}
.btn-secondary {
    background: rgba(32, 132, 255, 0.14);
    border-color: rgba(32, 132, 255, 0.45);
    color: #BFD9FF;
}
.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--muted);
}
.btn-block { width: 100%; }
.btn-lg { padding: 13px 20px; font-size: 14px; }
.btn-sm { padding: 6px 11px; font-size: 11px; }

.hidden-file { display: none; }

/* ------------------------------------------------------------------ alerts */
.alert {
    padding: 11px 13px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
}
.alert-success { background: rgba(46, 204, 113, 0.1); border-color: rgba(46, 204, 113, 0.4); color: #A7F3C8; }
.alert-error { background: rgba(206, 17, 38, 0.13); border-color: rgba(206, 17, 38, 0.5); color: #FFB8C0; }

.notice {
    padding: 12px 14px;
    border-radius: 10px;
    margin-top: 13px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}
.notice strong { display: block; font-size: 12px; margin-bottom: 3px; }
.notice p { font-size: 12px; color: var(--muted); }
.notice-warn { border-color: rgba(255, 199, 0, 0.35); background: rgba(255, 199, 0, 0.06); }
.notice-info { border-color: rgba(32, 132, 255, 0.35); background: rgba(32, 132, 255, 0.06); }

/* ------------------------------------------------------------------ dashboard preview */
.theme-preview {
    container-type: inline-size;
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 9px;
    overflow: hidden;
    background: var(--bg);
    border: 2px solid var(--border);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 30px rgba(0, 0, 0, 0.35);
}
.tp-header {
    position: absolute;
    left: 0.6%;
    right: 0.6%;
    top: 0.8%;
    height: 12.4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2%;
    padding: 0 1.6%;
    background: var(--header);
    border-bottom: 1px solid var(--border);
}
.tp-info { display: flex; flex-direction: column; gap: 0.4cqw; font-size: 1.8cqw; font-weight: 700; }
.tp-info small { font-size: 1.4cqw; }
.tp-title { font-size: 2cqw; letter-spacing: 0.2cqw; white-space: nowrap; }
.tp-title strong { color: #fff; }
.tp-title em { color: var(--accent); font-style: normal; }
.tp-logo {
    width: 6.2cqw;
    height: 6.2cqw;
    border-radius: 50%;
    object-fit: contain;
    background: var(--logo-bg);
    border: 2px solid var(--border);
    padding: 0.35cqw;
}
.tp-logo-empty { border: 2px dashed var(--border); }
.tp-video {
    position: absolute;
    left: 5%;
    top: 13.7%;
    width: 90%;
    height: 68.9%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 30% 25%, rgba(32, 132, 255, 0.28), transparent 55%),
        linear-gradient(135deg, #0E2A55, #030A18);
    border: 2px solid var(--border);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.38);
    font-size: 1.8cqw;
    letter-spacing: 0.4cqw;
}
.tp-breaking {
    position: absolute;
    left: 0;
    top: 83.7%;
    width: 100%;
    height: 8.7%;
    display: flex;
    align-items: center;
    gap: 2%;
    padding: 0 2% 0 0;
    color: var(--breaking-text);
    background: var(--breaking);
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    font-size: 2.2cqw;
    font-weight: 800;
}
.tp-breaking strong {
    align-self: stretch;
    display: grid;
    place-items: center;
    padding: 0 2.2cqw;
    background: var(--accent);
    color: var(--bg);
    font-size: 2.3cqw;
    letter-spacing: 0.08cqw;
}
.tp-breaking span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tp-ticker {
    position: absolute;
    left: 0;
    top: 92.4%;
    width: 100%;
    height: 6.85%;
    display: flex;
    align-items: center;
    gap: 1.5%;
    padding-right: 3%;
    background: var(--ticker);
    color: var(--ticker-text);
    font-size: 1.8cqw;
    font-weight: 700;
    overflow: hidden;
}
.tp-ticker b {
    align-self: stretch;
    display: grid;
    place-items: center;
    padding: 0 1.8cqw;
    background: var(--accent);
    color: var(--bg);
    font-size: 1.5cqw;
    white-space: nowrap;
}
.tp-ticker span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.swatch-row { display: flex; align-items: center; gap: 7px; margin-top: 12px; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.2); }

.asset-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.asset-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(33, 58, 99, 0.4);
    font-size: 13px;
}
.asset-list li:last-child { border-bottom: 0; }
.asset-badge {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
    background: rgba(159, 176, 204, 0.15);
    color: var(--muted);
}
.asset-badge.ok { background: rgba(46, 204, 113, 0.16); color: var(--green); }
.asset-name { flex: 1; font-weight: 600; }

/* ------------------------------------------------------------------ branding editor */
.brand-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 18px;
    align-items: start;
}
.preview-panel { position: sticky; top: 93px; }
.editor-column { min-width: 0; }

.bp {
    container-type: inline-size;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg, #050D22);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--border, #2084FF), 0 16px 38px rgba(0, 0, 0, 0.4);
    --logo-size: 6.5cqw;
    --logo-left: 90.7%;
    --logo-top: 7.2%;
}
.bp::after {
    content: "";
    position: absolute;
    inset: 1.2%;
    border: 1px solid color-mix(in srgb, var(--border, #2084FF) 35%, transparent);
    border-radius: 6px;
    pointer-events: none;
}
.bp-inner { position: absolute; inset: 0; background: var(--bg, #050D22); }

.bp-header {
    position: absolute;
    left: 0.8%;
    right: 0.8%;
    top: 0.9%;
    height: 12.4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.4%;
    background: var(--header, #050D22);
    border-bottom: 1px solid var(--border, #2084FF);
}
.bp-info {
    display: flex;
    flex-direction: column;
    gap: 0.15cqw;
    min-width: 26cqw;
    padding: 0.55cqw 0.9cqw;
    border-left: 0.35cqw solid var(--breaking_bg, #CE1126);
    background: color-mix(in srgb, var(--header, #050D22) 88%, #000);
    border-radius: 0.4cqw;
}
.bp-label { font-size: 1.05cqw; letter-spacing: 0.12cqw; color: var(--muted); }
.bp-location { font-size: 1.95cqw; color: var(--location, #FFD84A); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-reporter { font-size: 1.45cqw; color: var(--reporter, #FFD84A); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-center { text-align: center; white-space: nowrap; }
.bp-center strong { font-size: 2.1cqw; letter-spacing: 0.12cqw; color: #fff; }
.bp-center em { font-size: 2.1cqw; font-style: normal; color: var(--accent, #FFC700); letter-spacing: 0.12cqw; }
.bp-center small { display: block; font-size: 0.95cqw; letter-spacing: 0.22cqw; color: var(--border, #2084FF); margin-top: 0.15cqw; }
.bp-logo-wrap {
    position: absolute;
    right: 1.5625%;
    top: 2.7778%;
    width: var(--logo-size, 6.5cqw);
    height: var(--logo-size, 6.5cqw);
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    place-items: center;
    padding: 0;
    padding: 8%;
    overflow: hidden;
}
.bp-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }

.bp-video {
    position: absolute;
    left: 5%;
    top: 13.7%;
    width: 90%;
    height: 68.9%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.34);
    font-size: 1.75cqw;
    letter-spacing: 0.36cqw;
    background:
        radial-gradient(circle at 28% 22%, rgba(32, 132, 255, 0.18), transparent 55%),
        linear-gradient(135deg, #0E2A55, #030A18 70%);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.bp-play {
    position: absolute;
    width: 4.4cqw;
    height: 4.4cqw;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 0.15cqw solid rgba(255, 255, 255, 0.35);
    font-size: 1.6cqw;
    padding-left: 0.3cqw;
}
.bp-video > span:last-child { margin-top: 6.6cqw; }

.bp-breaking {
    position: absolute;
    left: 0;
    top: 83.7%;
    width: 100%;
    height: 8.7%;
    display: flex;
    align-items: stretch;
    background: var(--breaking_bg, #CE1126);
    border-top: 0.16cqw solid var(--accent, #FFC700);
    border-bottom: 0.16cqw solid var(--accent, #FFC700);
    overflow: hidden;
}
.bp-breaking-label {
    flex: 0 0 21%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 1.4cqw;
    background: var(--accent, #FFC700);
    color: var(--bg, #050D22);
    font-size: 2.1cqw;
    font-weight: 900;
    line-height: 1.02;
    clip-path: polygon(0 0, 100% 0, 93% 100%, 0 100%);
}
.bp-breaking-label small { font-size: 1.45cqw; letter-spacing: 0.14cqw; }
.bp-headline {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 1.2cqw;
    color: var(--breaking_text, #fff);
    font-size: 2.3cqw;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 0.18cqw solid var(--accent, #FFC700);
    transition: color 80ms linear;
}
.bp-headline.flash-on { color: var(--accent, #FFC700); }

.bp-ticker {
    position: absolute;
    left: 0;
    top: 92.4%;
    width: 100%;
    height: 6.85%;
    display: flex;
    align-items: stretch;
    background: var(--ticker_bg, #040C1E);
    border-top: 0.15cqw solid var(--border, #2084FF);
    overflow: hidden;
}
.bp-ticker-label {
    flex: 0 0 12%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 1.1cqw;
    background: var(--accent, #FFC700);
    color: var(--ticker_bg, #040C1E);
    font-weight: 900;
    font-size: 1.55cqw;
    line-height: 1.05;
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}
.bp-ticker-label small { font-size: 1.15cqw; letter-spacing: 0.1cqw; }
.bp-ticker-track { position: absolute; left: 12.5%; right: 5%; top: 0; bottom: 0; overflow: hidden; }
.bp-ticker-track span {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    color: var(--ticker_text, #fff);
    font-size: 2.05cqw;
    font-weight: 800;
    animation: bp-ticker var(--ticker-duration, 20s) linear infinite;
    will-change: transform;
}
@keyframes bp-ticker {
    from { transform: translate(0, -50%); }
    to   { transform: translate(calc(-100% - 82cqw), -50%); }
}
.bp.paused .bp-ticker-track span { animation-play-state: paused; }
.bp.paused .bp-headline { color: var(--breaking_text, #fff) !important; }
.bp-live {
    position: absolute;
    right: 1%;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25cqw 1.05cqw;
    border-radius: 4cqw;
    background: var(--breaking_bg, #CE1126);
    color: #fff;
    font-size: 1.25cqw;
    font-weight: 800;
    letter-spacing: 0.05cqw;
    z-index: 2;
}

.preview-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 13px;
}
.preview-text .wide { grid-column: 1 / -1; }

.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.preset {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--navy-2);
    color: var(--text);
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}
.preset:hover { border-color: var(--gold); }
.preset.active {
    border-color: var(--gold);
    background: rgba(255, 199, 0, 0.12);
    box-shadow: 0 0 0 2px rgba(255, 199, 0, 0.18);
}
.preset .swatches { display: flex; gap: 2px; }
.preset .swatches i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); }

.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.color-field label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.color-control {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 7px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--navy-2);
}
.color-control input[type="color"] {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}
.color-control input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-control input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px; }
.color-control input[type="text"] {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 2px;
    outline: none;
    text-transform: uppercase;
}
.color-control input[type="text"]:focus { color: var(--gold); }

.subhead { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 18px 0 9px; }
.slider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.slider-field { display: flex; flex-direction: column; gap: 3px; }
.slider-field > span { font-size: 11.5px; color: var(--muted); }
.slider-field b { float: right; color: var(--gold); font-size: 11px; }
.slider-field input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: var(--line);
    outline: none;
}
.slider-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--navy);
    box-shadow: 0 0 0 2px rgba(255, 199, 0, 0.35);
    cursor: pointer;
}
.slider-field input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--navy);
    cursor: pointer;
}

.sticky-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--line-soft);
}
.sticky-actions .btn-primary { flex: 1 1 180px; }

/* ------------------------------------------------------------------ assets */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.asset-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 15px;
    border: 1px solid var(--line-soft);
    border-radius: 13px;
    background: var(--navy-2);
}
.asset-card header { display: flex; align-items: center; gap: 10px; }
.asset-card h3 { font-size: 14px; font-weight: 800; }
.asset-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 199, 0, 0.12);
    color: var(--gold);
    font-size: 15px;
}
.asset-status { font-size: 10.5px; color: var(--green); font-weight: 700; }
.asset-status.missing { color: var(--muted); }
.asset-preview {
    height: 128px;
    border-radius: 9px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
}
.asset-preview img { width: 100%; height: 100%; object-fit: contain; background: #071022; }
.asset-preview video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.asset-placeholder { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.asset-placeholder:first-letter { font-size: 22px; }
.asset-hint { font-size: 11px; color: var(--muted); }
.asset-meta { font-size: 9.5px; color: var(--muted); line-height: 1.5; word-break: break-word; }
.upload-form { display: flex; flex-direction: column; gap: 7px; margin-top: auto; }
.file-input {
    display: block;
    position: relative;
    padding: 9px 11px;
    border: 1px dashed var(--line);
    border-radius: 9px;
    cursor: pointer;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    overflow: hidden;
}
.file-input:hover { border-color: var(--gold); color: var(--gold); }
.file-input input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}
.file-input.has-file { border-color: var(--green); color: var(--green); }
.inline-form { display: flex; justify-content: flex-end; }
.link-danger {
    background: none;
    border: 0;
    color: #FF9AA6;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 2px;
}
.link-danger:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 620px; }
.table th {
    text-align: left;
    padding: 10px 12px;
    background: rgba(32, 132, 255, 0.07);
    color: var(--muted);
    font-size: 10.5px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}
.table td { padding: 9px 12px; border-top: 1px solid rgba(33, 58, 99, 0.45); vertical-align: top; }

.detail-list { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; margin: 0; }
.detail-list dt { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.detail-list dd { margin: 0; font-size: 13px; }

/* ------------------------------------------------------------------ login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background:
        radial-gradient(circle at 18% 12%, rgba(32, 132, 255, 0.22), transparent 42%),
        radial-gradient(circle at 82% 88%, rgba(206, 17, 38, 0.16), transparent 46%),
        linear-gradient(160deg, #061126, #050D22 60%, #030815);
}
.login-wrap { width: 100%; max-width: 440px; }
.login-card {
    padding: 26px;
    border-radius: 22px;
    border: 1px solid rgba(255, 199, 0, 0.28);
    background: linear-gradient(180deg, rgba(14, 33, 68, 0.92), rgba(8, 20, 42, 0.96));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.login-card.install-card { max-width: none; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-logo {
    width: 76px;
    height: 76px;
    padding: 5px;
    background: #fff;
    border: 2px solid var(--gold);
    border-radius: 50%;
    flex: 0 0 auto;
}
.login-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-brand h1 { font-size: 21px; font-weight: 900; letter-spacing: 1px; color: var(--gold); }
.login-brand h1 span { color: #fff; }
.login-brand p { font-size: 10px; letter-spacing: 2.6px; color: var(--muted); margin-top: 3px; }
.login-card .btn-lg { margin-top: 5px; }
.login-foot {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 17px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 10.5px;
}
.lock-dot {
    width: 7px;
    height: 7px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    flex: 0 0 auto;
}
.login-copy { text-align: center; color: var(--muted); font-size: 10.5px; margin-top: 16px; }
.login-card .notice { margin-bottom: 13px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1400px) {
    .slider-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
    .brand-layout { grid-template-columns: 1fr; }
    .preview-panel { position: static; }
    .two-col, .two-col.narrow { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        padding: 13px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
    }
    .brand strong { font-size: 13px; }
    .brand small { font-size: 9px; }
    .brand-logo { width: 36px; height: 36px; }
    .nav { flex-direction: row; flex-wrap: wrap; margin-left: auto; }
    .nav a { padding: 8px 10px; font-size: 12px; }
    .nav-ico { display: none; }
    .sidebar-foot { display: none; }
    .topbar { position: static; padding: 16px 18px; }
    .content { padding: 18px; }
    .page-foot { padding: 13px 18px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .color-grid, .slider-grid { grid-template-columns: 1fr; }
    .preview-text { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 22px; }
    .topbar { flex-wrap: wrap; gap: 10px; }
    .admin-chip { padding: 4px 10px 4px 4px; }
    .copy-row .btn { flex: 1 1 auto; }
    .asset-grid { grid-template-columns: 1fr; }
    .panel { padding: 15px; }
    .brand-layout { gap: 12px; }
    .login-card { padding: 21px; }
}

/* ------------------------------------------------- five-theme admin panel */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 4px 0 18px;
}
.theme-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-height: 132px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--card-border, #2a3550);
    background: var(--card-bg, #071A33);
    color: #fff;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.theme-card:hover { transform: translateY(-2px); }
.theme-card.active {
    border-color: #FFC700;
    box-shadow: 0 0 0 2px rgba(255, 199, 0, .22), 0 12px 26px rgba(0, 0, 0, .32);
}
.theme-card-top {
    display: flex;
    align-items: center;
    gap: 5px;
}
.theme-card-top i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .28);
}
.theme-tick {
    margin-left: auto;
    color: #FFC700;
    font-size: 14px;
    line-height: 1;
}
.theme-card-bar {
    display: block;
    padding: 4px 6px;
    border-radius: 4px;
    background: var(--card-breaking, #8B0000);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .6px;
    text-align: center;
}
.theme-card strong {
    margin-top: auto;
    color: var(--card-location, #fff);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}
.logo-size-row {
    display: flex;
    gap: 9px;
    margin: 8px 0 16px;
}
.logo-size-btn {
    flex: 1;
    padding: 11px 8px;
    border-radius: 11px;
    border: 1px solid #2a3550;
    background: #0b1830;
    color: #dbe6ff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.logo-size-btn.active {
    border-color: #FFC700;
    background: rgba(255, 199, 0, .14);
    color: #FFC700;
}

.client-picker-panel { margin-bottom: 16px; }
.client-picker-form {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.client-picker-form .field { min-width: 280px; flex: 1; margin: 0; }
.client-picker-current {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 4px;
}
.client-picker-current strong { color: var(--text); font-size: 14px; }
.client-picker-current span { color: var(--muted); font-size: 11px; }
