/* Sevinch CRM — to'q ko'k asos, mandarin urg'u, har guruhning o'z rangi */
:root {
  --ink: #1B2340;
  --ink-2: #2B3560;
  --ink-3: #242D52;
  --ink-soft: #AEB6D3;
  --ink-line: #D5DAEC;
  --ground: #F4F6F9;
  --surface: #FFFFFF;
  --muted: #5E6782;
  --line: #E3E7EF;
  --line-soft: #EEF0F5;
  --field: #F7F8FB;
  --accent: #FF8A4C;
  --accent-soft: #FFF1E8;
  --ok: #2FB59B;
  --ok-ink: #0F6B58;
  --ok-soft: #D5F2EA;
  --warn-ink: #7A5300;
  --warn-soft: #FDF1D6;
  --bad: #C2412D;
  --bad-ink: #A8321F;
  --bad-soft: #FFE6E0;
  --card-ink: #24459E;
  --card-soft: #E3EAFF;
  --r: 18px;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.015em; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
.num, td.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- karkas ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 248px; flex: none; background: var(--ink); color: #fff;
  padding: 22px 14px; display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px 12px 12px 4px; background: var(--accent); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 22px; flex: none;
}
.brand-name { display: flex; flex-direction: column; min-width: 0; }
.brand-name b { font-family: var(--display); font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name span { font-size: 12px; color: var(--ink-soft); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-line); text-decoration: none; min-height: 42px;
}
.nav a:hover { background: var(--ink-3); color: #fff; }
.nav a.on { background: var(--ink-2); color: #fff; font-weight: 600; }
.nav a .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--ink-3); margin: 8px 4px; }
.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--ink); line-height: 1.4; }
.badge.red { background: #FF6B57; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--ink-3); }
.me-av { width: 36px; height: 36px; border-radius: 50%; background: #F2B33D; color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.me-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.me-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-name span { font-size: 12px; color: var(--ink-soft); }
.me-links { display: flex; gap: 10px; margin-top: 2px; }
.me-links a, .me-links button { font: inherit; font-size: 12px; color: var(--ink-soft); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 22px; max-width: 1280px; width: 100%; }
.content.narrow { max-width: 760px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.page-head .eyebrow { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.page-head .titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- tugmalar ---------- */
.btn {
  font: inherit; font-weight: 700; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { filter: brightness(.97); }
.btn-line { background: var(--surface); color: var(--ink); border-color: #D6DBE6; font-weight: 600; }
.btn-line:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); font-weight: 600; text-decoration: underline; padding: 0 8px; }
.btn-danger { background: var(--bad-soft); color: var(--bad-ink); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 16px; border-radius: 16px; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .seg label:focus-within {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- kartalar ---------- */
.card { background: var(--surface); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card-head a { font-size: 14px; font-weight: 600; }
.card.warm { background: var(--accent-soft); }
.card.dark { background: var(--ink); color: #fff; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); align-items: start; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.row > .grow { flex: 2 1 480px; min-width: 0; }
.row > .side-col { flex: 1 1 300px; min-width: 0; }

.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.kpi { background: var(--surface); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .value { font-family: var(--display); font-weight: 700; font-size: 32px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .value small { font-size: 18px; color: var(--muted); font-weight: 500; }
.kpi.dark { background: var(--ink); color: #fff; }
.kpi.dark .label { color: var(--ink-soft); }
.kpi.dark .value small, .kpi.dark .sub { color: var(--ink-line); }
.kpi .sub { font-size: 13px; color: var(--muted); }
.kpi .red { color: var(--bad); }

.bar { height: 8px; border-radius: 99px; background: #E9ECF3; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.bar.thin { height: 6px; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; line-height: 1.4; }
.pill.warn { background: var(--warn-soft); color: var(--warn-ink); }
.pill.ok { background: var(--ok-soft); color: var(--ok-ink); }
.pill.bad { background: var(--bad-soft); color: var(--bad-ink); }
.pill.cash { background: var(--warn-soft); color: var(--warn-ink); }
.pill.card { background: var(--card-soft); color: var(--card-ink); }
.pill.gray { background: var(--line-soft); color: var(--muted); }

.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; display: inline-block; }
.av { width: 38px; height: 38px; border-radius: 14px 14px 14px 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; color: var(--ink); }
.av.lg { width: 52px; height: 52px; font-size: 17px; border-radius: 18px 18px 18px 6px; }

/* ro'yxat qatorlari */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; }
.li:last-child { border-bottom: 0; }
.li-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.li-text { display: flex; flex-direction: column; min-width: 0; }
.li-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-text span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-end { display: flex; align-items: center; gap: 10px; flex: none; }
a.li:hover b { text-decoration: underline; }

.gcard { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--field); text-decoration: none; color: inherit; }
.gcard:hover { background: #EEF1F7; }
.gcard-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* jadval */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding: 8px; white-space: nowrap; }
table.t td { padding: 12px 8px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
table.t th:first-child, table.t td:first-child { padding-left: 0; }
table.t th:last-child, table.t td:last-child { padding-right: 0; }
table.t .r { text-align: right; }
table.t tr.dim td { color: var(--muted); text-decoration: line-through; }
table.t tfoot td { font-weight: 700; border-top: 2px solid var(--line); }

/* ---------- formalar ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .lbl { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
.fields-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
input[type=text], input[type=tel], input[type=date], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; min-height: 46px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--ink); outline: none; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }

.seg { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 14px; border: 1.5px solid #DDE1EA;
  background: #fff; font-weight: 700; cursor: pointer; text-align: center; padding: 0 10px;
}
.seg input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.seg.method input[value=cash]:checked + span { background: var(--warn-soft); border-color: #F2B33D; color: var(--ink); }
.seg.method input[value=card]:checked + span { background: var(--card-soft); border-color: #6E8BFF; color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid #DDE1EA; border-radius: 99px; background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 40px; height: 40px; border-radius: 12px 12px 12px 4px; border: 3px solid transparent; cursor: pointer; }
.swatch input:checked + span { border-color: var(--ink); }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.filters, .filters.card { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { flex: 1 1 180px; min-width: 0; }
.filters .field.wide { flex: 3 1 260px; }
.filters > .btn, .filters > .chips { flex: none; }

.searchbox { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border-radius: 14px; background: #fff; border: 1px solid #DDE1EA; }
.searchbox input { border: 0; background: transparent; padding: 0; min-height: 48px; }
.searchbox input:focus { background: transparent; }
.searchbox:focus-within { border-color: var(--ink); }

/* ---------- xabarlar ---------- */
.flashes { display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.flash.ok { background: var(--ok-soft); color: var(--ok-ink); }
.flash.error { background: var(--bad-soft); color: var(--bad-ink); }
.flash.warn { background: var(--warn-soft); color: var(--warn-ink); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* ---------- davomat (telefon) ---------- */
.att-head { border-radius: 0 0 28px 28px; padding: 20px; display: flex; flex-direction: column; gap: 14px; margin: -28px -32px 0; }
.att-head .count { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.att-head .count small { font-size: 16px; font-weight: 600; }
.att-list { display: flex; flex-direction: column; gap: 8px; }
.kid { background: #fff; border-radius: 16px; padding: 10px 10px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.kid-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kid-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.kid-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg { display: flex; gap: 6px; flex: none; }
.tg button {
  font: inherit; font-size: 14px; font-weight: 700; min-height: 44px; min-width: 62px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid #DDE1EA; background: #fff; color: var(--ink);
}
.tg button.in[aria-pressed=true] { background: var(--ok); border-color: var(--ok); color: #0B2A24; }
.tg button.out[aria-pressed=true] { background: var(--bad-soft); border-color: #F2A493; color: var(--bad-ink); }
.sick { align-self: flex-start; font: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 12px; border-radius: 99px; cursor: pointer; border: 1px solid #DDE1EA; background: #fff; color: var(--ink); }
.sick[aria-pressed=true] { background: var(--warn-soft); border-color: #F2B33D; }
.savebar { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--ground) 75%, rgba(244,246,249,0)); display: flex; flex-direction: column; gap: 6px; z-index: 3; }

/* ---------- chek ---------- */
.receipt { background: #fff; border: 1px dashed #C9CFDC; border-radius: 6px; padding: 20px 18px; display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; max-width: 420px; width: 100%; }
.receipt .kv { display: flex; justify-content: space-between; gap: 12px; }
.receipt .kv span:first-child { color: var(--muted); }
.receipt .sep { height: 1px; background: var(--line-soft); margin: 4px 0; }
.receipt .total { font-weight: 800; font-size: 18px; }

/* ---------- hujjatlar ---------- */
.docs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.doc-row { background: var(--field); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.doc-head { display: flex; align-items: center; gap: 10px; }
.doc-head .li-text { flex: 1; }
.doc-head .li-text b { white-space: normal; }
.doc-state { width: 24px; height: 24px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; }
.doc-state.ok { background: var(--ok); color: #0B2A24; }
.doc-state.miss { border: 2px dashed #E0A13A; background: var(--warn-soft); }
.doc-state.opt { border: 2px dashed #C9CFDC; }
.doc-upload label { cursor: pointer; }
.doc-upload.busy label { opacity: .6; pointer-events: none; }
.doc-files { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-file { position: relative; }
.doc-file a { display: block; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.doc-file img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-pdf { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--bad-ink); background: var(--bad-soft); }
.doc-del { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
img.av { display: block; border-radius: 14px 14px 14px 4px; }
img.av.lg { border-radius: 18px 18px 18px 6px; }
.demo-banner { background: var(--warn-soft); color: var(--warn-ink); border-radius: 14px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-weight: 600; font-size: 14px; }

/* ---------- bola davomati kalendari ---------- */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cal-nav h2 { text-align: center; flex: 1; }
.cal-nav-gap { width: 44px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 4px 0; }
.cal-wd.off { color: #6C7FA6; }
.cal-day { aspect-ratio: 1 / 1; max-width: 100%; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; font-variant-numeric: tabular-nums; border: 1.5px solid transparent; }
.cal-n { font-weight: 700; font-size: 17px; line-height: 1; }
.cal-t { font-size: 11px; font-weight: 600; opacity: .85; line-height: 1; }
.cal-day.s-blank { visibility: hidden; }
.cal-day.s-in { background: #2FB59B; color: #062A22; }
.cal-day.s-out { background: #C93A22; color: #FFFFFF; }
.cal-day.s-sick { background: #F2B33D; color: #3D2900; }
.cal-day.s-off { background: #C9D3E6; color: #3B4A6B; }
.cal-day.s-none { background: #FFFFFF; color: var(--ink); border: 1.5px dashed #B7BFD0; }
.cal-day.s-future, .cal-day.s-na { background: var(--field); color: #A0A8BC; }
.cal-day.s-today { box-shadow: 0 0 0 3px var(--ink); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); font-weight: 600; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-key { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.cal-key.k-in { background: #2FB59B; }
.cal-key.k-out { background: #C93A22; }
.cal-key.k-sick { background: #F2B33D; }
.cal-key.k-off { background: #C9D3E6; }
.cal-key.k-none { background: #fff; border: 1.5px dashed #B7BFD0; }
a.kid-link { color: inherit; text-decoration: none; min-width: 0; display: flex; align-items: center; gap: 10px; }
a.kid-link span { text-decoration: underline; text-decoration-color: #C9CFDC; text-underline-offset: 4px; }
@media (max-width: 420px) {
  .cal { gap: 4px; }
  .cal-day { border-radius: 9px; }
  .cal-n { font-size: 15px; }
  .cal-t { font-size: 9px; }
}

.kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpis.kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpis.kpis-4 .kpi { padding: 14px 16px; } }

/* ---------- ombor ---------- */
.mv { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; font-size: 16px; vertical-align: middle; }
.mv-kirim { background: var(--ok-soft); color: var(--ok-ink); }
.mv-berish { background: var(--card-soft); color: var(--card-ink); }
.mv-sarf { background: var(--bad-soft); color: var(--bad-ink); }
table.stock td { vertical-align: top; }
table.stock { min-width: 620px; }
@media (max-width: 640px) {
  table.stock { min-width: 0; }
  table.stock thead { display: none; }
  table.stock, table.stock tbody, table.stock tr, table.stock td { display: block; }
  table.stock tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
  table.stock tr:first-child { border-top: 0; }
  table.stock td { border: 0; padding: 0 !important; text-align: left !important; }
  table.stock td:first-child { grid-column: 1 / -1; }
  table.stock td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
  table.stock td:nth-child(4), table.stock td:nth-child(5) { grid-column: 1 / -1; }
}

/* ---------- menyu ---------- */
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mday { min-height: 72px; border-radius: 12px; background: var(--field); text-decoration: none; color: var(--ink); padding: 8px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; border: 1.5px solid transparent; min-width: 0; }
.mday:hover { border-color: var(--ink); }
.mday.out { background: transparent; }
.mday.today { border-color: var(--ink); background: #fff; }
.mday-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.mday.future .mday-n { color: var(--muted); }
.mday-dots { display: flex; gap: 4px; }
.mday-dots i, .dot-l { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.mday-dots i.none, .dot-l.none { border: 1.5px solid #B7BFD0; }
.mday-dots i.plan, .dot-l.plan { background: #9DB1E8; }
.mday-dots i.rec, .dot-l.rec { background: #2FB59B; }
.mday-dots i.rec.photo, .dot-l.rec.photo { background: #0F6B58; box-shadow: 0 0 0 2px #D5F2EA; }
.meal-strip { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.meal-mini { background: var(--field); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.meal-mini .pill { align-self: flex-start; }
.meal-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.meal-col { background: var(--field); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.meal-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.meal-photo { display: block; max-width: 480px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.meal-photo img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; }
@media (max-width: 420px) { .mday { min-height: 58px; padding: 6px; } .mday-dots { gap: 3px; } .mday-dots i { width: 8px; height: 8px; } }

/* ---------- admin ish stoli ---------- */
.quick { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.quick-tile { background: var(--surface); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); min-height: 132px; border: 2px solid transparent; }
.quick-tile:hover { border-color: var(--ink); }
.quick-tile b { font-family: var(--display); font-size: 20px; font-weight: 700; margin-top: 8px; }
.quick-tile span:last-child { font-size: 13px; color: var(--muted); }
.quick-ico { width: 46px; height: 46px; border-radius: 14px 14px 14px 4px; background: var(--field); display: flex; align-items: center; justify-content: center; }
.quick-tile.accent { background: var(--accent); }
.quick-tile.accent .quick-ico { background: rgba(255,255,255,.55); }
.quick-tile.accent span:last-child { color: #4A2410; }
.ho-state { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ho-state.wait { background: #FDF1D6; color: #5C3D00; }
.ho-state.ok { background: #D5F2EA; color: #0B4A3C; }
.ho-state.bad { background: #FFE6E0; color: #8A2414; }
@media (max-width: 900px) {
  .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .quick-tile { min-height: 0; padding: 12px 10px; align-items: center; text-align: center; }
  .quick-tile b { font-size: 14px; margin-top: 4px; }
  .quick-tile span:last-child { display: none; }
}

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); background: var(--ink); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 24px; padding: 28px 24px; display: flex; flex-direction: column; gap: 20px; }

/* ---------- telefon ---------- */
.tabbar { display: none; }
.scrim { display: none; }
@media (max-width: 900px) {
  body { font-size: 16px; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; height: 100%; width: min(300px, 86vw);
    transform: translateX(-105%); transition: transform .2s ease; padding-top: calc(22px + env(safe-area-inset-top, 0px));
  }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,20,40,.45); z-index: 30; }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  }
  .topbar .brand-mark { width: 34px; height: 34px; font-size: 19px; }
  .topbar b { font-family: var(--display); font-size: 17px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--ink-2); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .content { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 110px max(16px, env(safe-area-inset-left, 0px)); gap: 18px; }
  .att-head { margin: -18px calc(-1 * max(16px, env(safe-area-inset-right, 0px))) 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); }
  h1 { font-size: 26px; }
  .kpi .value { font-size: 28px; }
  .card { padding: 16px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(var(--tabs, 5), minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: #fff; border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  }
  .tabbar a, .tabbar button {
    font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; min-height: 52px;
    color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; border: 0; background: none; cursor: pointer; position: relative;
  }
  .tabbar .on { color: var(--ink); }
  .tabbar .on svg { color: var(--accent); }
  .tabbar .badge { position: absolute; top: 2px; left: 55%; font-size: 10px; padding: 1px 6px; }
  .savebar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .hide-sm { display: none !important; }
}
@media (min-width: 901px) { .only-sm { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
