:root {
  --brand: #e8590c; --navy: #14213d; --ink: #1d2433; --muted: #6b7686; --line: #e3e7ee; --bg: #f5f7fb; --card: #fff;
  --yel: #fff8e1; --pea: #fdf0e6; --green: #2b8a3e; --red: #e03131; --rowh: 26px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 13px; color: var(--ink); background: var(--bg); display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }

/* ---------- antet ---------- */
.top { display: flex; align-items: center; gap: 18px; padding: 8px 16px; background: var(--navy); color: #fff; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.mark { background: var(--brand); color: #fff; border-radius: 6px; padding: 3px 6px; font-size: 12px; }
.proto { font-size: 10px; font-weight: 600; background: rgba(255,255,255,.15); padding: 2px 6px; border-radius: 10px; text-transform: uppercase; letter-spacing: .05em; }
.pname { flex: 1; min-width: 160px; font-weight: 500; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 4px; }
.tab { background: transparent; border: 0; color: #c9d1e0; padding: 7px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.tab.on, .tab:hover { background: rgba(255,255,255,.12); color: #fff; }
.rolebox { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #c9d1e0; }
.rolebox select { background: #23315a; color: #fff; border: 1px solid #3a4a75; border-radius: 6px; padding: 4px 6px; }

main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 16px; overflow: auto; }
#v-grafic { overflow: hidden; }
.view[hidden] { display: none !important; }

/* ---------- butoane ---------- */
.btn { background: var(--brand); color: #fff; border: 0; border-radius: 6px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.green { background: var(--green); }
.btn:disabled { opacity: .45; cursor: default; }
.x { border: 0; background: transparent; color: #98a2b3; cursor: pointer; font-size: 14px; padding: 2px 6px; }
.x:hover { color: var(--red); }
.xsp { display: inline-block; width: 26px; flex: none; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.row.right { justify-content: flex-end; }

/* ---------- grafic ---------- */
.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar .grp { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.toolbar label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.toolbar select { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: #fff; }
.toolbar.ro .edit { display: none; }
.chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.info { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; font-size: 12px; }
.chip b { color: var(--muted); font-weight: 600; }
.chip.bad { border-color: #ffc9c9; background: #fff5f5; color: var(--red); }
.chip.good { border-color: #b2f2bb; background: #f4fcf5; }
.chip.jr { border-color: #d0bfff; background: #f8f5ff; }
.gerr { color: var(--red); font-weight: 600; min-height: 4px; margin-bottom: 4px; }

.split { flex: 1; min-height: 0; display: flex; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.left { width: 860px; flex: none; display: flex; flex-direction: column; min-width: 160px; max-width: 80%; overflow-x: auto; overflow-y: hidden; }
.left > table, .left > .lbody { flex: none; width: 860px; }
.left > .lbody { flex: 1; }
.splitter { flex: none; width: 7px; cursor: col-resize; background: var(--line); border-left: 1px solid #fff; border-right: 1px solid #fff; position: relative; }
.splitter:hover, .splitter.drag { background: var(--brand); }
.splitter::after { content: "⋮"; position: absolute; top: 50%; left: -1px; color: #fff; font-size: 12px; transform: translateY(-50%); }
.lbody { flex: 1; overflow: hidden; }
.right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ghead { height: 44px; overflow: hidden; border-bottom: 1px solid var(--line); background: #fafbfd; flex: none; }
.gbody { flex: 1; overflow: auto; }
.gbody svg, .ghead svg { display: block; }
.g-mon { font-size: 11px; font-weight: 600; fill: var(--ink); }
.g-tick { font-size: 9.5px; fill: var(--muted); }
.g-edit { cursor: grab; }
.g-edit .g-resize { cursor: ew-resize; }
.g-drag { opacity: .7; cursor: grabbing; }
.g-bar:hover .g-main { filter: brightness(1.12); }

table.grid { border-collapse: collapse; table-layout: fixed; width: 860px; }
table.grid th { height: 44px; background: #fafbfd; font-size: 11px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); text-align: center; padding: 0 4px; }
table.grid td { height: var(--rowh); padding: 0 3px; border-bottom: 1px solid #f0f2f6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.grid tr { height: var(--rowh); }
table.grid .nr { width: 34px; text-align: center; color: var(--muted); }
table.grid .cd { width: 54px; }
table.grid .nm { width: 250px; }
table.grid .num { width: 50px; text-align: right; }
table.grid .dt { width: 80px; text-align: center; }
table.grid .pr { width: 86px; }
table.grid .ps { width: 126px; }
table.grid input { border: 1px solid transparent; background: transparent; width: 100%; height: 22px; padding: 0 4px; border-radius: 3px; }
table.grid input:not([readonly]):hover { border-color: var(--line); background: var(--yel); }
table.grid input:not([readonly]):focus { outline: none; border-color: var(--brand); background: #fff; }
table.grid td.num input { text-align: right; }
table.grid td.dt input, table.grid td.dt span { text-align: center; display: block; }
.nmw { display: flex; align-items: center; gap: 2px; }
.nmw input { flex: 1; min-width: 0; }
.tog { width: 14px; flex: none; cursor: pointer; color: var(--muted); font-size: 11px; text-align: center; }
table.grid tr.sum td { font-weight: 700; background: #fbfaf7; }
table.grid tr.sum input { font-weight: 700; }
table.grid tr.sel td { background: #fff4e6 !important; }
table.grid td.critf { color: var(--red); font-weight: 700; }
table.grid td.jr input { color: #6741d9; font-style: italic; }
table.grid td.con input { color: var(--brand); font-weight: 700; }
table.grid td.real input, table.grid td.real span { color: var(--green); }
table.grid select { width: 100%; border: 1px solid transparent; background: transparent; height: 22px; font-size: 12px; }
table.grid select:not(:disabled):hover { border-color: var(--line); background: var(--yel); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 6px 2px 0; font-size: 11.5px; color: var(--muted); }
.lg { display: inline-block; width: 18px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.lg.act { background: #4A90D9; } .lg.crit { background: var(--red); } .lg.done { background: var(--green); height: 5px; }
.lg.sum { background: var(--navy); height: 5px; } .lg.ms { width: 9px; height: 9px; background: var(--green); transform: rotate(45deg); }
.lg.base { background: #9aa4b2; height: 3px; } .lg.st { width: 2px; height: 12px; background: var(--red); }

/* ---------- jurnal ---------- */
#v-jurnal { max-width: 1000px; width: 100%; margin: 0 auto; }
.jhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.jhead h2 { margin: 6px 0; }
.jnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jdate { display: flex; align-items: center; gap: 8px; }
.jdate input { border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.jstrip { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0; }
.jday { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 7px; font-size: 11px; cursor: pointer; }
.jday.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.jday.done { border-color: #b2f2bb; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.card h3 { margin: 0 0 8px; font-size: 14px; }
.card.center { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.jgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.fld { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
.fld input, .fld select, textarea { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--yel); color: var(--ink); font-size: 13px; }
.fld input:disabled, .fld select:disabled, textarea:disabled { background: #f6f7f9; }
textarea { width: 100%; margin-top: 8px; resize: vertical; }
.wrow { display: flex; gap: 6px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.wrow.done { border-color: #b2f2bb; background: #f8fdf9; }
.wmain { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wmain select.act { border: 1px solid var(--line); border-radius: 6px; padding: 6px; font-weight: 600; background: #fff; }
.wsub { display: grid; grid-template-columns: 2fr 1fr auto 2fr; gap: 8px; align-items: end; }
.fld.s input { width: 100%; }
.wsub > *, .jgrid > * { min-width: 0; }
.fld input, .fld select { width: 100%; min-width: 0; }
.chk.fin { padding-bottom: 7px; font-size: 12px; font-weight: 600; color: var(--green); }
.wmeta { font-size: 11.5px; color: var(--muted); }
.warn { background: #fff4e6; border: 1px solid #ffd8a8; color: #a14400; border-radius: 6px; padding: 5px 8px; font-size: 12px; }
.nrow { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.nrow input, .nrow select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--yel); }
.nrow .grow { flex: 1; min-width: 0; } .nrow .q { width: 90px; } .nrow .u { width: 70px; } .nrow .u2 { width: 140px; }

/* ---------- centralizator / setări ---------- */
.tblwrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
table.plain { border-collapse: collapse; width: 100%; }
table.plain th { text-align: left; font-size: 11.5px; color: var(--muted); background: #fafbfd; padding: 7px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; }
table.plain td { padding: 6px 8px; border-bottom: 1px solid #f0f2f6; }
table.plain tr.sum td { font-weight: 700; background: #fbfaf7; }
table.plain tr.late td { color: var(--red); }
table.plain td.num { text-align: right; }
#v-setari { max-width: 860px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.days { display: flex; gap: 14px; flex-wrap: wrap; }
.prest { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.prow { display: flex; gap: 8px; align-items: center; }
.prow input:not([type=color]) { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; width: 300px; background: var(--yel); }
.prow input[type=color] { width: 36px; height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 2px; background: #fff; }

/* ---------- dialog ---------- */
dialog { border: 0; border-radius: 12px; padding: 18px 20px; width: min(720px, 94vw); box-shadow: 0 20px 60px rgba(20,33,61,.3); }
dialog::backdrop { background: rgba(20,33,61,.35); }
dialog h3 { margin: 0 0 10px; font-size: 15px; }
table.dl select, table.dl input { border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; width: 100%; }
table.dl .lag { width: 80px; }
.fld.inl { margin-top: 10px; max-width: 320px; }

#flash { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; transition: .25s; pointer-events: none; max-width: 90vw; z-index: 20; }
#flash.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.foot { display: flex; justify-content: space-between; gap: 10px; padding: 5px 16px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; flex-wrap: wrap; }

/* ---------- jurnal: completări ---------- */
.tabs { flex-wrap: wrap; }
.totals { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.totals b { color: var(--ink); }
.nrow .u3 { width: 230px; } .nrow .u4 { width: 260px; flex: 1; } .um { width: 36px; color: var(--muted); font-size: 12px; }
.signs { display: flex; gap: 40px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.signs div { flex: 1; } .signs i { display: block; border-bottom: 1px solid #c9d1e0; height: 26px; }
.jday.fill { border-color: #b2c7f2; }
.vhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mpick select { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; margin-left: 6px; }
table.plain tr.off td { background: #f6f7f9; color: var(--muted); }
table.plain tr.sel td { background: #fff4e6; }
table.plain.edit input, table.plain.edit select { border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; background: var(--yel); width: 100%; min-width: 70px; }
table.plain input.q { width: 90px; min-width: 70px; } table.plain input.u { width: 60px; }
.lists { display: flex; flex-direction: column; gap: 5px; margin-bottom: 6px; }
.lists .prow input:not([type=checkbox]) { width: 260px; } .lists .prow input.u { width: 70px; }
#printDay { display: none; }

/* ---------- câmp de căutare activitate ---------- */
input.cb { border: 1px solid var(--line); border-radius: 6px; padding: 7px 28px 7px 9px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7686' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat right 9px center; font-weight: 600; min-width: 0; text-overflow: ellipsis; }
input.cb:focus, input.cb.open { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,89,12,.12); font-weight: 500; }
input.cb:disabled { background-color: #f6f7f9; }
.nrow input.cb { flex: 1; } .wmain input.cb.act { width: 100%; }
.cbpop { position: fixed; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(20,33,61,.18); overflow-y: auto; padding: 4px 0; }
.cbgrp { position: sticky; top: -4px; background: #f5f7fb; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.cbit { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: baseline; padding: 7px 10px; cursor: pointer; font-size: 13px; }
.cbit b { color: var(--muted); font-weight: 600; } .cbit i { color: var(--muted); font-style: normal; font-size: 11px; white-space: nowrap; }
.cbit.hi { background: #fff4e6; } .cbit.cur b { color: var(--brand); }
.cbit.clr { display: block; color: var(--red); font-size: 12px; border-top: 1px solid var(--line); }
.cbempty { padding: 10px; color: var(--muted); font-size: 12px; }

.calcard .row { margin-top: 0; } .calcard .cname { font-weight: 700; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; width: 280px; background: var(--yel); }
.calcard .days { margin: 8px 0; } .exc { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; } .exc .u2 { width: 130px; }
.hol { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 12px; font-size: 12px; color: var(--muted); padding: 6px 0; }
details summary { cursor: pointer; color: var(--muted); margin: 6px 0; }
.caltag { font-size: 11px; margin-left: 2px; }
.dlgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 4px; } .dlh { margin: 10px 0 4px; font-size: 13px; }

.secs { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }

#dlgImp { width: min(760px, 96vw); }
.impprev { margin: 10px 0; max-height: 300px; overflow: auto; }
.impprev table { font-size: 12px; }
.impprev .warn { color: #b42318; font-weight: 600; }

.wline { display: grid; grid-template-columns: minmax(200px, 3fr) minmax(90px, 1.3fr) 110px 34px minmax(90px, 1.6fr) 38px 26px; gap: 6px; align-items: center; padding: 3px 0; border-bottom: 1px solid #f0f2f6; }
.wline > * { min-width: 0; }
.wline.whead { font-size: 11px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.wline.done { background: #f3fbf4; }
.wline input.cb.act { width: 100%; font-weight: 600; }
.wline input { width: 100%; }
.wq { display: flex; align-items: center; gap: 3px; } .wq input { width: 70px; flex: none; } .wum { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wfin { display: flex; align-items: center; justify-content: center; gap: 0; font-size: 0; } .wfin input { width: 16px; height: 16px; }
.wbadge { font-size: 11px; color: var(--muted); text-align: center; cursor: help; border-radius: 10px; padding: 1px 0; }
.wbadge.w { background: #fff4e6; color: #a14400; font-size: 13px; }
.wline.haswarn input.cb.act { border-color: #ffc078; }

/* liste de cantități */
.view:not(#v-grafic) > * { flex: none; }
#v-liste .row.wrap { flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.boqbar input { min-width: 220px; } .bulk { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); } .bulk input.cb { width: 320px; }
.tblwrap { overflow-x: auto; }
table.boq { width: 100%; font-size: 12.5px; } table.boq td { vertical-align: top; padding: 4px 6px; } table.boq td.nm { min-width: 260px; } table.boq td.cd { white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
table.boq td.alc { min-width: 300px; } table.boq .arow { display: flex; gap: 4px; margin-bottom: 3px; } table.boq .arow input.cb { flex: 1; min-width: 0; } table.boq input.pct { width: 56px; }
table.boq tr.sum td { font-weight: 700; background: #fbfaf7; } table.boq tr.unal td.alc input.cb { background: #fff9db; } table.boq tr.resrow td { color: var(--muted); font-size: 11.5px; background: #fafbfd; padding: 2px 6px; }
table.boq .tog { cursor: pointer; color: var(--brand); } table.boq .rescount { color: var(--muted); font-size: 11px; }
button.prop { border: 1px dashed #74c0fc; background: #e7f5ff; color: #1864ab; border-radius: 6px; font-size: 11.5px; padding: 2px 6px; cursor: pointer; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.diff { color: var(--brand); font-weight: 700; }
#dlgPaste textarea { width: min(720px, 90vw); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

td.addc { width: 30px; text-align: center; }
button.addm { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--brand); background: #fff; color: var(--brand); font-weight: 700; font-size: 15px; line-height: 20px; padding: 0; cursor: pointer; }
button.addm:hover { background: var(--brand); color: #fff; }
button.addm.delm { border-color: #c92a2a; color: #c92a2a; font-size: 17px; }
button.addm.delm:hover { background: #c92a2a; color: #fff; }

.matfilt { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 6px 0 10px; }
.matfilt select { min-width: 220px; }
table.plain td.neg { color: #c92a2a; font-weight: 600; }
table.plain tr.sumrow td { background: #fbfaf7; font-weight: 600; }

/* rapoarte */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.subtab { border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 6px 14px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink, #14213d); }
.subtab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
svg.chart { width: 100%; max-width: 980px; height: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0 14px; }
td.chk-st { font-weight: 700; text-align: center; width: 28px; } tr.late td.chk-st { color: #c92a2a; } td.nrs { font-size: 12px; max-width: 220px; }
#v-rapoarte td.evact { min-width: 260px; } #v-rapoarte td.evact input.cb { width: 100%; } #v-rapoarte input.w-dt { width: 96px; }
.report { max-width: 860px; line-height: 1.5; } .report h2 { margin-top: 0; } .report h3 { margin: 16px 0 6px; font-size: 15px; } .report ul { margin: 4px 0 8px 18px; }
table.grid .vl { width: 90px; text-align: right; } table.grid .um { width: 50px; } table.grid td.vl input { text-align: right; } .sumv { display: block; text-align: right; font-weight: 700; padding-right: 4px; }
#bCols.on { background: var(--brand); color: #fff; border-color: var(--brand); }

table.grid td.nearf { color: #e67700; font-weight: 700; }
.lg.near { background: #F08C00; }
.chip.warnc { background: #fff4e6; border-color: #ffd8a8; }
#floatMax { width: 64px; }

/* ---------- telefon ---------- */
@media (max-width: 760px) {
  .top { gap: 8px; padding: 8px 12px; }
  .pname { order: 3; flex-basis: 100%; font-size: 12px; }
  .tabs { order: 4; flex-basis: 100%; overflow-x: auto; }
  .view { padding: 8px 10px; }
  .left { width: 330px; }
  .wsub { grid-template-columns: 1fr 1fr; }
  .wline { grid-template-columns: 1fr 1fr 34px; } .wline > .cb.act, .wline.whead > span:first-child { grid-column: 1 / -1; } .wline.whead > span:nth-child(n+4) { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .nrow { flex-wrap: wrap; }
  .foot span:last-child { display: none; }
  .jnav { width: 100%; justify-content: space-between; }
}

/* ---------- tipărire fila zilei (A4) ---------- */
@media print {
  body.print-day > *:not(#printDay) { display: none !important; }
  body.print-day #printDay { display: block !important; font-size: 10.5px; color: #000; page: fila; }
  @page fila { size: A4 portrait; margin: 12mm; }
  body.print-day { background: #fff; }
}
#printDay .ph { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 6px; }
#printDay .pr { text-align: right; } #printDay .pt1 { font-size: 15px; font-weight: 700; }
#printDay .pinfo { margin: 4px 0 8px; }
#printDay h4 { margin: 8px 0 3px; font-size: 11px; text-transform: uppercase; }
#printDay table.pt { width: 100%; border-collapse: collapse; }
#printDay table.pt th, #printDay table.pt td { border: 1px solid #555; padding: 2px 4px; text-align: left; }
#printDay table.pt th { background: #eee; } #printDay .empty { color: #777; }
#printDay .pobs { border: 1px solid #555; min-height: 40px; padding: 4px; }
#printDay .psig { display: flex; justify-content: space-between; margin-top: 18px; }

/* ---------- tipărire ---------- */
#printGrafic { display: none; }
#dlgPrint { width: min(640px, 96vw); }
.prbtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.prbtns .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
@media print {
  body.print-grafic > *:not(#printGrafic) { display: none !important; }
  body.print-grafic { background: #fff; margin: 0; }
  body.print-grafic #printGrafic { display: block !important; }
  #printGrafic .pg { break-after: page; page-break-after: always; overflow: hidden; }
  #printGrafic .pg:last-child { break-after: auto; page-break-after: auto; }
  #printGrafic.a3 .pg { width: 420mm; height: 296mm; page: grA3; }
  #printGrafic.a4 .pg { width: 297mm; height: 209mm; page: grA4; }
  #printGrafic svg { width: 100%; height: 100%; display: block; }
  #printGrafic * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page grA3 { size: A3 landscape; margin: 0; }
  @page grA4 { size: A4 landscape; margin: 0; }
}

/* ---- cont / server ---- */
.cloudbtn { margin-left: auto; background: #23315a; color: #fff; border: 1px solid #3a4a75; border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloudbtn:hover { background: #2d3d6e; }
dialog.cloud { width: min(560px, 94vw); border: 0; border-radius: 12px; padding: 22px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.cloud::backdrop { background: rgba(20,33,61,.45); }
dialog.cloud h3 { margin: 0 0 8px; }
dialog.cloud .x { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--muted); }
dialog.cloud .fld { display: block; margin: 10px 0; }
dialog.cloud .fld span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
dialog.cloud input, dialog.cloud select { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
dialog.cloud .row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
dialog.cloud .row input { flex: 2; } dialog.cloud .row select { flex: 1; width: auto; }
dialog.cloud .row.right { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }
dialog.cloud .grow { flex: 1; }
dialog.cloud .plist { max-height: 300px; overflow: auto; margin: 10px 0; }
dialog.cloud .prow { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
dialog.cloud .prow.on { border-color: var(--brand); background: #fff7f2; }
dialog.cloud .box { background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
dialog.cloud .small, .small { font-size: 12px; }
dialog.cloud .bad, #cloudStatus.bad { color: #c92a2a; }

/* ---- jurnal pe telefon ---- */
body.mob > header.top, body.mob > main, body.mob > footer.foot { display: none !important; }
#mob { max-width: 620px; margin: 0 auto; padding: 0 0 90px; font-size: 16px; background: var(--bg); min-height: 100vh; }
#mob .mh { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--navy); color: #fff; }
#mob .mt { display: flex; align-items: center; gap: 10px; min-width: 0; }
#mob .mpn { display: flex; flex-direction: column; min-width: 0; }
#mob .mpn b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mob .mpn span { font-size: 12px; color: #c9d1e0; }
#mob .mbtn { min-width: 44px; min-height: 40px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 18px; font-weight: 600; cursor: pointer; padding: 0 12px; }
#mob .mh .mbtn { background: #23315a; color: #fff; border-color: #3a4a75; font-size: 14px; }
#mob .mbtn.big { font-size: 26px; min-width: 52px; }
#mob .mnav { position: sticky; top: 60px; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
#mob .mdate { flex: 1; text-align: center; position: relative; display: flex; flex-direction: column; cursor: pointer; }
#mob .mdate b { font-size: 18px; } #mob .mdate span { font-size: 13px; color: var(--muted); }
#mob .mdate input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
#mob .mc { background: #fff; margin: 12px 10px; border-radius: 12px; padding: 14px; box-shadow: 0 1px 3px rgba(20,33,61,.08); }
#mob .mc.center { text-align: center; }
#mob .mc h3 { margin: 0 0 8px; font-size: 16px; }
#mob .mhint { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
#mob .mg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#mob .mf { display: block; margin-bottom: 8px; } #mob .mf span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
#mob select, #mob input[type=number], #mob input[type=text], #mob input[type=search], #mob textarea, #mob .mloc { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
#mob .mw { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
#mob .mw.on { border-color: var(--brand); background: #fff7f2; }
#mob .mw.done { border-color: #2b8a3e; background: #ebfbee; }
#mob .mwt { display: flex; justify-content: space-between; gap: 8px; } #mob .mwt b { font-size: 15px; }
#mob .mcode { color: var(--muted); font-size: 12px; white-space: nowrap; }
#mob .mwm { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
#mob .mwr { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
#mob .mq { flex: 1; display: flex; align-items: center; gap: 6px; } #mob .mq span { color: var(--muted); min-width: 28px; }
#mob .mchk { display: flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
#mob .mchk input { width: 22px; height: 22px; }
#mob .mloc { font-size: 14px; padding: 8px 10px; }
#mob .mbar { height: 5px; background: #e9ecef; border-radius: 3px; margin-top: 8px; overflow: hidden; } #mob .mbar i { display: block; height: 100%; background: #2b8a3e; }
#mob .madd { margin-top: 6px; } #mob .mres { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
#mob .mpick { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 2px; font: inherit; cursor: pointer; }
#mob .mpick span { font-size: 12px; color: var(--muted); }
#mob .mcnt { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f1f3f5; }
#mob .mcnt .ml { flex: 1; font-size: 15px; } #mob .mcnt small { color: var(--muted); }
#mob .mcnt input { width: 64px; text-align: center; }
#mob .mwarn { background: #fff3bf; color: #5c3c00; padding: 10px 14px; font-size: 14px; }
#mob .mfull { width: 100%; margin-top: 10px; padding: 12px; font-size: 16px; }
#mob .mfoot { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); align-items: center; }
#mob .mlink { border: 0; background: none; color: var(--brand); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.mobback { margin-left: 0; }
#mob .mg2 { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
#mob select { max-width: 100%; text-overflow: ellipsis; }
#mob .mh .mt, #mob .mpn, #mob .mcnt .ml, #mob .mq, #mob .mdate { min-width: 0; }
#mob .mpn b, #mob .mpn span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mob, #mob * { box-sizing: border-box; }
#mob .mfoot > * { max-width: 100%; text-align: center; white-space: normal; }
html:has(body.mob), body.mob { overflow-x: hidden; max-width: 100vw; }
#mob { width: 100%; }
#mob .mfoot { width: 100%; max-width: 100vw; }
#mob .mh .mbtn { flex-shrink: 0; white-space: nowrap; padding: 0 10px; }

/* ---- generează actualizarea ---- */
dialog.upd { width: min(640px, 94vw); }
dialog.upd .usum { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 10px 0; }
dialog.upd .uline { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #f1f3f5; font-size: 14px; }
dialog.upd .uline:last-child { border-bottom: 0; }
dialog.upd .uline span { color: var(--muted); } dialog.upd .uline b { text-align: right; }
dialog.upd .uline.bad b { color: #c92a2a; } dialog.upd .uline.ok b { color: #2b8a3e; }
dialog.upd .ubtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
dialog.upd .chk { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 8px 0; }
dialog.upd .chk input { width: auto; }

/* ---- abonament, poze, echipa ---- */
.cbanner { padding: 8px 16px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cbanner.trial { background: #e7f5ff; color: #1864ab; } .cbanner.bad { background: #fff5f5; color: #c92a2a; }
.st-ok { color: #2b8a3e; } .st-trial { color: #1864ab; } .st-bad { color: #c92a2a; font-weight: 600; }
dialog.cloud .prow.arch { opacity: .6; }
dialog.cloud .pchecks { max-height: 160px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
dialog.cloud .chk { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0; } dialog.cloud .chk input { width: auto; }
dialog.cloud .ubtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; } dialog.cloud a.btn { text-decoration: none; display: inline-block; }
.mph { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.mph figure { margin: 0; position: relative; } .mph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.mph figcaption { font-size: 11px; color: var(--muted); margin-top: 2px; }
.mph .mx { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; cursor: pointer; }
#mob .mph { grid-template-columns: repeat(3, minmax(0,1fr)); }
.helpbtn { color: #c9d1e0; font-size: 12px; text-decoration: none; border: 1px solid #3a4a75; border-radius: 6px; padding: 4px 8px; } .helpbtn:hover { color: #fff; }
