/* ==========================================================================
   MP3Nest - admin panel
   ========================================================================== */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url("../fonts/inter-latin-800-normal.woff2") format("woff2"); }

:root {
    --primary: #6C4DF6;
    --primary-rgb: 108, 77, 246;
    --secondary: #3B82F6;
    --grad: linear-gradient(90deg, var(--primary), var(--secondary) 140%);
    --bg: #040a24;
    --side: #050b28;
    --card: #08113a;
    --card-2: #0b1646;
    --input: #071037;
    --line: rgba(70, 100, 230, .22);
    --line-2: rgba(90, 120, 255, .38);
    --text: #f3f5ff;
    --text-2: #b9c0e6;
    --muted: #7d86b5;
    --green: #22c55e;
    --red: #f43f5e;
    --orange: #f97316;
    --side-w: 210px;
    --top-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.grad-text { background: linear-gradient(90deg, #8b6cff, #5b8cff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Shell ---------- */
.adm-side {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); z-index: 50; background: var(--side);
    border-right: 1px solid rgba(70, 100, 230, .16); display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin;
}
.adm-brand { display: flex; align-items: center; gap: 10px; height: var(--top-h); padding: 0 18px; border-bottom: 1px solid rgba(70, 100, 230, .16); flex-shrink: 0; }
.adm-brand img { width: 40px; height: 40px; }
.adm-brand strong { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.adm-brand strong b { background: linear-gradient(90deg, #a78bfa, #6d8bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.adm-brand span { font-size: 13px; font-weight: 600; color: #e5e8ff; }
.adm-nav { padding: 14px 12px; flex: 1; }
.adm-nav a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin: 1px 0; border-radius: 9px; color: #dde1fb; font-size: 13.5px; transition: background .15s; }
.adm-nav a i { font-size: 17px; width: 20px; text-align: center; color: #c9cdf3; }
.adm-nav a:hover { background: rgba(255, 255, 255, .04); }
.adm-nav a.active { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(var(--primary-rgb), .35); }
.adm-nav a.active i { color: #fff; }
.adm-nav a .count { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--red); color: #fff; }
.adm-nav .label { font-size: 13px; font-weight: 600; color: #9fb4ff; margin: 16px 12px 6px; padding-top: 14px; border-top: 1px solid rgba(70, 100, 230, .16); }
.adm-nav .label:first-of-type { border-top: 0; padding-top: 0; margin-top: 12px; color: #c9cdf3; }
.adm-side-card { margin: 10px 14px 16px; padding: 22px 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(20, 28, 80, .6), rgba(8, 14, 48, .9)); text-align: center; }
.adm-side-card .row { display: flex; align-items: center; gap: 10px; justify-content: center; }
.adm-side-card .logo { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #7c3aed, #4f46e5); box-shadow: 0 0 22px rgba(124, 58, 237, .6); font-size: 20px; }
.adm-side-card strong { font-size: 19px; font-weight: 800; }
.adm-side-card strong b { background: linear-gradient(90deg, #a78bfa, #6d8bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.adm-side-card small { display: block; color: var(--text-2); font-size: 11.5px; }
.adm-side-card .ver { margin-top: 16px; font-size: 12.5px; color: var(--text-2); }

.adm-top {
    position: fixed; left: var(--side-w); right: 0; top: 0; height: var(--top-h); z-index: 40; display: flex; align-items: center; gap: 18px; padding: 0 22px;
    background: rgba(4, 10, 36, .92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(70, 100, 230, .16);
}
.adm-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--input); }
.adm-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13.5px; }
.adm-search input::placeholder { color: var(--muted); }
.adm-top-stats { display: flex; gap: 22px; margin-left: auto; }
.adm-mini { display: flex; align-items: center; gap: 10px; }
.adm-mini .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; }
.adm-mini small { display: block; font-size: 11.5px; color: var(--text-2); line-height: 1.2; }
.adm-mini b { font-size: 15px; }
.adm-bell { position: relative; width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; border: 0; background: none; padding-left: 18px; border-left: 1px solid var(--line); border-radius: 0; }
.adm-bell .dot { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; font-size: 10.5px; font-weight: 700; background: var(--red); color: #fff; display: grid; place-items: center; }
.adm-user { display: flex; align-items: center; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line); background: none; border-top: 0; border-right: 0; border-bottom: 0; text-align: left; }
.adm-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.adm-user strong { display: block; font-size: 14px; }
.adm-user small { color: var(--text-2); font-size: 12px; }
.adm-burger { display: none; background: none; border: 0; font-size: 24px; padding: 0; }
.adm-main { margin-left: var(--side-w); padding: calc(var(--top-h) + 20px) 22px 30px; min-height: 100vh; }
.adm-drop-wrap { position: relative; }
.adm-dropdown { position: absolute; right: 0; top: calc(100% + 10px); min-width: 280px; display: none; z-index: 60; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.adm-dropdown.open { display: block; }
.adm-dropdown a, .adm-dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); background: none; border: 0; text-align: left; }
.adm-dropdown a:hover, .adm-dropdown button:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.adm-dropdown .head { padding: 8px 10px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; justify-content: space-between; }

/* ---------- Cards ---------- */
.box { background: linear-gradient(180deg, rgba(12, 22, 70, .75), rgba(7, 14, 50, .9)); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 8px 26px rgba(0, 0, 0, .25); min-width: 0; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.box-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.box-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; color: #fff; flex-shrink: 0; }
.bi-purple { background: linear-gradient(135deg, #a855f7, #6d28d9); }
.bi-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.bi-green { background: linear-gradient(135deg, #22c55e, #0f9d58); }
.bi-pink { background: linear-gradient(135deg, #ec4899, #be185d); }
.bi-orange { background: linear-gradient(135deg, #fb923c, #ea580c); }
.bi-teal { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.bi-violet { background: linear-gradient(135deg, #8b5cf6, #4f46e5); }

.page-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title h1 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.page-title p { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent; font-size: 13.5px; font-weight: 600; background: none; white-space: nowrap; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(var(--primary-rgb), .35); }
.btn-outline { border-color: var(--line-2); color: var(--text); }
.btn-outline:hover { background: rgba(255, 255, 255, .05); }
.btn-danger { background: rgba(244, 63, 94, .15); color: #fda4af; border-color: rgba(244, 63, 94, .35); }
.btn-success { background: rgba(34, 197, 94, .15); color: #86efac; border-color: rgba(34, 197, 94, .35); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.act { width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; font-size: 14px; border: 1px solid transparent; background: none; }
.act.view { color: #93c5fd; background: rgba(59, 130, 246, .14); }
.act.edit { color: #c4b5fd; background: rgba(139, 92, 246, .16); border-color: rgba(139, 92, 246, .3); }
.act.del { color: #fb7185; background: rgba(244, 63, 94, .14); }
.act.ok { color: #86efac; background: rgba(34, 197, 94, .14); }
.acts { display: flex; gap: 6px; justify-content: center; }
.acts form { display: inline; }

/* ---------- Forms ---------- */
.fg { margin-bottom: 12px; min-width: 0; }
.fl { display: block; font-size: 12.5px; font-weight: 500; color: #e3e6fb; margin-bottom: 5px; }
.fl .req { color: #a78bfa; }
.fc { width: 100%; height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--input); color: var(--text); font-size: 13px; outline: 0; transition: border-color .2s, box-shadow .2s; }
.fc::placeholder { color: #7a84b5; }
.fc:focus { border-color: #8b6cff; box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .18); }
textarea.fc { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
select.fc { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23c9cdf3' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
select.fc option { background: #0b1646; }
.help { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.err { font-size: 12px; color: #fda4af; margin-top: 4px; }
.g2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.input-ico { position: relative; }
.input-ico i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #e3e6fb; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: #3b82f6; }

.switch-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: 13px; }
.switch-row i { width: 18px; text-align: center; color: #c9cdf3; font-size: 15px; }
.switch-row > span:not(.switch) { flex: 1; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: rgba(255, 255, 255, .14); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: #10b981; }
.switch.blue input:checked + span { background: #3b82f6; }
.switch input:checked + span::after { transform: translateX(20px); }

.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 16px; text-align: center; border: 1.5px dashed rgba(96, 165, 250, .55); border-radius: 10px; background: rgba(30, 58, 138, .08); color: #dbe2ff; font-size: 12.5px; transition: border-color .2s, background .2s; }
.dropzone i { font-size: 26px; color: #93c5fd; }
.dropzone small { color: var(--muted); font-size: 11px; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.drag { border-color: #a78bfa; background: rgba(var(--primary-rgb), .14); }
.progress-line { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 10px; width: 100%; }
.progress-line span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .25s; }
.dropzone .files { font-size: 11.5px; color: #a7f3d0; margin-top: 4px; word-break: break-all; }
.cover-pick { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); aspect-ratio: 1 / 1.05; background: #0a1033; }
.cover-pick img { width: 100%; height: 100%; object-fit: cover; }
.cover-pick label { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border-radius: 8px; background: rgba(8, 14, 50, .88); border: 1px solid var(--line-2); font-size: 12px; cursor: pointer; }
.cover-pick input { display: none; }

.tags-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; min-height: 76px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--input); align-content: flex-start; }
.tags-input .t { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 6px; background: rgba(59, 130, 246, .2); border: 1px solid rgba(59, 130, 246, .35); font-size: 11.5px; }
.tags-input .t button { border: 0; background: none; padding: 0; color: #c9cdf3; font-size: 13px; line-height: 1; }
.tags-input input { border: 0; outline: 0; background: none; font-size: 12px; min-width: 120px; flex: 1; height: 26px; }
.tags-input .add { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 6px; background: rgba(255, 255, 255, .06); font-size: 11.5px; border: 0; }

.tabbar { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(5, 10, 40, .6); border: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabbar button, .tabbar a { flex: 1 0 auto; height: 34px; padding: 0 14px; border-radius: 8px; border: 0; background: none; color: #e3e6fb; font-size: 12.5px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tabbar .active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(var(--primary-rgb), .35); }
.pane { display: none; }
.pane.active { display: block; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; color: #e3e6fb; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; font-size: 12.5px; color: #dbe0fb; border-bottom: 1px solid rgba(70, 100, 230, .1); vertical-align: middle; }
.tbl tbody tr:hover { background: rgba(var(--primary-rgb), .05); }
.tbl .thumb { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.tbl .thumb img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.tbl .thumb strong { display: block; font-weight: 600; font-size: 12.5px; color: var(--text); }
.tbl .thumb small { color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.green { background: rgba(16, 185, 129, .16); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, .35); }
.badge.gray { background: rgba(148, 163, 184, .14); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, .3); }
.badge.red { background: rgba(244, 63, 94, .14); color: #fda4af; border: 1px solid rgba(244, 63, 94, .3); }
.badge.orange { background: rgba(249, 115, 22, .14); color: #fdba74; border: 1px solid rgba(249, 115, 22, .3); }
.badge.blue { background: rgba(59, 130, 246, .16); color: #93c5fd; border: 1px solid rgba(59, 130, 246, .32); }
.badge.purple { background: rgba(139, 92, 246, .16); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, .32); }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .fc { height: 34px; width: auto; min-width: 130px; font-size: 12.5px; }
.filters .adm-search { height: 34px; max-width: 220px; }

.pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 7px; display: grid; place-items: center; font-size: 12.5px; color: #dbe0fb; border: 1px solid transparent; }
.pagination a:hover { border-color: var(--line-2); }
.pagination .current { background: #3b82f6; color: #fff; box-shadow: 0 6px 14px rgba(59, 130, 246, .4); }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.dash-left { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, .96fr); gap: 14px; align-items: start; min-width: 0; }
.dash-right { display: grid; gap: 14px; min-width: 0; align-content: start; }
.dash .box { padding: 16px; }
.d-welcome { grid-column: 1 / 3; display: flex; align-items: center; gap: 14px; padding: 6px 0; }
.d-welcome .wave { font-size: 36px; line-height: 1; }
.d-welcome h2 { font-size: 18px; }
.d-welcome p { color: var(--text-2); font-size: 13px; }
.d-date { grid-column: 3; display: flex; align-items: center; gap: 0; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(8, 14, 50, .7); padding: 0 18px; font-size: 13.5px; font-weight: 500; }
.d-date span { display: inline-flex; gap: 10px; align-items: center; }
.d-date span + span { margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--line); }
.d-stats { grid-column: 1 / 4; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px 14px; border-radius: 12px; border: 1px solid; min-width: 0; }
.stat .ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 25px; color: #fff; flex-shrink: 0; }
.stat small { display: block; font-size: 13px; }
.stat b { display: block; font-size: 23px; font-weight: 700; line-height: 1.2; }
.stat em { font-style: normal; font-size: 11.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.stat em i { color: var(--green); }
.st-blue { background: linear-gradient(135deg, #0f2f7a, #0b1e55); border-color: rgba(59, 130, 246, .55); }
.st-blue .ico { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 0 20px rgba(59, 130, 246, .55); }
.st-blue small { color: #93c5fd; } .st-blue em { color: #4ade80; }
.st-purple { background: linear-gradient(135deg, #3c1772, #251050); border-color: rgba(168, 85, 247, .55); }
.st-purple .ico { background: linear-gradient(135deg, #a855f7, #7c3aed); box-shadow: 0 0 20px rgba(168, 85, 247, .55); }
.st-purple small { color: #d8b4fe; } .st-purple em { color: #4ade80; }
.st-red { background: linear-gradient(135deg, #6b0f30, #47091f); border-color: rgba(244, 63, 94, .55); }
.st-red .ico { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: 0 0 20px rgba(244, 63, 94, .55); }
.st-red small { color: #fda4af; } .st-red em { color: #fecdd3; }
.st-green { background: linear-gradient(135deg, #065f46, #053d30); border-color: rgba(16, 185, 129, .55); }
.st-green .ico { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 0 20px rgba(16, 185, 129, .55); }
.st-green small { color: #6ee7b7; } .st-green em { color: #6ee7b7; }
.d-song { grid-column: 1; }
.d-album { grid-column: 2; }
.d-movie { grid-column: 3; }
.d-manage { grid-column: 1 / 3; }
.d-col3 { grid-column: 3; display: grid; gap: 14px; }
.d-site { grid-column: 1 / 3; }
.d-quick { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 14px; }
.d-cover-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.songs-in-album li { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; margin-top: 4px; font-size: 11.5px; background: rgba(5, 10, 40, .5); }
.songs-in-album li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.songs-in-album li i { color: var(--text-2); }
.theme-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.theme-pick { position: relative; text-align: center; font-size: 11.5px; color: var(--text-2); cursor: pointer; }
.theme-pick input { position: absolute; opacity: 0; }
.theme-pick .prev { height: 54px; border-radius: 8px; border: 1px solid var(--line-2); margin-bottom: 6px; overflow: hidden; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.theme-pick.t-dark .prev { background: linear-gradient(135deg, #0b1440, #2a1460); }
.theme-pick.t-light .prev { background: linear-gradient(180deg, #f4f6ff, #dfe5ff); color: #333; }
.theme-pick.t-neon .prev { background: linear-gradient(135deg, #1a0533, #5b0d6b); color: #f0abfc; text-shadow: 0 0 8px #f0abfc; }
.theme-pick.t-minimal .prev { background: #f3f3f3; color: #222; font-family: Georgia, serif; }
.theme-pick input:checked + .prev { border: 2px solid #60a5fa; box-shadow: 0 0 14px rgba(96, 165, 250, .5); }
.theme-pick input:checked ~ em { background: rgba(59, 130, 246, .2); border-radius: 6px; color: #fff; }
.theme-pick em { font-style: normal; padding: 2px 6px; }
.swatches { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 7px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.swatches .fc { width: 110px; height: 32px; margin-left: auto; }
.quick-btn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; white-space: nowrap; border-radius: 9px; color: #fff; font-weight: 600; font-size: 13px; border: 0; width: 100%; margin-top: 10px; }
.qb-purple { background: linear-gradient(90deg, #a855f7, #7c3aed); }
.qb-orange { background: linear-gradient(90deg, #fb923c, #f97316); }
.qb-blue { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.qb-green { background: linear-gradient(90deg, #14b8a6, #059669); }
.activity li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: 12px; }
.activity li .ai { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; flex-shrink: 0; background: rgba(139, 92, 246, .2); color: #c4b5fd; }
.activity li:nth-child(2) .ai { background: rgba(244, 63, 94, .18); color: #fda4af; }
.activity li:nth-child(3) .ai { background: rgba(59, 130, 246, .2); color: #93c5fd; }
.activity li:nth-child(4) .ai { background: rgba(16, 185, 129, .18); color: #6ee7b7; }
.activity li > span:not(.ai) { flex: 1; min-width: 0; color: #e3e6fb; }
.activity li small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.pill-link { font-size: 11px; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-2); display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); }
.site-mini { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 20px; }
.site-mini .fg { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 8px; margin: 0; }
.site-mini .fl { margin: 0; font-size: 12px; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 14px; }
.feature-grid .chk { font-size: 12px; padding: 3px 0; }

/* ---------- Generic admin pages ---------- */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.layout-2.side-sm { grid-template-columns: minmax(0, 1fr) 260px; }
.layout-2.halves { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid; }
.alert.ok { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .4); color: #a7f3d0; }
.alert.bad { background: rgba(244, 63, 94, .12); border-color: rgba(244, 63, 94, .4); color: #fecdd3; }
.alert.info { background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .4); color: #bfdbfe; }
.alert.warn { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .4); color: #fde68a; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty i { font-size: 34px; display: block; margin-bottom: 8px; color: #8b6cff; }
.kv { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 200px; padding-top: 10px; }
.chart .bar { flex: 1; min-width: 4px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #8b5cf6, #3b82f6); position: relative; }
.chart .bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 6px; white-space: nowrap; background: #000; color: #fff; padding: 3px 7px; border-radius: 5px; font-size: 11px; }
.chart-x { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 6px; }
.sortable li { cursor: grab; }
.sortable li.dragging { opacity: .5; }
.editor-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 8px 8px 0 0; background: rgba(5, 10, 40, .8); }
.editor-bar button { width: 32px; height: 30px; border-radius: 6px; border: 0; background: none; color: #dbe0fb; font-size: 14px; }
.editor-bar button:hover { background: rgba(255, 255, 255, .08); }
.editor { min-height: 320px; padding: 14px; border: 1px solid var(--line-2); border-radius: 0 0 8px 8px; background: var(--input); outline: 0; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.editor h2 { font-size: 20px; margin: 14px 0 8px; }
.editor h3 { font-size: 17px; margin: 12px 0 6px; }
.editor a { color: #a78bfa; }
.repeater .row { display: grid; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: rgba(5, 10, 40, .4); }
.repeater .row .rm { justify-self: end; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(800px 400px at 50% 0, rgba(var(--primary-rgb), .25), transparent), var(--bg); }
.login-card { width: 100%; max-width: 420px; padding: 32px; }
.login-card .adm-brand { border: 0; height: auto; padding: 0; justify-content: center; margin-bottom: 22px; }
.demo-note { margin-top: 16px; padding: 12px; border-radius: 10px; border: 1px dashed rgba(var(--primary-rgb), .6); font-size: 12.5px; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.side-backdrop { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1500px) {
    .adm-top-stats .adm-mini:nth-child(3) { display: none; }
}
@media (max-width: 1360px) {
    .dash { grid-template-columns: minmax(0, 1fr); }
    .dash-right { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adm-top-stats { display: none; }
}
@media (max-width: 1100px) {
    .dash-left { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .d-welcome, .d-stats, .d-manage, .d-site { grid-column: 1 / -1; }
    .d-date { grid-column: 1 / -1; justify-self: start; }
    .d-song, .d-album, .d-movie, .d-col3 { grid-column: auto; }
}
@media (max-width: 1100px) {
    .layout-2, .layout-2.side-sm, .layout-2.halves { grid-template-columns: minmax(0, 1fr); }
    .d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .adm-side { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 10px 0 40px rgba(0, 0, 0, .5); }
    body.side-open .adm-side { transform: none; }
    body.side-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 45; }
    .adm-top { left: 0; padding: 0 14px; gap: 12px; }
    .adm-main { margin-left: 0; padding: calc(var(--top-h) + 16px) 14px 30px; }
    .adm-burger { display: block; }
    .adm-search { max-width: none; }
    .adm-user div { display: none; }
    .adm-user .bi-chevron-down { display: none; }
}
@media (max-width: 760px) {
    .dash-left, .dash-right { grid-template-columns: minmax(0, 1fr); }
    .g2, .g3, .g4, .site-mini, .d-quick { grid-template-columns: minmax(0, 1fr); }
    .g4.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .d-stats { grid-template-columns: minmax(0, 1fr); }
    .adm-search { display: none; }
    .adm-bell { margin-left: auto; }
    .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .kv dd { margin-bottom: 10px; }
    .box { padding: 14px; }
    .d-date { width: 100%; }
    .theme-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* Tables become tidy cards on phones */
    .tbl.cards thead { display: none; }
    .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
    .tbl.cards tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: rgba(5, 10, 40, .45); }
    .tbl.cards td { border: 0; padding: 6px 0; text-align: right; overflow-wrap: anywhere; }
    .tbl.cards td::before { content: attr(data-label); float: left; white-space: nowrap; color: var(--muted); font-size: 12px; margin-right: 10px; }
    .tbl.cards td.cell-main { text-align: left; }
    .tbl.cards td.cell-main::before { display: none; }
    .tbl.cards td .acts { justify-content: flex-end; }
    .tbl.cards td .thumb { min-width: 0; }
    .tbl.cards td.cb { display: none; }
}

.d-manage .tbl td { white-space: nowrap; }
.d-song .tabbar button { padding: 0 9px; font-size: 12px; }
.filters .fc { min-width: 118px; }
.cat-row-form { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 54px 64px 50px 44px auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(70, 100, 230, .1); }
.cat-row-form.head { font-size: 12px; color: var(--text-2); font-weight: 600; }
@media (max-width: 760px) {
    .cat-row-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .cat-row-form.head { display: none; }
}
.d-quick { grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.d-quick .box { padding: 14px 12px; }
.d-quick .quick-btn { font-size: 12px; padding: 0 10px; gap: 8px; }
.activity li { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; row-gap: 1px; }
.activity li small { grid-column: 2; }
@media (max-width: 760px) { .d-quick { grid-template-columns: minmax(0, 1fr); } }
.d-quick .quick-btn { overflow: hidden; text-overflow: ellipsis; }

[hidden] { display: none !important; }
