/* BaniCalculati.ro – stil inspirat din designul „Calculator buget”: bleumarin închis, portocaliu, carduri albe. */
:root {
    --navy: #0b1b2e;
    --navy-2: #13283f;
    --navy-3: #1d3754;
    --orange: #f7931e;
    --accent: #ea580c;       /* portocaliu cu contrast bun pe alb */
    --pos: #16a34a;
    --pos-dark: #15803d;
    --neg: #dc2626;
    --bg: #f3f5f8;
    --card: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 20px rgba(15, 23, 42, .05);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
/* Footer-ul stă mereu jos, chiar și pe paginile cu puțin conținut. */
body > main { flex: 1 0 auto; }
body > .site-footer { flex-shrink: 0; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #c2410c; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code { background: #eef2f7; padding: .1em .35em; border-radius: 4px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.page { padding: 40px 16px 56px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.accent { color: var(--accent); }
.danger { color: var(--neg); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; }

/* Iconițe */
.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 13px; height: 13px; }
.icon-xl { width: 48px; height: 48px; }

/* Butoane */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #e8820b; color: #fff; }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--orange); color: var(--accent); }
.btn-ghost { background: transparent; color: inherit; }
.btn-ghost:hover { background: rgba(247, 147, 30, .1); color: var(--accent); }
.btn-light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn-light:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.btn-danger { background: var(--neg); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .875rem; }
.btn-lg { padding: 13px 24px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--muted); cursor: pointer; text-decoration: none; font-size: 1.2rem; }
.icon-btn:hover { color: var(--accent); border-color: var(--orange); }
.icon-btn .icon { width: 17px; height: 17px; }

/* Header */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.2rem; font-weight: 700; }
.logo:hover { color: #fff; }
.logo b { color: var(--orange); }
.logo-mark { display: inline-flex; width: 36px; height: 36px; border-radius: 9px; background: var(--orange); align-items: center; justify-content: center; color: #fff; }
/* Meniul „Calculatoare ▾”: dropdown pe desktop, listă desfășurată pe mobil */
@media (min-width: 1081px) {
    .nav-dropdown .nav-label { display: inline-flex; gap: 6px; align-items: center; background: none; border: 0; color: #e2e8f0; font: inherit; font-weight: 600; font-size: .95rem; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
    .nav-dropdown:hover .nav-label, .nav-dropdown:focus-within .nav-label { background: var(--navy-3); color: #fff; }
    .nav-dropdown .nav-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 260px; flex-direction: column; background: var(--navy); border: 1px solid var(--navy-3); border-radius: 12px; padding: 8px; box-shadow: 0 16px 32px rgba(0,0,0,.35); z-index: 60; }
    .nav-dropdown:hover .nav-menu, .nav-dropdown:focus-within .nav-menu { display: flex; }
    .nav-dropdown .nav-menu a { padding: 10px 12px; font-size: .95rem; }
    .nav-dropdown::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
}
.nav-check { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; cursor: pointer; padding: 8px; border-radius: 8px; color: #fff; }
.main-nav { display: flex; align-items: center; gap: 12px; }
.nav-group { position: relative; }
.nav-label { display: none; }
.nav-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; flex-wrap: wrap; }
.nav-menu a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; color: #cbd5e1; text-decoration: none; font-size: .9rem; font-weight: 500; }
.nav-menu a:hover { color: #fff; background: var(--navy-3); }
.nav-menu .icon { width: 16px; height: 16px; color: var(--orange); }
.nav-actions { display: flex; gap: 6px; }
.site-header .btn-ghost { color: #e2e8f0; }
.site-header .btn-ghost:hover { background: var(--navy-3); color: #fff; }

@media (max-width: 1080px) {
    .nav-burger { display: inline-flex; }
    .nav-check:checked + .nav-burger { background: var(--navy-3); }
    .main-nav { display: none; }
    .nav-check:checked ~ .main-nav { display: flex; }
    .main-nav { position: absolute; left: 0; right: 0; top: 64px; background: var(--navy); flex-direction: column; align-items: stretch; padding: 12px 16px 20px; border-top: 1px solid var(--navy-3); box-shadow: 0 12px 24px rgba(0,0,0,.3); }
    .nav-label { display: block; background: none; border: 0; padding: 0; font: inherit; color: #94a3b8; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; margin: 4px 0 6px; }
    .nav-label span { display: none; }
    .nav-menu { flex-direction: column; }
    .nav-menu a { padding: 10px; font-size: 1rem; }
    .nav-actions { flex-direction: column; margin-top: 8px; }
    .nav-actions .btn { justify-content: flex-start; }
}

/* Hero pe prima pagină */
.hero { background: radial-gradient(1200px 500px at 80% 0%, #1b3656 0%, var(--navy) 60%); color: #fff; padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.02; margin-bottom: 18px; }
.hero-title span { color: var(--orange); }
.hero-sub { font-size: 1.2rem; color: #dbe4ee; max-width: 560px; border-bottom: 3px solid var(--orange); padding-bottom: 18px; display: inline-block; }
.hero-features { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 14px; }
.hero-features li { display: flex; gap: 14px; align-items: center; }
.hero-features strong { display: block; font-size: 1.05rem; }
.hero-features span { color: #cbd5e1; font-size: .95rem; }
.hf-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--orange); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hf-icon .icon { color: #fff; width: 22px; height: 22px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-mock { color: var(--text); transform: rotate(-1.5deg); }
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero-mock { transform: none; }
}

/* Antet calculator */
.calc-hero { background: var(--navy); color: #fff; padding: 22px 0 70px; }
.breadcrumbs { font-size: .85rem; color: #94a3b8; display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.breadcrumbs a { color: #cbd5e1; text-decoration: none; }
.breadcrumbs a:hover { color: var(--orange); }
.hero-row { display: flex; gap: 18px; align-items: flex-start; }
.hero-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--orange); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hero-icon .icon { width: 28px; height: 28px; color: #fff; }
.calc-hero h1 { margin-bottom: 6px; }
.lead { font-size: 1.1rem; color: #cbd5e1; margin: 0; max-width: 760px; }
.page .lead { color: var(--muted); }

/* Carduri */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.card-title { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .03em; color: var(--navy-2); margin-bottom: 14px; }
.pos-title { color: var(--pos-dark); }
.accent-title { color: var(--accent); }
.card-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

/* Layout calculator */
.calc-layout { display: grid; grid-template-columns: 380px 1fr; gap: 22px; margin-top: -48px; align-items: start; }
.calc-form { position: sticky; top: 84px; }
.calc-result { min-width: 0; }
.calc-result.loading { opacity: .6; transition: opacity .15s; }
.calc-layout > *, .budget > *, .split > *, .grid-2 > *, .account > * { min-width: 0; }
@media (max-width: 960px) {
    .calc-layout { grid-template-columns: minmax(0, 1fr); }
    .calc-form { position: static; }
}

.result-card { padding: 0; overflow: hidden; }
.result-head { display: flex; align-items: center; gap: 10px; background: var(--pos); color: #fff; padding: 14px 22px; }
.result-head h2 { margin: 0; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .03em; }
.result-body { padding: 20px 22px; }

.stat-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.stat { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.stat span { display: block; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.stat strong { display: block; font-size: 1.35rem; font-weight: 800; overflow-wrap: anywhere; }
.stat small { color: var(--muted); }
.stat-big strong { font-size: 1.9rem; }
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr 1fr; } .stat-big { grid-column: 1 / -1; } }

.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv span { text-transform: uppercase; font-size: .85rem; letter-spacing: .03em; color: #334155; font-weight: 600; }
.kv strong { font-size: 1.3rem; }
.kv-big { border-bottom: 0; padding-top: 16px; }
.kv-big strong { font-size: 2.2rem; font-weight: 800; }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
/* Înălțime fixă: cu maintainAspectRatio=false, Chart.js preia înălțimea containerului. */
.chart-box { position: relative; height: 250px; min-width: 0; }
.chart-wide { height: 280px; margin: 18px 0; }
.chart-donut { height: 200px; width: 200px; max-width: 100%; }
.chart-box + p { margin-top: 8px; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field label, .segment-field legend { font-weight: 600; font-size: .9rem; color: #334155; }
.hint { color: var(--muted); font-size: .8rem; font-weight: 400; }
/* Toate câmpurile text (inclusiv cele fără type explicit), nu doar input[type=text]. */
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], input[type=url], input[type=tel], select, textarea {
    width: 100%; font: inherit; color: var(--text); background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; min-height: 44px;
    transition: border-color .15s, box-shadow .15s;
}
input:not([type]):hover, input[type=text]:hover, input[type=email]:hover, input[type=password]:hover, input[type=number]:hover, select:hover, textarea:hover { border-color: #94a3b8; }
::placeholder { color: #94a3b8; opacity: 1; }
/* Fără săgețile de la câmpurile numerice (se suprapuneau peste „lei”). */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
select[multiple] { background-image: none; padding-right: 12px; }
textarea { min-height: 120px; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(247, 147, 30, .45); border-color: var(--orange); }
input[type=color] { width: 44px; height: 44px; padding: 3px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; cursor: pointer; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input { padding-right: 70px; }
.suffix { position: absolute; right: 12px; color: var(--muted); font-size: .85rem; pointer-events: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: grid; gap: 10px; margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--orange); flex-shrink: 0; }
.check .hint { display: block; }
.segment-field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.segment-field legend { margin-bottom: 6px; padding: 0; }
.segment { display: flex; background: #eef2f7; border-radius: 11px; padding: 4px; gap: 4px; }
.segment label { flex: 1; position: relative; }
.segment input { position: absolute; opacity: 0; inset: 0; }
.segment span { display: block; text-align: center; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: .9rem; color: #475569; cursor: pointer; }
.segment input:checked + span { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segment input:focus-visible + span { outline: 2px solid var(--orange); }
/* Dată românească: Zi / Lună / An */
fieldset.date-ro { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.date-ro legend { font-weight: 600; font-size: .9rem; color: #334155; padding: 0; margin-bottom: 5px; }
.date-ro-row { display: grid; grid-template-columns: minmax(64px, .7fr) minmax(110px, 1.6fr) minmax(80px, 1fr); gap: 6px; }
.date-ro-row.date-ro-month { grid-template-columns: minmax(110px, 1.6fr) minmax(80px, 1fr); }
.date-ro-row select { padding-left: 10px; padding-right: 28px; background-position: right 8px center; }
.advanced { border-top: 1px solid var(--border); padding-top: 12px; margin-bottom: 12px; }
.advanced summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; color: var(--navy-2); }
.js .js-hide { display: none; }
.stack > * + * { margin-top: 4px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input[type=text] { flex: 1; min-width: 180px; }

/* Tabele */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll { max-height: 460px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; white-space: nowrap; }
.table-compact th, .table-compact td { padding: 8px 10px; }
.table-sticky thead th { position: sticky; top: 0; z-index: 1; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.total td { font-weight: 800; font-size: 1.05rem; border-top: 2px solid var(--border); }
.table tr.highlight td { background: #fff7ed; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.schedule { margin-top: 8px; }
.schedule summary { cursor: pointer; font-weight: 600; padding: 10px 0; color: var(--navy-2); }

.save-calc { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.disclaimer { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border: 1px solid #fed7aa; background: #fff7ed; border-radius: 10px; font-size: .82rem; color: #7c2d12; }
.disclaimer .icon { color: var(--accent); margin-top: 1px; }

/* Conținut SEO */
.content { padding-top: 12px; padding-bottom: 40px; }
.prose { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
.page .prose { padding: 0; border: 0; background: transparent; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: .4em; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: #f8fafc; color: var(--navy-2); text-decoration: none; font-size: .88rem; }
.chip:hover { border-color: var(--orange); color: var(--accent); }
.faq { margin-bottom: 28px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
.faq details p { color: #334155; }

.section { margin: 36px 0; }
.section-title { font-size: 1.6rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.calc-card { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.calc-card:hover { transform: translateY(-2px); border-color: var(--orange); color: var(--text); }
.calc-card strong { font-size: 1.08rem; }
.calc-card span:not(.calc-card-icon) { color: var(--muted); font-size: .92rem; }
.calc-card em { margin-top: auto; padding-top: 8px; font-style: normal; color: var(--accent); font-weight: 600; font-size: .9rem; display: inline-flex; gap: 4px; align-items: center; }
.calc-card-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--orange); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.calc-card-icon .icon { color: #fff; }
.related { margin-bottom: 40px; }
.feature-band { display: grid; grid-template-columns: 1fr 220px; gap: 28px; align-items: center; padding: 32px; }
.feature-badge { width: 200px; height: 200px; border-radius: 50%; background: var(--navy); color: #fff; border: 4px solid var(--orange); display: flex; flex-direction: column; align-items: center; justify-content: center; text-transform: uppercase; font-weight: 800; text-align: center; gap: 2px; }
.feature-badge em { color: var(--orange); font-style: normal; }
.checklist { list-style: none; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 8px; align-items: center; }
.checklist .icon { color: var(--pos); }
@media (max-width: 760px) { .feature-band { grid-template-columns: 1fr; } .feature-badge { display: none; } }

/* Calculator buget */
.budget { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: -48px; align-items: start; }
@media (max-width: 960px) { .budget { grid-template-columns: 1fr; } }
.budget-row { display: grid; grid-template-columns: 1fr 150px 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.budget-row input { min-height: 40px; padding: 8px 10px; }
.budget-row .input-wrap input { padding-right: 38px; text-align: right; }
.budget-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; font-weight: 700; }
.budget-total strong { font-size: 1.3rem; }
.donut-legend { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center; }
@media (max-width: 520px) { .donut-legend { grid-template-columns: 1fr; } .chart-donut { margin: 0 auto; } }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }

/* Alerte */
.alert { padding: 12px 16px; border-radius: 10px; margin: 16px 0; border: 1px solid; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.alert-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 0; }

/* Autentificare */
.auth { padding: 48px 16px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 440px; padding: 30px; }

/* Cont */
.account { display: grid; grid-template-columns: 250px 1fr; gap: 24px; padding-top: 24px; padding-bottom: 48px; align-items: start; }
.account-nav { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 16px; position: sticky; top: 84px; }
.account-user { display: flex; gap: 10px; align-items: center; padding: 6px 6px 14px; border-bottom: 1px solid var(--navy-3); margin-bottom: 10px; min-width: 0; }
.account-user > div { min-width: 0; }
.account-user strong, .account-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-user small { color: #94a3b8; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.account-nav nav a, .account-nav nav button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px; border-radius: 9px; color: #cbd5e1; text-decoration: none; font: inherit; font-size: .95rem; background: none; border: 0; cursor: pointer; text-align: left; }
.account-nav nav a:hover, .account-nav nav button:hover { background: var(--navy-3); color: #fff; }
.account-nav nav a.active { background: var(--orange); color: #fff; }
.account-main { min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 1.7rem; }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav strong { min-width: 140px; text-align: center; }
@media (max-width: 860px) {
    .account { grid-template-columns: 1fr; }
    .account-nav { position: static; }
    .account-nav nav { display: flex; overflow-x: auto; gap: 4px; }
    .account-nav nav a, .account-nav nav button { white-space: nowrap; width: auto; }
    .account-nav nav form { flex-shrink: 0; }
}
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.tile span { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tile strong { display: block; font-size: 1.55rem; font-weight: 800; }
.tile small { color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 20px; }
.grid-wide-left { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 980px) { .grid-2, .grid-wide-left { grid-template-columns: 1fr; } }
.tx-grid { display: grid; grid-template-columns: 1fr 1.2fr 1.7fr 1.2fr; gap: 12px; }
.filters fieldset.date-ro { margin: 0; flex: 1 1 300px; }
.filters fieldset.date-ro legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.filters .date-ro-row select { min-width: 0; width: 100%; flex: none; }
@media (max-width: 900px) { .tx-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .tx-grid { grid-template-columns: 1fr; } }
.tx-form .segment-field { max-width: 320px; }
.tx-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.recurring-copy { margin-top: 12px; }
.tx-list { list-style: none; margin: 0; padding: 0; }
.tx-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tx-list li > div { flex: 1; min-width: 0; }
.tx-list strong, .tx-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-list small { color: var(--muted); }
.tx-list li > span:last-child { font-weight: 700; white-space: nowrap; }
.empty { color: var(--muted); padding: 12px 0; }
.limits, .goals-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.limit-head { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; margin-bottom: 4px; }
.progress { height: 9px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--pos); border-radius: 99px; }
.progress-lg { height: 14px; margin: 8px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 160px; flex: 1 1 160px; }
.filters .btn { flex: 0 0 auto; }
.cat-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cat-form { display: flex; gap: 8px; align-items: center; flex: 1; flex-wrap: wrap; }
.cat-form input[type=text] { flex: 1 1 160px; width: auto; }
.cat-form .input-wrap { flex: 0 1 190px; }
.cat-spent { min-width: 140px; }
.cat-new { margin-top: 14px; }
.goals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.goals-grid .card { margin: 0; }
.goal-amount strong { font-size: 1.6rem; }
.goal-contrib { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.goal-contrib .input-wrap { flex: 1 1 140px; }
.goal-contrib .check { flex-basis: 100%; }
.goal-new { border: 2px dashed #cbd5e1; box-shadow: none; }
.goals-grid > .goal-new:only-child { grid-column: 1 / -1; max-width: 640px; }
.saved-list { display: grid; gap: 14px; }
.saved-item { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 0; }
.saved-item h2 { font-size: 1.1rem; margin: 6px 0 4px; }
.saved-item p { margin: 0 0 4px; }
.saved-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
@media (max-width: 560px) { .saved-item { flex-direction: column; align-items: stretch; } }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; background: #eef2f7; color: #334155; font-size: .75rem; font-weight: 700; margin-right: 4px; }
.badge-pos { background: #dcfce7; color: #166534; }
.badge-neg { background: #fee2e2; color: #991b1b; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pagination a { padding: 6px 11px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text); }
.pagination a.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.email-preview { border: 1px solid var(--border); border-radius: 10px; padding: 18px; min-height: 200px; overflow: auto; }

/* Curs BNR */
.fx-page { margin-top: -48px; }
.fx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.fx-card { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.fx-card:hover { border-color: var(--orange); transform: translateY(-2px); color: var(--text); }
.fx-code { font-weight: 800; color: var(--accent); letter-spacing: .05em; }
.fx-name { font-size: .85rem; color: var(--muted); }
.fx-card strong { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fx-card small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.fx-change { font-size: .85rem; font-weight: 700; }
.fx-change.up { color: var(--neg); }
.fx-change.down { color: var(--pos); }
.fx-converter { margin-bottom: 0; }
.fx-conv-grid { display: grid; grid-template-columns: 1fr; gap: 0 10px; }
.fx-swap { justify-self: center; margin: -4px 0 10px; }
.fx-result { font-size: 1.35rem; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; overflow-wrap: anywhere; }
.range-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.range-tabs .chip { cursor: pointer; font: inherit; font-size: .85rem; }
.chip-active { background: var(--orange); border-color: var(--orange); color: #fff; }
.chip-active:hover { color: #fff; }

/* Datorii și scadențe */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 18px; -webkit-overflow-scrolling: touch; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--orange); }
.dot-lg { width: 14px; height: 14px; }
.fx-note { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: -6px 0 16px; }
.due-list { list-style: none; margin: 0; padding: 0; }
.due-item { display: grid; grid-template-columns: 44px 12px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.due-date { display: flex; flex-direction: column; align-items: center; line-height: 1.05; background: #f8fafc; border: 1px solid var(--border); border-radius: 9px; padding: 5px 0; }
.due-date strong { font-size: 1.1rem; }
.due-date small { font-size: .7rem; text-transform: uppercase; color: var(--muted); }
.due-main { min-width: 0; }
.due-main strong, .due-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.due-main small { color: var(--muted); font-size: .82rem; }
.due-amount { text-align: right; white-space: nowrap; }
.due-amount strong, .due-amount small { display: block; }
.due-amount small { color: var(--muted); font-size: .8rem; }
.due-item.is-paid { opacity: .6; }
.due-item.is-paid .due-main strong { text-decoration: line-through; }
.due-item.is-overdue .due-date { background: #fef2f2; border-color: #fecaca; color: var(--neg); }
@media (max-width: 560px) {
    .due-item { grid-template-columns: 40px 1fr auto; }
    .due-item > .dot { display: none; }
    .due-action { grid-column: 2 / -1; justify-self: start; }
}
.entity-list { display: grid; gap: 16px; margin-bottom: 20px; }
.entity-card { margin: 0; }
.entity-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.entity-head > div:nth-child(2) { flex: 1; min-width: 0; }
.entity-head h2 { font-size: 1.15rem; margin: 0 0 2px; }
.entity-head h2 a { color: var(--text); text-decoration: none; }
.entity-head h2 a:hover { color: var(--accent); }
.entity-head .dot { margin-top: 6px; }
.entity-actions { display: flex; gap: 6px; }
.entity-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.entity-stats span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.entity-stats strong { display: block; font-size: 1.25rem; font-weight: 800; }
.entity-stats small { color: var(--muted); font-size: .8rem; }
.entity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.field-wide { grid-column: 1 / -1; }
.field-check { justify-content: flex-end; padding-bottom: 10px; }
.onboarding p { max-width: 760px; }
.onboarding-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.due-widget { border-left: 4px solid var(--orange); }

/* Module (admin) */
.module-list { display: grid; gap: 14px; margin-bottom: 20px; }
.module-card { margin: 0; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.module-off { opacity: .8; background: #fbfcfd; }
.module-head { display: flex; gap: 14px; flex: 1 1 420px; min-width: 0; }
.module-title h2 { font-size: 1.1rem; margin-bottom: 4px; }
.module-title p { margin: 0 0 4px; }
.module-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Footer */
.site-footer { background: var(--navy); color: #cbd5e1; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 40px 16px 24px; }
.footer-grid h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-grid a:not(.logo) { color: #cbd5e1; text-decoration: none; font-size: .92rem; }
.footer-grid a:not(.logo):hover { color: var(--orange); }
.site-footer .muted { color: #94a3b8; margin-top: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--navy-3); padding: 16px; font-size: .82rem; color: #94a3b8; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

@media print {
    .site-header, .site-footer, .calc-form, .save-calc, .related, .account-nav { display: none !important; }
    .calc-layout { display: block; margin: 0; }
    .calc-hero { background: none; color: #000; padding: 0; }
    .table-scroll { max-height: none; }
    details.schedule > *:not(summary) { display: block; }
}
