/* ======================================================= Grafic de lucru */
:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #1b2430;
  --ink-2: #3b4656;
  --muted: #6b7684;
  --line: #e2e6eb;
  --line-2: #cfd5dd;
  --accent: #0f766e;
  --accent-2: #0b5f59;
  --accent-soft: #e6f4f2;
  --danger: #b42318;
  --warn: #b45309;
  --ok: #067647;
  --top: #16202c;
  --we: #f3e9ff;
  --hol: #fff1c7;
  --today: #e3f5dc;
  --sel: rgba(15, 118, 110, 0.16);
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 4px 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
kbd { font: 11px/1 ui-monospace, Consolas, monospace; background: #f2f4f7; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 4px; }
.print-only { display: none; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- topbar */
.topbar { position: sticky; top: 0; z-index: 50; height: 48px; display: flex; align-items: center; gap: 18px; padding: 0 16px; background: var(--top); color: #e8edf3; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 650; white-space: nowrap; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--accent); font-size: 16px; }
.brand-txt small { display: block; font-weight: 400; font-size: 11px; color: #9fb0c3; margin-top: -3px; }
.mainnav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mainnav > a, .navmenu > summary { color: #c9d3de; text-decoration: none; padding: 6px 11px; border-radius: 6px; white-space: nowrap; cursor: pointer; list-style: none; }
.navmenu > summary::-webkit-details-marker { display: none; }
.mainnav > a:hover, .navmenu > summary:hover { background: rgba(255,255,255,.08); color: #fff; }
.mainnav > a.on, .navmenu.on > summary { background: rgba(255,255,255,.12); color: #fff; }
.navmenu { position: relative; }
.navmenu > summary::after { content: "▾"; font-size: 10px; margin-left: 6px; opacity: .7; }
.navmenu-pop { position: fixed; margin-top: 6px; min-width: 220px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(16,24,40,.18); padding: 6px; z-index: 60; }
.navmenu-pop.right { right: 12px; }
.navmenu-pop a { display: block; padding: 7px 10px; border-radius: 5px; color: var(--ink); text-decoration: none; }
.navmenu-pop a:hover, .navmenu-pop a.on { background: var(--accent-soft); color: var(--accent-2); }
.menu-form { margin: 0; }
.menu-form button { display: block; width: 100%; text-align: left; font: inherit; padding: 7px 10px; border: 0; border-radius: 5px; background: none; color: var(--ink); cursor: pointer; }
.menu-form button:hover { background: var(--accent-soft); color: var(--accent-2); }
.menu-note { font-size: 12px; color: var(--muted); padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.usermenu > summary { display: flex; align-items: center; gap: 8px; }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #2c3a4b; color: #fff; font-weight: 600; font-size: 12px; }

/* ----------------------------------------------------------------- pagini */
.page { max-width: 1320px; margin: 0 auto; padding: 22px 20px 60px; }
.narrow { max-width: 560px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.form label, .dlg label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; font-weight: 500; }
.form input, .form select, .form textarea, .dlg input, .dlg select, .dlg textarea,
.gtoolbar select, .gtoolbar input, .filterbar select, .filterbar input {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 13.5px; color: var(--ink);
  padding: 6px 9px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; min-height: 32px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(15,118,110,.35); outline-offset: 0; border-color: var(--accent); }
label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
label.check input { width: auto; min-height: 0; margin: 2px 0 0; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 500; line-height: 1; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 12px; height: 32px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #f5f7f9; border-color: #b9c1cc; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--danger); border-color: #f1c4c0; }
.btn.danger:hover { background: #fef3f2; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn.icon { width: 32px; padding: 0; font-size: 18px; }
.btn.block { width: 100%; height: 38px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }

.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; border: 1px solid; font-size: 13.5px; }
.flash-ok { background: #ecfdf3; border-color: #abefc6; color: #05603a; }
.flash-err { background: #fef3f2; border-color: #fecdca; color: #912018; }
.flash-warn { background: #fffaeb; border-color: #fedf89; color: #93370d; }

/* tabele generale */
.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.tbl th, .tbl td { padding: 6px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl thead th { background: #f8fafb; font-size: 12px; font-weight: 600; color: var(--ink-2); position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line-2); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.neg { color: var(--danger); }
.tbl tr.sub2 td { background: #fff; padding-top: 8px; }
.tbl tr.grp td { background: #f2f5f8; font-weight: 600; }
.tbl tr.sub td { background: #fafbfc; font-weight: 600; }
.tbl tr.total td { background: #eef6f5; font-weight: 700; border-top: 2px solid var(--line-2); }
.tbl tbody tr:hover td { background: #f8fbfb; }
.tbl input, .tbl select { font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 5px; min-height: 28px; width: 100%; }
.tbl .w-xs { width: 60px; } .tbl .w-s { width: 90px; } .tbl .w-m { width: 150px; }
.tablewrap { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: calc(100vh - 150px); }
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filterbar label { font-size: 12px; color: var(--muted); font-weight: 500; }
.filterbar select, .filterbar input { min-width: 140px; }
.filterbar input[type=checkbox] { display: inline-block; width: auto; min-width: 0; min-height: 0; margin: 0; }
.filterbar label.check { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.on { color: var(--accent-2); border-bottom-color: var(--accent); }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: #eef2f6; color: var(--ink-2); }
.badge.ok { background: #dcfae6; color: #067647; } .badge.warn { background: #fef0c7; color: #93370d; } .badge.err { background: #fee4e2; color: #b42318; }
.swatch { display: inline-block; min-width: 38px; text-align: center; padding: 2px 6px; border-radius: 4px; font-weight: 700; font-size: 12px; border: 1px solid rgba(0,0,0,.06); }

/* ------------------------------------------------------------ grila lunară */
.page-grid { display: flex; flex-direction: column; height: calc(100vh - 48px); padding: 0; }
.gtoolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; padding: 10px 14px 8px; background: #fff; border-bottom: 1px solid var(--line); }
.tb-group { display: flex; align-items: flex-end; gap: 6px; flex-wrap: wrap; }
.tb-group.actions { margin-left: auto; }
.monthnav input[type=month] { width: 150px; margin: 0; font-weight: 600; }
.fl { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.fl select { min-width: 96px; margin-top: 2px; }
#fSectia { width: 200px; }
.fl.search input { width: 160px; margin: 0; }
.infobar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 14px; background: #fbfcfd; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.chip { padding: 2px 9px; border-radius: 99px; background: #eef2f6; color: var(--ink-2); white-space: nowrap; }
.chip.strong { background: var(--accent); color: #fff; font-weight: 600; }
.chip.norma { white-space: normal; }
.chip.hol { background: var(--hol); color: #7a4b00; }
.chip.lock { background: #fee4e2; color: var(--danger); font-weight: 600; }
.chip.muted { background: transparent; margin-left: auto; color: var(--muted); }
.palette { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.pal-lbl { font-size: 12px; color: var(--muted); margin-right: 4px; }
.pal { font: 600 12px/1 var(--font); min-width: 34px; height: 24px; padding: 0 6px; border-radius: 4px; border: 1px solid rgba(16,24,40,.12); background: #fff; color: var(--ink); cursor: pointer; }
.pal:hover:not([disabled]) { box-shadow: 0 0 0 2px rgba(15,118,110,.35); }
.pal[disabled] { cursor: default; opacity: .7; }
.pal-clear { color: var(--danger); margin-left: 6px; }
.savestate { margin-left: auto; font-size: 12px; color: var(--muted); }
.savestate.busy { color: var(--warn); } .savestate.ok { color: var(--ok); } .savestate.err { color: var(--danger); font-weight: 600; }
.legend { padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); font-size: 12.5px; max-height: 38vh; overflow: auto; }
.leg-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; }
.leg-item { display: flex; align-items: center; gap: 8px; }
.leg-item .pal { cursor: default; display: inline-grid; place-items: center; flex: 0 0 auto; }
.leg-item em { color: var(--warn); font-style: normal; font-size: 11px; }
.leg-orare { margin-top: 10px; display: grid; gap: 3px; }

.gridwrap { flex: 1; min-height: 0; overflow: auto; background: #fff; outline: none; position: relative; }
.gridwrap:focus-visible { box-shadow: inset 0 0 0 2px rgba(15,118,110,.25); }
.grid { border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; user-select: none; }
.grid th, .grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0 3px; height: 23px; white-space: nowrap; }
.grid thead th { position: sticky; top: 0; z-index: 3; background: #f6f8fa; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line-2); height: 34px; }
.grid .lc { position: sticky; z-index: 2; background: #fff; text-align: left; }
.grid thead .lc { z-index: 5; background: #f6f8fa; }
.grid .c-s { left: 0; width: 46px; min-width: 46px; max-width: 46px; font-size: 11px; color: var(--muted); }
.grid .c-g { left: 46px; width: 46px; min-width: 46px; max-width: 46px; font-size: 11px; color: var(--muted); }
.grid .c-n { left: 92px; width: 210px; min-width: 210px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; font-weight: 500; cursor: pointer; }
.grid tbody tr:not(.ro) .c-n:hover { color: var(--accent-2); text-decoration: underline; }
.grid .c-c { left: 302px; width: 46px; min-width: 46px; max-width: 46px; font-size: 11px; text-align: center; border-right: 2px solid var(--line-2); }
.grid td.c-n.sef { background: #ffe4e8; color: #9c0006; }
.grid td.cim-ft { background: #e3f6e7; color: #0b6b25; }
.grid td.cim-b { background: #e4effb; color: #1d4f91; }
.grid .exm { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 5px; border-radius: 50%; background: #dbeafe; color: #1e40af; font: italic 700 10px/1 Georgia, serif; vertical-align: 1px; }
.grid th.dh { width: 34px; min-width: 34px; max-width: 34px; text-align: center; padding: 0; line-height: 1.05; }
.grid th.dh .dn { display: block; font-size: 12.5px; color: var(--ink); }
.grid th.dh .dw { display: block; font-size: 10px; font-weight: 500; color: var(--muted); }
.grid th.we { background: #ebdcfb; } .grid th.hol { background: #ffe39b; } .grid th.today { background: #c9ecbd; }
.grid th.today .dn { color: #0b5f2a; }
.grid td.d { text-align: center; font-weight: 600; cursor: cell; position: relative; width: 34px; min-width: 34px; max-width: 34px; overflow: hidden; }
.grid td.we { background: var(--we); }
.grid td.hol { background: var(--hol); }
.grid td.today { box-shadow: inset 2px 0 0 #6cc256, inset -2px 0 0 #6cc256; }
.grid td.d.ro, .grid tr.ro td.d { cursor: default; }
.grid td.d.unk { color: var(--danger); outline: 1px dashed var(--danger); outline-offset: -3px; }
.grid td.d.sel { box-shadow: inset 0 0 0 999px var(--sel); }
.grid td.d.act { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 1; }
.grid td.d.pending { opacity: .5; }
.grid td.hasnote::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 6px 6px 0; border-color: transparent #d92d20 transparent transparent; }
.grid th.ch { font-size: 10.5px; padding: 0 3px; background: #eef3f7; min-width: 40px; }
.grid td.cc { text-align: right; padding: 0 5px; background: #fafbfc; color: var(--ink-2); min-width: 40px; }
.grid td.cc.neg { color: var(--danger); } .grid td.cc.pos { color: var(--ok); font-weight: 600; } .grid td.cc.warn { color: var(--warn); font-weight: 600; }
.grid td.cc.manual { font-style: italic; text-decoration: underline dotted; }
.grid td.cc.c-norma, .grid th.ch:first-of-type { border-left: 2px solid var(--line-2); }
.grid tr.sep th { position: sticky; left: 0; z-index: 2; background: #e9eef3; text-align: left; font-size: 12px; color: var(--ink); padding-left: 8px; }
.grid tr.sep th small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.grid tr.sep td { background: #e9eef3; }
.grid tbody tr:hover td.lc { background: #f3f8f8; }
.grid tfoot th.lc { left: 0; text-align: right; padding-right: 8px; font-size: 11.5px; color: var(--ink-2); background: #f6f8fa; }
.grid tfoot td { text-align: center; font-weight: 600; background: #f6f8fa; font-size: 11.5px; }
.grid tfoot tr.tot td, .grid tfoot tr.tot th { border-top: 2px solid var(--line-2); background: #eef6f5; }
.grid tfoot tr.tot td.cc { text-align: right; }
.grid tfoot .z { color: #c4cad3; font-weight: 400; }
.grid tfoot td.we { background: #efe3fc; } .grid tfoot td.hol { background: #fff0c2; }
.empty { padding: 40px; text-align: center; color: var(--muted); font-size: 15px; }
.empty .btn { margin-left: 8px; }

.cell-editor { position: fixed; z-index: 40; font: 600 12.5px var(--font); text-align: center; border: 2px solid var(--accent); border-radius: 2px; padding: 0 2px; background: #fff; box-shadow: 0 6px 18px rgba(16,24,40,.2); outline: none; }
.ctxmenu { position: fixed; z-index: 70; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(16,24,40,.18); padding: 5px; }
.ctxmenu button { display: block; width: 100%; text-align: left; font: inherit; font-size: 13px; padding: 7px 10px; border: 0; background: none; border-radius: 5px; cursor: pointer; }
.ctxmenu button:hover { background: var(--accent-soft); }
.ctx-note { font-size: 12px; color: var(--ink-2); padding: 6px 10px; border-top: 1px solid var(--line); margin-top: 4px; max-width: 280px; white-space: normal; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; background: #1b2430; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: min(680px, 92vw); }
.toast.err { background: #b42318; }
.toast.ok { background: #0b5f59; }

.dd { position: relative; }
.dd > summary { list-style: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-pop { position: absolute; right: 0; top: 36px; z-index: 30; width: 360px; max-height: 60vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(16,24,40,.18); padding: 8px 12px; }
.dd-pop label.check { font-size: 12.5px; margin: 6px 0; }
.dd-actions { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; text-align: right; }

/* ---------------------------------------------------------------- dialoguri */
.dlg { border: 0; border-radius: 12px; padding: 0; width: min(640px, 94vw); box-shadow: 0 24px 64px rgba(16,24,40,.3); }
.dlg.small { width: min(440px, 94vw); }
.dlg::backdrop { background: rgba(16,24,40,.45); }
.dlg form { padding: 20px 22px 18px; }
.dlg textarea { min-height: 90px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.grid2 .span2 { grid-column: 1 / -1; }
.dlg-calc { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; background: #f6f8fa; border-radius: 8px; margin: 2px 0 6px; }
.dlg-calc span { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.dlg-calc small { font-size: 10.5px; color: var(--muted); }
.dlg-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.dlg-actions .left, .dlg-actions .right { display: flex; gap: 6px; flex-wrap: wrap; }
.dlg-actions .right { margin-left: auto; }

/* ------------------------------------------------------------- publicare PDF */
.chip.pub { cursor: pointer; font-weight: 600; }
.chip.pub.none { background: #eef2f6; color: var(--muted); }
.chip.pub.ok { background: #dcfae6; color: #067647; }
.chip.pub.fin { background: #d1f0ec; color: #0b5f59; }
.chip.pub.stale { background: #fef0c7; color: #93370d; }
.pub-status { padding: 10px 12px; background: #f6f8fa; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.pub-ok { color: var(--ok); } .pub-stale { color: var(--warn); font-weight: 600; }
.pub-share { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; }
.pub-qr svg { width: 150px; height: 150px; display: block; border: 1px solid var(--line); border-radius: 6px; }
.pub-links { flex: 1; min-width: 0; }
.copyrow { display: flex; gap: 6px; margin-top: 4px; }
.copyrow input { margin: 0 !important; font-size: 12.5px !important; }
.pub-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.grid2 .span2b { grid-column: span 2; }
.public-body { background: var(--bg); }
.public-wrap { max-width: 560px; margin: 0 auto; padding: 18px 16px 40px; }
.public-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.public-head .brand-mark { color: #fff; }
.public-head small { display: block; color: var(--muted); font-size: 12px; }
.public-title { font-size: 20px; margin: 0 0 14px; }
.public-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.public-card.now { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(15,118,110,.12); }
.public-card h1 { font-size: 18px; margin: 0 0 8px; }
.pc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pc-head h2 { margin: 0; font-size: 17px; }
.public-card .btn.block { height: 44px; font-size: 15px; }
.pc-old { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.public-foot { text-align: center; margin-top: 18px; }
.afis { max-width: 720px; margin: 0 auto; text-align: center; padding: 30px 20px; }
.afis h1 { font-size: 34px; margin: 10px 0 6px; }
.afis .afis-sub { font-size: 18px; color: var(--ink-2); margin-bottom: 26px; }
.afis svg { width: 360px; height: 360px; }
.afis .afis-url { font: 13px ui-monospace, Consolas, monospace; color: var(--muted); word-break: break-all; margin-top: 18px; }
.afis .afis-steps { font-size: 16px; margin-top: 22px; line-height: 1.7; }
@media print { .afis { padding: 0; } .afis svg { width: 120mm; height: 120mm; } }

/* ------------------------------------------------------------------- login */
.login-body { background: radial-gradient(1200px 600px at 10% -10%, #d6efec 0, transparent 60%), var(--bg); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px; box-shadow: 0 20px 50px rgba(16,24,40,.08); }
.login-card h1 { margin: 10px 0 4px; font-size: 21px; }
.login-card label { display: block; font-size: 12.5px; font-weight: 500; margin: 14px 0 0; color: var(--ink-2); }
.login-card input { display: block; width: 100%; margin-top: 4px; font: inherit; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 7px; }
.login-card .btn { margin-top: 20px; }
.login-logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 24px; }

/* ----------------------------------------------------------- nomenclatoare */
.colorpair { display: flex; gap: 4px; align-items: center; }
.colorpair .colortxt { width: 86px; }
.colorpair input[type=color] { width: 30px; height: 28px; padding: 0 2px; border: 1px solid var(--line-2); border-radius: 5px; background: #fff; cursor: pointer; }
.tbl.nomen td { padding: 4px 6px; }
.tbl.nomen input[type=checkbox] { width: auto; min-height: 0; }
@media (max-width: 1000px) { .cols2 { grid-template-columns: 1fr !important; } }

/* --------------------------------------------------------------- azi în tură */
.azi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.azi-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.azi-card h3 { margin: 0; padding: 10px 14px; background: #f6f8fa; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.azi-card h3 small { font-weight: 500; color: var(--muted); }
.azi-sect { padding: 8px 14px 10px; border-bottom: 1px solid var(--line); }
.azi-sect:last-child { border-bottom: 0; }
.azi-sect h4 { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.azi-sect h4 .dot { width: 8px; height: 8px; border-radius: 50%; }
.azi-sect ul { list-style: none; margin: 0; padding: 0; }
.azi-sect li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13.5px; }
.azi-sect li .meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.kpis { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; min-width: 130px; }
.kpi b { display: block; font-size: 22px; letter-spacing: -0.02em; }
.kpi span { font-size: 12px; color: var(--muted); }

@media (max-width: 700px) {
  .grid .c-s, .grid .c-g, .grid .c-c { position: static; }
  .grid .c-n { left: 0; width: 140px; min-width: 140px; max-width: 140px; box-shadow: 2px 0 0 var(--line-2); }
  .grid tr.sep th, .grid tfoot th.lc { position: static; }
  .palette { max-height: 74px; overflow-y: auto; }
  .infobar .chip.norma { display: none; }
}
@media (max-width: 900px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .brand-txt { display: none; }
  .uname { display: none; }
  .tb-group.actions { margin-left: 0; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .page { padding: 16px 12px 40px; }
  .chip.muted { margin-left: 0; white-space: normal; }
}

/* ---------------------------------------------------------------- tipărire */
@media print {
  @page { size: A3 landscape; margin: 8mm; }
  body { background: #fff; font-size: 9px; }
  .topbar, .no-print, .toast, .ctxmenu, .cell-editor, dialog { display: none !important; }
  .print-only { display: block; }
  .page-grid { height: auto; display: block; }
  .gridwrap { overflow: visible; height: auto; }
  .grid { font-size: 8.5px; width: 100%; }
  .grid th, .grid td { height: 15px; padding: 0 1px; }
  .grid thead th, .grid .lc, .grid tr.sep th { position: static; }
  .grid .c-n { width: auto; min-width: 120px; max-width: none; }
  .grid th.dh, .grid td.d { width: auto; min-width: 0; }
  .grid td.d.sel { box-shadow: none; } .grid td.d.act { outline: 0; }
  .grid td.hasnote::after { display: none; }
  .grid tr { break-inside: avoid; }
  .grid thead { display: table-header-group; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-head { margin-bottom: 6px; font-size: 11px; }
  .print-head .ph-title { font-size: 15px; font-weight: 700; margin: 2px 0; }
  .print-legend { margin-top: 6px; font-size: 9px; }
  .print-sign { display: flex !important; justify-content: space-between; margin-top: 18px; font-size: 10px; }
  .page { max-width: none; padding: 0; }
  .tablewrap { border: 0; overflow: visible; }
  .tbl thead th { position: static; }
  .filterbar, .tabs { display: none; }
}
