/* Tooth & Braces – "Google" look, same aesthetics as the ISC app: white, Google colours, clean and simple.
   Loaded after styles.css; it only overrides looks, never layout logic. Blue = actions, green = good/done,
   yellow = waiting, red = problem. Doctors: blue, green, yellow (Google colours). */
:root {
  --bg: #ffffff; --card: #ffffff; --ink: #202124; --muted: #5f6368; --line: #e8eaed; --line2: #dadce0; --soft: #f8f9fa; --chipbg: #f1f3f4;
  --brand: #1a73e8; --brand-dark: #1967d2; --brand-soft: #e8f0fe; --danger: #c5221f;
  --gGreen: #1e8e3e; --gGreen2: #137333; --gGreenBg: #e6f4ea; --gYel: #b06000; --gYelBg: #fef7e0; --gRedBg: #fce8e6;
  --radius: 12px;
  --d0: #1a73e8; --d0s: #e8f0fe; --d1: #1e8e3e; --d1s: #e6f4ea; --d2: #f9ab00; --d2s: #fef7e0;
}
body { font-family: Roboto, "Google Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; background: #fff; color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .pagetitle { font-weight: 500; letter-spacing: 0; }

/* top bar: white, like ISC */
.topbar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); padding: 12px 16px; }
.topbar h1 { font-size: 20px; font-weight: 500; }
.topbar .who { color: var(--muted); }
.topbar button { background: #fff; color: var(--brand); border: 1px solid var(--line2); border-radius: 20px; padding: 6px 14px; font-weight: 500; }
.top-logo { height: 32px; }

/* tabs: blue underline on computer, a bottom bar on phones */
.tabs { background: #fff; border-bottom: 1px solid var(--line); padding: 0 8px; gap: 0; top: 57px; }
.tabs button { border-radius: 0; padding: 14px 16px 12px; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; }
.tabs button.on { background: none; color: var(--brand); border-bottom-color: var(--brand); }
@media (max-width: 720px) {
  .tabs { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 6; border-bottom: 0; border-top: 1px solid var(--line); padding: 0 0 env(safe-area-inset-bottom); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: hidden; }
  .tabs button { padding: 0; height: 60px; font-size: 12px; border-bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
  .tabs button::before { content: ""; width: 24px; height: 24px; display: block; background-color: var(--muted);
    -webkit-mask: var(--ic) center / 22px 22px no-repeat; mask: var(--ic) center / 22px 22px no-repeat; }
  .tabs button.on { color: var(--brand-dark); border: 0; }
  .tabs button.on::before { background-color: var(--brand-dark); }
  .wrap { padding-bottom: 88px; }
  .toast { bottom: 76px; }
  .topbar .who { display: none; }
}
/* simple line icons for the bottom bar (Calls, My day, Calendar, Patients) */
.tabs button[data-tab="today"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231967d2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.tabs button[data-tab="calendar"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231967d2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); }
.tabs button[data-tab="patients"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231967d2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1-4 4-6 8-6s7 2 8 6'/%3E%3C/svg%3E"); }
.tabs button[data-tab="calls"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231967d2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-3 2a11 11 0 0 0 5 5l2-3 5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2'/%3E%3C/svg%3E"); }

/* cards and lists: white with a light grey line */
.wrap { padding-top: 12px; }
.card { border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.cardhead h3 { font-weight: 500; }
.count { background: var(--chipbg); color: var(--ink); font-weight: 500; }
.count.warn { background: var(--gRedBg); color: var(--danger); }
.note { background: var(--brand-soft); color: var(--ink); border-radius: 10px; }
.line { border-bottom-color: var(--line); }
.pitem { border-radius: 12px; border-color: var(--line); }
.pitem:hover { border-color: var(--line2); background: var(--soft); }
.pitem .name { font-weight: 500; }
.avatar { background: var(--brand-soft); color: var(--brand-dark); font-weight: 500; }
.visit { border-left-color: var(--brand); border-color: var(--line); border-radius: 12px; }

/* buttons: pill shaped, blue for the main action, white with grey line for the rest */
.btn { background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 24px; padding: 10px 20px; font-weight: 500; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--line2); }
.btn.ghost:hover { background: var(--brand-soft); border-color: var(--line2); }
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn.danger { background: #fff; color: var(--danger); border-color: var(--line2); }
.linkish { font-weight: 500; }
.linkish.small, .back { color: var(--brand); font-weight: 500; }

/* inputs */
input, select, textarea { border: 1px solid var(--line2); border-radius: 8px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
label { color: var(--muted); font-weight: 500; }

/* chips and segments, exactly like ISC */
.chip { border: 1px solid var(--line2); background: #fff; color: var(--ink); border-radius: 16px; padding: 5px 12px; font-size: 13px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }
.seg { background: var(--soft); border: 0; border-radius: 10px; padding: 4px; gap: 2px; }
.seg button { border-radius: 8px; padding: 8px 14px; color: var(--muted); font-weight: 500; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

/* badges in Google colours */
.badge, .tag { font-weight: 500; border-radius: 10px; padding: 2px 8px; background: var(--chipbg); color: #3c4043; text-transform: none; letter-spacing: 0; font-size: 12px; }
.badge.warn { background: var(--gRedBg); color: var(--danger); }
.badge.st-arrived { background: var(--gYelBg); color: var(--gYel); }
.badge.st-completed { background: var(--gGreenBg); color: var(--gGreen2); }
.badge.st-cancelled, .badge.st-no_show { background: var(--gRedBg); color: var(--danger); }
.badge.tbc-enq { background: var(--brand-soft); color: var(--brand-dark); }

/* tiles */
.tile { background: var(--soft); border-radius: 12px; }
.tiles.big .tile { border-color: var(--line); }
.tile .tv { font-weight: 500; }
.tile.pos .tv, .amt.pos { color: var(--gGreen2); }
.tile.neg .tv, .amt.neg { color: var(--danger); }

/* bottom sheets like ISC */
.sheet-bg { background: rgba(32, 33, 36, .45); }
.sheet { border-radius: 20px 20px 0 0; }
.sheet h2 { font-weight: 500; }
@media (min-width: 720px) { .sheet { border-radius: 16px; } }
.toast { background: #323232; border-radius: 8px; font-size: 14px; }

/* calls screen */
.tbc-ico { background: var(--gGreenBg); color: var(--gGreen2); }
.tbc-ico.out { background: var(--brand-soft); color: var(--brand-dark); }
.tbc-ico.missed, .tbc-ico.rejected { background: var(--gRedBg); color: var(--danger); }
.tbc-radio { border-color: var(--line2); border-radius: 12px; }
.tbc-radio:has(input:checked) { border: 2px solid var(--brand); background: var(--brand-soft); }
.tbc-who { font-weight: 500; }

/* login */
.login h1 { font-weight: 500; }
.demo-note { background: var(--soft); border: 0; border-radius: 12px; }

/* keep cards inside the screen on phones */
.grid2 > *, .stack > *, .appt-main { min-width: 0; }
.card { max-width: 100%; }
.appt-tr { font-size: 14px; color: var(--ink); }

/* "More" menu at the top right: Accounts, Stock, Sign out */
.more { position: relative; }
.more-btn { background: #fff; color: var(--ink); border: 1px solid var(--line2); border-radius: 20px; padding: 6px 14px 6px 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.more-btn::after { content: ""; width: 18px; height: 18px; background-color: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='12' cy='19' r='2'/%3E%3C/svg%3E") center / 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='12' cy='19' r='2'/%3E%3C/svg%3E") center / 18px no-repeat; }
.more-btn.on { color: var(--brand-dark); border-color: var(--brand); background: var(--brand-soft); }
.topbar .more-btn { background: #fff; color: var(--ink); }
.topbar .more-btn.on { color: var(--brand-dark); background: var(--brand-soft); }
.more-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(60, 64, 67, .25); padding: 6px 0; z-index: 30; display: grid; }
.more-menu[hidden] { display: none; }
.more-who { padding: 8px 16px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; font-size: 14px; }
.more-who span { color: var(--muted); font-size: 13px; }
.topbar .more-menu button { background: none; border: 0; border-radius: 0; color: var(--ink); text-align: left; padding: 11px 16px; font-size: 15px; font-weight: 400; }
.topbar .more-menu button:hover { background: var(--soft); }
.topbar .more-menu button.on { color: var(--brand-dark); background: var(--brand-soft); font-weight: 500; }
.topbar .more-menu .more-out { color: var(--danger); border-top: 1px solid var(--line); margin-top: 4px; }
