/* InstalSib – Programări  |  culori preluate de pe instalsibgazproiect.ro */
:root {
  --red: #E21D24;
  --red-d: #c0141b;
  --red-l: #fdecec;
  --blue: #1863DC;
  --navy: #0056A7;
  --ink: #212121;
  --ink-2: #4e4b66;
  --muted: #7a7f8a;
  --line: #e4e6eb;
  --bg: #f4f5f7;
  --card: #ffffff;
  --ok: #1f9d55;
  --ok-l: #e7f6ed;
  --bad: #E21D24;
  --warn: #f59e0b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
h1 small { display: block; font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
h2 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
h2 small { font-size: 13px; font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.txt-red { color: var(--red); }
.grow { flex: 1; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }

/* ---------- Layout ---------- */
.wrap { max-width: 880px; margin: 0 auto; padding: 16px 16px calc(150px + var(--safe-b)); }
body.bare .wrap { padding-bottom: 32px; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-in { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.brand img { height: 36px; display: block; }
.topnav, .topbar .topadd { display: none; }
.topsearch { margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-2); border-radius: 50%; }
.topsearch:hover { background: var(--bg); }
.who { width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700;
}

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 2px 7px; color: var(--muted); font-size: 11px; font-weight: 600; position: relative;
}
.bottomnav a .ic { width: 24px; height: 24px; }
.bottomnav a.on { color: var(--red); }
.dot {
  position: absolute; top: 3px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}
.fab {
  position: fixed; right: 16px; bottom: calc(74px + var(--safe-b)); z-index: 41;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(226, 29, 36, .4);
}
.fab .ic { width: 28px; height: 28px; }
.fab:active { transform: scale(.95); }

@media (min-width: 900px) {
  body { font-size: 15.5px; }
  .wrap { padding: 24px 24px 48px; }
  .bottomnav, .fab { display: none; }
  .topbar-in { padding: 10px 24px; gap: 20px; }
  .brand img { height: 44px; }
  .topnav { display: flex; gap: 4px; margin-left: 12px; }
  .topnav a {
    display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px;
    color: var(--ink-2); font-weight: 600; font-size: 14.5px; position: relative;
  }
  .topnav a:hover { background: var(--bg); }
  .topnav a.on { background: var(--red-l); color: var(--red); }
  .topnav .dot { position: static; margin-left: 2px; }
  .topbar .topadd { display: inline-flex; }
  .topsearch { margin-left: auto; }
  .who { margin-left: 0; }
  h1 { font-size: 28px; }
}

/* ---------- Butoane ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  background: #fff; color: var(--ink); transition: background .15s, color .15s, border-color .15s, transform .05s;
}
.btn:active { transform: scale(.97); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-d); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #c9ccd3; }
.btn-lg { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn-sm { min-height: 34px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; border-color: var(--line); color: var(--ink-2); }
.btn-icon.btn-sm { width: 34px; }
.btn-link-del { background: none; border: 0; color: var(--red); padding: 0; min-height: 36px; font-weight: 600; }
.btn-call { background: var(--ink); color: #fff; padding: 0 14px 0 12px; }
.btn-call span { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.btn-wa { color: #128C7E; }
.btn-done:hover, .st-efectuat .btn-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-fail:hover, .st-neefectuat .btn-fail { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-del:hover { color: var(--red); border-color: var(--red); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Flash ---------- */
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.flash-ok { background: var(--ok-l); color: #146c3a; }
.flash-err { background: var(--red-l); color: var(--red-d); }
.flash-warn { background: #fff6e0; color: #8a5a00; }
.flash a { color: inherit; text-decoration: underline; }

/* ---------- Header pagină ---------- */
.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.pagehead p { margin: 4px 0 0; }
.search-mini {
  display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 0 10px; height: 44px; width: 44px; overflow: hidden; transition: width .2s; color: var(--muted);
}
.search-mini label { display: flex; cursor: pointer; }
.search-mini input { border: 0; outline: 0; font: inherit; width: 0; flex: 1; background: transparent; padding: 0; min-height: 0; box-shadow: none !important; }
.search-mini:focus-within { width: 210px; border-color: var(--blue); }
.search-mini:focus-within input { width: 100%; }
@media (min-width: 900px) { .search-mini { width: 240px; } .search-mini input { width: 100%; } }
.searchbar {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 4px 4px 4px 12px; margin-bottom: 10px; color: var(--muted);
}
.searchbar input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; min-height: 44px; padding: 0; }

/* ---------- Segmente / chips ---------- */
.seg { display: flex; background: #e9ebef; border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg a, .seg label span {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer;
}
.seg a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg label { flex: 1; display: flex; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); }

.daybar, .filters { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
.daybar::-webkit-scrollbar, .filters::-webkit-scrollbar { display: none; }
.daybar > *, .filters > * { flex: none; }
@media (min-width: 900px) { .daybar, .filters { flex-wrap: wrap; margin-left: 0; margin-right: 0; padding: 0; overflow: visible; } }
.chip, .fchip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px;
  border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink);
  font-weight: 600; font-size: 13.5px; cursor: pointer; position: relative;
}
.chip .ic { width: 17px; height: 17px; }
.chip-plan { color: var(--red); border-color: #f5c2c4; }
.chip-date input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.chip-date input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.fchip .sw, .colorpick .sw, .ps .sw { width: 12px; height: 12px; border-radius: 50%; background: var(--tc, #c9ccd3); flex: none; }
.fchip b { font-weight: 700; color: var(--muted); }
.fchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fchip.on b { color: rgba(255, 255, 255, .7); }
.fchip-warn { --tc: #c9ccd3; }
.fchip-bad { --tc: var(--bad); }
.fchip-ok { --tc: var(--ok); }
.fchip .ic { width: 14px; height: 14px; }

/* ---------- Antet zi / lună ---------- */
.dayhead { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; }
.dayhead-t { flex: 1; text-align: center; min-width: 0; }
.dayhead-t h1 { font-size: 22px; }
.dayhead-t p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.navbtn {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
}
.navbtn:hover { border-color: #c9ccd3; }

/* ---------- Săptămâna ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; }
.wd {
  display: flex; flex-direction: column; align-items: center; padding: 6px 0 5px; border-radius: 12px;
  color: var(--ink); position: relative;
}
.wd:hover { background: #e9ebef; }
.wd-n { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.wd-d { font-size: 17px; font-weight: 700; line-height: 1.3; }
.wd-c { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--red); min-height: 14px; line-height: 14px; }
.wd.today .wd-d { color: var(--red); }
.wd.on { background: var(--ink); color: #fff; }
.wd.on .wd-n { color: rgba(255, 255, 255, .7); }
.wd.on .wd-d { color: #fff; }
.wd.on .wd-c { color: #ffb3b5; }

/* ---------- Lista compactă ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.list { display: flex; flex-direction: column; gap: 10px; }
.listhead { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 2px 8px; }
.progress { flex: 1; height: 5px; border-radius: 3px; background: #e2e4e9; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.rows { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; width: 100%;
  min-height: 58px; padding: 9px 14px 9px 16px; border: 0; border-top: 1px solid #eef0f3; background: #fff;
  font: inherit; color: inherit; text-align: left; cursor: pointer; position: relative;
}
.row:first-child { border-top: 0; }
.row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--tc); }
.row:hover { background: #fafbfc; }
.row:active { background: #f3f4f6; }
.row-time { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.row-time small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.row-body { min-width: 0; display: flex; flex-direction: column; }
.row-title, .row-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-title { font-weight: 600; font-size: 15px; }
.row-sub { font-size: 13px; color: var(--muted); margin-top: 1px; }
.row-lock { width: 14px; height: 14px; margin: -2px 5px 0 0; color: var(--muted); }
.row-end { display: flex; align-items: center; gap: 8px; }
.row-pay { font-size: 12.5px; font-weight: 700; color: var(--ok); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-pay:empty { display: none; }
.row-st { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.row-st .ic { width: 14px; height: 14px; display: none; color: #fff; }
.st-efectuat .row-st { background: var(--ok); }
.st-efectuat .st-ok, .st-neefectuat .st-bad { display: block; }
.st-neefectuat .row-st { background: var(--bad); }
.row.unseen { background: #fff7f7; }
/* încasări */
.daytotals {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 10px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
}
.daytotals > div { padding: 7px 4px; text-align: center; min-width: 0; border-left: 1px solid #eef0f3; }
.daytotals > div:first-child { border-left: 0; }
.daytotals span { display: block; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.daytotals b { display: block; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.daytotals .dt-total { background: var(--ok-l); }
.daytotals .dt-total b { color: #146c3a; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #188647; }
.sh-payform { margin-top: 12px; }
.sh-payform .lbl { margin-bottom: 8px; }
.paymeth { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.paymeth button[data-m=fara] { grid-column: 1 / -1; min-height: 40px; font-size: 13.5px; color: var(--ink-2); }
.paymeth button[data-m=fara].on { color: #fff; }
.paymeth button {
  min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font: inherit;
  font-weight: 700; font-size: 14.5px; color: var(--ink); cursor: pointer; padding: 0 6px;
}
.paymeth button.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.payamt { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.payamt input { font-size: 20px; font-weight: 700; min-height: 54px; }
.payamt span { font-weight: 700; color: var(--muted); }
.sh-payform .btn { width: 100%; margin-top: 10px; min-height: 52px; font-size: 16px; }
.sh-pay {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px;
  padding: 8px 8px 8px 12px; background: var(--ok-l); border-radius: 10px; color: #146c3a; font-weight: 700;
}
.sh-pay > span { display: flex; align-items: center; gap: 8px; }
.sh-pay-missing { background: #f1f2f5; color: var(--muted); }
/* adăugate de angajați */
.row.by-emp { background: #fffbea; }
.row.by-emp:hover { background: #fff6d6; }
.by {
  display: inline-block; background: #f5b400; color: #3d2e00; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 6px; margin-right: 6px; vertical-align: 1px;
}
.fchip-emp { --tc: #f5b400; }
.sh-added { margin-top: 12px; font-size: 13px; color: var(--muted); }
.sh-added.emp { color: #3d2e00; background: #fffbea; border: 1px solid #f5d77a; padding: 8px 12px; border-radius: 10px; font-weight: 600; }
.row.unseen .row-time::after { content: ''; display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-top: 3px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: #eef0f3; color: var(--ink-2); white-space: nowrap;
}
.tag .ic { width: 13px; height: 13px; }
.tag-none { background: #eef0f3; color: var(--muted); border: 1px dashed #c9ccd3; }

/* ---------- Calendar lunar ---------- */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; padding: 8px; }
.mh { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0 6px; }
.md {
  aspect-ratio: 1 / 1.05; border-radius: 12px; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; padding-top: 6px; gap: 3px; color: var(--ink); position: relative;
}
.md:hover { background: var(--bg); }
.md-n { font-weight: 600; font-size: 15px; }
.md.we .md-n { color: var(--muted); }
.md.past { opacity: .55; }
.md.today { background: var(--red-l); }
.md.today .md-n { color: var(--red); font-weight: 800; }
.md-c {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--red); color: #fff;
  font-size: 12.5px; font-weight: 700; display: grid; place-items: center;
}
.md.alldone .md-c { background: var(--ok); }
.center { text-align: center; }
@media (min-width: 900px) {
  .month { gap: 6px; padding: 14px; }
  .md { aspect-ratio: auto; min-height: 84px; align-items: flex-start; padding: 8px 10px; border: 1px solid #eef0f3; }
  .md-empty { border: 0; }
  .md-c { align-self: center; margin-top: 6px; min-width: 30px; height: 30px; border-radius: 15px; font-size: 14px; }
}

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty > .ic { width: 48px; height: 48px; color: #c9ccd3; }
.empty p { margin: 10px 0 18px; font-weight: 600; }

/* ---------- Formulare ---------- */
.form { padding: 18px; }
.field { margin-bottom: 16px; min-width: 0; }
.lbl { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; color: var(--ink); }
.lbl em { font-style: normal; font-weight: 500; color: var(--muted); }
input[type=text], input[type=tel], input[type=date], input[type=time], input[type=password], input[type=search], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1px solid #d5d8de; background: #fff;
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7f8a' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
input[type=date], input[type=time] { display: block; }
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24, 99, 220, .15); }
.grid2 { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qchip {
  min-height: 34px; min-width: 40px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line);
  background: #f7f8fa; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink-2);
}
.qchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
@media (max-width: 639px) { .form-actions .btn { flex: 1 1 100%; } }
.check { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; font-weight: 600; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }
.danger-zone { text-align: center; margin-top: 18px; }

.colorpick { display: flex; flex-wrap: wrap; gap: 8px; }
.cp input { position: absolute; opacity: 0; pointer-events: none; }
.cp span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-radius: 12px; border: 2px solid var(--line); font-weight: 700; font-size: 14px; cursor: pointer; background: #fff;
}
.cp input:checked + span { background: var(--tc); border-color: var(--tc); color: var(--tt); }
.cp input:checked + span .sw { background: var(--tt); }
.cp-none input:checked + span { background: #eef0f3; border-color: #9aa0aa; color: var(--ink); }
.cp input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.colorgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.cg input { position: absolute; opacity: 0; }
.cg span { display: block; width: 40px; height: 40px; border-radius: 50%; background: var(--tc); cursor: pointer; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.cg input:checked + span { box-shadow: 0 0 0 3px var(--ink); }

/* ---------- Planificare ---------- */
.plan-summary { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.plan-summary::-webkit-scrollbar { display: none; }
.ps {
  display: flex; align-items: center; gap: 8px; flex: none; padding: 6px 6px 6px 12px;
  background: #fff; border-radius: 12px; border: 1px solid var(--line); border-top: 4px solid var(--tc);
}
.ps-none { --tc: #c9ccd3; padding-right: 12px; }
.ps-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; }
.ps-count { font-size: 18px; font-weight: 800; min-width: 18px; text-align: center; }
.plan-row { padding: 12px 12px 12px 16px; border-left: 6px solid var(--tc); transition: border-color .2s; }
.plan-info { display: flex; gap: 12px; align-items: flex-start; }
.plan-time { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 58px; }
.plan-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.swatch {
  flex: 1 1 0; min-width: 72px; min-height: 46px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--tc); background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; position: relative;
}
.swatch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--tc); flex: none; }
.swatch.on { background: var(--tc); color: var(--tt); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.swatch.on::before { background: var(--tt); width: 8px; height: 8px; }
.swatch-none { --tc: #c9ccd3; --tt: var(--ink); flex: 0 0 52px; min-width: 52px; }
.swatch-none::before { display: none; }
@media (min-width: 900px) {
  .plan-row { display: grid; grid-template-columns: 1fr minmax(320px, 46%); gap: 16px; align-items: center; }
  .swatches { margin-top: 0; }
}

/* ---------- Echipă ---------- */
.section { margin-top: 26px; }
.row-card > summary {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 60px;
}
.row-card > summary::-webkit-details-marker { display: none; }
.row-card[open] > summary { border-bottom: 1px solid var(--line); }
.row-card .inline-form { padding: 0 18px 14px; }
.row-card.inactive { opacity: .6; }
.add-card > summary { color: var(--red); }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--tc); color: #fff; font-weight: 800;
}
.avatar-lg { width: 54px; height: 54px; font-size: 22px; }
.profile { display: flex; align-items: center; gap: 14px; padding: 16px; }
.tip { padding: 4px 18px; font-size: 14px; }
.tip ul { padding-left: 18px; }

/* ---------- Login ---------- */
.auth { min-height: calc(100vh - 64px); display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 400px; padding: 28px 22px; }
.auth-logo { display: block; width: 190px; margin: 0 auto 18px; }
.auth-card h1 { font-size: 19px; text-align: center; margin-bottom: 20px; }
.auth-card > p { text-align: center; margin-top: -10px; }

/* ---------- Fereastra cu detalii ---------- */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 90vh;
  border-radius: 22px 22px 0 0; background: #fff; color: var(--ink); box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
  overflow-y: auto; overscroll-behavior: contain;
}
.sheet[open] { animation: sheet-up .22s ease-out; }
.sheet::backdrop { background: rgba(20, 22, 28, .45); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) { .sheet { margin: auto; border-radius: 20px; } }
.sheet-in { padding: 8px 18px calc(18px + var(--safe-b)); }
.sh-grab { width: 40px; height: 5px; border-radius: 3px; background: #dcdfe4; margin: 0 auto 10px; }
@media (min-width: 700px) { .sh-grab { display: none; } .sheet-in { padding-top: 18px; } }
.sh-head { display: flex; align-items: center; gap: 12px; }
.sh-time { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sh-date { font-size: 13px; color: var(--muted); font-weight: 600; }
.sh-close { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #f1f2f5; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); flex: none; }
.sh-client { font-size: 18px; font-weight: 700; margin: 14px 0 0; }
.sh-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; color: var(--navy); font-weight: 600; }
.sh-line .ic { width: 19px; height: 19px; margin-top: 1px; }
.sh-details { margin: 10px 0 0; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.sh-contact { display: flex; gap: 8px; margin-top: 16px; }
.sh-contact .btn-call { flex: 1; }
.btn-call { background: var(--ink); color: #fff; }
.btn-wa { color: #128C7E; }
.sh-status { margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef0f3; }
.stseg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; background: #f1f2f5; padding: 4px; border-radius: 13px; }
.stseg button {
  min-height: 44px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 700; font-size: 13.5px;
  color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; padding: 0 4px;
}
.stseg .ic { width: 17px; height: 17px; }
.stseg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.stseg button.on[data-s=efectuat] { background: var(--ok); color: #fff; }
.stseg button.on[data-s=neefectuat] { background: var(--bad); color: #fff; }
.sh-noteform { margin-top: 10px; }
.sh-noteform textarea { min-height: 80px; }
.sh-noteform .btn { margin-top: 8px; width: 100%; }
.sh-note { margin-top: 10px; padding: 10px 12px; background: #fff6e0; border-radius: 10px; font-size: 14px; color: #6b4b00; }
.sh-meta { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.sh-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef0f3; }
.sh-foot .btn-link-del { margin-left: auto; }
.sheet.busy .sheet-in { opacity: .6; pointer-events: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  opacity: 0; transition: opacity .2s, transform .2s; z-index: 60; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }
@media (min-width: 900px) { .toast { bottom: 32px; } }

/* ---------- Încasări pe zile ---------- */
.month-totals { margin-bottom: 12px; }
.paylist { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pl-row {
  display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr 1.1fr; gap: 8px; align-items: center;
  padding: 12px 14px; border-top: 1px solid #eef0f3; color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums;
}
.pl-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-row > span:not(:first-child) { text-align: right; }
a.pl-row:hover { background: #fafbfc; }
.pl-head { border-top: 0; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-top: 10px; padding-bottom: 8px; background: #fafbfc; }
.pl-day b { font-weight: 700; }
.pl-total { font-weight: 800; color: #146c3a; }
@media (max-width: 479px) { .pl-row { font-size: 12px; padding: 11px 10px; gap: 5px; } .pl-row > span:not(.pl-day) { letter-spacing: -.01em; } }

/* ---------- Departamente ---------- */
.seg-dept a.on.dep-verificari { background: var(--blue); color: #fff; }
.seg-dept a.on.dep-executie { background: #e8710a; color: #fff; }
.seg-prog label span { font-size: 13px; gap: 4px; }
.seg-prog .dep-verificari input:checked + span { background: var(--blue); color: #fff; }
.seg-prog .dep-executie input:checked + span { background: #e8710a; color: #fff; }
.dept-h { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 16px 0 8px; }
.dept-h .ic { width: 18px; height: 18px; }
.dept-h.dep-verificari { color: var(--blue); }
.dept-h.dep-executie { color: #e8710a; }
