* { box-sizing: border-box; font-family: Vazirmatn, sans-serif; }
:root {
    color-scheme: dark;
    --ink: #0b0c10;
    --panel: #14151c;
    --panel-hi: #1b1d27;
    --line: rgba(255,255,255,.09);
    --line-strong: rgba(255,255,255,.16);
    --text: #f5f3ff;
    --muted: #a6a7b8;
    --dim: #707386;
    --accent: #7f5af0;
    --accent-hi: #9b7cff;
    --accent-2: #2cb67d;
    --danger: #f43f5e;
    --warning: #f59e0b;
}
html { background: var(--ink); scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        radial-gradient(circle at 80% -10%, rgba(127,90,240,.18), transparent 34rem),
        radial-gradient(circle at 0% 30%, rgba(44,182,125,.10), transparent 28rem),
        var(--ink);
    color: var(--text);
    min-height: 100vh;
}
body.is-navigating { cursor: progress; }
body.is-navigating #admin-content { opacity: .62; transform: translateY(2px); }
a { color: inherit; }
.card { background: rgba(20,21,28,.88); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.surface { background: rgba(27,29,39,.82); border: 1px solid var(--line); }
.accent { background: linear-gradient(135deg, var(--accent-hi), var(--accent)); }
.btn {
    min-height: 44px; border-radius: 14px; padding: 0 18px; display: inline-flex; align-items: center;
    justify-content: center; gap: 8px; font-weight: 900; transition: transform .18s ease, background .18s ease,
    border-color .18s ease, opacity .18s ease, box-shadow .18s ease; cursor: pointer; text-decoration: none;
}
.btn:hover { box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .58; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent-hi), var(--accent)); color: white; }
.btn-soft { background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); }
.btn-danger { background: rgba(244,63,94,.16); color: #fda4af; border: 1px solid rgba(244,63,94,.25); }
.btn-success { background: rgba(16,185,129,.16); color: #86efac; border: 1px solid rgba(16,185,129,.25); }
.navlink {
    color: var(--muted); min-height: 44px; display:flex; align-items:center; gap:10px; border-radius: 14px;
    padding: 0 14px; font-weight: 800; transition: background .18s ease, color .18s ease, border-color .18s ease;
    border: 1px solid transparent; text-decoration: none;
}
.navlink:hover { background: rgba(255,255,255,.05); color: var(--text); }
.navlink.active { background: rgba(127,90,240,.18); color: #fff; border-color: rgba(127,90,240,.35); }
input, select, textarea {
    background: rgba(11,12,16,.72); border: 1px solid var(--line); color: var(--text); min-height: 44px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-hi); box-shadow: 0 0 0 3px rgba(127,90,240,.16); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input[type="checkbox"] { min-height: auto; accent-color: var(--accent); }
table { border-collapse: separate; border-spacing: 0; }
th { color: var(--muted); white-space: nowrap; }
td { vertical-align: middle; }
.page-title { font-size: clamp(1.4rem, 2vw, 2rem); font-weight: 950; letter-spacing: 0; }
.subtle { color: var(--muted); }
.main { position: relative; transition: opacity .16s ease, transform .16s ease; }
.admin-page-enter { animation: admin-page-enter .22s ease both; }
@keyframes admin-page-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Global route progress */
#admin-progress { position: fixed; inset: 0 0 auto 0; z-index: 10000; height: 3px; pointer-events: none; opacity: 0; transition: opacity .18s ease; }
#admin-progress::before { content: ""; display: block; height: 100%; width: var(--progress, 0%); background: linear-gradient(90deg, var(--accent), #b197fc, var(--accent-2)); box-shadow: 0 0 16px rgba(127,90,240,.7); transition: width .24s ease; }
#admin-progress.is-visible { opacity: 1; }

/* Button and form states */
.admin-spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-left-color: transparent; border-radius: 999px; animation: admin-spin .7s linear infinite; flex: 0 0 auto; }
@keyframes admin-spin { to { transform: rotate(360deg); } }
.admin-form-busy { position: relative; }
.admin-form-busy::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(11,12,16,.28); pointer-events: all; z-index: 4; }
.admin-upload-progress { height: 5px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.08); margin-top: 10px; }
.admin-upload-progress > span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .15s linear; }

/* Toasts */
#admin-toast-region { position: fixed; left: 20px; bottom: 20px; z-index: 10020; display: grid; gap: 10px; width: min(390px, calc(100vw - 32px)); pointer-events: none; }
.admin-toast { pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 18px; background: rgba(20,21,28,.97); border: 1px solid var(--line-strong); box-shadow: 0 22px 55px rgba(0,0,0,.38); animation: toast-in .2s ease both; }
.admin-toast.success { border-color: rgba(44,182,125,.38); }
.admin-toast.error { border-color: rgba(244,63,94,.42); }
.admin-toast.warning { border-color: rgba(245,158,11,.42); }
.admin-toast__icon { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); font-weight: 900; }
.admin-toast__message { font-size: .9rem; line-height: 1.8; }
.admin-toast__close { appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.admin-toast.is-leaving { animation: toast-out .18s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }

/* Dialogs and modals */
.admin-dialog { border: 1px solid var(--line-strong); border-radius: 24px; padding: 0; width: min(460px, calc(100vw - 28px)); color: var(--text); background: rgba(20,21,28,.98); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.admin-dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(7px); }
.admin-dialog__body { padding: 24px; }
.admin-dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 24px 24px; }
[data-admin-modal] { transition: opacity .18s ease; }
[data-admin-modal].hidden { display: none; }

/* Image previews */
.admin-file-preview { margin-top: 12px; width: 128px; aspect-ratio: 1; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.admin-drop-active { border-color: var(--accent-hi) !important; box-shadow: 0 0 0 4px rgba(127,90,240,.14); }

/* Skeleton used during route transitions */
.admin-route-loader { position: absolute; inset: 0; z-index: 25; padding: 8px 0; background: linear-gradient(180deg, rgba(11,12,16,.76), rgba(11,12,16,.9)); backdrop-filter: blur(3px); border-radius: 18px; }
.admin-route-skeleton { display: grid; gap: 16px; }
.admin-route-skeleton > div { border-radius: 22px; height: 90px; background: linear-gradient(90deg, rgba(255,255,255,.035), rgba(255,255,255,.085), rgba(255,255,255,.035)); background-size: 220% 100%; animation: admin-shimmer 1.2s linear infinite; }
.admin-route-skeleton > div:first-child { height: 54px; width: 42%; }
.admin-route-skeleton > div:nth-child(3) { height: 250px; }
@keyframes admin-shimmer { to { background-position: -220% 0; } }

.admin-noscript { margin: 16px; padding: 14px 18px; border-radius: 14px; background: rgba(244,63,94,.16); border: 1px solid rgba(244,63,94,.3); color: #fecdd3; }

@media (max-width: 900px) {
    .admin-shell { display: block; }
    .sidebar { position: sticky; top: 0; z-index: 30; width: 100%; border-left: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
    .side-nav { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: thin; }
    .side-nav .navlink { white-space: nowrap; flex: 0 0 auto; }
    .main { padding: 18px 14px 32px; }
    #admin-toast-region { left: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Admin UI v3 — polished command center
   ========================================================= */
::selection { background: rgba(155,124,255,.35); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: rgba(155,124,255,.45) rgba(255,255,255,.035); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(255,255,255,.025); }
*::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent-hi), var(--accent)); border-radius: 99px; border: 3px solid var(--ink); }

body::before,
body::after {
    content: ""; position: fixed; pointer-events: none; z-index: -1; filter: blur(90px); opacity: .34;
    border-radius: 999px;
}
body::before { width: 340px; height: 340px; right: 11vw; top: 8vh; background: rgba(127,90,240,.24); }
body::after { width: 300px; height: 300px; left: 7vw; bottom: 6vh; background: rgba(44,182,125,.14); }

.sidebar {
    background: linear-gradient(180deg, rgba(20,21,28,.96), rgba(11,12,16,.91));
    backdrop-filter: blur(24px) saturate(130%);
    box-shadow: 18px 0 60px rgba(0,0,0,.16);
}
.sidebar::after {
    content: ""; position: absolute; inset: 0 0 0 auto; width: 1px;
    background: linear-gradient(transparent, rgba(155,124,255,.4), transparent);
}
.navlink { position: relative; overflow: hidden; }
.navlink::before {
    content: ""; position: absolute; right: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 99px;
    background: var(--accent-hi); transform: scaleY(0); transition: transform .18s ease;
}
.navlink.active::before { transform: scaleY(1); }
.navlink.active { box-shadow: inset 0 1px rgba(255,255,255,.07), 0 10px 30px rgba(127,90,240,.12); }

.admin-commandbar {
    position: sticky; top: 12px; z-index: 24; display: flex; align-items: center; justify-content: space-between;
    gap: 16px; min-height: 62px; margin: -6px 0 26px; padding: 10px 12px 10px 18px;
    border: 1px solid rgba(255,255,255,.09); border-radius: 20px;
    background: linear-gradient(135deg, rgba(27,29,39,.88), rgba(20,21,28,.73));
    box-shadow: 0 20px 60px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.055);
    backdrop-filter: blur(24px) saturate(140%);
}
.admin-commandbar__brand { display: flex; align-items: center; gap: 11px; }
.admin-commandbar__brand strong { display: block; font-size: .86rem; }
.admin-commandbar__brand small { color: var(--muted); display: block; margin-top: 2px; font-size: .7rem; }
.admin-commandbar__actions { display: flex; align-items: center; gap: 9px; }
.admin-commandbar__time { direction: ltr; font-variant-numeric: tabular-nums; color: #d6d3e5; font-size: .77rem; padding: 0 8px; }
.admin-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 6px rgba(52,211,153,.09), 0 0 17px rgba(52,211,153,.65); animation: admin-pulse 2s ease-in-out infinite; }
@keyframes admin-pulse { 50% { box-shadow: 0 0 0 9px rgba(52,211,153,0), 0 0 20px rgba(52,211,153,.8); } }
.admin-refresh { min-height: 40px; padding-inline: 14px; font-size: .76rem; }

.admin-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-eyebrow { color: #b9a7ff; font-size: .7rem; font-weight: 900; letter-spacing: .08em; margin-bottom: 7px; }
.page-title, h1.text-3xl { text-shadow: 0 6px 24px rgba(0,0,0,.26); }

.card, .surface, .admin-editor__section {
    backdrop-filter: blur(18px) saturate(125%);
    box-shadow: 0 20px 55px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.04);
}
.card { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.card:hover { border-color: rgba(155,124,255,.18); }

button, .btn, a[data-button], .admin-action {
    position: relative; overflow: hidden; isolation: isolate;
    -webkit-tap-highlight-color: transparent;
}
button:not(:disabled):hover, .btn:not([aria-disabled="true"]):hover { transform: translateY(-1px); }
button:not(:disabled):active, .btn:not([aria-disabled="true"]):active { transform: translateY(0) scale(.985); }
.admin-action::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(115deg, transparent 22%, rgba(255,255,255,.12) 48%, transparent 72%);
    transform: translateX(130%); transition: transform .55s ease;
}
.admin-action:hover::after { transform: translateX(-130%); }
.admin-ripple { position: absolute; z-index: 8; border-radius: 50%; pointer-events: none; background: rgba(255,255,255,.23); transform: scale(0); animation: admin-ripple .55s ease-out forwards; }
@keyframes admin-ripple { to { transform: scale(1); opacity: 0; } }
[data-busy="1"] { position: relative; z-index: 7; cursor: progress !important; box-shadow: 0 0 0 1px rgba(155,124,255,.24), 0 12px 30px rgba(127,90,240,.26) !important; }
[data-busy="1"]::after { animation: admin-busy-sweep 1.1s linear infinite; transform: translateX(130%); }
@keyframes admin-busy-sweep { to { transform: translateX(-130%); } }

.admin-form-busy { pointer-events: none; }
.admin-form-busy::after {
    background: linear-gradient(135deg, rgba(11,12,16,.18), rgba(11,12,16,.36));
    backdrop-filter: blur(1.2px); border: 1px solid rgba(155,124,255,.12);
}
.admin-form-busy [data-busy="1"] { pointer-events: none; }

input, select, textarea {
    border-radius: 13px; box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
input:hover, select:hover, textarea:hover { border-color: rgba(255,255,255,.16); background: rgba(11,12,16,.87); }
textarea { resize: vertical; line-height: 1.85; }
select { cursor: pointer; }
input[type="file"] { cursor: pointer; padding: 10px; }
input[type="file"]::file-selector-button {
    border: 0; border-radius: 10px; padding: 9px 13px; margin-left: 12px; color: #fff;
    background: linear-gradient(135deg, var(--accent-hi), var(--accent)); font: inherit; font-weight: 850; cursor: pointer;
}
.admin-field-host { transition: opacity .2s ease; }
.admin-field { display: grid; gap: 8px; }
.admin-field > label { font-size: .82rem; font-weight: 900; color: #eeeafa; }
.admin-field > small { color: var(--muted); font-size: .71rem; line-height: 1.8; }
.required-mark { color: #fb7185; }
.admin-field-error { padding-right: 2px; }
.admin-form-error { animation: admin-shake .28s ease; }
@keyframes admin-shake { 25% { transform: translateX(4px); } 50% { transform: translateX(-4px); } 75% { transform: translateX(2px); } }

.admin-editor { display: grid; gap: 18px; }
.admin-editor__section {
    position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 24px;
    background: linear-gradient(145deg, rgba(27,29,39,.84), rgba(20,21,28,.72));
    overflow: hidden;
}
.admin-editor__section::before {
    content: ""; position: absolute; width: 180px; height: 180px; left: -80px; top: -100px;
    border-radius: 50%; background: rgba(127,90,240,.09); filter: blur(8px); pointer-events: none;
}
.admin-section-title { position: relative; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
.admin-section-title h2 { margin: 0; font-size: 1rem; font-weight: 950; }
.admin-section-title p { margin: 5px 0 0; color: var(--muted); font-size: .74rem; }
.admin-section-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: #d8d0ff; font-size: .7rem; font-weight: 950; border: 1px solid rgba(155,124,255,.24); background: rgba(127,90,240,.13); }
.admin-empty-inline { border: 1px dashed rgba(245,158,11,.32); background: rgba(245,158,11,.07); color: #fcd34d; border-radius: 13px; padding: 12px 14px; font-size: .78rem; }
.admin-input-affix { position: relative; }
.admin-input-affix input { padding-left: 46px; }
.admin-input-affix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #fcd34d; font-weight: 900; }

.admin-upload-zone {
    min-height: 150px; align-content: center; padding: 18px; border: 1px dashed rgba(155,124,255,.28);
    border-radius: 18px; background: radial-gradient(circle at 50% 0, rgba(127,90,240,.1), transparent 60%);
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.admin-upload-zone:hover, .admin-upload-zone.admin-drop-active { border-color: var(--accent-hi); background-color: rgba(127,90,240,.07); }
.admin-preview-card { min-height: 250px; aspect-ratio: 3/4; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: rgba(0,0,0,.24); box-shadow: 0 20px 45px rgba(0,0,0,.22); }
.admin-preview-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-preview-placeholder { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; color: var(--dim); gap: 8px; }
.admin-preview-placeholder span { font-size: 2.2rem; color: rgba(155,124,255,.45); }
.admin-preview-placeholder p { margin: 0; font-size: .78rem; }
.admin-file-preview { width: 100%; max-width: 230px; aspect-ratio: 3/4; object-fit: cover; }

.admin-toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.admin-toggle-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(11,12,16,.34); cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.admin-toggle-card:hover { border-color: rgba(155,124,255,.3); transform: translateY(-1px); }
.admin-toggle-card input { position: absolute; opacity: 0; pointer-events: none; }
.admin-toggle-ui { width: 42px; height: 24px; border-radius: 99px; padding: 3px; background: rgba(255,255,255,.12); transition: background .2s ease; }
.admin-toggle-ui::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; transform: translateX(0); transition: transform .2s ease; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.admin-toggle-card input:checked + .admin-toggle-ui { background: linear-gradient(135deg, var(--accent-hi), var(--accent)); }
.admin-toggle-card input:checked + .admin-toggle-ui::after { transform: translateX(-18px); }
.admin-toggle-card strong { display: block; font-size: .8rem; }
.admin-toggle-card small { display: block; color: var(--muted); font-size: .68rem; margin-top: 3px; }

.admin-editor__actions {
    position: sticky; bottom: 14px; z-index: 20; display: flex; align-items: center; gap: 10px;
    padding: 12px; border: 1px solid var(--line); border-radius: 19px;
    background: rgba(20,21,28,.9); backdrop-filter: blur(22px); box-shadow: 0 24px 70px rgba(0,0,0,.34);
}
.admin-save-button { min-width: 170px; }
.admin-save-hint { margin-right: auto; color: var(--muted); font-size: .7rem; }
kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 7px; padding: 2px 6px; background: rgba(255,255,255,.05); color: #ddd8ef; font-family: inherit; }

.admin-upload-progress { height: 7px; box-shadow: inset 0 1px 4px rgba(0,0,0,.2); }
.admin-upload-progress > span { position: relative; overflow: hidden; }
.admin-upload-progress > span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); animation: admin-progress-glow 1s linear infinite; }
@keyframes admin-progress-glow { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

.admin-toast { backdrop-filter: blur(22px) saturate(140%); }
.admin-toast.success .admin-toast__icon { color: #6ee7b7; background: rgba(16,185,129,.12); }
.admin-toast.error .admin-toast__icon { color: #fda4af; background: rgba(244,63,94,.12); }
.admin-toast.warning .admin-toast__icon { color: #fcd34d; background: rgba(245,158,11,.12); }

/* Tables */
table { width: 100%; }
thead tr { background: rgba(255,255,255,.025); }
th { font-size: .72rem; letter-spacing: .01em; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: rgba(127,90,240,.035); }

@media (max-width: 720px) {
    .admin-commandbar { top: 8px; border-radius: 16px; }
    .admin-commandbar__brand small, .admin-commandbar__time { display: none; }
    .admin-page-heading { display: grid; }
    .admin-editor__section { padding: 18px; border-radius: 20px; }
    .admin-toggle-grid { grid-template-columns: 1fr; }
    .admin-editor__actions { flex-wrap: wrap; bottom: 8px; }
    .admin-save-button { flex: 1; min-width: 145px; }
    .admin-save-hint { display: none; }
}

/* Gallery cards */
.admin-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 18px; }
.admin-gallery-card { border-radius: 22px; overflow: hidden; transform: translateZ(0); }
.admin-gallery-card:hover { transform: translateY(-4px); box-shadow: 0 28px 70px rgba(0,0,0,.3), 0 0 0 1px rgba(155,124,255,.12); }
.admin-gallery-card__media { position: relative; display: block; aspect-ratio: 3/4; background: rgba(0,0,0,.25); overflow: hidden; }
.admin-gallery-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .3s ease; }
.admin-gallery-card:hover .admin-gallery-card__media img { transform: scale(1.045); filter: saturate(1.07) contrast(1.02); }
.admin-gallery-card__scrim { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(8,9,12,.75)); pointer-events: none; }
.admin-chip { position: absolute; top: 12px; z-index: 2; border: 1px solid rgba(255,255,255,.12); border-radius: 99px; padding: 6px 9px; font-size: .65rem; font-weight: 950; backdrop-filter: blur(12px); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.admin-chip--credit { right: 12px; background: rgba(11,12,16,.68); color: #fde68a; }
.admin-chip--premium { left: 12px; background: rgba(245,158,11,.22); color: #fde68a; }
.admin-chip--inactive { left: 12px; top: 48px; background: rgba(244,63,94,.22); color: #fecdd3; }
.admin-gallery-card__body { padding: 15px; }
.admin-gallery-card__title-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.admin-gallery-card__title-row h2 { margin: 0; font-size: .93rem; font-weight: 950; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-gallery-card__title-row p { margin: 5px 0 0; color: var(--muted); font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-status-indicator { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; }
.admin-status-indicator.is-active { background: #34d399; box-shadow: 0 0 10px rgba(52,211,153,.7); }
.admin-status-indicator.is-inactive { background: #fb7185; box-shadow: 0 0 10px rgba(251,113,133,.6); }
.admin-gallery-card__meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.admin-gallery-card__meta span { border-radius: 8px; background: rgba(255,255,255,.045); color: #bbb8c9; padding: 5px 8px; font-size: .63rem; }
.admin-gallery-card__actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 14px; }
.admin-gallery-card__actions .btn { min-height: 38px; padding-inline: 12px; font-size: .7rem; }
.admin-gallery-card__actions form { display: contents; }
.admin-empty-state { min-height: 350px; display: grid; place-content: center; justify-items: center; text-align: center; border-radius: 26px; padding: 36px; }
.admin-empty-state__icon { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 25px; margin-bottom: 18px; color: #cabfff; font-size: 2rem; background: rgba(127,90,240,.14); border: 1px solid rgba(155,124,255,.23); box-shadow: 0 18px 50px rgba(127,90,240,.12); }
.admin-empty-state h2 { margin: 0; font-size: 1.15rem; font-weight: 950; }
.admin-empty-state p { color: var(--muted); font-size: .78rem; margin: 9px 0 20px; }

/* Subscription plan live preview */
.admin-live-preview-label {
    display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
    padding: 5px 9px; font-size: .62rem; font-weight: 950; letter-spacing: .08em;
    color: #86efac; background: rgba(34,197,94,.1); border: 1px solid rgba(74,222,128,.22);
}
.admin-live-preview-label::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%; background: #4ade80;
    box-shadow: 0 0 10px rgba(74,222,128,.8); animation: admin-live-plan-pulse 1.7s ease-in-out infinite;
}
@keyframes admin-live-plan-pulse { 50% { opacity: .45; transform: scale(.78); } }
.admin-plan-preview {
    --plan-background: #211F2B;
    --plan-border: #353141;
    --plan-accent: #7C5CFC;
    --plan-title: #FFFFFF;
    --plan-description: #A8A6B5;
    --plan-price: #FFFFFF;
    --plan-badge-background: #F4C95D;
    --plan-badge-text: #131118;
    position: relative; overflow: hidden; min-height: 0; padding: 20px;
    border: 1px solid var(--plan-border); border-radius: 25px;
    color: var(--plan-title); background: var(--plan-background);
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
    transition: background-color .2s ease, border-color .2s ease, opacity .2s ease, box-shadow .2s ease, transform .2s ease;
}
.admin-plan-preview.is-featured {
    transform: translateY(-2px);
    box-shadow: 0 28px 72px color-mix(in srgb, var(--plan-accent) 28%, rgba(0,0,0,.32));
}
.admin-plan-preview.is-inactive { opacity: .58; filter: grayscale(.15); }
.admin-plan-preview.is-compact { padding: 16px 18px; }
.admin-plan-preview.is-compact h3 { margin-top: 14px; }
.admin-plan-preview.is-compact .admin-plan-preview__amounts { margin-top: 15px; }
.admin-plan-preview.is-compact button { margin-top: 14px; }
.admin-plan-preview__glow {
    position: absolute; width: 190px; height: 190px; left: -75px; top: -85px;
    border-radius: 50%; pointer-events: none; background: var(--plan-accent); opacity: .2; filter: blur(48px);
}
.admin-plan-preview__topline { position: relative; min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-plan-preview__state, .admin-plan-preview__badge {
    display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px;
    padding: 4px 9px; font-size: .62rem; font-weight: 950;
}
.admin-plan-preview__state { color: var(--plan-description); border: 1px solid color-mix(in srgb, var(--plan-description) 24%, transparent); background: color-mix(in srgb, var(--plan-description) 8%, transparent); }
.admin-plan-preview__state.is-active::before, .admin-plan-preview__state.is-inactive::before {
    content: ""; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%;
}
.admin-plan-preview__state.is-active::before { background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,.65); }
.admin-plan-preview__state.is-inactive::before { background: #fb7185; box-shadow: 0 0 8px rgba(251,113,133,.55); }
.admin-plan-preview__badge { color: var(--plan-badge-text); background: var(--plan-badge-background); }
.admin-plan-preview h3 { position: relative; margin: 24px 0 0; color: var(--plan-title); font-size: 1.22rem; font-weight: 950; line-height: 1.55; }
.admin-plan-preview p { position: relative; min-height: 22px; margin: 7px 0 0; color: var(--plan-description); font-size: .73rem; line-height: 1.8; }
.admin-plan-preview__marketing { position: relative; min-height: 20px; margin-top: 11px; color: var(--plan-accent); font-size: .69rem; font-weight: 900; }
.admin-plan-preview__amounts { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; margin-top: 28px; }
.admin-plan-preview__amounts > div { display: flex; align-items: baseline; gap: 5px; }
.admin-plan-preview__amounts strong { color: var(--plan-price); font-size: 1.45rem; font-weight: 950; }
.admin-plan-preview__amounts span { color: var(--plan-description); font-size: .65rem; font-weight: 800; }
.admin-plan-preview__price { justify-content: flex-end; text-align: left; }
.admin-plan-preview button {
    position: relative; width: 100%; min-height: 45px; margin-top: 22px; border: 0; border-radius: 14px;
    color: #fff; background: var(--plan-accent); font: inherit; font-size: .78rem; font-weight: 950;
    box-shadow: 0 14px 30px color-mix(in srgb, var(--plan-accent) 25%, transparent);
    transition: opacity .2s ease, filter .2s ease;
}
.admin-plan-preview button:disabled { opacity: .42; filter: grayscale(.35); }

.admin-plan-preview__product-id {
  display: block;
  max-width: 100%;
  margin-top: .45rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
  color: color-mix(in srgb, var(--plan-description, #a8a6b5) 85%, white 15%);
  font-size: .68rem;
}

/* =========================================================
   Stable action states + premium toast system (UI v7)
   ========================================================= */
.admin-is-busy {
    position: relative !important;
    isolation: isolate;
    white-space: nowrap;
    cursor: progress !important;
    contain: layout paint;
}
.admin-button__busy-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding-inline: 10px;
    border-radius: inherit;
    pointer-events: none;
}
.admin-button__busy-label {
    display: block;
    min-width: 0;
    max-width: calc(100% - 27px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}
.admin-is-busy .admin-spinner {
    width: 17px;
    height: 17px;
    border-width: 2px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,.18));
}

#admin-toast-region {
    left: 22px;
    bottom: 22px;
    z-index: 10020;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(410px, calc(100vw - 32px));
    pointer-events: none;
    perspective: 900px;
}
.admin-toast {
    --toast-rgb: 127, 90, 240;
    position: relative;
    display: grid;
    grid-template-columns: 4px 42px minmax(0, 1fr) 30px;
    align-items: center;
    column-gap: 12px;
    min-height: 82px;
    padding: 14px 13px 16px 10px;
    overflow: hidden;
    pointer-events: auto;
    color: #f8f7ff;
    background:
        linear-gradient(115deg, rgba(var(--toast-rgb), .10), transparent 46%),
        rgba(18, 19, 26, .94);
    border: 1px solid rgba(var(--toast-rgb), .30);
    border-radius: 21px;
    box-shadow:
        0 26px 70px rgba(0,0,0,.46),
        inset 0 1px 0 rgba(255,255,255,.055),
        0 0 0 1px rgba(255,255,255,.018);
    backdrop-filter: blur(24px) saturate(155%);
    opacity: 0;
    transform: translate3d(-18px, 10px, 0) scale(.965) rotateX(3deg);
    transform-origin: left bottom;
    transition: opacity .24s ease, transform .32s cubic-bezier(.2,.85,.25,1), border-color .2s ease;
    animation: none;
}
.admin-toast::before {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -90px;
    top: -105px;
    border-radius: 999px;
    background: rgba(var(--toast-rgb), .16);
    filter: blur(30px);
    pointer-events: none;
}
.admin-toast:hover {
    border-color: rgba(var(--toast-rgb), .48);
    transform: translate3d(0, -2px, 0) scale(1);
}
.admin-toast.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateX(0);
}
.admin-toast.is-leaving {
    opacity: 0;
    transform: translate3d(-22px, 5px, 0) scale(.96);
    transition-duration: .22s;
}
.admin-toast.success { --toast-rgb: 44, 182, 125; }
.admin-toast.error { --toast-rgb: 244, 63, 94; }
.admin-toast.warning { --toast-rgb: 245, 158, 11; }
.admin-toast.info { --toast-rgb: 79, 142, 247; }
.admin-toast__accent {
    align-self: stretch;
    width: 4px;
    min-height: 46px;
    border-radius: 99px;
    background: rgb(var(--toast-rgb));
    box-shadow: 0 0 16px rgba(var(--toast-rgb), .65);
}
.admin-toast__icon {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(var(--toast-rgb), .25);
    border-radius: 14px;
    color: rgb(var(--toast-rgb));
    background: rgba(var(--toast-rgb), .12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
    font-size: 1.05rem;
    font-weight: 950;
    line-height: 1;
}
.admin-toast__content {
    position: relative;
    min-width: 0;
    padding-block: 1px;
}
.admin-toast__title {
    margin: 0 0 4px;
    overflow: hidden;
    color: #fff;
    font-size: .82rem;
    font-weight: 950;
    line-height: 1.55;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-toast__message {
    display: -webkit-box;
    overflow: hidden;
    color: #bbbccc;
    font-size: .75rem;
    font-weight: 650;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.admin-toast__close {
    position: relative;
    align-self: start;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #8f91a1;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.15rem;
    line-height: 1;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.admin-toast__close:hover {
    color: #fff;
    background: rgba(255,255,255,.075);
    border-color: rgba(255,255,255,.08);
    transform: rotate(5deg);
}
.admin-toast__close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--toast-rgb), .2);
}
.admin-toast__progress {
    position: absolute;
    right: 14px;
    bottom: 0;
    left: 14px;
    height: 3px;
    overflow: hidden;
    border-radius: 99px 99px 0 0;
    background: rgba(255,255,255,.035);
}
.admin-toast__progress > span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(var(--toast-rgb), .35), rgb(var(--toast-rgb)));
    box-shadow: 0 0 10px rgba(var(--toast-rgb), .5);
    transform-origin: left center;
    animation: admin-toast-progress var(--toast-duration, 4200ms) linear forwards;
}
.admin-toast.is-paused .admin-toast__progress > span { animation-play-state: paused; }
@keyframes admin-toast-progress { to { transform: scaleX(0); } }

@media (max-width: 720px) {
    #admin-toast-region {
        right: 12px;
        left: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
    }
    .admin-toast {
        grid-template-columns: 4px 38px minmax(0, 1fr) 28px;
        min-height: 76px;
        column-gap: 10px;
        padding: 12px 11px 15px 8px;
        border-radius: 18px;
        transform-origin: center bottom;
    }
    .admin-toast__icon { width: 38px; height: 38px; border-radius: 12px; }
    .admin-toast__message { font-size: .72rem; -webkit-line-clamp: 2; }
}
.admin-button__busy-sizer {
    display: inline-block;
    width: 0;
    min-width: 0;
    overflow: hidden;
    visibility: hidden;
    font: inherit;
    line-height: inherit;
    pointer-events: none;
}
.admin-is-busy { vertical-align: top; }


/* Final responsive hardening (UI v9) */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
.admin-shell, .main, .card, .surface, form, fieldset, label { min-width: 0; }
.btn {
    max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; vertical-align: top; touch-action: manipulation;
}
form[data-loading-text] { min-width: 0; }
input, select, textarea { max-width: 100%; min-width: 0; }
.break-all { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 1024px) {
    .admin-shell { display: block !important; }
    .sidebar { position: relative; width: 100% !important; border: 0; }
    .side-nav { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 6px; scrollbar-width: thin; }
    .side-nav .navlink { flex: 0 0 auto; white-space: nowrap; }
    .main { padding: 20px !important; }
}
@media (max-width: 640px) {
    .main { padding: 14px !important; }
    .card { border-radius: 20px !important; }
    .admin-commandbar { align-items: flex-start; gap: 10px; }
    .admin-commandbar__actions { width: 100%; justify-content: space-between; }
    .admin-commandbar__actions .btn { max-width: 58vw; }
    .grid.grid-cols-2 > form, .grid.grid-cols-2 > .btn, .grid.grid-cols-2 > a { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-toast, .admin-toast__progress > span, #admin-progress, .admin-spinner { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Admin UI v10 — local HTML5/CSS3 design system
   ========================================================= */
:root {
    color-scheme: dark;
    --ink: #090b10;
    --ink-soft: #0d1017;
    --panel: rgba(17, 20, 29, .88);
    --panel-solid: #121620;
    --panel-hi: rgba(24, 28, 40, .9);
    --surface: rgba(255,255,255,.035);
    --surface-hi: rgba(255,255,255,.065);
    --line: rgba(255,255,255,.075);
    --line-strong: rgba(255,255,255,.13);
    --text: #f7f7fb;
    --muted: #9ca3b5;
    --dim: #686f80;
    --accent: #7357ff;
    --accent-hi: #9a86ff;
    --accent-soft: rgba(115,87,255,.16);
    --accent-2: #35c68c;
    --danger: #ff5d7d;
    --warning: #f7b84b;
    --info: #58a6ff;
    --sidebar-width: 276px;
    --topbar-height: 82px;
    --radius-sm: 12px;
    --radius-md: 17px;
    --radius-lg: 24px;
    --radius-xl: 30px;
    --shadow-sm: 0 12px 35px rgba(0,0,0,.16);
    --shadow-lg: 0 28px 80px rgba(0,0,0,.3);
}

html { background: var(--ink); scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
    color: var(--text);
    background:
        radial-gradient(900px 520px at 82% -10%, rgba(115,87,255,.14), transparent 62%),
        radial-gradient(620px 420px at -8% 28%, rgba(53,198,140,.07), transparent 64%),
        linear-gradient(180deg, #090b10 0%, #0b0e14 48%, #090b10 100%);
    font-family: Vazirmatn, system-ui, sans-serif;
    font-feature-settings: "ss01" 1, "tnum" 1;
    text-rendering: optimizeLegibility;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    opacity: .16;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
body.sidebar-open { overflow: hidden; }

.admin-ambient { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.admin-ambient span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .16; will-change: transform; }
.admin-ambient span:nth-child(1) { width: 420px; height: 420px; top: -200px; right: 18%; background: #7659ff; }
.admin-ambient span:nth-child(2) { width: 300px; height: 300px; bottom: 5%; left: -140px; background: #22c38b; opacity: .08; }
.admin-ambient span:nth-child(3) { width: 240px; height: 240px; top: 42%; right: 48%; background: #3f7fff; opacity: .05; }

.admin-shell { min-height: 100vh; min-height: 100dvh; display: grid !important; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.admin-workspace { min-width: 0; }

.sidebar {
    position: sticky !important;
    top: 0;
    z-index: 60;
    width: var(--sidebar-width) !important;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 18px 14px 16px;
    overflow: hidden;
    border: 0 !important;
    border-left: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, rgba(14,17,25,.97), rgba(11,14,21,.95));
    box-shadow: -18px 0 60px rgba(0,0,0,.16);
    backdrop-filter: blur(22px) saturate(130%);
}
.sidebar::after { display: none !important; }
.sidebar__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px 18px; }
.brand { min-width: 0; display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #967fff, #6747f2); box-shadow: 0 13px 34px rgba(106,76,246,.28), inset 0 1px rgba(255,255,255,.28); }
.brand__mark svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.brand__copy { min-width: 0; }
.brand__copy strong { display: block; font-size: 1rem; font-weight: 950; letter-spacing: -.02em; }
.brand__copy small { display: block; margin-top: 2px; color: var(--muted); font-size: .68rem; }

.icon-button { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 14px; color: #d9dbea; background: rgba(255,255,255,.035); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease; }
.icon-button:hover { color: #fff; border-color: rgba(154,134,255,.32); background: rgba(115,87,255,.1); transform: translateY(-1px); }
.icon-button:active { transform: translateY(0) scale(.96); }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar__close, .mobile-menu { display: none; }

.side-nav { min-height: 0; flex: 1; display: block !important; overflow-y: auto; overflow-x: hidden !important; padding: 2px 2px 10px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.navlink { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid transparent; border-radius: 13px; color: #aeb3c2; font-size: .79rem; font-weight: 760; line-height: 1.5; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease; }
.navlink::before { display: none !important; }
.navlink:hover { color: #fff; background: rgba(255,255,255,.045); transform: translateX(-2px); }
.navlink.active { color: #fff; border-color: rgba(154,134,255,.18); background: linear-gradient(90deg, rgba(115,87,255,.18), rgba(115,87,255,.07)); box-shadow: inset 0 1px rgba(255,255,255,.06), 0 10px 24px rgba(71,45,185,.08); }
.navlink--root { margin-bottom: 8px; }
.navlink__icon, .nav-group__icon { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: #9ea5b8; background: rgba(255,255,255,.035); }
.navlink.active .navlink__icon { color: #dcd4ff; background: rgba(115,87,255,.17); }
.navlink__icon svg, .nav-group__icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-group { margin-top: 4px; border-radius: 15px; }
.nav-group summary { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 13px; color: #9198aa; cursor: pointer; list-style: none; user-select: none; transition: color .18s ease, background .18s ease; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { color: #f2f3f8; background: rgba(255,255,255,.035); }
.nav-group__title { min-width: 0; display: flex; align-items: center; gap: 10px; font-size: .75rem; font-weight: 850; }
.nav-group__chevron { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.nav-group[open] .nav-group__chevron { transform: rotate(90deg); }
.nav-group[open] summary { color: #d9dce8; }
.nav-group__items { display: grid; gap: 2px; margin: 2px 0 8px; padding-right: 39px; }
.nav-group__items .navlink { min-height: 36px; padding: 7px 11px; font-size: .73rem; }
.nav-group__items .navlink.active { position: relative; }
.nav-group__items .navlink.active::after { content: ""; position: absolute; right: -18px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 10px rgba(154,134,255,.85); }

.sidebar__footer { display: grid; gap: 10px; padding: 14px 4px 0; border-top: 1px solid var(--line); }
.server-state { display: flex; align-items: center; gap: 10px; padding: 2px 7px; }
.server-state strong { display: block; font-size: .72rem; }
.server-state small { display: block; margin-top: 2px; color: var(--dim); font-size: .62rem; }
.logout-link { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(255,93,125,.13); border-radius: 12px; color: #ff9bb0; background: rgba(255,93,125,.055); font-size: .72rem; font-weight: 850; transition: background .18s ease, border-color .18s ease; }
.logout-link:hover { border-color: rgba(255,93,125,.28); background: rgba(255,93,125,.11); }
.logout-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-backdrop { display: none; }

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px clamp(18px, 3vw, 38px);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(9,11,16,.92), rgba(9,11,16,.78));
    backdrop-filter: blur(20px) saturate(140%);
}
.admin-topbar__identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.admin-topbar__title { min-width: 0; }
.admin-topbar__title .admin-eyebrow { display: block; margin: 0 0 2px; color: #9787e9; font-size: .61rem; letter-spacing: .06em; }
.admin-topbar__title strong { display: block; font-size: .98rem; font-weight: 950; line-height: 1.5; }
.admin-topbar__title small { display: block; overflow: hidden; margin-top: 1px; color: var(--muted); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-topbar__actions { display: flex; align-items: center; gap: 9px; }
.admin-commandbar__time { min-width: 50px; padding: 0 4px; color: #c9cbd7; font-size: .74rem; direction: ltr; font-variant-numeric: tabular-nums; }
.admin-shortcut { height: 38px; display: flex; align-items: center; gap: 3px; padding-inline: 9px; border: 1px solid var(--line); border-radius: 12px; color: var(--dim); background: rgba(255,255,255,.025); font-size: .65rem; }
.admin-shortcut kbd { min-width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 5px; color: #aeb2c1; background: rgba(255,255,255,.04); box-shadow: 0 1px rgba(255,255,255,.05); font: inherit; }
.admin-refresh { min-height: 42px !important; padding: 0 !important; }

.main { width: 100%; max-width: 1680px; min-width: 0; margin-inline: auto; padding: 0 clamp(18px, 3vw, 38px) 44px !important; }
.context-tabs { position: sticky; top: var(--topbar-height); z-index: 35; display: flex; gap: 5px; margin-inline: -2px; padding: 12px 2px 10px; overflow-x: auto; border-bottom: 1px solid rgba(255,255,255,.045); background: linear-gradient(180deg, rgba(9,11,16,.92), rgba(9,11,16,.72) 72%, transparent); backdrop-filter: blur(16px); scrollbar-width: none; }
.context-tabs::-webkit-scrollbar { display: none; }
.context-tabs a { flex: 0 0 auto; padding: 8px 13px; border: 1px solid transparent; border-radius: 11px; color: #8f95a6; font-size: .72rem; font-weight: 820; white-space: nowrap; transition: color .18s ease, background .18s ease, border-color .18s ease; }
.context-tabs a:hover { color: #fff; background: rgba(255,255,255,.04); }
.context-tabs a.active { color: #fff; border-color: rgba(154,134,255,.16); background: rgba(115,87,255,.13); }
.page-surface { min-width: 0; padding-top: 25px; }

.page-heading, .admin-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.page-title, h1.text-3xl { margin: 0; color: #f9f9fc; font-size: clamp(1.55rem, 2.35vw, 2.12rem); font-weight: 950; letter-spacing: -.035em; line-height: 1.45; text-shadow: none; }
.page-heading p, .admin-page-heading p { max-width: 720px; margin-top: 7px; line-height: 1.95; }
.section-kicker { display: block; margin-bottom: 5px; color: #9f90ee; font-size: .64rem; font-weight: 900; letter-spacing: .055em; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.card, .surface, .panel, .admin-editor__section {
    min-width: 0;
    border: 1px solid var(--line);
    background: linear-gradient(155deg, rgba(22,26,37,.9), rgba(15,18,27,.88));
    box-shadow: 0 16px 50px rgba(0,0,0,.13), inset 0 1px rgba(255,255,255,.025);
    backdrop-filter: blur(14px);
}
.surface { background: rgba(255,255,255,.028); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.card:hover { border-color: rgba(154,134,255,.15); }
.panel { border-radius: var(--radius-lg); padding: 20px; }
.panel__header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.panel__header h2 { margin: 0; font-size: 1rem; font-weight: 950; }
.text-link { color: #b8aaff; font-size: .7rem; font-weight: 900; white-space: nowrap; }
.text-link:hover { color: #fff; }

.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 13px; font-size: .76rem; font-weight: 900; line-height: 1.4; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0,0,0,.2); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { color: #fff; background: linear-gradient(145deg, #8e74ff, #6749ef); box-shadow: 0 11px 28px rgba(103,73,239,.2), inset 0 1px rgba(255,255,255,.2); }
.btn-soft { color: #e7e8ef; border-color: var(--line); background: rgba(255,255,255,.04); }
.btn-soft:hover { border-color: rgba(154,134,255,.2); background: rgba(255,255,255,.065); }
.btn-danger { color: #ffafbf; border-color: rgba(255,93,125,.2); background: rgba(255,93,125,.1); }
.btn-success { color: #88e8bd; border-color: rgba(53,198,140,.2); background: rgba(53,198,140,.1); }
.btn-block { width: 100%; }

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea {
    min-height: 44px;
    width: 100%;
    border: 1px solid rgba(255,255,255,.085);
    border-radius: 13px;
    outline: none;
    color: #f5f5f8;
    background: rgba(7,9,14,.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea { min-height: 112px; padding-block: 12px !important; line-height: 1.85; }
select { cursor: pointer; }
input::placeholder, textarea::placeholder { color: #626a7c; }
input:focus, select:focus, textarea:focus { border-color: rgba(154,134,255,.5); background: rgba(10,12,19,.78); box-shadow: 0 0 0 4px rgba(115,87,255,.1); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: rgba(255,93,125,.65); box-shadow: 0 0 0 4px rgba(255,93,125,.09); }
label { color: #e7e8ef; }

.table-shell, .overflow-x-auto { border-radius: 16px; }
table { width: 100%; }
thead th { padding: 12px 13px !important; border-bottom: 1px solid var(--line) !important; color: #878e9f; font-size: .68rem; font-weight: 900 !important; text-align: right; white-space: nowrap; }
tbody td { padding: 13px !important; border-bottom: 1px solid rgba(255,255,255,.045) !important; color: #d8dae4; font-size: .76rem; vertical-align: middle; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: rgba(255,255,255,.025); }
tbody tr:last-child td { border-bottom: 0 !important; }
.mono-cell { display: inline-flex; padding: 5px 8px; border-radius: 8px; color: #b8bdcc; background: rgba(255,255,255,.035); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .67rem; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 68px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: .64rem; font-weight: 900; direction: ltr; }
.status-badge--success { color: #78e3b1; border-color: rgba(53,198,140,.18); background: rgba(53,198,140,.08); }
.status-badge--danger { color: #ff9aaf; border-color: rgba(255,93,125,.18); background: rgba(255,93,125,.08); }
.status-badge--warning { color: #f8ce7f; border-color: rgba(247,184,75,.18); background: rgba(247,184,75,.08); }

/* Dashboard */
.dashboard-heading { margin-bottom: 20px; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.metric-card { position: relative; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 17px; border: 1px solid var(--line); border-radius: 21px; background: linear-gradient(150deg, rgba(22,26,37,.94), rgba(14,17,25,.9)); box-shadow: 0 16px 45px rgba(0,0,0,.12), inset 0 1px rgba(255,255,255,.025); }
.metric-card::after { content: ""; position: absolute; width: 120px; height: 120px; top: -72px; left: -45px; border-radius: 50%; background: rgba(115,87,255,.11); filter: blur(9px); pointer-events: none; }
.metric-card--primary { border-color: rgba(154,134,255,.2); background: linear-gradient(145deg, rgba(75,54,167,.27), rgba(20,22,33,.94) 58%); }
.metric-card--danger { border-color: rgba(255,93,125,.18); }
.metric-card--danger::after { background: rgba(255,93,125,.11); }
.metric-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #9da3b2; font-size: .72rem; font-weight: 760; }
.metric-card__icon { padding: 5px 8px; border: 1px solid rgba(255,255,255,.06); border-radius: 8px; color: #b9afec; background: rgba(255,255,255,.025); font-size: .58rem; }
.metric-card > strong { margin-top: 13px; color: #fff; font-size: clamp(1.65rem, 2.6vw, 2.35rem); font-weight: 950; line-height: 1.2; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric-card > strong small { margin-right: 3px; color: var(--muted); font-size: .85rem; }
.metric-card__foot { min-height: 20px; display: flex; align-items: center; gap: 7px; margin-top: 13px; color: #747c8e; font-size: .64rem; line-height: 1.7; }
.status-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; }
.status-dot--success { background: #35c68c; box-shadow: 0 0 9px rgba(53,198,140,.7); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(270px, .75fr); gap: 14px; margin-top: 14px; }
.dashboard-grid--lower { grid-template-columns: minmax(0, 1.8fr) minmax(300px, .7fr); }
.health-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.health-item { min-width: 0; padding: 14px; border: 1px solid rgba(255,255,255,.055); border-radius: 15px; background: rgba(255,255,255,.022); }
.health-item span { display: block; color: #8e95a6; font-size: .66rem; }
.health-item strong { display: block; margin-top: 7px; color: #f4f5f9; font-size: 1.25rem; font-weight: 950; font-variant-numeric: tabular-nums; }
.health-item small { display: block; margin-top: 4px; overflow: hidden; color: #626a7b; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.health-bar { margin-top: 16px; padding: 15px; border-radius: 16px; background: rgba(7,9,14,.36); }
.health-bar__label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: #8f96a7; font-size: .67rem; }
.health-bar__label strong { color: #dfe2ea; font-size: .72rem; }
.health-bar__track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.055); }
.health-bar__track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7357ff, #35c68c); box-shadow: 0 0 16px rgba(53,198,140,.25); }
.audience-list { display: grid; gap: 7px; }
.audience-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 45px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.05); border-radius: 13px; background: rgba(255,255,255,.02); }
.audience-list span { color: #898fa0; font-size: .68rem; }
.audience-list strong { color: #f1f2f7; font-size: .92rem; font-weight: 950; font-variant-numeric: tabular-nums; }
.panel--wide { min-width: 0; }
.quick-actions__grid { display: grid; gap: 8px; }
.quick-actions__grid a { min-height: 60px; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.055); border-radius: 14px; background: rgba(255,255,255,.022); transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.quick-actions__grid a:hover { transform: translateX(-3px); border-color: rgba(154,134,255,.18); background: rgba(115,87,255,.07); }
.quick-actions__grid strong { display: block; font-size: .72rem; }
.quick-actions__grid small { display: block; margin-top: 3px; color: #737b8d; font-size: .6rem; }
.quick-actions__grid span { grid-column: 2; grid-row: 1 / span 2; color: #9d8cff; font-size: 1rem; }

/* Existing editor / gallery / form refinements */
.admin-editor { gap: 14px; }
.admin-editor__section { border-radius: 20px; padding: 19px; }
.admin-section-title { margin-bottom: 17px; }
.admin-section-title h2 { font-size: .92rem; }
.admin-section-title p { font-size: .68rem; }
.admin-toggle-card { background: rgba(255,255,255,.02); }
.admin-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 14px; }
.admin-gallery-card { border-radius: 20px; }
.admin-empty-state { min-height: 310px; }
.admin-upload-zone { background-color: rgba(255,255,255,.018); }

/* Authentication */
#auth-app { min-height: 100vh; min-height: 100dvh; }
.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 430px); padding: 25px; border: 1px solid var(--line-strong); border-radius: 28px; background: linear-gradient(155deg, rgba(22,26,37,.94), rgba(12,15,22,.93)); box-shadow: 0 36px 100px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.04); backdrop-filter: blur(24px); }
.auth-card__brand { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.auth-card__brand strong { display: block; font-size: .87rem; font-weight: 950; }
.auth-card__brand small { display: block; margin-top: 3px; color: var(--muted); font-size: .64rem; }
.auth-card__copy { padding: 25px 0 18px; }
.auth-card__copy h1 { margin: 0; font-size: 1.75rem; font-weight: 950; letter-spacing: -.04em; }
.auth-card__copy p { margin-top: 8px; color: var(--muted); font-size: .76rem; line-height: 1.9; }
.auth-form { display: grid; gap: 14px; }
.auth-card__note { margin-top: 17px; color: var(--dim); font-size: .61rem; line-height: 1.85; text-align: center; }
.admin-field > span, .admin-field > label { font-size: .75rem; font-weight: 900; }

/* Dialog */
.admin-dialog { border-radius: 22px; background: rgba(17,20,29,.98); }
.admin-dialog__body h2 { margin: 0; font-size: 1.05rem; font-weight: 950; }
.admin-dialog__body p { margin-top: 9px; color: var(--muted); font-size: .74rem; line-height: 1.9; }
.dialog-icon { width: 45px; height: 45px; display: grid; place-items: center; margin-bottom: 15px; border: 1px solid rgba(255,93,125,.18); border-radius: 14px; color: #ff9bb0; background: rgba(255,93,125,.09); font-size: 1rem; font-weight: 950; }

/* Motion-ready states */
[data-reveal] { will-change: transform, opacity; }
.is-navigating .admin-topbar { border-bottom-color: rgba(154,134,255,.2); }

@media (max-width: 1180px) {
    .dashboard-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .dashboard-grid, .dashboard-grid--lower { grid-template-columns: 1fr; }
    .dashboard-audience, .quick-actions { order: 2; }
}

@media (max-width: 1024px) {
    .admin-shell { display: block !important; }
    .sidebar {
        position: fixed !important;
        top: 0;
        right: 0;
        z-index: 100;
        width: min(86vw, 300px) !important;
        transform: translateX(105%);
        visibility: hidden;
        transition: transform .28s cubic-bezier(.22,.8,.22,1), visibility .28s;
        box-shadow: -28px 0 80px rgba(0,0,0,.48);
    }
    body.sidebar-open .sidebar { transform: translateX(0); visibility: visible; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 90; display: block; border: 0; opacity: 0; visibility: hidden; background: rgba(3,5,9,.64); backdrop-filter: blur(5px); transition: opacity .25s ease, visibility .25s; }
    body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
    .sidebar__close, .mobile-menu { display: grid; }
    .admin-topbar { padding-inline: 16px; }
    .main { padding-inline: 16px !important; }
    .side-nav { display: block !important; overflow-y: auto !important; }
    .side-nav .navlink { white-space: normal; }
    .context-tabs { margin-inline: -2px; }
}

@media (max-width: 760px) {
    :root { --topbar-height: 70px; }
    .admin-topbar { min-height: var(--topbar-height); gap: 10px; }
    .admin-topbar__title small, .admin-shortcut, .admin-commandbar__time { display: none; }
    .admin-topbar__title strong { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
    .main { padding: 0 12px 30px !important; }
    .page-surface { padding-top: 18px; }
    .page-heading, .admin-page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
    .page-actions { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
    .page-actions .btn { flex: 0 0 auto; }
    .dashboard-kpis { grid-template-columns: 1fr 1fr; gap: 9px; }
    .metric-card { min-height: 133px; padding: 14px; border-radius: 18px; }
    .metric-card > strong { font-size: 1.65rem; }
    .metric-card__top { align-items: flex-start; font-size: .65rem; }
    .metric-card__icon { display: none; }
    .metric-card__foot { font-size: .58rem; }
    .health-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .panel { padding: 16px; border-radius: 20px; }
    .panel__header { align-items: flex-start; }
    .context-tabs { top: var(--topbar-height); padding-top: 9px; }
    table { min-width: 720px; }
}

@media (max-width: 460px) {
    .dashboard-kpis { grid-template-columns: 1fr; }
    .metric-card { min-height: 128px; }
    .health-grid { grid-template-columns: 1fr 1fr; }
    .admin-topbar__title .admin-eyebrow { display: none; }
    .auth-shell { padding: 14px; }
    .auth-card { padding: 20px; border-radius: 23px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Admin UI v11 — cross-page consistency & finishing polish
   Reusable list/ops components so every page matches the
   dashboard's altitude. Fully static; no external assets.
   ========================================================= */

/* Unified heading rhythm */
.page-heading, .admin-page-heading { margin-bottom: 24px; }
.page-heading .page-title, .admin-page-heading .page-title { line-height: 1.4; }

/* Status badges — colored leading dot + full variant set.
   Enriches the existing --success/--danger/--warning classes. */
.status-badge { gap: 7px; padding: 5px 11px; text-transform: none; }
.status-badge::before {
    content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%;
    background: currentColor; box-shadow: 0 0 8px currentColor;
}
.status-badge--info { color: #8bbcff; border-color: rgba(88,166,255,.22); background: rgba(88,166,255,.1); }
.status-badge--neutral { color: #aab0c2; border-color: var(--line-strong); background: rgba(255,255,255,.045); }
.status-badge--neutral::before { box-shadow: none; opacity: .5; }

/* Filter / search toolbar + segmented status chips */
.filter-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px;
    border: 1px solid var(--line); border-radius: var(--radius-md);
    background: rgba(255,255,255,.03); box-shadow: inset 0 1px rgba(255,255,255,.02);
}
.filter-bar input:not([type="checkbox"]):not([type="radio"]), .filter-bar select { min-height: 40px; }
.filter-bar .btn { min-height: 40px; flex: 0 0 auto; }
.filter-chips { display: flex; gap: 6px; margin-bottom: 22px; padding-bottom: 3px; overflow-x: auto; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
    flex: 0 0 auto; min-height: 38px; display: inline-flex; align-items: center; padding: 0 15px;
    border: 1px solid var(--line); border-radius: 999px; color: #9298aa; font-size: .74rem;
    font-weight: 850; white-space: nowrap; transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.filter-chip:hover { color: #fff; background: rgba(255,255,255,.045); }
.filter-chip.is-active { color: #fff; border-color: rgba(154,134,255,.28); background: linear-gradient(120deg, rgba(115,87,255,.2), rgba(115,87,255,.08)); }

/* Compact stat tiles — consistent mini-KPI row on ops pages */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.stat-tile {
    position: relative; overflow: hidden; display: block; padding: 16px 17px;
    border: 1px solid var(--line); border-radius: 18px;
    background: linear-gradient(150deg, rgba(22,26,37,.92), rgba(14,17,25,.88));
    box-shadow: 0 12px 34px rgba(0,0,0,.12), inset 0 1px rgba(255,255,255,.02);
    transition: transform .18s ease, border-color .18s ease;
}
.stat-tile::after { content: ""; position: absolute; width: 96px; height: 96px; top: -58px; left: -34px; border-radius: 50%; background: rgba(115,87,255,.1); filter: blur(8px); pointer-events: none; }
a.stat-tile:hover { transform: translateY(-2px); border-color: rgba(154,134,255,.2); }
.stat-tile__label { position: relative; color: #9aa1b4; font-size: .72rem; font-weight: 760; }
.stat-tile__value { position: relative; margin-top: 9px; color: #fff; font-size: clamp(1.35rem, 1.9vw, 1.85rem); font-weight: 950; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-tile__value small { color: var(--muted); font-size: .8rem; font-weight: 800; }
.stat-tile--danger::after { background: rgba(255,93,125,.13); }

/* Empty states inside tables & cards */
.table-empty { display: grid; justify-items: center; gap: 5px; padding: 44px 20px; text-align: center; color: var(--muted); }
.table-empty__icon {
    width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 8px;
    border-radius: 17px; color: #bcb2f2; background: rgba(115,87,255,.1);
    border: 1px solid rgba(154,134,255,.2); box-shadow: 0 14px 40px rgba(115,87,255,.1);
}
.table-empty__icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.table-empty strong { color: #eceef4; font-size: .92rem; font-weight: 900; }
.table-empty span { max-width: 340px; font-size: .74rem; line-height: 1.8; }

/* Section title used above in-card tables */
.table-title { margin: 0 0 15px; font-size: 1rem; font-weight: 950; }

/* Slightly brighter, more legible table headers (appended → wins over base) */
thead th { color: #979eb2; letter-spacing: .015em; }

/* Responsive collapse for the compact stat row */
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .stat-grid { gap: 10px; } .stat-tile { padding: 14px; } }

/* Keep in-table empty states visible on narrow screens even when the table
   itself forces a wide min-width for horizontal scrolling. */
@media (max-width: 760px) {
    td > .table-empty { position: sticky; left: 0; width: min(100%, calc(100vw - 52px)); }
}

/* Detail-page back link (sits where the kicker sits on list pages) */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 11px; color: var(--muted); font-size: .72rem; font-weight: 850; transition: color .18s ease, gap .18s ease; }
.back-link::before { content: "→"; font-size: .95em; line-height: 1; }
.back-link:hover { color: #fff; gap: 9px; }

/* Stat tile whose value is a short text (status/date), not a big number */
.stat-tile__value.is-text { font-size: clamp(.95rem, 1.3vw, 1.12rem); line-height: 1.5; }
