/* Librad CEC: stil comun */

@font-face { font-family: "Plex"; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex"; font-weight: 700; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Plex"; font-weight: 700; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --paper:    #EDF1F4;   /* fundal: gri rece, ca biroul */
  --surface:  #FFFFFF;
  --ink:      #17242F;
  --muted:    #586977;
  --line:     #D2DBE3;
  --blue:     #1F5A8A;   /* albastrul butoanelor vechi, mai sobru */
  --blue-ink: #133D5E;
  --blue-bg:  #E5EEF6;
  --ok:       #1C7444;
  --ok-bg:    #E3F3EA;
  --warn:     #B42318;
  --warn-bg:  #FCEBE9;
  --slip:     #FFFDF7;   /* hârtia de bon */
  --radius:   8px;
  --gap:      16px;
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 "Plex", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

a { color: var(--blue); }
a:hover { color: var(--blue-ink); }
:focus-visible { outline: 3px solid #F2B705; outline-offset: 2px; }

/* ---------------------------------------------------------- antet */
.topbar { background: var(--blue-ink); color: #fff; }
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 10px var(--gap);
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap);
}
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.brand:hover { color: #fff; }
.brand-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border: 2px solid #fff; border-radius: 6px; font-size: 16px;
}
.topnav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.topnav a, .topnav .linklike { color: #fff; }
.user-level { color: #B9CDE0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
form.inline { display: inline; margin: 0; }

/* ---------------------------------------------------------- pagină */
.page { max-width: 1280px; margin: 0 auto; padding: 22px var(--gap) 60px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 18px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 28px 0 10px; font-weight: 600; }
h3 { font-size: 16px; margin: 22px 0 8px; font-weight: 600; }
p { max-width: 75ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------------------------------------------------------- mesaje */
.alert {
  border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px;
  border-left: 5px solid; background: var(--surface); max-width: 900px;
}
.alert-ok    { border-color: var(--ok);   background: var(--ok-bg); }
.alert-error { border-color: var(--warn); background: var(--warn-bg); }
.alert-info  { border-color: var(--blue); background: var(--blue-bg); }
.alert strong { display: block; font-size: 17px; }

/* ---------------------------------------------------------- formulare */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 0 0 20px; max-width: 900px;
}
.panel-wide { max-width: none; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 18px; }
.fields .span-all { grid-column: 1 / -1; }
label, .label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
label > input, label > select, label > .date-fields { color: var(--ink); font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 6px; }

input[type=text], input[type=number], input[type=password], input[type=date], input[type=search], select {
  font: inherit; font-size: 15px; color: var(--ink);
  border: 1px solid #B8C5D1; border-radius: 6px; background: #fff;
  padding: 7px 9px; min-height: 38px; width: 100%;
}
input[type=number] { text-align: right; }
input:focus, select:focus { border-color: var(--blue); }
.date-fields { display: flex; gap: 6px; flex-wrap: wrap; }
.date-fields select { width: auto; }
.choices { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; font-weight: 400; color: var(--ink); }
.choices label { flex-direction: row; align-items: center; gap: 6px; font-size: 15px; font-weight: 400; color: var(--ink); }
.choices input { width: 18px; height: 18px; margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.btn {
  font: inherit; font-weight: 600; font-size: 15px; border-radius: 6px; cursor: pointer;
  padding: 9px 18px; min-height: 40px; border: 1px solid transparent; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-ink); color: #fff; }
.btn-secondary { background: #fff; color: var(--blue-ink); border-color: #9FB3C6; }
.btn-secondary:hover { background: var(--blue-bg); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #135633; color: #fff; }

/* ---------------------------------------------------------- tabele */
.table-wrap {
  overflow-x: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin: 0 0 20px;
}
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #E4EAEF; }
table.data thead th {
  background: #F5F8FA; color: var(--muted); font-size: 12.5px; font-weight: 600;
  position: sticky; top: 0; white-space: nowrap; border-bottom: 1px solid var(--line);
}
table.data tbody tr:hover { background: #F7FAFC; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; white-space: nowrap; }
table.data .nowrap { white-space: nowrap; }
table.data tfoot td { font-weight: 700; background: #F5F8FA; border-top: 2px solid var(--line); }
table.data tr.selected { background: var(--blue-bg); }
table.data td.check { width: 40px; text-align: center; }
table.data td.check input { width: 18px; height: 18px; }
table.data input[type=number] { min-width: 120px; }
.table-caption { font-weight: 600; margin: 24px 0 8px; font-size: 16px; }
.empty { padding: 18px; color: var(--muted); }

/* stări */
.status { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: #EEF2F5; color: var(--muted); white-space: nowrap; }
.status-neachitat { background: var(--warn-bg); color: var(--warn); }
.status-achitat, .status-cec, .status-chitanta, .status-achitat_pe_loc { background: var(--ok-bg); color: var(--ok); }

/* ---------------------------------------------------------- bonul cu totaluri */
.receipt {
  background: var(--slip); max-width: 440px; margin: 0 0 24px; padding: 16px 20px 26px;
  border: 1px solid #E3DED0; border-bottom: 0; position: relative;
  box-shadow: 0 1px 0 #E3DED0;
}
.receipt::after { /* marginea rupta a bonului */
  content: ""; position: absolute; left: -1px; right: -1px; bottom: -9px; height: 10px;
  background:
    linear-gradient(135deg, var(--slip) 6px, transparent 0) 0 0 / 12px 10px repeat-x,
    linear-gradient(225deg, var(--slip) 6px, transparent 0) 0 0 / 12px 10px repeat-x;
}
.receipt-title { margin: 0 0 10px; font-size: 15px; text-align: center; font-weight: 700; }
.receipt dl { margin: 0; }
.receipt-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; border-top: 1px dashed #CFC8B4; }
.receipt-row dt { color: #4D5560; }
.receipt-row dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
.receipt-row.total { border-top: 3px double #8F8770; padding-top: 9px; }
.receipt-row.total dt { color: var(--ink); font-weight: 700; }
.receipt-row.total dd { font-size: 20px; font-weight: 700; }
.receipt-row.minus dd { color: var(--warn); }
.receipts { display: flex; flex-wrap: wrap; gap: 0 24px; align-items: flex-start; }
.receipts .receipt { flex: 1 1 300px; }

/* totalul selectat (plăți, CEC-uri) */
.selection-total {
  position: sticky; bottom: 0; background: var(--blue-ink); color: #fff;
  padding: 10px 16px; border-radius: var(--radius); margin: 0 0 16px;
  display: flex; justify-content: space-between; gap: 16px; font-weight: 600;
}
.selection-total output { font-size: 19px; }

/* ---------------------------------------------------------- meniu */
.menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; align-items: start; }
.menu-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 0 8px; }
.menu-group h2 { margin: 8px 18px 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.menu-group ul { list-style: none; margin: 0; padding: 0; }
.menu-group a {
  display: block; padding: 10px 18px; text-decoration: none; color: var(--ink);
  font-weight: 600; border-left: 4px solid transparent;
}
.menu-group a:hover { background: var(--blue-bg); border-left-color: var(--blue); color: var(--blue-ink); }

/* ---------------------------------------------------------- autentificare */
body.login .page { max-width: 420px; padding-top: 10vh; }
body.login h1 { text-align: center; }
.login-panel { display: grid; gap: 16px; }
.login-panel .btn { width: 100%; }

/* ---------------------------------------------------------- telefon */
@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 22px; }
  .topnav { gap: 12px; }
  .user-level { display: none; }
  .panel { padding: 14px; }
  .btn { width: 100%; }
}

/* ---------------------------------------------------------- tipărire */
@media print {
  body { background: #fff; font-size: 12px; }
  .topbar, .no-print, form:not(.print-keep), .selection-total { display: none !important; }
  .page { max-width: none; padding: 0; }
  .table-wrap { border: 0; overflow: visible; }
  table.data th, table.data td { padding: 3px 6px; }
  table.data thead th { position: static; }
  .receipt { box-shadow: none; border: 1px solid #999; }
  .receipt::after { display: none; }
  .pagebreak { page-break-before: always; }
}

/* ---------------------------------------------------------- utilitare */
.flush { margin-top: 0 !important; }
.gap-below { margin-bottom: 20px; }
.w-select { max-width: 420px; }
input.w-xs { width: 60px; } input.w-s { width: 90px; } input.w-m { width: 120px; }
.grow-1 { flex: 1 1 300px; } .grow-2 { flex: 2 1 460px; }
.receipts > .panel { margin-right: 0; }
.actions select { width: auto; max-width: 100%; }

/* ---------------------------------------------------------- grafice */
:root { --series-1: #2a78d6; --series-2: #eb6834; --grid: #E3E9EE; }
.chart {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 0 20px; padding: 14px 16px 12px;
}
.chart figcaption { font-weight: 600; margin-bottom: 8px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.swatch.s1, .s1 { background: var(--series-1); fill: var(--series-1); }
.swatch.s2, .s2 { background: var(--series-2); fill: var(--series-2); }

.hbar { display: grid; gap: 6px; }
.hbar-row { display: grid; grid-template-columns: minmax(90px, 220px) 1fr auto; align-items: center; gap: 12px; font-size: 14px; }
.hbar-row:hover { background: #F7FAFC; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { width: 100%; height: 18px; display: block; }
.hbar-val { text-align: right; white-space: nowrap; font-weight: 600; font-size: 13px; line-height: 1.25; min-width: 90px; }

.chart-scroll { overflow-x: auto; }
.col-chart { width: 100%; max-width: 960px; min-width: 620px; height: auto; display: block; }
.col-chart .grid { stroke: var(--grid); stroke-width: 1; }
.col-chart .axis { stroke: #B8C5D1; stroke-width: 1; }
.col-chart .tick { fill: var(--muted); font-size: 13px; font-family: inherit; }
.col-chart .hit { fill: transparent; }
.col-chart .hit:hover { fill: rgba(31, 90, 138, 0.06); }

@media (max-width: 640px) {
  .hbar-row { grid-template-columns: 90px 1fr auto; gap: 8px; font-size: 13px; }
  .hbar-val { min-width: 70px; }
}
@media print {
  .chart { break-inside: avoid; border: 1px solid #999; }
}
input.w-cif { width: 170px; }
input.w-reg { width: 150px; }
#anaf-status:empty { display: none; }
#anaf-status .alert { margin: 0; }
@media (min-width: 700px) { .fields .span-2 { grid-column: span 2; } }
/* rânduri alternante: rândurile pare pe fundal verde foarte deschis */
table.data.zebra tbody tr:nth-child(even) { background: #EAF7F1; }
table.data.zebra tbody tr:hover { background: #DCEFE6; }
/* rândul în care scrii se evidențiază */
table.data tbody tr:focus-within { background: var(--blue-bg) !important; box-shadow: inset 4px 0 0 var(--blue); }

/* ---------------------------------------------------------- note de transfer (Total Z pe lună) */
.print-only { display: none; }
table.notes .group-head th { background: var(--blue-bg); color: var(--blue-ink); font-size: 15px; text-align: left; padding: 9px 10px; }
table.notes tbody.note tr:first-child td { border-top: 2px solid var(--line); }
table.notes tbody.note tr:first-child td:first-child { font-weight: 600; }
table.notes .note-info { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
table.notes .acc { font-variant-numeric: tabular-nums; }
table.notes input.stas { width: 130px; min-width: 0; min-height: 32px; padding: 4px 8px; }
table.notes output { font-weight: 600; }
@media print {
  .print-only { display: block; }
  table.notes input.stas { border: 0; padding: 0; min-height: 0; text-align: right; font: inherit; }
  table.notes .group-head th { background: #eee; }
  table.notes tbody.note { break-inside: avoid; }
}
.gap-top { margin-top: 14px; }
.settings-table input[type=text] { min-width: 150px; }
.settings-table input[type=number] { width: 100px; min-width: 0; }
.settings-table select { min-width: 120px; }
.settings-table .unit { display: inline-flex; align-items: center; gap: 4px; }
.settings-table tr.new-row td { background: #FAFBFC; }
@media print {
  table.data tbody tr:focus-within { background: none !important; box-shadow: none; }
  input:focus, :focus-visible { outline: none !important; }
  table.notes input.stas::-webkit-inner-spin-button { display: none; }
}

/* ---------------------------------------------------------- Total Z pe lună: totul pe o singură pagină A4 la tipărire */
@media print {
  @page { size: A4 portrait; margin: 7mm; }
  .page-avz { font-size: 7.5pt; line-height: 1.2; }
  .page-avz h1 { font-size: 11pt; margin: 0 0 1mm; display: inline-block; }
  .page-avz .print-only { display: inline-block; margin: 0 0 0 3mm; font-size: 9pt; font-weight: 700; }
  .page-avz h2 { font-size: 9pt; margin: 2mm 0 1mm; }
  .page-avz .alert, .page-avz p.muted { display: none !important; }
  .page-avz .table-wrap { margin: 0 0 1.5mm; }
  .page-avz table.data { font-size: 7.5pt; }
  .page-avz table.data th, .page-avz table.data td { padding: 0.35mm 1.2mm; line-height: 1.15; }
  .page-avz table.data thead th { font-size: 6.5pt; }
  .page-avz table.notes .note-info { display: none; }
  .page-avz table.notes tbody.note tr:first-child td { border-top: 1px solid #999; }
  .page-avz table.notes .group-head th { padding: 0.6mm 1.2mm; font-size: 8pt; }
  .page-avz table.notes input.stas { width: 14mm; font-size: 7.5pt; }
  /* cele două grupe de note una lângă alta */
  .page-avz .notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm; align-items: start; }
  .page-avz .notes-grid .table-wrap { margin: 0; }
}
@media print {
  .page-avz, .page-avz table.data, .page-avz table.notes input.stas { font-size: 8.5pt; }
  .page-avz table.data thead th { font-size: 7pt; }
  .page-avz table.data th, .page-avz table.data td { padding: 0.5mm 1.2mm; }
  .page-avz table.notes td:first-child { white-space: nowrap; }
  .page-avz > .page > .table-wrap:first-of-type, .page-avz .z-totals { max-width: 135mm; }
}
/* la tipărire: doar notele de transfer (fără totalurile Z și titlul paginii) */
@media print {
  .page-avz h1, .page-avz .print-only, .page-avz .z-totals { display: none !important; }
  .page-avz h2 { font-size: 11pt; margin: 0 0 2mm; }
}
@media print {
  .page-avz, .page-avz table.data, .page-avz table.notes input.stas { font-size: 9.5pt; }
  .page-avz table.data th, .page-avz table.data td { padding: 0.8mm 1.2mm; }
  .page-avz table.notes input.stas { width: 19mm; }
}
/* la tipărire: o singură coloană, ca în foaia Excel, cu text mai mare (umple pagina A4) */
@media print {
  .page-avz .notes-grid { display: block; }
  .page-avz .notes-grid .table-wrap { margin: 0 0 2mm; }
  .page-avz, .page-avz table.data, .page-avz table.notes input.stas { font-size: 10pt; }
  .page-avz table.data thead th { font-size: 8pt; }
  .page-avz table.data th, .page-avz table.data td { padding: 0.55mm 2mm; }
  .page-avz table.notes .group-head th { font-size: 10.5pt; padding: 1mm 2mm; }
  .page-avz .notes-grid .table-wrap + .table-wrap thead { display: none; }
  .page-avz table.notes { table-layout: fixed; }
  .page-avz table.notes col.c-nota { width: 25%; }
  .page-avz table.notes col.c-cont { width: 14%; }
  .page-avz table.notes col.c-eq { width: 3%; }
  .page-avz table.notes col.c-val { width: 14.66%; }
}
/* diferența de la STAS e doar pentru calcul: nu se tipărește */
@media print {
  .page-avz table.notes .stas-col { display: none; }
  .page-avz table.notes col.c-stas { width: 0; }
  .page-avz table.notes col.c-nota { width: 28%; }
  .page-avz table.notes col.c-cont { width: 16%; }
  .page-avz table.notes col.c-val { width: 18.5%; }
  .page-avz table.notes .group-head th { display: table-cell; }
}
/* lățimile coloanelor la tipărire (fără coloana STAS) */
@media print {
  .page-avz table.notes col.c-nota { width: 30%; }
  .page-avz table.notes col.c-cont { width: 22%; }
  .page-avz table.notes col.c-eq { width: 4%; }
  .page-avz table.notes col.c-val { width: 22%; }
}

/* ---------------------------------------------------------- rapoarte vânzări */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 0 0 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.kpi-sub { font-size: 13px; color: var(--muted); }
.pos { color: var(--ok); font-weight: 600; }
.neg { color: var(--warn); font-weight: 600; }
/* hartă: albastru tot mai închis = valoare mai mare (față de maximul din rând) */
.heat1 { background: #EEF4FA; } .heat2 { background: #DCE8F4; } .heat3 { background: #C3D8EC; }
.heat4 { background: #A2C2E2; } .heat5 { background: #7FA9D6; }
table.data td.top, .cal-cell.top { font-weight: 700; box-shadow: inset 0 0 0 2px var(--blue-ink); }
table.data tr.best td { font-weight: 600; }
table.data tr.row-total td { font-weight: 700; background: #F5F8FA; border-top: 2px solid var(--line); }
table.heatmap td.num { min-width: 92px; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 16px; }
.chart-grid .hbar-row { grid-template-columns: 70px 1fr auto; }
details.more { margin: -8px 0 20px; }
details.more summary { cursor: pointer; color: var(--blue); font-weight: 600; padding: 6px 0; }
details.more[open] summary { margin-bottom: 8px; }
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin: 0 0 20px; max-width: 900px; }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-head span { font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: center; }
.cal-cell { border-radius: 6px; padding: 6px 8px; min-height: 58px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #E4EAEF; }
.cal-cell.heat0 { background: #FAFBFC; }
.cal-cell b { font-size: 12.5px; color: var(--muted); }
.cal-cell span { text-align: right; font-size: 13px; font-weight: 600; }
.cal-empty { border: 0; background: none; }
@media (max-width: 640px) {
  .cal-cell { padding: 4px; min-height: 46px; }
  .cal-cell span { font-size: 10.5px; }
  .chart-grid { grid-template-columns: 1fr; }
}
@media print {
  .page-rap details.more { display: none; }
  .page-rap .heat1, .page-rap .heat2, .page-rap .heat3, .page-rap .heat4, .page-rap .heat5 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
table.heatmap td:first-child { white-space: nowrap; }
.cal-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cell { min-width: 0; overflow: hidden; }
@media (max-width: 640px) {
  .calendar { padding: 6px; }
  .cal-row { gap: 3px; margin-bottom: 3px; }
  .cal-cell { padding: 3px; min-height: 40px; }
  .cal-cell span { font-size: 9.5px; letter-spacing: -0.02em; }
  .kpi-value { font-size: 21px; }
}
/* căutare pe loc (actualizare recepție) */
.search-bar { position: sticky; top: 0; z-index: 5; padding: 12px 16px; }
.search-bar label { margin-bottom: 6px; }
.search-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-row input[type=search] { max-width: 280px; font-size: 18px; font-weight: 600; }
table.data.filtered tr.match td.val { background: #FFF3C4; font-weight: 700; }
/* bulina verde: factură importată (e-factură) */
.dot-ok { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #1FA45A; box-shadow: 0 0 0 2px #D5F0E0; vertical-align: middle; }
table.data .dot-col { width: 22px; padding: 12px 2px 0; text-align: center; vertical-align: top; line-height: 1; }
.legend-line { display: flex; align-items: center; gap: 8px; margin: -10px 0 14px; }
.dot-no { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #B9C3CC; vertical-align: middle; }
.legend-line .dot-no { margin-left: 14px; }
.nr-pill { display: inline-block; padding: 1px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
.nr-imp { background: #DDF3E6; color: #14593A; }
.nr-neimp { background: #E8ECF0; color: #3E4C58; }
@media print { .nr-pill, .dot-ok, .dot-no { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
