/* ELECTRIC · Injecție — tema comercial.electricsrl.ro (Inter, roșu #e02a00, fișe tip Salesforce) */
:root {
  --brand: #e02a00; --brand-dark: #bd2300; --brand-soft: #fdf0ec;
  --text: #1b1f24; --text-weak: #5b6571; --text-faint: #8a939e;
  --border: #e0e4e9; --border-strong: #cbd2da; --border-soft: #eceff2;
  --bg: #f4f5f7; --bg-soft: #f7f8fa; --card: #fff;
  --link: #0b5cab; --focus: #1b6ac9;
  --green: #2e8b57; --green-bg: #e3f4e8; --green-text: #1f6b3a;
  --blue: #2f6fb5; --blue-bg: #e8f0fa; --blue-text: #2f5b98;
  --amber: #c98a1b; --amber-bg: #fdf4e2; --amber-text: #8a5a06;
  --red: #c8241c; --red-bg: #fdecea; --red-text: #a3201a;
  --teal: #1f8a83; --orange: #d07a22; --slate: #696d71;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-pop: 0 8px 24px rgba(16, 24, 40, .14);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); font-variant-numeric: tabular-nums; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.muted { color: var(--text-weak); }
.faint { color: var(--text-faint); }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.right { margin-left: auto; }

/* ---------- butoane ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: #fff; color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover:not(:disabled) { background: var(--bg-soft); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.brand:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.danger { color: var(--red-text); border-color: #efc2bf; }
.btn.danger:hover:not(:disabled) { background: var(--red-bg); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover:not(:disabled) { background: var(--bg); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn.icon { width: 32px; padding: 0; }
.btn svg { flex: none; }
.link-btn { border: 0; background: none; padding: 0; color: var(--link); font-weight: 600; cursor: pointer; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }

/* ---------- câmpuri ---------- */
.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field > label, .field > .lbl { font-size: 12px; font-weight: 600; color: var(--text-weak); }
.field .hint { font-size: 11.5px; color: var(--text-faint); }
.field .err { font-size: 12px; color: var(--red-text); font-weight: 600; }
.inp { height: 32px; width: 100%; min-width: 0; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; }
textarea.inp { height: auto; min-height: 64px; padding: 7px 9px; resize: vertical; }
select.inp { padding-right: 26px; }
.inp:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(27, 106, 201, .15); }
.inp.bad { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200, 36, 28, .12); }
.inp-unit { position: relative; display: flex; align-items: center; }
.inp-unit .inp { padding-right: 46px; }
.inp-unit span { position: absolute; right: 9px; font-size: 12px; color: var(--text-faint); pointer-events: none; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.span2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.seg button { white-space: nowrap; border: 0; background: none; height: 30px; padding: 0 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-weak); }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- etichete, culori, progres ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; background: var(--bg); color: var(--text-weak); }
.badge.green { background: var(--green-bg); color: var(--green-text); }
.badge.blue { background: var(--blue-bg); color: var(--blue-text); }
.badge.amber { background: var(--amber-bg); color: var(--amber-text); }
.badge.red { background: var(--red-bg); color: var(--red-text); }
.badge.brand { background: var(--brand-soft); color: var(--brand-dark); }
.sw { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); vertical-align: -2px; }
.sw.lg { width: 22px; height: 22px; }
.sw.none { background: repeating-linear-gradient(45deg, #fff 0 3px, #dfe3e8 3px 6px); }
.prog { display: flex; align-items: center; gap: 7px; min-width: 0; }
.prog .bar { flex: 1 1 auto; height: 6px; border-radius: 99px; background: var(--border-soft); overflow: hidden; min-width: 40px; }
.prog .bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.prog .bar i.done { background: var(--green); }
.prog small { font-size: 11.5px; color: var(--text-weak); min-width: 34px; text-align: right; }
.pname { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pname > div { min-width: 0; }
.pname b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pname small { display: block; color: var(--text-weak); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- cadrul aplicației de birou ---------- */
.app-bar { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--border-soft); min-width: 0; }
.brandmark { display: flex; align-items: baseline; gap: 8px; text-decoration: none !important; color: var(--text); min-width: 0; }
.wordmark { color: var(--brand); font-weight: 800; font-size: 22px; letter-spacing: -.6px; line-height: 1; }
.logo-img { display: block; height: 30px; width: auto; flex: none; }
.brandmark { align-items: center; }
.drawer-head .logo-img { height: 34px; }
.h-top .logo-img { height: 30px; }
.auth-logo { width: min(340px, 100%); height: auto; display: block; margin-bottom: 4px; }
.print-head { display: none; }
.appname { font-size: 13px; font-weight: 650; color: var(--text-weak); letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; }
.ver { padding: 1px 7px; border: 1px solid var(--border-soft); border-radius: 999px; background: var(--bg); font-size: 11px; font-weight: 600; color: var(--text-weak); }
.app-bar .today { font-size: 12.5px; color: var(--text-weak); white-space: nowrap; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border: 1px solid transparent; border-radius: 999px; background: none; cursor: pointer; min-width: 0; }
.user-btn:hover { background: var(--bg); }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.user-btn .who { text-align: left; line-height: 1.2; }
.user-btn .who b { display: block; font-size: 13px; }
.user-btn .who small { font-size: 11.5px; color: var(--text-weak); }
.app-tabs { position: sticky; top: 0; z-index: 30; display: flex; align-items: stretch; gap: 2px; height: 42px; padding: 0 10px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 1px 3px rgba(16, 24, 40, .05); }
.tab { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 11px; border: 0; background: none; font-size: 13.5px; font-weight: 600; color: var(--text-weak); cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--text); background: var(--bg-soft); }
.tab.on { color: var(--text); }
.tab.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.tab .cnt { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bg); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.tab .cnt.hot { background: #fde3dc; color: #b52200; }
.menu-wrap { position: relative; display: flex; }
.menu { position: absolute; top: calc(100% + 4px); z-index: 80; min-width: 220px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-pop); }
.menu.right-al { right: 0; }
.menu a, .menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: none; font-size: 13.5px; color: var(--text); text-align: left; cursor: pointer; text-decoration: none !important; }
.menu a:hover, .menu button:hover { background: var(--bg); }
.menu a.on { color: var(--brand-dark); font-weight: 650; }
.menu .sep { height: 1px; margin: 4px 0; background: var(--border-soft); }
.menu .head { padding: 8px 10px 6px; font-size: 12px; color: var(--text-weak); }
.burger { display: none; }
.drawer-bg { position: fixed; inset: 0; z-index: 90; background: rgba(15, 20, 30, .4); }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 91; width: min(300px, 86vw); background: #fff; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); }
.drawer-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--border-soft); }
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 8px 12px; }
.drawer-body .grp { padding: 10px 10px 4px; font-size: 11px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .5px; }
.drawer-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-size: 15px; color: var(--text); text-align: left; cursor: pointer; text-decoration: none !important; }
.drawer-item.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; box-shadow: inset 3px 0 0 var(--brand); }

.page { max-width: 1480px; margin: 0 auto; padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.page-head .ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 8px; color: #fff; background: var(--brand); }
.ico.teal { background: var(--teal); } .ico.orange { background: var(--orange); } .ico.slate { background: var(--slate); } .ico.blue { background: var(--blue); }
.page-head h1 { font-size: 19px; font-weight: 700; }
.page-head .sub { font-size: 12.5px; color: var(--text-weak); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 12.5px; color: var(--text-weak); display: flex; gap: 6px; align-items: center; }

.card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; background: var(--bg-soft); border-bottom: 1px solid var(--border-soft); }
.card-head h2, .card-head h3 { font-size: 14px; font-weight: 650; }
.card-head .cnt { color: var(--text-weak); font-weight: 500; }
.card-head .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-body { padding: 12px 14px; min-width: 0; }
.card-body.flush { padding: 0; }
.card-foot { padding: 8px 12px; border-top: 1px solid var(--border-soft); font-size: 12.5px; color: var(--text-weak); display: flex; gap: 12px; flex-wrap: wrap; }

/* fișa unei înregistrări (antet + câmpuri-cheie) */
.rec { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.rec-top { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rec-top .t { flex: 1 1 auto; min-width: 0; }
.rec-top .kicker { font-size: 11.5px; color: var(--text-weak); text-transform: uppercase; letter-spacing: .4px; font-weight: 650; }
.rec-top h1 { font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }
.rec-top .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.hl { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 16px; margin: 0; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.hl dt { font-size: 11.5px; color: var(--text-weak); }
.hl > .span2 { grid-column: span 2; }
.hl dd { margin: 1px 0 0; font-size: 13.5px; font-weight: 650; overflow-wrap: anywhere; }
.hl dd small { display: block; font-weight: 400; font-size: 11.5px; color: var(--text-weak); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); text-align: left; cursor: default; min-width: 0; }
button.kpi { cursor: pointer; } button.kpi:hover { border-color: var(--border-strong); }
.kpi b { font-size: 22px; font-weight: 750; line-height: 1.15; }
.kpi span { font-size: 12.5px; color: var(--text-weak); }
.kpi small { font-size: 11.5px; color: var(--text-faint); }
.kpi.amber { box-shadow: inset 3px 0 #d39b2a, var(--shadow); }
.kpi.red { box-shadow: inset 3px 0 var(--red), var(--shadow); }
.kpi.green { box-shadow: inset 3px 0 var(--green), var(--shadow); }
.kpi.blue { box-shadow: inset 3px 0 var(--blue), var(--shadow); }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }

/* tabele: fără derulare orizontală; pe ecran îngust devin carduri */
.tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tbl th { padding: 7px 10px; font-size: 11.5px; font-weight: 650; color: var(--text-weak); text-align: left; background: var(--bg-soft); border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f9fafb; }
.tbl tr.off td { color: var(--text-faint); }
.tbl tr.off .sw { opacity: .5; }
.tbl tr.grp td { background: var(--bg-soft); font-size: 12px; font-weight: 700; color: var(--text-weak); padding: 6px 10px; }
.tbl td small { display: block; font-size: 11.5px; color: var(--text-weak); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .mat { font-size: 12px; line-height: 1.35; }
.tbl .mat div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .mat i { font-style: normal; color: var(--text-faint); display: inline-block; width: 20px; }
.tbl tfoot td { font-weight: 700; background: var(--bg-soft); border-top: 1px solid var(--border); }
.empty { padding: 26px 16px; text-align: center; color: var(--text-weak); font-size: 13px; }
.empty b { display: block; color: var(--text); font-size: 14px; margin-bottom: 3px; }

.toolbar { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.toolbar .field { flex: 0 1 150px; }
.toolbar .field.wide { flex: 1 1 220px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text-weak); cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--brand-soft); border-color: #f4b8a8; color: var(--brand-dark); }
.chip .n { font-size: 11px; opacity: .8; }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 96px; padding-top: 14px; }
.bars div { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bars i { display: block; width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: var(--brand); opacity: .82; }
.bars i.zero { background: var(--border); height: 2px !important; }
.bars small { font-size: 10px; color: var(--text-faint); margin-top: 3px; }
.bars span { font-size: 9.5px; color: var(--text-weak); white-space: nowrap; }

.list { display: flex; flex-direction: column; }
.list > div { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--border-soft); min-width: 0; font-size: 13px; }
.list > div:last-child { border-bottom: 0; }
.list > a { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--border-soft); min-width: 0; font-size: 13px; color: inherit; text-decoration: none; }
.list > a:last-child { border-bottom: 0; }
.list > a:hover { background: var(--bg-soft); text-decoration: none; }
.list > a.off { opacity: .55; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; }
.notice.amber { background: var(--amber-bg); color: var(--amber-text); border: 1px solid #f1d9a6; }
.notice.red { background: var(--red-bg); color: var(--red-text); border: 1px solid #f3c6c2; }
.notice.blue { background: var(--blue-bg); color: var(--blue-text); border: 1px solid #c9dbf2; }
.notice.green { background: var(--green-bg); color: var(--green-text); border: 1px solid #bfe3cb; }
.notice ul { margin: 4px 0 0; padding-left: 18px; }

/* dialoguri */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(15, 20, 30, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 12px 12px; overflow-y: auto; }
.modal { width: min(560px, 100%); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; max-height: 88vh; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
.modal-head h2 { font-size: 16px; font-weight: 700; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-body > * { flex-shrink: 0; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid var(--border-soft); background: var(--bg-soft); border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.sect-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-weak); padding-top: 4px; border-top: 1px solid var(--border-soft); margin-top: 2px; }

/* alegerea produsului */
.picker { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.picker .inp { border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; box-shadow: none !important; }
.picker-list { max-height: 260px; overflow-y: auto; }
.picker-list .g { padding: 5px 10px; font-size: 11px; font-weight: 700; color: var(--text-faint); background: var(--bg-soft); text-transform: uppercase; letter-spacing: .3px; }
.picker-list button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-bottom: 1px solid var(--border-soft); background: none; text-align: left; cursor: pointer; font-size: 13px; }
.picker-list button:hover { background: var(--bg-soft); }
.picker-list button.on { background: var(--brand-soft); }
.picker-list button .meta { margin-left: auto; font-size: 11.5px; color: var(--text-weak); white-space: nowrap; }
.picked { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.swatch-pick { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; background: #fff; }
.swatch-pick.on { border-color: var(--brand); background: var(--brand-soft); }
.swatch-pick.dis { opacity: .5; cursor: not-allowed; }

/* mesaje scurte */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 10px 14px; border-radius: var(--radius-sm); background: #1f2329; color: #fff; font-size: 13.5px; box-shadow: var(--shadow-pop); }
.toast.err { background: var(--red); }
.toast.ok { background: #1f6b3a; }

/* autentificare */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: #fff; }
.auth-side { background: var(--bg); border-right: 1px solid var(--border-soft); padding: 40px 48px; display: flex; flex-direction: column; gap: 18px; }
.auth-side h2 { font-size: 26px; font-weight: 750; letter-spacing: -.3px; max-width: 420px; }
.auth-side p { color: var(--text-weak); max-width: 420px; margin: 0; }
.auth-side ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.auth-side li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.auth-side li i { flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-dark); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 12px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.auth-form .lock { width: 52px; height: 52px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.auth-form .kicker { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-faint); font-weight: 700; }
.auth-form h1 { font-size: 30px; font-weight: 750; letter-spacing: -.4px; }
.auth-form .inp { height: 46px; font-size: 16px; }
.auth-form .btn { height: 46px; font-size: 15px; }

/* ---------- responsive (birou) ---------- */
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1240px) {
  .app-tabs { display: none; }
  .burger { display: inline-flex; }
  .app-bar .today { display: none; }
}
@media (max-width: 980px) { .user-btn .who, .appname { display: none; } }
@media (max-width: 760px) {
  .page { padding: 10px 10px 32px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .modal-bg { padding: 0; }
  .modal { max-height: 100vh; min-height: 100vh; border-radius: 0; }
  .modal-foot { border-radius: 0; }
  /* tabel → carduri */
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100% !important; }
  .tbl.cards tr { padding: 8px 12px; border-bottom: 1px solid var(--border); }
  .tbl.cards td { padding: 2px 0; border: 0; text-align: left !important; white-space: normal; }
  .tbl.cards td[data-l]::before { content: attr(data-l); display: inline-block; min-width: 96px; font-size: 11.5px; color: var(--text-faint); }
  .tbl.cards td.hide-m { display: none; }
  .tbl.cards tfoot { display: block; }
  .tbl.cards tr.grp td { padding: 4px 0; }
}
@media (max-width: 480px) { .grid2 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }

/* =====================================================================
   HALA — interfață pentru telefon: mare, clară, un pas pe ecran
   ===================================================================== */
.hall { min-height: 100vh; background: #fff; font-size: 17px; display: flex; flex-direction: column; }
.h-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--border); }
.h-top .wordmark { font-size: 24px; }
.h-top .title { font-size: 17px; font-weight: 700; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-back { display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 12px 0 6px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; font-size: 16px; font-weight: 650; cursor: pointer; }
.h-who { display: flex; align-items: center; gap: 8px; margin-left: auto; border: 0; background: none; cursor: pointer; padding: 4px; }
.h-who .avatar { width: 40px; height: 40px; font-size: 14px; }
.h-body { flex: 1 1 auto; width: 100%; max-width: 640px; margin: 0 auto; padding: 16px 14px 120px; display: flex; flex-direction: column; gap: 14px; }
.h-steps { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-weak); font-weight: 600; }
.h-steps .bar { flex: 1; height: 6px; border-radius: 99px; background: var(--border-soft); overflow: hidden; }
.h-steps .bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .2s; }
.h-q { font-size: 24px; font-weight: 750; letter-spacing: -.2px; line-height: 1.2; }
.h-sub { font-size: 16px; color: var(--text-weak); margin-top: -6px; }
.h-label { font-size: 15px; font-weight: 700; color: var(--text-weak); text-transform: uppercase; letter-spacing: .5px; margin-top: 6px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles.one { grid-template-columns: minmax(0, 1fr); }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; min-height: 76px; padding: 12px 14px; border: 2px solid var(--border-strong);
  border-radius: 14px; background: #fff; text-align: left; cursor: pointer; font-size: 17px; color: var(--text); -webkit-tap-highlight-color: transparent; min-width: 0; }
.tile:active { transform: scale(.985); }
a.tile, a.tile:hover { text-decoration: none; color: var(--text); }
a.tile.primary, a.tile.primary:hover { color: #fff; }
.tile b { font-size: 21px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.tile small { font-size: 14.5px; color: var(--text-weak); line-height: 1.3; }
.tile.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px var(--brand) inset; }
.tile.on::after { content: "✓"; position: absolute; top: 8px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tile:disabled, .tile.dis { opacity: .45; cursor: not-allowed; border-style: dashed; }
.tile .tag { display: inline-block; margin-top: 2px; padding: 2px 8px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--bg); color: var(--text-weak); }
.tile .tag.brand { background: var(--brand); color: #fff; }
.tile .tag.green { background: var(--green-bg); color: var(--green-text); }
.tile .tag.amber { background: var(--amber-bg); color: var(--amber-text); }
.tile.order { flex-direction: row; align-items: center; gap: 14px; min-height: 92px; }
.tile.order .sw { width: 44px; height: 44px; border-width: 2px; }
.tile.order > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile.big { min-height: 120px; }
.tile.menu-tile { flex-direction: row; align-items: center; gap: 14px; min-height: 92px; }
.tile.menu-tile > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile.row-tile { flex-direction: row; align-items: center; justify-content: space-between; min-height: 64px; }
.tile.row-tile small { font-size: 16px; }
.tile.menu-tile .mi { flex: none; width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); }
.tile.menu-tile.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.tile.menu-tile.primary small { color: rgba(255, 255, 255, .85); }
.tile.menu-tile.primary .mi { background: rgba(255, 255, 255, .18); color: #fff; }
.h-input { width: 100%; height: 64px; padding: 0 16px; border: 2px solid var(--border-strong); border-radius: 14px; font-size: 26px; font-weight: 700; background: #fff; }
.h-input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 4px rgba(27, 106, 201, .15); }
.h-input.text { font-size: 22px; letter-spacing: .5px; text-transform: uppercase; }
.h-input.small { height: 54px; font-size: 20px; }
.h-input.bad { border-color: var(--red); }
textarea.h-input { height: 110px; padding: 12px 16px; font-size: 18px; font-weight: 500; text-transform: none; }
.stepper { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; gap: 8px; align-items: stretch; }
.stepper button { height: 72px; border: 2px solid var(--border-strong); border-radius: 14px; background: var(--bg-soft); font-size: 34px; font-weight: 700; cursor: pointer; color: var(--text); }
.stepper button:active { background: var(--border-soft); }
.stepper .h-input { height: 72px; text-align: center; font-size: 34px; }
.qty-total { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border); }
.qty-total b { font-size: 38px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.qty-total small { font-size: 15px; color: var(--text-weak); text-align: center; }
.h-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: 16.5px; line-height: 1.4; }
.h-note.red { background: var(--red-bg); color: var(--red-text); border: 2px solid #f0b4af; font-weight: 600; }
.h-note.amber { background: var(--amber-bg); color: #6f4800; border: 2px solid #efcf88; }
.h-note.green { background: var(--green-bg); color: var(--green-text); border: 2px solid #b7e0c4; }
.h-note.blue { background: var(--blue-bg); color: var(--blue-text); border: 2px solid #c4d8f2; }
.h-note svg { flex: none; margin-top: 2px; }
.h-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--border); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
.h-bottom > div { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.h-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; padding: 0 18px; border: 2px solid var(--border-strong); border-radius: 14px; background: #fff;
  font-size: 18px; font-weight: 750; cursor: pointer; color: var(--text); -webkit-tap-highlight-color: transparent; text-decoration: none !important; }
.h-btn.brand { background: var(--brand); border-color: var(--brand); color: #fff; flex: 1 1 auto; }
.h-btn.green { background: var(--green); border-color: var(--green); color: #fff; flex: 1 1 auto; }
.h-btn.amber { background: #b97a0a; border-color: #b97a0a; color: #fff; flex: 1 1 auto; }
.h-btn.danger { border-color: #e5a29d; color: var(--red-text); }
.h-btn.wide { width: 100%; }
.h-btn:disabled { opacity: .4; cursor: not-allowed; }
.h-sum { border: 2px solid var(--border); border-radius: 14px; overflow: hidden; }
.h-sum > div { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); min-width: 0; }
.h-sum > div:last-child { border-bottom: 0; }
.h-sum dt { flex: none; width: 104px; font-size: 14px; color: var(--text-weak); font-weight: 600; }
.h-sum dd { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.h-sum dd small { display: block; font-size: 14.5px; font-weight: 500; color: var(--text-weak); }
.h-sum .edit { flex: none; border: 0; background: none; color: var(--link); font-size: 15px; font-weight: 700; padding: 8px 4px; cursor: pointer; }
.h-sum .big { font-size: 24px; font-weight: 800; white-space: nowrap; }
.h-sum dd .row { flex-wrap: nowrap; }
.done-mark { width: 92px; height: 92px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; margin: 12px auto 4px; }
.h-center { text-align: center; }
.h-card { border: 2px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.h-card.off { opacity: .55; }
.h-card .top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.h-card .top b { font-size: 18px; }
.h-card .meta { font-size: 15px; color: var(--text-weak); }
.h-card .qty { font-size: 22px; font-weight: 800; }
.h-search { position: sticky; top: 60px; z-index: 5; background: #fff; padding: 4px 0 6px; }
.h-search .h-input { height: 56px; font-size: 19px; font-weight: 500; text-transform: none; }
.h-group { font-size: 14px; font-weight: 800; color: var(--text-weak); text-transform: uppercase; letter-spacing: .5px; padding: 8px 2px 0; }
.h-row-pct { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.h-row-pct .h-input { width: 120px; height: 54px; font-size: 22px; }
.h-link { border: 0; background: none; color: var(--link); font-size: 16px; font-weight: 700; padding: 8px 0; cursor: pointer; text-align: left; }
.spin { width: 34px; height: 34px; border: 4px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 380px) { .tiles.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile b { font-size: 19px; } .h-q { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .app-bar, .app-tabs, .toolbar, .btn { display: none !important; } body { background: #fff; } .card { box-shadow: none; }
  .print-head { display: flex !important; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 0 8px; margin: 0 0 6px; border-bottom: 1px solid #000; }
  .print-head img { height: 44px; width: auto; } .print-head span { font-size: 11px; color: #333; text-align: right; } }

/* ---------- programul pe zile ---------- */
.ptbl th.today, .ptbl td.today { background: #fff6f3; }
.ptbl th.today { color: var(--brand-dark); }
.ptbl th.we, .ptbl td.we { background: #fafbfc; }
.ptbl td.pcell { padding: 4px 5px; vertical-align: top; }
.pin { width: 100%; height: 30px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: right; font-weight: 650; font-size: 13px; }
.pin:hover { border-color: var(--border); background: #fff; }
.pin:focus { border-color: var(--focus); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(27, 106, 201, .15); }
.pin::placeholder { color: var(--border-strong); }
.pval { height: 30px; line-height: 30px; text-align: right; font-weight: 650; padding: 0 6px; }
.pmade { text-align: right; font-size: 11px; font-weight: 700; padding: 0 6px; white-space: nowrap; }
.ptbl tfoot td small { display: block; font-size: 11px; }
@media (max-width: 1100px) { .ptbl .hide-m, .ptbl col.hide-m { display: none; } }
@media (max-width: 760px) { .ptbl .hide-s, .ptbl col.hide-s { display: none; } .ptbl td.pcell { padding: 3px 2px; } .pin { font-size: 12px; padding: 0 3px; } }
@media print {
  .chips, .page-head .actions, .crumbs { display: none !important; }
  .program .card { break-inside: avoid; margin-bottom: 10px; }
  .pin { border: 0; }
  .page { max-width: none; padding: 0; }
}

/* =====================================================================
   v1.1 — rețete, ambalare, loturi, CTC, evenimente, etichete, Gantt, rapoarte
   ===================================================================== */
.inp.ro { display: flex; align-items: center; background: var(--bg-soft); color: var(--text-weak); }
a.plain { color: inherit; } a.plain:hover { color: var(--link); }
.link-btn.small { font-size: 11.5px; font-weight: 600; margin-top: 2px; display: block; }
.late { color: var(--red-text); font-weight: 650; }
.neg { color: var(--red-text); } .pos { color: var(--green-text); }
.list > div.off { opacity: .55; }
.list > div.click { cursor: pointer; } .list > div.click:hover { background: var(--bg-soft); }
.list > div.sel { background: var(--brand-soft); }

/* carduri de alegere */
.rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.rcard { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; text-align: left; cursor: pointer; min-width: 0; }
.rcard:hover:not(:disabled) { border-color: #9fb0c3; }
.rcard:disabled { opacity: .45; cursor: not-allowed; }
.rcard.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.rc-dot { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--border-strong); background: #fff; }
.rcard.on .rc-dot { border-color: var(--brand); box-shadow: inset 0 0 0 3px #fff; background: var(--brand); }
.rc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-body b { font-size: 13.5px; font-weight: 650; }
.rc-body small { font-size: 12px; color: var(--text-weak); overflow-wrap: anywhere; }

/* rețete */
.ritems { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 3px; }
.ritem { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border-radius: 999px; background: var(--bg); font-size: 12px; color: var(--text); white-space: nowrap; }
.ritem i { font-style: normal; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--slate); }
.ritem.colorant i { background: var(--brand); } .ritem.aditiv i { background: var(--amber); }
.ritem-edit { display: flex; flex-direction: column; gap: 6px; }
.ri-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 150px 32px; gap: 8px; align-items: center; }
.ri-role { display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #eef0f3; color: var(--slate); }
.ri-role.colorant { background: var(--brand-soft); color: var(--brand-dark); } .ri-role.aditiv { background: var(--amber-bg); color: var(--amber-text); }
.ri-pct { font-size: 12.5px; }
.rec-recipe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.dropzone { display: flex; align-items: center; gap: 10px; padding: 14px; border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; color: var(--text-weak); font-size: 13px; }
.dropzone:hover { border-color: var(--focus); color: var(--text); }
.dropzone.has { border-style: solid; border-color: var(--green); color: var(--green-text); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* lansarea comenzii */
.wz { display: flex; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid var(--border-soft); font-size: 13.5px; }
.wz:first-child { border-top: 0; padding-top: 0; }
.wz-n { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; }
.wz .faint { font-size: 12px; }
.quick { gap: 6px; font-size: 12.5px; } .quick .chip { height: 26px; }
.est { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--blue-bg); color: var(--blue-text); font-size: 12.5px; min-height: 32px; }
.est b { font-size: 14px; }
.est.late { background: var(--red-bg); color: var(--red-text); }
.est .lt { font-weight: 700; }
.bigprog { display: flex; flex-direction: column; gap: 4px; }
.bigprog .bar { height: 10px; border-radius: 99px; background: var(--border-soft); overflow: hidden; }
.bigprog .bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.bigprog .bar i.done { background: var(--green); }
.bigprog .row { font-size: 12.5px; } .bigprog .row b { font-size: 15px; }

/* evenimente */
.evlist { display: flex; flex-direction: column; }
.ev { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-bottom: 1px solid var(--border-soft); min-width: 0; font-size: 13px; }
.ev:last-child { border-bottom: 0; }
.ev.open { background: #fffaf9; }
.ev-d { margin: 2px 0; overflow-wrap: anywhere; }
.ev-r { color: var(--green-text); font-size: 12.5px; }
.ev-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: #eef0f3; color: var(--slate); }
.ev-ic.big { width: 44px; height: 44px; border-radius: 12px; }
.ev-ic.avarie, .ev-ic.matrita { background: var(--red-bg); color: var(--red-text); }
.ev-ic.curent { background: #fff6d6; color: #8a6a00; }
.ev-ic.mentenanta, .ev-ic.schimbare { background: var(--blue-bg); color: var(--blue-text); }
.ev-ic.material, .ev-ic.lipsa { background: var(--amber-bg); color: var(--amber-text); }
.ev-ic.calitate { background: #e6f4f3; color: var(--teal); }
.ev-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ev-type { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-size: 13px; text-align: left; }
.ev-type.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.tile.ev-tile { flex-direction: row; align-items: center; gap: 10px; }
.tile.ev-tile b { font-size: 17px; }
.tag-b { padding: 3px 10px; border-radius: 99px; background: var(--bg); font-size: 14px; font-weight: 700; }

/* CTC */
.ctcdef { display: grid; grid-template-columns: minmax(0, 1fr) auto 32px; gap: 8px; align-items: center; }
.ctc-items { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ctc-it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.ctc-it:last-child { border-bottom: 0; }
.ctc-it .nm { flex: 1 1 180px; font-weight: 600; }
.cnc { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.cnc button { border: 0; background: #fff; height: 32px; padding: 0 14px; font-weight: 650; cursor: pointer; color: var(--text-weak); }
.cnc button + button { border-left: 1px solid var(--border); }
.cnc button.on.c { background: var(--green); color: #fff; } .cnc button.on.nc { background: var(--red); color: #fff; }
.ctc-res { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.ctc-res span { padding: 1px 7px; border-radius: 99px; background: var(--bg); font-size: 11.5px; }
.ctc-res span.c { background: var(--green-bg); color: var(--green-text); } .ctc-res span.nc { background: var(--red-bg); color: var(--red-text); font-weight: 700; }

/* fișa lotului */
.lot-qr { flex: none; width: 92px; height: 92px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: #fff; display: block; }
.lot-qr svg { width: 100%; height: 100%; }
.alloc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }

/* etichete */
.lblprev { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--border-strong); box-shadow: 0 2px 6px rgba(16, 24, 40, .12); border-radius: 3px; flex: none; }
.printgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.tplgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.tplcard { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); }
.tplcard:hover { border-color: var(--border-strong); }
.tplcard.off { opacity: .6; }
.tplcard small { display: block; color: var(--text-weak); font-size: 12px; }
.tplprev { display: flex; justify-content: center; padding: 10px; background: var(--bg); border-radius: var(--radius-sm); }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: start; }
.ed-stage { padding: 22px 16px; background: repeating-conic-gradient(#f1f3f5 0 25%, #fafbfc 0 50%) 0 0/16px 16px; display: flex; justify-content: center; overflow: auto; min-height: 240px; max-height: 76vh; }
.ed-frame { display: grid; grid-template-columns: 18px auto; grid-template-rows: 18px auto; gap: 0; margin: auto; }
.ed-corner { background: #fff; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ruler { display: block; background: #fff; }
.ruler line { stroke: #8a939e; stroke-width: 1; shape-rendering: crispEdges; }
.ruler.h { border-bottom: 1px solid var(--border); } .ruler.v { border-right: 1px solid var(--border); }
.rl-t { font-size: 8.5px; fill: var(--text-weak); font-family: var(--font); }
.ed-label { position: relative; background: #fff; box-shadow: 0 2px 10px rgba(16, 24, 40, .18); }
.ed-label > div:first-child { position: absolute; left: 0; top: 0; }
.ed-grid { position: absolute; inset: 0; pointer-events: none; }
.ed-el { position: absolute; border: 1px dashed transparent; cursor: move; touch-action: none; }
.ed-label.outl .ed-el { border-color: rgba(27, 106, 201, .35); }
.ed-el:hover { border-color: var(--focus); background: rgba(27, 106, 201, .05); }
.ed-el.on { border: 1.5px solid var(--focus); background: rgba(27, 106, 201, .08); }
.ed-rs { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: var(--focus); border: 2px solid #fff; border-radius: 3px; cursor: nwse-resize; }
.ed-side .card-body { padding: 10px 12px; }
.phs { display: flex; flex-wrap: wrap; gap: 4px; }
.phs button { border: 1px solid var(--border); background: var(--bg-soft); border-radius: 6px; padding: 2px 6px; font-size: 11.5px; font-family: ui-monospace, Consolas, monospace; cursor: pointer; color: var(--text-weak); }
.phs button:hover { border-color: var(--focus); color: var(--text); }

/* Gantt */
.gantt { position: relative; }
.gantt svg { display: block; font-family: var(--font); }
.g-day { font-size: 11px; font-weight: 700; fill: var(--text-weak); text-transform: uppercase; }
.g-day.today { fill: var(--brand-dark); }
.g-date { font-size: 11px; fill: var(--text-faint); }
.g-m { font-size: 14px; font-weight: 800; fill: var(--text); }
.g-mn { font-size: 11px; fill: var(--text-faint); }
.g-bar, .g-act, .g-ev { cursor: pointer; }
.g-bar:hover rect:first-child { fill-opacity: .45; }
.g-bt { font-size: 11px; font-weight: 650; fill: var(--text); pointer-events: none; }
.g-now { font-size: 10.5px; font-weight: 700; fill: var(--brand); }
.g-tip { position: absolute; z-index: 5; max-width: 260px; padding: 8px 10px; border-radius: 8px; background: #1f2329; color: #fff; font-size: 12px; line-height: 1.4; pointer-events: none; box-shadow: var(--shadow-pop); }
.g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.g-legend i { display: inline-block; width: 18px; height: 10px; border-radius: 2px; }
.lg-plan { background: #cfd6de; border: 1px solid #9aa3ad; } .lg-act { background: #2e8b57; } .lg-ev { background: repeating-linear-gradient(45deg, #fdecea 0 3px, #c8241c 3px 5px); } .lg-off { background: #eef0f3; border: 1px solid #dfe3e8; } .lg-due { width: 2px !important; background: #2e8b57; }
.q-m { border-bottom: 1px solid var(--border-soft); } .q-m:last-child { border-bottom: 0; }
.q-h { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; background: var(--bg-soft); font-size: 13px; }
.q-r { display: flex; gap: 10px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--border-soft); font-size: 12.5px; min-width: 0; flex-wrap: wrap; }
.q-mv { display: inline-flex; gap: 2px; }
.q-mv button { width: 24px; height: 24px; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.q-mv button:disabled { opacity: .3; cursor: default; }

/* rapoarte */
.hbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--border-soft); margin: 3px 0; }
.hbar i { display: block; height: 100%; }
.hbar i.p, .hb-p { background: var(--green); } .hbar i.d, .hb-d { background: var(--red); } .hbar i.i, .hb-i { background: #d5dbe2; }
.causes { display: flex; flex-direction: column; gap: 8px; }
.causes > div { display: grid; grid-template-columns: 28px 150px minmax(0, 1fr) 70px; gap: 8px; align-items: center; font-size: 12.5px; }
.causes .bar { height: 10px; border-radius: 99px; background: var(--border-soft); overflow: hidden; }
.causes .bar i { display: block; height: 100%; background: var(--red); opacity: .8; }
.causes b { text-align: right; }

/* telefon: material din rețetă, plăci noi */
.mat-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--bg-soft); border: 2px solid var(--border); }
.mat-card b { font-size: 24px; font-weight: 800; }
.mat-card span { font-size: 17px; } .mat-card small { font-size: 14px; color: var(--text-weak); }
.mat-card .ri-role { align-self: flex-start; font-size: 13px; height: 26px; }
.tile.menu-tile.warn .mi { background: var(--amber-bg); color: var(--amber-text); }
.hall .page { max-width: 900px; padding-bottom: 60px; }
.hall .modal .btn { height: 46px; font-size: 15px; padding: 0 16px; }
.hall .modal .inp { height: 44px; font-size: 16px; }
.hall .modal .seg button { height: 42px; font-size: 14px; }
.hall .modal .chip { height: 36px; font-size: 14px; }

@media (max-width: 1100px) { .editor { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .printgrid { grid-template-columns: minmax(0, 1fr); }
  .ri-row { grid-template-columns: minmax(0, 1fr) 110px 32px; } .ri-row .ri-role { grid-column: 1 / -1; justify-self: start; }
  .ev-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .causes > div { grid-template-columns: 28px 110px minmax(0, 1fr) 60px; }
  .lot-qr { width: 72px; height: 72px; }
}
@media print { .print-head { display: flex !important; } .gantt .g-tip { display: none; } }

.doclink { display: inline-flex; align-items: center; gap: 3px; margin: 2px 6px 0 0; padding: 1px 7px; border-radius: 99px; background: var(--blue-bg); color: var(--blue-text); font-size: 11.5px; font-weight: 600; white-space: nowrap; text-decoration: none !important; }
.doclink:hover { background: #d6e5f7; }

.scanbox { display: flex; align-items: center; gap: 6px; height: 34px; width: 300px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg-soft); color: var(--text-faint); }
.scanbox:focus-within { border-color: var(--focus); background: #fff; box-shadow: 0 0 0 3px rgba(27, 106, 201, .15); color: var(--text); }
.scanbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; }
@media (max-width: 980px) { .scanbox { width: 190px; } }
@media (max-width: 560px) { .scanbox { width: 130px; } .ver { padding: 1px 5px; font-size: 10.5px; } }

.ed-tools { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; font-size: 12.5px; }
.tb { min-width: 28px; height: 28px; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; cursor: pointer; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.tb:disabled { opacity: .35; cursor: default; }
.tb-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.tb-z { min-width: 42px; text-align: center; font-weight: 650; color: var(--text-weak); }
.check.small { font-size: 12.5px; gap: 5px; } .check.small input { width: 14px; height: 14px; }
.inp.sm { height: 28px; font-size: 12.5px; width: auto; padding: 0 22px 0 6px; }
.ed-tag { position: absolute; left: -1px; top: -21px; padding: 1px 6px; border-radius: 4px; background: var(--focus); color: #fff; font-size: 10.5px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.fields { display: flex; flex-direction: column; gap: 8px; }
.fg b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint); margin-bottom: 3px; }
.fg > div { display: flex; flex-wrap: wrap; gap: 4px; }
.fg button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 3px 9px; font-size: 12px; cursor: pointer; color: var(--text); }
.fg button:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.align-bar { display: flex; gap: 4px; flex-wrap: wrap; }
.align-bar button { width: 32px; height: 30px; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text-weak); }
.align-bar button:hover { color: var(--focus); border-color: var(--focus); }
/* v1.2 · șabloane pe tip de capac, etichete din planificare */
.tplline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.tplline small { flex-basis: 100%; color: var(--text-faint, #8a94a0); font-size: 11.5px; padding-left: 22px; }
.tpluse { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; font-size: 12px; }
.tplbtns { gap: 6px; flex-wrap: wrap; }
.tplcard .tplprev { text-decoration: none; }
.tplh { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-weak); margin: 18px 2px 8px; }
.tbl.assign td .inp, .tbl.assign td select { width: 100%; min-width: 0; }
.tbl.assign a.badge { margin: 0 4px 4px 0; text-decoration: none; }
.usedfor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.usedfor .uf { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; }
.usedfor .uf.on { border-color: #f4b8a8; background: var(--brand-soft); }
.usedfor .uf input { margin-top: 2px; }
.usedfor .uf small { display: block; color: var(--text-weak); font-size: 11.5px; }
.chip .x { border: 0; background: none; padding: 0 0 0 2px; font-size: 15px; line-height: 1; cursor: pointer; color: inherit; }
.h-top .ver { flex: none; white-space: nowrap; }
.app-bar .ver { flex: none; white-space: nowrap; }
.auth-ver { text-align: center; font-size: 12px; color: var(--text-faint); }
/* stația de etichete */
.station .app-bar .right { margin-left: auto; }
.st-hero { display: flex; gap: 18px; align-items: flex-start; padding: 20px; flex-wrap: wrap; }
.st-hero h1 { font-size: 22px; margin: 0 0 4px; }
.st-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #c7ccd3; margin-top: 6px; }
.st-hero.on .st-dot { background: #1f9d55; box-shadow: 0 0 0 0 rgba(31, 157, 85, .5); animation: stpulse 2s infinite; }
@keyframes stpulse { 70% { box-shadow: 0 0 0 10px rgba(31, 157, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); } }
.st-help ol { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.st-help code { display: inline-block; margin-top: 4px; padding: 4px 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
/* culoarea din colorant */
.swatch-pick > span.grow { min-width: 0; }
.swatch-pick > span b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch-pick > span small { display: block; color: var(--text-weak); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpicks { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); max-height: 292px; overflow-y: auto; padding: 1px; }
.colorlist { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.colorlist .swatch-pick { text-align: left; }
.swatch-pick > small.faint { white-space: nowrap; flex: none; }
/* capace: tabelul de culori */
.capcols { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.capcol { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-weak); white-space: nowrap; }
.captbl td { vertical-align: middle; }
.captbl select.inp { max-width: 220px; }
.pctcell { max-width: 110px; }
.pctcell .inp { padding-right: 26px; }
.addprev { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); flex-wrap: wrap; }
.addprev b { display: block; } .addprev small { color: var(--text-weak); }
.colorants-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; padding: 1px; }
.colorants-pick .swatch-pick input { flex: none; }
.import-data { min-width: 0; }
.import-data .list > div { flex-wrap: wrap; padding: 7px 4px; }
.import-data .list .grow { flex: 1 1 170px; min-width: 0; overflow-wrap: anywhere; }
.import-data .dropzone { min-width: 0; overflow-wrap: anywhere; }
/* v1.3: formularul capacului — paleta de culori și tabelul de culori */
.palette { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow-y: auto; padding: 2px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 7px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text); }
.pchip:hover { border-color: var(--border-strong); }
.pchip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; }
.ctable td { vertical-align: top; }
.ctable td small.newcode { display: block; color: var(--amber-text, #8a5a00); font-size: 11.5px; margin-top: 2px; }
.ctable td small.faint { display: block; font-size: 11.5px; margin-top: 2px; }
.ctable .inp-unit { max-width: 110px; }
.ctable .inp { width: 100%; min-width: 0; box-sizing: border-box; }
.ctable td { padding-right: 10px; }
/* v1.3: avize */
.aline { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.aline.bad { border-color: var(--red); }
.aline-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.aline-head .n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-soft); color: var(--text-weak); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.aline-head .pname { min-width: 0; flex: 1; }
.aline-body { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 12px; margin-top: 8px; align-items: start; }
.aline-lots { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.aline-lots .tbl td { padding: 5px 8px; }
.atot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; padding: 8px 2px 0; font-size: 13.5px; }
.sticky-act { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 6px 0 24px; }
.aprev { position: relative; width: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow); }
.aprev iframe { position: absolute; left: 0; top: 0; border: 0; background: #fff; }
.aviz-cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 760px) { .aline-body { grid-template-columns: minmax(0, 1fr) 96px; } .aviz-cols { grid-template-columns: minmax(0, 1fr); } }
.destdef { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .7fr) minmax(0, 1.6fr) auto; gap: 6px; align-items: center; }
@media (max-width: 760px) { .destdef { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; } .destdef > :nth-child(3) { grid-column: 1 / 3; } }
.tbl th.num { text-align: right; }
@media (max-width: 760px) { .card-head { flex-wrap: wrap; } .card-head .actions { flex-wrap: wrap; justify-content: flex-end; } }

/* ---------- v1.5: legăturile dintre date, verificarea datelor, polimeri ---------- */
.pchip.sm { height: 24px; padding: 0 8px; font-size: 12px; gap: 4px; }
.polylist .uses { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.dashcheck { margin-top: 12px; align-items: start; }
.chks { display: flex; flex-direction: column; }
.chk { border-top: 1px solid var(--border-soft); }
.chk:first-child { border-top: 0; }
.chk-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 14px; border: 0; background: none; text-align: left; cursor: pointer; font-size: 13px; }
.chk-head:hover { background: var(--bg-soft); }
.chk .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-faint); }
.chk .dot.err { background: var(--red); } .chk .dot.warn { background: var(--amber); }
.chk-body { padding: 0 14px 10px 30px; }
.chk-body .hint { font-size: 12px; color: var(--text-weak); margin-bottom: 6px; }
.chk-body .list { margin: 0 -14px 0 -30px; border-top: 1px solid var(--border-soft); }
.chk-body .list > a { padding-left: 30px; }
@media (max-width: 900px) { .dashcheck { grid-template-columns: minmax(0, 1fr); } }
