:root {
  --bg: #f5efe3;
  --surface: #ffffff;
  --surface-2: #fbf8f1;
  --primary: #1f7a4d;
  --primary-dark: #155c39;
  --primary-soft: #e7f2ea;
  --accent: #e08a1e;
  --accent-soft: #fbeed8;
  --danger: #c0392b;
  --danger-soft: #fbe9e7;
  --text: #20261d;
  --muted: #6f7568;
  --border: #e6dECB;
  --border-strong: #d9cfb6;
  --shadow: 0 2px 10px rgba(60, 50, 20, 0.08);
  --shadow-lg: 0 6px 22px rgba(60, 50, 20, 0.13);
  --radius: 18px;
  --radius-sm: 12px;
  --tap: 54px;
  --topbar-h: 58px;
  --bottombar-h: 72px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ── Top bar ───────────────────────────────────────────── */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; padding-top: env(safe-area-inset-top);
  background: var(--primary); color: #fff;
  box-shadow: var(--shadow); z-index: 50;
}
#topbar-title {
  flex: 1; font-weight: 800; font-size: 19px; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.topbar-back, .topbar-search {
  width: 42px; height: 42px; border: none; background: rgba(255,255,255,0.16);
  color: #fff; border-radius: 12px; font-size: 22px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-back { font-size: 30px; line-height: 1; padding-bottom: 4px; }
.topbar-back[hidden], .topbar-search[hidden] { display: none; }
.topbar-search { font-size: 18px; }

/* ── Main area ─────────────────────────────────────────── */
#app {
  padding: 14px 14px calc(var(--bottombar-h) + 24px);
  padding-top: calc(var(--topbar-h) + 14px + env(safe-area-inset-top));
  min-height: 100vh;
  max-width: 640px; margin: 0 auto;
}
.loading { text-align: center; color: var(--muted); padding: 60px 0; font-weight: 600; }
.error-msg { text-align: center; color: var(--danger); padding: 50px 18px; font-weight: 600; }

/* ── Bottom nav ────────────────────────────────────────── */
#bottombar {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottombar-h);
  display: flex; background: var(--surface);
  border-top: 1px solid var(--border); z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.bar-btn {
  flex: 1; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-family: inherit; font-weight: 700; position: relative;
  padding-top: 6px;
}
.bar-ic { font-size: 23px; line-height: 1; }
.bar-lbl { font-size: 12.5px; }
.bar-btn.active { color: var(--primary); }
.bar-btn.active .bar-ic { transform: translateY(-1px); }
.bar-badge {
  position: absolute; top: 4px; left: 50%; margin-left: 6px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px;
  align-items: center; justify-content: center;
  display: none;
}
.bar-badge:not([hidden]) { display: flex; }

/* ── Home ──────────────────────────────────────────────── */
.home-greeting { margin: 2px 2px 16px; }
.home-hello { font-size: 15px; color: var(--muted); font-weight: 600; }
.home-store { font-size: 25px; font-weight: 800; line-height: 1.2; margin-top: 2px; }

.promo-slot {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: var(--radius); padding: 18px 18px;
  margin-bottom: 18px; box-shadow: var(--shadow); display: none;
}

.tile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 13px;
}
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px; cursor: pointer;
  display: flex; flex-direction: column; gap: 10px; min-height: 116px;
  box-shadow: var(--shadow); transition: transform 0.08s ease;
  position: relative;
}
.tile:active { transform: scale(0.97); }
.tile-ic {
  width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.tile.accent .tile-ic { background: var(--accent-soft); }
.tile-name { font-weight: 800; font-size: 17px; }
.tile-sub { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: -4px; }
.tile-badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 800;
  min-width: 24px; height: 24px; border-radius: 12px; padding: 0 7px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Section list & cards ──────────────────────────────── */
.list-title { font-size: 20px; font-weight: 800; margin: 4px 2px 14px; }
.section-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px 16px; margin-bottom: 11px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; box-shadow: var(--shadow); font-weight: 700; font-size: 17px;
  min-height: var(--tap);
}
.section-row:active { background: var(--surface-2); }
.section-row .chev { color: var(--primary); font-size: 24px; font-weight: 800; }
.section-count { color: var(--muted); font-size: 14px; font-weight: 600; }

.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px; cursor: pointer;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.product-card:active { transform: scale(0.98); }
.product-card.out-of-stock { opacity: 0.55; }
.product-photo {
  width: 100%; aspect-ratio: 1/1; object-fit: contain; border-radius: 10px;
  background: var(--surface-2);
}
.product-name { font-weight: 700; font-size: 15px; margin-top: 8px; line-height: 1.3; }
.product-size { font-size: 12.5px; color: var(--muted); }
.product-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.product-price { font-weight: 800; color: var(--primary-dark); font-size: 15px; }
.product-stock { font-size: 12px; font-weight: 700; color: var(--muted); }
.product-stock.low { color: var(--accent); }
.product-out-label { font-size: 12px; font-weight: 800; color: var(--danger); }

/* ── Detail ────────────────────────────────────────────── */
.detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.detail-photo { width: 100%; aspect-ratio: 1/1; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface-2); }
.detail-name { font-size: 22px; font-weight: 800; margin-top: 14px; }
.detail-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.detail-row .label { color: var(--muted); font-weight: 600; }
.detail-row .value { font-weight: 800; }
.qty-input-wrap { margin: 16px 0 10px; }
.qty-input-wrap label { display: block; font-weight: 700; margin-bottom: 8px; }
.qty-input {
  width: 100%; height: var(--tap); border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 20px; font-family: inherit; font-weight: 700;
  text-align: center; background: var(--surface-2); color: var(--text);
}
.qty-input:focus { outline: none; border-color: var(--primary); }

/* ── Buttons ───────────────────────────────────────────── */
.action-btn {
  width: 100%; min-height: var(--tap); border: none; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; font-family: inherit; font-weight: 800;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--shadow);
}
.action-btn:active { background: var(--primary-dark); }
.action-btn:disabled { background: #b9c2b6; box-shadow: none; }
.action-btn.secondary { background: var(--surface); color: var(--primary-dark); border: 2px solid var(--border-strong); box-shadow: none; }
.action-btn.danger { background: var(--danger); }
.action-btn.accent { background: var(--accent); }
.btn-stack > * { margin-top: 11px; }

.back-row { color: var(--primary-dark); font-weight: 800; padding: 6px 2px 14px; cursor: pointer; font-size: 16px; }

/* ── Basket ────────────────────────────────────────────── */
.basket-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 11px; display: flex; gap: 12px; box-shadow: var(--shadow); }
.basket-item.unavailable { border-color: var(--danger); background: var(--danger-soft); }
.basket-photo { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.basket-info { flex: 1; min-width: 0; }
.basket-name { font-weight: 700; font-size: 16px; }
.basket-size { font-size: 13px; color: var(--muted); }
.basket-row2 { display: flex; justify-content: space-between; margin-top: 4px; font-weight: 700; }
.basket-subtotal { color: var(--primary-dark); }
.basket-actions { display: flex; gap: 8px; margin-top: 9px; }
.basket-btn { flex: 1; min-height: 40px; border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--text); }
.basket-btn.remove { color: var(--danger); border-color: var(--danger-soft); }
.basket-total-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 4px 0 14px; box-shadow: var(--shadow); }
.basket-total-row { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; }

/* ── Empty states ──────────────────────────────────────── */
.empty-state { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty-ic { font-size: 56px; }
.empty-text { font-weight: 700; font-size: 18px; margin: 14px 0 20px; color: var(--text); }

/* ── Orders ────────────────────────────────────────────── */
.subhead { font-size: 14px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin: 18px 2px 10px; }
.order-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 15px; margin-bottom: 11px; cursor: pointer; box-shadow: var(--shadow); }
.order-row:active { background: var(--surface-2); }
.order-top { display: flex; justify-content: space-between; align-items: center; }
.order-num { font-weight: 800; font-size: 17px; }
.order-date { font-size: 13px; color: var(--muted); margin-top: 3px; }
.order-total { font-weight: 800; color: var(--primary-dark); }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 800; margin-top: 8px; }
.status-pending { background: var(--accent-soft); color: #9a5d00; }
.status-confirmed, .status-out_for_delivery { background: #e3eefc; color: #1d5bb0; }
.status-delivered, .status-partially_delivered { background: var(--primary-soft); color: var(--primary-dark); }
.status-denied, .status-cancelled_by_store, .status-cancelled_by_company, .status-issue_reported { background: var(--danger-soft); color: var(--danger); }

/* ── Cards / generic ───────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 13px; }
.card-title { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.card-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); }
.card-row:last-child { border-bottom: none; }
.card-row .k { color: var(--muted); font-weight: 600; }
.card-row .v { font-weight: 700; text-align: right; }
.muted-note { color: var(--muted); font-size: 14px; font-weight: 600; }

/* ── Announcements ─────────────────────────────────────── */
.ann-card { background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--primary); border-radius: var(--radius-sm); padding: 14px 15px; margin-bottom: 12px; box-shadow: var(--shadow); }
.ann-card.admin { border-left-color: var(--accent); }
.ann-src { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.ann-src.admin { color: #9a5d00; }
.ann-text { margin-top: 6px; white-space: pre-wrap; line-height: 1.5; }
.ann-date { font-size: 12px; color: var(--muted); margin-top: 9px; }

/* ── Agents ────────────────────────────────────────────── */
.agent-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 15px; margin-bottom: 11px; box-shadow: var(--shadow); }
.agent-co { font-weight: 800; font-size: 17px; }
.agent-name { color: var(--primary-dark); font-weight: 700; margin-top: 4px; }
.agent-pick { display: flex; flex-direction: column; gap: 9px; margin-top: 11px; }
.agent-opt { width: 100%; min-height: 48px; border: 2px solid var(--border-strong); background: var(--surface-2); border-radius: 12px; font-family: inherit; font-weight: 700; font-size: 16px; cursor: pointer; color: var(--text); }
.agent-opt:active { border-color: var(--primary); }
.chip { display: inline-block; background: var(--primary-soft); color: var(--primary-dark); font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 20px; }
.agent-remove-btn { width: 100%; min-height: 40px; margin-top: 11px; border: 1px solid var(--danger-soft); background: var(--danger-soft); color: var(--danger); border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }

/* ── Contact / textarea ────────────────────────────────── */
.ta {
  width: 100%; min-height: 130px; border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 14px; font-family: inherit; font-size: 17px;
  background: var(--surface); color: var(--text); resize: vertical;
}
.ta:focus { outline: none; border-color: var(--primary); }

/* ── Toast ─────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottombar-h) + 16px); transform: translateX(-50%);
  background: #2c2c2c; color: #fff; padding: 13px 20px; border-radius: 14px;
  font-weight: 700; z-index: 100; box-shadow: var(--shadow-lg); max-width: 90%; text-align: center;
}
.toast.success { background: var(--primary-dark); }
.toast.error { background: var(--danger); }

/* ── Supervisor map (preserved from prior build) ───────── */
#supmap-wrap { position: fixed; inset: 0; display: flex; flex-direction: column; }
#supmap-header { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--primary); color: #fff; flex-shrink: 0; }
.supmap-back-btn { border: none; background: rgba(255,255,255,0.18); color: #fff; font-family: inherit; font-weight: 700; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
#supmap-title { font-weight: 800; }
#supmap { flex: 1; position: relative; z-index: 0; }
.supmap-panel { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 20px 20px 0 0; padding: 18px; box-shadow: var(--shadow-lg); z-index: 1200; max-height: 70vh; overflow-y: auto; }
.supmap-panel-close { position: absolute; top: 12px; right: 14px; border: none; background: var(--surface-2); width: 36px; height: 36px; border-radius: 18px; font-size: 18px; cursor: pointer; }
.supmap-panel-title { font-weight: 800; font-size: 19px; }
.supmap-panel-row { margin-top: 7px; }
.supmap-panel-items { margin: 12px 0; padding-left: 18px; }
.supmap-panel-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.supmap-act-btn { min-height: 50px; border: none; border-radius: 12px; font-family: inherit; font-weight: 800; font-size: 16px; cursor: pointer; color: #fff; }
.supmap-act-btn.deliver { background: var(--primary); }
.supmap-act-btn.notdeliver { background: var(--danger); }
.supmap-act-btn.change { background: var(--accent); }
.supmap-red-marker, .supmap-me-marker { background: none; border: none; }
.supmap-pin { width: 22px; height: 22px; background: var(--danger); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--danger); }
.supmap-me-dot { width: 18px; height: 18px; background: #1d5bb0; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #1d5bb0; }
.supmap-recenter-btn { position: fixed; right: 14px; bottom: 90px; width: 52px; height: 52px; border-radius: 26px; border: none; background: var(--surface); font-size: 24px; box-shadow: var(--shadow-lg); cursor: pointer; z-index: 1100; }
.supmap-loc-note { position: fixed; left: 12px; right: 12px; top: 66px; background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 12px; font-weight: 700; z-index: 1100; }
.supmap-loc-note-x { float: right; cursor: pointer; font-weight: 800; }
.qty-btn { width: 38px; height: 38px; border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: 10px; font-size: 20px; font-weight: 800; cursor: pointer; }
.qty-remove { color: var(--danger); }
.qty-stepper { display: flex; align-items: center; gap: 10px; }
.chev { color: var(--primary); font-size: 24px; font-weight: 800; flex-shrink: 0; }

.chat-open-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--primary); border-radius: var(--radius-sm); padding: 15px; box-shadow: var(--shadow); cursor: pointer; }
.chat-open-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--primary); flex-shrink: 0; box-shadow: 0 0 0 4px var(--primary-soft); }
.chat-open-body { flex: 1; }
.chat-open-title { font-weight: 800; }
.chat-open-sub { color: var(--muted); font-size: 13.5px; font-weight: 600; margin-top: 2px; }

.thread-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 15px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: pointer; }
.thread-card-main { flex: 1; min-width: 0; }
.thread-card-prev { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-card-meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.chat-msgs { display: flex; flex-direction: column; padding-bottom: 78px; }
.chat-msgs.readonly { padding-bottom: 24px; }
.chat-empty { text-align: center; color: var(--muted); font-weight: 600; padding: 40px 18px; }

.chat-bubble { max-width: 82%; padding: 9px 13px; border-radius: 16px; margin-bottom: 9px; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.chat-bubble.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 5px; }
.chat-bubble.them { align-self: flex-start; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.chat-bubble-text { white-space: pre-wrap; line-height: 1.4; }
.chat-bubble-time { font-size: 11px; margin-top: 4px; opacity: 0.75; text-align: right; }
.chat-bubble.them .chat-bubble-time { color: var(--muted); }

.chat-closed-banner { align-self: stretch; text-align: center; color: var(--muted); font-weight: 700; font-size: 13.5px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 12px; padding: 10px 14px; margin: 14px 0; }

.chat-inputbar { position: fixed; left: 0; right: 0; bottom: var(--bottombar-h); max-width: 640px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--border); z-index: 60; }
.chat-input { flex: 1; min-height: 44px; max-height: 120px; border: 2px solid var(--border-strong); border-radius: 14px; padding: 10px 12px; font-family: inherit; font-size: 16px; background: var(--surface); color: var(--text); resize: none; line-height: 1.35; }
.chat-input:focus { outline: none; border-color: var(--primary); }
.chat-send-btn { flex-shrink: 0; width: 46px; height: 46px; border: none; border-radius: 23px; background: var(--primary); color: #fff; font-size: 20px; cursor: pointer; }
.chat-send-btn:disabled { opacity: 0.5; }
.chat-finish-btn { flex-shrink: 0; width: 46px; height: 46px; border: none; border-radius: 23px; background: var(--danger-soft); color: var(--danger); font-size: 18px; cursor: pointer; }
/* ── Borrow / debt ─────────────────────────────────────────────── */
.borrow-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 11px; }
.borrow-toggle .bt-label { font-weight: 700; color: var(--text); }
.borrow-toggle .bt-sub { font-size: 12px; color: #8a8f82; margin-top: 2px; }
.switch { position: relative; width: 50px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #cfd3c8; border-radius: 28px; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(22px); }
.borrow-picked { background: var(--primary-soft); border: 1px solid var(--primary); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 11px; font-weight: 700; color: var(--primary-dark); display: flex; justify-content: space-between; align-items: center; }
.borrow-picked .bp-change { font-size: 13px; color: var(--primary); cursor: pointer; font-weight: 600; }
.debt-badge { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.debt-badge.unpaid { background: var(--danger-soft); color: var(--danger); }
.debt-badge.paid { background: var(--primary-soft); color: var(--primary-dark); }
.debt-summary { background: var(--surface); border: 1px solid var(--danger); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 14px; }
.debt-summary .ds-title { font-weight: 800; color: var(--danger); margin-bottom: 4px; }
.debt-summary .ds-total { font-size: 20px; font-weight: 800; color: var(--text); }

/* ── Calendar overlay ──────────────────────────────────────────── */
.cal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 18px; }
.cal-box { background: var(--surface); border-radius: var(--radius); padding: 18px; width: 100%; max-width: 360px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-weight: 800; color: var(--text); font-size: 16px; }
.cal-nav { display: flex; gap: 8px; }
.cal-nav button { width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; font-size: 16px; cursor: pointer; color: var(--text); }
.cal-nav button:disabled { opacity: 0.3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-wd { text-align: center; font-size: 11px; color: #8a8f82; font-weight: 700; padding: 4px 0; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; background: var(--surface-2); color: var(--text); }
.cal-day.today { border-color: var(--primary); color: var(--primary-dark); font-weight: 800; }
.cal-day.disabled { opacity: 0.25; cursor: default; background: transparent; }
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.selectable:active { background: var(--primary); color: #fff; }
.cal-cancel { width: 100%; margin-top: 14px; padding: 12px; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-sm); font-weight: 700; color: var(--text); cursor: pointer; }