/* Pontaj City Print Shop
   Identitate: culorile de proces ale tipografiei (cyan, magenta, galben, negru) folosite ca limbaj funcțional:
   cyan = activ / lucrează, magenta = încheiere / atenție, galben = în așteptare, negru = structură. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --cyan: #0090d4;
  --cyan-ink: #006fa8;
  --cyan-tint: #e6f4fb;
  --magenta: #cc0a73;
  --magenta-ink: #b8095f;
  --magenta-tint: #fbe8f1;
  --yellow: #ffd200;
  --yellow-tint: #fff6cc;
  --key: #1b1d21;
  --green: #187a41;
  --green-tint: #e5f3ea;
  --ink: #1b1d21;
  --ink-2: #4a4f57;
  --ink-3: #6b717b;
  --line: #e1e5ea;
  --line-2: #cfd5dc;
  --bg: #f3f5f7;
  --paper: #ffffff;
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(27, 29, 33, .06), 0 2px 8px rgba(27, 29, 33, .04);
  --sidebar: 248px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-stretch: 100%;
}
img { max-width: 100%; }
a { color: var(--cyan-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--key); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-stretch: 78%; font-weight: 720; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: 30px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 .9em; }
.num, td.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.mb { margin-bottom: 14px; }
.mt { margin-top: 14px; }

/* Bara CMYK: semnătura vizuală */
.cmyk { display: flex; height: 4px; position: sticky; top: 0; z-index: 30; }
.cmyk span { flex: 1; }
.cmyk span:nth-child(1) { background: var(--cyan); }
.cmyk span:nth-child(2) { background: var(--magenta); }
.cmyk span:nth-child(3) { background: var(--yellow); }
.cmyk span:nth-child(4) { background: var(--key); }

/* ---------- Structură ---------- */
.shell { display: flex; min-height: calc(100vh - 4px); }
.sidebar {
  width: var(--sidebar);
  flex: none;
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 18px 14px 24px;
  position: sticky;
  top: 4px;
  height: calc(100vh - 4px);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--key); padding: 4px 8px 14px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-stretch: 72%; font-weight: 800; font-size: 19px; letter-spacing: .01em; }
.brand-sub { font-size: 12.5px; color: var(--ink-3); }
.brand-logo { max-height: 34px; max-width: 170px; }
.nav-group { margin-top: 14px; }
.nav-title { font-size: 12.5px; color: var(--ink-3); padding: 6px 10px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: var(--bg); color: var(--key); }
.nav a.is-active { background: var(--cyan-tint); color: var(--key); font-weight: 650; box-shadow: inset 3px 0 0 var(--cyan); }
.nav .nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font: inherit; font-weight: 500; text-align: left;
}
.nav .nav-btn svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav .nav-btn:hover { background: var(--bg); color: var(--magenta-ink); }
.nav .count { margin-left: auto; background: var(--yellow); color: var(--key); font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 99px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 28px; background: var(--bg);
}
.topbar .page-title { font-stretch: 78%; font-weight: 720; font-size: 18px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .mobile-brand { display: none; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--magenta); color: #fff; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: var(--ink); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--key); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; font-stretch: 80%; }
.user-chip .who { font-size: 13.5px; line-height: 1.15; padding-right: 6px; }
.user-chip .who small { display: block; color: var(--ink-3); }
.content { padding: 4px 28px 48px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 18px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--ink-3); margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.bottom-nav { display: none; }
.drawer-backdrop { display: none; }

/* ---------- Componente ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > a.card + a.card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 16px 20px 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .label { color: var(--ink-3); font-size: 13.5px; }
.stat .value { font-stretch: 75%; font-weight: 750; font-size: 30px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 15px; font-weight: 500; color: var(--ink-3); font-stretch: 100%; }
.stat .hint { font-size: 13px; color: var(--ink-3); }
.stat-link { text-decoration: none; color: inherit; display: block; }
.stat-link:hover .value { color: var(--cyan-ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); color: var(--key); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--cyan-ink); border-color: var(--cyan-ink); color: #fff; }
.btn-primary:hover { background: #005d8d; border-color: #005d8d; color: #fff; }
.btn-danger { background: var(--paper); border-color: var(--magenta); color: var(--magenta-ink); }
.btn-danger:hover { background: var(--magenta-tint); color: var(--magenta-ink); border-color: var(--magenta-ink); }
.btn-ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn-ok:hover { background: #12622f; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--cyan-ink); padding-left: 8px; padding-right: 8px; }
.btn-sm { min-height: 32px; padding: 4px 11px; font-size: 14px; border-radius: 8px; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--cyan-ink); text-decoration: underline; cursor: pointer; }

/* Butonul mare de pontaj */
.clock-card { padding: 0; overflow: hidden; }
.clock-top { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 26px 28px; align-items: center; }
.clock-state { display: flex; flex-direction: column; gap: 6px; }
.clock-state .state-line { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink-2); }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--line-2); flex: none; }
.is-working .pulse { background: var(--cyan); box-shadow: 0 0 0 0 rgba(0, 144, 212, .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(0, 144, 212, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 144, 212, 0); } }
.timer { font-stretch: 70%; font-weight: 780; font-size: 64px; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--key); }
.timer .unit { font-size: 22px; font-weight: 600; color: var(--ink-3); margin: 0 6px 0 2px; font-stretch: 85%; }
.clock-meta { color: var(--ink-3); font-size: 14px; }
.clock-action form { margin: 0; }
.punch {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-width: 300px; min-height: 84px; padding: 18px 30px; border-radius: 16px; border: 0;
  font: inherit; font-stretch: 85%; font-size: 23px; font-weight: 750; color: #fff; cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .15), 0 6px 18px rgba(27, 29, 33, .12);
  transition: transform .06s ease;
}
.punch svg { width: 28px; height: 28px; }
.punch:active { transform: translateY(1px); }
.punch-start { background: var(--cyan-ink); }
.punch-start:hover { background: #005d8d; }
.punch-end { background: var(--magenta); }
.punch-end:hover { background: var(--magenta-ink); }
.punch[disabled] { background: var(--line-2); color: var(--ink-2); box-shadow: none; cursor: not-allowed; }
.clock-bottom { border-top: 1px solid var(--line); padding: 14px 28px; background: #fafbfc; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--ink-2); }
.confirm-box { margin: 0 28px 22px; padding: 14px 16px; border-radius: var(--radius); background: var(--yellow-tint); border: 1px solid #f1d55a; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.confirm-box form { margin: 0; }

/* Liste de intervale */
.intervals { list-style: none; margin: 0; padding: 0; }
.intervals li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.intervals li:first-child { border-top: 0; }
.intervals .span { font-variant-numeric: tabular-nums; font-weight: 650; min-width: 120px; }
.intervals .dur { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* Insigne de stare */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 650; white-space: nowrap; border: 1px solid transparent; line-height: 1.6; }
.badge-pending { background: var(--yellow-tint); color: #5b4a00; border-color: #f0d25b; }
.badge-ok { background: var(--green-tint); color: var(--green); }
.badge-bad { background: var(--magenta-tint); color: var(--magenta-ink); }
.badge-muted { background: var(--bg); color: var(--ink-3); border-color: var(--line); }
.badge-live { background: var(--cyan-tint); color: var(--cyan-ink); }
.badge-demo { background: var(--key); color: #fff; font-size: 11px; padding: 0 7px; }
.type-co { background: var(--cyan-tint); color: var(--cyan-ink); }
.type-cm { background: var(--magenta-tint); color: var(--magenta-ink); }
.type-cfp { background: #eef0f3; color: var(--ink-2); }
.type-inv { background: var(--yellow-tint); color: #5b4a00; }

/* Mesaje */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); margin: 0 0 14px; border: 1px solid; }
.flash svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.flash-success { background: var(--green-tint); border-color: #b9dcc6; color: #0f4d29; }
.flash-error { background: var(--magenta-tint); border-color: #f0bcd6; color: #7a0a43; }
.flash-info { background: var(--cyan-tint); border-color: #b5ddf1; color: #00476b; }
.notice { padding: 12px 16px; border-radius: var(--radius); background: var(--yellow-tint); border: 1px solid #f1d55a; color: #4a3d00; }
.notice-cyan { background: var(--cyan-tint); border-color: #b5ddf1; color: #00476b; }
.notice-magenta { background: var(--magenta-tint); border-color: #f0bcd6; color: #7a0a43; }
.secret { border: 2px dashed var(--cyan); background: var(--cyan-tint); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.secret dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 8px 0; }
.secret dd { margin: 0; font-weight: 700; word-break: break-all; font-variant-numeric: tabular-nums; }

/* Tabele */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 650; color: var(--ink-2); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; background: #fafbfc; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcfe; }
.table .num { text-align: right; white-space: nowrap; }
.table tfoot td { font-weight: 700; border-top: 1px solid var(--line-2); background: #fafbfc; }
.table tr.is-weekend td { background: #fafbfc; color: var(--ink-3); }
.table tr.is-today td { background: var(--cyan-tint); }
.table tr.is-holiday td { background: #fffbe8; }
.day-cell { white-space: nowrap; }
.day-cell .wd { color: var(--ink-3); width: 2.2em; display: inline-block; }
.day-cell a { color: inherit; text-decoration: none; }
.day-cell a:hover { color: var(--cyan-ink); text-decoration: underline; }
.pos { color: var(--green); }
.neg { color: var(--magenta-ink); }
.empty { padding: 32px 20px; text-align: center; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink-2); font-size: 16px; margin-bottom: 4px; }

/* Formulare */
.form { max-width: 720px; }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink-2); }
.field .help { font-size: 13px; color: var(--ink-3); margin-top: 5px; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--paper); font: inherit; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 144, 212, .2); }
.is-invalid { border-color: var(--magenta) !important; }
.field-error { color: var(--magenta-ink); font-size: 13px; margin: 5px 0 0; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; color: var(--ink); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--cyan-ink); }
.weekdays { display: flex; flex-wrap: wrap; gap: 6px; }
.weekdays label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); margin: 0; cursor: pointer; }
.weekdays input { accent-color: var(--cyan-ink); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 150px; }
.filters .field label { font-size: 13px; }
.inline-form { display: inline; margin: 0; }
.decision { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.decision input[type=text] { flex: 1; min-width: 180px; min-height: 36px; }
.decision input.short { flex: none; width: 84px; min-width: 0; }
.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.radio-cards label { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--ink); margin: 0; }
.radio-cards input { accent-color: var(--cyan-ink); }
.radio-cards label:has(input:checked) { border-color: var(--cyan); background: var(--cyan-tint); }

/* Previzualizare concediu */
.preview { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fafbfc; margin-bottom: 16px; }
.preview .big { font-stretch: 75%; font-weight: 760; font-size: 28px; font-variant-numeric: tabular-nums; }
.balance-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.balance-bar > div { background: var(--paper); padding: 12px 14px; }
.balance-bar .k { font-size: 13px; color: var(--ink-3); }
.balance-bar .v { font-stretch: 75%; font-weight: 760; font-size: 26px; font-variant-numeric: tabular-nums; }
.balance-bar .avail .v { color: var(--cyan-ink); }
.balance-bar .pend .v { color: #7a6400; }

/* Calendar */
.cal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-nav h2 { margin: 0 8px; min-width: 190px; }
.calendar { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.calendar th { font-size: 13px; color: var(--ink-3); font-weight: 600; padding: 8px; text-align: left; border-bottom: 1px solid var(--line-2); }
.calendar td { height: 112px; vertical-align: top; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar td:last-child { border-right: 0; }
.calendar .d { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; display: flex; justify-content: space-between; gap: 4px; }
.calendar .other { background: #fafbfc; }
.calendar .other .d { color: var(--line-2); }
.calendar .wkend { background: #fafbfc; }
.calendar .today .d span:first-child { background: var(--key); color: #fff; border-radius: 6px; padding: 0 6px; }
.calendar .hol { background: #fffbe8; }
.calendar .hol-name { font-size: 11.5px; color: #6b5800; line-height: 1.2; margin-top: 2px; }
.cal-items { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.cal-items li a, .cal-items li span.item { display: block; font-size: 12px; line-height: 1.3; padding: 2px 6px; border-radius: 5px; text-decoration: none; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #eef0f3; }
.cal-items .t-odihna { background: var(--cyan-tint); }
.cal-items .t-medical { background: var(--magenta-tint); }
.cal-items .t-invoire { background: var(--yellow-tint); }
.cal-items .is-pending { background: repeating-linear-gradient(45deg, #fff, #fff 4px, #fff6cc 4px, #fff6cc 8px); border: 1px dashed #d8b800; }
.cal-items .is-self { box-shadow: inset 3px 0 0 var(--cyan); }
.cal-more { font-size: 12px; color: var(--ink-3); padding: 0 6px; }
.agenda { display: none; list-style: none; padding: 0; margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--ink-2); margin-top: 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Notificări */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li a { display: flex; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.notif-list li:first-child a { border-top: 0; }
.notif-list li a:hover { background: #fafcfe; }
.notif-list .marker { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.notif-list .unread .marker { background: var(--magenta); }
.notif-list .unread strong { font-weight: 750; }
.notif-list .when { margin-left: auto; color: var(--ink-3); font-size: 13px; white-space: nowrap; }

/* Detalii cerere */
.kv { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 8px 20px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 18px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--cyan); }
.timeline .meta { color: var(--ink-3); font-size: 13px; }

/* Pagini simple (autentificare, instalare) */
.plain { min-height: calc(100vh - 4px); display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.plain-box { width: 100%; max-width: 420px; }
.plain-box.wide { max-width: 760px; }
.plain .brand { justify-content: center; margin-bottom: 18px; padding: 0; }
.plain .brand-mark { width: 40px; height: 40px; }
.plain .brand-name { font-size: 24px; }
.plain .card { padding: 26px; }
.plain h1 { font-size: 26px; }
.checks { list-style: none; margin: 0 0 16px; padding: 0; }
.checks li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.checks li:first-child { border-top: 0; }
.checks .st { width: 20px; flex: none; font-weight: 800; }
.checks .ok .st { color: var(--green); }
.checks .bad .st { color: var(--magenta-ink); }
.checks .warn .st { color: #8a7000; }
.checks .detail { margin-left: auto; color: var(--ink-3); text-align: right; }
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 16px; }

/* ---------- Ecran mediu ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Telefon și tabletă ---------- */
@media (max-width: 960px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; z-index: 50;
    transform: translateX(-102%); transition: transform .2s ease; visibility: hidden;
  }
  body.nav-open .sidebar { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  body.nav-open .drawer-backdrop { display: block; position: fixed; inset: 0; background: rgba(27, 29, 33, .35); z-index: 40; }
  .topbar { padding: 10px 16px; position: sticky; top: 4px; z-index: 20; background: rgba(243, 245, 247, .96); backdrop-filter: blur(6px); }
  .topbar .page-title { display: none; }
  .topbar .mobile-brand { display: flex; flex: 1; align-items: center; gap: 8px; text-decoration: none; color: var(--key); }
  .topbar .mobile-brand .brand-mark { width: 26px; height: 26px; }
  .topbar .mobile-brand .brand-name { font-size: 17px; }
  .user-chip .who { display: none; }
  .content { padding: 4px 16px 96px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--paper); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; font: inherit; font-size: 11.5px; font-weight: 600;
    color: var(--ink-3); text-decoration: none; background: none; border: 0; cursor: pointer;
  }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav .is-active { color: var(--cyan-ink); }
  .clock-top { grid-template-columns: 1fr; padding: 22px 18px; gap: 18px; }
  .punch { width: 100%; min-width: 0; }
  .timer { font-size: 56px; }
  .clock-bottom { padding: 12px 18px; }
  .confirm-box { margin: 0 18px 18px; }
  h1 { font-size: 25px; }
}

@media (max-width: 720px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row, .form-row-3 { grid-template-columns: minmax(0, 1fr); }
  .balance-bar { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 16px; }
  .radio-cards { grid-template-columns: minmax(0, 1fr); }
  .calendar { display: none; }
  .agenda { display: block; }
  .agenda > li { padding: 10px 0; border-top: 1px solid var(--line); }
  .agenda > li:first-child { border-top: 0; }
  .agenda .agenda-day { font-weight: 700; font-variant-numeric: tabular-nums; }
  .agenda .agenda-day.today { color: var(--cyan-ink); }
  .agenda .cal-items { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .agenda .cal-items li a, .agenda .cal-items li span.item { font-size: 13px; padding: 3px 8px; }
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table.responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 14px; text-align: right; }
  .table.responsive td::before { content: attr(data-label); color: var(--ink-3); font-size: 13px; text-align: left; }
  .table.responsive td.primary { font-weight: 700; text-align: left; }
  .table.responsive td.primary::before { content: none; }
  .table.responsive tfoot td { background: none; }
  .month-table.responsive tr { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 14px; align-items: baseline; }
  .month-table.responsive td { display: block; padding: 0; text-align: left; }
  .month-table.responsive td::before { content: none; }
  .month-table.responsive td.is-empty, .month-table.responsive td.c-act { display: none; }
  .month-table.responsive .c-day { grid-column: 1; grid-row: 1 / span 3; font-weight: 700; }
  .month-table.responsive .c-day a { color: var(--ink); text-decoration: none; }
  .month-table.responsive .c-int { grid-column: 2; }
  .month-table.responsive .c-work { grid-column: 3; grid-row: 1; text-align: right; font-weight: 700; }
  .month-table.responsive .c-norm, .month-table.responsive .c-ot, .month-table.responsive .c-obs { grid-column: 2 / span 2; font-size: 13px; color: var(--ink-2); text-align: left; }
  .month-table.responsive .c-norm::before { content: "Normă "; color: var(--ink-3); }
  .month-table.responsive .c-ot::before { content: "Suplimentare "; color: var(--ink-3); }
  .month-table.responsive tfoot .c-norm::before { content: "Normă "; }
  .month-table.responsive tr.is-weekend { padding-top: 6px; padding-bottom: 6px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .sidebar, .topbar, .bottom-nav, .cmyk, .actions, .filters, .btn { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; }
}

/* Legenda calendarului */
.legend .t-odihna-l { background: var(--cyan-tint); border: 1px solid #9fd2ec; }
.legend .t-medical-l { background: var(--magenta-tint); border: 1px solid #efb3d0; }
.legend .t-cfp-l { background: #eef0f3; border: 1px solid var(--line-2); }
.legend .t-invoire-l { background: var(--yellow-tint); border: 1px solid #f0d25b; }
.legend .t-hol-l { background: #fffbe8; border: 1px solid #f0d25b; }
.legend .t-pend-l { background: repeating-linear-gradient(45deg, #fff, #fff 3px, #fff6cc 3px, #fff6cc 6px); border: 1px dashed #d8b800; }
details summary { cursor: pointer; color: var(--cyan-ink); }
.page-head .sub .badge-demo { vertical-align: 1px; }

.mb0 { margin-bottom: 0; }
pre { white-space: pre-wrap; word-break: break-all; margin: 8px 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
ul.small, ol.small { padding-left: 20px; }
ul.small li, ol.small li { margin-bottom: 6px; }
