/* NG Работа — приложението на работниците (мокъпът от 14.10.2026): само за телефон — големи бутони, ясен текст. Без външни шрифтове
   (поверителност и бързина) — системният шрифт на телефона. CSP на публичния адрес забранява inline стилове — всичко е тук. */
:root {
  --bg: #F3F5F6; --card: #ffffff; --ink: #1a1d1f; --muted: #4a525b; --line: #c9ced4; --soft: #e3e6e9;
  --main: #00838C; --main-d: #00646b; --main-l: #E3F5F6; --stop: #c2410c; --stop-d: #9a3412; --ok: #1f6b2e; --warn: #9a3412; --blue: #1d4ed8;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; font-size: 17px; line-height: 1.35; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; color: inherit; }
.app { min-height: 100vh; min-height: 100dvh; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; }
.sc { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: calc(20px + env(safe-area-inset-top)) 20px 20px; }
.sc-home, .sc-hours { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.sc-load, .sc-login { justify-content: center; }
.sc-load { align-items: center; gap: 10px; }
.brand { font-size: 30px; font-weight: 700; color: var(--main-d); }
.muted { color: var(--muted); font-size: 15px; }
.small { font-size: 14px; }
.center { text-align: center; }
.strong { font-weight: 650; }
.h1 { font-size: 26px; font-weight: 700; }
.h2 { font-size: 22px; font-weight: 700; }
.card { background: var(--card); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.lbl { font-size: 17px; font-weight: 600; }
.inp { height: 58px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 20px; width: 100%; }
.inp:focus { outline: 3px solid rgba(0, 131, 140, .35); outline-offset: 1px; border-color: var(--main); }
.inp-pin { font-size: 26px; letter-spacing: 10px; }
.sel { font-size: 18px; appearance: auto; }
.err { color: #b42318; font-size: 15px; margin: 0; }
.btn { border: 0; border-radius: 16px; cursor: pointer; font-weight: 700; min-height: 56px; padding: 0 18px; touch-action: manipulation; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-main { background: var(--main); color: #fff; font-size: 20px; }
.btn-ghost { background: #fff; border: 1px solid var(--line); font-size: 18px; font-weight: 500; }
.btn-login { height: 64px; font-size: 22px; margin-top: 6px; }
.login-head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.login-card { padding: 22px; gap: 12px; }
.hello { display: flex; flex-direction: column; gap: 4px; }
#idleBox, #runBox { display: flex; flex-direction: column; gap: 14px; }
.btn-stop, #switchBtn { width: 100%; }
.geo { margin: 0; font-size: 15px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.geo.in { color: var(--ok); } .geo.out { color: var(--warn); }
.btn-start { min-height: 132px; border-radius: 20px; background: var(--main); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.btn-start .big { font-size: 28px; font-weight: 700; letter-spacing: .3px; }
.btn-start .sub { font-size: 15px; font-weight: 500; }
.card-run { align-items: center; gap: 8px; padding: 22px 18px; }
.run-place { font-size: 22px; font-weight: 700; text-align: center; }
.timer { font-size: 56px; font-weight: 700; letter-spacing: 1px; color: var(--main-d); font-variant-numeric: tabular-nums; }
.btn-stop { min-height: 96px; border-radius: 20px; border: 3px solid var(--stop); background: #fff; color: var(--stop-d); font-size: 26px; }
.card-ask { border: 2px solid var(--stop); }
.ask-text { margin: 0; font-size: 17px; }
.inp-time { font-size: 24px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card-month { flex-direction: row; justify-content: space-between; align-items: center; padding: 14px 18px; margin-top: auto; }
.month-nav { display: flex; align-items: center; justify-content: space-between; }
.btn-sq { width: 48px; height: 48px; border: 1px solid #d5d9de; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.btn-sq svg, .nav-b svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-sq:disabled { opacity: .4; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: #fff; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.tile-n { font-size: 26px; font-weight: 700; color: var(--main-d); }
.tile-over { color: var(--warn); }
.tile-l { font-size: 13px; color: var(--muted); }
.days { padding: 0; gap: 0; }
.day { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 56px; border-bottom: 1px solid #eef0f2; }
.day:last-child { border-bottom: 0; }
.day-d { width: 60px; flex: none; font-size: 15px; font-weight: 600; }
.day-w { flex: 1; font-size: 15px; }
.day-h { font-size: 16px; font-weight: 600; white-space: nowrap; }
.day.is-empty .day-w { color: #8a939c; }
.day.is-abs .day-h { color: var(--blue); }
.day.is-run .day-h { color: var(--main-d); }
.day-h .ot { color: var(--warn); font-weight: 600; font-size: 13px; margin-left: 4px; }
.day-none { padding: 18px 16px; color: var(--muted); }
.link-btn { background: none; border: 0; color: var(--main-d); text-decoration: underline; font-size: 15px; padding: 10px; align-self: center; cursor: pointer; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--soft); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));   /* Е5: 5 таба */
  padding-bottom: env(safe-area-inset-bottom); max-width: 520px; margin: 0 auto; }
.nav-b { height: 72px; border: 0; background: #fff; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.nav-b svg { width: 26px; height: 26px; }
.nav-b.is-on { color: var(--main-d); background: var(--main-l); font-weight: 600; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); max-width: 488px; margin: 0 auto; background: #1a1d1f; color: #fff;
  border-radius: 14px; padding: 14px 16px; font-size: 16px; text-align: center; z-index: 10; }
.toast.err { background: #b42318; }
/* Е2 ОТПУСК (мокъпът „Отпуск — начало“, „Отпуск — заявка“, „Заявки към мен“) */
.tile-big { font-size: 40px; }
.tile-unpaid { color: #6b21a8; }
.btn-big { min-height: 72px; border-radius: 18px; font-size: 22px; }
.btn-inbox { display: flex; align-items: center; justify-content: center; gap: 10px; }
.badge { display: inline-flex; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--stop); color: #fff; font-size: 15px; align-items: center; justify-content: center; }
.badge:empty { display: none; }
.h-sub { margin-top: 4px; font-size: 18px; }
.req-list { display: flex; flex-direction: column; gap: 10px; }
.req { background: #fff; border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.req-w { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.req-when { font-size: 17px; font-weight: 600; }
.req-kind { font-size: 14px; color: var(--muted); }
.req-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pill { padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; background: #eef0f2; color: var(--muted); }
.pill-чака { background: #fef3c7; color: #854d0e; }
.pill-одобрена { background: #dcfce7; color: #166534; }
.pill-отказана { background: #fee2e2; color: #991b1b; }
.link-sm { background: none; border: 0; color: var(--main-d); text-decoration: underline; font-size: 14px; padding: 4px; cursor: pointer; }
.head-back { display: flex; align-items: center; gap: 10px; }
.btn-kind { height: 60px; border-radius: 12px; border: 1px solid #d5d9de; background: #fff; font-size: 17px; font-weight: 600; cursor: pointer; }
.btn-kind.is-on { border: 2px solid var(--main); background: var(--main-l); }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.inp-date { font-size: 17px; padding: 0 10px; }
.ln-days { margin: 0; font-size: 17px; }
.ln-days b { color: var(--main-d); }
.ln-warn { color: var(--warn); font-size: 15px; display: block; margin-top: 4px; }
.ok-msg { margin: 0; background: #dcfce7; color: #166534; border-radius: 14px; padding: 14px 16px; font-size: 17px; font-weight: 600; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fff; border-radius: 12px; padding: 4px; gap: 4px; }
.seg-b { height: 48px; border: 0; border-radius: 10px; background: #fff; color: var(--muted); font-size: 16px; cursor: pointer; }
.seg-b.is-on { background: var(--main-l); color: var(--main-d); font-weight: 700; }
.ib { background: #fff; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ib-who { font-size: 19px; font-weight: 700; }
.ib-kv { display: grid; grid-template-columns: 100px 1fr; row-gap: 6px; font-size: 16px; }
.ib-kv span:nth-child(odd) { color: var(--muted); }
.ib-clash { font-size: 14px; color: #5b6470; }
.ib-ok { min-height: 56px; border: 0; border-radius: 14px; background: var(--main); color: #fff; font-size: 19px; font-weight: 700; cursor: pointer; }
.ib-no { min-height: 56px; border: 2px solid var(--stop); border-radius: 14px; background: #fff; color: var(--stop-d); font-size: 19px; font-weight: 700; cursor: pointer; }
.ib-why { font-size: 16px; }
.nav-b { position: relative; }
.nav-badge { position: absolute; top: 8px; left: calc(50% + 8px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--stop); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
/* Е3 ЦЕХЪТ (14.10.2026): „На коя поръчка?“ в смяната в Цеха, четецът на QR-а, „ОТ СПИСЪКА“, картата за четене */
.card-order { gap: 12px; }
.ord-now { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.ord-label { font-size: 20px; font-weight: 700; color: var(--main-d); }
.ord-pick { display: flex; flex-direction: column; gap: 10px; }
.scan-box { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; background: #111; }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid #fff; border-radius: 16px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); pointer-events: none; }
.ol-item { width: 100%; text-align: left; background: #fff; border: 1px solid var(--soft); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.ol-item b { font-size: 18px; }
.ol-item span { font-size: 14px; color: var(--muted); }
.ol-h { font-size: 15px; font-weight: 700; color: var(--muted); margin: 6px 2px 0; }
.od-items { display: flex; flex-direction: column; border-top: 1px solid var(--soft); }
.od-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--soft); font-size: 17px; }
.od-item span:last-child { color: var(--muted); white-space: nowrap; }
.od-note { margin: 0; background: #fef3c7; color: #854d0e; border-radius: 12px; padding: 10px 12px; font-size: 16px; }
/* Е5 (15.10.2026): съобщенията (лентата на „Начало“, списъкът) и календарът със задачите */
.nav-b { font-size: 12px; }
.card-msg { flex-direction: column; align-items: flex-start; gap: 4px; border: 2px solid var(--main); text-align: left; cursor: pointer; width: 100%; }
.mb-text { font-size: 17px; font-weight: 600; color: var(--ink); }
.msg { background: #fff; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.msg.is-new { border-left: 5px solid var(--main); }
.msg-body { font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-meta { font-size: 14px; color: var(--muted); }
.msg-text { min-height: 84px; font-size: 17px; padding: 10px 12px; resize: vertical; }
.msg-lead { display: flex; flex-direction: column; gap: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; background: #fff; border-radius: 16px; padding: 8px; }
.cal-h { text-align: center; font-size: 13px; color: var(--muted); padding: 4px 0; }
.cal-d { aspect-ratio: 1 / 1; border: 0; border-radius: 10px; background: transparent; font-size: 16px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; cursor: pointer; position: relative; }
.cal-d.is-off { color: #9aa1a8; }
.cal-d.is-hol { color: var(--stop-d); }
.cal-d.is-today { font-weight: 800; }
.cal-d.is-sel { background: var(--main-l); outline: 2px solid var(--main); }
.cal-d.is-abs { background: #ede9fe; }
.cal-dots { display: flex; gap: 3px; height: 6px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--main); }
.cal-dots i.is-done { background: var(--ok); }
.cal-dots i.is-cant { background: var(--stop); }
.task { background: #fff; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.task-t { font-size: 18px; font-weight: 700; }
.task-m { font-size: 14px; color: var(--muted); }
.task-ok { min-height: 52px; border: 0; border-radius: 14px; background: var(--ok); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; }
.task-no { min-height: 52px; border: 2px solid var(--stop); border-radius: 14px; background: #fff; color: var(--stop-d); font-size: 17px; font-weight: 700; cursor: pointer; }
.pill-done { background: #dcfce7; color: #166534; }
.pill-cant { background: #fee2e2; color: #991b1b; }
.pill-nova { background: #e0f2fe; color: #075985; }
.cal-note { background: #fff; border-radius: 14px; padding: 12px 16px; font-size: 16px; }
.pick-list { display: flex; flex-direction: column; gap: 4px; }
.pick { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 17px; }
.pick input { width: 24px; height: 24px; }
.bg-who { font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--soft); padding-top: 6px; }
.bg-who .pill { white-space: normal; max-width: 62%; text-align: right; }
