@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #20302b;
  --muted: #78827d;
  --line: #e8ebe6;
  --paper: #fff;
  --canvas: #f6f7f4;
  --green: #376b56;
  --green-dark: #28523f;
  --mint: #e8f1eb;
  --shadow: 0 12px 32px rgb(34 55 43 / 5%);
  --cream: #f5f0e5;
  --clay: #b67157;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.5 "DM Sans", sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.shell { max-width: 1180px; margin: 0 auto; padding: 0 32px 32px; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px 12px 12px 4px; background: var(--green); color: white; font: 800 17px Manrope, sans-serif; letter-spacing: -1px; }
.brand strong, .brand small { display: block; }
.brand strong { font: 700 15px Manrope, sans-serif; letter-spacing: -.3px; }
.brand small { color: var(--muted); font-size: 11px; }
.topbar-right { display: flex; gap: 12px; align-items: center; }
.status-pill { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #e6a543; }
.status-pill.online .dot { background: #58a579; }
.status-pill.offline .dot { background: #c76161; }

.intro { display: flex; justify-content: space-between; align-items: end; padding: 32px 0 24px; }
.eyebrow { margin: 0 0 8px; color: #8a948e; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: Manrope, sans-serif; letter-spacing: -.7px; }
h1 { margin-bottom: 5px; font-size: 30px; line-height: 1.2; }
h1 span { color: #d7a348; font-size: 22px; }
h2 { margin-bottom: 0; font-size: 19px; }
.subheading, .muted, .date-label { margin-bottom: 0; color: var(--muted); }
.date-label { font-size: 12px; }

.welcome-panel { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; overflow: hidden; margin: 30px 0 22px; border: 1px solid #e6e8df; border-radius: 22px; background: linear-gradient(115deg, #fff 0%, #fbfaf6 56%, #f1f3eb 100%); box-shadow: 0 18px 48px rgb(34 55 43 / 7%); }
.welcome-copy { z-index: 1; padding: 48px 0 30px 48px; }
.welcome-copy .eyebrow { color: var(--clay); }
.welcome-copy h1 { margin: 0 0 16px; font-size: clamp(32px, 4vw, 48px); line-height: 1.13; letter-spacing: -1.8px; }
.welcome-copy h1 em { color: var(--green); font-family: Georgia, serif; font-weight: 500; }
.welcome-copy > p:not(.eyebrow) { max-width: 430px; margin-bottom: 22px; color: #68756e; font-size: 14px; line-height: 1.8; }
.welcome-copy .button { min-height: 44px; padding: 12px 17px; }
.welcome-copy .button span { margin-left: 8px; font-size: 16px; }
.welcome-trust { margin-top: 15px; color: #828b85; font-size: 11px; }
.welcome-trust span { margin-right: 5px; color: #b98550; }
.welcome-art { position: relative; min-height: 288px; display: grid; place-items: center; }
.sun-orbit { position: absolute; top: 26px; right: 12%; width: 248px; height: 248px; border: 1px solid rgb(116 140 113 / 22%); border-radius: 50%; background: radial-gradient(circle at 54% 46%, rgb(240 226 195 / 65%) 0 27%, transparent 27.5%); }
.seat-card { position: relative; z-index: 1; width: min(250px, 80%); min-height: 194px; display: flex; flex-direction: column; justify-content: center; border: 1px solid rgb(255 255 255 / 90%); border-radius: 18px; background: rgb(255 255 255 / 88%); padding: 24px; box-shadow: 0 18px 45px rgb(52 76 57 / 13%); transform: rotate(2deg); }
.seat-spark { color: #c48e4e; font-size: 24px; }
.seat-label { margin-top: 12px; color: #334d3c; font: 700 17px Manrope, sans-serif; }
.seat-lines { display: grid; gap: 6px; margin-top: 13px; }
.seat-lines i { width: 92%; height: 5px; border-radius: 9px; background: #e9eee7; }
.seat-lines i:nth-child(2) { width: 74%; }
.seat-lines i:nth-child(3) { width: 55%; }
.seat-call { display: flex; gap: 8px; align-items: center; align-self: flex-start; margin-top: 16px; border-radius: 99px; background: #edf4ed; padding: 7px 10px; color: #58755f; font-size: 10px; }
.seat-call-dot { width: 7px; height: 7px; border-radius: 50%; background: #75a57b; box-shadow: 0 0 0 4px #dcebdd; }
.art-leaf { position: absolute; z-index: 0; width: 28px; height: 61px; border-radius: 100% 0 100% 0; background: #91a889; opacity: .7; transform: rotate(-35deg); }
.leaf-one { right: 9%; bottom: 42px; }
.leaf-two { right: 19%; bottom: 17px; width: 21px; height: 45px; background: #c4a26a; transform: rotate(28deg); }
.art-note { position: absolute; right: 8%; top: 34px; color: #8b8c76; font: italic 12px Georgia, serif; transform: rotate(6deg); }
.welcome-values { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-top: 1px solid #e9ebe3; padding: 17px 30px; }
.welcome-values article { display: flex; gap: 11px; align-items: center; }
.welcome-values article > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 12px; background: #eff3ec; color: #58735d; font-size: 18px; }
.welcome-values article:nth-child(2) > span { background: #f7eee3; color: #ad8050; }
.welcome-values article:nth-child(3) > span { background: #f3edeb; color: #a56e61; }
.welcome-values strong, .welcome-values small { display: block; }
.welcome-values strong { color: #3c4d42; font-size: 11px; }
.welcome-values small { margin-top: 2px; color: #87918a; font-size: 10px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card, .panel { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.stat-card { min-height: 145px; padding: 18px 20px; }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 9px; font-size: 16px; }
.sage { background: #e8f1eb; color: #4a795e; }
.blue { background: #eaf0f5; color: #6482a2; }
.gold { background: #f7f0df; color: #a9863f; }
.rose { background: #f7ebea; color: #b66f69; }
.stat-card p { margin-bottom: 1px; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; font: 700 25px Manrope, sans-serif; line-height: 1.25; }
.stat-card small { color: #9aa29e; font-size: 11px; }

.content-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; margin-top: 18px; }
.panel { padding: 22px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }
.panel-heading .eyebrow { margin-bottom: 4px; }
.people-list, .calls-list { display: grid; }
.person-row, .call-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid #f0f1ee; }
.person-main, .call-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.avatar { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--green); font-weight: 700; }
.person-name, .call-name { overflow: hidden; margin: 0; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.person-detail, .call-detail { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.person-actions { display: flex; gap: 8px; flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 9px; background: #edf2ee; color: #55725f; font-size: 10px; font-weight: 600; text-transform: capitalize; }
.badge.warning { background: #f8efdf; color: #947333; }
.badge.danger { background: #f8e9e7; color: #a74e47; }
.empty-state { padding: 24px 0 10px; color: #969f9a; text-align: center; font-size: 12px; }
.summary-button { flex-shrink: 0; }
.summary-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 680px); overflow: auto; border: 1px solid var(--line); border-radius: 16px; padding: 0; color: var(--ink); box-shadow: 0 24px 70px rgb(20 35 27 / 22%); }
.summary-dialog::backdrop { background: rgb(25 37 31 / 48%); }
.summary-dialog-content { padding: 26px; }
.summary-dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.summary-dialog-heading h2 { margin: 0; }
.summary-date { margin: 12px 0 18px; font-size: 12px; }
.summary-copy { margin-bottom: 20px; line-height: 1.7; }
.summary-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.summary-facts div { min-width: 0; border-radius: 9px; background: #f7f8f6; padding: 12px; }
.summary-facts dt { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.summary-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; text-transform: capitalize; }
.call-dialog { width: min(600px, calc(100vw - 28px)); max-height: min(88vh, 760px); overflow: auto; border: 1px solid var(--line); border-radius: 18px; padding: 0; color: var(--ink); box-shadow: 0 24px 70px rgb(20 35 27 / 22%); }
.call-dialog::backdrop { background: rgb(25 37 31 / 50%); backdrop-filter: blur(3px); }
.call-dialog-content { position: relative; padding: 28px; }
.call-dialog-content h2 { margin: 0 30px 8px 0; font-size: 22px; }
.call-dialog-content > .muted { margin-bottom: 21px; font-size: 12px; }
.dialog-close { position: absolute; top: 16px; right: 17px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f3f5f1; color: #68756d; font-size: 22px; }
.call-dialog .agent-picker-fieldset legend { margin-bottom: 10px; }
.duration-picker { display: grid; gap: 6px; margin-top: 17px; color: #495950; font-size: 12px; font-weight: 700; }
.duration-picker select { min-height: 42px; border: 1px solid #dfe4de; border-radius: 8px; outline: 0; background: white; padding: 9px 11px; color: var(--ink); }
.duration-picker select:focus { border-color: #83a891; box-shadow: 0 0 0 3px rgb(83 131 103 / 10%); }
.duration-picker small { color: var(--muted); font-size: 10px; font-weight: 400; }
.call-notice { display: flex; gap: 9px; align-items: flex-start; margin: 17px 0 0; border-radius: 9px; background: #f8f4eb; padding: 11px; color: #786c55; font-size: 10px; line-height: 1.5; }
.call-notice span { color: #b98261; font-size: 14px; }
.call-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 12px; }
.call-dialog .error-text { min-height: 0; }

.button { border: 0; border-radius: 8px; padding: 9px 13px; font-size: 12px; font-weight: 600; transition: background .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--green); color: white; }
.button-primary:hover { background: var(--green-dark); }
.button-light { border: 1px solid var(--line); background: white; color: #53615a; }
.button-light:hover { background: #f4f6f3; }
.button-small { padding: 7px 10px; }
.button:disabled { cursor: not-allowed; opacity: .5; }

.setup-panel { display: none; margin-top: 18px; }
.setup-panel.open { display: block; }
.senior-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.agent-picker-fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.agent-picker-fieldset legend { margin-bottom: 5px; color: #495950; font-size: 12px; font-weight: 700; }
.senior-form > .agent-picker-fieldset { grid-column: 1 / -1; }
.field-hint { margin: 0 0 9px; color: var(--muted); font-size: 11px; }
.agent-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.agent-option { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 110px; border: 1px solid #e3e8e1; border-radius: 11px; background: white; padding: 12px; color: #45554b; cursor: pointer; transition: border-color .16s, background .16s, box-shadow .16s, transform .16s; }
.agent-option:hover { border-color: #9db5a1; transform: translateY(-1px); }
.agent-option:has(input:checked) { border-color: #668d70; background: #f4f8f2; box-shadow: 0 0 0 2px rgb(83 131 103 / 10%); }
.agent-option input { position: absolute; top: 10px; right: 10px; accent-color: var(--green); }
.agent-option strong { padding-right: 15px; font: 700 12px Manrope, sans-serif; }
.agent-option small { color: #7b8880; font-size: 10px; line-height: 1.45; }
.agent-option .agent-skills { margin-top: 3px; color: #6f8b73; font-size: 9px; line-height: 1.4; }
.senior-form label, .login-form label { display: grid; gap: 6px; color: #55625c; font-size: 11px; font-weight: 600; }
.senior-form input:not([type=checkbox]), .senior-form select, .login-form input { width: 100%; min-height: 40px; border: 1px solid #dfe4de; border-radius: 8px; outline: 0; background: white; padding: 9px 11px; color: var(--ink); }
.senior-form input:focus, .senior-form select:focus, .login-form input:focus { border-color: #83a891; box-shadow: 0 0 0 3px rgb(83 131 103 / 10%); }
.optional { display: inline; color: #9aa29e; font-weight: 400; }
.consent-check { grid-column: 1 / -1; display: flex !important; align-items: flex-start; gap: 9px !important; padding: 12px; border-radius: 8px; background: #f7f8f6; font-weight: 400 !important; }
.consent-check input { flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--green); }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.form-actions p { margin: 0; color: var(--muted); font-size: 12px; }
.error-text { min-height: 17px; margin: 6px 0 0; color: #a74e47; font-size: 12px; }
.login-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; margin: 28px 0; }
.login-form { max-width: 430px; width: 100%; }
.input-row { display: flex; gap: 8px; margin-top: 6px; }
.input-row input { min-width: 0; }
.footer { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: #929b96; font-size: 11px; }
.text-button { border: 0; background: none; color: #6a796f; font: inherit; cursor: pointer; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: min(390px, calc(100vw - 48px)); transform: translateY(12px); border-radius: 10px; background: #263b31; padding: 12px 16px; color: white; box-shadow: 0 6px 24px rgb(0 0 0 / 16%); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 760px) {
  .shell { padding: 0 18px 24px; }
  .welcome-panel { grid-template-columns: 1fr .8fr; gap: 0; }
  .welcome-copy { padding: 34px 0 24px 28px; }
  .welcome-art { min-height: 260px; }
  .welcome-values { padding: 15px 20px; }
  .agent-options { grid-template-columns: 1fr; }
  .agent-option { min-height: auto; padding: 12px 34px 12px 12px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { min-height: 130px; padding: 15px; }
  .content-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .panel { padding: 17px; }
  .login-panel { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 480px) {
  .topbar { height: 68px; }
  .topbar-right { gap: 7px; }
  .status-pill { font-size: 10px; }
  .topbar-right .button { padding: 8px; }
  .intro { padding: 25px 0 18px; }
  h1 { font-size: 25px; }
  .date-label { max-width: 120px; text-align: right; }
  .welcome-panel { grid-template-columns: 1fr; }
  .welcome-copy { padding: 30px 24px 4px; }
  .welcome-copy h1 { font-size: 34px; }
  .welcome-art { min-height: 230px; }
  .sun-orbit { top: 8px; right: 18%; width: 200px; height: 200px; }
  .seat-card { width: 220px; min-height: 174px; }
  .welcome-values { grid-template-columns: 1fr; gap: 11px; padding: 15px 22px; }
  .welcome-values article > span { width: 31px; height: 31px; }
  .stat-card strong { font-size: 22px; }
  .senior-form { grid-template-columns: 1fr; }
  .consent-check, .form-actions, .senior-form > .agent-picker-fieldset { grid-column: auto; }
  .person-row { align-items: flex-start; }
  .person-actions { flex-direction: column; }
  .summary-dialog-content { padding: 20px; }
  .summary-facts { grid-template-columns: 1fr; }
  .call-dialog-content { padding: 24px 19px; }
}
