/*--------------------------------------------------------------
# DotUtsav - app stylesheet
# Part of the DotTut family (dark-first, vivid green identity).
# Family rule: keep the dark + green DNA; ONE small differentiator only.
# DotUtsav differentiator: a warm celebration-gold used sparingly for
# festive highlights (never as the primary color - green stays primary).
# Dark is the default theme; light is html[data-theme="light"].
# Every component color comes from a token so both themes stay in sync.
--------------------------------------------------------------*/

:root {
    /* Fonts (family) */
    --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --heading-font: "Ubuntu", sans-serif;
    --nav-font: "Inter", sans-serif;

    /* Brand constants (same in both themes) */
    --accent-color:    #40b605;   /* THE family green */
    --btn-green:       #2f8000;   /* white-text buttons (WCAG AA) */
    --btn-green-hover: #287000;

    /* DotUtsav differentiator: celebration gold (secondary highlight only) */
    --gold:      #e6b450;
    --gold-deep: #c68a1f;

    /* Status hues */
    --status-good: #22c55e;
    --status-warn: #f59e0b;
    --status-bad:  #ef4444;
    --status-info: #38bdf8;

    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 64px;

    scroll-behavior: smooth;
}

/* ---------- Dark theme (default) ---------- */
:root,
html[data-theme="dark"] {
    color-scheme: dark;

    --background-color: #040a01;
    --surface-color:    #0f1412;
    --surface-deep:     #0b0f0d;
    --sidebar-bg:       #060c03;
    --input-bg:         #121614;
    --input-border:     #1f2a25;

    --default-color:   #f3f6f4;
    --heading-color:   #e1eff9;
    --text-strong:     #ffffff;
    --text-soft:       rgba(255, 255, 255, .75);
    --text-muted:      rgba(255, 255, 255, .5);
    --text-faint:      rgba(255, 255, 255, .35);
    --hairline:        rgba(255, 255, 255, .06);
    --hairline-strong: rgba(255, 255, 255, .1);
    --hover-bg:        rgba(255, 255, 255, .04);

    --emerald:    #22c55e;
    --link-color: #22c55e;
    --link-hover: #4ade80;

    --gold-soft: rgba(230, 180, 80, .14);

    --status-good-text: #22c55e;
    --status-warn-text: #f59e0b;
    --status-bad-text:  #ef4444;
    --status-info-text: #38bdf8;

    --overlay:     rgba(0, 0, 0, .6);
    --shadow-lg:   0 18px 50px rgba(0, 0, 0, .5);
    --glow:        0 0 40px rgba(0, 255, 120, .05);
    --placeholder: #8c9a93;
}

/* ---------- Light theme ---------- */
html[data-theme="light"] {
    color-scheme: light;

    --background-color: #f4f7f4;
    --surface-color:    #ffffff;
    --surface-deep:     #fbfdfb;
    --sidebar-bg:       #ffffff;
    --input-bg:         #f3f6f3;
    --input-border:     #d8e2d9;

    --default-color:   #1c2a21;
    --heading-color:   #0e1f14;
    --text-strong:     #0e1f14;
    --text-soft:       rgba(14, 31, 20, .8);
    --text-muted:      rgba(14, 31, 20, .58);
    --text-faint:      rgba(14, 31, 20, .42);
    --hairline:        rgba(14, 31, 20, .08);
    --hairline-strong: rgba(14, 31, 20, .14);
    --hover-bg:        rgba(14, 31, 20, .045);

    --emerald:    #16a34a;
    --link-color: #15803d;
    --link-hover: #166534;

    --gold:      #b7791f;
    --gold-deep: #8a5a12;
    --gold-soft: rgba(183, 121, 31, .12);

    --status-good-text: #15803d;
    --status-warn-text: #b45309;
    --status-bad-text:  #b91c1c;
    --status-info-text: #0369a1;

    --overlay:     rgba(10, 20, 14, .45);
    --shadow-lg:   0 18px 50px rgba(20, 40, 28, .18);
    --glow:        0 6px 30px rgba(20, 80, 40, .08);
    --placeholder: #7d8b81;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { background-color: var(--background-color); overflow-x: hidden; }

body {
    margin: 0;
    background-color: var(--background-color);
    color: var(--default-color);
    font-family: var(--default-font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Subtle festive ambience in dark mode: green glow + a whisper of gold. */
html[data-theme="dark"] body {
    background-image:
        radial-gradient(1100px 640px at 82% -12%, rgba(64, 182, 5, .06), transparent 62%),
        radial-gradient(900px 540px at -8% 78%, rgba(230, 180, 80, .04), transparent 58%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 { color: var(--heading-color); font-family: var(--heading-font); margin: 0 0 .4em; }

a { color: var(--link-color); text-decoration: none; transition: color .25s; }
a:hover { color: var(--link-hover); }

::selection { background: var(--emerald); color: #06140a; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- App shell ---------- */
.du-app { display: flex; min-height: 100vh; }

.du-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-inline-end: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 1000;
    padding: 20px 14px;
    transition: transform .25s ease;
}

.du-main {
    flex: 1;
    margin-inline-start: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Content and topbar share the same centered max-width so they align on any
   screen. On wide monitors the content no longer clings to the left. */
.du-content {
    width: 100%;
    max-width: 1720px;
    margin-inline: auto;
    padding: 28px clamp(16px, 2.6vw, 44px);
}

.du-topbar {
    height: var(--topbar-height);
    background: color-mix(in srgb, var(--sidebar-bg) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--hairline);
    position: sticky;
    top: 0;
    z-index: 900;
}

.du-topbar-inner {
    height: 100%;
    max-width: 1720px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 clamp(16px, 2.6vw, 44px);
}

.du-backdrop { display: none; position: fixed; inset: 0; background: var(--overlay); z-index: 990; }
.du-backdrop.show { display: block; }

/* Brand / wordmark */
.du-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 8px 18px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 16px;
}

.du-brand .mark { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: block; }

.du-brand .wordmark {
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 1.28rem;
    color: var(--text-strong);
    letter-spacing: .2px;
    line-height: 1;
}
.du-brand .wordmark .dot { color: var(--emerald); }
.du-brand .wordmark .fest { color: var(--gold); }

/* Sidebar nav */
.du-nav { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }

.du-nav .nav-label {
    font-family: var(--nav-font);
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-faint);
    padding: 16px 12px 6px;
}

.du-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    font-family: var(--nav-font);
    font-size: .92rem;
    font-weight: 500;
    color: var(--text-soft);
    transition: background .2s, color .2s;
}

.du-nav a i { font-size: 1.08rem; color: var(--text-faint); transition: color .2s; }
.du-nav a:hover { background: var(--hover-bg); color: var(--text-strong); }
.du-nav a:hover i { color: var(--emerald); }
.du-nav a.active { background: rgba(34, 197, 94, .12); color: var(--text-strong); }
.du-nav a.active i { color: var(--emerald); }
.du-nav a .badge-soft {
    margin-inline-start: auto; font-size: .66rem; font-weight: 700; color: var(--gold-deep);
    background: var(--gold-soft); border-radius: 20px; padding: 2px 8px;
}

.du-sidebar-foot { padding: 14px 12px 2px; border-top: 1px solid var(--hairline); font-size: .74rem; color: var(--text-faint); }

/* Desktop collapse toggle. Hidden on mobile, where the sidebar is off-canvas instead. */
.du-sidebar-collapse {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    margin-top: 10px;
    padding: 9px 12px;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: none;
    color: var(--text-muted);
    font-family: var(--nav-font);
    font-size: .8rem;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.du-sidebar-collapse:hover { color: var(--text-strong); border-color: var(--hairline-strong); }
.du-sidebar-collapse i { transition: transform .25s ease; }

@media (min-width: 993px) {
    .du-sidebar-collapse { display: inline-flex; }

    /* Mini rail: shrink the shared width variable and everything - sidebar and the
       main column's margin - follows. State lives on <html>, which Turbo never swaps,
       and is applied pre-paint by du-theme-init so there is no flash. */
    html[data-sidebar="mini"] { --sidebar-width: 74px; }
    html[data-sidebar="mini"] .du-sidebar { padding-inline: 11px; }
    html[data-sidebar="mini"] .du-brand { justify-content: center; }
    html[data-sidebar="mini"] .du-brand .wordmark,
    html[data-sidebar="mini"] .du-nav .nav-label,
    html[data-sidebar="mini"] .du-nav a span,
    html[data-sidebar="mini"] .du-nav a .badge-soft,
    html[data-sidebar="mini"] .du-sidebar-foot,
    html[data-sidebar="mini"] .du-sidebar-collapse span { display: none; }
    html[data-sidebar="mini"] .du-nav a { justify-content: center; padding: 12px 0; gap: 0; }
    html[data-sidebar="mini"] .du-nav a i { font-size: 1.2rem; }
    html[data-sidebar="mini"] .du-sidebar-collapse i { transform: rotate(180deg); }

    .du-sidebar { transition: transform .25s ease, width .25s ease, padding .25s ease; }
    .du-main { transition: margin-inline-start .25s ease; }
}

/* Topbar bits */
.du-page-title { font-size: 1.15rem; font-weight: 600; font-family: var(--heading-font); margin: 0; color: var(--heading-color); }

/* flex-basis rather than min-width: the search must be able to shrink, or on a phone
   it holds 220px and shoves the action buttons clean off the screen. min-width:0
   defeats the default min-width:auto that stops flex items shrinking past content. */
.du-search {
    position: relative;
    margin-inline-start: auto;
    display: flex; align-items: center; gap: 8px;
    background: var(--input-bg); border: 1px solid var(--input-border);
    border-radius: 10px; padding: 8px 14px;
    flex: 0 1 260px; min-width: 0;
}
.du-search i { color: var(--text-faint); }
.du-search input { background: none; border: 0; outline: none; color: var(--text-strong); font-family: var(--nav-font); font-size: .88rem; width: 100%; }
.du-search input::placeholder { color: var(--placeholder); }

/* Typeahead dropdown under the topbar search. */
.du-search-drop {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline: 0;
    min-width: 300px;
    background: var(--surface-color);
    border: 1px solid var(--hairline-strong);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 950;
}
.du-search-drop[hidden] { display: none; }
.du-search-drop .item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--hairline);
    color: var(--text-soft);
    font-family: var(--nav-font);
    font-size: .87rem;
    text-align: start;
    cursor: pointer;
}
.du-search-drop .item:hover, .du-search-drop .item:focus { background: var(--hover-bg); color: var(--text-strong); }
.du-search-drop .item .meta { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; font-size: .74rem; color: var(--text-faint); }
.du-search-drop .item.all { color: var(--emerald); font-weight: 600; border-bottom: 0; }
.du-search-drop .empty { padding: 12px 14px; font-size: .84rem; color: var(--text-muted); border-bottom: 1px solid var(--hairline); }

.du-topbar-actions { display: flex; align-items: center; gap: 6px; }
.du-search + .du-topbar-actions { margin-inline-start: 0; }
.du-topbar-actions:first-of-type { margin-inline-start: auto; }

.du-icon-btn {
    background: none; border: 0; color: var(--text-soft); font-size: 1.15rem;
    width: 38px; height: 38px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    transition: background .2s, color .2s;
}
.du-icon-btn:hover { background: var(--hover-bg); color: var(--emerald); }

.du-user { display: flex; align-items: center; gap: 10px; font-family: var(--nav-font); font-size: .88rem; color: var(--text-soft); background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.du-user:hover { background: var(--hover-bg); }
.du-user .avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(150deg, #4ad006, var(--btn-green));
    color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0;
}

/* Hamburger (mobile only) */
.du-hamburger { display: none; }

/* ---------- Buttons ---------- */
.btn-brand {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--btn-green); border: 2px solid var(--btn-green); color: #fff;
    padding: 10px 22px; font-family: var(--nav-font); font-size: .9rem; font-weight: 600;
    border-radius: 8px; cursor: pointer; transition: all .25s ease;
}
.btn-brand:hover:not(:disabled) { background: var(--btn-green-hover); border-color: var(--btn-green-hover); color: #fff; transform: translateY(-2px); }
.btn-brand:disabled { opacity: .55; cursor: not-allowed; }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; border: 1px solid var(--hairline-strong); color: var(--text-soft);
    padding: 10px 22px; font-family: var(--nav-font); font-size: .9rem; font-weight: 600;
    border-radius: 8px; cursor: pointer; transition: all .25s ease;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--emerald); color: var(--text-strong); }

.btn-gold {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); color: var(--gold-deep);
    padding: 10px 22px; font-family: var(--nav-font); font-size: .9rem; font-weight: 600;
    border-radius: 8px; cursor: pointer; transition: all .25s ease;
}
.btn-gold:hover { background: var(--gold-soft); border-color: var(--gold); }

.btn-sm { padding: 7px 14px; font-size: .82rem; }

/* ---------- Cards ---------- */
.du-card {
    background: var(--surface-color); border: 1px solid var(--hairline);
    border-radius: 16px; padding: 24px; transition: border-color .25s;
}
.du-card:hover { border-color: rgba(34, 197, 94, .25); }
.du-card .card-title { font-family: var(--nav-font); font-size: .95rem; font-weight: 600; color: var(--text-strong); margin: 0 0 4px; }
.du-card .card-sub { font-size: .8rem; color: var(--text-muted); margin: 0; }
.du-glow { box-shadow: var(--glow); }

/* Grid helper */
.du-grid { display: grid; gap: 16px; }
/* Grid children default to min-width:auto and refuse to shrink below their content,
   so one long readonly input (a guest link) can blow a 1fr track past the viewport.
   This lets tracks size to the container instead. */
.du-grid > * { min-width: 0; }
.du-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.du-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.du-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 992px) { .du-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .du-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .du-grid.cols-4, .du-grid.cols-3, .du-grid.cols-2 { grid-template-columns: 1fr; } }

/* Stat tiles */
.du-stat .stat-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: rgba(34, 197, 94, .12); color: var(--emerald);
    font-size: 1.2rem; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.du-stat.gold .stat-icon { background: var(--gold-soft); color: var(--gold); }
.du-stat .stat-value { font-family: var(--nav-font); font-variant-numeric: tabular-nums; font-size: 1.7rem; font-weight: 700; color: var(--text-strong); line-height: 1.1; }
.du-stat .stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.du-stat .stat-delta { font-family: var(--nav-font); font-size: .78rem; font-weight: 600; margin-top: 10px; display: inline-flex; align-items: center; gap: 4px; }
.stat-delta.up { color: var(--status-good-text); }
.stat-delta.down { color: var(--status-bad-text); }

/* Badges */
.du-badge {
    display: inline-block; font-family: var(--nav-font); font-size: .72rem; font-weight: 600;
    letter-spacing: .4px; padding: 3px 11px; border-radius: 20px; border: 1px solid transparent; white-space: nowrap;
}
.du-badge.good { color: var(--status-good-text); background: rgba(34, 197, 94, .1);  border-color: rgba(34, 197, 94, .3); }
.du-badge.warn { color: var(--status-warn-text); background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .3); }
.du-badge.bad  { color: var(--status-bad-text);  background: rgba(239, 68, 68, .1);  border-color: rgba(239, 68, 68, .3); }
.du-badge.info { color: var(--status-info-text); background: rgba(56, 189, 248, .1); border-color: rgba(56, 189, 248, .3); }
.du-badge.gold { color: var(--gold-deep); background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.du-badge.neutral { color: var(--text-muted); background: var(--hover-bg); border-color: var(--hairline-strong); }

/* Tables */
.du-table { width: 100%; border-collapse: collapse; }
.du-table th {
    text-align: left; font-family: var(--nav-font); font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .8px; color: var(--text-faint);
    padding: 10px 14px; border-bottom: 1px solid var(--hairline-strong); white-space: nowrap;
}
.du-table td { padding: 13px 14px; font-size: .88rem; color: var(--text-soft); border-bottom: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
.du-table td.strong { color: var(--text-strong); font-weight: 500; }
.du-table tbody tr { transition: background .15s; }
.du-table tbody tr:hover { background: rgba(34, 197, 94, .04); }
.du-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 991px) { .du-table-wrap { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; } }

/* Inputs */
.du-input, .du-select {
    background: var(--input-bg); border: 1px solid var(--input-border); color: var(--text-strong);
    padding: 12px 14px; border-radius: 12px; font-family: var(--nav-font); font-size: .9rem; width: 100%;
    transition: border-color .2s, box-shadow .2s;
}
.du-input:focus, .du-select:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(34, 197, 94, .15); }
.du-input::placeholder { color: var(--placeholder); }
.du-field { margin-bottom: 16px; }
.du-field label { display: block; font-family: var(--nav-font); font-size: .82rem; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.du-field .hint { font-size: .76rem; color: var(--text-faint); margin-top: 5px; }

/* Section label */
.du-label { font-family: var(--nav-font); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--text-faint); }
.du-eyebrow { font-family: var(--nav-font); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--emerald); }

/* Page header */
.du-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.du-page-head h1 { font-size: 1.7rem; margin: 6px 0 4px; }
.du-page-head p { margin: 0; color: var(--text-muted); font-size: .92rem; }
/* Multi-button action clusters in a page head must wrap on narrow screens, or a row
   of three buttons pushes past the viewport instead of stacking. */
.du-page-head .d-flex { flex-wrap: wrap; }
@media (max-width: 380px) { .du-page-head h1 { font-size: 1.45rem; } }

/* Festive hairline ribbon (green to gold) - the differentiator, used once at the top of a page/card */
.du-ribbon { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent-color), var(--emerald) 45%, var(--gold)); }

/* ---------- Auth pages ---------- */
.du-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.du-auth-card {
    width: 100%; max-width: 410px;
    background: var(--surface-color); border: 1px solid var(--hairline);
    border-radius: 18px; padding: 34px; box-shadow: var(--shadow-lg);
}
html[data-theme="dark"] .du-auth-card { box-shadow: var(--shadow-lg), var(--glow); }
.du-auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 24px; }
.du-auth-brand .wordmark { font-family: var(--heading-font); font-weight: 700; font-size: 1.3rem; color: var(--text-strong); }
.du-auth-brand .wordmark .dot { color: var(--emerald); }
.du-auth-brand .wordmark .fest { color: var(--gold); }
.du-auth h1 { font-size: 1.4rem; text-align: center; margin: 0 0 6px; }
.du-auth .sub { text-align: center; color: var(--text-muted); font-size: .9rem; margin: 0 0 22px; }
.du-auth .alt { text-align: center; font-size: .86rem; color: var(--text-muted); margin-top: 20px; }
.du-check { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: var(--text-soft); margin-bottom: 16px; cursor: pointer; }
.du-check input { accent-color: var(--emerald); width: 16px; height: 16px; }

/* ---------- Form validation (ASP.NET) ---------- */
.validation-summary-valid { display: none; }
.validation-summary-errors {
    color: var(--status-bad-text); background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .25); border-radius: 10px;
    padding: 10px 14px; margin-bottom: 16px; font-size: .85rem;
}
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.field-validation-error { display: block; color: var(--status-bad-text); font-size: .78rem; margin-top: 5px; }
.input-validation-error { border-color: var(--status-bad) !important; box-shadow: 0 0 0 3px rgba(239, 68, 68, .12) !important; }

/* ---------- Empty state ---------- */
.du-empty { text-align: center; padding: 56px 24px; }
.du-empty .ico {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 18px;
    display: grid; place-items: center; font-size: 1.8rem;
    background: rgba(34, 197, 94, .1); color: var(--emerald);
}
.du-empty h2 { font-size: 1.2rem; margin: 0 0 6px; }
.du-empty p { color: var(--text-muted); font-size: .92rem; max-width: 42ch; margin: 0 auto 20px; }

/* ---------- Photo grid ---------- */
.du-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.du-photo-grid a { display: block; position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.du-photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.du-photo-grid a:hover img { transform: scale(1.04); }
.du-photo-grid .src {
    position: absolute; top: 6px; left: 6px; font-family: var(--nav-font);
    font-size: .62rem; font-weight: 600; padding: 2px 7px; border-radius: 20px;
    background: rgba(0,0,0,.55); color: #fff; letter-spacing: .3px;
}
.du-photo-item { position: relative; }
.du-photo-del { position: absolute; top: 6px; right: 6px; z-index: 2; margin: 0; opacity: 0; transition: opacity .15s; }
.du-photo-item:hover .du-photo-del, .du-photo-del:focus-within { opacity: 1; }
.du-photo-del button {
    background: rgba(0,0,0,.6); color: #fff; border: 0; width: 30px; height: 30px;
    border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem;
}
.du-photo-del button:hover { background: var(--status-bad); }

/* Bulk selection */
.du-bulkbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 14px; margin-bottom: 12px; position: sticky; top: 8px; z-index: 15;
    background: var(--surface-color); border: 1px solid var(--hairline); border-radius: 12px;
}
.du-bulkbar .count { font-family: var(--nav-font); font-size: .85rem; color: var(--text-soft); }
.du-bulkbar .count strong { color: var(--emerald); }
.du-bulkbar .spacer { flex: 1; }

.du-photo-check {
    position: absolute; top: 6px; left: 6px; z-index: 3; margin: 0; cursor: pointer;
    opacity: 0; pointer-events: none; transition: opacity .15s;
}
.du-photo-grid.is-selecting .du-photo-check { opacity: 1; pointer-events: auto; }
/* Visually hidden but still focusable and exposed to screen readers, so the grid stays
   keyboard-operable. A 0x0 input gets pruned from the accessibility tree. */
.du-photo-check input {
    position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0;
    clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.du-photo-check .box {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 7px; font-size: .9rem;
    background: rgba(0,0,0,.55); border: 1.5px solid rgba(255,255,255,.7); color: transparent;
}
.du-photo-check input:checked + .box { background: var(--btn-green); border-color: var(--btn-green); color: #fff; }
.du-photo-check input:focus-visible + .box { outline: 2px solid var(--emerald); outline-offset: 2px; }

/* Selecting hides the per-tile trash and drops the status pill below the checkbox. */
.du-photo-grid.is-selecting .du-photo-del { display: none; }
.du-photo-grid.is-selecting .src { top: 38px; }
.du-photo-item.is-selected a { outline: 3px solid var(--btn-green); outline-offset: -3px; }
#du-select-toggle.is-active { border-color: var(--emerald); color: var(--text-strong); }

.btn-danger {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; border: 1px solid color-mix(in srgb, var(--status-bad) 55%, transparent);
    color: var(--status-bad-text);
    padding: 10px 22px; font-family: var(--nav-font); font-size: .9rem; font-weight: 600;
    border-radius: 8px; cursor: pointer; transition: all .25s ease;
}
.btn-danger:hover:not(:disabled) { background: var(--status-bad); border-color: var(--status-bad); color: #fff; }
.btn-danger:disabled { opacity: .45; cursor: not-allowed; }

.du-flash {
    display: flex; align-items: center; gap: 9px;
    padding: 11px 15px; border-radius: 11px; font-size: .87rem; color: var(--text-strong);
    background: color-mix(in srgb, var(--emerald) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--emerald) 35%, transparent);
}
.du-flash i { color: var(--emerald); }

/* Upload dropzone */
.du-drop {
    border: 1.5px dashed var(--hairline-strong); border-radius: 14px;
    padding: 40px 24px; text-align: center; background: var(--surface-deep);
    transition: border-color .2s, background .2s; cursor: pointer;
}
.du-drop:hover { border-color: var(--emerald); }
.du-drop .ico { font-size: 2rem; color: var(--emerald); margin-bottom: 10px; }
.du-drop input[type=file] { display: block; margin: 14px auto 0; color: var(--text-soft); font-family: var(--nav-font); font-size: .85rem; }
.du-drop .files { margin-top: 12px; font-size: .82rem; color: var(--text-muted); }

/* ---------- Guest (public) pages ---------- */
.du-guest-top {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px clamp(16px, 4vw, 32px); border-bottom: 1px solid var(--hairline);
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--background-color) 88%, transparent); backdrop-filter: blur(8px);
}
.du-guest-top .brand { display: flex; align-items: center; gap: 9px; }
.du-guest-top .wordmark { font-family: var(--heading-font); font-weight: 700; font-size: 1.15rem; color: var(--text-strong); }
.du-guest-top .wordmark .dot { color: var(--emerald); }
.du-guest-top .wordmark .fest { color: var(--gold); }
.du-guest-wrap { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px) 64px; }
.du-guest-hero { text-align: center; padding: 46px 0 26px; }
.du-guest-hero .eyebrow { font-family: var(--nav-font); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); }
.du-guest-hero h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 10px 0 8px; text-wrap: balance; }
.du-guest-hero p { color: var(--text-muted); margin: 0; }
.du-guest-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 24px 0 6px; }
.du-guest-note { font-size: .82rem; color: var(--text-faint); }
.du-guest-banner { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.3); border-radius: 14px; padding: 14px 18px; text-align: center; margin-bottom: 22px; color: var(--text-soft); font-size: .9rem; }
.du-guest-foot { text-align: center; color: var(--text-faint); font-size: .78rem; padding: 30px 0 0; }
.du-guest-card { max-width: 460px; margin: 8px auto 0; }
.btn-lg { padding: 14px 30px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Responsive sidebar ---------- */
@media (max-width: 992px) {
    .du-sidebar { transform: translateX(-100%); }
    html[dir="rtl"] .du-sidebar { transform: translateX(100%); }
    .du-sidebar.open { transform: translateX(0); }
    .du-main { margin-inline-start: 0; }
    .du-hamburger { display: inline-flex; }
    .du-content { padding: 20px 16px; }

    /* The mini-rail width override is desktop-only; off-canvas owns mobile. Without
       this a phone loaded while collapsed would render a 74px sidebar stub. */
    html[data-sidebar="mini"] { --sidebar-width: 260px; }

    /* Horizontal button rows inside cards must wrap rather than run off the edge:
       a three-button footer overflows a narrow card otherwise. */
    .du-card .d-flex.gap-2, .du-card .d-flex.gap-3 { flex-wrap: wrap; }

    .du-topbar-inner { gap: 10px; padding: 0 14px; }

    /* Anchor the typeahead to the viewport, not to a search box that is now narrow. */
    .du-search-drop {
        position: fixed;
        inset-inline: 12px;
        top: calc(var(--topbar-height) + 6px);
        min-width: 0;
    }
}

/* Phones: the topbar title is the one thing that can go, because every page repeats
   it as its own <h1> two rows further down. */
@media (max-width: 700px) {
    .du-page-title { display: none; }
    .du-search { flex: 1 1 auto; }
}

@media (max-width: 420px) {
    .du-topbar-inner { gap: 8px; padding: 0 10px; }
    .du-search { padding: 8px 11px; }
    .du-content { padding: 18px 13px; }
}

/* ---------- Landing page ---------- */
.du-land { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 28px); }

.du-land-nav {
    display: flex; align-items: center; gap: 22px; padding: 20px 0 12px; flex-wrap: wrap;
}
.du-land-nav .brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.du-land-nav .wordmark { font-family: var(--heading-font); font-weight: 700; font-size: 1.15rem; color: var(--text-strong); }
.du-land-nav .wordmark .dot { color: var(--emerald); }
.du-land-nav .wordmark .fest { color: var(--gold); }
.du-land-nav nav { display: flex; gap: 20px; margin-inline-start: auto; }
.du-land-nav nav a { color: var(--text-soft); text-decoration: none; font-size: .88rem; font-family: var(--nav-font); }
.du-land-nav nav a:hover { color: var(--emerald); }
.du-land-nav .actions { display: flex; gap: 10px; }
@media (max-width: 820px) { .du-land-nav nav { display: none; } .du-land-nav .actions { margin-inline-start: auto; } }

.du-hero { text-align: center; padding: clamp(48px, 9vw, 96px) 0 56px; }
.du-hero h1 {
    font-family: var(--heading-font); font-weight: 700; letter-spacing: -.02em;
    font-size: clamp(2.1rem, 5.4vw, 3.6rem); line-height: 1.12; margin: 18px 0 0; color: var(--text-strong);
}
.du-hero h1 em { font-style: normal; color: var(--emerald); }
.du-hero .lede { max-width: 680px; margin: 20px auto 0; color: var(--text-soft); font-size: 1.05rem; line-height: 1.65; }
.du-hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.du-hero .fineprint { margin-top: 16px; font-size: .82rem; color: var(--text-muted); }

.du-land-strip {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px;
    padding: 24px; border-radius: 16px; background: var(--surface-deep); border: 1px solid var(--hairline);
}
.du-land-strip div { text-align: center; }
.du-land-strip strong { display: block; font-family: var(--heading-font); font-size: 1.2rem; color: var(--emerald); }
.du-land-strip span { font-size: .82rem; color: var(--text-muted); }

.du-land-section { padding: clamp(56px, 8vw, 92px) 0; }
.du-land-section.alt { border-block: 1px solid var(--hairline); }
.du-land-section h2 {
    font-family: var(--heading-font); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem);
    color: var(--text-strong); margin: 6px 0 0; letter-spacing: -.01em;
}
.du-land-section .section-lede { max-width: 620px; color: var(--text-soft); margin: 14px 0 0; line-height: 1.6; }

.du-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 32px; }
.du-steps article { background: var(--surface-color); border: 1px solid var(--hairline); border-radius: 14px; padding: 22px; }
.du-steps .n {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
    border-radius: 9px; background: color-mix(in srgb, var(--emerald) 15%, transparent);
    color: var(--emerald); font-family: var(--heading-font); font-weight: 700; margin-bottom: 12px;
}
.du-steps h3, .du-featgrid h3 { font-family: var(--nav-font); font-size: .98rem; font-weight: 600; color: var(--text-strong); margin: 0 0 6px; }
.du-steps p, .du-featgrid p { font-size: .87rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

.du-featgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 32px; }
.du-featgrid article { background: var(--surface-color); border: 1px solid var(--hairline); border-radius: 14px; padding: 22px; }
.du-featgrid i { font-size: 1.4rem; color: var(--emerald); display: block; margin-bottom: 12px; }

.du-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 34px; align-items: start; }
.du-pricing article {
    position: relative; background: var(--surface-color); border: 1px solid var(--hairline);
    border-radius: 16px; padding: 26px 22px; display: flex; flex-direction: column; gap: 12px;
}
.du-pricing article.featured { border-color: color-mix(in srgb, var(--emerald) 45%, transparent); box-shadow: var(--glow); }
.du-pricing .ribbon {
    position: absolute; top: -11px; inset-inline-start: 22px; background: var(--btn-green); color: #fff;
    font-size: .68rem; font-weight: 700; letter-spacing: .4px; padding: 4px 11px; border-radius: 20px;
    font-family: var(--nav-font); text-transform: uppercase;
}
.du-pricing h3 { font-family: var(--heading-font); font-size: 1.15rem; color: var(--text-strong); margin: 0; }
.du-pricing .tag { font-size: .82rem; color: var(--text-muted); margin: 0; min-height: 2.4em; line-height: 1.5; }
.du-pricing .price { display: flex; align-items: baseline; gap: 3px; font-family: var(--heading-font); }
.du-pricing .cur { font-size: 1.1rem; color: var(--text-soft); }
.du-pricing .amt { font-size: 2.1rem; font-weight: 700; color: var(--text-strong); }
.du-pricing .per { font-size: .8rem; color: var(--text-muted); margin-inline-start: 4px; font-family: var(--nav-font); }
.du-pricing .storage { font-size: .85rem; color: var(--emerald); font-weight: 600; font-family: var(--nav-font); }
.du-pricing ul { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 8px; }
.du-pricing li { font-size: .84rem; color: var(--text-soft); display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.du-pricing li i { color: var(--emerald); flex: none; }
.du-pricing a { justify-content: center; margin-top: auto; }

.du-onceoff { margin-top: 22px; border: 1px dashed var(--hairline-strong); border-radius: 16px; background: var(--surface-deep); }
.du-onceoff .inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px; }
.du-onceoff h3 { font-family: var(--heading-font); font-size: 1.1rem; color: var(--text-strong); margin: 4px 0 6px; }
.du-onceoff p { font-size: .87rem; color: var(--text-muted); margin: 0; max-width: 620px; line-height: 1.6; }
.du-onceoff a { margin-inline-start: auto; }

.du-faq { margin-top: 28px; display: grid; gap: 10px; max-width: 780px; }
.du-faq details { background: var(--surface-color); border: 1px solid var(--hairline); border-radius: 12px; padding: 16px 18px; }
.du-faq summary { cursor: pointer; font-family: var(--nav-font); font-weight: 600; font-size: .92rem; color: var(--text-strong); }
.du-faq p { margin: 12px 0 0; font-size: .87rem; color: var(--text-muted); line-height: 1.65; }

.du-land-final { text-align: center; padding: clamp(56px, 8vw, 88px) 0; }
.du-land-final h2 { font-family: var(--heading-font); font-size: clamp(1.5rem, 3.2vw, 2.2rem); color: var(--text-strong); margin: 0; }
.du-land-final p { color: var(--text-soft); margin: 14px 0 24px; }

.du-land-foot { border-top: 1px solid var(--hairline); padding: 28px 0 40px; text-align: center; }
.du-land-foot .brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.du-land-foot .wordmark { font-family: var(--heading-font); font-weight: 700; color: var(--text-strong); }
.du-land-foot .wordmark .dot { color: var(--emerald); }
.du-land-foot .wordmark .fest { color: var(--gold); }
.du-land-foot p { font-size: .84rem; color: var(--text-muted); margin: 4px 0; }
.du-land-foot .small { font-size: .76rem; }

/* ---------- Admin + billing primitives ---------- */
.du-statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.du-statgrid .v { font-family: var(--heading-font); font-size: 1.9rem; font-weight: 700; color: var(--text-strong); line-height: 1.1; }
.du-statgrid .v.gold { color: var(--gold-deep); }
.du-statgrid .k { font-family: var(--nav-font); font-size: .85rem; color: var(--text-soft); margin-top: 2px; }
.du-statgrid .s { font-size: .76rem; color: var(--text-muted); margin-top: 4px; }

.du-section-title { font-family: var(--heading-font); font-size: 1.05rem; color: var(--text-strong); margin: 0 0 12px; }

.du-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.du-table th {
    text-align: start; font-family: var(--nav-font); font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted);
    padding: 0 12px 10px 0; border-bottom: 1px solid var(--hairline);
}
.du-table td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--hairline); color: var(--text-soft); vertical-align: middle; }
.du-table tr:last-child td { border-bottom: 0; }
.du-table a { color: var(--text-strong); font-weight: 500; }
.du-table a:hover { color: var(--emerald); }
.du-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; color: var(--text-muted); }
.du-tablewrap { overflow-x: auto; }

.du-meter { height: 8px; border-radius: 20px; background: var(--hover-bg); overflow: hidden; }
.du-meter span { display: block; height: 100%; background: var(--btn-green); border-radius: 20px; transition: width .3s; }
.du-meter span.warn { background: var(--status-warn); }
.du-meter span.bad { background: var(--status-bad); }

.du-hint { font-size: .82rem; color: var(--text-muted); }
.du-hint.warn { color: var(--status-warn-text); }
.du-hint.bad { color: var(--status-bad-text); }

.du-flash.warn { background: color-mix(in srgb, var(--status-warn) 12%, transparent); border-color: color-mix(in srgb, var(--status-warn) 35%, transparent); }
.du-flash.warn i { color: var(--status-warn-text); }
.du-flash.bad { background: color-mix(in srgb, var(--status-bad) 12%, transparent); border-color: color-mix(in srgb, var(--status-bad) 35%, transparent); }
.du-flash.bad i { color: var(--status-bad-text); }

.du-searchbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.du-searchbar input[type=search], .du-searchbar select {
    background: var(--input-bg); border: 1px solid var(--input-border); color: var(--default-color);
    border-radius: 9px; padding: 9px 13px; font-size: .88rem; font-family: var(--nav-font); min-width: 240px;
}
.du-searchbar input[type=search]::placeholder { color: var(--placeholder); }

/* Admin sub-navigation: one row of tabs under the page head. */
.du-adminnav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--hairline); }
.du-adminnav a {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px;
    font-family: var(--nav-font); font-size: .86rem; color: var(--text-muted);
    text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.du-adminnav a:hover { color: var(--text-strong); }
.du-adminnav a.active { color: var(--emerald); border-bottom-color: var(--emerald); font-weight: 600; }

/* Tickable role list. Auto-fits so a handful of roles do not stretch to full width. */
.du-checkgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.du-checkgrid label {
    display: flex; align-items: center; gap: 10px; padding: 11px 13px;
    border: 1px solid var(--input-border); border-radius: 10px; background: var(--input-bg);
    font-size: .88rem; color: var(--text-soft); cursor: pointer;
}
.du-checkgrid label:hover { border-color: color-mix(in srgb, var(--emerald) 35%, var(--input-border)); }
.du-checkgrid input { accent-color: var(--btn-green); width: 16px; height: 16px; }

/* Compact key/value readout for the health panel. */
.du-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.du-kv > div { padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 11px; }
.du-kv .n { font-family: var(--heading-font); font-size: 1.3rem; color: var(--text-strong); line-height: 1.1; }
.du-kv .n.warn { color: var(--status-warn-text); }
.du-kv .n.bad { color: var(--status-bad-text); }
.du-kv .l { font-size: .78rem; color: var(--text-muted); margin-top: 3px; }

.du-rolechip {
    display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem;
    font-family: var(--nav-font); background: var(--hover-bg); color: var(--text-soft); margin-right: 4px;
}
.du-rolechip.admin { background: color-mix(in srgb, var(--accent-color) 18%, transparent); color: var(--emerald); }

/* Monthly / yearly billing period toggle. A container carries data-period="m|y";
   anything inside marked .only-m / .only-y shows only in its period. Works with plain
   CSS so Turbo swaps and the marketing page (no Turbo) behave identically. */
.du-period-toggle {
    display: inline-flex; align-items: center; gap: 2px;
    border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 4px;
    background: var(--input-bg);
}
.du-period-toggle button {
    border: 0; background: none; cursor: pointer;
    color: var(--text-muted); font-family: var(--nav-font);
    font-size: .82rem; font-weight: 600;
    padding: 7px 16px; border-radius: 999px;
    transition: background .2s, color .2s;
}
.du-period-toggle .chip {
    font-size: .68rem; font-weight: 700; color: var(--gold-deep);
    background: var(--gold-soft); border-radius: 999px; padding: 2px 7px; margin-inline-start: 6px;
}
[data-period="m"] .du-period-toggle [data-period-set="m"],
[data-period="y"] .du-period-toggle [data-period-set="y"] { background: var(--btn-green); color: #fff; }
[data-period="y"] .du-period-toggle [data-period-set="y"] .chip { color: #fff; background: rgba(255,255,255,.18); }
[data-period="m"] .only-y { display: none !important; }
[data-period="y"] .only-m { display: none !important; }

/* ---------- Lightbox ---------- */
html.du-lightbox-open { overflow: hidden; }
.du-lightbox {
    position: fixed; inset: 0; z-index: 2000; display: none;
    background: color-mix(in srgb, var(--background-color) 88%, transparent);
    backdrop-filter: blur(14px);
}
.du-lightbox.open { display: block; animation: lb-in .18s ease; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.du-lightbox figure {
    position: absolute; inset: 0; margin: 0; display: flex;
    align-items: center; justify-content: center; padding: clamp(16px, 4vw, 56px);
    pointer-events: none;
}
.du-lightbox img {
    max-width: 100%; max-height: 100%; border-radius: 12px;
    box-shadow: var(--shadow-lg); pointer-events: auto;
}
.du-lightbox .lb-btn {
    position: absolute; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--hairline-strong);
    background: color-mix(in srgb, var(--surface-color) 80%, transparent);
    color: var(--text-strong); font-size: 1.15rem; cursor: pointer;
    transition: background .2s, transform .15s;
}
.du-lightbox .lb-btn:hover { background: var(--surface-color); transform: scale(1.06); }
.du-lightbox .lb-close { top: 18px; inset-inline-end: 18px; }
.du-lightbox .lb-prev { inset-inline-start: 14px; top: 50%; transform: translateY(-50%); }
.du-lightbox .lb-next { inset-inline-end: 14px; top: 50%; transform: translateY(-50%); }
.du-lightbox .lb-prev:hover, .du-lightbox .lb-next:hover { transform: translateY(-50%) scale(1.06); }
.du-lightbox .lb-bar {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 14px; padding: 8px 16px; border-radius: 999px;
    background: color-mix(in srgb, var(--surface-color) 85%, transparent);
    border: 1px solid var(--hairline-strong);
    font-family: var(--nav-font); font-size: .82rem; color: var(--text-soft);
}
.du-lightbox .lb-bar .lb-count { font-variant-numeric: tabular-nums; }
.du-lightbox .lb-bar .lb-orig { color: var(--emerald); text-decoration: none; }
@media (max-width: 640px) {
    .du-lightbox .lb-prev { inset-inline-start: 6px; }
    .du-lightbox .lb-next { inset-inline-end: 6px; }
    .du-lightbox figure { padding: 8px 8px 64px; }
}

/* Turbo Drive's navigation progress bar, in family green. Shown only when a visit
   takes longer than ~500ms, so quick hops stay chrome-free. */
.turbo-progress-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--emerald));
    box-shadow: 0 0 12px color-mix(in srgb, var(--accent-color) 60%, transparent);
}
