/* =============================================================================
   Tutorial Flota Curieri — dark theme matching flotacurieri.ro
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Warm "Cristina golden hour" palette — cream blazer, dark hair, warm office */
    --bg:           #14110c;   /* deep coffee */
    --bg-2:         #1c1812;
    --bg-card:      #221d14;
    --bg-card-hi:   #2c2418;
    --border:       #3a2f1f;
    --border-hi:    #4d3e2a;

    --text:         #f7ecd6;   /* warm cream */
    --text-soft:    #ddccab;
    --text-muted:   #9a8669;
    --text-dim:     #6e5d44;

    /* Honey/cream gradient inspired by Cristina's blazer */
    --brand:        #d4a574;
    --brand-2:      #c8915e;
    --brand-3:      #e8c08c;
    --brand-glow:   rgba(212, 165, 116, 0.4);

    /* Warm accents */
    --peach:        #e8a07a;
    --terracotta:   #c97f5a;
    --warm-green:   #8fa67a;
    --warn:         #e8b34f;
    --danger:       #e07d6f;

    --gradient-brand:    linear-gradient(135deg, #e8c08c 0%, #d4a574 50%, #c8915e 100%);
    --gradient-brand-hi: linear-gradient(135deg, #f0d4a0 0%, #e8c08c 50%, #d4a574 100%);
    --gradient-warn:     linear-gradient(135deg, #e8b34f 0%, #c97f5a 100%);

    --shadow-sm:  0 1px 2px rgba(0,0,0,0.45);
    --shadow:     0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:  0 12px 44px rgba(0,0,0,0.55);

    --radius-sm:  8px;
    --radius:     14px;
    --radius-lg:  20px;
    --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

@media (min-width: 720px) {
    html, body { font-size: 17px; }
}

body {
    /* Golden hour background — warm cream/peach glow from top-left.
       NOT fixed (background-attachment: fixed kills scroll perf). */
    background:
        radial-gradient(ellipse 80% 55% at 15% 0%, rgba(232, 192, 140, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 85% 25%, rgba(232, 160, 122, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 50% 110%, rgba(201, 127, 90, 0.05) 0%, transparent 60%),
        var(--bg);
}
body.bg-white { background: var(--bg); }

h1, h2, h3, h4 {
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.625rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--text-soft); }
a { color: var(--brand); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand-3); }

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.875rem; }
.strong { font-weight: 600; color: var(--text); }
.center { text-align: center; }
.hidden { display: none !important; }
.err { color: #ff8794; }
.ok-text { color: var(--brand); font-weight: 600; }
.sr-only { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.py-3 { padding: 1rem 0; }
.mb-4 { margin-bottom: 1.5rem; }

/* =============================================================================
   Layout
   ============================================================================= */
.page { min-height: 100vh; padding: 0 0 3rem; }
.center-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1.5rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container.narrow { max-width: 760px; }
.container.reading { max-width: 820px; }

/* =============================================================================
   Cards
   ============================================================================= */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}
.card.no-pad { padding: 0; }
.card.narrow { max-width: 460px; width: 100%; }
.card.center { text-align: center; }
@media (min-width: 640px) { .card { padding: 2rem; } }

/* Landing intro lead */
.lead-title {
    font-size: clamp(1.85rem, 5vw, 2.5rem);
    margin-bottom: 0.5rem;
}
.lead-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* =============================================================================
   Chips / Pills
   ============================================================================= */
.chip {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
    background: rgba(212, 165, 116, 0.12);
    color: var(--brand);
    border: 1px solid rgba(212, 165, 116, 0.2);
}
.chip::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
    box-shadow: 0 0 8px var(--brand);
}

/* =============================================================================
   Buttons
   ============================================================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0.65rem 1.5rem;
    border-radius: var(--radius);
    font-family: inherit; font-size: 0.95rem; font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer; text-decoration: none !important;
    transition: transform 0.1s, box-shadow 0.2s, opacity 0.15s, background 0.2s, border-color 0.2s;
    text-align: center; box-sizing: border-box; line-height: 1;
}
.btn:disabled, .btn.disabled-look {
    opacity: 0.45; cursor: not-allowed;
    box-shadow: none !important; transform: none !important;
}
.btn:active:not(:disabled):not(.disabled-look) { transform: translateY(1px); }

.btn-primary {
    background: var(--gradient-brand);
    color: #2d1f10; border: none;
    box-shadow: 0 4px 18px var(--brand-glow);
    font-weight: 700;
}
.btn-primary:hover:not(:disabled):not(.disabled-look) {
    background: var(--gradient-brand-hi);
    box-shadow: 0 6px 26px var(--brand-glow), 0 0 0 1px var(--brand-3);
}

.btn-secondary {
    background: var(--bg-card-hi); color: var(--text);
    border-color: var(--border-hi);
}
.btn-secondary:hover:not(:disabled) {
    background: #3a2f1f; border-color: var(--brand);
}

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #c96959; }

.btn-link { background: transparent; border: none; color: var(--text-soft); padding: 0.5rem 0.75rem; }
.btn-link:hover { color: var(--text); text-decoration: underline; }
.btn-link-danger { background: transparent; border: none; color: #ff8794; padding: 0.25rem 0.5rem; cursor: pointer; font-size: 0.9rem; font-weight: 600; }
.btn-link-danger:hover { color: #ffb3bc; text-decoration: underline; }

.btn-block { display: flex; width: 100%; }
.btn-lg { font-size: 1.05rem; min-height: 56px; padding: 0.875rem 2.25rem; }
.btn-mini { min-height: 32px; padding: 0.3rem 0.7rem; font-size: 0.8rem; border-radius: var(--radius-sm); }

.start-row { display: flex; flex-direction: column; gap: 0.75rem; align-items: center; margin: 1.5rem 0 1rem; }

/* Pulse animation when the Next button becomes available */
@keyframes btn-pulse {
    0%   { box-shadow: 0 4px 18px var(--brand-glow), 0 0 0 0 rgba(232, 192, 140, 0.55); }
    70%  { box-shadow: 0 4px 18px var(--brand-glow), 0 0 0 12px rgba(232, 192, 140, 0); }
    100% { box-shadow: 0 4px 18px var(--brand-glow), 0 0 0 0 rgba(232, 192, 140, 0); }
}
.btn-pulse { animation: btn-pulse 1.4s ease-out 2; }

/* =============================================================================
   Top progress (Pas X / 5) + per-step reading progress
   ============================================================================= */
.progress-bar {
    position: sticky; top: 0; z-index: 30;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0 0;
}
.progress-meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.85rem; margin-bottom: 0.55rem; gap: 0.5rem;
}
.progress-meta .strong {
    background: var(--gradient-brand);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    font-weight: 700; font-size: 0.95rem;
}
.progress-track {
    height: 6px; background: rgba(255,255,255,0.06);
    border-radius: var(--radius-pill); overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--gradient-brand);
    border-radius: var(--radius-pill);
    transition: width 0.6s cubic-bezier(0.34, 1.2, 0.64, 1);
    box-shadow: 0 0 14px var(--brand-glow);
}

/* Mini reading progress (within current step) */
.reading-track {
    height: 2px;
    background: transparent;
    margin-top: 0.4rem;
    overflow: hidden;
}
.reading-fill {
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--brand) 50%, var(--brand-3));
    width: 0%;
    transition: width 0.15s ease-out;
    border-radius: var(--radius-pill);
}

/* =============================================================================
   Video
   ============================================================================= */
/* Video wrapper — adapts to the video's intrinsic aspect ratio
   (16:9, 1:1, 9:16 portrait, etc). On mobile portrait, a 9:16 video
   fills nearly the full screen height for a near-fullscreen feel. */
.video-wrap {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 auto 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
    line-height: 0;
}
.video-wrap video {
    display: inline-block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    vertical-align: top;
}
/* Video-only step (no text below) — video gets even more vertical room */
.video-only .video-wrap { margin-bottom: 0.5rem; }
.video-only .video-wrap video { max-height: 85vh; }

.video-only-hint {
    text-align: center; color: var(--text-muted);
    margin-top: 1rem; font-size: 0.95rem;
}

/* =============================================================================
   Prose / Markdown
   ============================================================================= */
.prose { color: var(--text-soft); line-height: 1.75; font-size: 1.02rem; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose h2 {
    color: var(--text);
    margin: 1.75em 0 0.6em;
    font-size: 1.4rem;
    padding-bottom: 0.4em;
    border-bottom: 1px solid var(--border);
}
.prose h3 { color: var(--text); margin: 1.5em 0 0.55em; font-size: 1.15rem; }
.prose h4 { color: var(--text); margin: 1.25em 0 0.45em; font-size: 1.05rem; }
.prose p { margin: 0.85em 0; }
.prose ul, .prose ol { margin: 0.9em 0; padding-left: 1.5rem; }
.prose li { margin: 0.45em 0; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--brand); border-bottom: 1px solid rgba(212, 165, 116, 0.35); }
.prose a:hover { color: var(--brand-3); border-bottom-color: var(--brand-3); }
.prose code {
    background: rgba(212, 165, 116, 0.12);
    color: var(--brand-3);
    padding: 0.15em 0.45em;
    border-radius: 5px;
    font-size: 0.88em;
    border: 1px solid rgba(212, 165, 116, 0.25);
}
.prose blockquote {
    border-left: 3px solid var(--brand);
    margin: 1em 0;
    padding: 0.75em 1.25em;
    background: rgba(212, 165, 116, 0.08);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose a { color: var(--brand-3); border-bottom: 1px solid rgba(232, 192, 140, 0.35); }
.prose a:hover { color: var(--brand-3); border-bottom-color: var(--brand-3); }

/* =============================================================================
   Content chunks (progressive paragraph-by-paragraph reveal)
   Uses CSS Grid rows trick: grid-template-rows 0fr -> 1fr animates the
   natural content height smoothly (Chrome 119+, Firefox 121+, Safari 17.4+).
   Falls back gracefully on older browsers (snap, no animation).
   ============================================================================= */
.content-chunk {
    display: grid;
    grid-template-rows: 1fr;
    transition:
        grid-template-rows 0.4s ease-out,
        opacity 0.35s ease-out,
        margin 0.3s ease;
}
.content-chunk[data-reveal="pending"] {
    grid-template-rows: 0fr;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}
.content-chunk[data-reveal="revealed"] {
    grid-template-rows: 1fr;
    opacity: 1;
}
.content-chunk > .chunk-inner {
    overflow: hidden;
    min-height: 0;
}

#reveal-trigger { height: 1px; width: 100%; margin-top: 0.5rem; }

/* Subtle hint shown under the last revealed paragraph telling the user
   they need to scroll. Auto-hides after first real scroll. */
.scroll-hint {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.4rem;
    margin: 1.5rem auto 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    opacity: 0.85;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}
.scroll-hint.hidden { opacity: 0; transform: translateY(-8px); display: flex !important; }
.scroll-hint-arrow {
    font-size: 1.4rem; line-height: 1; color: var(--brand);
    animation: hint-bounce 1.8s ease-in-out infinite;
}
@keyframes hint-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50%      { transform: translateY(6px); opacity: 1; }
}

/* =============================================================================
   Step cards (numbered timeline) — replaces flat numbered Markdown lists.
   Generated by lib/markdown.php transformVisualBlocks() from patterns like
   `**1. Titlu.** Restul textului.`
   ============================================================================= */
.step-card-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.step-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    align-items: start;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.step-card:hover {
    border-color: var(--border-hi);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.step-card-num {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: #2d1f10;
    font-weight: 800; font-size: 1.05rem;
    box-shadow: 0 2px 10px var(--brand-glow);
    flex-shrink: 0;
}
.step-card-content { min-width: 0; }
.step-card-title {
    margin: 0.45rem 0 0.3rem;
    font-size: 1rem;
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
    border-bottom: 0;
    padding-bottom: 0;
}
.step-card-body {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* =============================================================================
   Callouts — non-numbered emphasis blocks for patterns like
   `**Verificare de vârstă.** La alcool și produse restricționate...`
   ============================================================================= */
.callout-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 1.5rem 0;
}
.callout-item {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 0.9rem 1.1rem;
}
.callout-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
    font-size: 0.98rem;
}
.callout-body {
    color: var(--text-soft);
    font-size: 0.93rem;
    line-height: 1.55;
}
.callout-body p { margin: 0.35em 0; }
.callout-body p:first-child { margin-top: 0; }
.callout-body p:last-child { margin-bottom: 0; }

/* Same pattern reused for the question card and step-5 checkboxes section:
   they stay hidden until all content chunks above are revealed. */
.post-content {
    display: grid;
    grid-template-rows: 1fr;
    transition:
        grid-template-rows 0.5s ease-out,
        opacity 0.4s ease-out,
        margin 0.3s ease;
    margin-top: 1rem;
}
.post-content[data-reveal="pending"] {
    grid-template-rows: 0fr;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}
.post-content[data-reveal="revealed"] {
    grid-template-rows: 1fr;
    opacity: 1;
}
.post-content > .post-inner {
    overflow: hidden;
    min-height: 0;
}

/* =============================================================================
   Verification question
   ============================================================================= */
#question-card { border-color: var(--border-hi); }
.opt-list { display: flex; flex-direction: column; gap: 0.65rem; border: none; padding: 0; margin: 0.85rem 0; }
.opt {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius);
    cursor: pointer; min-height: 48px;
    background: var(--bg-2);
    transition: background 0.15s, border-color 0.15s;
}
.opt:hover { background: var(--bg-card-hi); border-color: var(--brand); }
.opt.selected { border-color: var(--brand); background: rgba(212, 165, 116, 0.08); box-shadow: 0 0 0 1px var(--brand); }
.opt input[type="radio"] {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-dim);
    background: transparent; cursor: pointer; flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}
.opt input[type="radio"]:checked {
    border-color: var(--brand); background: var(--brand);
    box-shadow: inset 0 0 0 3px var(--bg-card);
}
.opt input[type="radio"]:disabled { opacity: 0.5; cursor: not-allowed; }
.opt span { color: var(--text-soft); font-size: 0.95rem; }
.opt.selected span { color: var(--text); }

.feedback {
    margin-top: 0.85rem; padding: 0.85rem 1.1rem;
    border-radius: var(--radius); font-size: 0.92rem;
    border: 1px solid transparent;
}
.feedback-ok   { background: rgba(143, 166, 122, 0.10); border-color: rgba(143, 166, 122, 0.35); color: #c5d4ad; }
.feedback-warn { background: rgba(232, 179, 79, 0.10); border-color: rgba(232, 179, 79, 0.35); color: #f0c878; }
.feedback-info { background: rgba(212, 165, 116, 0.10); border-color: rgba(212, 165, 116, 0.35); color: var(--brand-3); }
#question-submit { margin-top: 0.85rem; }

/* =============================================================================
   Progressive checkboxes (step 5)
   ============================================================================= */
.checkbox-list { display: flex; flex-direction: column; gap: 0.75rem; }
.checkbox-item {
    display: flex; gap: 0.85rem;
    padding: 1.1rem 1.25rem;
    background: var(--bg-2);
    border: 1px solid var(--border-hi);
    border-radius: var(--radius);
    align-items: flex-start;
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.45s ease-out, transform 0.45s ease-out, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.checkbox-item.visible { opacity: 1; transform: translateY(0); }
.checkbox-item.checked {
    background: rgba(212, 165, 116, 0.06);
    border-color: var(--brand);
    box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.2);
}
.checkbox-item input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    flex-shrink: 0; margin-top: 0.15rem;
    width: 22px; height: 22px;
    border-radius: 6px;
    border: 2px solid var(--text-dim);
    background: var(--bg);
    cursor: pointer; position: relative;
    transition: background 0.15s, border-color 0.15s;
}
.checkbox-item input[type="checkbox"]:checked {
    background: var(--gradient-brand); border-color: transparent;
}
.checkbox-item input[type="checkbox"]:checked::after {
    content: ''; position: absolute;
    left: 6px; top: 2px; width: 5px; height: 10px;
    border: solid #2d1f10; border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}
.checkbox-item label { cursor: pointer; flex: 1; color: var(--text-soft); line-height: 1.55; }
.checkbox-item.checked label { color: var(--text); }
.checkbox-item label.prose p { margin: 0; }
.checkbox-item label.prose strong { color: var(--text); }

/* =============================================================================
   Bottom navigation bar
   ============================================================================= */
.nav-bar {
    position: sticky; bottom: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 1rem 0;
}
.nav-row { display: flex; gap: 0.85rem; justify-content: space-between; align-items: center; }
.nav-spacer { display: block; width: 1px; }
.nav-feedback { margin: 0.65rem 0 0; font-size: 0.88rem; color: var(--text-muted); text-align: center; }
@media (max-width: 640px) {
    .nav-row { flex-direction: column-reverse; }
    .nav-row .btn { width: 100%; }
}

/* =============================================================================
   Rezumat
   ============================================================================= */
.rez-header { padding-bottom: 1.75rem; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.rez-header h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); margin-bottom: 0.4rem; }
.rez-section { margin-bottom: 2.5rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--border); }
.rez-section:last-of-type { border-bottom: 0; }
.rez-section h2 { font-size: clamp(1.4rem, 4vw, 1.875rem); margin-bottom: 1rem; }
.rez-list { padding-left: 1.5rem; }
.rez-list li { margin-bottom: 0.85rem; color: var(--text-soft); }
.rez-list li::marker { color: var(--brand); }
.rez-list li p { margin: 0; display: inline; }
.rez-final { text-align: center; padding-top: 1.5rem; }

/* =============================================================================
   Expired page
   ============================================================================= */
.warn-bullet {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--gradient-orange);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem; font-weight: 800;
    margin: 0 auto 1.25rem;
    box-shadow: 0 8px 24px rgba(232, 179, 79, 0.35);
}

@media print {
    body { background: #fff !important; color: #000 !important; }
    body * { color: #000 !important; }
    .no-print, .nav-bar, .progress-bar { display: none !important; }
    .rez-section { break-inside: avoid; }
    .card { border: 1px solid #ccc; box-shadow: none; }
}

/* =============================================================================
   ADMIN
   ============================================================================= */
body.admin {
    background:
        radial-gradient(circle at 5% 0%, rgba(212, 165, 116, 0.04) 0%, transparent 30%),
        var(--bg);
}

.admin-nav {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 30;
}
.admin-nav-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center; gap: 1rem;
    padding: 0.65rem 1rem; flex-wrap: wrap;
}
.admin-logo {
    font-weight: 700;
    background: var(--gradient-brand);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    font-size: 1.05rem; text-decoration: none;
}
.admin-logo:hover { text-decoration: none; }
.admin-links { display: flex; gap: 0.25rem; flex-wrap: wrap; flex: 1; }
.admin-link {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}
.admin-link:hover { background: var(--bg-card); color: var(--text); text-decoration: none; }
.admin-link.active {
    background: rgba(212, 165, 116, 0.12);
    color: var(--brand);
}
.admin-logout-form { display: flex; align-items: center; gap: 0.5rem; margin: 0; }

.admin-main { padding: 2rem 0; }
.admin-container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }

.page-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem;
}
.page-head h1 { margin: 0 0 0.25rem; }
.back-link { color: var(--brand); font-size: 0.9rem; display: inline-block; margin-bottom: 0.5rem; }

/* Stat cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    position: relative; overflow: hidden;
    transition: border-color 0.2s, transform 0.15s;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gradient-brand);
}
.stat-card:nth-of-type(2)::before { background: var(--gradient-blue); }
.stat-card:nth-of-type(3)::before { background: var(--gradient-purple); }
.stat-card:nth-of-type(4)::before { background: var(--gradient-orange); }
.stat-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text); margin-top: 0.5rem; letter-spacing: -0.02em; }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.85rem;
}
.quick-link {
    display: block;
    padding: 1.1rem 1.25rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text); text-decoration: none;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.quick-link:hover {
    border-color: var(--brand); background: var(--bg-card-hi);
    text-decoration: none; transform: translateY(-2px);
}

/* Admin tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td {
    text-align: left; padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
}
.data-table th {
    background: var(--bg-2);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.data-table tbody tr:hover { background: var(--bg-card-hi); }
.data-table tbody tr:last-child td { border-bottom: 0; }

.pill {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem; font-weight: 600;
}
.pill-ok { background: rgba(212, 165, 116, 0.12); color: var(--brand); border: 1px solid rgba(212, 165, 116, 0.25); }
.pill-muted { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }

.link { color: var(--brand); font-weight: 600; }
.link:hover { color: var(--brand-3); text-decoration: underline; }

/* Forms */
.form .card { margin-bottom: 1.25rem; }
.field { margin-bottom: 1.25rem; }
.field label, .check {
    display: block; font-size: 0.88rem; font-weight: 500;
    color: var(--text-soft); margin-bottom: 0.4rem;
}
.field label .small { color: var(--text-muted); font-weight: 400; }
.check {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-right: 1rem; cursor: pointer; margin-bottom: 0;
}
.check input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; border-radius: 5px;
    border: 2px solid var(--text-dim);
    background: transparent; cursor: pointer; position: relative;
    transition: background 0.15s, border-color 0.15s;
}
.check input[type="checkbox"]:checked { background: var(--gradient-brand); border-color: transparent; }
.check input[type="checkbox"]:checked::after {
    content: ''; position: absolute; left: 5px; top: 1px;
    width: 4px; height: 9px;
    border: solid #2d1f10; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Câmpurile se stilează după tipul controlului, NU după containerul `.field`.
   Altfel orice textarea pusă în afara unui `.field` (ex. cele din
   checkboxes.php) rămâne cu aspectul implicit de browser: albă, minusculă
   și imposibil de folosit pe o temă întunecată. */
input[type="text"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="tel"],
textarea,
select {
    display: block; width: 100%;
    min-height: 46px;
    padding: 0.65rem 0.85rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text); font-family: inherit; font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
textarea { min-height: 5.5rem; font-size: 0.92rem; line-height: 1.5; resize: vertical; }
textarea.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.88rem; }
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
    background: var(--bg-card);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
.hint { font-size: 0.82rem; color: var(--text-muted); margin: 0.4rem 0 0; }

.opt-row { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.5rem; }
.opt-row input[type="radio"] {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--text-dim); background: transparent;
    cursor: pointer; position: relative; flex-shrink: 0;
}
.opt-row input[type="radio"]:checked {
    border-color: var(--brand); background: var(--brand);
    box-shadow: inset 0 0 0 3px var(--bg-card);
}
.opt-row input[type="text"] { flex: 1; }

.form-actions { display: flex; gap: 0.85rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.5rem; }
.inline-form { display: inline-block; margin: 0; }

/* Tabs */
.tabs, .range-tabs { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; flex-wrap: wrap; }
.tab, .range-tab {
    padding: 0.65rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem; font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    text-decoration: none;
}
.tab:hover, .range-tab:hover { color: var(--text); text-decoration: none; }
.tab.active, .range-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.range-tabs { border: none; gap: 0.5rem; margin: 0; }
.range-tab {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    padding: 0.45rem 0.85rem;
}
.range-tab.active {
    background: var(--gradient-brand); color: #2d1f10; border-color: transparent;
}

/* Checkbox editor */
.cb-list { display: flex; flex-direction: column; gap: 0.75rem; }
.cb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; flex-wrap: wrap; gap: 0.6rem; }
.cb-num { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.cb-actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }

/* Flash messages */
.flash {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    font-size: 0.92rem;
}
.flash-ok   { background: rgba(143, 166, 122, 0.10); border-color: rgba(143, 166, 122, 0.35); color: #c5d4ad; }
.flash-warn { background: rgba(232, 179, 79, 0.10); border-color: rgba(232, 179, 79, 0.35); color: #f0c878; }
.flash-info { background: rgba(212, 165, 116, 0.10); border-color: rgba(212, 165, 116, 0.35); color: var(--brand-3); }

/* Pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 0; gap: 0.85rem; flex-wrap: wrap; }
