/* PROCONS Facturare — aspect în stilul FGO (etapa F1, 15.11.2026). Fără pas de build, compatibil CSP strict.
   Bară de sus și meniu lateral închise la culoare, accent albastru, text de bază 13 px, fonturile sistemului.
   Clasele existente ale paginilor sunt păstrate; s-au schimbat paleta, dimensiunile și cadrul paginii. */
:root {
    --ink: #1f2430;
    --ink-2: #4a5160;
    --muted: #6b7285;
    --bg: #f3f4f7;
    --surface: #ffffff;
    --line: #e4e6ec;
    --line-2: #cfd3dc;
    --accent: #2f7ae5;
    --accent-strong: #1f66cc;
    --accent-strong-hover: #1753a8;
    --accent-soft: #eaf2fd;
    --ok-bg: #e8f7ef; --ok-ink: #17663f;
    --err-bg: #fdeeee; --err-ink: #a12a2a;
    --warn-bg: #fdf6dc; --warn-ink: #7a5200;
    --focus: #2f7ae5;
    --radius: 6px;
    --shadow: 0 1px 2px rgba(20,24,40,.06), 0 1px 3px rgba(20,24,40,.05);
    --top: #1c1f2e; --side: #1f2235; --side-hover: rgba(255,255,255,.06); --side-text: #c4c8d6; --side-muted: #7d8399;
    --top-h: 46px; --side-w: 210px;
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 13px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; font-size: 1rem; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: var(--accent-strong-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1 { font-size: 1.25rem; font-weight: 600; margin: 0 0 .55rem; }
h2 { font-size: 1.12rem; font-weight: 600; margin: 0 0 .35rem; }
code { font-family: Consolas, "Courier New", monospace; font-size: .92em; }
.small { font-size: .9rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.02rem; }
.help { color: var(--muted); font-size: .88rem; margin: .2rem 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: .4rem .8rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .4rem; color: #fff; }
svg.ico, .ico { width: 15px; height: 15px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
svg.ico-sm, .ico-sm { width: 12px; height: 12px; flex-shrink: 0; }
svg.chev, .chev { width: 11px; height: 11px; flex-shrink: 0; }
svg.tile-ico, .tile-ico { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; flex-shrink: 0; }
svg.ok-ico, .ok-ico { width: 13px; height: 13px; color: #22a06b; vertical-align: -2px; flex-shrink: 0; }

/* Butoane */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 0 11px; border-radius: 5px; border: 1px solid transparent; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-secondary, .btn-light { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn-secondary:hover, .btn-light:hover { border-color: #a9afbd; color: var(--ink); text-decoration: none; }
.btn-ghost { background: transparent; color: inherit; border-color: transparent; }
.btn-ghost:hover { text-decoration: underline; }
.btn-block { width: 100%; }
.btn-sm { min-height: 27px; padding: 0 9px; font-size: 12px; }
.btn.disabled { opacity: .5; pointer-events: none; }

/* Formulare */
.form { display: grid; gap: .85rem; margin: .85rem 0; }
.form.narrow { max-width: 420px; }
.field { display: grid; gap: .25rem; }
label { font-weight: 600; font-size: .92rem; color: var(--ink-2); }
input, select { font: inherit; min-height: 32px; padding: .3rem .6rem; border: 1px solid var(--line-2); border-radius: 5px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(47,122,229,.2); }
input[aria-invalid="true"] { border-color: var(--err-ink); }
.inline-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-form select { width: auto; min-height: 28px; padding: .15rem .45rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin: .85rem 0; }
.filters .field { flex: 1 1 140px; min-width: 0; }

/* Alerte */
.alert { padding: .6rem .85rem; border-radius: 5px; margin: 0 0 .85rem; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert-success { background: var(--ok-bg); color: var(--ok-ink); }
.alert-error { background: var(--err-bg); color: var(--err-ink); }

/* Pagini de autentificare */
body.guest { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--top); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 8px; padding: 1.75rem; box-shadow: 0 20px 50px rgba(0,0,0,.35); border-top: 4px solid var(--accent); }
.auth-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; font-weight: 700; font-size: 1.25rem; }
.auth-brand small, .brand small { font-weight: 500; color: var(--muted); }
.recovery { margin-top: 1rem; }
.recovery summary { cursor: pointer; color: var(--accent-strong); }
.qr { display: flex; justify-content: center; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.qr svg { width: 200px; height: 200px; }
.setup-key { text-align: center; word-break: break-all; background: var(--bg); padding: .5rem; border-radius: 5px; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; margin: 1rem 0; }
.codes li { background: var(--bg); padding: .45rem; border-radius: 5px; text-align: center; }
.steps { padding-left: 1.2rem; }
.error-code { font-size: 3rem; font-weight: 700; color: var(--accent-strong); margin: 0; }

/* ===== Cadrul aplicației (bară de sus + meniu lateral, stil FGO) ===== */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--top-h); display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) auto; align-items: center; background: var(--top); color: #fff; }
.brand-wrap { display: flex; align-items: center; height: 100%; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 100%; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand:hover { color: #fff; text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 5px; background: #fff; padding: 1px; }
.brand b { font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.brand small { color: #9aa0b4; font-weight: 500; }
.top-search { justify-self: center; width: min(360px, 100%); position: relative; }
.top-search input { height: 30px; min-height: 30px; border-radius: 6px; border: 1px solid #3a3e55; background: #2a2d40; color: #fff; font-size: 12.5px; padding: 0 64px 0 30px; cursor: pointer; }
.top-search input::placeholder { color: #9aa0b4; }
.top-search .ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: #9aa0b4; width: 14px; height: 14px; }
.top-search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 10.5px var(--font); color: #9aa0b4; border: 1px solid #4a4f68; border-radius: 4px; padding: 0 5px; }
.top-right { display: flex; align-items: center; gap: 6px; padding-right: 10px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; border: 0; background: transparent; color: var(--side-text); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.menu-btn { display: none; }
.env-pill { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fcd34d; border: 1px solid rgba(252,211,77,.45); padding: 1px 7px; border-radius: 10px; line-height: 1.5; }
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 220px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(20,24,40,.14); padding: 4px; z-index: 60; }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 9px; border: 0; border-radius: 4px; background: none; color: var(--ink); font: inherit; font-size: 12.5px; text-align: left; text-decoration: none; cursor: pointer; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.dd-menu .dd-head { padding: 6px 9px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 3px; }
.dd-menu .dd-head b { display: block; color: var(--ink); font-size: 12.5px; }
.dd-menu form { margin: 0; border-top: 1px solid var(--line); margin-top: 3px; padding-top: 3px; }
.btn-issue { background: var(--accent); color: #fff; min-height: 30px; }
.btn-issue:hover { background: var(--accent-strong); color: #fff; }
.org-pill { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 4px 0 12px; border-radius: 6px; background: #2a2d40; border: 1px solid #3a3e55; color: #fff; font-size: 12px; font-weight: 700; max-width: 250px; }
.org-pill .org-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-pill .av { width: 24px; height: 24px; border-radius: 50%; background: #22a06b; display: grid; place-items: center; font-size: 10px; flex-shrink: 0; }

.shell { display: flex; min-height: calc(100vh - var(--top-h)); }
.sidebar { position: sticky; top: var(--top-h); width: var(--side-w); height: calc(100vh - var(--top-h)); flex-shrink: 0; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; }
.side-scroll { flex: 1; overflow-y: auto; padding: 6px 6px 10px; scrollbar-width: thin; scrollbar-color: #3a3e55 transparent; }
.nav-item, .nav-group > summary { display: flex; align-items: center; gap: 9px; padding: 6px 9px; margin: 1px 0; border-radius: 5px; color: var(--side-text); font-size: 12.5px; text-decoration: none; list-style: none; cursor: pointer; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-item:hover, .nav-group > summary:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--accent); color: #fff; }
.nav-label { flex: 1; min-width: 0; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group .chev { width: 11px; height: 11px; color: var(--side-muted); transition: transform .15s; }
.nav-group[open] > summary .chev { transform: rotate(180deg); }
.nav-group.has-active > summary { color: #fff; }
.nav-sub { list-style: none; margin: 0 0 4px; padding: 0 0 0 24px; }
.nav-sub a, .nav-sub .nav-soon { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 4px; color: #aab0c2; font-size: 12px; text-decoration: none; white-space: nowrap; }
.nav-sub .nav-soon { color: #6c7289; cursor: default; }
.nav-sub .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-sub a:hover { color: #fff; background: var(--side-hover); text-decoration: none; }
.nav-sub a[aria-current="page"] { color: #fff; background: rgba(47,122,229,.32); }
.tag { margin-left: auto; flex-shrink: 0; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 0 5px; border-radius: 3px; line-height: 15px; }
.tag-test { color: #fcd34d; background: rgba(252,211,77,.13); }
.tag-soon { color: #8b91a8; background: rgba(255,255,255,.06); }
.collapse-btn { position: absolute; right: -11px; top: 50%; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); z-index: 5; padding: 0; }
.collapse-btn .ico { width: 11px; height: 11px; }
body.nav-collapsed { --side-w: 54px; }
body.nav-collapsed .nav-label, body.nav-collapsed .chev, body.nav-collapsed .nav-sub, body.nav-collapsed .brand b, body.nav-collapsed .brand span { display: none; }
body.nav-collapsed .nav-item, body.nav-collapsed .nav-group > summary { justify-content: center; padding: 8px; }
body.nav-collapsed .collapse-btn { transform: scaleX(-1); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pagebar { position: sticky; top: var(--top-h); z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; }
.crumbs { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.crumbs .home { display: inline-grid; place-items: center; color: var(--accent); }
.crumbs .sep { width: 10px; height: 10px; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 6px; }
.content { padding: 14px 16px 28px; width: 100%; max-width: 1440px; min-width: 0; }
.content:focus { outline: none; }
.scrim { display: none; }

/* ===== Panou FGO (carduri, indicatori, grafic lunar) ===== */
.fgo-notice { font-size: 12px; font-style: italic; color: var(--ink-2); margin: 0 0 12px; }
.fgo-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.fgo-grid-21 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.fgo-grid-3 > *, .fgo-grid-21 > * { min-width: 0; }
.fgo-card { margin-bottom: 0; display: flex; flex-direction: column; padding: 14px 16px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.card-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.card-head p { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); }
.card-ico { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; }
.card-ico .ico { width: 16px; height: 16px; }
.ci-blue { background: var(--accent-soft); color: var(--accent); }
.ci-green { background: var(--ok-bg); color: #22a06b; }
.ci-yellow { background: var(--warn-bg); color: #a36a00; }
.ci-red { background: var(--err-bg); color: #d64545; }
.fgo-tile { border-radius: 5px; padding: 10px 13px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.fgo-tile b { display: block; font-weight: 600; font-size: 12.8px; margin-bottom: 2px; color: var(--ink); }
.fgo-tile .links { font-size: 11.5px; color: var(--ink-2); }
.fgo-tile .val { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.t-yellow { background: var(--warn-bg); } .t-yellow .val { color: #a36a00; }
.t-pink { background: var(--err-bg); } .t-pink .val { color: #d64545; }
.t-green { background: var(--ok-bg); } .t-green .val { color: #22a06b; }
.t-blue { background: #eaf4fc; }
.acct { align-items: center; }
.acct small { color: var(--ink-2); font-size: 11.5px; display: block; }
.acct .amt { text-align: right; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.acct .amt small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #eceef3; font-size: 12.5px; }
.trow:last-of-type { border-bottom: 0; }
.trow span { color: var(--ink-2); }
.card-foot { text-align: right; margin-top: auto; padding-top: 8px; font-size: 12px; }
.st { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.st-ok { background: var(--ok-bg); color: #18794e; }
.st-sbx { background: #fff1e0; color: #9a5300; }

.fgo-legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; font-size: 11.5px; color: var(--ink-2); margin-bottom: 6px; }
.fgo-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.c-green { background: #4cc38a; } .c-blue { background: #59a7f5; } .c-orange { background: #fbc96b; }
.fgo-chart { display: flex; align-items: flex-end; gap: 4%; height: 185px; padding: 0 8px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 36px, #f0f1f5 36px 37px); }
.fgo-chart .m { flex: 1; display: flex; gap: 4px; align-items: flex-end; justify-content: center; height: 100%; }
.fgo-chart i { display: block; width: 22%; max-width: 20px; border-radius: 3px 3px 0 0; min-height: 2px; }
.fgo-chart-x { display: flex; gap: 4%; padding: 5px 8px 0; }
.fgo-chart-x span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.bh-0 { height: 2px; opacity: .35; }
.bh-5 { height: 5%; } .bh-10 { height: 10%; } .bh-15 { height: 15%; } .bh-20 { height: 20%; } .bh-25 { height: 25%; }
.bh-30 { height: 30%; } .bh-35 { height: 35%; } .bh-40 { height: 40%; } .bh-45 { height: 45%; } .bh-50 { height: 50%; }
.bh-55 { height: 55%; } .bh-60 { height: 60%; } .bh-65 { height: 65%; } .bh-70 { height: 70%; } .bh-75 { height: 75%; }
.bh-80 { height: 80%; } .bh-85 { height: 85%; } .bh-90 { height: 90%; } .bh-95 { height: 95%; } .bh-100 { height: 100%; }

.fgo-stat-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.stat-pill { background: #f7f8fb; border: 1px solid var(--line); border-radius: 5px; padding: 7px 6px; text-align: center; color: var(--ink); text-decoration: none; }
.stat-pill:hover { border-color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.stat-pill b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.stat-pill span { font-size: 11px; color: var(--muted); }
.fgo-module-list { list-style: none; margin: 0; padding: 0; }
.fgo-module-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef0f4; font-size: 12.5px; }
.fgo-module-list li:last-child { border-bottom: 0; }
.fgo-empty-modules { padding: 12px; border: 1px dashed var(--line-2); border-radius: 5px; background: #fafbfc; }

/* Registru și formular factură stil FGO */
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: 5px; overflow: hidden; background: #fff; }
.seg a { padding: 5px 11px; font-size: 12px; color: var(--ink-2); border-right: 1px solid var(--line); text-decoration: none; }
.seg a:last-child { border-right: 0; }
.seg a:hover { background: var(--bg); text-decoration: none; }
.seg a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.filters .field.grow { flex: 2 1 220px; }
.row-act { display: flex; gap: 3px; justify-content: flex-end; }
.row-act a { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 4px; color: var(--muted); text-decoration: none; }
.row-act a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.tfoot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); background: #fafbfc; }
.tfoot b { color: var(--ink); }

.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.doc-grid > * { min-width: 0; }
.stack { display: grid; gap: 12px; min-width: 0; }
.stack-fields { display: grid; gap: 10px; }
.sticky-panel { position: sticky; top: calc(var(--top-h) + 52px); }
.sec-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); padding: 0 4px; }
.sec-legend .ico { color: var(--accent); }
.doc-actions { display: grid; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
@media (max-width: 1024px) {
    .fgo-grid-3, .fgo-grid-21, .doc-grid { grid-template-columns: minmax(0, 1fr); }
    .sticky-panel { position: static; }
}

/* Carduri și dale */
.card { background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.15rem; margin-bottom: .85rem; }
.card.empty { border: 1px dashed var(--line-2); box-shadow: none; }
.tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .85rem; }
.tile { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: .85rem 1rem; font-weight: 600; }

/* Tabele */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .96rem; }
th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid #eef0f4; vertical-align: top; }
th { background: #f7f8fa; font-weight: 600; font-size: .9rem; color: var(--ink-2); white-space: nowrap; border-bottom-color: var(--line); }
tbody tr:hover { background: #f8fafd; }
tbody tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: 0 .5rem; border-radius: 3px; font-size: .84rem; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.badge-enabled { color: var(--ok-ink); background: var(--ok-bg); }
.badge-testing { color: var(--warn-ink); background: var(--warn-bg); }
.badge-development { color: var(--accent-strong); background: var(--accent-soft); }
.badge-planned { color: #4b5563; background: #eef0f4; }
.badge-disabled { color: var(--err-ink); background: var(--err-bg); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .85rem; }

/* Ctrl+K — căutare în meniu */
.cmdk { position: fixed; inset: 0; z-index: 90; background: rgba(15,18,30,.45); display: none; align-items: flex-start; justify-content: center; padding-top: 10vh; }
.cmdk.open { display: flex; }
.cmdk-box { width: min(560px, 92vw); background: #fff; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.3); overflow: hidden; }
.cmdk-box input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; height: 44px; font-size: 1.08rem; padding: 0 1rem; }
.cmdk-box input:focus { box-shadow: none; }
.cmdk-list { list-style: none; margin: 0; padding: .3rem; max-height: 340px; overflow-y: auto; }
.cmdk-list a { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 4px; color: var(--ink); text-decoration: none; }
.cmdk-list a.sel, .cmdk-list a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.cmdk-list small { margin-left: auto; color: var(--muted); font-size: .85rem; }
.cmdk-foot { display: flex; gap: 1rem; padding: .45rem .9rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); background: #fafbfc; }

/* Telefon / ecran îngust */
@media (max-width: 860px) {
    .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
    .menu-btn { display: inline-grid; margin-left: .4rem; }
    .brand { padding: 0 .4rem; }
    .brand span, .brand b { display: none; }
    .top-search { justify-self: end; width: 36px; }
    .top-search input { padding: 0; color: transparent; }
    .top-search input::placeholder { color: transparent; }
    .top-search kbd, .env-pill, .org-pill .org-name, .btn-issue span { display: none; }
    .sidebar { position: fixed; left: 0; top: var(--top-h); z-index: 50; width: 260px; transform: translateX(-100%); transition: transform .2s; }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; background: rgba(15,18,30,.45); z-index: 45; }
    .collapse-btn { display: none; }
    .pagebar { position: static; padding: 0 .8rem; }
    .content { padding: .8rem; }
    .auth-card { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ===== Stiluri ale paginilor (păstrate din etapele 2–7) ===== */
/* Etapa 2 — Setări firmă */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.subnav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 0 1rem; font-size: .95rem; }
.details { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: .45rem 1rem; margin: 0; }
.details dt { font-weight: 600; color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.span-2 { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem 1.25rem; margin: 0; min-width: 0; }
fieldset.card { background: var(--surface); }
legend { font-weight: 700; padding: 0 .4rem; }
.check { display: flex; align-items: center; gap: .55rem; font-weight: 500; min-height: 36px; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 0; }
.alert-warn { background: #fff4d6; color: #6b4200; }
.add-form { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.add-form > summary { cursor: pointer; font-weight: 700; color: var(--accent-strong); min-height: 36px; }
td.actions { white-space: nowrap; }
td code { white-space: nowrap; }
.grid-2 { align-items: start; }
td.actions form { display: inline; }
tr.inactive td { color: var(--muted); }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
@media (max-width: 800px) {
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .details { grid-template-columns: minmax(0, 1fr); }
    .details dd { margin-bottom: .4rem; }
    fieldset { padding: .75rem; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Etapa 3 — clienți și parteneri */
.label { font-weight: 600; }
.input-action { display: flex; gap: .5rem; align-items: stretch; }
.input-action input { flex: 1 1 auto; min-width: 0; }
.lookup-status { min-height: 1.3em; margin: .25rem 0 0; font-size: .9rem; }
.lookup-status.is-busy { color: var(--muted); }
.lookup-status.is-ok { color: var(--ok-ink); }
.lookup-status.is-warn { color: #6b4200; }
.lookup-status.is-error { color: var(--err-ink); }
.autofilled { animation: autofill-flash 1.6s ease-out; }
@keyframes autofill-flash { from { background: #fff4d6; } to { background: var(--surface); } }
@media (prefers-reduced-motion: reduce) { .autofilled { animation: none; outline: 2px solid #f0c36d; } }
[hidden] { display: none !important; }
textarea { width: 100%; font: inherit; padding: .4rem .6rem; border: 1px solid var(--line-2); border-radius: 5px; background: #fff; color: var(--ink); }

/* Etapa 3 — sugestii parteneri (listă derulantă) */
.has-suggestions { position: relative; }
.suggestions { position: absolute; z-index: 20; list-style: none; margin: 0; padding: .25rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.15); max-height: 340px; overflow-y: auto; }
.suggestions li { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem; padding: .5rem .75rem; cursor: pointer; min-height: 34px; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--accent-soft); }
.suggestions .s-name { font-weight: 600; overflow-wrap: anywhere; }
.suggestions .s-meta { flex-basis: 100%; font-size: .85rem; color: var(--muted); }

/* Etapa 3 — adrese de email multiple */
.email-rows { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .75rem; }
.email-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: end; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.email-row-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-height: 34px; }
.field-error { color: var(--err-ink); font-size: .88rem; margin: .25rem 0 0; }
@media (max-width: 800px) { .email-row { grid-template-columns: 1fr; } }

/* Etapa 3 — produse și servicii */
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.currency-select { flex: 0 0 auto; width: auto; min-width: 5.5rem; }
.listing-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.listing-row { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .9rem; }
.listing-row .listing-fields { margin-top: .5rem; }

/* Facturi */
.line-rows { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; counter-reset: line; }
.line-row { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; background: #fafbfc; counter-increment: line; }
.line-row::before { content: "Poziția " counter(line); display: block; font-weight: 600; color: var(--muted); font-size: .85rem; margin-bottom: .35rem; }
.line-grid { display: grid; grid-template-columns: 2fr 3fr 1fr 1.4fr 1.3fr 1.6fr; gap: .5rem .75rem; align-items: start; }
.line-grid .line-desc { grid-column: 1 / 4; }
.line-grid .line-exempt { grid-column: 4 / -1; }
.line-grid .field { margin: 0; }
.line-row [data-remove-line] { margin-top: .5rem; }
@media (max-width: 1100px) { .line-grid { grid-template-columns: 1fr 1fr; } .line-grid .line-desc, .line-grid .line-exempt, .line-grid .line-name, .line-grid .line-product { grid-column: 1 / -1; } }
.warning-box { border-left: 6px solid var(--accent); }
.actions-bar { margin-top: 1rem; }
.actions-bar form { display: inline; }
.threshold h2 { margin-top: 0; }
.meter { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin: .5rem 0; }
.meter span { display: block; height: 100%; background: #2f7d4b; }
.threshold-atentie .meter span { background: #c58a00; }
.threshold-critic .meter span, .threshold-depasit .meter span { background: var(--err-ink); }
.meter-0 { width: 0%; }
.meter-5 { width: 5%; }
.meter-10 { width: 10%; }
.meter-15 { width: 15%; }
.meter-20 { width: 20%; }
.meter-25 { width: 25%; }
.meter-30 { width: 30%; }
.meter-35 { width: 35%; }
.meter-40 { width: 40%; }
.meter-45 { width: 45%; }
.meter-50 { width: 50%; }
.meter-55 { width: 55%; }
.meter-60 { width: 60%; }
.meter-65 { width: 65%; }
.meter-70 { width: 70%; }
.meter-75 { width: 75%; }
.meter-80 { width: 80%; }
.meter-85 { width: 85%; }
.meter-90 { width: 90%; }
.meter-95 { width: 95%; }
.meter-100 { width: 100%; }

/* Pagina publică de plată */
.pay-card h1 { font-size: 1.2rem; }
.pay-amount { font-size: 2rem; font-weight: 800; margin: .25rem 0 1rem; }
.pay-ref { font-family: ui-monospace, Consolas, monospace; letter-spacing: .05em; }
.btn-danger { background: #a3261b; color: #fff; }
.btn-danger:hover { background: #82190f; color: #fff; }
.danger-zone { margin-top: 1.5rem; border-color: #e3b5ad; }
.danger-zone summary { cursor: pointer; font-weight: 600; color: #a3261b; }
.pay-test { background: #fff3cd; border: 1px solid #e0c36a; border-radius: 8px; padding: .5rem .75rem; font-weight: 600; font-size: .9rem; }
.badge-deleted { background: #fbe3df; color: #8a1f14; border: 1px solid #e3b5ad; }
.row-deleted td { color: var(--muted); text-decoration: line-through; text-decoration-color: #c9877d; }
.row-deleted td:last-child { text-decoration: none; }

/* Etapa 6 — bancă */
.env-tabs { display: flex; gap: .5rem; margin: 0 0 .75rem; flex-wrap: wrap; }
.env-banner { padding: .6rem .9rem; border-radius: 8px; margin: 0 0 1rem; font-size: .92rem; }
.env-sandbox { background: #fff4d6; color: #6b4200; border: 1px solid #e0c36a; }
.env-production { background: #e6f4ea; color: #1e5b2f; border: 1px solid #a8d5b5; }
.env-card-production { border-left: 4px solid #1e5b2f; }
.env-card-sandbox { border-left: 4px solid #c99a1a; }
.amount-in { color: #1e5b2f; font-weight: 600; white-space: nowrap; }
.amount-out { color: #8a1c13; white-space: nowrap; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.suggestion { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.suggestion:first-child { border-top: 0; }
.inline-details summary { cursor: pointer; font-size: .85rem; }
.inline-details .form { margin-top: .4rem; }
.payments-box .paid { color: #1e5b2f; }
.payments-box .due { color: #8a1c13; }
.card.narrow { max-width: 640px; }

/* Carduri FGO Conturi Bancare & Enable Banking PSD2 */
.eb-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.eb-bcard { background: var(--surface, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; box-shadow: 0 1px 3px rgba(15,23,42,.03); }
.eb-bcard-top { display: flex; align-items: flex-start; gap: 12px; }
.eb-bank-mark { width: 38px; height: 38px; border-radius: 8px; background: #1e293b; color: #fff; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; letter-spacing: .02em; }
.eb-bank-mark.mark-bacx { background: #e0001b; }
.eb-bcard-name { font-size: 14px; font-weight: 700; color: #0f172a; line-height: 1.25; }
.eb-bcard-iban { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: #475569; margin-top: 2px; }
.eb-bcard-meta { font-size: 11px; color: #15803d; font-weight: 600; margin-top: 3px; }
.eb-bcard-balance { font-size: 21px; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; line-height: 1.15; }
.eb-bcard-balance.is-masked { color: #94a3b8; font-weight: 700; }
.eb-bcard-sub { font-size: 11.5px; color: #64748b; margin-top: 3px; }
.eb-bcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.eb-pill-ok { display: inline-flex; align-items: center; gap: 6px; background: #e6f9f0; color: #0f6b3e; border: 1px solid #a7f3d0; border-radius: 6px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; }
.eb-status-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid #cbd5e1; background: #f8fafc; }
.eb-status-bar.is-connected { background: #e6f9f0; border-color: #a7f3d0; }
.eb-status-bar.is-ready { background: #eff6ff; border-color: #bfdbfe; }
.eb-status-title { font-weight: 700; color: #0f172a; font-size: 13px; }
.eb-status-sub { font-size: 12px; color: #475569; margin-top: 2px; }
.eb-inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eb-inline-actions form { display: inline; margin: 0; }

/* Card autorizare Enable Banking -> Bancă */
.eb-consent-card { max-width: 580px; margin: 12px auto; padding: 26px 28px; }
.eb-consent-logos { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4px 0 18px; }
.eb-logo-box { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; color: #fff; background: #0f172a; }
.eb-logo-box.is-uc { background: #e0001b; font-size: 22px; }
.eb-logo-link { color: #2563eb; font-weight: 800; font-size: 18px; }
.eb-consent-head { text-align: center; margin-bottom: 20px; }
.eb-consent-head h1 { font-size: 18px; margin: 0 0 6px; }
.eb-consent-head p { margin: 0; color: #64748b; font-size: 12.5px; }
.eb-benefit-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.eb-benefit-item { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 11px 14px; }
.eb-benefit-item strong { display: block; font-size: 12.5px; color: #0f172a; margin-bottom: 2px; }
.eb-benefit-item span { display: block; font-size: 11.5px; color: #64748b; line-height: 1.4; }
.eb-consent-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid #e2e8f0; }

/* Selector client inteligent & compozitor factură stil FGO */
.fgo-composer { padding: 14px 18px 18px; gap: .75rem; }
.fgo-composer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.fgo-composer-top-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fgo-doc-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.fgo-top-field select, .fgo-top-field input { width: auto; min-height: 32px; height: 32px; font-weight: 600; background: #f8fafc; }
.fgo-next-num { display: inline-flex; align-items: center; height: 32px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 5px; background: #f3f6fb; font-family: Consolas, ui-monospace, monospace; font-weight: 700; color: var(--ink); font-size: 12.5px; }
.fgo-title-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 13px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; }

.fgo-meta-grid { display: grid; grid-template-columns: minmax(290px, 2.5fr) minmax(135px, .95fr) minmax(150px, 1.05fr) minmax(150px, 1.1fr); gap: 12px; align-items: start; }
@media (max-width: 980px) { .fgo-meta-grid { grid-template-columns: 1fr 1fr; } .fgo-client-col { grid-column: 1 / -1; } }
@media (max-width: 600px) { .fgo-meta-grid { grid-template-columns: 1fr; } }

.fgo-client-bar { display: flex; align-items: stretch; gap: 6px; }
.fgo-combo { flex: 1 1 auto; min-width: 0; position: relative; display: flex; align-items: center; min-height: 34px; background: #eef3fb; border: 1px solid #cbd5e1; border-radius: 6px; transition: border-color .15s, background .15s, box-shadow .15s; }
.fgo-combo:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(47,122,229,.2); }
.fgo-combo-ico { display: inline-flex; align-items: center; justify-content: center; padding-left: 10px; color: #64748b; pointer-events: none; }
.fgo-combo > input#client_search { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; box-shadow: none; min-height: 32px; padding: 0 6px 0 8px; font-weight: 500; color: var(--ink); }
.fgo-combo > input#client_search:focus { border: 0; box-shadow: none; outline: none; }
.fgo-combo-clear { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 28px; border: 0; background: transparent; color: #64748b; font-size: 16px; line-height: 1; cursor: pointer; border-radius: 4px; flex-shrink: 0; }
.fgo-combo-clear:hover { background: rgba(15,23,42,.07); color: #0f172a; }
.fgo-combo-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-left: 1px solid rgba(148,163,184,.35); background: transparent; color: #475569; cursor: pointer; flex-shrink: 0; border-radius: 0 5px 5px 0; }
.fgo-combo-toggle:hover { background: rgba(47,122,229,.09); color: var(--accent-strong); }
.fgo-client-btn { width: 34px; min-height: 34px; padding: 0; flex-shrink: 0; background: #f8fafc; }

.invoice-client-suggestions { top: calc(100% + 4px); left: 0; right: 0; width: 100%; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; z-index: 35; }
.suggestions li.s-group-head { position: sticky; top: 0; z-index: 2; background: #f1f5f9; border-bottom: 1px solid var(--line); padding: 6px 10px; min-height: 0; font-size: .78rem; font-weight: 700; color: #475569; cursor: default; }
.suggestions li.s-group-head:hover { background: #f1f5f9; }
.suggestions .s-create-option { border-top: 1px dashed var(--line); background: #fafbfc; font-weight: 600; color: var(--accent-strong); }
.suggestions .s-create-option[aria-selected="true"], .suggestions .s-create-option:hover { background: var(--accent-soft); }

.fgo-billing-line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: .85rem; line-height: 1.35; }
.fgo-billing-label { color: var(--accent-strong); font-style: italic; font-weight: 600; }
.fgo-billing-val { color: #475569; }
.btn-link-inline { border: 0; background: none; padding: 0; font: inherit; font-size: .84rem; font-weight: 600; color: var(--accent-strong); cursor: pointer; text-decoration: underline; }
.btn-link-inline:hover { color: var(--accent-strong-hover); }

.np-ask-box { padding: 11px 14px; border: 1px solid #f0c36d; border-left: 4px solid #d97706; border-radius: 8px; background: #fffbeb; }
.np-ask-title { margin: 0 0 4px; font-size: .94rem; color: #1e293b; }
.np-ask-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.new-partner-panel { padding: 14px 16px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; }
.new-partner-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid #e2e8f0; }
.new-partner-head .help { margin: 2px 0 0; }

.fgo-section-divider { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; color: #64748b; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.fgo-section-divider::before, .fgo-section-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

.fgo-line-grid { grid-template-columns: 1.5fr 2.2fr .95fr 1.15fr .85fr 1.05fr 1.05fr; }
.fgo-line-grid .line-desc { grid-column: 1 / 5; }
.fgo-line-grid .line-exempt { grid-column: 5 / -1; }
@media (max-width: 1100px) { .fgo-line-grid { grid-template-columns: 1fr 1fr; } .fgo-line-grid .line-desc, .fgo-line-grid .line-exempt, .fgo-line-grid .line-name, .fgo-line-grid .line-product { grid-column: 1 / -1; } }
.fgo-line-output { display: flex; align-items: center; justify-content: flex-end; min-height: 32px; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 5px; background: #eef3fb; font-weight: 700; color: var(--ink); }
.fgo-line-foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.fgo-line-foot [data-remove-line] { margin-top: 0; color: #64748b; }
.fgo-line-foot [data-remove-line]:hover { color: var(--err-ink); }
.fgo-articles-bar { display: flex; align-items: center; gap: 8px; margin-top: -4px; }

.fgo-bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start; padding-top: 6px; border-top: 1px solid var(--line); }
@media (max-width: 820px) { .fgo-bottom-grid { grid-template-columns: 1fr; } }
.stack-fields { display: grid; gap: 8px; }
.fgo-extra-date { margin-top: 6px; max-width: 240px; }
.fgo-summary-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; display: grid; gap: 8px; }
.fgo-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .92rem; color: #475569; padding: 0 4px; font-variant-numeric: tabular-nums; }
.fgo-summary-row strong { color: var(--ink); }
.fgo-summary-grand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 6px; background: #151b26; color: #fff; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.fgo-summary-grand strong { font-size: 1.08rem; font-weight: 800; }

.fgo-composer-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 6px; }

/* Carduri oficiale de test NETOPIA Sandbox (pagina intermediară de plată) */
.sandbox-cards-box { margin: 14px 0 16px; padding: 12px 14px; border: 1px solid #f0c36d; border-left: 4px solid #d97706; border-radius: 8px; background: #fffbeb; text-align: left; }
.sandbox-cards-title { margin: 0 0 8px; font-size: .88rem; font-weight: 700; color: #92400e; }
.sandbox-cards-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .84rem; align-items: baseline; }
.sandbox-cards-list dt { font-weight: 600; color: #475569; }
.sandbox-cards-list dd { margin: 0; color: #0f172a; }
.sandbox-cards-list code { font-weight: 700; color: #1e40af; background: #eff6ff; padding: 1px 5px; border-radius: 4px; }

/* Modul ANAF RO e-Factura (SPV) & verificare TOTP la schimbări sensibile */
.anaf-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.anaf-toggle-box { padding: 11px 14px; border: 1px solid #cbd5e1; border-left: 4px solid var(--accent-strong); border-radius: 8px; background: #f8fafc; }
.totp-box { padding: 11px 14px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fcfdff; }
.totp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.totp-input { width: 150px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: .2em; text-align: center; }
.totp-inline-input { width: 128px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .12em; text-align: center; }
.anaf-sep-top { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.anaf-actions-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 980px) { .grid-3 { grid-template-columns: 1fr; } }
.compact-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.xml-preview { max-height: 520px; overflow: auto; padding: 14px; border: 1px solid #1e293b; border-radius: 8px; background: #0f172a; color: #e2e8f0; font-size: .82rem; line-height: 1.45; }
.text-danger { color: var(--err-ink); }

/* FGO v4 Popover firmă activă, element direct meniu & indicatori extinși */
.fgo-org-menu { min-width: 272px; padding: 0; overflow: hidden; border-radius: 8px; box-shadow: 0 12px 32px rgba(15,23,42,.22); }
.fgo-org-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--accent); color: #fff; }
.fgo-org-av { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.45); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.fgo-org-user { min-width: 0; }
.fgo-org-user b { display: block; font-size: 12.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fgo-org-user span { display: block; font-size: 11px; color: rgba(255,255,255,.85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fgo-org-sec { padding: 8px 8px 6px; border-bottom: 1px solid var(--line); }
.fgo-org-lbl { display: block; padding: 2px 8px 4px; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.fgo-org-active { padding: 4px 8px 6px; border-radius: 5px; background: var(--accent-soft); }
.fgo-org-active b { display: block; font-size: 12.5px; color: var(--accent-strong); }
.fgo-org-active small { display: block; font-size: 11px; color: var(--ink-2); margin-top: 1px; }
.dd-menu.fgo-org-menu form.fgo-org-logout { margin: 0; padding: 6px 8px 8px; border-top: 0; }
.dd-menu.fgo-org-menu form.fgo-org-logout button { color: var(--err-ink); font-weight: 600; }
.dd-menu.fgo-org-menu form.fgo-org-logout button:hover { background: var(--err-bg); color: var(--err-ink); }
.nav-item-soon { color: var(--side-muted); opacity: .68; cursor: default; }
.nav-item-soon:hover { background: transparent; color: var(--side-muted); }
.bank-head-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bank-total-ron { font-size: 13.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fgo-stat-pills-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fgo-stat-pills-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 14px; }
@media (max-width: 800px) {
    .fgo-stat-pills-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fgo-stat-pills-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.main:focus { outline: none; }
.btn-xs { padding: 3px 8px; min-height: 24px; font-size: .78rem; border-radius: 5px; }
.purchase-lines-box { display: grid; gap: 10px; margin: 10px 0; }
.purchase-line-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; align-items: end; }
.purchase-line-wide { grid-column: span 2; }
@media (max-width: 820px) { .purchase-line-wide { grid-column: 1 / -1; } }

/* Modul Cereri Ofertă, Oferte de Preț & Confirmări Comandă */
.quote-pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
@media (max-width: 960px) { .quote-pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quote-step { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.quote-step.is-done { border-color: #10b981; background: #f0fdf4; }
.quote-step.is-current { border-color: var(--accent-strong); border-width: 2px; background: #eff6ff; }
.quote-step.is-closed { border-color: #f87171; background: #fef2f2; }
.quote-step-num { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.quote-step b { display: block; font-size: 13px; margin-top: 2px; color: var(--ink); }
.quote-step span { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.quote-thread { display: grid; gap: 10px; }
.quote-email-item { padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fcfdff; }
.quote-email-item.is-outbound { border-left: 4px solid var(--accent-strong); background: #f8fafc; }
.quote-email-item.is-inbound { border-left: 4px solid #10b981; }
.quote-email-body { white-space: pre-wrap; word-break: break-word; font-size: .86rem; line-height: 1.5; margin: 8px 0 0; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; max-height: 280px; overflow: auto; }
.quote-total-bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); font-size: 1.02rem; font-weight: 700; margin-top: 8px; }
.is-hidden { display: none !important; }
