:root {
  --bg: #f2f1ec;
  --card: #ffffff;
  --ink: #141414;
  --ink-soft: #55534c;
  --muted: #9b988e;
  --line: #dedbd0;
  --line-strong: #141414;
  --indigo: #141414;       /* repurposed: dark used for selected/active states */
  --indigo-deep: #141414;
  --indigo-soft: #e8e5db;
  --red: #e01e26;
  --shadow: none;
  --radius: 0px;
  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-deep));
  display: inline-block;
}
.brand-logo { width: 40px; height: 40px; display: inline-block; }
.intro-logo { width: 96px; height: 96px; display: block; margin-bottom: 22px; }
.topbar .login {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.topbar .login:hover { color: var(--indigo); }

/* Page wrapper */
.wrap {
  max-width: 1040px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 360px 1fr;
  overflow: hidden;
  min-height: 560px;
}

/* Left panel */
.intro {
  padding: 40px 36px;
  border-right: 1px solid var(--line);
}
.intro .logo {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-deep));
  margin-bottom: 28px;
}
.intro .eyebrow {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 6px;
}
.intro h1 {
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 22px;
  letter-spacing: -0.5px;
}
.intro .meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 22px;
}
.intro .meta svg { flex: none; }
.intro .desc {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}

/* Right panel */
.picker { padding: 36px 36px 28px; }
.picker h2 {
  font-size: 22px;
  margin: 0 0 24px;
  letter-spacing: -0.3px;
}
.scheduler {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 28px;
}

/* Location picker */
.loc-picker { margin-bottom: 22px; }
.loc-label {
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 8px;
}
.loc-options { display: flex; gap: 10px; flex-wrap: wrap; }
.loc-btn {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 15px;
  padding: 11px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}
.loc-btn:hover { border-color: var(--indigo); }
.loc-btn.active {
  border-color: var(--indigo-deep);
  background: var(--indigo-deep);
  color: #fff;
}

/* Calendar */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.cal-month { font-size: 17px; font-weight: 600; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button {
  width: 34px; height: 34px;
  border: none; background: transparent;
  color: var(--indigo);
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
}
.cal-nav button:hover { background: var(--indigo-soft); }
.cal-nav button:disabled { color: var(--muted); cursor: default; background: transparent; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px 2px;
  text-align: center;
}
.cal-grid .dow {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.6px;
  padding-bottom: 8px;
}
.cal-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.day {
  width: 42px; height: 42px;
  border: none; background: transparent;
  border-radius: 50%;
  font-size: 15px;
  color: var(--muted);
  cursor: default;
  display: flex; align-items: center; justify-content: center;
}
.day.available {
  background: var(--indigo-soft);
  color: var(--indigo);
  font-weight: 700;
  cursor: pointer;
}
.day.available:hover { background: #d3deea; }
.day.selected {
  background: var(--indigo-deep);
  color: #fff;
  font-weight: 700;
}
.day.today::after {
  content: "";
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--indigo);
}
.day.selected.today::after { background: #fff; }

/* Timezone note */
.tz {
  margin-top: 24px;
  font-size: 14px;
  color: var(--ink-soft);
}
.tz .tz-title { font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.tz .tz-val { display: flex; align-items: center; gap: 8px; }

/* Time slots */
.slots-head { font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.slots {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 6px;
}
.slot {
  border: 1.5px solid var(--indigo-soft);
  background: #fff;
  color: var(--indigo);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}
.slot:hover { border-color: var(--indigo); background: #faf9ff; }
.slot.taken {
  color: var(--muted);
  border-color: var(--line);
  background: #fafafc;
  cursor: default;
  text-decoration: line-through;
}
.slots .empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

/* Modal */
.overlay {
  position: fixed; inset: 0;
  background: rgba(20, 20, 43, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.overlay.show { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 460px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.modal h3 { margin: 0 0 4px; font-size: 22px; }
.modal .when {
  color: var(--indigo);
  font-weight: 700;
  margin: 0 0 22px;
  font-size: 15px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input, .field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--indigo);
}
.field textarea { resize: vertical; min-height: 70px; }
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.btn {
  flex: 1;
  padding: 14px 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { filter: brightness(0.95); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-ghost { background: #f0f0f4; color: var(--ink-soft); }
.btn-ghost:hover { background: #e7e7ee; }
.form-error { color: var(--red); font-size: 14px; margin-top: 4px; min-height: 18px; }

/* Success state */
.success { text-align: center; padding: 14px 0; }
.success .check {
  width: 64px; height: 64px; border-radius: 50%;
  background: #e9f9ef; color: #1c9d54;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.success h3 { margin: 0 0 8px; }
.success p { color: var(--ink-soft); margin: 0 0 24px; line-height: 1.5; }
.success .btn { flex: none; min-width: 180px; padding-left: 28px; padding-right: 28px; }

/* ===== Dashboard ===== */
.dash-wrap { max-width: 860px; margin: 40px auto; padding: 0 20px; }

/* Login card */
.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 420px;
  margin: 60px auto;
  padding: 40px 36px;
}
.login-card .logo {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-deep));
  margin-bottom: 24px;
}
.login-card h1 { font-size: 24px; margin: 0 0 6px; }
.login-card .sub { color: var(--ink-soft); margin: 0 0 26px; font-size: 15px; line-height: 1.5; }

/* Dashboard header */
.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dash-head h1 { font-size: 26px; margin: 0; }
.dash-sub { color: var(--ink-soft); margin: 0 0 24px; font-size: 15px; }

.dash-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.dash-tabs button {
  border: none; background: transparent;
  color: var(--ink-soft); font-weight: 700; font-size: 15px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
.dash-tabs button.active { background: var(--indigo-soft); color: var(--indigo); }

/* Booking rows */
.booking {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(20,20,43,0.04);
}
.booking .when { font-weight: 800; color: var(--indigo-deep); font-size: 15px; }
.booking .when .time { color: var(--indigo); display: block; margin-top: 2px; }
.booking .loc-badge {
  display: inline-block; margin-top: 8px;
  background: var(--indigo-soft); color: var(--indigo-deep);
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.booking .who { }
.booking .who .nm { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.booking .who .ct { color: var(--ink-soft); font-size: 14px; margin-bottom: 3px; }
.booking .who .ct a { color: var(--indigo); text-decoration: none; }
.booking .who .nt {
  margin-top: 10px; padding: 10px 12px;
  background: #f7f7fb; border-radius: 8px;
  color: var(--ink-soft); font-size: 14px; line-height: 1.45;
}
.cal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cal-btn {
  display: inline-block;
  border: 1.5px solid var(--indigo-soft);
  background: #fff;
  color: var(--indigo);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.cal-btn:hover { border-color: var(--indigo); background: #faf9ff; }
.cal-btn.ghost { color: var(--ink-soft); }
.cal-btn.danger { color: var(--red); border-color: #f6cfc7; margin-left: auto; }
.cal-btn.danger:hover { border-color: var(--red); background: #fff5f3; }
.dash-empty {
  text-align: center; color: var(--ink-soft);
  padding: 50px 20px; font-size: 15px;
  background: var(--card); border: 1px dashed var(--line); border-radius: 12px;
}
.dash-error { color: var(--red); font-size: 14px; margin-top: 4px; min-height: 18px; }

/* Mobile */
@media (max-width: 820px) {
  .topbar { padding: 16px 20px; }
  .wrap { margin: 20px auto; }
  .card { grid-template-columns: 1fr; min-height: 0; }
  .intro { border-right: none; border-bottom: 1px solid var(--line); padding: 28px 24px; }
  .intro h1 { font-size: 26px; }
  .picker { padding: 26px 24px; }
  .scheduler { grid-template-columns: 1fr; gap: 26px; }
  .slots { max-height: none; }
  .day { width: 38px; height: 38px; }
  .booking { grid-template-columns: 1fr; gap: 8px; }
  .login-card { margin: 30px auto; padding: 30px 24px; }
}

/* =====================================================================
   FIELD MANUAL REBRAND — matches ctxo.com (cream / black / red, sharp)
   ===================================================================== */

/* Headings use Oswald, condensed uppercase */
.intro h1, .picker h2, .dash-head h1, .login-card h1, .modal h3, .success h3 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-weight: 700;
  line-height: 1.02;
}
.intro h1 { font-size: 40px; }
.picker h2 { font-size: 20px; letter-spacing: 0.02em; }

/* Top bar: cream, hard bottom rule */
.topbar {
  background: var(--bg);
  border-bottom: 2px solid var(--line-strong);
  padding: 16px 32px;
}
.brand { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; gap: 12px; }
.brand-logo { width: 38px; height: 38px; }
.topbar .login {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.topbar .login:hover { color: var(--red); }

/* Field-manual document strip under the header */
.docstrip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
  padding: 7px 32px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.docstrip .ds-mid { color: var(--red); }

/* Card: sharp, thin dark frame, no shadow */
.card, .login-card {
  border: 1.5px solid var(--line-strong);
  border-radius: 0;
  box-shadow: none;
  background: var(--card);
}
.intro { border-right: 1.5px solid var(--line-strong); }
.intro-logo { width: 92px; height: 92px; }
.intro .eyebrow, .loc-label, .tz .tz-title {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  font-size: 12px;
  color: var(--red);
}
.intro .eyebrow { margin-bottom: 10px; }
.slots-head {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}
.intro .meta { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; }

/* Location toggle: sharp, active = solid black */
.loc-btn {
  border-radius: 0;
  border: 1.5px solid var(--line-strong);
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  color: var(--ink);
}
.loc-btn:hover { border-color: var(--red); color: var(--red); }
.loc-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.loc-btn.active:hover { color: #fff; }

/* Calendar days: square cells */
.day { border-radius: 0; font-family: var(--font-body); font-weight: 600; }
.day.available { background: var(--indigo-soft); color: var(--ink); }
.day.available:hover { background: #dcd8cc; }
.day.selected { background: var(--ink); color: #fff; }
.day.today::after { background: var(--red); }
.day.selected.today::after { background: #fff; }
.cal-nav button { border-radius: 0; color: var(--ink); }
.cal-nav button:hover { background: var(--indigo-soft); color: var(--red); }
.cal-month { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.02em; font-weight: 600; }
.cal-grid .dow { font-family: var(--font-body); letter-spacing: 0.1em; }

/* Time slots: sharp, hard border, hover inverts to black */
.slot {
  border-radius: 0;
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.slot:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.slot.taken { border-color: var(--line); color: var(--muted); background: #f4f2ec; }

/* Buttons: sharp red primary, uppercase, tracked */
.btn {
  border-radius: 0;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* Modal + inputs: sharp */
.modal { border-radius: 0; border: 1.5px solid var(--line-strong); box-shadow: none; }
.modal .when { color: var(--red); }
.field label { text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; }
.field input, .field textarea { border-radius: 0; border: 1.5px solid var(--line-strong); }
.field input:focus, .field textarea:focus { border-color: var(--red); }

/* Dashboard */
.dash-head h1 { font-size: 30px; }
.dash-sub, .dash-count { font-family: var(--font-body); }
.dash-tabs button {
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 13px;
  border: 1.5px solid transparent;
}
.dash-tabs button.active { background: var(--ink); color: #fff; }
.booking { border-radius: 0; border: 1.5px solid var(--line-strong); box-shadow: none; }
.booking .when { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.01em; color: var(--ink); }
.booking .when .time { color: var(--red); }
.booking .loc-badge {
  background: var(--ink); color: #fff; border-radius: 0;
  text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--font-body);
}
.booking .who .nm { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.01em; font-size: 18px; }
.cal-btn { border-radius: 0; border: 1.5px solid var(--line-strong); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--ink); }
.cal-btn:hover { background: var(--ink); color: #fff; }
.cal-btn.ghost { color: var(--ink-soft); }
.cal-btn.danger { color: #fff; background: var(--red); border-color: var(--red); }
.cal-btn.danger:hover { background: #b81219; border-color: #b81219; color: #fff; }
.dash-empty { border-radius: 0; }
.success .check { border-radius: 0; background: var(--ink); color: #fff; }

/* Mobile: stack the doc strip tidily */
@media (max-width: 820px) {
  .topbar { padding: 14px 18px; }
  .docstrip { padding: 6px 18px; font-size: 9px; letter-spacing: 0.1em; gap: 8px; }
  .docstrip span:last-child { display: none; }
  .intro { border-right: none; border-bottom: 1.5px solid var(--line-strong); }
  .intro h1 { font-size: 32px; }
}
