/* The serif's dollar sign (full vertical bar) looks odd next to the numerals: take just U+0024 from a system sans. */
@font-face { font-family: 'CurrencySans'; src: local('Segoe UI'), local('Helvetica Neue'), local('Helvetica'), local('Arial'); unicode-range: U+0024; }
/* Shared UI for login / signup / checkout / student app / admin */
:root {
  --navy: #14224a; --navy-2: #1e2f63; --rose: #c93f73; --rose-dark: #a8305d; --teal: #1fa99a; --teal-bg: #e6f6f4;
  --sky: #eaf2fb; --sky-2: #f4f8fd; --ivory: #fbfaf7; --ink: #1b2135; --muted: #5b6478; --line: #e4e8ef; --line-2: #d3d9e4; --white: #fff;
  --ok: #1e9e63; --ok-bg: #e7f7ee; --warn: #b7791f; --warn-bg: #fdf3df; --bad: #c92a2a; --bad-bg: #fdecec;
  --shadow: 0 10px 30px rgba(20, 34, 74, 0.08); --r: 12px; --r-lg: 18px;
  --display: 'CurrencySans', 'Newsreader', 'Iowan Old Style', Georgia, serif; --body: 'DM Sans', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--sky-2); font-size: 15px; line-height: 1.5; min-height: 100vh; }
h1, h2, h3 { font-family: var(--display); color: var(--navy); margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.12; }
.i { width: 20px; height: 20px; flex: none; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 17px; }
p { margin: 0; }
a { color: var(--navy); }
button { font: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 12px; } .mt2 { margin-top: 20px; } .mt3 { margin-top: 32px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 500; font-size: 20px; color: var(--navy); white-space: nowrap; }
.brand em { color: var(--rose); font-style: italic; font-weight: 400; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--display); font-style: italic; font-size: 18px; line-height: 1; flex: none; }

/* Buttons + forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 9px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background 0.15s, border-color 0.15s; white-space: nowrap; font-size: 15px; line-height: 1.2; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-2); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--navy); }
.btn-danger { background: var(--bad-bg); color: var(--bad); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font-weight: 500; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 11px 13px; border: 1px solid var(--line-2, #d3d9e4); border-radius: 9px; background: #fff; color: var(--ink); outline: none; transition: border-color 0.15s; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 16px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 500; color: var(--ink); }
.check input { width: auto; margin-top: 3px; }

/* Alerts / badges */
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-bad { background: var(--bad-bg); color: var(--bad); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--sky); color: var(--navy); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--sky); color: var(--navy); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-rose { background: #fde8ef; color: var(--rose-dark); }
.badge-teal { background: var(--teal-bg); color: #137a6f; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--navy); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: all 0.25s; z-index: 200; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--bad); }

/* Auth / checkout shells */
.shell { max-width: 460px; margin: 0 auto; padding: 40px 16px 60px; }
.shell-wide { max-width: 920px; }
.shell .brand { margin-bottom: 26px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; }
.panel + .panel { margin-top: 16px; }
.panel h1 { font-size: 26px; margin-bottom: 6px; }
.panel .sub { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Checkout */
.co-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; align-items: start; }
@media (max-width: 800px) { .co-grid { grid-template-columns: 1fr; } }
.pkg-list { display: grid; gap: 10px; }
.pkg { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; position: relative; }
.pkg.selected { border-color: var(--navy); box-shadow: 0 0 0 3px var(--sky); }
.pkg input { width: auto; margin: 0; }
.pkg .name { font-weight: 600; color: var(--navy); }
.pkg .blurb { font-size: 13px; color: var(--muted); }
.pkg .price { margin-left: auto; text-align: right; font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--navy); }
.pkg .price small { display: block; font-family: var(--body); font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.pkg .badge { position: absolute; top: -9px; left: 14px; }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 480px) { .methods { grid-template-columns: 1fr; } }
.method { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; background: #fff; font-weight: 600; color: var(--navy); display: grid; gap: 8px; justify-items: center; }
.method .ic .i { width: 26px; height: 26px; }
.method.selected { border-color: var(--navy); box-shadow: 0 0 0 3px var(--sky); }
.method .ic { font-size: 22px; }
.method .mode { font-size: 11px; font-weight: 600; color: var(--warn); }
.summary { position: sticky; top: 16px; }
.summary .line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary .total { display: flex; justify-content: space-between; padding: 14px 0 4px; font-weight: 700; font-size: 18px; color: var(--navy); }
.zelle-box { background: var(--sky-2); border: 1px dashed var(--navy); border-radius: 12px; padding: 16px; margin-top: 14px; }
.zelle-box dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0 0; font-size: 14px; }
.zelle-box dt { color: var(--muted); } .zelle-box dd { margin: 0; font-weight: 600; }
.copy { font-family: ui-monospace, Menlo, Consolas, monospace; background: #fff; border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }
.test-banner { background: #fff4d6; color: #7a5300; border: 1px solid #f3d58a; border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }

/* App layout */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; }
.side .brand { margin: 4px 8px 22px; }
.side a.tab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; }
.side a.tab .ic { width: 22px; display: grid; place-items: center; color: var(--muted); }
.side a.tab.active .ic { color: var(--navy); }
.side a.tab.active { background: var(--sky); color: var(--navy); font-weight: 600; }
.side a.tab:hover { color: var(--navy); }
.side .count { margin-left: auto; background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 7px; }
.side .foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.side .foot .name { font-weight: 600; color: var(--navy); }
.main { padding: 26px 32px 60px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 28px; }
.bell { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; color: var(--navy); }
.bell .dot { position: absolute; top: 6px; right: 7px; min-width: 16px; height: 16px; background: var(--rose); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.notif-pop { position: absolute; right: 0; top: 50px; width: 340px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 60; max-height: 420px; overflow: auto; }
.notif-pop .n { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.notif-pop .n.unread { background: var(--sky-2); }
.notif-pop .n b { display: block; color: var(--navy); }
.notif-pop .n small { color: var(--muted); }
.view { display: none; } .view.active { display: block; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat .v { font-family: var(--display); font-size: 32px; font-weight: 500; color: var(--navy); line-height: 1; }
.stat .k { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 500; }
.stat.accent { background: var(--navy); border-color: var(--navy); } .stat.accent .v, .stat.accent .k { color: #fff; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 20px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.list { display: grid; gap: 10px; }
.item { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; flex-wrap: wrap; }
.item .date { min-width: 64px; text-align: center; background: var(--sky); border-radius: 10px; padding: 8px 6px; }
.item .date b { display: block; font-family: var(--display); font-size: 22px; color: var(--navy); line-height: 1; }
.item .date span { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.item .body { flex: 1; min-width: 180px; }
.item .body b { color: var(--navy); }
.item .body .meta { font-size: 13px; color: var(--muted); }
.item .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; font-size: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: var(--sky-2); }
.tbl-wrap { overflow-x: auto; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--navy); border-color: var(--rose); }

/* Booking calendar (student) */
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-head .range { font-family: var(--display); font-size: 20px; color: var(--navy); font-weight: 600; }
.cal-head select { width: auto; padding: 8px 10px; font-size: 13px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
@media (max-width: 900px) { .week { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .week { grid-template-columns: 1fr; } }
.day { background: var(--sky-2); border-radius: 12px; padding: 10px 8px; min-height: 90px; }
.day.today { outline: 2px solid var(--teal); }
.day h4 { margin: 0 0 8px; font-family: var(--body); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); text-align: center; }
.day h4 b { display: block; font-family: var(--display); font-size: 20px; color: var(--navy); letter-spacing: 0; text-transform: none; }
.day .none { font-size: 12px; color: var(--muted); text-align: center; padding: 8px 0; }
.slot { display: block; width: 100%; margin: 6px 0; padding: 8px 6px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); font-weight: 600; font-size: 13px; cursor: pointer; }
.slot:hover { border-color: var(--navy); }
.slot.selected { background: var(--navy); color: #fff; border-color: var(--navy); }
@media (max-width: 600px) { .day { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .day h4 { width: 100%; text-align: left; display: flex; gap: 8px; align-items: baseline; } .slot { width: auto; margin: 0; padding: 8px 12px; } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 34, 74, 0.45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 18px; padding: 24px; width: 100%; max-width: 480px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal h2 { font-size: 22px; margin-bottom: 6px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* Chat */
.chat { display: grid; grid-template-rows: 1fr auto; height: min(70vh, 640px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.chat .log { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--sky-2); }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--navy); color: #fff; border-color: var(--navy); }
.msg small { display: block; font-size: 11px; opacity: 0.65; margin-top: 4px; }
.chat form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat textarea { min-height: 44px; max-height: 140px; }
.threads { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
@media (max-width: 800px) { .threads { grid-template-columns: 1fr; } .threads .tlist { max-height: 220px; overflow: auto; } }
.tlist { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tlist button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; cursor: pointer; }
.tlist button.active { background: var(--sky); }
.tlist b { display: block; color: var(--navy); font-size: 14px; }
.tlist small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Admin week grid */
.agrid-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.agrid { display: grid; grid-template-columns: 70px repeat(7, minmax(120px, 1fr)); min-width: 900px; font-size: 12px; }
.agrid .hd { position: sticky; top: 0; background: #fff; z-index: 2; padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--muted); }
.agrid .hd b { display: block; font-family: var(--display); font-size: 18px; color: var(--navy); }
.agrid .hd.today b { color: var(--rose); }
.agrid .tm { padding: 4px 6px; text-align: right; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11px; white-space: nowrap; }
.agrid .cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 44px; position: relative; cursor: pointer; background: #fff; }
.agrid .cell.open { background: var(--teal-bg); }
.agrid .cell.blocked { background: repeating-linear-gradient(135deg, #f6f7fa 0 6px, #eceff5 6px 12px); }
.agrid .cell.past { background: #f3f4f7; opacity: 0.7; cursor: default; }
.agrid .cell.past.open { background: #e9f1ef; }
.agrid .cell:hover:not(.past) { outline: 2px solid var(--navy); outline-offset: -2px; z-index: 1; }
.agrid .bk { position: absolute; left: 3px; right: 3px; top: 2px; background: var(--navy); color: #fff; border-radius: 6px; padding: 4px 6px; font-weight: 600; z-index: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-shadow: 0 2px 6px rgba(20,34,74,.25); }
.agrid .bk.completed { background: var(--ok); } .agrid .bk.no_show { background: var(--bad); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; align-items: center; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; border: 1px solid var(--line); }
.hours-editor .dayrow { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours-editor .ranges { display: flex; flex-direction: column; gap: 6px; }
.hours-editor .range { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hours-editor select { width: auto; padding: 6px 8px; font-size: 13px; }

/* Mobile app nav */
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 50; }
  .side .brand, .side .foot { display: none; }
  .side a.tab { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 8px; }
  .side .count { position: absolute; margin: 0; transform: translate(14px, -6px); }
  .side a.tab { position: relative; }
  .main { padding: 18px 14px 90px; }
  .topbar h1 { font-size: 24px; }
}
