/* Tiff's Touch Cleaning Services — business app demo
   Brand: black, teal #19C3C8, mint #8ED9C6, gold #F2C14E, Outfit */

:root {
  --teal: #19c3c8;
  --teal-deep: #0c7f84;
  --teal-btn: #0d7d82;
  --teal-btn-hover: #0a6b6f;
  --mint: #8ed9c6;
  --mint-soft: #c8f0e6;
  --gold: #f2c14e;
  --gold-dim: #b8902e;
  --bg: #07090b;
  --bg-2: #101417;
  --bg-3: #161b1e;
  --bg-4: #1c2326;
  --bg-hover: #232b2e;
  --line: rgba(25, 195, 200, 0.16);
  --line-strong: rgba(25, 195, 200, 0.28);
  --ink: #f6fbfb;
  --ink-2: #e8f2f2;
  --muted: #b7c5c5;
  --muted-2: #6a7a7a;
  --paper: #f3f7f6;
  --paper-2: #e8f1ef;
  --danger: #d4746a;
  --danger-bg: rgba(212, 116, 106, 0.14);
  --success: #8ed9c6;
  --success-bg: rgba(142, 217, 198, 0.14);
  --info: #7ec8e8;
  --info-bg: rgba(126, 200, 232, 0.12);
  --gold-bg: rgba(242, 193, 78, 0.12);
  --teal-bg: rgba(25, 195, 200, 0.12);
  --shadow: 0 14px 40px rgba(7, 9, 11, 0.45);
  --radius: 14px;
  --font: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sidebar: 244px;
  --topbar: 64px;
  --bottom: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 8% -12%, rgba(25, 195, 200, 0.08), transparent 55%),
    radial-gradient(800px 400px at 100% 0%, rgba(242, 193, 78, 0.05), transparent 45%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--mint); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.05rem; }
p { margin: 0; }
::selection { background: var(--teal-bg); color: var(--ink); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

/* Shell */
.app-shell { display: flex; min-height: 100%; }
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.brand:hover { color: inherit; }
.brand-logo { width: 52px; height: 52px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  color: var(--teal);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}
.brand-sub {
  color: var(--mint);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-top: 3px;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  flex: 1;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  padding: 9px 10px;
  border-radius: 10px;
  font-weight: 500;
}
.side-nav a:hover { background: var(--bg-4); color: var(--ink); }
.side-nav a.active {
  background: var(--teal-bg);
  color: var(--teal);
}
.nav-ico { width: 20px; height: 20px; display: grid; place-items: center; flex-shrink: 0; }
.nav-ico svg { width: 20px; height: 20px; }
.nav-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1508;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-foot {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--line);
}
.shop-nap {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 11, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.icon-btn.menu-btn { display: none; }
.topbar-search { position: relative; flex: 1; max-width: 460px; }
.topbar-search input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px 8px 38px;
  color: var(--ink);
  outline: none;
}
.topbar-search input:focus { border-color: var(--teal-deep); }
.topbar-search input::placeholder { color: var(--muted-2); }
.search-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 40;
}
.search-results a, .search-results button.row {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--ink);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.search-results a:last-child, .search-results button.row:last-child { border-bottom: 0; }
.search-results a:hover, .search-results button.row:hover { background: var(--bg-hover); }
.search-results .meta { display: block; color: var(--muted); font-size: 0.8rem; }
.search-results .empty { padding: 12px; color: var(--muted); font-size: 0.9rem; }

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--gold-dim);
  background: var(--gold-bg);
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 600;
}
.demo-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.view { padding: 24px 28px 48px; flex: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 8px 14px;
  font-weight: 700;
  background: var(--bg-4);
  color: var(--ink);
  border-color: var(--line-strong);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, filter 0.2s;
}
.btn:hover { background: var(--bg-hover); color: var(--ink); }
.btn-solid {
  background: var(--teal-btn);
  color: #fff;
  border-color: var(--teal-btn);
  box-shadow: 0 6px 16px rgba(13, 125, 130, 0.28);
}
.btn-solid:hover { background: var(--teal-btn-hover); border-color: var(--teal-btn-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn-danger { background: var(--danger-bg); border-color: rgba(212, 116, 106, 0.45); color: #f0b8b2; }
.btn-gold {
  background: var(--gold);
  color: #1a1508;
  border-color: var(--gold-dim);
}
.btn-gold:hover { filter: brightness(1.06); color: #1a1508; }
.btn-small { padding: 6px 12px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.icon-btn {
  background: transparent;
  border: 0;
  color: var(--ink);
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  padding: 0;
}
.icon-btn:hover { background: var(--bg-4); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.field input, .field select, .field textarea,
input.input, select.input, textarea.input {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--ink);
  outline: none;
  width: 100%;
}
.field textarea, textarea.input { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
input.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-bg);
}
.field select option { background: var(--bg-3); color: var(--ink); }
.hint { font-size: 0.78rem; color: var(--muted); }
.hint.warn { color: var(--gold); }
.field .btn { align-self: flex-start; width: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.check-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.92rem; }
.check-row input { width: auto; accent-color: var(--teal-btn); }

/* Cards / KPI */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}
.page-head .sub { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  color: inherit;
}
a.kpi:hover { border-color: var(--teal); color: inherit; }
.kpi::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--teal);
  opacity: 0.85;
}
.kpi .label { margin-bottom: 8px; }
.kpi .value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.kpi .foot { margin-top: 6px; font-size: 0.8rem; color: var(--muted); }

.card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.card + .card { margin-top: 14px; }
.card-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.card-h h2 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid currentColor;
  background: transparent;
  white-space: nowrap;
}
.pill.scheduled { color: var(--info); background: var(--info-bg); }
.pill.confirmed { color: var(--teal); background: var(--teal-bg); }
.pill.completed { color: var(--mint); background: var(--success-bg); }
.pill.canceled { color: var(--muted-2); background: rgba(106, 122, 122, 0.16); text-decoration: line-through; }
.pill.draft { color: var(--muted); background: rgba(183, 197, 197, 0.1); }
.pill.sent { color: var(--gold); background: var(--gold-bg); }
.pill.paid { color: var(--mint); background: var(--success-bg); }
.pill.overdue { color: var(--danger); background: var(--danger-bg); }
.pill.new { color: var(--gold); background: var(--gold-bg); }
.pill.converted { color: var(--muted); background: rgba(183, 197, 197, 0.1); }
.pill.quote { color: var(--info); background: var(--info-bg); }
.pill.invoice { color: var(--teal); background: var(--teal-bg); }
.pill.weekly, .pill.biweekly, .pill.monthly { color: var(--mint); background: var(--success-bg); }

/* Dashboard */
.dash-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.95fr;
  gap: 14px;
}
.job-row, .est-row, .rem-row, .list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: inherit;
}
.job-row:first-of-type, .est-row:first-of-type, .rem-row:first-of-type, .list-row:first-of-type {
  border-top: 0;
  padding-top: 2px;
}
a.job-row:hover, a.est-row:hover, a.list-row:hover { color: var(--ink); }
.job-row .who, .list-row .who { font-weight: 600; }
.job-row .veh, .muted, .meta-line { color: var(--muted); font-size: 0.86rem; }
.job-row .right, .est-row .right, .list-row .right { text-align: right; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.empty { color: var(--muted); padding: 12px 0; font-size: 0.92rem; }
.tips {
  border: 1px dashed var(--gold-dim);
  background: var(--gold-bg);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 22px;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.tips strong { color: var(--gold); font-weight: 700; }

/* Schedule */
.sched-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-label { font-weight: 700; min-width: 8.5rem; text-align: center; }
.view-toggle { display: flex; gap: 6px; }
.view-toggle button {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}
.view-toggle button.on, .view-toggle button:hover,
.status-filters button.on, .status-filters button:hover {
  border-color: var(--teal-deep);
  color: var(--teal);
  background: var(--teal-bg);
}
.status-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.status-filters button {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.day-col {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.day-col.is-today { border-color: var(--teal); box-shadow: inset 0 0 0 1px rgba(25, 195, 200, 0.25); }
.day-col.is-weekend { opacity: 0.88; }
.day-h {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--line);
}
.day-h .dow {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.day-h .dom { font-weight: 700; font-size: 1.05rem; }
.day-h.is-today .dom { color: var(--teal); }
.day-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; flex: 1; }
.bk-card {
  display: block;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--ink);
}
.bk-card:hover { border-color: var(--teal); color: var(--ink); }
.bk-card.deep { border-left-color: var(--gold); }
.bk-card.move { border-left-color: #7ec8e8; }
.bk-card.canceled { opacity: 0.55; border-left-color: var(--muted-2); }
.bk-card.completed { border-left-color: var(--mint); }
.bk-card .when { font-size: 0.7rem; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.bk-card .name { font-weight: 600; margin-top: 2px; font-size: 0.88rem; }
.bk-card .svc { font-size: 0.75rem; color: var(--muted); margin-top: 1px; }

.day-strip {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}
.day-chip {
  flex: 0 0 auto;
  min-width: 52px;
  text-align: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--ink);
  text-decoration: none;
}
.day-chip .dow { display: block; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.day-chip .dom { display: block; font-weight: 700; font-size: 1.05rem; margin-top: 2px; }
.day-chip.on { border-color: var(--teal); background: var(--teal-bg); color: var(--teal); }
.day-chip.on .dow, .day-chip.on .dom { color: var(--teal); }
.day-chip.has { box-shadow: inset 0 -2px 0 var(--gold); }

.agenda { display: flex; flex-direction: column; gap: 10px; }
.agenda-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: inherit;
}
a.agenda-item:hover { border-color: var(--teal); color: inherit; }
.agenda-item .time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--teal);
  line-height: 1.25;
}
.agenda-item .dur { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 500; }
.agenda-item .name { font-weight: 700; }
.agenda-item .svc { color: var(--muted); font-size: 0.86rem; margin: 2px 0 8px; }
.agenda-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Clients / lists */
.cust-list { display: flex; flex-direction: column; }
.cust-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.cust-item:hover { color: var(--ink); background: rgba(255,255,255,0.02); }
.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 0.86rem; margin-top: 8px; }
.kv dt { color: var(--muted); }
.history-table, .line-table, .report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.history-table th, .line-table th, .report-table th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--line);
}
.history-table td, .line-table td, .report-table td {
  padding: 10px 8px 10px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.history-table tr:hover td { background: rgba(255,255,255,0.015); }
.num-col, .right { text-align: right; }

/* Booking / invoice forms */
.wo-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.wo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lines-wrap { overflow-x: auto; }
.line-table input, .line-table select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  width: 100%;
}
.line-table .desc { min-width: 200px; }
.line-table .qty { width: 78px; }
.line-table .rate { width: 100px; }
.line-table .tot { width: 100px; text-align: right; font-variant-numeric: tabular-nums; }
.line-table .rm { width: 40px; }
.totals {
  width: min(340px, 100%);
  margin-left: auto;
  margin-top: 12px;
}
.totals .t-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.totals .t-row.grand {
  border-top: 1px solid var(--teal-deep);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}
.addon-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.addon-picks button {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

/* Payment */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pay-methods { display: grid; gap: 10px; }
.pay-method {
  text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--ink);
}
.pay-method:hover, .pay-method.on {
  border-color: var(--teal);
  background: var(--teal-bg);
}
.pay-method .m-title { font-weight: 700; }
.pay-method .m-sub { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.square-note {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px dashed var(--gold-dim);
  padding: 8px 10px;
  border-radius: 10px;
}

/* Phone mock (texts) */
.phone {
  width: min(320px, 100%);
  margin: 0 auto;
  background: #0a0c0c;
  border: 2px solid #2a3a3a;
  border-radius: 28px;
  padding: 16px 14px 20px;
  box-shadow: var(--shadow);
}
.phone-bar {
  height: 18px;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.phone-bar span {
  width: 80px; height: 6px;
  background: #2a2a2a;
  border-radius: 99px;
}
.sms {
  background: #143836;
  color: #e8f6f4;
  border-radius: 16px 16px 4px 16px;
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.sms-meta { color: var(--muted); font-size: 0.72rem; text-align: center; margin: 8px 0 10px; }
.sms-in {
  background: var(--bg-4);
  border-radius: 16px 16px 16px 4px;
}

/* Quotes inbox */
.quote-card {
  display: block;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--bg-2);
  margin-bottom: 10px;
}
.quote-card:hover { border-color: var(--teal); color: inherit; }
.quote-card .top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.quote-card .msg {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 0.92rem;
}
.connect-note {
  border: 1px dashed var(--teal-deep);
  background: var(--teal-bg);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--ink-2);
  font-size: 0.9rem;
}

/* Texts outbox */
.text-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: inherit;
}
.text-row:first-of-type { border-top: 0; padding-top: 2px; }
.text-row .preview {
  color: var(--muted);
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
}

/* Settings */
.placeholder-flag {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 1px 6px;
  border-radius: 999px;
  vertical-align: middle;
  font-weight: 700;
}
.template-block textarea { min-height: 100px; font-size: 0.9rem; }
.merge-help { font-size: 0.75rem; color: var(--muted-2); margin-top: 4px; }

/* More (mobile) */
.more-list a, .more-list button {
  display: flex;
  width: 100%;
  text-align: left;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  padding: 14px 16px;
  margin-bottom: 8px;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.more-list a:hover, .more-list button:hover { border-color: var(--teal); color: var(--ink); }

/* Modal / overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 50;
}
.sidebar.open { display: flex; position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; }
.modal {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.modal-wide { width: min(720px, calc(100% - 28px)); }
.modal h2 { margin-bottom: 8px; }
.modal .sub { color: var(--muted); margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

.toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-4);
  border: 1px solid var(--teal-deep);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 220px;
  max-width: 360px;
  font-size: 0.9rem;
}

.bottom-nav { display: none; }

/* Print documents */
.print-sheet {
  background: var(--paper);
  color: #1a2424;
  max-width: 800px;
  margin: 0 auto;
  padding: 36px 40px 48px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  position: relative;
}
.print-sheet .demo-watermark {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
  border: 1px solid var(--teal);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.print-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid var(--teal);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.print-brand { display: flex; align-items: center; gap: 10px; }
.print-brand img { width: 64px; height: 64px; }
.print-brand .word {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--teal-deep);
  font-size: 0.95rem;
}
.print-brand .tag { font-size: 0.7rem; color: #4c5b5b; font-weight: 500; }
.print-head .doc-type {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0c1212;
  text-align: right;
}
.print-head .nap, .print-meta { font-size: 0.85rem; color: #4a453c; line-height: 1.5; }
.print-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }
.print-cols h3 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 6px;
}
.print-sheet table { width: 100%; border-collapse: collapse; }
.print-sheet th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
  border-bottom: 1px solid var(--teal);
  padding: 6px 8px 8px 0;
}
.print-sheet td {
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid #d5e4e1;
  font-size: 0.9rem;
}
.print-sheet .totals-print { width: 280px; margin-left: auto; margin-top: 16px; }
.print-sheet .t-row { display: flex; justify-content: space-between; padding: 4px 0; color: #3a3530; }
.print-sheet .t-row.grand {
  border-top: 2px solid var(--teal);
  margin-top: 6px;
  padding-top: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0c1212;
}
.print-foot {
  margin-top: 36px;
  border-top: 1px solid #d5e4e1;
  padding-top: 14px;
  font-size: 0.8rem;
  color: #4a453c;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.print-toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 16px; }

body.print-mode .sidebar,
body.print-mode .topbar,
body.print-mode .bottom-nav,
body.print-mode .print-toolbar { display: none !important; }
body.print-mode .main-wrap { min-height: auto; }
body.print-mode .view { padding: 24px; }
body.print-mode { background: #d4e0de; }

@media print {
  body { background: #fff !important; }
  .sidebar, .topbar, .bottom-nav, .print-toolbar, .toast-root, .overlay, .modal, .demo-badge {
    display: none !important;
  }
  .main-wrap, .view { padding: 0 !important; margin: 0 !important; }
  .print-sheet {
    box-shadow: none;
    max-width: none;
    border-radius: 0;
    padding: 0;
    background: #fff;
  }
  .print-sheet .demo-watermark { position: static; display: inline-block; margin-bottom: 8px; }
  a { color: inherit; }
}

/* Tablet */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .dash-grid, .profile-grid, .pay-grid { grid-template-columns: 1fr; }
  .week-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }
  .day-col { min-width: 160px; flex: 0 0 160px; scroll-snap-align: start; }
}

@media (max-width: 860px) {
  :root { --bottom: calc(64px + var(--safe-b)); }
  .sidebar {
    display: none;
    width: min(280px, 86vw);
    box-shadow: var(--shadow);
  }
  .sidebar.open { display: flex; }
  .icon-btn.menu-btn { display: grid; }
  .top-new { display: none; }
  .topbar { padding: 0 12px; }
  .demo-badge { font-size: 0; padding: 5px 8px; gap: 0; }
  .demo-badge::after { content: "Demo"; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }
  .view { padding: 16px 16px calc(var(--bottom) + 20px); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 1.25rem; }
  .week-grid { display: none; }
  .day-strip { display: flex; }
  .desktop-only { display: none !important; }
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: var(--bottom);
    padding-bottom: var(--safe-b);
    background: rgba(16, 20, 23, 0.96);
    border-top: 1px solid var(--line);
    z-index: 40;
    justify-content: space-around;
    align-items: flex-start;
  }
  .bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--muted);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-top: 8px;
    font-weight: 600;
  }
  .bottom-nav a svg { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--teal); }
  .bottom-nav a.nav-fab {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    margin-top: -18px;
    background: var(--teal-btn);
    color: #fff;
    border-radius: 50%;
    justify-content: center;
    padding: 0;
    border: 3px solid var(--bg);
    box-shadow: 0 6px 16px rgba(13, 125, 130, 0.35);
  }
  .bottom-nav a.nav-fab svg { width: 22px; height: 22px; }
  .toast-root { bottom: calc(var(--bottom) + 10px); }
  .print-sheet { padding: 20px 16px 28px; }
  .print-head, .print-cols, .print-foot { grid-template-columns: 1fr; display: grid; }
  .print-head .doc-type { text-align: left; }
  .print-sheet .totals-print { width: 100%; }
  .agenda-item { grid-template-columns: 72px 1fr; }
  .agenda-item .dur { white-space: nowrap; }
}

@media (min-width: 861px) {
  .mobile-only { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
