/* ==========================================================================
   Consilier Local – Parincea · sistem de design
   Două teme (luminos / întunecat) prin variabile de culoare (canale RGB).
   Tailwind folosește aceleași variabile (vezi config în base.html).
   ========================================================================== */

:root {
    --bg: 250 248 243;        /* crem cald, ca bannerul */
    --surface: 255 255 255;
    --surface2: 243 244 248;
    --line: 226 229 238;
    --ink: 15 29 58;          /* bleumarin închis */
    --muted: 96 108 134;
    --primary: 18 57 154;     /* albastru tricolor */
    --primary-ink: 255 255 255;
    --accent: 252 209 22;     /* galben tricolor */
    --accent-ink: 15 29 58;
    --danger: 206 17 38;      /* roșu tricolor */
    --ok: 4 120 87;
    --shadow: 0 1px 2px rgb(15 29 58 / .05), 0 8px 24px -8px rgb(15 29 58 / .12);
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: 8 13 26;
    --surface: 16 25 45;
    --surface2: 23 34 60;
    --line: 38 52 82;
    --ink: 238 242 250;
    --muted: 146 160 188;
    --primary: 252 209 22;
    --primary-ink: 15 29 58;
    --accent: 252 209 22;
    --accent-ink: 15 29 58;
    --danger: 248 113 113;
    --ok: 52 211 153;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 30px -10px rgb(0 0 0 / .5);
    color-scheme: dark;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: rgb(var(--bg));
    color: rgb(var(--ink));
    transition: background-color .25s ease, color .25s ease;
}
h1, h2, h3, .font-display { font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif; letter-spacing: -0.02em; }

/* ---- Componente ------------------------------------------------------- */
.card {
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--line));
    border-radius: 1.25rem;
    box-shadow: var(--shadow);
}
.card-soft { background: rgb(var(--surface2)); border: 1px solid rgb(var(--line)); border-radius: 1rem; }

.label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgb(var(--muted)); margin-bottom: .4rem; }
.field {
    width: 100%;
    background: rgb(var(--surface));
    color: rgb(var(--ink));
    border: 1.5px solid rgb(var(--line));
    border-radius: .75rem;
    padding: .7rem .9rem;
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s;
}
.field::placeholder { color: rgb(var(--muted) / .7); }
.field:focus { outline: none; border-color: rgb(var(--primary)); box-shadow: 0 0 0 4px rgb(var(--primary) / .15); }
.field-sm { padding: .5rem .7rem; font-size: .85rem; border-radius: .65rem; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-weight: 700; font-size: .95rem; line-height: 1;
    padding: .85rem 1.25rem; border-radius: .8rem;
    border: 1.5px solid transparent; cursor: pointer;
    transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: rgb(var(--primary)); color: rgb(var(--primary-ink)); box-shadow: 0 6px 16px -6px rgb(var(--primary) / .55); }
.btn-primary:hover { box-shadow: 0 10px 22px -8px rgb(var(--primary) / .65); }
.btn-accent { background: rgb(var(--accent)); color: rgb(var(--accent-ink)); }
.btn-ghost { background: transparent; color: rgb(var(--ink)); border-color: rgb(var(--line)); }
.btn-ghost:hover { background: rgb(var(--surface2)); }
.btn-danger { background: rgb(var(--danger) / .1); color: rgb(var(--danger)); border-color: rgb(var(--danger) / .3); }
.btn-danger:hover { background: rgb(var(--danger) / .18); }
.btn-sm { padding: .5rem .8rem; font-size: .8rem; border-radius: .65rem; }

/* Insigne de status */
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.badge-wait { color: #b45309; background: #fef3c7; border-color: #fde68a; }
.badge-work { color: #1d4ed8; background: #dbeafe; border-color: #bfdbfe; }
.badge-sent { color: #6d28d9; background: #ede9fe; border-color: #ddd6fe; }
.badge-done { color: #047857; background: #d1fae5; border-color: #a7f3d0; }
:root[data-theme="dark"] .badge-wait { color: #fcd34d; background: rgb(245 158 11 / .15); border-color: rgb(245 158 11 / .3); }
:root[data-theme="dark"] .badge-work { color: #93c5fd; background: rgb(59 130 246 / .15); border-color: rgb(59 130 246 / .3); }
:root[data-theme="dark"] .badge-sent { color: #c4b5fd; background: rgb(139 92 246 / .15); border-color: rgb(139 92 246 / .3); }
:root[data-theme="dark"] .badge-done { color: #6ee7b7; background: rgb(16 185 129 / .15); border-color: rgb(16 185 129 / .3); }

/* Bară tricolor decorativă */
.tricolor { height: 4px; background: linear-gradient(90deg, #12399a 0 33.3%, #fcd116 33.3% 66.6%, #ce1126 66.6%); }

/* Navigare */
.nav-glass { background: rgb(var(--bg) / .85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgb(var(--line)); }
.nav-link { padding: .45rem .8rem; border-radius: .65rem; font-weight: 600; font-size: .9rem; color: rgb(var(--muted)); transition: background-color .15s, color .15s; }
.nav-link:hover { color: rgb(var(--ink)); background: rgb(var(--surface2)); }
.nav-link[aria-current="page"] { color: rgb(var(--primary)); background: rgb(var(--primary) / .1); }
.logo-badge { background: #12399a; border-radius: .6rem; padding: .25rem .4rem; display: flex; align-items: center; }

/* Hero */
.hero-card { position: relative; border-radius: 1.75rem; overflow: hidden; border: 1px solid rgb(var(--line)); box-shadow: var(--shadow); background: #faf7f0; }
.hero-glow { position: absolute; inset: auto -10% -40% auto; width: 60%; aspect-ratio: 1; background: radial-gradient(closest-side, rgb(var(--accent) / .35), transparent); pointer-events: none; }

/* Statistici */
.stat-num { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1; color: rgb(var(--primary)); }

/* Pași */
.step-num { width: 2.5rem; height: 2.5rem; border-radius: .8rem; display: grid; place-items: center; font-weight: 800; background: rgb(var(--accent)); color: rgb(var(--accent-ink)); flex-shrink: 0; }

/* Carduri interactive */
.lift { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.lift:hover { transform: translateY(-4px); border-color: rgb(var(--primary) / .5); box-shadow: 0 18px 36px -16px rgb(var(--primary) / .35); }

/* Tabel */
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--muted)); padding: .75rem; border-bottom: 1px solid rgb(var(--line)); white-space: nowrap; }
.tbl td { padding: .8rem .75rem; border-bottom: 1px solid rgb(var(--line)); vertical-align: top; }
.tbl tr:hover td { background: rgb(var(--surface2) / .6); }

/* Zonă upload poză */
.dropzone { border: 2px dashed rgb(var(--line)); border-radius: 1rem; padding: 1.1rem; text-align: center; cursor: pointer; color: rgb(var(--muted)); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-within { border-color: rgb(var(--primary)); background: rgb(var(--primary) / .05); }

/* Conținut articole */
.article-body { line-height: 1.75; font-size: 1.05rem; color: rgb(var(--ink) / .9); }
.article-body h1 { font-size: 1.75rem; font-weight: 800; margin: 1.5rem 0 .75rem; }
.article-body h2 { font-size: 1.4rem; font-weight: 800; margin: 1.25rem 0 .6rem; }
.article-body h3 { font-size: 1.15rem; font-weight: 700; margin: 1rem 0 .5rem; }
.article-body p { margin: 0 0 1rem; }
.article-body ul { list-style: disc; padding-left: 1.5rem; margin: 0 0 1rem; }
.article-body ol { list-style: decimal; padding-left: 1.5rem; margin: 0 0 1rem; }
.article-body a { color: rgb(var(--primary)); text-decoration: underline; }
.article-body blockquote { border-left: 3px solid rgb(var(--accent)); padding-left: 1rem; color: rgb(var(--muted)); }

/* Antispam (honeypot) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Accesibilitate */
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid rgb(var(--primary) / .6); outline-offset: 2px; border-radius: .5rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Apariție la scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* Editor Quill */
.ql-toolbar.ql-snow { background: rgb(var(--surface2)); border-color: rgb(var(--line)) !important; border-radius: .75rem .75rem 0 0; }
.ql-container.ql-snow { border-color: rgb(var(--line)) !important; border-radius: 0 0 .75rem .75rem; font-size: 1rem; background: rgb(var(--surface)); color: rgb(var(--ink)); }
.ql-snow .ql-stroke { stroke: rgb(var(--muted)); } .ql-snow .ql-fill { fill: rgb(var(--muted)); } .ql-snow .ql-picker { color: rgb(var(--muted)); }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgb(var(--bg)); }
::-webkit-scrollbar-thumb { background: rgb(var(--line)); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--primary)); }

/* Iconița comutatorului de temă */
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: inline; }
