:root {
  --ink: #15221d;
  --muted: #64716a;
  --surface: #ffffff;
  --canvas: #f4f6f2;
  --line: #dfe5df;
  --deep: #163f35;
  --green: #1d7a5d;
  --green-soft: #e8f4ee;
  --gold: #b78b3e;
  --shadow: 0 18px 45px rgba(24, 47, 39, .08);
  --radius: 20px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 4vw; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: white; background: linear-gradient(145deg, #1b5a48, #102f28); font-weight: 800; letter-spacing: -.04em; box-shadow: 0 7px 20px rgba(22,63,53,.18); }
.brand-mark.large { width: 54px; height: 54px; border-radius: 16px; font-size: 18px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { color: var(--muted); margin-top: 1px; font-size: 11px; }
.topnav { display: flex; align-items: center; gap: 24px; }
.topnav a, .text-button { border: 0; background: transparent; color: #4f5e56; text-decoration: none; font-size: 13px; font-weight: 650; cursor: pointer; padding: 10px 2px; }
.topnav form { margin: 0; }
.topnav a:hover, .text-button:hover { color: var(--deep); }
.page-shell { width: min(1440px, 92vw); margin: 0 auto; padding: 38px 0 64px; }
.hero-panel { min-height: 230px; padding: 42px 46px; border-radius: 28px; color: white; background: radial-gradient(circle at 85% 10%, rgba(211,179,102,.22), transparent 30%), linear-gradient(135deg, #174d3f, #102d27 68%, #0e2822); display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; box-shadow: 0 24px 60px rgba(16,45,39,.18); position: relative; overflow: hidden; }
.hero-panel::after { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -110px; bottom: -150px; box-shadow: 0 0 0 46px rgba(255,255,255,.025), 0 0 0 92px rgba(255,255,255,.02); }
.eyebrow, .auth-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 800; color: var(--green); }
.hero-panel .eyebrow { color: #b7dacd; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.02; letter-spacing: -.045em; margin-bottom: 14px; }
h2 { font-size: 24px; letter-spacing: -.025em; margin: 4px 0 0; }
h3 { font-size: 19px; letter-spacing: -.018em; margin: 18px 0 7px; }
.hero-panel p { color: #cfddd8; font-size: 17px; max-width: 620px; margin: 0; }
.hero-status { display: flex; align-items: center; gap: 13px; min-width: 250px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); padding: 16px 18px; border-radius: 16px; z-index: 1; }
.hero-status strong, .hero-status small { display: block; }
.hero-status strong { font-size: 13px; }
.hero-status small { color: #adc2ba; font-size: 11px; margin-top: 4px; }
.status-pulse { width: 10px; height: 10px; border-radius: 50%; background: #59d39a; box-shadow: 0 0 0 6px rgba(89,211,154,.12); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 22px 0 42px; }
.kpi-grid.three { grid-template-columns: repeat(3, 1fr); }
.kpi-card { background: var(--surface); border: 1px solid var(--line); padding: 23px; border-radius: 18px; box-shadow: 0 8px 28px rgba(24,47,39,.035); position: relative; overflow: hidden; }
.kpi-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #39755f; }
.kpi-card.accent-green::before { background: #27a16e; }
.kpi-card.accent-maroon::before { background: #804252; }
.kpi-card.accent-violet::before { background: #6754a4; }
.kpi-card.accent-amber::before { background: #b78b3e; }
.kpi-label { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .095em; font-weight: 800; }
.kpi-card strong { display: block; font-size: 34px; line-height: 1; margin: 14px 0 10px; letter-spacing: -.045em; }
.kpi-card small { color: var(--muted); font-size: 12px; }
.section-heading, .panel-heading, .page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.section-heading { margin-bottom: 16px; }
.privacy-pill, .security-shield { background: var(--green-soft); color: var(--deep); border: 1px solid #cbe3d7; border-radius: 999px; padding: 8px 12px; font-size: 11px; font-weight: 750; }
.system-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 34px; }
.system-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-height: 265px; display: flex; flex-direction: column; box-shadow: 0 8px 28px rgba(24,47,39,.035); transition: transform .18s ease, box-shadow .18s ease; }
.system-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.system-card-top, .card-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.system-monogram { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: #edf3f0; color: #235f4e; font-size: 12px; font-weight: 850; letter-spacing: -.02em; }
.system-card.maroon .system-monogram, .system-monogram.maroon { background: #f4e9ec; color: #783a4c; }
.system-card.blue .system-monogram, .system-monogram.blue { background: #e9f0f8; color: #315c89; }
.system-card.violet .system-monogram, .system-monogram.violet { background: #eeeaf8; color: #5b4a94; }
.system-card.teal .system-monogram, .system-monogram.teal { background: #e5f3f3; color: #216e6f; }
.system-card.amber .system-monogram, .system-monogram.amber { background: #f8f0df; color: #856526; }
.system-card.green .system-monogram, .system-monogram.green { background: #e6f4ea; color: #287442; }
.health-badge { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 6px 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.health-badge span { width: 6px; height: 6px; border-radius: 50%; }
.health-badge.healthy { background: #ebf7f0; color: #26744f; }
.health-badge.healthy span { background: #38a870; }
.health-badge.degraded { background: #fff1eb; color: #a04b2a; }
.health-badge.degraded span { background: #d76940; }
.system-card > p { color: var(--muted); font-size: 13px; line-height: 1.5; min-height: 40px; }
.mini-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 15px 0; margin: auto 0 18px; border-top: 1px solid #edf0ed; border-bottom: 1px solid #edf0ed; }
.mini-metrics strong, .mini-metrics span { display: block; }
.mini-metrics strong { font-size: 21px; letter-spacing: -.03em; }
.mini-metrics span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.card-actions form { margin: 0; }
.launch-button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--deep); padding: 0; text-decoration: none; font-size: 12px; font-weight: 800; cursor: pointer; }
.launch-button:hover { color: var(--green); }
.latency { color: #919b96; font-size: 10px; }
.split-grid { display: grid; grid-template-columns: 1.8fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 8px 28px rgba(24,47,39,.035); }
.panel-heading { align-items: center; margin-bottom: 20px; }
.legend { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.legend-leads, .legend-bookings { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend-leads { background: #1d7a5d; margin-left: 8px; }
.legend-bookings { background: #c3a05c; margin-left: 8px; }
.bar-chart { min-height: 160px; display: flex; align-items: flex-end; gap: 8px; padding-top: 10px; }
.bar-day { flex: 1; min-width: 0; text-align: center; }
.bar-pair { height: 124px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid #e8ece9; }
.bar { width: min(13px, 38%); display: block; border-radius: 4px 4px 1px 1px; transition: height .4s ease; }
.bar.leads { background: #1d7a5d; }
.bar.bookings { background: #c3a05c; }
.bar-day small { display: block; margin-top: 7px; color: #8a948f; font-size: 9px; }
.host-list { display: grid; gap: 0; }
.host-list div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #edf0ed; }
.host-list div:last-child { border-bottom: 0; }
.host-list span { color: var(--muted); font-size: 12px; }
.host-list strong { font-size: 13px; }
.source-panel { margin-top: 16px; }
.panel-note { color: var(--muted); font-size: 11px; }
.source-table-wrap { overflow-x: auto; }
.source-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.source-table th { color: var(--muted); text-align: left; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.source-table td { padding: 13px 12px; border-bottom: 1px solid #edf0ed; }
.source-table tr:last-child td { border-bottom: 0; }
.status-text { font-weight: 750; font-size: 11px; }
.status-text.good { color: #27774f; }
.status-text.warn { color: #9b5d32; }
.auth-page { min-height: 100vh; background: radial-gradient(circle at 15% 15%, rgba(57,117,95,.12), transparent 30%), radial-gradient(circle at 85% 90%, rgba(183,139,62,.10), transparent 30%), #eef2ed; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 0; }
.auth-card, .enrol-card { width: min(470px, 92vw); background: rgba(255,255,255,.96); border: 1px solid rgba(210,219,213,.9); border-radius: 28px; padding: 38px; box-shadow: 0 25px 70px rgba(24,47,39,.13); }
.auth-card-wide, .enrol-card { width: min(880px, 92vw); }
.auth-brand { margin-bottom: 28px; }
.auth-card h1, .enrol-card h1 { font-size: clamp(30px, 5vw, 42px); margin: 8px 0 12px; }
.auth-intro { color: var(--muted); line-height: 1.58; margin-bottom: 26px; }
.form-stack { display: grid; gap: 10px; }
.form-stack label { font-size: 12px; font-weight: 750; margin-top: 6px; }
.form-stack input { width: 100%; border: 1px solid #ccd5cf; border-radius: 12px; background: white; padding: 13px 14px; outline: none; color: var(--ink); }
.form-stack input:focus { border-color: #478f75; box-shadow: 0 0 0 4px rgba(71,143,117,.12); }
.primary-button, .secondary-button { border: 0; border-radius: 12px; padding: 14px 18px; font-weight: 800; cursor: pointer; text-align: center; }
.primary-button { color: white; background: linear-gradient(135deg, #1d6f56, #154b3e); margin-top: 12px; box-shadow: 0 10px 25px rgba(29,111,86,.18); }
.primary-button:hover { background: #174f40; }
.secondary-button { color: var(--deep); background: #e7efeb; }
.button-link { display: inline-block; text-decoration: none; }
.security-note { display: flex; align-items: center; justify-content: center; gap: 8px; color: #7c8982; font-size: 11px; margin: 25px 0 0; }
.security-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ba675; }
.alert { border-radius: 12px; padding: 12px 14px; font-size: 12px; line-height: 1.45; margin-bottom: 16px; }
.alert.error { background: #fff0ec; color: #8d3c2c; border: 1px solid #f1cbc1; }
.alert.info { background: #edf4f0; color: #315d4d; border: 1px solid #d6e5dd; }
.enrol-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 34px; margin-top: 28px; }
.qr-panel { text-align: center; background: #f5f7f4; border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.qr-panel img { max-width: 100%; height: auto; }
.qr-panel p, .field-help, .recovery-preview p { color: var(--muted); font-size: 11px; line-height: 1.45; }
.secret-code { font-size: 11px; word-break: break-all; background: #e7ece8; border-radius: 7px; padding: 6px 8px; }
.recovery-preview { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 22px; }
.recovery-preview h2 { font-size: 18px; }
.code-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.code-grid code { background: #eef2ef; border: 1px solid #dbe2dd; border-radius: 8px; padding: 9px; text-align: center; font-size: 11px; font-weight: 750; }
.code-grid.prominent { margin: 22px 0; }
.success-mark { width: 48px; height: 48px; display: grid; place-items: center; color: white; background: #2c8d65; border-radius: 50%; font-weight: 900; margin-bottom: 24px; }
.otp-input { text-align: center; letter-spacing: .25em; font-size: 22px !important; font-weight: 750; }
.handoff-card { text-align: center; }
.loading-ring { width: 48px; height: 48px; border: 4px solid #dfe8e3; border-top-color: #1d7a5d; border-radius: 50%; margin: 0 auto 24px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { font-size: 44px; margin: 5px 0 9px; }
.page-heading p { color: var(--muted); margin: 0; }
.security-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.security-card strong { display: block; font-size: 15px; margin-bottom: 8px; }
.security-card p, .privacy-panel p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0; }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: 12px; margin-bottom: 24px; }
.detail-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 25px; }
.detail-hero .system-monogram { width: 64px; height: 64px; border-radius: 18px; font-size: 16px; }
.detail-hero h1 { font-size: 42px; margin: 5px 0 7px; }
.detail-hero p { color: var(--muted); margin: 0; }
.privacy-panel { max-width: 720px; }
.integration-status { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.integration-status h2 { margin-bottom: 8px; }
.integration-status p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0; max-width: 680px; }
.integration-status.degraded { border-color: #efc5b8; background: #fff9f6; }
.integration-status .primary-button { margin-top: 0; white-space: nowrap; }
.kpi-grid.four { grid-template-columns: repeat(4, 1fr); }
.data-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.data-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-list { display: grid; }
.compact-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 13px 0; border-bottom: 1px solid #edf0ed; }
.compact-row:last-child { border-bottom: 0; }
.compact-row strong, .compact-row small { display: block; }
.compact-row strong { font-size: 13px; line-height: 1.35; }
.compact-row small, .compact-row > span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.compact-row > span { white-space: nowrap; text-align: right; }
.activity-row { align-items: flex-start; }
.empty-copy { color: var(--muted); font-size: 12px; margin: 0; }
@media (max-width: 980px) {
  .system-grid, .kpi-grid, .kpi-grid.four { grid-template-columns: repeat(2, 1fr); }
  .split-grid { grid-template-columns: 1fr; }
  .hero-panel { align-items: flex-start; flex-direction: column; }
  .data-grid.two-up { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .topbar { height: auto; padding: 14px 5vw; align-items: flex-start; }
  .brand small { display: none; }
  .topnav { gap: 13px; }
  .topnav a, .text-button { font-size: 11px; }
  .page-shell { width: min(92vw, 560px); padding-top: 22px; }
  .hero-panel { padding: 30px 25px; min-height: 280px; border-radius: 22px; }
  .hero-panel h1 { font-size: 40px; }
  .hero-status { min-width: 0; width: 100%; }
  .system-grid, .kpi-grid, .kpi-grid.three, .kpi-grid.four, .security-grid { grid-template-columns: 1fr; }
  .kpi-grid { margin-bottom: 32px; }
  .enrol-grid { grid-template-columns: 1fr; }
  .auth-card, .enrol-card { padding: 28px 23px; border-radius: 22px; }
  .code-grid { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 20px 17px; }
  .panel-heading, .section-heading, .page-heading { align-items: flex-start; flex-direction: column; }
  .integration-status { align-items: flex-start; flex-direction: column; }
  .integration-status .primary-button { width: 100%; }
  .bar-chart { gap: 3px; }
  .bar-day small { font-size: 8px; }
}
