/* E. Grech Cristal Bath: showroom desk preview. Tokens are documented in DESIGN.md. */
@font-face { font-family: 'Geist'; src: url('/fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #F3F4F8;
  --surface: #FFFFFF;
  --surface-2: #F7F8FB;
  --ink: #0E1330;
  --ink-2: #454E68;
  --ink-3: #5F6882;
  --line: rgba(14, 19, 48, 0.10);
  --line-strong: rgba(14, 19, 48, 0.18);
  --brand: #0B1A8A;
  --brand-hover: #1527A6;
  --brand-wash: rgba(11, 26, 138, 0.07);
  --brand-wash-2: rgba(11, 26, 138, 0.13);
  --ok: #17703F; --ok-wash: #E4F3EA;
  --warn: #8A5300; --warn-wash: #FBF0DC;
  --bad: #B42318; --bad-wash: #FCE9E7;
  --shadow: rgba(14, 19, 48, 0.16);
  --r-ctl: 10px;
  --r-card: 16px;
  --side: 248px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-tabs: 20; --z-scrim: 30; --z-drawer: 31; --z-modal: 40; --z-toast: 50; --z-intro: 70; --z-badge: 80;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons, chips, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 0; border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: none; }
.btn--primary:hover { background: var(--brand-hover); }
.btn--ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn--ghost:hover { background: var(--brand-wash); color: var(--ink); }
.btn--danger { color: var(--bad); }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 0 22px; font-size: 16px; }
.btn--icon { width: 40px; padding: 0; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.chip--demo { background: var(--warn-wash); color: var(--warn); box-shadow: none; }
.chip--request { background: var(--brand-wash); color: var(--brand); box-shadow: none; }
.chip--sent { background: var(--warn-wash); color: var(--warn); box-shadow: none; }
.chip--accepted, .chip--paid, .chip--done { background: var(--ok-wash); color: var(--ok); box-shadow: none; }
.chip--invoiced { background: var(--brand-wash-2); color: var(--brand); box-shadow: none; }
.chip--declined { background: var(--surface-2); color: var(--ink-3); }
.chip--overdue { background: var(--bad-wash); color: var(--bad); box-shadow: none; }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field .help { font-size: 12.5px; color: var(--ink-3); }
.field .err { font-size: 12.5px; color: var(--bad); }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 0; border-radius: var(--r-ctl);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--bad); }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--ink-3); width: 18px; height: 18px; }
.search .input { padding-left: 38px; }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-weight: 500; white-space: nowrap; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.seg button .n { font-size: 12px; opacity: 0.75; }

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: var(--z-intro);
  display: grid; grid-template-columns: minmax(0, 1fr);
  background: var(--surface); overflow-y: auto;
}
.intro__copy { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 40px 20px 24px; }
.intro__logo { width: 190px; height: auto; margin-bottom: 18px; }
.intro__title { font-size: clamp(2.2rem, 5vw, 4.2rem); font-weight: 650; letter-spacing: -0.035em; line-height: 1.02; max-width: 14ch; text-wrap: balance; }
.intro__title em { font-style: normal; color: var(--brand); }
.intro__sub { max-width: 44ch; color: var(--ink-2); font-size: 1.08rem; }
.intro__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 6px; }
.intro__note { color: var(--ink-3); font-size: 14px; }
.intro__media { position: relative; min-height: 300px; margin: 0 20px 90px; }
.intro__img { position: absolute; border-radius: var(--r-card); object-fit: cover; box-shadow: 0 30px 60px -30px var(--shadow); }
.intro__img--a { inset: 0 18% 14% 0; width: 82%; height: 86%; }
.intro__img--b { right: 0; bottom: 0; width: 46%; height: 52%; outline: 6px solid var(--surface); }
@media (min-width: 960px) {
  .intro { grid-template-columns: 5fr 6fr; }
  .intro__copy { padding: 64px 40px 64px max(48px, 6vw); }
  .intro__media { margin: 48px 48px 48px 0; min-height: 0; }
}

/* ---------- app shell ---------- */
.app { min-height: 100dvh; }
.side { display: none; }
.main { min-width: 0; padding-bottom: 96px; }
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  min-height: 60px; padding: 10px 16px;
  background: rgba(243, 244, 248, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top__emblem { width: 34px; height: 34px; border-radius: 8px; }
.top__title { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; margin-right: auto; }
.top__new span { display: none; }
.top__new { width: 40px; padding: 0; }
.view { padding: 18px 16px 24px; outline: none; }
.foot { padding: 0 16px 24px; color: var(--ink-3); font-size: 12.5px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-tabs);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabs a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: var(--r-ctl); color: var(--ink-3); font-size: 11px; font-weight: 500; text-decoration: none; }
.tabs a svg { width: 22px; height: 22px; }
.tabs a[aria-current="page"] { color: var(--brand); background: var(--brand-wash); }
.dot-count:empty { display: none; }
.dot-count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-style: normal; font-size: 11px; line-height: 18px; text-align: center; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
  .side {
    position: sticky; top: 0; height: 100dvh;
    display: flex; flex-direction: column; gap: 28px;
    padding: 22px 14px 64px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .side__brand img { width: 190px; height: auto; margin: 4px 8px 0; }
  .side__nav { display: grid; gap: 2px; }
  .side__nav a {
    display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px;
    border-radius: var(--r-ctl); color: var(--ink-2); font-weight: 500; text-decoration: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
  }
  .side__nav a:hover { background: var(--surface-2); color: var(--ink); }
  .side__nav a[aria-current="page"] { background: var(--brand-wash); color: var(--brand); }
  .side__nav .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--brand); }
  .side__shop { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
  .side__shop-name { color: var(--ink); font-weight: 600; margin-bottom: 2px; }
  .main { padding-bottom: 0; }
  .top { padding: 14px 32px; min-height: 72px; }
  .top__emblem { display: none; }
  .top__title { font-size: 22px; }
  .top__new { width: auto; padding: 0 16px; }
  .top__new span { display: inline; }
  .view { padding: 28px 32px 32px; }
  .foot { padding: 0 32px 28px; }
  .tabs { display: none; }
}

/* ---------- shared blocks ---------- */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); }
.card__head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; }
.card__head h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-right: auto; }
.card__body { padding: 0 18px 18px; }
.muted { color: var(--ink-3); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .search { flex: 1 1 240px; }
.toolbar .seg { flex: 0 1 auto; max-width: 100%; }

.empty { display: grid; justify-items: center; gap: 8px; padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty svg { width: 32px; height: 32px; color: var(--brand); opacity: 0.7; }
.empty strong { color: var(--ink); font-weight: 600; }

/* rows: lists of quotes, customers, follow-ups */
.rows { display: grid; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 14px;
  width: 100%; padding: 14px 18px; border: 0; background: transparent; text-align: left; cursor: pointer;
  border-top: 1px solid var(--line);
  transition: background 0.15s var(--ease);
}
.rows > .row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row__main { min-width: 0; }
.row__title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta { display: block; color: var(--ink-3); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__side { display: grid; justify-items: end; gap: 4px; }
.row__amount { font-weight: 600; }

/* ---------- dashboard ---------- */
.hello { margin-bottom: 18px; }
.hello h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 650; letter-spacing: -0.03em; }
.hello p { color: var(--ink-2); margin-top: 2px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi {
  display: grid; gap: 6px; padding: 16px; border: 0; text-align: left; cursor: pointer;
  border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.kpi:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-strong), 0 14px 30px -20px var(--shadow); }
.kpi__label { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.kpi__label svg { width: 18px; height: 18px; color: var(--brand); }
.kpi__value { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.kpi__hint { color: var(--ink-3); font-size: 13px; }
.kpi--brand { background: var(--brand); box-shadow: none; color: #fff; }
.kpi--brand .kpi__label, .kpi--brand .kpi__hint, .kpi--brand .kpi__label svg { color: rgba(255, 255, 255, 0.82); }
.dash { display: grid; gap: 16px; }
@media (min-width: 1100px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .dash__col { display: grid; gap: 16px; }
}
.dash__col { display: grid; gap: 16px; }

.pipe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .pipe { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pipe button {
  display: grid; gap: 2px; padding: 12px; border: 0; border-radius: 12px; text-align: left; cursor: pointer;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.pipe button:hover { box-shadow: inset 0 0 0 1px var(--brand); }
.pipe strong { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.pipe span { font-size: 12.5px; color: var(--ink-3); }
.pipe em { font-style: normal; font-size: 12.5px; color: var(--ink-2); }

.today { display: grid; gap: 10px; }
.today__item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.today__slot { display: grid; place-items: center; height: 44px; border-radius: 12px; background: var(--brand-wash); color: var(--brand); font-weight: 600; font-size: 13px; }

.ranges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.range { position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 4 / 3; background: var(--surface-2); }
.range img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.range:hover img { transform: scale(1.04); }
.range span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; color: #fff; font-size: 13px; font-weight: 600; background: linear-gradient(transparent, rgba(8, 12, 40, 0.72)); }
@media (min-width: 640px) { .ranges { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- quote editor (drawer) ---------- */
.scrim { position: fixed; inset: 0; z-index: var(--z-scrim); background: rgba(14, 19, 48, 0.34); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-drawer);
  display: flex; flex-direction: column;
  width: min(100%, 640px); background: var(--bg);
  box-shadow: -30px 0 60px -30px var(--shadow);
}
.drawer__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; margin-right: auto; }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; overscroll-behavior: contain; }
.drawer__foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.drawer__foot .spacer { margin-right: auto; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.steps span { display: grid; gap: 6px; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.steps span::before { content: ''; height: 4px; border-radius: 999px; background: var(--line-strong); }
.steps span.is-on { color: var(--brand); }
.steps span.is-on::before { background: var(--brand); }
.grid2 { display: grid; gap: 12px; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.lines { display: grid; }
.line { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; }
.line img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.line__name { font-weight: 600; font-size: 14.5px; }
.line__brand { color: var(--ink-3); font-size: 13px; }
.line__ctrl { display: flex; align-items: flex-end; gap: 6px 8px; margin-top: 8px; flex-wrap: wrap; }
.line__ctrl .input { width: 64px; min-height: 36px; padding: 5px 8px; }
.line__ctrl .price { width: 96px; }
.mini { display: grid; gap: 2px; font-size: 12px; color: var(--ink-3); }
.line__total { margin-left: auto; padding-bottom: 7px; font-weight: 600; text-align: right; }
.totals { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-strong); }
.totals div { display: flex; justify-content: space-between; color: var(--ink-2); }
.totals .grand { color: var(--ink); font-size: 18px; font-weight: 650; }

/* ---------- product picker ---------- */
.picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .picker { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.prod {
  display: grid; gap: 6px; padding: 8px 8px 12px; border: 0; border-radius: 14px; text-align: left; cursor: pointer;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
}
.prod:hover { box-shadow: inset 0 0 0 2px var(--brand); }
.prod:active { transform: scale(0.98); }
.prod img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.prod b { font-size: 13.5px; font-weight: 600; line-height: 1.3; padding: 0 4px; }
.prod span { font-size: 12.5px; color: var(--ink-3); padding: 0 4px; }
.prod.is-added { box-shadow: inset 0 0 0 2px var(--ok); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: end center; padding: 0; background: rgba(14, 19, 48, 0.38); }
.modal__box {
  width: 100%; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 20px 20px 0 0; box-shadow: 0 -20px 60px -20px var(--shadow);
}
@media (min-width: 720px) {
  .modal { place-items: center; padding: 24px; }
  .modal__box { width: min(100%, 620px); border-radius: 20px; }
  .modal__box.is-wide { width: min(100%, 860px); }
}
.modal__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; margin-right: auto; }
.modal__body { display: grid; gap: 14px; padding: 16px; }
.modal__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); position: sticky; bottom: 0; }

.bubble { justify-self: end; max-width: 92%; padding: 12px 14px; border-radius: 14px 14px 4px 14px; background: #DCF3D6; color: #0F2A12; white-space: pre-wrap; font-size: 14.5px; box-shadow: 0 6px 16px -10px var(--shadow); }
.bubble-wrap { display: grid; padding: 18px 14px; border-radius: var(--r-card); background: #EFEAE2; }
.note { padding: 10px 12px; border-radius: var(--r-ctl); background: var(--warn-wash); color: var(--warn); font-size: 13.5px; }

/* invoice sheet */
.sheet { padding: 22px; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 18px; }
.sheet__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.sheet__top img { width: 180px; height: auto; }
.sheet__from { font-size: 13px; color: var(--ink-2); text-align: right; }
.sheet__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.sheet__meta div { display: grid; gap: 2px; font-size: 13px; color: var(--ink-3); }
.sheet__meta b { color: var(--ink); font-size: 14.5px; font-weight: 600; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 500; padding: 0 0 8px; }
.sheet td { padding: 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.sheet td:last-child, .sheet th:last-child { text-align: right; }
.sheet td.q { width: 56px; color: var(--ink-2); }

/* ---------- customers ---------- */
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-wash); color: var(--brand); font-weight: 650; font-size: 14px; }
.row--person { grid-template-columns: 40px minmax(0, 1fr) auto; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.facts div { padding: 12px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.facts span { display: block; font-size: 12.5px; color: var(--ink-3); }
.facts b { font-weight: 600; }
.timeline { display: grid; gap: 0; }
.timeline li { list-style: none; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.timeline li:first-child { border-top: 0; }
.timeline svg { width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }
.timeline p { font-size: 14px; }
.timeline small { color: var(--ink-3); font-size: 12.5px; }

/* ---------- deliveries ---------- */
.week { display: grid; gap: 12px; }
.weekhead { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.weekhead h2 { font-size: 17px; font-weight: 600; margin-right: auto; }
.day { padding: 12px; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 8px; align-content: start; }
.day.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.day__head { display: flex; align-items: baseline; gap: 8px; }
.day__head b { font-weight: 650; }
.day__head span { color: var(--ink-3); font-size: 13px; }
.day__empty { color: var(--ink-3); font-size: 13px; padding: 6px 0; }
.drop { display: grid; gap: 4px; padding: 10px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.drop.is-done { opacity: 0.6; }
.drop__top { display: flex; align-items: center; gap: 6px; }
.drop__top b { font-weight: 600; font-size: 14px; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop p { font-size: 13px; color: var(--ink-2); }
.drop .btn { justify-self: start; margin-top: 4px; }
@media (min-width: 1100px) {
  .week { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .day { min-height: 260px; }
}

/* ---------- follow-ups ---------- */
.fu-group h3 { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 18px 4px 8px; }
.fu-group:first-child h3 { margin-top: 0; }
.fu { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); align-items: start; }
.fu:first-child { border-top: 0; }
.fu__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-wash); color: var(--brand); }
.fu__icon.is-bad { background: var(--bad-wash); color: var(--bad); }
.fu__text b { display: block; font-weight: 600; }
.fu__text p { color: var(--ink-2); font-size: 14px; }
.fu__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- toasts, badge ---------- */
.toasts { position: fixed; left: 50%; top: 14px; z-index: var(--z-toast); translate: -50% 0; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 16px 30px -14px var(--shadow); animation: toast-in 0.35s var(--ease); }
.toast svg { width: 18px; height: 18px; color: #9FE0B8; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }

.badge {
  position: fixed; left: 16px; bottom: 16px; z-index: var(--z-badge);
  display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 14px 30px -14px var(--shadow);
  color: var(--ink-2); font-size: 12.5px;
}
.badge a { text-decoration: none; }
.badge strong { color: var(--ink); font-weight: 600; }
.badge__close { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 999px; background: var(--brand-wash); cursor: pointer; }
.badge__close svg { width: 14px; height: 14px; }
.badge.is-hidden { display: none; }
/* on phones the app's tab bar owns the bottom edge */
@media (max-width: 899px) {
  .app:not([hidden]) ~ .badge { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .has-layer .badge { display: none; }
}

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