/* Chatbaht clinic dashboard — new look (design preview).
   Every class starts with "cbd-" so this file can be dropped into the
   WordPress plugin later without clashing with the theme. */

.cbd {
  --ink: #0b1220;
  --ink-2: #121c30;
  --ink-3: #1b2740;
  --ivory: #f7f4ee;
  --paper: #ffffff;
  --sand: #ece6da;
  --text: #0b1220;
  --text-2: #3b4558;
  --muted: #5b6578;
  --blue: #e8552b;
  --blue-deep: #c4421d;
  --blue-soft: #fdeee8;
  --gold: #b8935a;
  --line: #06c755;
  --stroke: rgba(11, 18, 32, 0.1);
  --stroke-soft: rgba(11, 18, 32, 0.06);
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.04), 0 6px 18px -10px rgba(11, 18, 32, 0.14);
  --shadow: 0 24px 60px -20px rgba(11, 18, 32, 0.28);
  --r-sm: 10px;
  --r: 16px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font: "Manrope", "Anuphan", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Anuphan", Georgia, serif;

  /* treatment categories (fixed order, never re-assigned) */
  --cat-inj: #2a78d6;
  --cat-skin: #eb6834;
  --cat-lift: #1baf7a;
  --cat-long: #eda100;
  --cat-iv: #e87ba4;
  --cat-hair: #008300;
  --cat-health: #4a3aa7;

  /* status: always shown with an icon and a word, never colour alone */
  --st-pending-bg: #fff3d4;   --st-pending-ink: #7a5200;
  --st-confirmed-bg: #e2f5e7; --st-confirmed-ink: #0a6128;
  --st-completed-bg: #eceff4; --st-completed-ink: #3b4558;
  --st-cancelled-bg: #fde7e7; --st-cancelled-ink: #9f2323;
  --st-noshow-bg: #fdece1;    --st-noshow-ink: #94461a;

  --row-h: 52px;
  --side-w: 236px;

  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--ivory);
  color: var(--text);
  font: 500 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
.cbd *, .cbd *::before, .cbd *::after { box-sizing: border-box; }
.cbd button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
.cbd a { color: inherit; text-decoration: none; }
.cbd svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cbd h1, .cbd h2, .cbd h3, .cbd p { margin: 0; }
.cbd :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- Sidebar ---------- */
.cbd-side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 22px 14px 16px;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
}
.cbd-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.cbd-brand-mark { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--blue); box-shadow: 0 8px 18px -8px rgba(232, 85, 43, 0.9); }
.cbd-brand-mark svg { width: 16px; height: 16px; stroke-width: 2.2; }
.cbd-nav { display: grid; gap: 2px; }
.cbd-nav-label { padding: 0 12px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
.cbd-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: rgba(255, 255, 255, 0.68); font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.cbd-nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.cbd-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 2px 0 0 var(--blue); }
.cbd-nav-count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 800; text-align: center; }
.cbd-side-foot { margin-top: auto; display: grid; gap: 12px; }
.cbd-ai {
  padding: 14px; border-radius: var(--r);
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
}
.cbd-ai-row { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.cbd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); box-shadow: 0 0 0 0 rgba(6, 199, 85, 0.6); animation: cbd-pulse 2.4s infinite; }
.cbd-ai p { margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.cbd-ai a { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: #ffb89c; }
.cbd-me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); }
.cbd-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--ink); font-weight: 800; font-size: 12px; flex: none; }
.cbd-me b { display: block; font-size: 13px; }
.cbd-me div span { font-size: 12px; color: rgba(255, 255, 255, 0.55); }
@keyframes cbd-pulse { 70% { box-shadow: 0 0 0 7px rgba(6, 199, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0); } }

/* ---------- Main column ---------- */
.cbd-main { padding: 26px clamp(16px, 2.6vw, 36px) 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; min-width: 0; }
.cbd-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cbd-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cbd-title { font: 400 clamp(30px, 3.4vw, 42px)/1.05 var(--serif); letter-spacing: -0.01em; margin-top: 6px; }
.cbd-top-actions { display: flex; align-items: center; gap: 10px; }
.cbd .cbd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 99px;
  font-weight: 700; font-size: 13.5px; white-space: nowrap;
  transition: transform 0.15s var(--ease-out), box-shadow 0.2s, background 0.2s;
}
.cbd .cbd-btn-primary { background: var(--blue); color: #fff; box-shadow: 0 12px 24px -12px rgba(232, 85, 43, 0.8); }
.cbd .cbd-btn-primary:hover { background: var(--blue-deep); }
.cbd .cbd-btn-ghost { background: var(--paper); border: 1px solid var(--stroke); }
.cbd .cbd-btn-ghost:hover { border-color: rgba(11, 18, 32, 0.25); }
.cbd .cbd-btn-sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.cbd-btn:active { transform: scale(0.97); }
.cbd-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; background: var(--sand); color: var(--text-2); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; text-transform: none; }

.cbd-card { background: var(--paper); border: 1px solid var(--stroke-soft); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.cbd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
.cbd-card-head h2 { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.cbd .cbd-link { font-size: 12.5px; font-weight: 700; color: var(--blue); }
.cbd-link:hover { text-decoration: underline; }

/* ---------- Headline numbers ---------- */
.cbd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cbd-kpi { padding: 18px; display: grid; gap: 6px; }
.cbd-kpi-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cbd-kpi-label svg { width: 16px; height: 16px; color: var(--gold); }
.cbd-kpi-value { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.cbd-kpi-sub { font-size: 12.5px; color: var(--muted); }
.cbd-kpi.is-hero { background: var(--ink); color: #fff; border-color: transparent; }
.cbd-kpi.is-hero .cbd-kpi-label, .cbd-kpi.is-hero .cbd-kpi-sub { color: rgba(255, 255, 255, 0.62); }

/* ---------- Status strip ---------- */
.cbd-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cbd-strip button { display: flex; align-items: center; gap: 12px; padding: 14px 18px; text-align: left; border-left: 1px solid var(--stroke-soft); transition: background 0.2s; }
.cbd-strip button:first-child { border-left: 0; border-radius: var(--r) 0 0 var(--r); }
.cbd-strip button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.cbd-strip button:hover { background: rgba(11, 18, 32, 0.03); }
.cbd-strip-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.cbd-strip-ico svg { width: 16px; height: 16px; stroke-width: 2.2; }
.cbd-strip b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.cbd-strip span span { font-size: 12px; color: var(--muted); font-weight: 600; }

.cbd-s-pending { background: var(--st-pending-bg); color: var(--st-pending-ink); }
.cbd-s-confirmed { background: var(--st-confirmed-bg); color: var(--st-confirmed-ink); }
.cbd-s-completed { background: var(--st-completed-bg); color: var(--st-completed-ink); }
.cbd-s-cancelled { background: var(--st-cancelled-bg); color: var(--st-cancelled-ink); }
.cbd-s-noshow { background: var(--st-noshow-bg); color: var(--st-noshow-ink); }
.cbd-s-tomorrow { background: var(--blue-soft); color: var(--blue-deep); }
.cbd-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.cbd-pill svg { width: 12px; height: 12px; stroke-width: 2.4; }

/* ---------- Calendar + right rail ---------- */
.cbd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.cbd-rail { display: grid; gap: 18px; }
.cbd-cal-nav { display: flex; align-items: center; gap: 6px; }
.cbd-cal-nav b { padding: 0 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.cbd-icon-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--stroke) !important; background: var(--paper) !important; }
.cbd-icon-btn:hover { border-color: rgba(11, 18, 32, 0.3) !important; }
.cbd-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 18px 14px; font-size: 12px; color: var(--muted); font-weight: 600; }
.cbd-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 6px; background: var(--c); }
.cbd-cal-scroll { overflow-x: auto; border-top: 1px solid var(--stroke-soft); }
.cbd-cal-inner { min-width: 720px; }
.cbd-cal-days, .cbd-cal-body { display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr)); }
.cbd-cal-day { padding: 10px 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); border-left: 1px solid var(--stroke-soft); }
.cbd-cal-day b { display: block; font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.cbd-cal-day.is-today { color: var(--blue); }
.cbd-cal-day.is-today b { width: 30px; height: 30px; margin: 2px auto 0; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 14px; }
.cbd-cal-body { border-top: 1px solid var(--stroke-soft); }
.cbd-cal-hours div { height: var(--row-h); padding: 0 8px 0 0; text-align: right; font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; transform: translateY(-7px); }
.cbd-cal-hours div:first-child { transform: none; }
.cbd-cal-col {
  position: relative; border-left: 1px solid var(--stroke-soft);
  background: repeating-linear-gradient(180deg, transparent 0 calc(var(--row-h) - 1px), var(--stroke-soft) calc(var(--row-h) - 1px) var(--row-h));
}
.cbd-cal-col.is-today { background-color: rgba(232, 85, 43, 0.035); }
.cbd-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--blue); z-index: 2; pointer-events: none; }
.cbd-now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.cbd .cbd-ev {
  position: absolute; left: 4px; right: 4px; overflow: hidden;
  padding: 6px 8px 6px 11px; border-radius: 9px; text-align: left;
  background: color-mix(in srgb, var(--c) 11%, #fff);
  box-shadow: inset 3px 0 0 var(--c);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s;
}
.cbd .cbd-ev:hover { transform: translateY(-1px); box-shadow: inset 3px 0 0 var(--c), 0 8px 18px -10px rgba(11, 18, 32, 0.45); z-index: 3; }
.cbd-ev b { display: block; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbd-ev span { display: block; font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbd-ev time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-2); }
.cbd-ev.is-pending { outline: 1.5px dashed color-mix(in srgb, var(--c) 60%, #fff); outline-offset: -1.5px; }
.cbd-ev.is-cancelled, .cbd-ev.is-noshow { opacity: 0.55; }
.cbd-ev.is-cancelled b { text-decoration: line-through; }

/* ---------- Right rail lists ---------- */
.cbd-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.cbd-list li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-sm); }
.cbd-list li + li { border-top: 1px solid var(--stroke-soft); border-radius: 0; }
.cbd-when { width: 46px; flex: none; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.cbd-when small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.cbd-who { min-width: 0; flex: 1; }
.cbd-who b { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbd-who span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbd-attn { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.cbd-attn .cbd-card-head h2 { display: flex; align-items: center; gap: 8px; }
.cbd-attn .cbd-card-head svg { color: var(--gold); }
.cbd-empty { padding: 6px 18px 20px; font-size: 13px; color: var(--muted); }

.cbd-bars { display: grid; gap: 12px; padding: 2px 18px 18px; }
.cbd-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; font-size: 12.5px; font-weight: 600; }
.cbd-bar em { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.cbd-bar i { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--blue-soft); overflow: hidden; }
.cbd-bar i::after { content: ""; display: block; height: 100%; width: var(--w); border-radius: 0 4px 4px 0; background: var(--blue); }

/* ---------- Bookings table ---------- */
.cbd-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 18px 14px; }
.cbd-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; border-radius: 99px; background: var(--ivory); }
.cbd .cbd-tabs button { padding: 6px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cbd .cbd-tabs button[aria-pressed="true"] { background: var(--paper); color: var(--text); box-shadow: 0 1px 3px rgba(11, 18, 32, 0.14); }
.cbd-search { display: flex; align-items: center; gap: 8px; min-width: 240px; height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--stroke); color: var(--muted); }
.cbd-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.cbd-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--text); }
.cbd-table-wrap { overflow-x: auto; border-top: 1px solid var(--stroke-soft); }
.cbd-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.cbd-table th { padding: 10px 18px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: #fbfaf7; }
.cbd-table td { padding: 12px 18px; border-top: 1px solid var(--stroke-soft); font-size: 13px; vertical-align: middle; }
.cbd-table tbody tr { cursor: pointer; transition: background 0.15s; }
.cbd-table tbody tr:hover { background: #fbfaf7; }
.cbd-table td.cbd-num, .cbd-table th.cbd-num { text-align: right; font-variant-numeric: tabular-nums; }
.cbd-cust { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.cbd-cust .cbd-avatar { width: 30px; height: 30px; font-size: 11px; }
.cbd-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 8px; background: var(--c); }

/* ---------- Appointment panel + toast ---------- */
.cbd-scrim { position: fixed; inset: 0; background: rgba(11, 18, 32, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 50; }
.cbd-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100%);
  display: flex; flex-direction: column; gap: 18px; padding: 24px;
  background: var(--paper); box-shadow: var(--shadow);
  transform: translateX(104%); transition: transform 0.35s var(--ease-out); z-index: 51;
}
.cbd.is-open .cbd-scrim { opacity: 1; pointer-events: auto; }
.cbd.is-open .cbd-drawer { transform: none; }
.cbd-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cbd-drawer h2 { font: 400 30px/1.1 var(--serif); margin-top: 8px; }
.cbd-facts { display: grid; gap: 0; margin: 0; border: 1px solid var(--stroke-soft); border-radius: var(--r); }
.cbd-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; font-size: 13px; }
.cbd-facts div + div { border-top: 1px solid var(--stroke-soft); }
.cbd-facts dt { color: var(--muted); }
.cbd-facts dd { margin: 0; font-weight: 700; text-align: right; }
.cbd-drawer-actions { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cbd-drawer-actions .cbd-btn-primary { grid-column: 1 / -1; min-height: 46px; }
.cbd-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  display: flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 99px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; box-shadow: var(--shadow);
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}
.cbd-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.cbd-toast svg { color: var(--line); }

.cbd-tabbar { display: none; }

/* ---------- Phone calendar: one day at a time ---------- */
.cbd-agenda { display: none; border-top: 1px solid var(--stroke-soft); }
.cbd-daypick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 12px 10px 6px; }
.cbd .cbd-daypick button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 0 12px; border-radius: 14px; font-size: 11px; font-weight: 700; color: var(--muted); }
.cbd-daypick b { font-size: 16px; font-weight: 800; color: var(--text); }
.cbd-daypick i { position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.cbd .cbd-daypick button.is-today, .cbd-daypick button.is-today b { color: var(--blue); }
.cbd .cbd-daypick button[aria-pressed="true"] { background: var(--ink); color: rgba(255, 255, 255, 0.7); }
.cbd-daypick button[aria-pressed="true"] b { color: #fff; }
.cbd-agenda .cbd-list li[data-id] { cursor: pointer; box-shadow: inset 3px 0 0 var(--c); padding-left: 14px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1180px) {
  .cbd-grid { grid-template-columns: minmax(0, 1fr); }
  .cbd-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .cbd-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cbd-strip button:nth-child(n) { border-radius: 0; }
  .cbd-strip button:nth-child(4) { border-left: 0; }
  .cbd-strip button:nth-child(n + 4) { border-top: 1px solid var(--stroke-soft); }
}
@media (max-width: 900px) {
  .cbd { grid-template-columns: minmax(0, 1fr); padding-bottom: 68px; }
  .cbd-side { display: none; }
  .cbd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cbd-kpi-value { font-size: 26px; }
  .cbd-rail { grid-template-columns: minmax(0, 1fr); }
  .cbd-attn { order: -1; }
  .cbd-search { min-width: 0; flex: 1 1 100%; }
  .cbd-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--ink); color: rgba(255, 255, 255, 0.6);
  }
  .cbd-tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 0; font-size: 10.5px; font-weight: 700; border-radius: 10px; }
  .cbd-tabbar a[aria-current="page"] { color: #fff; }
  .cbd-tabbar a[aria-current="page"] svg { color: #ffa27f; }
}
@media (max-width: 700px) {
  .cbd-cal-scroll, .cbd-legend, .cbd-cal-nav b { display: none; }
  .cbd-agenda { display: block; }
  .cbd .cbd-btn, .cbd .cbd-btn-sm { min-height: 44px; }
  .cbd .cbd-btn-sm { padding: 0 16px; }
  .cbd-search { height: 44px; }
  .cbd-search input { font-size: 16px; }
  .cbd .cbd-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .cbd .cbd-tabs button { padding: 9px 14px; white-space: nowrap; }
  .cbd-table { min-width: 0; }
  .cbd-table thead { display: none; }
  .cbd-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-top: 1px solid var(--stroke-soft); }
  .cbd-table td { padding: 0; border: 0; }
  .cbd-table td:nth-child(2), .cbd-table td:nth-child(3) { grid-column: 1; color: var(--muted); font-size: 12.5px; }
  .cbd-table td:nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; }
  .cbd-table td:nth-child(5) { grid-column: 2; grid-row: 2 / 4; align-self: center; font-weight: 800; }
  .cbd-drawer { top: auto; left: 0; width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; transform: translateY(104%); padding-bottom: calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; }
  .cbd-toast { bottom: 84px; width: max-content; max-width: calc(100% - 32px); }
}
@media (max-width: 520px) {
  .cbd-main { padding-top: 18px; gap: 14px; }
  .cbd-top-actions .cbd-btn-ghost { display: none; }
  .cbd-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cbd-strip button:nth-child(n) { border-left: 0; border-top: 1px solid var(--stroke-soft); padding: 12px 14px; }
  .cbd-strip button:nth-child(-n + 2) { border-top: 0; }
  .cbd-strip button:nth-child(even) { border-left: 1px solid var(--stroke-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .cbd *, .cbd *::before, .cbd *::after { animation: none !important; transition: none !important; }
}
