/* ============================================================
   img.hosam.sa — Editorial Luxe Edition
   Brand: gold #c8a96e on cinematic navy
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&family=Roboto:wght@300;400;500;700;900&display=swap');

:root {
    /* Brand palette */
    --gold: #c8a96e;
    --gold-hi: #e6c98a;
    --gold-lo: #a08555;
    --gold-dim: #8a754d;
    --gold-glow: rgba(200, 169, 110, .35);

    /* Cinematic darks */
    --navy: #0e1620;
    --navy-1: #131c28;
    --navy-2: #1a2531;
    --navy-3: #243140;
    --navy-4: #2e3d4e;

    /* Inks */
    --ink: #f1f4f7;
    --ink-soft: #c8d2dc;
    --ink-dim: #8a9aab;
    --ink-faint: #56697b;

    /* Lines + dividers */
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .14);

    /* Semantic */
    --danger: #e85d65;
    --ok: #54c997;
    --warn: #f0b03a;

    /* Shadows (editorial depth) */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, .5);
    --shadow-glow: 0 8px 40px var(--gold-glow);

    /* Radii */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;

    /* Easings */
    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-soft: cubic-bezier(.4, 0, .2, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: "Tajawal", -apple-system, "SF Pro", "Cairo", "Segoe UI", system-ui, sans-serif;
    background: var(--navy);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    line-height: 1.6;
    font-weight: 400;
    text-rendering: optimizeLegibility;
}

/* Ambient gold orb background */
body.public::before,
body.admin::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(200, 169, 110, .05) 0%, transparent 40%),
        radial-gradient(circle at 80% 100%, rgba(200, 169, 110, .04) 0%, transparent 35%);
    pointer-events: none;
    z-index: 0;
}
body > * { position: relative; z-index: 1; }

::selection { background: var(--gold); color: var(--navy); }

/* Display font for hero headings */
.display-font {
    font-family: "Roboto", "Tajawal", sans-serif;
    font-weight: 500;
    letter-spacing: -.01em;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
code { background: var(--navy-3); padding: 2px 6px; border-radius: 4px; font-size: .9em; }

/* ---------- Top bar (modern) ---------- */
.topbar {
    background: rgba(36, 51, 65, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(52, 72, 90, .6);
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky; top: 0; z-index: 30;
}
.topbar .brand {
    display: flex; align-items: center; gap: 12px;
    color: var(--ink); font-weight: 600;
    text-decoration: none;
    transition: opacity .15s;
}
.topbar .brand:hover { opacity: .85; }
.topbar .brand img { height: 34px; width: auto; }
.topbar nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.topbar nav a {
    color: var(--ink-dim);
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all .18s cubic-bezier(.4,0,.2,1);
    display: inline-flex; align-items: center; gap: 7px;
    text-decoration: none;
    border: 1px solid transparent;
}
.topbar nav a svg { opacity: .75; transition: opacity .15s; }
.topbar nav a:hover {
    background: rgba(200, 169, 110, .08);
    color: var(--gold);
    border-color: rgba(200, 169, 110, .2);
}
.topbar nav a:hover svg { opacity: 1; }
.topbar nav a.on {
    background: linear-gradient(135deg, var(--gold), var(--gold-hi));
    color: var(--navy);
    font-weight: 600;
    border-color: var(--gold);
    box-shadow: 0 4px 14px rgba(200, 169, 110, .25);
}
.topbar nav a.on svg { opacity: 1; }
/* ============================================================
   TOPBAR V2 — clean, balanced, premium
   ============================================================ */
.topbar.v2 {
    background: rgba(14, 22, 32, .82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--line);
    padding: 14px 28px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    position: sticky; top: 0; z-index: 30;
    min-height: 64px;
}

/* — Brand block — */
.topbar.v2 .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
    transition: opacity .15s;
}
.topbar.v2 .brand:hover { opacity: .85; }
.topbar.v2 .brand img {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(200, 169, 110, .25));
}
.topbar.v2 .brand-name {
    font-family: "Roboto", "Tajawal", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -.01em;
    white-space: nowrap;
}
@media (max-width: 880px) {
    .topbar.v2 .brand-name { display: none; }
}

/* — Nav (centered) — */
.tb-nav {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}
.tb-nav a {
    color: var(--ink-soft);
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all .15s var(--ease);
    position: relative;
}
.tb-nav a:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, .04);
}
.tb-nav a.on {
    color: var(--gold);
    background: rgba(200, 169, 110, .1);
}
.tb-nav a.on::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px; height: 2px;
    background: var(--gold);
    border-radius: 2px;
}
@media (max-width: 740px) {
    .topbar.v2 { grid-template-columns: 1fr auto; gap: 12px; }
    .tb-nav {
        grid-column: 1 / -1;
        order: 3;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px;
        margin: 0 -28px -10px;
        padding-left: 28px;
        padding-right: 28px;
        scrollbar-width: none;
    }
    .tb-nav::-webkit-scrollbar { display: none; }
    .tb-nav a { white-space: nowrap; padding: 7px 12px; font-size: 13px; }
    .tb-nav a.on::after { display: none; }
}

/* — Right side: search + user — */
.tb-right {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

/* Search button looks like a real input */
.tb-search {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line);
    color: var(--ink-dim);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all .15s var(--ease);
    min-width: 260px;
}
.tb-search:hover {
    background: rgba(255, 255, 255, .07);
    border-color: var(--gold-dim);
    color: var(--ink);
}
.tb-search svg { color: var(--ink-dim); flex-shrink: 0; }
.tb-search span { flex: 1; text-align: start; }
.tb-search kbd {
    background: var(--navy-3);
    border: 1px solid var(--line);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 11px;
    color: var(--ink-dim);
    font-family: inherit;
    font-weight: 500;
}
@media (max-width: 880px) {
    .tb-search { min-width: 0; padding: 8px 10px; }
    .tb-search span { display: none; }
    .tb-search kbd { display: none; }
}

/* User avatar + dropdown */
.tb-user {
    position: relative;
    outline: none;
}
.tb-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-hi));
    color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s var(--ease);
    border: 2px solid transparent;
    text-transform: uppercase;
}
.tb-avatar:hover { transform: scale(1.05); border-color: rgba(200, 169, 110, .3); }
.tb-avatar.small { width: 36px; height: 36px; font-size: 14px; }

.tb-menu {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    min-width: 240px;
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    padding: 6px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all .18s var(--ease);
    z-index: 50;
}
.tb-user:hover .tb-menu,
.tb-user:focus-within .tb-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.tb-menu-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 6px;
}
.tb-menu-name {
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}
.tb-menu-role {
    color: var(--ink-dim);
    font-size: 12px;
}
.tb-menu a {
    display: block;
    color: var(--ink);
    text-decoration: none;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    transition: background .12s;
}
.tb-menu a:hover { background: rgba(255, 255, 255, .05); }
.tb-menu a.danger { color: var(--danger); }
.tb-menu a.danger:hover { background: rgba(232, 93, 101, .1); }
.tb-divider {
    height: 1px;
    background: var(--line);
    margin: 6px 0;
}
.topbar nav a.logout { color: var(--ink-dim); margin-inline-start: 8px; }
.topbar nav a.logout:hover { background: rgba(224, 90, 90, .12); color: var(--danger); border-color: rgba(224, 90, 90, .3); }
.topbar nav a.ghost {
    border: 1px solid var(--gold);
    color: var(--gold);
}

/* ---------- Cinematic Hero ---------- */
.hero {
    position: relative;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(200, 169, 110, .12) 0%, transparent 50%),
        linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%);
    border-bottom: 1px solid var(--line);
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; left: 50%;
    width: 800px; height: 800px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(200, 169, 110, .08) 0%, transparent 60%);
    pointer-events: none;
    animation: heroFloat 8s ease-in-out infinite;
}
@keyframes heroFloat {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -20px); }
}
.hero h1 {
    font-family: "Roboto", "Tajawal", sans-serif;
    font-size: clamp(40px, 7vw, 72px);
    margin: 0 0 20px;
    color: var(--ink);
    font-weight: 500;
    letter-spacing: -.02em;
    line-height: 1.1;
    animation: heroFadeUp .9s var(--ease) both;
}
.hero h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 28px auto 0;
}
.hero p {
    color: var(--ink-soft);
    max-width: 580px;
    margin: 0 auto;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.7;
    animation: heroFadeUp .9s .15s var(--ease) both;
}
.hero p b {
    color: var(--gold);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Sections ---------- */
section {
    max-width: 1320px;
    margin: 0 auto;
    padding: 70px 32px;
}
section h2 {
    color: var(--ink);
    font-family: "Roboto", "Tajawal", sans-serif;
    font-size: 32px;
    font-weight: 500;
    margin: 0 0 36px;
    padding-bottom: 0;
    border-bottom: none;
    display: flex;
    align-items: baseline;
    gap: 14px;
    letter-spacing: -.01em;
}
section h2::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--gold);
    align-self: center;
}
section h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line) 0%, transparent 100%);
    align-self: center;
}

/* ---------- Editorial Album Grid ---------- */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}
.album-card {
    position: relative;
    background: var(--navy-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    color: var(--ink);
    transition: transform .5s var(--ease), border-color .3s, box-shadow .5s;
    display: flex; flex-direction: column;
    text-decoration: none;
}
.album-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--r-lg);
    box-shadow: inset 0 0 0 1px var(--gold);
    opacity: 0;
    transition: opacity .35s var(--ease);
    pointer-events: none;
    z-index: 4;
}
.album-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.album-card:hover::after { opacity: .9; }

.album-cover {
    aspect-ratio: 4/3;
    background: var(--navy-3) center/cover no-repeat;
    position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.album-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(14, 22, 32, .85) 100%);
    opacity: .7;
    transition: opacity .4s var(--ease);
    z-index: 1;
}
.album-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    transition: transform 1s var(--ease);
    transform: scale(1);
}
.album-card:hover .album-cover::before { opacity: .5; }
.album-card:hover .album-cover { /* zoom handled below */ }
.album-card:hover .album-cover[style*="url"] {
    background-size: 110% !important;
}
.album-cover .ph { font-size: 56px; opacity: .25; position: relative; z-index: 2; }

.album-info {
    padding: 22px 24px 26px;
    position: relative;
    background: linear-gradient(180deg, var(--navy-1) 0%, var(--navy) 100%);
}
.album-info h3 {
    font-family: "Roboto", "Tajawal", sans-serif;
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.005em;
    transition: color .25s;
}
.album-card:hover .album-info h3 { color: var(--gold-hi); }
.album-info .muted {
    color: var(--ink-dim);
    font-size: 13px;
    margin: 0 0 14px;
    font-weight: 300;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(200, 169, 110, .08);
    color: var(--gold);
    padding: 5px 11px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(200, 169, 110, .18);
    font-variant-numeric: tabular-nums;
}
.badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* For homepage: cov category small label */
.album-info .cov-cat {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
    opacity: .85;
}

/* ---------- Recent strip ---------- */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.recent-tile {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    background: var(--navy-3);
    transition: transform .2s;
}
.recent-tile:hover { transform: scale(1.03); }
.recent-tile img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Album page ---------- */
.album-hero {
    padding: 40px 24px 24px;
    max-width: 1280px;
    margin: 0 auto;
}
.crumbs { color: var(--ink-dim); font-size: 13px; margin-bottom: 14px; }
.crumbs a { color: var(--ink-dim); }
.crumbs span { color: var(--gold); }
.album-hero h1 { color: var(--gold); margin: 0 0 8px; font-size: 32px; }
.album-hero p { color: var(--ink-dim); margin: 0 0 6px; }
.album-hero .muted { font-size: 13px; }

.masonry {
    column-count: 4;
    column-gap: 10px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 40px;
}
@media (max-width: 1100px) { .masonry { column-count: 3; } }
@media (max-width: 700px)  { .masonry { column-count: 2; } }
.m-item {
    display: block;
    margin: 0 0 10px;
    break-inside: avoid;
    border-radius: 6px;
    overflow: hidden;
    background: var(--navy-3);
    transition: transform .15s;
}
.m-item:hover { transform: scale(1.01); }
.m-item img { width: 100%; height: auto; display: block; }

/* ---------- Cinematic Image Viewer ---------- */
.view-wrap {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px;
}
@media (max-width: 1024px) {
    .view-wrap { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
}
.view-image {
    background: linear-gradient(135deg, #000 0%, #0a0e14 100%);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    min-height: 70vh;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    position: relative;
}
.view-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(200, 169, 110, .04) 0%, transparent 70%);
    pointer-events: none;
}
.view-image img {
    max-width: 100%;
    max-height: 86vh;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    animation: imgReveal .8s var(--ease) both;
}
@keyframes imgReveal {
    from { opacity: 0; transform: scale(.98); }
    to   { opacity: 1; transform: scale(1); }
}

.view-side {
    background: var(--navy-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 28px;
    height: fit-content;
    position: sticky; top: 92px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}
.view-side h1 {
    font-family: "Roboto", "Tajawal", sans-serif;
    color: var(--ink);
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.meta-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.meta-rows > div { display: flex; justify-content: space-between; font-size: 13px; }
.meta-rows span { color: var(--ink-dim); }
.meta-rows b { color: var(--ink); font-weight: 600; }

.copy-section h3 { color: var(--gold); font-size: 14px; margin: 0 0 12px; }
.copy-section label { display: block; font-size: 12px; color: var(--ink-dim); margin: 12px 0 4px; }
.copy-row { display: flex; gap: 6px; }
.copy-row input {
    flex: 1; min-width: 0;
    background: var(--navy);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 8px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    direction: ltr;
}
.copy-row .copy {
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: 6px;
    padding: 0 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: background .15s;
}
.copy-row .copy:hover { background: var(--gold-hi); }
.view-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Refined Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--navy-3);
    color: var(--ink);
    padding: 11px 20px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line-strong);
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: .01em;
    transition: all .2s var(--ease);
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(200, 169, 110, .15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}
.btn:hover {
    background: var(--navy-2);
    color: var(--gold);
    border-color: var(--gold-dim);
    transform: translateY(-1px);
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(0); }
.btn.primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hi) 100%);
    color: var(--navy);
    border-color: var(--gold);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(200, 169, 110, .25);
}
.btn.primary:hover {
    background: linear-gradient(135deg, var(--gold-hi) 0%, var(--gold) 100%);
    color: var(--navy);
    box-shadow: 0 8px 24px rgba(200, 169, 110, .4);
}
.btn.danger {
    background: linear-gradient(135deg, var(--danger) 0%, #d04752 100%);
    color: white;
    border-color: var(--danger);
}
.btn.danger:hover { box-shadow: 0 6px 18px rgba(232, 93, 101, .35); }
.btn.block { display: flex; width: 100%; text-align: center; }
.btn.big { padding: 14px 28px; font-size: 15px; border-radius: var(--r-md); }
.btn-ghost {
    color: var(--gold);
    padding: 8px 12px;
    border: 1px dashed var(--gold-dim);
    border-radius: 6px;
    font-size: 13px;
}

.mini {
    background: var(--navy-3);
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}
.mini:hover { background: var(--navy); color: var(--gold); }
.mini.danger { color: var(--danger); border-color: rgba(224,90,90,.4); }
.mini.danger:hover { background: var(--danger); color: white; }

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    border-left: 3px solid;
}
.alert.ok  { background: rgba(88,192,138,.12); border-color: var(--ok); color: var(--ok); }
.alert.err { background: rgba(224,90,90,.12);  border-color: var(--danger); color: var(--danger); }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: block; font-size: 13px; color: var(--ink-dim); }
.form input[type=text],
.form input[type=password],
.form input[type=number],
.form select {
    display: block;
    width: 100%;
    margin-top: 6px;
    background: var(--navy);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 10px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--gold); }

/* ---------- Premium Login ---------- */
.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background:
        radial-gradient(ellipse at top, rgba(200, 169, 110, .12) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(200, 169, 110, .06) 0%, transparent 40%),
        linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 169, 110, .08) 0%, transparent 60%);
    top: -200px; right: -200px;
    animation: heroFloat 10s ease-in-out infinite;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 169, 110, .06) 0%, transparent 60%);
    bottom: -100px; left: -100px;
    animation: heroFloat 12s ease-in-out -3s infinite;
}
.login-box {
    background: rgba(26, 37, 49, .75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-xl);
    padding: 48px 40px;
    width: 100%; max-width: 400px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: heroFadeUp .8s var(--ease) both;
}
.login-box::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.login-box .logo {
    display: block;
    margin: 0 auto 24px;
    height: 72px;
    filter: drop-shadow(0 4px 12px rgba(200, 169, 110, .3));
}
.login-box h1 {
    font-family: "Roboto", "Tajawal", sans-serif;
    color: var(--ink);
    text-align: center;
    margin: 0 0 32px;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -.01em;
}
.login-box h1::after {
    content: '';
    display: block;
    width: 40px; height: 1px;
    background: var(--gold);
    margin: 14px auto 0;
}
.small { font-size: 12px; color: var(--ink-dim); margin-top: 24px; text-align: center; }
.small a { color: var(--gold); }

/* ---------- Admin ---------- */
.admin-main { max-width: 1400px; margin: 0 auto; padding: 24px; }

/* ---------- Premium Stat Cards ---------- */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat {
    background: linear-gradient(135deg, var(--navy-2) 0%, var(--navy-1) 100%);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 22px 26px;
    position: relative;
    overflow: hidden;
    transition: all .3s var(--ease);
}
.stat::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle, rgba(200, 169, 110, .12) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
    transition: transform .4s var(--ease);
}
.stat:hover {
    border-color: var(--gold-dim);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat:hover::before { transform: translate(20%, -20%) scale(1.4); }
.stat .n {
    font-family: "Roboto", "Tajawal", sans-serif;
    color: var(--gold);
    font-size: 36px;
    font-weight: 600;
    display: block;
    line-height: 1;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}
.stat .l {
    color: var(--ink-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
    background: var(--navy-2);
    color: var(--ink-dim);
    padding: 7px 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    font-size: 13px;
    transition: all .15s;
}
.chip:hover { color: var(--ink); border-color: var(--gold-dim); }
.chip.on { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; }
.chip.alt { background: transparent; color: var(--gold); border: 1px dashed var(--gold-dim); margin-inline-start: auto; }

/* Admin grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.card {
    background: var(--navy-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .15s;
}
.card:hover { border-color: var(--gold); }
.card a { display: block; aspect-ratio: 1; background: var(--navy-3); overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-meta { padding: 8px 10px; }
.card-meta .album-tag { font-size: 11px; color: var(--ink-dim); margin-bottom: 6px; }
.card-meta .actions { display: flex; gap: 4px; }
.card-meta .actions button { flex: 1; }

/* Pager */
.pager { display: flex; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pager.center { justify-content: center; }
.pager a {
    background: var(--navy-2);
    border: 1px solid var(--line);
    color: var(--ink-dim);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
}
.pager a.on { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; }

/* Empty */
.empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--ink-dim);
}
.empty p { margin-bottom: 18px; }

/* ---------- Upload page ---------- */
.upload-wrap { max-width: 900px; margin: 0 auto; }
.upload-controls {
    display: flex; gap: 14px; align-items: end; margin-bottom: 18px;
    flex-wrap: wrap;
}
.upload-controls label { flex: 1; min-width: 220px; color: var(--ink-dim); font-size: 13px; }
.upload-controls select { display: block; width: 100%; margin-top: 6px; background: var(--navy); border: 1px solid var(--line); color: var(--ink); padding: 10px; border-radius: 6px; }

.dropzone {
    border: 2px dashed var(--gold-dim);
    border-radius: 14px;
    padding: 60px 24px;
    text-align: center;
    background: var(--navy-2);
    transition: all .2s;
    cursor: pointer;
}
.dropzone.dragover {
    border-color: var(--gold);
    background: var(--navy-3);
    transform: scale(1.005);
}
.dz-icon { font-size: 60px; margin-bottom: 12px; opacity: .5; }
.dropzone p { color: var(--ink-dim); margin: 8px 0; }

.upload-list { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.up-item {
    background: var(--navy-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.up-item .up-thumb {
    width: 60px; height: 60px; border-radius: 6px;
    background: var(--navy-3) center/cover;
    flex-shrink: 0;
}
.up-item .up-info { flex: 1; min-width: 0; }
.up-item .up-name { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-item .up-progress {
    height: 6px;
    background: var(--navy-3);
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
}
.up-item .up-bar {
    height: 100%;
    background: var(--gold);
    width: 0;
    transition: width .2s;
}
.up-item.done .up-bar { background: var(--ok); }
.up-item.err  .up-bar { background: var(--danger); }
.up-item .up-link {
    font-family: monospace; font-size: 11px;
    color: var(--gold);
    direction: ltr;
    margin-top: 4px;
    display: block;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.up-item .copy-mini {
    background: var(--gold); color: var(--navy);
    border: none; padding: 6px 12px; border-radius: 5px;
    font-size: 12px; font-weight: 600; cursor: pointer;
}

/* ---------- Albums manager ---------- */
.album-mgr { display: grid; grid-template-columns: 320px 1fr; gap: 24px; }
@media (max-width: 900px) { .album-mgr { grid-template-columns: 1fr; } }
.card-block {
    background: var(--navy-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
}
.card-block h2 {
    border: none; padding: 0; margin: 0 0 16px;
    color: var(--gold); font-size: 16px;
}
.card-block h2::before { display: none; }
.albums-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.albums-table th, .albums-table td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--line); }
.albums-table th { color: var(--ink-dim); font-weight: 500; }
.albums-table input[type=text] {
    background: var(--navy); border: 1px solid var(--line); color: var(--ink);
    padding: 4px 8px; border-radius: 4px; font-size: 12px; width: 100%;
}
.inline-edit { display: flex; gap: 4px; }

/* ---------- Sort & Export pages ---------- */
.sort-page, .export-page { max-width: 1400px; margin: 0 auto; }
.sort-bar {
    display: flex; justify-content: space-between; align-items: end;
    gap: 18px; margin-bottom: 24px; flex-wrap: wrap;
}
.sort-title { color: var(--gold); font-size: 22px; margin: 6px 0; border: none; padding: 0; }
.sort-title::before { display: none; }
.sort-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.save-status {
    font-size: 13px;
    color: var(--ink-dim);
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--navy-2);
    border: 1px solid var(--line);
    min-width: 90px; text-align: center;
}
.save-status.saving { color: var(--gold); border-color: var(--gold-dim); }
.save-status.ok     { color: var(--ok);   border-color: var(--ok); }
.save-status.err    { color: var(--danger); border-color: var(--danger); }

.sort-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    user-select: none;
}
.sort-item {
    position: relative;
    aspect-ratio: 1;
    background: var(--navy-3);
    border: 2px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    transition: all .15s;
}
.sort-item:hover { border-color: var(--gold-dim); }
.sort-item:active { cursor: grabbing; }
.sort-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.sort-item .seq {
    position: absolute; top: 6px; right: 6px;
    background: rgba(26,37,47,.92);
    color: var(--gold);
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    border: 1px solid var(--gold-dim);
}
.sort-item .sort-handle {
    position: absolute; bottom: 6px; left: 6px;
    background: rgba(26,37,47,.85);
    color: var(--gold);
    padding: 2px 8px; border-radius: 4px;
    font-size: 14px; opacity: 0;
    transition: opacity .15s;
}
.sort-item:hover .sort-handle { opacity: 1; }
.sort-ghost { opacity: .35; border-style: dashed; }
.sort-chosen { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,169,110,.25); }

/* ---------- Export tabs/areas ---------- */
.export-tabs {
    display: flex; gap: 4px; flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0;
}
.export-tabs .tab {
    background: transparent;
    color: var(--ink-dim);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-family: inherit;
    cursor: pointer;
    font-size: 13px;
    border-radius: 0;
}
.export-tabs .tab:hover { color: var(--ink); }
.export-tabs .tab.on {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
.export-panel { display: none; padding: 16px 0; }
.export-panel.on { display: block; }
.export-toolbar {
    display: flex; gap: 8px; margin-bottom: 8px; align-items: center;
}
.export-toolbar .spacer { flex: 1; }
.export-area {
    width: 100%;
    min-height: 320px;
    background: var(--navy);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    font-family: "SF Mono", Menlo, monospace;
    font-size: 12px;
    direction: ltr;
    line-height: 1.6;
    resize: vertical;
}

.preview-title {
    color: var(--gold);
    font-size: 16px;
    margin: 36px 0 14px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.preview-cell {
    position: relative;
    aspect-ratio: 1;
    background: var(--navy-3);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--line);
}
.preview-cell img { width: 100%; height: 100%; object-fit: cover; }
.preview-cell .seq {
    position: absolute; top: 4px; right: 4px;
    background: rgba(0,0,0,.7); color: var(--gold);
    padding: 2px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 600;
}

/* Quick tools row above grid */
.quick-tools {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    background: var(--navy-2);
    border: 1px dashed var(--gold-dim);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
}
.quick-tools .muted { color: var(--ink-dim); font-size: 12px; margin-inline-start: auto; }

/* Albums table tool cell */
.tool-cell { white-space: nowrap; }
.tool-cell a { margin-inline-start: 8px; font-size: 12px; }

/* ---------- New-coverage form ---------- */
.new-coverage-page { max-width: 900px; margin: 0 auto; }
.page-title { color: var(--gold); font-size: 24px; margin: 0 0 8px; }
.page-title.small { font-size: 16px; margin-top: 30px; }
.page-title.no-margin { margin: 0; }

.cov-form { margin: 30px 0; }
.cov-form fieldset {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 22px;
    margin: 0 0 20px;
    background: var(--navy-2);
}
.cov-form legend {
    color: var(--gold);
    padding: 0 10px;
    font-size: 14px;
    font-weight: 600;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.cat-card {
    display: block;
    padding: 18px 12px;
    background: var(--navy);
    border: 1px solid var(--line);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    color: var(--ink);
}
.cat-card input { position: absolute; opacity: 0; }
.cat-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.cat-card:has(input:checked) {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    font-weight: 600;
}

.form-row { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row .g { flex: 1; min-width: 200px; }
.form-row .s { flex: 0 0 200px; min-width: 160px; }
.cov-form input[type=text], .cov-form input[type=url], .cov-form input[type=date] {
    width: 100%;
    background: var(--navy);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 10px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    margin-top: 6px;
}
.cov-form input:focus { outline: none; border-color: var(--gold); }
.cov-form label { display: block; color: var(--ink-dim); font-size: 13px; }

.cov-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.btn.big { padding: 14px 28px; font-size: 15px; }

/* Recent coverages grid */
.recent-coverages { margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--line); }
.cov-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.cov-card {
    background: var(--navy-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    color: var(--ink);
    transition: all .15s;
}
.cov-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.cov-thumb {
    aspect-ratio: 4/3;
    background: var(--navy-3) center/cover;
    display: flex; align-items: center; justify-content: center;
}
.cov-thumb .ph { font-size: 38px; opacity: .3; }
.cov-info { padding: 10px 12px 14px; }
.cov-cat { font-size: 11px; color: var(--gold); margin-bottom: 4px; }
.cov-name { font-size: 14px; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.cov-meta { font-size: 11px; color: var(--ink-dim); }

/* ---------- Coverage workflow page ---------- */
.coverage-page { max-width: 1500px; margin: 0 auto; }

.cov-head {
    background: var(--navy-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
}
.cov-head-view { display: flex; gap: 18px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.cov-head-main { flex: 1; min-width: 250px; }
.cov-head-main h1 { color: var(--ink); font-size: 26px; margin: 8px 0 8px; }
.cov-cat-pill { display: inline-block; background: var(--gold); color: var(--navy); padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.cov-head-meta { display: flex; gap: 16px; color: var(--ink-dim); font-size: 13px; flex-wrap: wrap; }
.cov-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cov-head-edit input { margin-top: 6px; }
.alert.inline { margin-top: 10px; margin-bottom: 0; }

.cov-section { margin-bottom: 36px; }

.dropzone.compact { padding: 30px 20px; }
.dropzone.compact .dz-icon { display: none; }
.dropzone.compact p { margin: 4px 0; }

/* Hint text */
.hint { color: var(--ink-dim); font-size: 12px; line-height: 1.8; padding: 10px 14px; background: var(--navy-2); border-radius: 8px; border-right: 3px solid var(--gold-dim); margin-bottom: 14px; }
.hint b { color: var(--gold); }

/* Selection count */
.sel-count {
    background: var(--navy-2);
    color: var(--ink-dim);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    font-size: 12px;
    min-width: 80px; text-align: center;
}
.sel-count.active { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; }

/* Drag handle (top-right corner) */
.sort-item .drag-handle {
    position: absolute; top: 8px;
    inset-inline-end: 38px;
    width: 26px; height: 26px;
    border-radius: 6px;
    background: rgba(26, 37, 47, .65);
    border: 1px solid rgba(255, 255, 255, .25);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    cursor: grab;
    z-index: 3;
    opacity: 0;
    transition: opacity .15s;
}
.sort-item:hover .drag-handle { opacity: 1; }
.sort-item .drag-handle:hover { background: var(--gold); color: var(--navy); }
.sort-item .drag-handle:active { cursor: grabbing; }

/* Auto-sort buttons row */
.auto-sort {
    display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--navy-2);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.auto-sort .muted { font-size: 12px; }
.auto-sort .mini { font-size: 12px; }

/* Always-visible checkbox (top-left) */
.sort-item .select-box {
    position: absolute; top: 8px; left: 8px;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(26, 37, 47, .65);
    border: 2px solid rgba(255, 255, 255, .35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    color: transparent;
    cursor: pointer;
    transition: all .15s ease;
    z-index: 3;
}
.sort-item:hover .select-box {
    border-color: var(--gold);
    background: rgba(26, 37, 47, .85);
}
.sort-item .select-box:hover {
    transform: scale(1.1);
}
.sort-item.is-selected {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(200, 169, 110, .45);
}
.sort-item.is-selected .select-box {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
    opacity: 1;
    transform: scale(1.05);
}
.sort-item.is-selected img { opacity: .82; }

/* Rubber-band selection rectangle */
.rubber-band {
    position: fixed;
    background: rgba(200, 169, 110, .18);
    border: 1.5px solid var(--gold);
    border-radius: 4px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 0 0 1px rgba(26, 37, 47, .3);
}

/* Grid background hint for rubber-band */
.sort-grid {
    user-select: none;
    -webkit-user-select: none;
    min-height: 200px;
    padding: 4px;
}
.sort-grid::before {
    content: '';
    position: absolute;
}

/* Export box bottom row */
.export-bottom { display: flex; gap: 10px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.export-bottom .muted { font-size: 12px; }

/* Tab buttons in sort-bar */
.sort-bar .tab {
    background: transparent;
    color: var(--ink-dim);
    border: 1px solid var(--line);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}
.sort-bar .tab:hover { color: var(--ink); }
.sort-bar .tab.on { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; }

/* ---------- Albums admin: category blocks ---------- */
.cat-block {
    background: var(--navy);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.cat-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cat-row form { display: flex; gap: 6px; align-items: center; }
.cat-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.cov-list { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 13px; }
.cov-list th, .cov-list td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.cov-list th { color: var(--ink-dim); font-weight: 500; font-size: 12px; }
.cov-list td a { color: var(--ink); }

/* Sub-filter chips (under category) */
.filter-bar.sub { margin-top: -10px; margin-bottom: 22px; padding: 8px 0; border-top: 1px dashed var(--line); }
.filter-bar.sub .sub-label { color: var(--ink-dim); font-size: 13px; padding: 7px 0; }
.chip.small { padding: 5px 10px; font-size: 11px; }
.chip.small .muted { font-size: 10px; opacity: .7; }

/* Hero badges */
.badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================================
   DASHBOARD - Coverage cards
   ============================================================ */
.dash-cov-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 8px;
}

.dash-cov-card {
    background: linear-gradient(165deg, var(--navy-2) 0%, var(--navy) 100%);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    position: relative;
}
.dash-cov-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-dim);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
}

.dcc-thumb {
    aspect-ratio: 4/3;
    background: var(--navy-3) center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dcc-thumb .ph { font-size: 48px; opacity: .25; }
.dcc-thumb .lock-badge {
    position: absolute; top: 10px; inset-inline-end: 10px;
}
.dcc-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .65) 100%);
    display: flex;
    align-items: flex-end;
    padding: 12px;
    opacity: 0;
    transition: opacity .2s;
}
.dash-cov-card:hover .dcc-overlay { opacity: 1; }
.dcc-count {
    background: rgba(200, 169, 110, .9);
    color: var(--navy);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.dcc-info { padding: 14px 16px 16px; }
.dcc-cat {
    font-size: 11px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    margin-bottom: 4px;
}
.dcc-name {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.4;
}
.dcc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dcc-date {
    font-size: 12px;
    color: var(--ink-dim);
}
.dcc-slug {
    background: var(--navy);
    color: var(--gold);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-family: "SF Mono", Menlo, monospace;
    direction: ltr;
}

/* Visibility / lock badges and delete confirmation */
.hidden-pill {
    display: inline-block;
    background: rgba(224, 90, 90, .15);
    color: var(--danger);
    border: 1px solid rgba(224, 90, 90, .3);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    margin-inline-start: 10px;
    vertical-align: middle;
}
.lock-badge {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    background: rgba(26, 37, 47, .85);
    color: var(--gold);
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    border: 1px solid rgba(200, 169, 110, .4);
    z-index: 2;
}
.album-cover { position: relative; }
.cb-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px;
    background: rgba(200, 169, 110, .06);
    border: 1px solid rgba(200, 169, 110, .2);
    border-radius: 8px;
    cursor: pointer;
    margin-top: 6px;
}
.cb-row input { margin-top: 3px; flex-shrink: 0; }
.cb-row span { font-size: 13px; color: var(--ink); line-height: 1.6; }
.cb-row span b { color: var(--gold); }

.del-confirm {
    border-color: rgba(224, 90, 90, .4) !important;
    background: rgba(224, 90, 90, .05) !important;
}
.warn-big {
    color: var(--ink);
    font-size: 15px;
    margin: 0 0 16px;
    line-height: 1.7;
}
.warn-big b { color: var(--danger); }

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-page { max-width: 1200px; margin: 0 auto; padding-bottom: 60px; }

.settings-hero {
    padding: 36px 0 24px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.settings-hero h1 {
    font-size: 32px;
    color: var(--ink);
    margin: 0 0 6px;
    font-weight: 700;
    letter-spacing: -.5px;
    background: linear-gradient(135deg, var(--ink) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.settings-hero p { font-size: 14px; margin: 0; }

.settings-tabs {
    display: flex; gap: 4px; flex-wrap: wrap;
    margin: 28px 0 36px;
    padding: 6px;
    background: var(--navy-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.settings-tabs a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px;
    color: var(--ink-dim);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all .18s ease;
}
.settings-tabs a:hover { color: var(--ink); background: rgba(200, 169, 110, .06); }
.settings-tabs a.on {
    background: linear-gradient(135deg, var(--gold), var(--gold-hi));
    color: var(--navy);
    box-shadow: 0 3px 12px rgba(200, 169, 110, .3);
}

.settings-section {
    margin: 0 0 56px;
    scroll-margin-top: 90px;
}

.section-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 22px;
    gap: 16px;
    flex-wrap: wrap;
}
.section-head h2 {
    font-size: 22px;
    color: var(--ink);
    margin: 0 0 4px;
    border: none;
    padding: 0;
    font-weight: 600;
}
.section-head h2::before { display: none; }
.section-head p { font-size: 13px; margin: 0; }

/* Add new category form */
.cat-add-form {
    background: linear-gradient(180deg, var(--navy-2), var(--navy));
    border: 1px solid var(--gold-dim);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
    animation: slideDown .25s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 120px;
    gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; }
.form-grid label span { font-size: 12px; color: var(--ink-dim); font-weight: 500; }
.form-grid input {
    background: var(--navy);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 11px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
.form-grid input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 169, 110, .15);
}
.form-actions {
    display: flex; gap: 10px; margin-top: 18px;
}
.form-actions.inline { margin-top: 12px; }
@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
}

/* Category cards grid */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.cat-card {
    position: relative;
    background: linear-gradient(165deg, var(--navy-2) 0%, var(--navy) 100%);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.cat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
    opacity: 0;
    transition: opacity .25s;
}
.cat-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold-dim);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.cat-card:hover::before { opacity: 1; }

.cc-head {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 14px;
}
.cc-emblem {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(200, 169, 110, .15), rgba(200, 169, 110, .05));
    border: 1px solid rgba(200, 169, 110, .25);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}
.cc-meta { flex: 1; min-width: 0; }
.cc-name {
    font-size: 16px;
    margin: 0 0 4px;
    color: var(--ink);
    font-weight: 600;
}
.cc-slug {
    font-size: 11px;
    color: var(--ink-dim);
    background: transparent;
    padding: 0;
    font-family: "SF Mono", Menlo, monospace;
}
.cc-desc {
    font-size: 13px;
    color: var(--ink-dim);
    margin: 0 0 16px;
    line-height: 1.6;
}

.cc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
}
.cc-stats div {
    background: rgba(26, 37, 47, .6);
    padding: 12px 8px;
    text-align: center;
    display: flex; flex-direction: column; gap: 2px;
}
.cc-stats b {
    color: var(--gold);
    font-size: 17px;
    font-weight: 700;
}
.cc-stats span {
    color: var(--ink-dim);
    font-size: 10px;
    font-weight: 500;
}

.cc-actions {
    display: flex; gap: 6px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}
.btn-ghost {
    flex: 1;
    background: transparent;
    color: var(--ink-dim);
    border: 1px solid var(--line);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all .15s;
    display: inline-block;
}
.btn-ghost:hover {
    background: var(--navy-3);
    color: var(--ink);
    border-color: var(--gold-dim);
}
.btn-ghost.danger:hover {
    background: rgba(224, 90, 90, .12);
    color: var(--danger);
    border-color: rgba(224, 90, 90, .3);
}

.cc-edit, .cc-delete {
    display: flex; flex-direction: column; gap: 10px;
    padding: 12px 0 0;
    animation: slideDown .2s ease;
}
.cc-edit label {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 11px;
    color: var(--ink-dim);
}
.cc-edit input {
    background: var(--navy);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}
.cc-edit input:focus {
    outline: none;
    border-color: var(--gold);
}
.cc-delete .warn {
    color: var(--danger);
    font-size: 13px;
    margin: 0;
}
.cc-delete .cb {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px;
    color: var(--ink-dim);
    cursor: pointer;
}
.cc-delete .cb input { margin: 0; }

/* Empty state */
.empty-card {
    text-align: center;
    padding: 60px 24px;
    background: var(--navy-2);
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--ink-dim);
}
.empty-card .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: .5;
}

/* Info grid (account & about) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.info-card {
    background: var(--navy-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex; flex-direction: column; gap: 4px;
}
.info-card .label {
    font-size: 11px;
    color: var(--ink-dim);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 500;
}
.info-card .value {
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
    word-break: break-all;
}
.info-card .value.mono { font-family: "SF Mono", Menlo, monospace; font-size: 13px; }
.info-card .value.small { font-size: 12px; }

/* Buttons - modern variants */
.btn.glow {
    box-shadow: 0 4px 16px rgba(200, 169, 110, .25);
}
.btn.glow:hover {
    box-shadow: 0 6px 20px rgba(200, 169, 110, .4);
    transform: translateY(-1px);
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 10px;
    transition: all .18s cubic-bezier(.4,0,.2,1);
}
.btn.primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-hi));
}

/* ============================================================
   MODAL OVERLAY (duplicate file confirmation, etc.)
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 22, 32, .75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn .25s var(--ease);
}
.modal-overlay[hidden] { display: none; }
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.modal-card {
    background: linear-gradient(160deg, var(--navy-2) 0%, var(--navy-1) 100%);
    border: 1px solid var(--gold-dim);
    border-radius: var(--r-xl);
    padding: 36px 32px 28px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: modalPopIn .3s var(--ease-spring);
}
@keyframes modalPopIn {
    from { opacity: 0; transform: scale(.92) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-icon {
    font-size: 44px;
    margin-bottom: 12px;
    display: inline-block;
    animation: iconWiggle .6s var(--ease) .15s both;
}
@keyframes iconWiggle {
    0%, 100% { transform: rotate(0); }
    25%      { transform: rotate(-8deg); }
    75%      { transform: rotate(6deg); }
}
.modal-card h3 {
    font-family: "Roboto", "Tajawal", sans-serif;
    color: var(--ink);
    font-size: 22px;
    margin: 0 0 14px;
    font-weight: 600;
}
.modal-file {
    background: var(--navy);
    color: var(--gold);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--line);
    font-family: "SF Mono", Menlo, monospace;
    font-size: 13px;
    margin: 0 0 16px;
    word-break: break-all;
    direction: ltr;
}
.modal-sub {
    color: var(--ink-soft);
    font-size: 14px;
    margin: 0 0 24px;
    line-height: 1.6;
}
.modal-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.modal-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 14px;
    font-size: 13px;
}
.modal-apply {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(200, 169, 110, .06);
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    cursor: pointer;
    font-size: 13px;
    color: var(--ink-soft);
    user-select: none;
}
.modal-apply input { margin: 0; cursor: pointer; }
.modal-apply:hover { background: rgba(200, 169, 110, .12); color: var(--ink); }

/* WebP conversion badge on upload row */
.webp-tag {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--ok);
    background: rgba(84, 201, 151, .1);
    border: 1px solid rgba(84, 201, 151, .25);
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* ---------- Cover image section ---------- */
.cover-display {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    background: linear-gradient(135deg, var(--navy-2), var(--navy-1));
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 8px;
}
.cover-thumb {
    width: 180px;
    aspect-ratio: 4/3;
    border-radius: var(--r-sm);
    background: var(--navy-3) center/cover no-repeat;
    border: 1px solid var(--line-strong);
    flex-shrink: 0;
}
.cover-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.cover-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
}
.cover-tag.manual {
    background: rgba(200, 169, 110, .15);
    color: var(--gold);
    border: 1px solid rgba(200, 169, 110, .3);
}
.cover-tag.auto {
    background: var(--navy-3);
    color: var(--ink-dim);
    border: 1px solid var(--line);
}
.cover-tag.hidden-tag {
    background: rgba(232, 93, 101, .12);
    color: var(--danger);
    border: 1px solid rgba(232, 93, 101, .3);
}
.cover-empty {
    flex: 1;
    color: var(--ink-dim);
    text-align: center;
    padding: 40px;
    font-size: 14px;
}

/* Cover star badge on grid items */
.sort-item .cover-star-badge {
    position: absolute;
    top: 8px;
    inset-inline-end: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-hi));
    color: var(--navy);
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(200, 169, 110, .4);
    z-index: 4;
}
.sort-item:has(.cover-star-badge) {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 2px rgba(200, 169, 110, .35);
}

/* Cover star action button */
.sort-item .ia-cover {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: rgba(14, 22, 32, .88);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, .15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s var(--ease);
}
.sort-item .ia-cover:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    transform: translateY(-1px);
}
.sort-item .ia-cover.on {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

@media (max-width: 600px) {
    .cover-display { flex-direction: column; align-items: stretch; }
    .cover-thumb { width: 100%; }
}

/* ---------- Per-image inline buttons (link + delete) ---------- */
.sort-item .item-actions {
    position: absolute;
    bottom: 8px;
    inset-inline-start: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity .18s var(--ease);
    z-index: 3;
    pointer-events: none;
}
.sort-item:hover .item-actions,
.sort-item:focus-within .item-actions { opacity: 1; pointer-events: auto; }

.sort-item .ia-link,
.sort-item .ia-del {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: rgba(14, 22, 32, .88);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, .15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s var(--ease);
}
.sort-item .ia-link:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    transform: translateY(-1px);
}
.sort-item .ia-del:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: translateY(-1px);
}

/* Link-types popover */
.link-pop {
    position: absolute;
    z-index: 9999;
    background: linear-gradient(160deg, var(--navy-2), var(--navy-1));
    border: 1px solid var(--gold-dim);
    border-radius: var(--r-md);
    padding: 6px;
    min-width: 190px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: popIn .18s var(--ease-spring);
}
.link-pop[hidden] { display: none; }
@keyframes popIn {
    from { opacity: 0; transform: scale(.92) translateY(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.link-pop::before {
    content: '';
    position: absolute;
    bottom: -7px; left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px;
    background: linear-gradient(135deg, transparent 50%, var(--navy-1) 50%);
    border-right: 1px solid var(--gold-dim);
    border-bottom: 1px solid var(--gold-dim);
}
.link-pop button {
    background: transparent;
    color: var(--ink);
    border: none;
    padding: 9px 14px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    text-align: start;
    transition: all .12s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.link-pop button:hover {
    background: var(--gold);
    color: var(--navy);
    font-weight: 600;
}
.link-pop .lp-dl {
    margin-top: 4px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    color: var(--gold);
}

/* ---------- Image quick-actions modal ---------- */
.img-actions-card {
    max-width: 560px;
    padding: 0;
    overflow: hidden;
    position: relative;
}
.img-preview-wrap {
    position: relative;
    aspect-ratio: 16/10;
    background: #000;
    overflow: hidden;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.img-preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.img-preview-seq {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(200, 169, 110, .92);
    color: var(--navy);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    font-family: "Roboto", "Tajawal", sans-serif;
    backdrop-filter: blur(6px);
}
.modal-close {
    position: absolute;
    top: 12px; left: 12px;
    width: 36px; height: 36px;
    background: rgba(14, 22, 32, .75);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    z-index: 3;
    transition: all .2s var(--ease);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: scale(1.05);
}
.img-actions-body { padding: 22px 24px 24px; }
.img-actions-name {
    color: var(--ink-soft);
    font-size: 13px;
    margin-bottom: 18px;
    text-align: center;
    font-family: "SF Mono", Menlo, monospace;
    direction: ltr;
    word-break: break-all;
    padding: 8px 12px;
    background: var(--navy);
    border: 1px solid var(--line);
    border-radius: 6px;
}
.img-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.img-actions-grid .ia-btn:last-child { grid-column: 1 / -1; }
.ia-btn {
    background: var(--navy-3);
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: all .2s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ia-btn:hover {
    background: var(--navy-2);
    color: var(--gold);
    border-color: var(--gold-dim);
    transform: translateY(-1px);
}
.ia-btn.primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-hi));
    color: var(--navy);
    border-color: var(--gold);
    font-weight: 600;
}
.ia-btn.primary:hover {
    box-shadow: 0 4px 16px rgba(200, 169, 110, .35);
    color: var(--navy);
}
.ia-btn.danger {
    color: var(--danger);
    border-color: rgba(232, 93, 101, .3);
    background: rgba(232, 93, 101, .05);
}
.ia-btn.danger:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

@media (max-width: 480px) {
    .img-actions-grid { grid-template-columns: 1fr; }
    .img-actions-grid .ia-btn:last-child { grid-column: 1; }
}

/* Alert pop animation */
.alert.pop {
    display: flex; align-items: center; gap: 10px;
    border-radius: 12px;
    padding: 14px 18px;
    animation: alertPop .35s cubic-bezier(.34, 1.56, .64, 1);
    margin-bottom: 22px;
    font-size: 14px;
}
.alert.pop span:first-child {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.alert.pop.ok { background: rgba(88, 192, 138, .12); border: 1px solid rgba(88, 192, 138, .35); color: var(--ok); }
.alert.pop.ok span:first-child { background: var(--ok); color: white; }
.alert.pop.err { background: rgba(224, 90, 90, .12); border: 1px solid rgba(224, 90, 90, .35); color: var(--danger); }
.alert.pop.err span:first-child { background: var(--danger); color: white; }
@keyframes alertPop {
    0% { opacity: 0; transform: translateY(-12px) scale(.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   EDITORIAL HOME REDESIGN (magazine spread)
   ============================================================ */

.ed-hero {
    position: relative;
    text-align: center;
    padding: 110px 32px 80px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(200, 169, 110, .14) 0%, transparent 55%),
        linear-gradient(180deg, var(--navy-1) 0%, var(--navy) 100%);
    border-bottom: 1px solid var(--line);
}
.ed-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: 50%;
    width: 900px; height: 900px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(200, 169, 110, .07) 0%, transparent 60%);
    pointer-events: none;
    animation: heroFloat 9s ease-in-out infinite;
}
.ed-hero-inner { max-width: 880px; margin: 0 auto; position: relative; z-index: 1; }

.ed-pre {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
    margin-bottom: 26px;
    animation: heroFadeUp .8s var(--ease) both;
}
.ed-pre::before, .ed-pre::after {
    content: '';
    width: 28px; height: 1px;
    background: var(--gold);
    opacity: .6;
}
.ed-title {
    font-family: "Roboto", "Tajawal", sans-serif;
    font-size: clamp(48px, 9vw, 96px);
    margin: 0 0 24px;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1;
    animation: heroFadeUp .9s .1s var(--ease) both;
}
.ed-sub {
    color: var(--ink-soft);
    max-width: 580px;
    margin: 0 auto 44px;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.8;
    animation: heroFadeUp .9s .2s var(--ease) both;
}
.ed-stats {
    display: inline-flex;
    align-items: center;
    gap: 32px;
    padding: 18px 38px;
    background: rgba(26, 37, 49, .55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--line-strong);
    border-radius: 100px;
    animation: heroFadeUp .9s .3s var(--ease) both;
}
.ed-stats > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ed-stats b {
    font-family: "Roboto", "Tajawal", sans-serif;
    color: var(--gold);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.ed-stats span {
    color: var(--ink-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}
.ed-stats .sep { width: 1px; height: 32px; background: var(--line-strong); }
@media (max-width: 600px) {
    .ed-stats { gap: 20px; padding: 14px 24px; flex-wrap: wrap; }
    .ed-stats b { font-size: 24px; }
}

/* FEATURED COVERAGE */
.ed-featured { max-width: 1320px; margin: 0 auto; padding: 80px 32px 0; }
.ed-feat-card {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    background: var(--navy-1);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    text-decoration: none;
    transition: all .5s var(--ease);
    box-shadow: var(--shadow-md);
}
.ed-feat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--gold-dim);
}
@media (max-width: 900px) { .ed-feat-card { grid-template-columns: 1fr; } }

.ed-feat-cover {
    aspect-ratio: 16/10;
    background: var(--navy-3) center/cover no-repeat;
    position: relative;
    overflow: hidden;
    transition: background-size 1.2s var(--ease);
}
.ed-feat-card:hover .ed-feat-cover { background-size: 105%; }
.ed-feat-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(14, 22, 32, 0) 60%, rgba(14, 22, 32, .9) 100%);
}
.ed-feat-ph {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 64px; opacity: .2;
}

.ed-feat-meta {
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, var(--navy-1) 0%, var(--navy) 100%);
}
.ed-feat-pre {
    font-size: 11px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 14px;
    font-weight: 500;
}
.ed-feat-cat {
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 10px;
    font-weight: 500;
}
.ed-feat-title {
    font-family: "Roboto", "Tajawal", sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    color: var(--ink);
    margin: 0 0 28px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.015em;
    transition: color .25s;
}
.ed-feat-card:hover .ed-feat-title { color: var(--gold-hi); }
.ed-feat-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink-dim);
    font-size: 13px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.ed-feat-bottom .dot { opacity: .5; }
.ed-feat-arrow {
    margin-inline-start: auto;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--navy-3);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    transition: all .25s var(--ease);
}
.ed-feat-card:hover .ed-feat-arrow {
    background: var(--gold);
    color: var(--navy);
    transform: translateX(-4px);
}

/* SECTION HEADS */
.ed-section { max-width: 1320px; margin: 0 auto; padding: 80px 32px; }
.ed-section-head { text-align: center; margin-bottom: 48px; }
.ed-eyebrow {
    display: inline-block;
    font-size: 10px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 12px;
    position: relative;
    padding: 0 24px;
}
.ed-eyebrow::before, .ed-eyebrow::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 14px; height: 1px;
    background: var(--gold);
    opacity: .5;
}
.ed-eyebrow::before { right: 100%; margin-right: 4px; }
.ed-eyebrow::after  { left: 100%;  margin-left: 4px; }
.ed-h2 {
    font-family: "Roboto", "Tajawal", sans-serif;
    font-size: 38px;
    color: var(--ink);
    margin: 0;
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1.2;
}

/* CATEGORY GRID (tall poster cards) */
.ed-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.ed-cat {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: var(--r-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    background: var(--navy-2);
    transition: transform .5s var(--ease);
}
.ed-cat::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--r-md);
    box-shadow: inset 0 0 0 1px var(--gold);
    opacity: 0;
    transition: opacity .35s;
}
.ed-cat:hover { transform: translateY(-4px); }
.ed-cat:hover::after { opacity: 1; }
.ed-cat-cover {
    position: absolute;
    inset: 0;
    background: var(--navy-3) center/cover no-repeat;
    transition: transform 1s var(--ease), filter .4s;
    filter: brightness(.75) saturate(.95);
}
.ed-cat:hover .ed-cat-cover { transform: scale(1.08); filter: brightness(.85) saturate(1.05); }
.ed-cat-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(14, 22, 32, .95) 100%);
}
.ed-cat-cover .ph {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 56px; opacity: .2;
}
.ed-cat-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 24px 22px;
    z-index: 1;
}
.ed-cat-info h3 {
    font-family: "Roboto", "Tajawal", sans-serif;
    font-size: 24px;
    margin: 0 0 6px;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.2;
}
.ed-cat-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-soft);
}
.ed-cat-meta .dot { opacity: .5; }

/* RECENT COVERAGES GRID */
.ed-recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.ed-rec {
    text-decoration: none;
    color: var(--ink);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--navy-1);
    border: 1px solid var(--line);
    transition: all .35s var(--ease);
}
.ed-rec:hover {
    transform: translateY(-4px);
    border-color: var(--gold-dim);
    box-shadow: var(--shadow-md);
}
.ed-rec-cover {
    aspect-ratio: 4/3;
    background: var(--navy-3) center/cover no-repeat;
    transition: background-size .8s var(--ease);
    position: relative;
    overflow: hidden;
}
.ed-rec:hover .ed-rec-cover { background-size: 108%; }
.ed-rec-cover .ph {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 44px; opacity: .2;
}
.ed-rec-info { padding: 18px 20px 20px; }
.ed-rec-cat {
    font-size: 10px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: 6px;
}
.ed-rec-info h3 {
    font-family: "Roboto", "Tajawal", sans-serif;
    font-size: 18px;
    margin: 0 0 12px;
    color: var(--ink);
    line-height: 1.3;
    font-weight: 600;
    transition: color .25s;
}
.ed-rec:hover h3 { color: var(--gold-hi); }
.ed-rec-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--ink-dim);
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.ed-rec-arrow {
    color: var(--gold);
    transition: transform .25s;
}
.ed-rec:hover .ed-rec-arrow { transform: translateX(-4px); }

/* Suppress old hero & sections on editorial home */
body.home-editorial .hero,
body.home-editorial .albums-section,
body.home-editorial .recent-section { display: none; }

/* ============================================================
   PUBLIC TOPBAR V2 — clean, logo-only brand
   ============================================================ */
.topbar.pub.v2 {
    background: rgba(14, 22, 32, .82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--line);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: sticky; top: 0; z-index: 30;
    min-height: 68px;
}
.topbar.pub.v2 .brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity .15s;
}
.topbar.pub.v2 .brand:hover { opacity: .8; }
.topbar.pub.v2 .brand img {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(200, 169, 110, .3));
}
.topbar.pub.v2 nav {
    display: flex;
    gap: 6px;
    align-items: center;
}
.topbar.pub.v2 nav a {
    color: var(--ink-soft);
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all .15s var(--ease);
    border: 1px solid transparent;
}
.topbar.pub.v2 nav a:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, .04);
}
.topbar.pub.v2 nav a.on {
    color: var(--gold);
    background: rgba(200, 169, 110, .1);
    border-color: rgba(200, 169, 110, .25);
}
.topbar.pub.v2 nav a.ghost {
    color: var(--gold);
    border-color: var(--gold-dim);
    background: transparent;
}
.topbar.pub.v2 nav a.ghost:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
@media (max-width: 540px) {
    .topbar.pub.v2 { padding: 12px 18px; min-height: 60px; gap: 12px; }
    .topbar.pub.v2 .brand img { height: 36px; }
    .topbar.pub.v2 nav a { padding: 7px 12px; font-size: 13px; }
}

/* ============================================================
   CINEMATIC LIGHTBOX
   ============================================================ */
.lb {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 18, .96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity .25s var(--ease);
}
.lb[hidden] { display: none; }
.lb.is-open { opacity: 1; }

.lb-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 70px;
    position: relative;
    cursor: pointer;
}
.lb-img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 4px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
    transition: opacity .2s var(--ease);
    user-select: none;
    -webkit-user-drag: none;
}
.lb-spinner {
    position: absolute;
    width: 44px; height: 44px;
    border: 3px solid rgba(200, 169, 110, .2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: lbSpin .8s linear infinite;
}
@keyframes lbSpin { to { transform: rotate(360deg); } }

.lb-btn {
    position: absolute;
    background: rgba(200, 169, 110, .12);
    border: 1px solid rgba(200, 169, 110, .35);
    color: var(--gold);
    width: 52px; height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s var(--ease);
    z-index: 2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lb-btn:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    transform: scale(1.08);
}
.lb-close { top: 22px; inset-inline-end: 22px; }
.lb-prev  { top: 50%; inset-inline-end: 22px; transform: translateY(-50%); }
.lb-next  { top: 50%; inset-inline-start: 22px; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.08); }

.lb-top {
    position: absolute;
    top: 22px;
    inset-inline-start: 22px;
    z-index: 2;
}
.lb-counter {
    background: rgba(14, 22, 32, .6);
    border: 1px solid rgba(255, 255, 255, .15);
    color: var(--ink);
    padding: 9px 16px;
    border-radius: 100px;
    font-family: "Roboto", "Tajawal", sans-serif;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: inline-flex; align-items: center; gap: 6px;
}
.lb-counter .lb-cur { color: var(--gold); font-weight: 700; }
.lb-counter .lb-sep { opacity: .4; }

.lb-bottom {
    padding: 18px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: linear-gradient(180deg, transparent, rgba(8, 12, 18, .85));
}
.lb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    justify-content: center;
    background: rgba(0, 0, 0, .35);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lb-meta[hidden] { display: none; }
.lb-meta-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 100px;
}
.lb-meta-k {
    color: var(--ink-dim);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.lb-meta-row b {
    color: var(--ink);
    font-family: "Roboto", "Tajawal", sans-serif;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.lb-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.lb-act {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .08);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, .12);
    padding: 10px 16px;
    border-radius: 100px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all .18s var(--ease);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lb-act:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
.lb-copy.is-copied { background: var(--ok); color: white; border-color: var(--ok); }

.lb-thumbs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    scrollbar-width: thin;
}
.lb-thumbs::-webkit-scrollbar { height: 6px; }
.lb-thumbs::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 3px; }

.lb-thumb {
    flex-shrink: 0;
    width: 64px; height: 64px;
    background: var(--navy-3) center/cover no-repeat;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s var(--ease);
    opacity: .55;
}
.lb-thumb:hover { opacity: 1; transform: translateY(-2px); }
.lb-thumb.on {
    opacity: 1;
    border-color: var(--gold);
    box-shadow: 0 6px 20px rgba(200, 169, 110, .35);
}

@media (max-width: 700px) {
    .lb-stage { padding: 60px 12px 12px; }
    .lb-btn { width: 44px; height: 44px; }
    .lb-prev, .lb-next { display: none; } /* rely on swipe */
    .lb-act span { display: none; }
    .lb-act { padding: 10px; }
    .lb-thumb { width: 52px; height: 52px; }
}

/* ============================================================
   ⌘K COMMAND PALETTE
   ============================================================ */
.cmdk {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 18, .65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 14vh 20px 20px;
    opacity: 0;
    transition: opacity .18s var(--ease);
}
.cmdk[hidden] { display: none; }
.cmdk.is-open { opacity: 1; }
.cmdk.is-open .cmdk-card { transform: translateY(0); }

.cmdk-card {
    background: linear-gradient(180deg, var(--navy-2) 0%, var(--navy-1) 100%);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    width: 100%;
    max-width: 640px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
    transform: translateY(-12px);
    transition: transform .22s var(--ease-spring);
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

.cmdk-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, .15);
}
.cmdk-search svg { color: var(--ink-dim); flex-shrink: 0; }
.cmdk-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    padding: 0;
}
.cmdk-input::placeholder { color: var(--ink-dim); }
.cmdk-search kbd {
    background: var(--navy-3);
    border: 1px solid var(--line);
    color: var(--ink-dim);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: inherit;
}

.cmdk-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.cmdk-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    cursor: pointer;
    text-align: start;
    color: var(--ink);
    font-family: inherit;
    transition: background .12s;
}
.cmdk-row.on {
    background: rgba(200, 169, 110, .12);
}
.cmdk-row:hover { background: rgba(255, 255, 255, .04); }
.cmdk-row.on:hover { background: rgba(200, 169, 110, .14); }

.cmdk-icon {
    width: 36px; height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--navy-3);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.cmdk-icon.coverage { background: rgba(200, 169, 110, .12); }
.cmdk-icon.category { background: rgba(88, 192, 138, .12); color: var(--ok); }
.cmdk-icon.action   { background: rgba(120, 160, 230, .12); color: #9bb8ec; }

.cmdk-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.cmdk-label {
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cmdk-desc {
    color: var(--ink-dim);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cmdk-kind {
    color: var(--ink-dim);
    font-size: 11px;
    padding: 3px 9px;
    background: var(--navy);
    border: 1px solid var(--line);
    border-radius: 100px;
    flex-shrink: 0;
}
.cmdk-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--ink-dim);
    font-size: 14px;
}

.cmdk-footer {
    display: flex;
    gap: 16px;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, .15);
    font-size: 11px;
    color: var(--ink-dim);
}
.cmdk-footer kbd {
    background: var(--navy-3);
    border: 1px solid var(--line);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 4px;
    font-family: inherit;
    font-size: 10px;
}

@media (max-width: 600px) {
    .cmdk { padding: 8vh 12px 12px; }
    .cmdk-footer { font-size: 10px; gap: 10px; }
}

/* ---------- Editorial Footer ---------- */
.pub-foot {
    text-align: center;
    padding: 60px 32px 40px;
    color: var(--ink-dim);
    border-top: 1px solid var(--line);
    margin-top: 80px;
    font-size: 13px;
    background: linear-gradient(180deg, transparent 0%, var(--navy-1) 100%);
    position: relative;
}
.pub-foot::before {
    content: '';
    display: block;
    width: 60px; height: 1px;
    background: var(--gold);
    margin: 0 auto 24px;
    opacity: .5;
}
.pub-foot p { margin: 0; font-weight: 300; letter-spacing: .02em; }
.pub-foot a { color: var(--gold); text-decoration: none; transition: opacity .2s; }
.pub-foot a:hover { opacity: .8; }

/* ---------- Scroll-triggered reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal.delay-1 { transition-delay: .05s; }
.reveal.delay-2 { transition-delay: .12s; }
.reveal.delay-3 { transition-delay: .2s; }
.reveal.delay-4 { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero h1, .hero p, .login-box { animation: none; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--navy-2);
    color: var(--gold);
    padding: 12px 22px;
    border-radius: 30px;
    border: 1px solid var(--gold);
    opacity: 0;
    pointer-events: none;
    transition: all .25s;
    font-size: 14px;
    z-index: 100;
    box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Install ---------- */
body.install { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.install-box {
    background: var(--navy-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 36px;
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow);
}
.install-box h1 { color: var(--gold); margin: 0 0 24px; font-size: 22px; }
.steps { list-style: none; padding: 0; margin: 0 0 24px; display: flex; gap: 8px; }
.steps li {
    flex: 1; padding: 8px 10px; background: var(--navy-3);
    border-radius: 6px; font-size: 11px; color: var(--ink-dim);
    text-align: center; border: 1px solid var(--line);
}
.steps li.active { color: var(--gold); border-color: var(--gold); }
.steps li.done { color: var(--ok); border-color: var(--ok); }
.big-ok { font-size: 38px; color: var(--ok); text-align: center; margin: 30px 0; }
pre.err {
    background: rgba(224,90,90,.1);
    border-radius: 6px; padding: 10px;
    font-size: 12px; color: var(--danger);
    direction: ltr; text-align: left;
    overflow-x: auto;
}


/* ===== Powered by Lawhah (أُضيف بواسطة لوحة) ===== */
.powered-by-lawhah { display:inline-flex; flex-direction:column; align-items:center; gap:6px; margin-top:18px; text-decoration:none; opacity:1; }
.powered-by-lawhah img { width:130px; height:auto; display:block; filter:drop-shadow(0 2px 8px rgba(0,0,0,.25)); }
.powered-by-lawhah span { font-size:10px; letter-spacing:.18em; text-transform:uppercase; color:rgba(128,128,128,.75); }
