/* public_html/assets/app.css — tema dark de bază (CitySoft e-Factura)
   Scheletul de stil. Dashboard-ul complet (carduri, tabel, acțiuni) vine
   în pasul următor; aici sunt doar tokenii și shell-ul de bază. */

:root {
    --bg:        #0b0f17;
    --bg-panel:  #111726;
    --bg-elev:   #161d2e;
    --line:      #223049;
    --txt:       #e6ecf5;
    --txt-dim:   #8c9bb5;
    --accent:    #2f7bff;
    --accent-2:  #1f5fd0;
    --ok:        #2ecc71;
    --warn:      #e2a53b;
    --err:       #e5533c;
    --radius:    12px;
    --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--txt);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Login ─── */
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
}
.login-card h1 {
    font-size: 20px;
    margin: 0 0 4px;
}
.login-card .sub {
    color: var(--txt-dim);
    margin: 0 0 24px;
    font-size: 14px;
}
.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 13px;
    color: var(--txt-dim);
    margin-bottom: 6px;
}
.field input {
    width: 100%;
    padding: 11px 13px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--txt);
    font-size: 15px;
}
.field input:focus {
    outline: none;
    border-color: var(--accent);
}
.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.btn:hover { background: var(--accent-2); }
.alert {
    background: rgba(229,83,60,.12);
    border: 1px solid rgba(229,83,60,.35);
    color: #f2b3a8;
    padding: 10px 13px;
    border-radius: 9px;
    font-size: 14px;
    margin-bottom: 16px;
}
.alert.ok {
    background: rgba(46,204,113,.12);
    border-color: rgba(46,204,113,.35);
    color: #a7e8c4;
}
.btn-inline {
    width: auto;
    display: inline-block;
    padding: 10px 18px;
}

/* ─── Brand (login / conectare SPV) — identitate CitySoft albastru ─── */
.brand-page {
    background: #eef3f6;
    min-height: 100vh;
}
.brand-card {
    width: 100%;
    max-width: 420px;
    background: #19658D;              /* fundal identic cu logo.gif, ca să se contopească */
    border-radius: 14px;
    padding: 28px 34px 34px;
    box-shadow: 0 18px 50px rgba(15,55,80,.28);
}
.brand-logo {
    text-align: center;
    margin-bottom: 6px;
}
.brand-logo img { display: inline-block; }
.brand-title {
    text-align: center;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 6px 0 22px;
}
.brand-field { margin-bottom: 16px; }
.brand-field input {
    width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #cfdbe4;
    border-radius: 10px;
    color: #17303f;
    font-size: 15px;
}
.brand-field input::placeholder { color: #8aa1b0; }
.brand-field-suffix { position: relative; }
.brand-field-suffix input { padding-right: 118px; }
.brand-field-suffix .suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b8598;
    font-size: 14px;
    pointer-events: none;
}
.brand-field input:focus {
    outline: none;
    border-color: #0d4d6e;
    box-shadow: 0 0 0 3px rgba(13,77,110,.2);
}
.brand-btn {
    width: 100%;
    padding: 14px;
    background: #fff;
    color: #14425c;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.brand-btn:hover { background: #eaf1f5; }
.brand-page .alert {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.3);
    color: #ffe3dc;
}

/* Spinner (pagina de conectare SPV) */
.spinner {
    width: 42px;
    height: 42px;
    margin: 6px auto 0;
    border: 4px solid rgba(255,255,255,.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.brand-mark { margin-bottom: 6px; text-align: center; }
.brand-mark img { display: inline-block; }
.sidebar-user .firma { text-align: center; }

.brand-links {
    margin-top: 18px;
    text-align: center;
}
.brand-links a {
    color: #cfe3ef;
    font-size: 14px;
    text-decoration: none;
}
.brand-links a:hover { color: #fff; text-decoration: underline; }

/* ─── Shell dashboard ─── */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px;
    background: var(--bg-panel);
    border-right: 1px solid var(--line);
    padding: 22px 16px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
    overflow: hidden;
}
.sidebar .brand {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 4px;
}
.sidebar .firma {
    color: var(--txt-dim);
    font-size: 13px;
    margin-bottom: 24px;
}
.sidebar nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--txt);
    margin-bottom: 4px;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: var(--bg-elev); text-decoration: none; }
.sidebar nav a.activ {
    background: var(--bg-elev);
    border-left-color: var(--accent);
    font-weight: 600;
}

.main { flex: 1; padding: 28px 32px; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.topbar h1 { font-size: 22px; margin: 0; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; }
.badge.ok  { background: rgba(46,204,113,.12); color: var(--ok); }
.badge.ok .dot  { background: var(--ok); }
.badge.off { background: rgba(229,83,60,.12); color: var(--err); }
.badge.off .dot { background: var(--err); }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.card .k { color: var(--txt-dim); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.card .v { font-size: 28px; font-weight: 700; margin-top: 6px; }
.card .sub { margin-top: 8px; font-size: 12.5px; color: var(--txt-dim); }
.card .sub.down { color: var(--err); }
.card .sub.up { color: var(--ok); }

.note {
    background: var(--bg-panel);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 20px;
    color: var(--txt-dim);
}

/* ─── Superadmin: tabele, formulare, tag-uri ─── */
.sec { font-size: 15px; color: var(--txt-dim); text-transform: uppercase; letter-spacing:.04em; margin: 22px 0 10px; }
.bara { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }

/* select-uri stilizate (dark, cu chevron) — integrate în temă */
select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-color: var(--bg-elev);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%238c9bb5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
    border: 1px solid var(--line); border-radius: 9px; color: var(--txt);
    padding: 9px 34px 9px 13px; font-size: 14px; font-family: inherit; cursor: pointer;
}
select:hover { border-color: #33506f; }
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,123,255,.15); }
select option { background: var(--bg-panel); color: var(--txt); }

.tbl { width: 100%; border-collapse: collapse; background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tbl th { color: var(--txt-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing:.03em; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--bg-elev); }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.gol { color: var(--txt-dim); text-align: center; padding: 22px; }
.tbl td.act { display: flex; gap: 12px; align-items: center; }
.tbl td.act form { display: inline; margin: 0; }

.tag { display:inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; background: var(--bg-elev); color: var(--txt-dim); }
.tag.ok  { background: rgba(46,204,113,.14); color: var(--ok); }
.tag.err { background: rgba(229,83,60,.14); color: var(--err); }
.tag.warn{ background: rgba(226,165,59,.14); color: var(--warn); }

.lnk, .lnk-del { background:none; border:none; padding:0; font-size:14px; cursor:pointer; font-family:inherit; }
.lnk { color: var(--accent); }
.lnk-del { color: var(--err); }
.lnk:hover, .lnk-del:hover { text-decoration: underline; }

.form { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
@media (max-width: 720px){ .grid2 { grid-template-columns: 1fr; } }
.fld label, .form > label { display:block; font-size: 13px; color: var(--txt-dim); margin-bottom: 6px; }
.fld input, .fld select, .form textarea, .anaf-box input {
    width: 100%; padding: 10px 12px; background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 8px; color: var(--txt); font-size: 14px; font-family: inherit;
}
.fld input:focus, .fld select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.checks { display:flex; gap: 22px; flex-wrap: wrap; margin: 16px 0; }
.checks label { display:flex; gap:8px; align-items:center; color: var(--txt); font-size: 14px; }
.checks input { width:auto; }

.anaf-box { background: var(--bg-elev); border:1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; }
.anaf-box .row { display:flex; gap:10px; }
.anaf-box .row input { flex:1; }
.hint { color: var(--txt-dim); font-size: 13px; margin-top: 8px; }

.detalii { display:grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; background: var(--bg-panel); border:1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.detalii > div { display:flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.detalii .k { color: var(--txt-dim); font-size: 13px; }
textarea.xml { min-height: 380px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; white-space: pre; }
.claude-sugestie {
    background: rgba(47,123,255,.08); border: 1px solid rgba(47,123,255,.35);
    border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
}
.claude-sugestie .cs-cap { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.claude-sugestie .cs-sumar { color: var(--txt); font-size: 14px; line-height: 1.6; }
.claude-sugestie .hint { margin-top: 10px; }

/* overlay procesare Claude */
.overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(6,10,18,.72); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
}
.overlay.ascuns { display: none; }
.overlay-box {
    background: var(--bg-panel); border: 1px solid var(--line); border-radius: 14px;
    padding: 30px 34px; text-align: center; max-width: 420px;
}
.overlay-box .spinner { width: 44px; height: 44px; margin: 0 auto 16px; border: 4px solid rgba(47,123,255,.25); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.overlay-txt { font-size: 16px; font-weight: 600; color: var(--txt); }
.overlay-sub { margin-top: 8px; font-size: 13px; color: var(--txt-dim); line-height: 1.5; }
.bara form { margin: 0; }

/* ─── KPI: latura de sus colorata ─── */
.cards-kpi .card { border-top: 3px solid var(--line); }
.cards-kpi .card:nth-child(1) { border-top-color: var(--accent); }
.cards-kpi .card:nth-child(2) { border-top-color: var(--ok); }
.cards-kpi .card:nth-child(3) { border-top-color: var(--warn); }
.cards-kpi .card:nth-child(4) { border-top-color: #7b8aa5; }

/* ─── Tabelul de facturi (user): coloane aliniate ─── */
.facturi-tbl { table-layout: fixed; }
.facturi-tbl th, .facturi-tbl td { vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.facturi-tbl .c-data   { width: 9%;  white-space: nowrap; }
.facturi-tbl .c-fact   { width: 13%; white-space: nowrap; }
.facturi-tbl .c-client { width: 28%; }
.facturi-tbl .c-suma   { width: 12%; text-align: left; }   /* pret mai la stanga, langa client */
.facturi-tbl th.c-suma { text-align: left; }
.facturi-tbl td.c-suma { text-align: left; }   /* invinge .tbl td.num pt. aliniere cu capul */
.facturi-tbl .c-status { width: 15%; }
.facturi-tbl .c-act    { width: 23%; white-space: nowrap; }
.facturi-tbl td.c-act { display: table-cell; }   /* anuleaza flex-ul generic pt. aliniere */

/* status pill + index */
.tag.clickabil { cursor: pointer; }
.index-line { margin-top: 5px; font-size: 12px; color: var(--txt-dim); }
.index-line.ascuns { display: none; }

/* iconițe de acțiune */
.c-act .ico-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 30px; border-radius: 7px;
    color: var(--txt-dim); background: var(--bg-elev);
    border: 1px solid var(--line); cursor: pointer; margin-right: 6px;
    vertical-align: middle;
}
.c-act form { display: inline; margin: 0; }
.c-act .ico-btn:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.c-act .ico-btn.trimisa { color: var(--ok); border-color: rgba(46,204,113,.4); }

/* ─── Sidebar user: meniu cu submeniuri + status SPV jos ─── */
.sidebar-user { display: flex; flex-direction: column; }
.sidebar-user .meniu { flex: 1; overflow-y: auto; margin-top: 6px; }
.meniu .grup {
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--txt-dim); margin: 16px 0 6px; padding-left: 6px;
}
.meniu .mnu, .meniu .parent-lbl, .meniu .sub a {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 10px; border-radius: 8px; color: var(--txt);
    font-size: 14px; border-left: 3px solid transparent; text-decoration: none;
}
.meniu .parent-lbl { font-weight: 600; }
.meniu a:hover { background: var(--bg-elev); text-decoration: none; }
.meniu .sub { margin: 2px 0 4px 10px; border-left: 1px solid var(--line); padding-left: 6px; }
.meniu .sub a { padding: 8px 10px; font-size: 13.5px; }
.meniu a.activ { background: var(--bg-elev); border-left-color: var(--accent); font-weight: 600; }
.meniu .dezactivat { color: var(--txt-dim); opacity: .55; cursor: default; }
.meniu .dezactivat:hover { background: transparent; }
.meniu svg { flex-shrink: 0; color: var(--txt-dim); width: 17px; height: 17px; }

.sidebar-jos { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.sidebar-jos form { margin: 0; }
.spv-status {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 11px; border-radius: 9px; font-size: 14px; font-weight: 600;
    border: none; font-family: inherit;
}
.spv-status .dot { width: 8px; height: 8px; border-radius: 50%; }
.spv-status.ok  { background: rgba(46,204,113,.15); color: var(--ok); cursor: default; }
.spv-status.ok .dot  { background: var(--ok); }
.spv-status.off { background: var(--accent); color: #fff; cursor: pointer; }
.spv-status.off .dot { background: #fff; }
.spv-status.off:hover { background: var(--accent-2); }
.iesire { display: block; text-align: center; margin-top: 10px; color: var(--txt-dim); font-size: 13px; }

/* ─── Filtru facturi ─── */
.filtru { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.filtru input {
    flex: 1; max-width: 440px; padding: 10px 14px;
    background: var(--bg-panel); border: 1px solid var(--line);
    border-radius: 9px; color: var(--txt); font-size: 14px;
}
.filtru input:focus { outline: none; border-color: var(--accent); }
/* butoane mai palide, mai putin saturate */
.filtru .btn { background: #33506f; }
.filtru .btn:hover { background: #3b5c7e; }
.btn-toate {
    padding: 9px 18px; border-radius: 9px; border: 1px solid #3a5471;
    color: #93a9c2; font-size: 14px; text-decoration: none;
}
.btn-toate.activ { background: #33506f; border-color: #33506f; color: #e6ecf5; }
.btn-toate:hover { text-decoration: none; border-color: #4a668a; }

/* ─── Factură: layout document (vizualizare) ─── */
.factura-sheet {
    background: #f4f6f8; color: #1b2733; border-radius: 12px;
    padding: 28px 32px; max-width: 940px; margin-bottom: 18px;
}
.fs-head { display: flex; justify-content: space-between; gap: 30px; }
.fs-nume { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.fs-linii div { font-size: 12.5px; line-height: 1.7; }
.fs-cl { min-width: 270px; }
.fs-cl-tit { font-weight: 700; text-decoration: underline; margin-bottom: 6px; }
.fs-titlu { display: flex; justify-content: flex-end; align-items: center; gap: 26px; margin: 16px 0 12px; }
.fs-f { font-size: 26px; font-weight: 800; }
.fs-meta td { font-size: 13px; padding: 1px 6px; }
.fs-meta td:first-child { color: #5a6b7a; }
.fs-tbl { width: 100%; border-collapse: collapse; margin-top: 6px; }
.fs-tbl th { background: #c9d3dc; color: #1b2733; font-size: 11.5px; padding: 8px; border: 1px solid #b4c0cb; text-align: center; line-height: 1.25; }
.fs-tbl td { padding: 8px; border: 1px solid #d3dbe2; font-size: 13px; text-align: center; }
.fs-tbl td.l, .fs-tbl th.l { text-align: left; }
.fs-tbl td.l { font-weight: 600; }
.fs-tbl td.r { text-align: right; }
.fs-tbl .fs-tot td { font-weight: 700; background: #eef1f4; }
.fs-plata { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; margin-top: 14px; font-weight: 700; font-size: 15px; }
.fs-suma { background: #c9d3dc; padding: 4px 18px; border-radius: 4px; }
.fs-legal { margin-top: 20px; font-size: 11px; color: #5a6b7a; line-height: 1.5; }

.fs-actiuni { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 20px; max-width: 940px; }
.fs-actiuni form { margin: 0; }
.fs-actiuni .hint { width: 100%; margin: 4px 0 0; }
.btn-confirma {
    background: #fff; color: #2f6fb0; border: 1px solid #9fc0e0;
    padding: 13px 32px; border-radius: 8px; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: inherit;
}
.btn-confirma:hover { background: #eef6fd; }
.btn-inchide {
    background: var(--bg-elev); border: 1px solid var(--line); color: var(--txt);
    padding: 11px 22px; border-radius: 9px; text-decoration: none; font-size: 14px;
}
.btn-inchide:hover { border-color: var(--accent); text-decoration: none; }

/* ─── Adaugă client ─── */
.client-nou { max-width: 760px; margin: 6px auto 24px; }
.anaf-cauta {
    background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 22px; margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.anaf-cauta > label { font-weight: 700; color: var(--txt); font-size: 16px; white-space: nowrap; }
.anaf-cauta .row { display: flex; gap: 10px; flex: 1; min-width: 260px; }
.anaf-cauta .row input {
    flex: 1; padding: 10px 14px; background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 9px; color: var(--txt); font-size: 14px;
}
.anaf-cauta .hint { width: 100%; margin: 0; }

.client-form { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.cf-rand { display: grid; grid-template-columns: 230px 1fr; align-items: center; gap: 16px; margin-bottom: 14px; }
.cf-rand label { text-align: right; color: var(--txt-dim); font-weight: 600; font-size: 14px; }
.cf-rand input {
    padding: 10px 13px; background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 9px; color: var(--txt); font-size: 14px; font-family: inherit;
}
.cf-rand input:focus { outline: none; border-color: var(--accent); }
@media (max-width: 640px){ .cf-rand { grid-template-columns: 1fr; } .cf-rand label { text-align: left; } }
.btn-salveaza-client {
    width: 100%; margin-top: 10px; padding: 14px; background: #33506f; color: #fff;
    border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn-salveaza-client:hover { background: #3b5c7e; }

/* ─── Paginare ─── */
.paginare { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 8px; }
.paginare .pg {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 36px; border: 1px solid var(--line); border-radius: 9px;
    color: var(--txt); font-size: 18px; text-decoration: none; background: var(--bg-panel);
}
.paginare .pg:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.paginare .pg.gol { opacity: .3; cursor: default; }
.paginare .pg-info { color: var(--txt-dim); font-size: 14px; }

.client-ok { display: inline-flex; align-items: center; gap: 7px; }
.client-ok .ck {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(46,204,113,.16); color: var(--ok); font-size: 12px;
}
.btn-client {
    background: rgba(229,83,60,.12); border: 1px solid rgba(229,83,60,.4);
    color: #f0a99d; padding: 7px 12px; border-radius: 8px; font-size: 13px;
    cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn-client:hover { background: rgba(229,83,60,.2); }

/* ─── Import SPV (facturi primite) ─── */
.import-spv {
    background: var(--bg-panel); border: 1px solid var(--line); border-top: 3px solid var(--accent);
    border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px;
}
.imp-rand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; font-size: 15px; }
.imp-rand input {
    width: 84px; padding: 9px 10px; text-align: center; background: var(--bg-elev);
    border: 1px solid var(--line); border-radius: 9px; color: var(--txt); font-size: 15px; font-family: inherit;
}
.imp-rand input:focus { outline: none; border-color: var(--accent); }
.imp-rand .btn { margin-left: 8px; }
.import-spv .hint { margin-top: 10px; }
.import-spv .imp-err { color: var(--err); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.filtru-rand { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.filtru-rand .filtru { flex: 1; margin-bottom: 0; }
.filtru-rand .contor { color: var(--txt-dim); font-size: 13px; white-space: nowrap; }

.primite-tbl { table-layout: fixed; }
.primite-tbl th, .primite-tbl td { padding: 10px 10px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.primite-tbl th { line-height: 1.3; }
.primite-tbl td { white-space: nowrap; }
.primite-tbl td.c-furn { white-space: normal; }
.primite-tbl .c-data { width: 8%; }
.primite-tbl .c-nr   { width: 12%; }
.primite-tbl .c-furn { width: 21%; }
.primite-tbl .c-cf   { width: 9%; }
.primite-tbl .c-val  { width: 9%; }
.primite-tbl .c-tva  { width: 8%; }
.primite-tbl .c-idx  { width: 8%; }
.primite-tbl .c-act  { width: 8%; }
.primite-tbl td.c-idx { font-size: 13px; color: var(--txt-dim); }
.primite-tbl td.c-act { display: table-cell; }
.primite-tbl .c-act .ico-btn { margin-right: 4px; }

/* ─── Meniu: submeniuri pliabile (deschise doar pe secțiunea activă) ─── */
.meniu details.parent > summary { list-style: none; cursor: pointer; user-select: none; }
.meniu details.parent > summary::-webkit-details-marker { display: none; }
.meniu details.parent > summary::after {
    content: ""; margin-left: auto; width: 7px; height: 7px;
    border-right: 1.6px solid var(--txt-dim); border-bottom: 1.6px solid var(--txt-dim);
    transform: rotate(-45deg); transition: transform .15s;
}
.meniu details.parent[open] > summary::after { transform: rotate(45deg); }
.meniu details.parent > summary:hover { background: var(--bg-elev); }

/* ─── Setări Saga ─── */
.saga-setari { display: flex; flex-direction: column; gap: 18px; }
.saga-bara { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.saga-bara .hint { margin: 0; }
.saga-btns { display: flex; gap: 10px; }
.saga-btns .btn-inchide { cursor: pointer; font-family: inherit; }
.saga-panou {
    background: var(--bg-panel); border: 1px solid var(--line); border-left: 3px solid var(--line);
    border-radius: var(--radius); padding: 18px 22px;
}
.saga-panou.iesiri  { border-left-color: var(--err); }
.saga-panou.intrari { border-left-color: var(--ok); }
.saga-cap { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.saga-cap .hint { margin-top: 2px; }
.saga-tit { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.saga-panou.iesiri .saga-tit  { color: #f2a293; }
.saga-panou.intrari .saga-tit { color: #8fe0b3; }
.saga-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--txt-dim); margin: 16px 0 10px; font-weight: 600; }
.saga-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px 16px; }
.saga-fld.lat3 { grid-column: span 3; }
.saga-fld label { display: block; font-size: 13px; color: var(--txt-dim); margin-bottom: 6px; font-weight: 600; }
.saga-fld input {
    width: 100%; padding: 9px 12px; background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 8px; color: var(--txt); font-size: 14px; font-family: inherit;
}
.saga-fld input:focus { outline: none; border-color: var(--accent); }
@media (max-width: 1100px) { .saga-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .saga-grid { grid-template-columns: 1fr; } .saga-fld.lat3 { grid-column: auto; } }

/* ─── Export Saga — Ieșiri ─── */
.saga-data input[type=date] {
    margin-top: 8px; padding: 8px 12px; background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 9px; color: var(--txt); font-size: 18px; font-family: inherit; color-scheme: dark;
}
.saga-data input[type=date]:focus { outline: none; border-color: var(--accent); }
.saga-bara-tbl { margin-bottom: 14px; }
.saga-tbl { table-layout: fixed; }
.saga-tbl th, .saga-tbl td { vertical-align: middle; white-space: nowrap; }
.saga-tbl .c-prod { width: 16%; }
.saga-tbl .c-cota { width: 8%; text-align: center; }
.saga-tbl .c-n    { width: 10.5%; text-align: right; font-variant-numeric: tabular-nums; }
.saga-tbl .c-cont { width: 13%; text-align: right; }
.saga-tbl td.c-prod { font-weight: 600; }
.saga-tbl td.tare { font-weight: 700; }
.saga-tbl .saga-tot td { font-weight: 700; border-top: 1px solid var(--line); background: var(--bg-elev); }
.cont-pill {
    display: inline-block; min-width: 90px; text-align: center; padding: 4px 12px;
    border: 1px solid var(--line); border-radius: 7px; background: var(--bg-elev); font-weight: 600;
}

/* ─── Export Saga — documente incluse ─── */
.alert.warn { background: rgba(226,165,59,.12); border-color: rgba(226,165,59,.4); color: #f0cf8f; }
.saga-docs { table-layout: fixed; margin-bottom: 24px; }
.saga-docs th, .saga-docs td { vertical-align: middle; }
.saga-docs .c-d  { width: 10%; white-space: nowrap; }
.saga-docs .c-nr { width: 10%; white-space: nowrap; }
.saga-docs .c-cl { width: 24%; }
.saga-docs .c-gr { width: 26%; }
.saga-docs .c-n  { width: 10%; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.saga-docs td.tare { font-weight: 700; }
.saga-docs .saga-tot td { font-weight: 700; border-top: 1px solid var(--line); background: var(--bg-elev); }
.hint-inline { color: var(--txt-dim); font-size: 12.5px; }
.gr-pill {
    display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 6px;
    background: var(--bg-elev); border: 1px solid var(--line); font-size: 12px; white-space: nowrap;
}
.gr-pill.lipsa { border-color: rgba(229,83,60,.5); color: #f0a99d; }

/* ─── Export Saga — Intrări ─── */
.nir-tbl { table-layout: fixed; }
.nir-tbl > thead th, .nir-tbl > tbody > tr > td { vertical-align: middle; }
.nir-tbl .c-tg  { width: 52px; }
.nir-tbl .c-d   { width: 12%; white-space: nowrap; }
.nir-tbl .c-f   { width: 34%; }
.nir-tbl .c-doc { width: 22%; white-space: nowrap; }
.nir-tbl .c-v   { width: 12%; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.nir-tbl .c-a   { width: 18%; text-align: right; white-space: nowrap; }
.nir-tbl td.c-a form { display: inline; margin: 0; }
.nir-tbl td.c-f { font-weight: 600; }
.nir-rand.in-export td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.nir-tg {
    width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line);
    background: var(--bg-elev); color: var(--txt-dim); cursor: pointer; font-size: 16px; line-height: 1;
    transition: transform .15s;
}
.nir-tg.deschis { transform: rotate(90deg); color: var(--accent); border-color: var(--accent); }
.doc-tip { display: inline-block; padding: 3px 10px; margin-right: 6px; border-radius: 6px; background: var(--bg-elev); color: var(--txt-dim); font-size: 13px; }
.btn-nir {
    padding: 6px 14px; border-radius: 8px; border: 1px solid rgba(47,123,255,.5);
    background: rgba(47,123,255,.1); color: #8fb6ff; font-size: 13px; cursor: pointer; font-family: inherit; margin-left: 6px;
}
.btn-nir:hover { background: rgba(47,123,255,.2); }
.btn-nir:disabled { opacity: .4; cursor: not-allowed; }
.btn-nir.adaugata { border-color: rgba(46,204,113,.5); background: rgba(46,204,113,.12); color: var(--ok); }
.btn-nir.adaugata:hover { border-color: var(--err); color: var(--err); background: rgba(229,83,60,.1); }
.nir-det.ascuns { display: none; }
.nir-det > td { background: var(--bg); padding-top: 4px; padding-bottom: 12px; }
.nir-linii { width: 100%; border-collapse: collapse; }
.nir-linii th { font-size: 12px; color: var(--txt-dim); font-weight: 600; text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.nir-linii td { text-align: right; padding: 9px 10px; font-size: 14px; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line); }
.nir-linii th:first-child, .nir-linii td.l { text-align: left; }
.nir-linii td.l { font-weight: 600; }
.nir-linii tr:last-child td { border-bottom: none; }
.saga-gen {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 18px; margin: 18px 0 24px;
}
.saga-gen .hint { margin: 0; flex: 1; min-width: 260px; }
.btn-gen { width: auto; background: #1f9d5a; padding: 12px 24px; }
.btn-gen:hover { background: #1a8a4f; }

/* ─── Motivul respingerii ANAF, sub eticheta de stare ─── */
.index-line.err-line { color: #f0a99d; white-space: normal; line-height: 1.35; }
