:root {
  --cream: #f5eedc;
  --cream-deep: #efe4cc;
  --red: #a33b32;
  --red-deep: #9a3830;
  --red-dark: #75241b;
  --navy: #1f2a44;
  --white: #ffffff;
  --line: #e3d5bf;
  --ink: #1f2a44;
  --muted: #5c5348;
  --ok: #1d6b45;
  --warn: #8a5a12;
  --shadow: 0 10px 30px rgba(31, 42, 68, 0.08);
  --sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
}
img { max-width: 100%; }
a { color: var(--red-dark); }
button, input, select, textarea { font: inherit; font-size: 16px; }
.phone-bar, .console-bar {
  background: var(--navy);
  color: white;
  text-align: center;
  padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
}
.phone-bar img, .console-bar img { height: 84px; width: auto; }
.phone-sub, .console-sub { color: #f5eedc; font-size: 13px; letter-spacing: 0.04em; margin-top: 2px; }
.demo-bar {
  background: white;
  color: var(--navy);
  border-bottom: 3px solid var(--red);
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.demo-bar a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: var(--navy);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
}
.demo-bar form { display: flex; gap: 8px; align-items: center; flex: 1; margin: 0; }
.demo-bar label { margin: 0; flex: 1; }
.demo-bar select { min-height: 44px; width: 100%; }
.ot-lock { position: fixed; inset: 0; background: rgba(31, 42, 68, 0.55); z-index: 30; display: flex; align-items: flex-end; padding: 12px; }
.ot-lock .card { width: min(720px, 100%); margin: 0 auto; }
.phone, .wrap { width: min(720px, calc(100% - 28px)); margin: 0 auto; padding: 16px 0 calc(28px + env(safe-area-inset-bottom)); }
.console-main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 48px; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
h1 { font-size: 1.7rem; line-height: 1.15; margin: 0 0 8px; }
h2 { font-size: 1.2rem; margin: 0 0 8px; }
.card {
  background: var(--white);
  border-radius: 16px;
  padding: 16px;
  margin: 0 0 12px;
  box-shadow: var(--shadow);
}
.menu-btn, .btn, button.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 0;
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
}
.btn-primary, button.btn-primary { background: var(--red); color: white; }
.btn-primary:hover, .btn-navy:hover { filter: brightness(1.05); }
.btn-navy { background: var(--navy); color: white; }
.btn-ghost { background: transparent; border: 2px solid var(--navy); box-shadow: none; }
.btn-small { min-height: 44px; width: auto; display: inline-flex; padding: 8px 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1; }
label { display: block; font-weight: 700; margin: 12px 0 6px; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid #cbbfa8;
  background: white;
  color: var(--navy);
}
textarea { min-height: 96px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 650; background: var(--cream-deep); border-radius: 12px; padding: 12px; margin: 8px 0; }
.check input { width: 22px; height: 22px; margin-top: 2px; }
.muted { color: var(--muted); }
.flash { background: #e5f2ea; border-radius: 12px; padding: 12px 14px; }
.flash.bad, .banner-stop { background: #f8e4e0; color: var(--red-dark); }
.banner, .banner-warn, .banner-stop, .banner-info {
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 12px;
  background: white;
  box-shadow: var(--shadow);
}
.banner-warn { background: #f8e7c8; color: #5c3b09; }
.banner-info { background: white; }
.plan-tag {
  display: inline-block;
  background: var(--red-dark);
  color: white;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 0 0 8px;
}
.tag { display: inline-block; background: var(--cream-deep); border-radius: 999px; padding: 4px 8px; font-size: 13px; font-weight: 700; }
.locked { opacity: 0.55; }
.status {
  font-weight: 800;
  color: var(--red-dark);
}
table { width: 100%; border-collapse: collapse; background: white; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
th { font-size: 13px; color: var(--muted); }
.console-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; text-align: left; }
.console-bar img { height: 72px; }
.console-nav { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.console-nav a { color: #f5eedc; text-decoration: none; font-weight: 700; }
.console-nav a:hover { text-decoration: underline; }
.who { margin-left: auto; color: #f5eedc; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.sig-wrap { background: white; border: 1.5px dashed var(--navy); border-radius: 12px; touch-action: none; }
canvas.sig { width: 100%; height: 160px; touch-action: none; display: block; }
.photo { width: 100%; border-radius: 12px; background: var(--cream-deep); }
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.splash img.logo { width: min(280px, 78vw); height: auto; }
.splash .card { width: min(440px, 100%); }
.hint { font-size: 14px; }
.cal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cal a, .cal div { background: white; border-radius: 8px; padding: 6px; min-height: 72px; font-size: 12px; color: var(--navy); text-decoration: none; }
.miss { color: var(--red-dark); font-weight: 800; }
@media print {
  .console-bar, .no-print, .btn { display: none !important; }
  body { background: white; }
  .cal { grid-template-columns: repeat(4, 1fr); }
  .cal a, .cal div { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  @page { size: letter landscape; margin: 0.4in; }
}
@media (max-width: 720px) {
  .cal { grid-template-columns: repeat(2, 1fr); }
  .who { margin-left: 0; }
  .hide-sm { display: none; }
}
