/* BYN Cleaning & Facilities: matches the BYN Catering look. */
:root {
  --navy: #0E1A3A; --navy-2: #111F45; --navy-line: #1E2C55; --navy-on: #1F3470;
  --ink: #0F172A; --muted: #475569; --line: #E3E8F2; --line-2: #EEF1F7;
  --bg: #F4F6FB; --card: #FFFFFF; --blue: #1A56DB; --blue-d: #1E429F; --field: #EEF3FD;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; }
a { color: var(--blue); }
a:hover { color: var(--blue-d); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 260px; max-width: 100%; background: var(--navy); color: #FFF; display: flex; flex-direction: column; }
.body { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 900px) {
  /* Fixed sidebar with its own scroll; the page scrolls separately. */
  .side { flex: 0 0 260px; position: sticky; top: 0; height: 100vh; overflow: hidden; }
  .shell { flex-wrap: nowrap; align-items: flex-start; }
}

.brand, .me { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--navy-line); color: #FFF; text-decoration: none; }
.brand:hover, .me:hover { color: #FFF; background: #13214A; }
.brand span:last-child, .me span:last-child { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 16px; font-weight: 800; }
.brand small { font-size: 11px; letter-spacing: .08em; color: #A9B6D6; }
.me strong { font-size: 15px; }
.me small { font-size: 13px; color: #A9B6D6; }
.brand-tile { width: 44px; height: 44px; border-radius: 10px; background: #14B8A6; display: flex; align-items: center; justify-content: center; flex: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #4F6BED; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }

.side-search { display: flex; align-items: center; gap: 8px; height: 40px; margin: 14px 10px 6px; border: 1px solid #2A3A68; border-radius: 8px; padding: 0 12px; background: var(--navy-2); }
.side-search input { border: 0; outline: none; background: transparent; color: #FFF; font: inherit; font-size: 13px; width: 100%; }
.side-search input::placeholder { color: #8B9AC0; }

.nav { display: flex; flex-direction: column; gap: 4px; padding: 8px 6px 20px; }
.nav-row { display: flex; align-items: center; border-radius: 10px; }
.nav-row:hover { background: #18295A; }
.nav-link { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 10px; min-height: 44px; border-radius: 10px; color: #FFF; text-decoration: none; font-weight: 600; }
.nav-link:hover { color: #FFF; }
.nav-link.on { background: var(--navy-on); }
.nav-caret { flex: none; width: 36px; height: 44px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.nav-caret:hover { background: #22356B; }
.nav-caret svg { transition: transform .15s ease; }
.nav-group.open .nav-caret svg { transform: rotate(90deg); }
.nav-sub { display: none; flex-direction: column; gap: 2px; margin: 2px 0 6px 25px; padding-left: 14px; border-left: 1px solid #2A3A68; }
.nav-group.open .nav-sub { display: flex; }
.nav-sub a { display: block; padding: 7px 10px; border-radius: 8px; color: #C3CDE6; text-decoration: none; font-size: 13px; font-weight: 500; }
.nav-sub a:hover { background: #18295A; color: #FFF; }
.nav-sub a.on { color: #FFF; background: #18295A; font-weight: 700; }
.nav .lbl { flex: 1 1 auto; }
.tile { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; }

.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: #FFF; border-bottom: 1px solid var(--line); }
.top-l, .top-r { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.top-title { font-weight: 700; font-size: 18px; margin-left: 8px; }
.ibtn { width: 40px; height: 40px; border: 1px solid #DCE3EF; border-radius: 8px; background: #FFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ibtn:hover { background: #F1F4FA; }
.chip-plain { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 1px solid #DCE3EF; border-radius: 8px; }
.btn-out { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid #DCE3EF; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.btn-out:hover { background: #F1F4FA; color: var(--ink); }

.content { padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.page-head h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--blue); color: #FFF; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--blue-d); color: #FFF; }
.btn-ghost { background: #FFF; color: var(--ink); border: 1px solid #DCE3EF; font-weight: 600; }
.btn-ghost:hover { background: #F1F4FA; color: var(--ink); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.tag { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid #DCE3EF; border-radius: 8px; background: #FFF; font-size: 13px; color: #334155; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #16A34A; }

.flash { padding: 12px 16px; border-radius: 10px; font-weight: 600; }
.flash-ok { background: #E3F5F2; color: #0F5F58; }
.flash-warn { background: #FEF3E2; color: #92400E; }
.flash-error { background: #FDECEC; color: #991B1B; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; }
.card h2 { margin: 0 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #1D4ED8; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { display: flex; gap: 14px; align-items: center; background: #FFF; border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; text-decoration: none; color: var(--ink); }
.kpi:hover { color: var(--ink); border-color: #C9D6F2; }
.kpi .tile { width: 48px; height: 48px; border-radius: 12px; }
.kpi .k-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .k-lbl { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.kpi .k-val { font-size: 22px; font-weight: 800; white-space: nowrap; }
.kpi .k-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dash { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.dash-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.sec { padding-bottom: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); border-radius: 6px; }
.row:last-child { border-bottom: 0; }
.row:hover { background: #F7F9FD; color: var(--ink); }
.badge { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.row .r-txt { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.row .r-lbl { font-weight: 600; }
.row .r-sub { font-size: 12px; color: var(--muted); }
.row .r-val { font-size: 17px; font-weight: 800; white-space: nowrap; }

.insights { flex: 1 1 300px; background: var(--navy); color: #FFF; border-radius: 16px; padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.insights h2 { margin: 0; font-size: 19px; font-weight: 800; }
.ins-head { display: flex; justify-content: space-between; align-items: center; }
.ins-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #DC2626; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ins-sec { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #7FA6FF; }
.ins { display: flex; flex-direction: column; gap: 3px; padding-bottom: 12px; border-bottom: 1px solid var(--navy-line); }
.ins-top { display: flex; justify-content: space-between; font-size: 13px; color: #D6DEF0; }
.ins-val { font-size: 18px; font-weight: 800; }
.ins-prev { font-size: 12px; color: #A9B6D6; }
.up { color: #4ADE80; font-weight: 600; } .down { color: #FCA5A5; font-weight: 600; } .flat { color: #A9B6D6; }
.alert { display: flex; gap: 12px; align-items: flex-start; background: #14244D; border: 1px solid #24366A; border-radius: 10px; padding: 12px; }
.alert .tile { width: 32px; height: 32px; color: #FFF; font-weight: 800; }
.alert strong { display: block; font-size: 14px; }
.alert span { font-size: 12px; color: #C3CDE6; }

.counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.count { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: #FFF; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.count.on { border: 2px solid var(--blue); }
.count:hover { color: var(--ink); }
.count .badge { width: 40px; height: 40px; border-radius: 10px; font-size: 15px; font-weight: 800; }
.count small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.count strong { font-size: 22px; font-weight: 800; }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; }
.toolbar form { display: flex; flex-wrap: wrap; gap: 10px; }
.scroll { overflow-x: auto; position: relative; }
table.grid { width: 100%; border-collapse: collapse; min-width: 760px; }
table.grid th { text-align: left; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 10px; font-weight: 700; }
table.grid td { padding: 12px 10px; border-top: 1px solid var(--line-2); vertical-align: middle; }
table.grid tr:hover td { background: #F7F9FD; }
.sub { display: block; font-size: 12px; color: var(--muted); }
.empty { padding: 28px 10px; text-align: center; color: var(--muted); }

.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill-green { background: #E3F5F2; color: #0F5F58; }
.pill-orange { background: #FDEEE4; color: #9A3412; }
.pill-blue { background: #E8EFFE; color: #1E40AF; }
.pill-red { background: #FDECEC; color: #991B1B; }
.pill-grey { background: #EEF1F7; color: #334155; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field input, .field select, .field textarea, .inline-field { height: 42px; border: 1px solid #C9D6F2; border-radius: 10px; padding: 0 12px; font: inherit; font-weight: 400; color: var(--ink); background: var(--field); }
.field textarea { height: auto; min-height: 90px; padding: 10px 12px; }
.field .hint { font-weight: 400; font-size: 12px; color: var(--muted); }
.field-wide { grid-column: 1 / -1; }
.inline-field { height: 40px; background: #FFF; border-color: #DCE3EF; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-actions form { margin: 0; }

/* Sign in */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: #F8FAFD; }
.auth-hero { flex: 1 1 520px; background: var(--navy); color: #FFF; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.auth-hero .brand { padding: 0; border: 0; }
.auth-hero .brand:hover { background: transparent; }
.auth-hero h1 { margin: 0; font-size: 40px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; max-width: 560px; }
.auth-hero p { margin: 18px 0 20px; font-size: 17px; line-height: 1.55; color: #C3CDE6; max-width: 520px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border: 1px solid #2A3A68; border-radius: 999px; font-size: 13px; color: #E2E8F5; }
.chips i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.auth-foot { font-size: 13px; color: #8B9AC0; }
.auth-panel { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 400px; background: #FFF; border-radius: 16px; padding: 36px 32px; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 12px 40px rgba(15, 23, 42, .08); }
.auth-card h2 { margin: 0; font-size: 26px; font-weight: 800; }
.auth-card .btn { height: 48px; font-size: 16px; border-radius: 10px; }
.auth-card .field input { height: 46px; }

/* Reports */
.bar { height: 8px; border-radius: 999px; background: #EEF1F7; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.bar i.over { background: #DC2626; }
.num { text-align: right; white-space: nowrap; }
table.grid th.num { text-align: right; }
table.grid tfoot td { font-weight: 800; border-top: 2px solid var(--line); }
.check-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.check-row select, .check-row input { height: 40px; border: 1px solid #C9D6F2; border-radius: 10px; padding: 0 10px; font: inherit; background: var(--field); min-width: 0; }
@media (max-width: 640px) { .check-row { grid-template-columns: 1fr; } }
@media print { .side, .top, .no-print, .actions { display: none !important; } .content { padding: 0 !important; } .card { break-inside: avoid; } .shell, .body, .content, .panels, .dash, .dash-main, .insights { height: auto !important; overflow: visible !important; } }

/* Phones and small tablets: the menu becomes a slide-in drawer. */
.menu-btn, .scrim { display: none; }
@media (max-width: 899px) {
  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: 280px; max-width: 85vw; overflow-y: auto; transform: translateX(-100%); transition: transform .2s ease; }
  body.menu-open .side { transform: none; }
  body.menu-open { overflow: hidden; }
  .scrim { position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 42, .45); }
  body.menu-open .scrim { display: block; }
  .menu-btn { display: inline-flex; }
  .top { padding: 10px 16px; position: sticky; top: 0; z-index: 30; }
  .top-nav, .top-r .chip-plain, .top-r .muted { display: none; }
  .top-title { font-size: 16px; margin-left: 2px; }
  .btn-out { padding: 0 10px; }
  .content { padding: 16px 16px 32px; gap: 14px; }
  .page-head h1 { font-size: 24px; }
  .page-head .actions { width: 100%; }
  .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .count { padding: 10px; gap: 8px; }
  .count .badge { width: 32px; height: 32px; font-size: 13px; }
  .count strong { font-size: 18px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .kpi .tile { width: 36px; height: 36px; }
  .kpi .k-val { font-size: 20px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .toolbar form, .toolbar form label, .toolbar .inline-field { width: 100%; }
  .toolbar form .btn { flex: 1 1 auto; }
}

/* Public QR report page */
body.public { background: var(--bg); }
.pub { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; }
.pub-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 16px; }
.pub-card { padding: 22px 18px; }
.pub-card h1 { margin: 2px 0 10px; font-size: 24px; font-weight: 800; }
.pub-issues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pub-issue { position: relative; }
.pub-issue input { position: absolute; opacity: 0; }
.pub-issue span { display: flex; align-items: center; min-height: 64px; padding: 10px 12px; border: 1px solid #C9D6F2; border-radius: 12px; background: var(--field); font-weight: 600; cursor: pointer; }
.pub-issue input:checked + span { border: 2px solid var(--blue); background: #E8EFFE; color: #1E40AF; }
.pub-issue input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

/* QR sheet */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.qr-card { border: 1px solid var(--line); border-radius: 14px; background: #FFF; padding: 16px; text-align: center; break-inside: avoid; }
.qr-card .qr svg { width: 170px; height: 170px; }
.qr-card strong { display: block; font-size: 15px; margin-top: 6px; }
.qr-card .tagline { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
@media print { .qr-grid { grid-template-columns: repeat(3, 1fr); } .qr-card { border: 1px dashed #94A3B8; } }

/* My tasks */
.mt-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.mt-item:first-of-type { border-top: 0; }
.mt-main { flex: 1 1 220px; min-width: 0; }
.mt-main strong { display: block; font-size: 15px; }
.mt-actions { display: flex; gap: 8px; }
.mt-actions .btn { height: 46px; min-width: 96px; font-size: 15px; }

/* Fixed app frame on computers: sidebar, top bar and page title stay put; only the panels scroll. */
.panels { display: flex; flex-direction: column; gap: 18px; min-width: 0; position: relative; }
@media screen and (min-width: 900px) {
  .shell { height: 100vh; overflow: hidden; }
  .side { height: 100vh; }
  .body { height: 100vh; }
  .top { flex: none; }
  .content { flex: 1 1 auto; min-height: 0; overflow: hidden; padding-bottom: 0; }
  .page-head { flex: none; }
  .content > .flash { flex: none; }
  .panels { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 32px 0; margin-right: -8px; scrollbar-width: thin; scrollbar-color: #C9D6F2 transparent; }
  .panels::-webkit-scrollbar, .dash-main::-webkit-scrollbar { width: 8px; }
  .panels::-webkit-scrollbar-thumb, .dash-main::-webkit-scrollbar-thumb { background: #C9D6F2; border-radius: 4px; }
}
/* Dashboard on wide screens: the main panels and Insights & Alerts scroll separately. */
@media screen and (min-width: 1200px) {
  .page-dashboard .panels { overflow: hidden; padding-bottom: 0; }
  .page-dashboard .dash { flex: 1 1 auto; min-height: 0; flex-wrap: nowrap; align-items: stretch; }
  .page-dashboard .dash-main { overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 24px 0; scrollbar-width: thin; scrollbar-color: #C9D6F2 transparent; }
  .page-dashboard .insights { flex: 0 0 300px; overflow-y: auto; overscroll-behavior: contain; margin-bottom: 24px; scrollbar-width: thin; scrollbar-color: #2A3A68 transparent; }
}

/* Sidebar: logo, user and search stay fixed; only the menu list scrolls. */
.brand, .me, .side-search { flex: none; }
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #2A3A68 transparent; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: #2A3A68; border-radius: 3px; }
@media (max-width: 899px) { .side { overflow: hidden; } }
/* v0.9 alert bell and switched-off rows */
.bell { position: relative; }
.bell summary { list-style: none; cursor: pointer; position: relative; }
.bell summary::-webkit-details-marker { display: none; }
.bell-n { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #DC2626; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.bell-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 300px; max-width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid #DCE3EF; border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .16); padding: 12px; }
.bell-h { display: block; font-size: 13px; padding: 0 4px 6px; }
.bell-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 6px; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-size: 14px; }
.bell-item:hover { background: #F1F4FA; color: var(--ink); }
.row-off td { color: #94A3B8; }
.row-off td strong { color: #64748B; }
@media (max-width: 899px) { .bell-menu { position: fixed; right: 16px; top: 64px; } }
.fx { margin: 0; }
.fx select.chip-plain { width: 96px; font: inherit; font-weight: 600; color: var(--ink); background: #fff; cursor: pointer; padding: 0 10px; }
@media (max-width: 899px) { .top-r .fx select.chip-plain { display: inline-block; width: 74px; height: 38px; padding: 0 6px; font-size: 13px; } }
@media (max-width: 520px) { .out-lbl { display: none; } .btn-out { padding: 0 10px; } .top-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34vw; } }
/* v1.0 photo proof */
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.thumbs img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid #DCE3EF; display: block; background: #F1F4FA; }
.photo-pick { position: relative; overflow: hidden; gap: 6px; cursor: pointer; }
.photo-pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.photo-pick.has-file { border-color: #16A34A; color: #15803D; background: #E8F7EE; }
.mt-done { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.photo-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; margin: 6px 0 12px; }
.photo-row small { display: block; }
/* v1.0 tablets: slimmer sidebar on landscape tablets and small laptops, document numbers kept on one line */
@media (min-width: 900px) and (max-width: 1279px) {
  .side { flex-basis: 224px; }
  .top-r .muted { display: none; }
}
table.grid td:first-child strong { white-space: nowrap; }
@media (pointer: coarse) { .btn-sm { min-height: 36px; } .nav-sub a { padding-top: 9px; padding-bottom: 9px; } }
/* v1.0 phones: keep the top bar on one row down to 320px wide */
@media (max-width: 899px) {
  .top { flex-wrap: nowrap; gap: 8px; }
  .top-l { flex-wrap: nowrap; min-width: 0; flex: 1 1 auto; }
  .top-r { flex-wrap: nowrap; flex: none; gap: 6px; }
  .top-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
}
@media (max-width: 400px) {
  .top { padding: 8px 12px; }
  .top .ibtn, .btn-out { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .top-r .fx select.chip-plain { width: 64px; height: 36px; }
  .top-title { font-size: 15px; }
}

/* v2.0 companies */
.brand-tile.has-logo { background: #FFF; overflow: hidden; }
.brand-logo { width: 100%; height: 100%; object-fit: contain; display: block; }
.as-company { flex: none; padding: 8px 24px; background: #FEF3E2; color: #92400E; font-size: 13px; border-bottom: 1px solid #FCD9A8; }
.as-company a { color: #92400E; font-weight: 700; margin-left: 6px; }
.auth-foot a { color: #C7D2FE; }
@media (max-width: 899px) { .as-company { padding: 8px 16px; } }

/* v2.1 company import */
#import-form h3 { font-size: 15px; margin: 20px 0 6px; }
#import-form .actions form { display: inline; }

/* v2.1.1 file inputs */
.field input[type=file] { height: auto; min-height: 42px; padding: 5px 6px; display: flex; align-items: center; cursor: pointer; }
.field input[type=file]::file-selector-button { height: 30px; margin: 0 12px 0 0; padding: 0 14px; border: 1px solid #C9D6F2; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.field input[type=file]::file-selector-button:hover { background: #EEF3FF; border-color: #1A56DB; }

/* v2.1.2 dashboard KPIs: row stays put while the panels below scroll; text sizes itself to the box */
.kpis { container: kpis / inline-size; }
.kpi { container-type: inline-size; min-width: 0; }
.kpi .k-txt { flex: 1 1 auto; }
.kpi .k-lbl { line-height: 1.3; }
.kpi .k-val { font-size: clamp(16px, 12cqi, 22px); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
@container kpis (max-width: 1500px) {
  .kpi { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .kpi .tile { width: 40px; height: 40px; }
  .kpi .k-txt { width: 100%; }
}
@media screen and (min-width: 900px) {
  /* The KPI row sits above the scrolling area, so the scrollbar starts below it. */
  .page-dashboard .panels { overflow: hidden; padding-bottom: 0; }
  .page-dashboard .panels > .kpis { flex: none; }
  .page-dashboard .dash { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 24px 0; scrollbar-width: thin; scrollbar-color: #C9D6F2 transparent; }
}
@media screen and (min-width: 1200px) {
  .page-dashboard .dash { overflow: hidden; padding: 0; }
}

/* v2.2 field service */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; margin: 0; }
.facts div { min-width: 0; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); min-width: 0; }
.file-list li:first-child { border-top: 0; }
.file-list li > a, .file-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.attach-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; }
.attach-form .field { flex: 1 1 200px; min-width: 0; }
.attach-form .qty-field { flex: 0 1 110px; }
.attach-form .btn { flex: none; }
.pair { display: flex; gap: 8px; align-items: center; }
.pair input { width: 90px; flex: none; }
.pair select { flex: 1 1 auto; min-width: 0; }
details.more { margin-top: 12px; }
details.more > summary { list-style: none; display: inline-flex; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: 12px; }
.grid.cost-table { min-width: 0; width: 100%; }
.cost-table td { padding: 8px 10px; }
.cost-table .num { text-align: right; white-space: nowrap; font-weight: 600; }
.cost-table .tot td { font-weight: 800; border-top: 2px solid var(--line); }
.sign-box { position: relative; border: 2px dashed #C9D6F2; border-radius: 12px; background: #fff; margin: 12px 0; max-width: 600px; }
.sign-box canvas { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; touch-action: none; cursor: crosshair; }
.sign-box [data-sign-clear] { position: absolute; top: 8px; right: 8px; }
.sign-form .field { max-width: 600px; }
.check { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; font-weight: 600; }
.signed img { border: 1px solid var(--line); border-radius: 10px; background: #fff; max-width: 100%; height: auto; }
.print-only { display: none; }

/* Calendar */
.planner-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; max-height: 64vh; }
.planner { display: grid; grid-template-columns: 150px repeat(var(--days), minmax(150px, 1fr)); min-width: calc(150px + var(--days) * 150px); }
.pl-head { position: sticky; top: 0; z-index: 2; background: #F8FAFD; padding: 10px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-2); }
.pl-head.today { color: var(--blue); }
.pl-name { position: sticky; left: 0; z-index: 1; background: #fff; padding: 10px; border-top: 1px solid var(--line-2); border-right: 1px solid var(--line); font-size: 13px; }
.pl-head.pl-name { z-index: 3; background: #F8FAFD; }
.pl-cell { min-height: 84px; padding: 6px; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.pl-cell.today { background: #F5F8FF; }
.pl-cell.off { background: #FEF2F2; }
.pl-cell.busy { box-shadow: inset 0 0 0 2px #FDBA74; }
.pl-cell.drop, .pl-tray.drop { background: #E8EFFE; outline: 2px dashed var(--blue); outline-offset: -3px; }
.pl-shift { font-size: 11px; color: #0E7490; background: #E2F4F8; border-radius: 6px; padding: 2px 6px; align-self: flex-start; }
.pl-shift.away { color: #991B1B; background: #FDECEC; }
.pl-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; min-height: 60px; padding: 4px; border-radius: 10px; }
.chip-job { position: relative; background: #fff; border: 1px solid var(--line); border-left: 4px solid #2563EB; border-radius: 8px; padding: 6px 8px; font-size: 12px; line-height: 1.3; }
.chip-job[draggable="true"] { cursor: grab; }
.chip-job.dragging { opacity: .45; }
.chip-job.saved { box-shadow: 0 0 0 2px #16A34A; }
.chip-job a { color: var(--ink); text-decoration: none; display: block; padding-right: 34px; }
.chip-job strong { display: block; overflow-wrap: anywhere; }
.chip-job a span { color: var(--muted); display: block; overflow-wrap: anywhere; }
.chip-job.tone-red { border-left-color: #DC2626; }
.chip-job.tone-orange { border-left-color: #EA580C; }
.chip-job.tone-grey { border-left-color: #94A3B8; }
.chip-job.tone-done { border-left-color: #16A34A; opacity: .7; }
.chip-job.tone-plan { border: 1px dashed #94A3B8; border-left: 4px dashed #64748B; background: #F8FAFC; }
.chip-move { position: absolute; top: 4px; right: 4px; }
.chip-move > summary { list-style: none; cursor: pointer; font-size: 11px; font-weight: 700; color: var(--blue); padding: 2px 4px; }
.chip-move > summary::-webkit-details-marker { display: none; }
.chip-move[open] { position: static; margin-top: 6px; }
.chip-move form { display: grid; gap: 6px; }
.chip-move label { display: grid; gap: 2px; font-size: 11px; font-weight: 600; }
.chip-move input, .chip-move select { height: 34px; border: 1px solid #C9D6F2; border-radius: 8px; padding: 0 8px; font: inherit; background: var(--field); min-width: 0; }
.month-wrap { overflow-x: auto; }
.month { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 840px; }
.mo-head { background: #F8FAFD; padding: 8px 10px; font-weight: 700; font-size: 12px; border-bottom: 1px solid var(--line); }
.mo-day { min-height: 120px; padding: 6px; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mo-day.blank { background: #FAFBFD; }
.mo-day.today { background: #F5F8FF; }
.mo-num { font-weight: 800; font-size: 13px; color: var(--ink); text-decoration: none; }
.mo-day.today .mo-num { color: var(--blue); }
.mo-more { font-size: 12px; font-weight: 600; }
.month .chip-job a { padding-right: 0; }

@media print {
  .no-print, .page-head .actions, .attach-form, .chip-move { display: none !important; }
  .print-only { display: block; }
  .print-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
  .sign-lines { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 18px; }
  .two { grid-template-columns: 1fr 1fr; }
  .card { box-shadow: none; border: 1px solid #CBD5E1; }
}
@media (max-width: 899px) {
  .planner-wrap { max-height: none; }
  .planner { grid-template-columns: 110px repeat(var(--days), minmax(140px, 1fr)); min-width: calc(110px + var(--days) * 140px); }
}

/* v2.3 planning */
.btn-danger { background: #DC2626; color: #FFF; }
.btn-danger:hover { background: #B91C1C; color: #FFF; }
.mt-actions { flex-wrap: wrap; }
.pin-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pin-row input { flex: 1 1 auto; min-width: 0; }
.pin-row .btn { flex: none; }
.lb-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lb-col { background: #F6F8FC; border: 1px solid var(--line); border-top: 4px solid var(--tone); border-radius: 10px; padding: 10px; min-width: 0; display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; }
.lb-col h3 { margin: 0; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.lb-col h3 span { background: var(--tone); color: #FFF; border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.lb-col > .sub { margin: -4px 0 2px; }
.lb-empty { margin: 4px 0; font-size: 13px; }
.lb-job { display: block; background: #FFF; border: 1px solid var(--line); border-left: 4px solid #94A3B8; border-radius: 8px; padding: 8px 10px; color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.lb-job:hover { border-color: #B8C6E3; color: var(--ink); }
.lb-job.prio-urgent { border-left-color: #DC2626; }
.lb-job.prio-high { border-left-color: #EA580C; }
.lb-job.prio-normal { border-left-color: #2563EB; }
.lb-job .late { color: #B91C1C; font-weight: 600; }
.map { height: 380px; border-radius: 10px; border: 1px solid var(--line); background: #EEF2F8; z-index: 0; }
.map-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 8px 0 0; }
.map-key .dot { display: inline-block; flex: none; width: 10px; height: 10px; padding: 0; border-radius: 50%; margin-right: -8px; }
.dot-site { background: #1D4ED8; } .dot-staff { background: #16A34A; } .dot-alert { background: #DC2626; }
.route-list { margin: 0; padding: 0 0 0 22px; }
.route-list li { display: list-item; padding: 12px 0; border-top: 1px solid var(--line-2); }
.route-list li:first-child { border-top: 0; }
.route-list li::marker { font-weight: 700; color: var(--blue); }
.route-list li .mt-main { display: inline-block; width: calc(100% - 110px); vertical-align: top; }
.route-list li > .btn { float: right; }
@media (max-width: 1199px) { .lb-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .lb-board { grid-template-columns: minmax(0, 1fr); }
  .lb-col { max-height: none; }
  .map { height: 300px; }
  .route-list li .mt-main { width: 100%; }
  .route-list li > .btn { float: none; margin-top: 8px; }
  .pin-row { flex-wrap: wrap; }
}
@media print { .map, .lb-board { break-inside: avoid; } }

/* v2.4 sales and finance */
.pill-purple { background: #F0EAFD; color: #5B21B6; }
.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pipe-step { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.pipe-step:hover { border-color: #C9D6F2; color: var(--ink); }
.pipe-step strong { font-size: 22px; }
.pipe-step .pill { align-self: flex-start; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-row .attach-form { flex: 1 1 320px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--line-2); padding: 1px 5px; border-radius: 5px; }
tr.tot td { font-weight: 700; border-top: 2px solid var(--line); }

/* Line editor on quotes, invoices and purchase orders */
.doc-lines { display: flex; flex-direction: column; gap: 8px; }
.ln { display: grid; grid-template-columns: minmax(0, 1fr) 80px 96px 120px 84px 116px 34px; gap: 8px; align-items: center; }
.ln label { margin: 0; min-width: 0; }
.ln input, .ln select { width: 100%; height: 40px; border: 1px solid #C9D6F2; border-radius: 9px; padding: 0 10px; font: inherit; color: var(--ink); background: var(--field); min-width: 0; }
.ln-head { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ln-head .ln-qty, .ln-head .ln-price, .ln-head .ln-amt { text-align: right; }
.ln-l { display: none; }
.ln-amt { text-align: right; font-weight: 700; white-space: nowrap; }
.ln-x { width: 34px; height: 34px; border: 1px solid #DCE3EF; border-radius: 8px; background: #FFF; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }
.ln-x:hover { color: #B91C1C; border-color: #F3C1C1; }
.ln-head .ln-x { border: 0; background: none; }
.doc-foot { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; justify-content: space-between; margin-top: 4px; }
.doc-foot .check { margin: 8px 0 0; }
.doc-totals { margin: 0 0 0 auto; min-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.doc-totals div { display: flex; justify-content: space-between; gap: 18px; }
.doc-totals dt { color: var(--muted); }
.doc-totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.doc-totals .tot { border-top: 1px solid var(--line); padding-top: 6px; font-size: 16px; }
.doc-totals .tot dt { color: var(--ink); font-weight: 700; }
.doc-totals .tot dd { font-weight: 800; }
.doc-totals-view { margin-top: 12px; max-width: 340px; }
@media (max-width: 760px) {
  .ln-head { display: none; }
  .ln { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #FAFBFE; }
  .ln-desc { grid-column: 1 / 6; grid-row: 1; }
  .ln-x { grid-column: 6; grid-row: 1; justify-self: end; }
  .ln-qty, .ln-unit, .ln-price { grid-column: span 2; }
  .ln-vat { grid-column: span 3; }
  .ln-amt { grid-column: span 3; display: flex; flex-direction: column; align-items: flex-end; }
  .ln-l { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .05em; }
  .ln-qty input, .ln-price input { text-align: right; }
  .doc-totals { margin: 0; width: 100%; }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .ln-qty, .ln-unit, .ln-price, .ln-vat, .ln-amt { grid-column: span 3; }
}

/* Printable documents */
.doc-page { background: #E9EDF5; }
.docp-bar { display: flex; gap: 10px; justify-content: center; padding: 14px 16px 0; }
.docp { max-width: 820px; margin: 14px auto 40px; background: #FFF; border-radius: 14px; padding: 36px 40px; box-shadow: 0 2px 14px rgba(15, 23, 42, .08); }
.docp-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.docp-co { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.docp-co > div, .docp-title, .docp-party, .docp-pay { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.docp-co span, .docp-party span, .docp-pay span { color: var(--muted); overflow-wrap: anywhere; }
.docp-logo .brand-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; }
.docp-name { font-size: 18px; }
.docp-title { text-align: right; align-items: flex-end; }
.docp-title h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: .08em; text-transform: uppercase; }
.docp-stamp { margin-top: 6px; padding: 3px 12px; border: 2px solid currentColor; border-radius: 6px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #64748B !important; }
.docp-stamp-paid, .docp-stamp-accepted { color: #0F766E !important; }
.docp-stamp-void, .docp-stamp-declined, .docp-stamp-cancelled { color: #B91C1C !important; }
.docp-party { margin: 20px 0 12px; }
.docp-lbl { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) !important; margin-bottom: 2px; }
.docp-subject { margin: 10px 0 0; }
.docp-lines { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.docp-lines th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 8px 6px; }
.docp-lines td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docp-lines .num { text-align: right; white-space: nowrap; }
.docp-age { margin-top: 18px; }
.docp-totals { margin: 14px 0 0 auto; max-width: 320px; display: flex; flex-direction: column; gap: 4px; }
.docp-totals div { display: flex; justify-content: space-between; gap: 18px; }
.docp-totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.docp-totals .tot { border-top: 1px solid var(--ink); padding-top: 6px; font-size: 16px; font-weight: 800; }
.docp-pay { margin-top: 20px; padding: 12px 14px; background: #F4F6FB; border-radius: 10px; }
.docp-pay span { color: var(--ink); }
.docp-notes, .docp-terms { margin: 16px 0 0; }
.docp-terms { color: var(--muted); font-size: 13px; }
.docp-answer { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.docp-foot { margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); }
.docp-foot p { margin: 0 0 6px; color: var(--ink); }
@media (max-width: 640px) {
  .docp { margin: 10px 0 24px; border-radius: 0; padding: 20px 16px; }
  .docp-title { text-align: left; align-items: flex-start; }
  .docp-lines th:first-child, .docp-lines td:first-child { display: none; }
  .docp-lines { font-size: 13px; }
  .docp-lines th, .docp-lines td { padding: 7px 4px; }
}
@media (max-width: 420px) {
  .docp-items th:nth-child(5), .docp-items td:nth-child(5) { display: none; }
  .docp-lines { font-size: 12px; }
}
@media print {
  .doc-page { background: #FFF; }
  .docp { box-shadow: none; margin: 0; padding: 0; max-width: none; border-radius: 0; }
  .docp-lines tr { break-inside: avoid; }
  .docp-stamp { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.kpis-6 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpis-6 .kpi { padding: 14px 12px; gap: 10px; }
.kpis-6 .kpi .tile { width: 40px; height: 40px; }

/* v2.4 roles & access, company profile */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; margin: 0; border-radius: 999px; background: #CBD5E1; position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .3); transition: transform .15s; }
.switch input:checked { background: #16A34A; }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
.switch.changed input { box-shadow: 0 0 0 2px #F97316; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.role-card { border: 1px solid var(--line, #E2E8F0); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.role-card p { margin: 0; font-size: 13px; flex: 1; }
.role-card.role-off { background: #F8FAFC; }
.role-card.role-off strong { color: #64748B; }
.role-top, .role-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.access-grid th.c, .access-grid td.c { text-align: center; }
.access-grid td:first-child { white-space: nowrap; }
.access-grid td:first-child .dot { display: inline-block; margin-right: 8px; vertical-align: middle; }
.access-grid .muted .switch { opacity: .5; }
.favicon-prev { width: 32px; height: 32px; border-radius: 6px; border: 1px solid #E2E8F0; object-fit: contain; vertical-align: middle; }
.access-grid td:first-child, .access-grid th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
@media (max-width: 700px) {
  .access-grid .adm { display: none; }
  .access-grid th, .access-grid td { padding-left: 6px; padding-right: 6px; }
  .access-grid th { font-size: 10px; letter-spacing: 0; }
  .access-grid td:first-child { white-space: normal; min-width: 110px; font-size: 13px; }
  .access-grid td:first-child .dot { display: none; }
  .access-grid .switch input { width: 34px; height: 20px; }
  .access-grid .switch input::after { width: 14px; height: 14px; }
  .access-grid .switch input:checked::after { transform: translateX(14px); }
}

/* v2.5 client portal */
.portal-tabs { display: flex; gap: 6px; overflow-x: auto; flex: none; padding-bottom: 2px; scrollbar-width: none; }
.portal-tabs a { flex: none; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid #E2E8F0; color: #334155; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.portal-tabs a.on { background: #0F766E; border-color: #0F766E; color: #fff; }
.portal-ok summary { list-style: none; cursor: pointer; display: inline-flex; }
.portal-ok summary::-webkit-details-marker { display: none; }
.portal-ok[open] form { margin-top: 8px; min-width: 220px; }
.portal-ok .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* v2.5 forms builder */
.form-q { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-q legend { font-weight: 600; font-size: 14px; color: #334155; margin-bottom: 6px; padding: 0; }
.req { color: #DC2626; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 42px; padding: 8px 14px; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; font-weight: 600; cursor: pointer; }
.seg-rate span { min-width: 46px; }
.seg input:checked + span { background: #0F766E; border-color: #0F766E; color: #fff; }
.seg input:focus-visible + span { outline: 2px solid #2563EB; outline-offset: 2px; }
.form-build td { vertical-align: middle; }
.form-build .inline-field { width: 100%; min-width: 140px; }
@media (max-width: 700px) { .seg span { min-width: 54px; } }

/* v2.5 integrations */
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.new-key { border: 2px solid #F59E0B; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 6px 16px; }
.check-grid code, .api-help code { font-size: 12px; background: #F1F5F9; padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.wrap { word-break: break-all; }

/* v2.5 projects */
.bbar { display: inline-block; vertical-align: middle; width: 90px; height: 8px; border-radius: 99px; background: #E2E8F0; overflow: hidden; margin-right: 6px; }
.bbar span { display: block; height: 100%; background: #16A34A; border-radius: 99px; }
.bbar span.near { background: #F59E0B; }
.bbar span.over { background: #DC2626; }
td.neg, th.neg { color: #DC2626; }

/* v2.5 help */
.help-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); background: #fff; box-shadow: -12px 0 32px rgba(15, 23, 42, .18); z-index: 60; display: flex; flex-direction: column; }
.help-panel[hidden] { display: none; }
.help-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #E2E8F0; flex: none; }
.help-body { overflow-y: auto; padding: 4px 18px 20px; flex: 1; font-size: 14px; line-height: 1.55; }
.help-body h3 { margin: 14px 0 6px; font-size: 17px; }
.help-body h4 { margin: 14px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #64748B; }
.help-body ol, .help-body ul, .help-topic ol { padding-left: 20px; margin: 4px 0; }
.help-body li, .help-topic li { margin: 3px 0; }
.help-contact { margin-top: 16px; padding: 12px; background: #F1F5F9; border-radius: 10px; }
.help-contact p { margin: 4px 0; }
.help-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.help-topic[hidden] { display: none; }
@media (max-width: 400px) { .help-list { grid-template-columns: 1fr; } }

/* v2.5 business insights */
.chart-wrap { width: 100%; overflow: hidden; }
.chart { width: 100%; height: auto; display: block; font-family: inherit; }
.chart .grid-l { stroke: #E2E8F0; stroke-width: 1; }
.chart .grid-l.zero { stroke: #94A3B8; }
.chart .ax { font-size: 11px; fill: #64748B; }
.chart .s1 { fill: #2563EB; }
.chart .s2 { fill: #F59E0B; }
.chart .s3 { fill: none; stroke: #0F766E; stroke-width: 2.5; stroke-linejoin: round; }
.chart .s3d { fill: #fff; stroke: #0F766E; stroke-width: 2; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #475569; margin-top: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.s1 { background: #2563EB; } .legend i.s2 { background: #F59E0B; } .legend i.s3 { background: #0F766E; height: 3px; vertical-align: 3px; }
details.more summary { cursor: pointer; font-weight: 600; color: #2563EB; margin-top: 10px; }
th.sort-h { cursor: pointer; user-select: none; }
th.sort-h[data-dir="desc"]::after { content: " ▾"; } th.sort-h[data-dir="asc"]::after { content: " ▴"; }
.check-grid .check { flex-wrap: wrap; min-width: 0; } .check-grid code { overflow-wrap: anywhere; }
/* v2.5 phone: a table that turns into one card per row */
@media (max-width: 640px) {
  .stack-sm thead { display: none; }
  .stack-sm, .stack-sm tbody, .stack-sm tr, .stack-sm td { display: block; width: 100%; }
  .stack-sm tr { padding: 10px 0; border-top: 1px solid var(--line-2); }
  table.grid.stack-sm td { border: 0; padding: 3px 12px; white-space: normal; overflow: visible; text-overflow: clip; max-width: none; }
  table.grid.stack-sm { min-width: 0; }
  .stack-sm td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
}
/* v2.5.1 every page: a KPI row at the top stays put while the cards below scroll under it */
@media screen and (min-width: 900px) {
  .panels > .kpis { position: sticky; top: 0; z-index: 5; background: var(--bg); box-shadow: 0 14px 0 var(--bg); }
  .page-dashboard .panels > .kpis { position: static; box-shadow: none; }
}
/* v2.6 industry packs */
.module-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 0 24px; }
.module-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); min-width: 0; }
.module-list .m-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.module-list .dot { flex: none; }
.words-grid .inline-field { width: 100%; min-width: 120px; }

/* v2.7 warehouse and production */
.docp-sign { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 26px; margin-top: 28px; }
.docp-sign > div { display: flex; flex-direction: column; gap: 4px; }
.docp-line { display: block; border-bottom: 1px solid var(--ink); height: 34px; }
.docp-line-tall { height: 64px; }
.docp-stamp-delivered { color: #0F766E !important; }
.docp-stamp-not { color: #B91C1C !important; }
.mt-done .inline-field { min-width: 0; width: 100%; max-width: 220px; }
@media (max-width: 640px) { .mt-done { flex-wrap: wrap; } .mt-done .inline-field { max-width: none; } }

/* v2.8 Kenya payments and tax */
.ke-wrap, ul.tips code, .card p.muted code { overflow-wrap: anywhere; }
.ke-list li { flex-wrap: wrap; }
.ke-list li > span:first-child { flex: 1 1 220px; }
.ke-list .inline-actions { min-width: 0; max-width: 100%; }
.ke-list .inline-actions label { flex: 1 1 180px; min-width: 0; }
.ke-list .inline-actions select { width: 100%; min-width: 0; }
ul.tips { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.docp-kra { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; break-inside: avoid; }
.docp-kra-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; }
.docp-kra-txt code { word-break: break-all; font-size: 11.5px; }
.docp-qr { flex: none; width: 96px; height: 96px; }
.docp-qr svg { width: 100%; height: 100%; display: block; }
@media (max-width: 520px) { .docp-kra { flex-direction: column; align-items: flex-start; } }

/* v2.9 till, receipts, shelf labels and food safety */
.till-pick select { height: 36px; border: 1px solid #C9D6F2; border-radius: 10px; padding: 0 10px; font: inherit; background: var(--field); max-width: 180px; }
.till { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 16px; align-items: start; }
.till-items { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.till-scan input { width: 100%; height: 48px; border: 2px solid #C9D6F2; border-radius: 12px; padding: 0 14px; font: inherit; font-size: 16px; background: var(--field); }
.till-scan input:focus { border-color: #BE185D; outline: none; }
.till-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.till-cats .chip { flex: none; height: 34px; padding: 0 14px; border: 1px solid #DCE3EF; border-radius: 999px; background: #FFF; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.till-cats .chip.on { background: #BE185D; border-color: #BE185D; color: #FFF; }
.till-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; max-height: calc(100vh - 330px); min-height: 180px; overflow-y: auto; padding: 2px; }
.till-item { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 92px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #FFF; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.till-item:hover { border-color: #BE185D; box-shadow: 0 2px 8px rgba(190, 24, 93, .12); }
.till-item:active { transform: scale(.98); }
.till-item strong { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.till-item .price { font-weight: 800; color: #BE185D; }
.till-item small { color: var(--muted); font-size: 11.5px; }
.till-item.out { opacity: .5; cursor: not-allowed; }
.till-item[hidden] { display: none; }
.till-cart { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.till-lines { list-style: none; margin: 0; padding: 0; max-height: 32vh; overflow-y: auto; }
.till-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.till-lines li:first-child { border-top: 0; }
.till-lines li.empty { display: block; }
.tl-name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.tl-qty { display: inline-flex; align-items: center; gap: 2px; }
.tl-qty .btn { width: 30px; padding: 0; }
.tl-qty input { width: 54px; height: 32px; text-align: center; border: 1px solid #C9D6F2; border-radius: 8px; font: inherit; }
.tl-amt { font-weight: 700; text-align: right; min-width: 84px; font-variant-numeric: tabular-nums; }
.till-total { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-top: 2px solid var(--ink); }
.till-total strong { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.till-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.till-pay { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.till-pay .field input, .till-pay .field select { min-width: 0; width: 100%; }
.till-pay .till-mp .hint { font-size: 11px; }
.till-more summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); padding: 4px 0; }
.till-more .till-pay { margin-top: 8px; }
.till-due { min-height: 22px; font-weight: 700; font-size: 14px; }
.till-due.ok { color: #0F766E; }
.till-due.bad { color: #B91C1C; }
.till-go { height: 54px; font-size: 17px; width: 100%; background: #BE185D; border-color: #BE185D; }
.till-go:disabled { opacity: .45; cursor: not-allowed; }
.till-done { border-left: 5px solid #16A34A; }
.till-done-pending { border-left-color: #EA580C; }
.till-done .inline-actions input { height: 34px; border: 1px solid #C9D6F2; border-radius: 8px; padding: 0 10px; font: inherit; min-width: 0; max-width: 100%; }
.till-payrest { margin-top: 12px; }
.till-itemtable input, .till-itemtable select { height: 36px; border: 1px solid #C9D6F2; border-radius: 8px; padding: 0 8px; font: inherit; background: var(--field); width: 100%; min-width: 90px; }
.label-pick label.check { flex: 1 1 220px; min-width: 0; }
@media (max-width: 1100px) { .till { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); } }
@media (max-width: 899px) {
  .till { grid-template-columns: minmax(0, 1fr); }
  .till-cart { position: static; }
  .till-grid { max-height: 38vh; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .till-lines { max-height: none; }
}
@media (max-width: 420px) { .till-pay { grid-template-columns: minmax(0, 1fr); } .tl-amt { min-width: 70px; } .till-lines li { grid-template-columns: minmax(0, 1fr) auto; } .tl-amt { grid-column: 2; } .tl-qty { grid-column: 1; } }

/* Receipt: 80 mm thermal roll; prints the same on A4. */
.rcpt-page { background: #F1F5F9; }
.rcpt { width: 80mm; max-width: calc(100% - 24px); margin: 14px auto 40px; background: #FFF; padding: 14px 12px; font-size: 12.5px; line-height: 1.35; color: #000; box-shadow: 0 2px 14px rgba(15, 23, 42, .08); }
.rcpt header, .rcpt footer { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; }
.rcpt-logo img { width: 48px; height: 48px; object-fit: contain; }
.rcpt-co { font-size: 15px; font-weight: 800; }
.rcpt-meta { display: flex; flex-direction: column; gap: 1px; margin: 10px 0 6px; padding: 6px 0; border-top: 1px dashed #000; border-bottom: 1px dashed #000; }
.rcpt table { width: 100%; border-collapse: collapse; }
.rcpt td { padding: 1px 0; vertical-align: top; }
.rcpt td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rcpt-sub td { color: #333; padding-bottom: 4px; }
.rcpt-tot { margin-top: 6px; border-top: 1px dashed #000; }
.rcpt-big td { font-size: 16px; font-weight: 800; padding: 6px 0; }
.rcpt-gap td { padding-top: 8px; }
.rcpt footer { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #000; }
.rcpt-by { margin-top: 6px; font-size: 10px; color: #555; }
@media print {
  @page { margin: 4mm; }
  .rcpt-page, .labels-page { background: #FFF; }
  .rcpt { box-shadow: none; margin: 0 auto; padding: 0; width: 72mm; max-width: none; }
}

/* Shelf labels */
.labels-page { background: #F1F5F9; }
.labels { display: grid; gap: 4mm; max-width: 200mm; margin: 14px auto 40px; padding: 0 12px; }
.labels-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.labels-small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.labels-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slbl { display: flex; flex-direction: column; gap: 2px; padding: 3mm; background: #FFF; border: 1px dashed #94A3B8; border-radius: 2mm; break-inside: avoid; color: #000; min-width: 0; }
.lbl-name { font-size: 12px; line-height: 1.2; overflow-wrap: anywhere; min-height: 2.4em; }
.lbl-price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.lbl-price small { font-size: 11px; font-weight: 700; }
.lbl-unit { font-size: 10px; color: #333; }
.slbl .bc { width: 100%; height: 11mm; margin-top: 2px; }
.lbl-code { font-size: 9.5px; letter-spacing: .08em; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.labels-small .lbl-price { font-size: 17px; }
.labels-small .slbl .bc { height: 9mm; }
.labels-big .lbl-name { font-size: 16px; }
.labels-big .lbl-price { font-size: 40px; }
.labels-big .slbl .bc { height: 14mm; }
@media (max-width: 640px) { .labels-shelf, .labels-small { grid-template-columns: repeat(2, minmax(0, 1fr)); } .labels-big { grid-template-columns: minmax(0, 1fr); } }
@media print { .labels { margin: 0; padding: 0; max-width: none; } .labels-shelf { grid-template-columns: repeat(3, 1fr) !important; } .labels-small { grid-template-columns: repeat(4, 1fr) !important; } .labels-big { grid-template-columns: repeat(2, 1fr) !important; } }

/* Food safety */
.fs-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.fs-unit { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-left: 5px solid #16A34A; border-radius: 12px; background: #FFF; min-width: 0; }
.fs-unit.due { border-left-color: #EA580C; }
.fs-unit.bad { border-left-color: #DC2626; background: #FFF7F7; }
.fs-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fs-last { font-size: 13px; }
.fs-unit .fs-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fs-unit .fs-form input[name=reading] { flex: 1 1 80px; min-width: 0; }
.fs-form input, .fs-form select { height: 38px; border: 1px solid #C9D6F2; border-radius: 10px; padding: 0 10px; font: inherit; background: var(--field); min-width: 0; }
.fs-form .fs-action { flex: 1 1 100%; border-color: #DC2626; }
.fs-point .fs-form { flex: 1 1 360px; min-width: 0; }
.fs-point .fs-form input[name=note] { flex: 1 1 140px; }

/* v3.0 farm, bookings and charity */
.grow { flex: 1 1 auto; min-width: 0; }
strong.neg, .neg { color: #B91C1C; }
.farm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.farm-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-left: 5px solid #15803D; border-radius: 12px; background: #FFF; color: var(--ink); text-decoration: none; min-width: 0; }
.farm-card:hover { color: var(--ink); border-color: #BBD7C4; }
.farm-card.wait { border-left-color: #EA580C; background: #FFFBF5; }
.farm-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.farm-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.farm-crop { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.farm-crop small { font-size: 12px; font-weight: 600; color: var(--muted); }
.farm-bar { display: block; height: 6px; border-radius: 999px; background: #EEF1F7; overflow: hidden; }
.farm-bar i { display: block; height: 100%; background: #15803D; border-radius: 999px; }
.farm-num { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.farm-num small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.farm-spray[hidden], .give-new[hidden] { display: none; }

.bk-term { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #EDE9FE; color: #5B21B6; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bk-term.bk-holiday { background: #FEF3C7; color: #92400E; }
.bk-term.bk-exams { background: #FEE2E2; color: #991B1B; }
.bk-term.bk-event { background: #DBEAFE; color: #1E40AF; }
.bk-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bk-dn { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.bk-day { display: flex; flex-direction: column; gap: 2px; min-height: 78px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #FFF; color: var(--ink); text-decoration: none; min-width: 0; overflow: hidden; }
.bk-day:hover { color: var(--ink); border-color: #C4B5FD; }
.bk-day.other { opacity: .45; }
.bk-day.today { border: 2px solid #6D28D9; }
.bk-day.in-term, .bk-key.in-term { background: #F5F3FF; }
.bk-day.in-holiday, .bk-key.in-holiday { background: #FFFBEB; }
.bk-day.in-exams, .bk-key.in-exams { background: #FEF2F2; }
.bk-day.in-event, .bk-key.in-event { background: #EFF6FF; }
.bk-num { font-weight: 800; }
.bk-tname { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-count { margin-top: auto; font-size: 11px; font-weight: 700; color: #6D28D9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-key { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--line); border-radius: 3px; vertical-align: -1px; margin-left: 8px; }
.bk-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.bk-col { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #FFF; min-width: 0; min-height: 140px; }
.bk-col.today { border: 2px solid #6D28D9; }
.bk-col.in-holiday { background: #FFFBEB; }
.bk-col.in-exams { background: #FEF2F2; }
.bk-head { display: flex; flex-direction: column; gap: 3px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.bk-free { font-size: 12px; color: var(--muted); }
.bk-item { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 8px; background: #F5F3FF; border-left: 3px solid #6D28D9; color: var(--ink); text-decoration: none; font-size: 12.5px; min-width: 0; overflow-wrap: anywhere; }
.bk-item:hover { background: #EDE9FE; color: var(--ink); }
.bk-time { font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .bk-week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .bk-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bk-day { min-height: 56px; padding: 4px; } .bk-tname { display: none; } }
@media (max-width: 420px) { .bk-week { grid-template-columns: minmax(0, 1fr); } .bk-col { min-height: 0; } .bk-month { gap: 2px; } .bk-count { font-size: 9.5px; } .bk-dn { font-size: 9.5px; } }

.ch-bar { display: block; height: 8px; min-width: 70px; border-radius: 999px; background: #EEF1F7; overflow: hidden; }
.ch-bar i { display: block; height: 100%; border-radius: 999px; background: #C2410C; }
.ch-bar.over i { background: #DC2626; }
.ch-months { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.ch-mo { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.ch-col { display: block; width: 100%; max-width: 38px; background: #FDBA74; border-radius: 6px 6px 0 0; }
.ch-mo small { font-size: 11px; color: var(--muted); }
.ch-grant { display: flex; flex-direction: column; gap: 6px; padding: 12px 6px; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.ch-grant:hover { background: #F7F9FD; color: var(--ink); }
.ch-gh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ch-lines { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.ch-line { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 8px; align-items: center; }
.ch-line input { height: 40px; border: 1px solid #C9D6F2; border-radius: 10px; padding: 0 12px; font: inherit; background: var(--field); min-width: 0; }
.ch-people li { justify-content: flex-start; }
.ch-session { margin-top: 12px; }
@media (max-width: 520px) { .ch-line { grid-template-columns: minmax(0, 1fr) 110px; } .ch-line .sub { grid-column: 1 / -1; } }
.don-rcpt { max-width: 640px; }
.don-rcpt .docp-brand span, .don-rcpt .docp-title span, .don-rcpt .docp-foot span { display: block; }
.don-rcpt .docp-foot { text-align: center; }
.don-body { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.don-amount { font-size: 34px; font-weight: 800; margin: 6px 0; font-variant-numeric: tabular-nums; }

/* KRA block on till receipts */
.rcpt-kra { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-top: 8px; padding-top: 6px; border-top: 1px dashed #000; text-align: center; font-size: 11px; overflow-wrap: anywhere; }
.rcpt-qr { width: 30mm; height: 30mm; margin-top: 4px; }
.rcpt-qr svg, .rcpt-qr canvas, .rcpt-qr img { width: 100%; height: 100%; }

/* v3.1 sell and reach: subscription strip, sign-up and plans, console chips, install button, offline note and toasts */
.sub-bar { flex: none; padding: 8px 24px; font-size: 13px; border-bottom: 1px solid; }
.sub-bar a { font-weight: 700; margin-left: 6px; }
.sub-bar-info { background: #EFF6FF; color: #1E3A8A; border-color: #BFDBFE; }
.sub-bar-info a { color: #1E3A8A; }
.sub-bar-warn { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.sub-bar-warn a { color: #991B1B; }
@media (max-width: 899px) { .sub-bar { padding: 8px 16px; } }

.side-foot { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 0 10px 12px; }
.side-foot:empty { display: none; }
.side-install { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--navy-line); border-radius: 8px; background: var(--navy-2); color: #FFF; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.side-install:hover { background: var(--navy-on); }
.side-install[hidden], .net-state[hidden] { display: none; }
.net-state { display: block; padding: 8px 12px; border-radius: 8px; background: #DCFCE7; color: #14532D; font-size: 12px; font-weight: 700; }
.net-state.off { background: #FEF3C7; color: #78350F; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px; background: var(--ink); color: #FFF; font-size: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); }
form.queued .btn { background: #FEF3C7; color: #78350F; border-color: #FCD34D; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth-alt { margin: 0; text-align: center; }
.signup-card { max-width: 560px; gap: 16px; }
.signup-card .form-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.signup-points { margin: 0; padding-left: 20px; color: #C3CDE6; font-size: 15px; line-height: 1.6; display: flex; flex-direction: column; gap: 6px; }
@media screen and (min-width: 900px) {
  .auth-signup { height: 100vh; overflow: hidden; flex-wrap: nowrap; }
  .auth-signup .auth-hero { flex: 0 1 44%; overflow: hidden; }
  .auth-signup .auth-panel { flex: 1 1 56%; height: 100vh; overflow-y: auto; align-items: flex-start; overscroll-behavior: contain; }
}
@media (max-width: 899px) {
  .auth-signup .auth-hero { padding: 28px 20px; gap: 24px; }
  .auth-signup .auth-hero h1 { font-size: 28px; }
  .auth-signup .auth-panel { padding: 20px 12px 40px; }
  .signup-card { padding: 24px 16px; }
}
.plan-pick { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.plan-pick legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.cycle-pick { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.cycle-pick label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-weight: 600; }
.plan-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid #C9D6F2; border-radius: 12px; background: #FFF; cursor: pointer; }
.plan-card:has(input:checked) { border: 2px solid var(--blue); padding: 11px 13px; background: #F5F8FF; }
.plan-card input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.plan-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-price { font-weight: 800; color: var(--blue); }
.plan-price [data-cycle="year"] { display: none; }
.plan-pick:has(input[name="cycle"][value="year"]:checked) .plan-price [data-cycle="year"] { display: inline; }
.plan-pick:has(input[name="cycle"][value="year"]:checked) .plan-price [data-cycle="month"] { display: none; }
.kpi .k-pill .pill { font-size: 13px; }
.pay-box { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #FAFBFE; margin-bottom: 12px; }
.pay-line { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 800; }
.mini-h { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }
.row .r-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.start-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.start-list li a { font-weight: 600; margin-right: 8px; }
.start-list li.done a { color: var(--muted); text-decoration: line-through; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid #DCE3EF; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; background: #FFF; }
.chip:hover { color: var(--ink); background: #F1F4FA; }
.chip.on { background: var(--blue); border-color: var(--blue); color: #FFF; }
.plans-edit .inline-field { width: 100%; min-width: 120px; }
.plans-edit .num-in { min-width: 90px; text-align: right; }
.wa-tpls .sub { overflow-wrap: anywhere; }
.terms-page, .offline-page { background: var(--bg); padding: 0 16px; }
.terms-h { font-size: 17px; margin: 22px 0 6px; }
.offline-h { font-size: 24px; margin: 22px 0 8px; }
.offline-list { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; }
@media (max-width: 700px) {
  .docp { padding: 22px 16px; }
  .pay-box .attach-form { flex-wrap: wrap; }
}
/* v3.1: smallest phones (320px) */
.auth-panel, .auth-card, .pay-box { min-width: 0; }
.pay-box, .auth-card { overflow-wrap: anywhere; }
@media (max-width: 360px) {
  .auth-panel { padding: 32px 12px; }
  .auth-card { padding: 28px 20px; }
  .pay-box { padding: 12px 10px; }
  .pay-box input, .pay-box .btn { max-width: 100%; }
}
/* v3.2 People & Payroll, Accounts */
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; align-items: end; }
.bank-pick, .report-pick { margin: 0 0 14px; }
details.remit { display: inline-block; max-width: 100%; }
details.remit[open] { display: block; flex-basis: 100%; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #F8FAFD; }
details.remit > summary { list-style: none; display: inline-flex; }
details.remit > summary::-webkit-details-marker { display: none; }
details.remit[open] > summary { margin-bottom: 10px; }
.file-list li:has(details[open]) { flex-wrap: wrap; }
.bank-lines { list-style: none; margin: 0; padding: 0; }
.bank-lines li { padding: 12px 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.bl-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; min-width: 0; }
.bl-head > span { min-width: 0; overflow-wrap: anywhere; }
.bl-head .sub { display: inline; }
.bl-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.bl-acts .btn { white-space: normal; text-align: left; }
.amt-in { color: #15803D; white-space: nowrap; }
.amt-out { color: #B91C1C; white-space: nowrap; }
table.fin { width: 100%; max-width: 640px; }
table.fin td.num { text-align: right; white-space: nowrap; }
table.fin .fin-sec th { text-align: left; padding-top: 18px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
table.fin .fin-tot td { font-weight: 700; border-top: 1px solid var(--ink); }
table.fin .fin-grand td { font-weight: 800; font-size: 16px; border-top: 2px solid var(--ink); }
.jl-table select, .jl-table input { width: 100%; min-width: 0; height: 40px; border: 1px solid #C9D6F2; border-radius: 10px; padding: 0 10px; font: inherit; background: var(--field); }
.jl-table td { padding: 6px; }
.jl-table td:first-child { min-width: 220px; }
.jl-table input[type=number] { text-align: right; min-width: 100px; }
.jl-table .jl-off { color: #B91C1C; }
@media (max-width: 700px) {
  table.grid.jl-table { min-width: 0; }
  .jl-table, .jl-table tbody, .jl-table tfoot { display: block; width: 100%; }
  .jl-table thead { display: none; }
  .jl-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line-2); }
  .jl-table td { display: block; padding: 0; border: 0; }
  .jl-table td:first-child, .jl-table td:last-child { grid-column: 1 / -1; min-width: 0; }
  .jl-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
  .jl-table tfoot tr { grid-template-columns: repeat(3, 1fr); }
  .jl-table tfoot th { text-align: left; }
  .bl-head { flex-direction: column; gap: 2px; }
}
/* Payslip */
.slip-who { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.slip-who > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.slip-who span { color: var(--muted); }
.slip-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 10px; }
.slip-tab { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.slip-tab th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 7px 4px; }
.slip-tab td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.slip-tab .num { text-align: right; white-space: nowrap; }
.slip-tab .tot td { font-weight: 800; border-bottom: 0; border-top: 1px solid var(--ink); }
.slip-small { font-size: 13px; }
.slip-net { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0; padding: 14px 16px; border-radius: 12px; background: #F4F6FB; font-size: 18px; }
.slip-net strong { font-size: 22px; color: var(--brand, var(--ink)); }
.slip-ytd { margin-top: 18px; }
.slip-ytd td { width: 16.6%; vertical-align: top; }
@media (max-width: 520px) {
  .slip-ytd tbody tr { display: grid; grid-template-columns: repeat(3, 1fr); }
  .slip-ytd td { width: auto; }
}
@media print {
  .slip { break-after: page; }
  .slip:last-of-type { break-after: auto; }
  .slip-net { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
table.grid.fin { min-width: 0; }
details.remit:not([open]) > form { display: none; }
details.remit .form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.count > span:last-child { min-width: 0; }
.count small, .count strong { overflow-wrap: anywhere; }

/* v3.2.1 Demo access box above the sign-in card */
.auth-stack { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.demo-box { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid #93B4F5; border-radius: 12px; background: #EEF4FF; color: #1D4ED8; font-size: 14px; overflow-wrap: anywhere; }
.demo-box strong { font-size: 15px; color: #1E3A8A; }
.demo-box code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: #0F172A; }
.demo-box small { font-size: 12px; margin-top: 2px; }

/* v3.2.2 Also by Build Your Name cards on the sign-in page */
.also-by { margin-top: 36px; max-width: 920px; }
.also-by-title { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8B9AC0; margin-bottom: 12px; }
.also-by-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 620px; }
@media (min-width: 1600px) { .also-by-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; } }
@media (max-width: 600px) { .also-by { margin-top: 28px; } .also-by-grid { gap: 8px; } .also-card { padding: 10px 10px 11px; } .also-card strong { font-size: 13px; } .also-card span { display: none; } }
.also-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 16px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .1); border-top: 3px solid var(--c); background: rgba(255, 255, 255, .04); min-width: 0; }
.also-card strong { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #FFF; }
.also-card strong i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.also-card span { font-size: 13px; line-height: 1.45; color: #C3CDE6; }
