:root {
  --bg: #f5f0e6;
  --panel: #ffffff;
  --panel-soft: #fff8ec;
  --ink: #102033;
  --muted: #6b6257;
  --line: #eadfce;
  --blue: #0b2a3b;
  --blue-dark: #071b27;
  --cyan: #c9792f;
  --gold: #d7903b;
  --cream: #fff3db;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(215,144,59,.20), transparent 34rem),
    radial-gradient(circle at top right, rgba(11,42,59,.10), transparent 32rem),
    linear-gradient(135deg, #fff8ec 0%, var(--bg) 55%, #eef4f4 100%);
  color: var(--ink);
}
.shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(165deg, #071b27 0%, #0b2a3b 52%, #132f3f 100%);
  color: white; padding: 26px 22px; overflow: auto;
  box-shadow: 12px 0 40px rgba(15,23,42,.18);
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.logo-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; background: linear-gradient(135deg, #f4b35f, #0b2a3b); box-shadow: 0 14px 30px rgba(215,144,59,.24); }
.image-logo { object-fit: cover; border: 1px solid rgba(255,255,255,.18); background: #fff3db; }
.brand-title { font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.brand-subtitle { color: #aebde0; font-size: 12px; margin-top: 3px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 999px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.13); color: #dbeafe; font-size: 12px; font-weight: 800; margin-bottom: 22px; }
.status-dot { width: 8px; height: 8px; border-radius: 999px; background: #22c55e; box-shadow: 0 0 0 5px rgba(34,197,94,.16); }
.sidebar nav { display: flex; flex-direction: column; gap: 8px; }
.sidebar a { color: #d7def1; text-decoration: none; padding: 11px 12px; border-radius: 12px; font-weight: 750; transition: .15s ease; }
.sidebar a:hover { color: white; background: rgba(255,255,255,.10); transform: translateX(2px); }
.sidebar-footer { position: absolute; left: 22px; right: 22px; bottom: 20px; color: #9fb0d5; font-size: 12px; line-height: 1.45; }
.content { padding: 38px; max-width: 1220px; width: 100%; }

h1 { margin: 0 0 16px; font-size: clamp(34px, 4vw, 58px); line-height: .98; letter-spacing: -0.055em; }
h2 { margin: 0 0 10px; letter-spacing: -.025em; line-height: 1.12; }
p { color: var(--muted); line-height: 1.62; }
.card { background: rgba(255,255,255,.88); border: 1px solid rgba(210,221,238,.95); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; backdrop-filter: blur(10px); }
.card.lift { transition: transform .15s ease, box-shadow .15s ease; }
.card.lift:hover { transform: translateY(-2px); box-shadow: 0 24px 60px rgba(15,23,42,.12); }
.hero { max-width: none; padding: clamp(26px, 5vw, 54px); overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 999px; right: -70px; top: -90px; background: radial-gradient(circle, rgba(215,144,59,.26), transparent 68%); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: center; position: relative; z-index: 1; }
.lead { color: #475569; font-size: 19px; max-width: 800px; }
.landing-hero h1 { max-width: 780px; }
.landing-hero .lead { font-size: clamp(18px, 2vw, 22px); }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.trust-row span { display: inline-flex; align-items: center; border-radius: 999px; padding: 8px 11px; background: rgba(255,243,219,.9); border: 1px solid var(--line); color: var(--blue-dark); font-size: 12px; font-weight: 900; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.brand-showcase { display: grid; place-items: center; min-height: 360px; border-radius: 26px; background: linear-gradient(145deg, rgba(255,243,219,.78), rgba(255,255,255,.56)); border: 1px solid rgba(234,223,206,.95); box-shadow: inset 0 1px 0 rgba(255,255,255,.72); }
.brand-showcase img { width: min(100%, 430px); display: block; filter: drop-shadow(0 24px 40px rgba(16,32,51,.12)); }
.mascot-card { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; }
.mascot-card img { width: 140px; height: 140px; object-fit: contain; filter: drop-shadow(0 18px 28px rgba(16,32,51,.12)); }
.pain-strip, .audience-card { display: grid; grid-template-columns: .85fr 1.15fr; gap: 24px; align-items: center; }
.roi-card { background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(255,248,236,.92)); }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.mini-metrics div { border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: white; }
.mini-metrics strong { display: block; font-size: 20px; color: var(--blue); }
.mini-metrics span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 800; }
.service-tags { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.service-tags span { border-radius: 999px; padding: 10px 13px; background: white; border: 1px solid var(--line); color: var(--blue-dark); font-weight: 900; box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.offer-card { border: 2px solid rgba(215,144,59,.35); }
.final-cta { background: #fff8ec; }
.grid { display: grid; gap: 18px; margin-bottom: 20px; }
.grid > .card, .grid > .flow-card { margin-bottom: 0; height: 100%; }
.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(var(--blue), var(--gold)); }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 36px; font-weight: 950; margin-top: 6px; letter-spacing: -.04em; }
.page-header, .section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.button-row, .filter-row, .meta-row, .inline-controls, .quick-actions, .mobile-action-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.quick-actions { margin: 16px 0; }
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: white; border: 0; border-radius: 12px; padding: 11px 15px; font-weight: 850; text-decoration: none; cursor: pointer; box-shadow: 0 12px 28px rgba(11,42,59,.20); }
.btn.tiny { padding: 8px 10px; font-size: 12px; border-radius: 10px; box-shadow: none; }
.btn.secondary, button.secondary { background: #eef4ff; color: var(--blue-dark); box-shadow: none; }
.btn.ghost { background: white; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
button:hover, .btn:hover { filter: brightness(.97); transform: translateY(-1px); }
.narrow { max-width: 760px; }
label { display: block; font-weight: 850; margin: 12px 0 7px; color: #24324a; }
input, textarea, select { width: 100%; border: 1px solid #d7ddea; border-radius: 12px; padding: 12px 13px; font: inherit; background: white; color: var(--ink); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, textarea:focus, select:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(37,99,235,.10); }
.inline-controls select { width: auto; min-width: 180px; }
.form-grid { display: grid; gap: 4px 14px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-actions { margin-top: 16px; }
.checkbox-row { display: flex; gap: 10px; align-items: center; font-weight: 750; }
.checkbox-row input { width: auto; }
.workspace-grid { grid-template-columns: 1.2fr 1fr 1.35fr .75fr auto; align-items: start; }
.workspace-edit-form label { margin-top: 0; }
.workspace-actions button { width: 100%; }
.workspace-users { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.workspace-users input { max-width: 260px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
th, td { text-align: left; border-bottom: 1px solid #edf1f7; padding: 14px 12px; vertical-align: top; }
th { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr:hover td { background: #f8fbff; }
.small { color: var(--muted); font-size: 12px; }
.inline-link { color: var(--blue); font-weight: 850; text-decoration: none; }
.inline-link:hover { text-decoration: underline; }
.chip, .badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 900; text-transform: capitalize; text-decoration: none; }
.chip { background: white; border: 1px solid #d9e0ef; color: #35507a; }
.chip.active, .chip:hover { background: #e8efff; color: var(--blue-dark); }
.badge.high { background: #fdecec; color: #bb2d3b; }
.badge.normal { background: #eef2ff; color: #4a5bdc; }
.badge.neutral { background: #eef2f7; color: #44506a; }
.badge.sent { background: #e8f7ee; color: #18794e; }
.detail-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 20px; }
.copy-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px; line-height: 1.55; color: #334155; }
.timeline { display: grid; gap: 14px; }
.timeline-item { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: start; }
.timeline-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--blue); margin-top: 5px; box-shadow: 0 0 0 5px rgba(37,99,235,.10); }
.timeline-dot.owner_alert_failed, .timeline-dot.customer_auto_reply_failed, .timeline-dot.manual_reply_failed { background: var(--amber); box-shadow: 0 0 0 5px rgba(217,119,6,.12); }
.timeline-dot.owner_alert_sent, .timeline-dot.customer_auto_reply_sent, .timeline-dot.manual_reply_sent { background: var(--green); box-shadow: 0 0 0 5px rgba(22,163,74,.12); }
.timeline-title { font-weight: 900; color: var(--ink); margin-bottom: 2px; }
.login-wrap { max-width: 460px; margin: 8vh auto 0; }
.login-card h1 { margin-bottom: 8px; }
.login-card button { margin-top: 14px; width: 100%; }
.alert { border-radius: 14px; padding: 13px 14px; margin: 14px 0; font-weight: 800; }
.alert.error { background: #fdecec; color: #9f1f2e; border: 1px solid #f8cfd4; }
.alert.success { background: #e8f7ee; color: #18794e; border: 1px solid #bfe7ce; }
code { background: #f1f5f9; border-radius: 6px; padding: 2px 5px; }
.flow-card { background: #0b2a3b; color: white; border-radius: 22px; padding: 20px; box-shadow: 0 28px 70px rgba(15,23,42,.24); }
.flow-card p, .flow-card .small { color: #b8c4dd; }
.flow-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.10); }
.flow-step:last-child { border-bottom: 0; }
.step-num { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--gold); color: #071b27; font-weight: 900; flex: 0 0 auto; }
.empty-state { text-align: center; padding: 34px; color: var(--muted); }
.summary-list { margin: 8px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.65; }
.report-hero { background: linear-gradient(135deg, #0b2a3b, #12384a); color: white; }
.report-hero p { color: #dbeafe; }
.report-stats .stat .value { font-size: clamp(24px, 4vw, 36px); }
.mobile-bottom-bar { display: none; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .sidebar-footer { position: static; margin-top: 24px; }
  .content { padding: 22px; }
  .hero-grid, .three, .two, .stats-grid, .detail-grid, .form-grid.two-col, .workspace-grid, .mascot-card, .pain-strip, .audience-card { grid-template-columns: 1fr; }
  .brand-showcase { min-height: 260px; }
  .mascot-card img { width: 120px; height: 120px; }
  .service-tags { justify-content: flex-start; }
}

@media (max-width: 720px) {
  body { background-attachment: fixed; }
  .sidebar { padding: 18px; }
  .brand { margin-bottom: 14px; }
  .sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sidebar a { text-align: center; padding: 10px 8px; }
  .status-pill, .sidebar-footer { display: none; }
  .content { padding: 16px; padding-bottom: 96px; }
  h1 { font-size: clamp(32px, 11vw, 42px); }
  .page-header, .section-header { display: grid; gap: 12px; }
  .card { padding: 18px; border-radius: 16px; }
  .hero { padding: 22px; }
  .trust-row span, .service-tags span { width: 100%; justify-content: center; }
  .mini-metrics { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 14px 12px; }
  .stat .label { font-size: 10px; }
  .stat .value { font-size: 28px; }
  .filter-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .chip { white-space: nowrap; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr.lead-row { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: 0 10px 24px rgba(15,23,42,.06); }
  tr.lead-row:hover td { background: transparent; }
  td { border: 0; padding: 6px 0; }
  td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
  .mobile-action-row .btn { flex: 1 1 auto; }
  .quick-actions .btn { flex: 1 1 120px; }
  .inline-controls { align-items: stretch; }
  .inline-controls select, .inline-controls button { width: 100%; }
  .mobile-bottom-bar { position: fixed; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,248,236,.94); border-top: 1px solid var(--line); box-shadow: 0 -12px 30px rgba(15,23,42,.10); backdrop-filter: blur(14px); z-index: 50; }
  .mobile-bottom-bar .btn, .mobile-bottom-bar button { width: 100%; padding: 12px 8px; font-size: 13px; }
}
