:root {
  --ink: #17241f;
  --muted: #66736e;
  --paper: #f5f7f4;
  --card: #ffffff;
  --line: #dce3de;
  --green: #176b52;
  --green-dark: #0f513e;
  --green-soft: #e8f4ee;
  --amber: #a86409;
  --amber-soft: #fff4dc;
  --red: #a53c32;
  --red-soft: #fdecea;
  --blue-soft: #eaf1fb;
  --violet-soft: #f0ebfa;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(22, 42, 34, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
.topbar { height: 72px; padding: 0 max(24px, calc((100vw - 1280px) / 2)); display: flex; align-items: center; gap: 34px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.brand { font-weight: 850; font-size: 21px; letter-spacing: -.7px; text-decoration: none; margin-right: auto; }
.brand span { color: var(--green); }
.topbar nav { display: flex; gap: 24px; }
.topbar nav a { text-decoration: none; font-size: 14px; color: var(--muted); }
.topbar nav a:hover { color: var(--ink); }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.topbar-user form { margin: 0; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--green); }
.page { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0 80px; }
.footer { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.eyebrow { color: var(--green); letter-spacing: .14em; font-size: 11px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { letter-spacing: -.045em; line-height: 1.02; }
h2 { letter-spacing: -.025em; }
p { color: var(--muted); line-height: 1.65; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--green); border-radius: 12px; background: var(--green); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; transition: .16s ease; }
.button:hover { transform: translateY(-1px); background: var(--green-dark); }
.button-quiet { background: #fff; color: var(--green); border-color: var(--line); }
.button-danger { background: #fff; color: var(--red); border-color: #e6c4c0; }
.button-small { min-height: 35px; padding: 7px 12px; font-size: 12px; }
.button-full { width: 100%; }
.landing { background: radial-gradient(circle at 82% 18%, #d8eee3 0, transparent 28%), var(--paper); }
.hero { padding: 80px 0 90px; max-width: 920px; }
.hero h1 { font-size: clamp(52px, 7vw, 92px); margin: 16px 0 24px; }
.hero h1 span { color: var(--green); }
.hero > p { max-width: 710px; font-size: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-grid article, .panel, .public-card, .auth-card, .quote-document, .booking-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-grid article { padding: 26px; }
.feature-grid article > span { color: var(--green); font-family: ui-monospace, monospace; font-size: 12px; }
.feature-grid h2 { margin: 38px 0 10px; font-size: 19px; }
.feature-grid p { margin: 0; font-size: 14px; }
.public-flow { background: radial-gradient(circle at 15% 0%, #e2f2e9, transparent 30%), var(--paper); }
.public-flow .page { width: min(1100px, calc(100% - 32px)); }
.public-card, .auth-card { width: min(680px, 100%); margin: 30px auto; padding: clamp(28px, 6vw, 58px); }
.public-card h1, .auth-card h1 { font-size: clamp(36px, 5vw, 54px); margin: 14px 0; }
.lead { font-size: 17px; }
.company-mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; margin-bottom: 22px; background: var(--ink); color: #fff; font-weight: 850; }
.ai-disclosure { padding: 13px 15px; margin: 24px 0; background: var(--green-soft); border: 1px solid #c8dfd3; border-radius: 12px; color: var(--green-dark); font-size: 13px; }
.pulse, .status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 100%; margin-right: 7px; background: #25a673; box-shadow: 0 0 0 4px rgba(37,166,115,.12); }
.stack { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #34433d; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #cfd8d2; border-radius: 11px; background: #fff; padding: 11px 12px; color: var(--ink); outline: none; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,82,.1); }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.span-two { grid-column: span 2; }
.fineprint { font-size: 11px; line-height: 1.5; }
.conversation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.chat-panel, .summary-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.chat-panel { min-height: 680px; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.chat-header strong, .chat-header small { display: block; }
.chat-header small { margin: 3px 0 0 18px; color: var(--muted); font-size: 11px; }
.badge { border: 1px solid var(--line); border-radius: 99px; padding: 6px 9px; font-size: 11px; }
.messages { padding: 28px; overflow: auto; max-height: 560px; }
.message { display: flex; gap: 10px; margin-bottom: 18px; align-items: flex-end; }
.message > div { max-width: 78%; }
.message p { padding: 12px 15px; margin: 0; border-radius: 15px; font-size: 14px; color: var(--ink); line-height: 1.5; white-space: pre-line; }
.message small { color: #89938f; font-size: 10px; margin: 4px 5px; display: block; }
.message-client { justify-content: flex-end; }
.message-client p { background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.message-assistant p { background: #f0f3f1; border-bottom-left-radius: 4px; }
.message-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 900; flex: 0 0 auto; }
.chat-composer { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--line); }
.chat-composer textarea { resize: none; }
.send-button { width: 47px; border: 0; border-radius: 12px; background: var(--green); color: white; font-size: 22px; }
.summary-panel { padding: 24px; }
.summary-panel h2 { margin: 8px 0 18px; }
.status-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: 11px; }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 99px; background: #eef1ef; color: #54625c; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.status-review, .status-draft { background: var(--amber-soft); color: var(--amber); }
.status-quote_sent, .status-sent, .status-follow_up { background: var(--blue-soft); color: #365e91; }
.status-accepted, .status-scheduled, .status-completed, .status-approved { background: var(--green-soft); color: var(--green); }
.status-manual_review, .status-lost, .status-declined { background: var(--red-soft); color: var(--red); }
.facts { display: grid; gap: 0; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #edf0ee; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 0; font-size: 12px; font-weight: 750; text-align: right; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.photo-note { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 750; }
.photo-note small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }
.chat-state, .notice, .warning-box { padding: 13px 15px; border-radius: 11px; margin: 12px 0; font-size: 13px; }
.chat-state.success, .success-card { background: var(--green-soft); color: var(--green-dark); }
.chat-state.warning, .warning-box { background: var(--amber-soft); color: #69440c; }
.page-heading, .detail-heading, .quote-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin: 15px 0 30px; }
.page-heading h1, .detail-heading h1 { font-size: 42px; margin: 8px 0; }
.page-heading p, .detail-heading p { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.metric-grid article { display: flex; align-items: center; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.metric-grid strong, .metric-grid small { display: block; }
.metric-grid strong { font-size: 24px; }
.metric-grid small { color: var(--muted); font-size: 11px; }
.metric-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-weight: 800; }
.metric-icon.amber { background: var(--amber-soft); color: var(--amber); }.metric-icon.blue { background: var(--blue-soft); color: #365e91; }.metric-icon.violet { background: var(--violet-soft); color: #6b4d9c; }.metric-icon.green { background: var(--green-soft); color: var(--green); }
.panel { overflow: hidden; box-shadow: none; }
.padded { padding: 24px; }
.panel-header { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: 17px; margin: 0 0 3px; }
.panel-header p { margin: 0; font-size: 11px; }
.filter-chip { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 11px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 18px; background: #fafbfa; text-align: left; color: #7b8782; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
td { padding: 15px 18px; border-top: 1px solid #edf0ee; font-size: 12px; }
td strong, td small { display: block; } td small { margin-top: 3px; color: var(--muted); }
.row-link { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--green-soft); color: var(--green); text-decoration: none; }
.empty { text-align: center; color: var(--muted); padding: 35px; }
.back-link { font-size: 12px; color: var(--muted); text-decoration: none; }
.detail-heading { align-items: center; }
.detail-heading > div:last-child { display: flex; align-items: center; gap: 9px; }
.confidence { font-size: 10px; border-radius: 99px; padding: 5px 8px; background: #eef1ef; color: var(--muted); }
.confidence-high { color: var(--green); background: var(--green-soft); }.confidence-medium { color: var(--amber); background: var(--amber-soft); }.confidence-low { color: var(--red); background: var(--red-soft); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 18px; align-items: start; }
.detail-side { display: grid; gap: 18px; }
.check-row { display: flex; gap: 18px; }.check-row label { display: flex; align-items: center; }.check-row input { width: auto; }
.timeline { padding: 10px 20px 20px; max-height: 590px; overflow: auto; }
.timeline-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf0ee; }
.timeline-item p { margin: 4px 0 0; color: var(--ink); font-size: 12px; line-height: 1.45; }
.timeline-item small { color: var(--muted); font-size: 9px; }
.timeline-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 900; flex: 0 0 auto; }.timeline-avatar.inbound { background: #eff1f0; color: #56615d; }
.quote-review { margin-top: 18px; }
.quote-review-grid { display: grid; grid-template-columns: 1fr 340px; }
.quote-lines { padding: 22px; }
.quote-lines > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid #e8ece9; }
.quote-lines small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.quote-total { margin-top: 10px; border-top: 2px solid var(--ink) !important; border-bottom: 0 !important; font-size: 20px; }
.approval-box { padding: 24px; border-left: 1px solid var(--line); background: #fafbfa; }
.approval-box p { margin-top: 16px; font-size: 12px; }
.settings-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 18px; align-items: start; }
.draft-card { border: 1px solid var(--line); border-radius: 13px; padding: 14px; margin-bottom: 12px; }.draft-card > div { display: flex; justify-content: space-between; }.draft-card pre { max-height: 220px; overflow: auto; padding: 10px; background: #f4f6f4; border-radius: 8px; font-size: 10px; white-space: pre-wrap; }
.auth-card { max-width: 520px; }.dev-link { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--amber-soft); }.dev-link a { color: var(--green); font-weight: 750; }
.quote-page { width: min(820px, 100%); margin: 20px auto; }
.quote-heading { align-items: center; }.quote-heading h1 { font-size: 42px; margin: 8px 0; }.quote-heading p { margin: 0; }
.quote-document { padding: clamp(24px, 5vw, 48px); }
.quote-meta { display: flex; justify-content: space-between; margin-bottom: 34px; color: var(--muted); font-size: 12px; }.quote-meta strong { color: var(--ink); }
.quote-document .quote-lines { padding: 0; }
.text-link { display: inline-block; margin-top: 20px; color: var(--green); font-weight: 750; font-size: 13px; }
.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }.decision-grid form:last-child { display: flex; gap: 8px; }.decision-grid select { flex: 1; }
.booking-card { padding: 30px; margin-top: 16px; }.booking-card h2 { margin: 8px 0; }
.slot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }.slot input { position: absolute; opacity: 0; }.slot span { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }.slot input:checked + span { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.success-card { padding: 22px; border: 1px solid #c8dfd3; border-radius: var(--radius); margin-top: 16px; }.success-card p { margin: 3px 0 0; }
code { padding: 2px 5px; border-radius: 5px; background: #e8ece9; }
@media (max-width: 900px) {
  .topbar nav, .topbar-user span { display: none; }
  .feature-grid, .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .conversation-layout, .detail-grid, .settings-grid, .quote-review-grid { grid-template-columns: 1fr; }
  .summary-panel { order: -1; }
  .approval-box { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .page { width: min(100% - 24px, 1280px); padding-top: 25px; }
  .topbar { padding: 0 14px; height: 62px; }
  .hero { padding-top: 45px; }.hero h1 { font-size: 47px; }
  .feature-grid, .metric-grid, .form-grid.two, .form-grid.three, .decision-grid, .slot-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .page-heading, .detail-heading, .quote-heading { align-items: flex-start; flex-direction: column; }
  .messages { padding: 18px; }.chat-panel { min-height: 600px; }
  .quote-heading h1, .page-heading h1 { font-size: 36px; }
}
