@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 {
  --primary: #004D5A;
  --primary-dark: #003943;
  --accent-light: #FFD0AE;
  --accent: #FF6C00;
  --cream: #F7F8F8;
  --ink: #252525;
  --muted: #606D70;
  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #FF6C00; outline-offset: 3px; }

.brand-logo { display: block; width: 210px; height: auto; }
.brand { display: inline-flex; align-items: center; }
.brand-logo-frame { display: inline-flex; align-items: center; border-radius: 10px; padding: 10px 14px; background: var(--primary-dark); }
.eyebrow { color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .21em; }
.primary-button { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; border-radius: 11px; padding: 15px 18px; color: white; background: var(--primary); font-weight: 700; }
.primary-button:hover, .start-button:hover { background: #003943; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #9cac9d; box-shadow: 0 0 0 4px #edf1ec; }
.status-dot.active { background: #64c887; box-shadow: 0 0 0 4px #e1f4e6; }

.login-page { display: grid; place-items: center; min-height: 100vh; padding: 25px; background: radial-gradient(circle at 6% 80%, #D5EAEC 0, transparent 38%), radial-gradient(circle at 95% 5%, #E6F2F2 0, transparent 35%), #F7F8F8; }
.login-card { width: min(100%, 490px); padding: 43px; border: 1px solid #E4ECEC; border-radius: 22px; background: white; box-shadow: 0 24px 80px rgba(0, 77, 90, .09); }
.login-card .brand { display: inline-flex; align-items: center; }
.login-card .brand-logo { width: min(100%, 250px); }
.login-card h1 { max-width: 390px; margin: 15px 0 12px; font: 800 clamp(29px, 5vw, 39px)/1.2 Manrope, sans-serif; letter-spacing: -.05em; }
.login-card > p { margin: 0 0 36px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.login-card form label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 700; }
.login-card input { width: 100%; height: 48px; margin-bottom: 14px; border: 1px solid #D1DEDF; border-radius: 10px; padding: 0 14px; background: #FCFEFE; }
.form-error { margin: 12px 0 0; color: #ad3434; font-size: 12px; }
.login-footer { display: flex; gap: 11px; align-items: center; margin-top: 52px; color: #6A7C7D; font-size: 11px; }

.app-page { min-height: 100vh; padding: 18px; }
.shell { display: grid; grid-template-columns: minmax(300px, 35%) minmax(450px, 1fr); max-width: 1510px; min-height: calc(100vh - 36px); margin: auto; border: 1px solid #dfe6dc; border-radius: 18px; overflow: hidden; background: white; box-shadow: 0 18px 65px rgba(0, 77, 90, .08); }
.sidebar { display: flex; flex-direction: column; min-height: 600px; padding: 34px 40px; color: white; background: radial-gradient(circle at 15% 90%, #0A6877 0, transparent 45%), linear-gradient(152deg, #004D5A, #003943 76%); }
.brand-light { color: white; }
.brand-light .sidebar-copy { display: flex; flex: 1; flex-direction: column; justify-content: center; max-width: 410px; padding: 42px 0 20px; }
.eyebrow-light { color: var(--accent-light); }
.sidebar h1 { margin: 19px 0 22px; font: 800 clamp(35px, 3.45vw, 56px)/1.14 Manrope, sans-serif; letter-spacing: -.06em; }
.sidebar p { max-width: 355px; margin: 0; color: #D5EAEC; font-size: 14px; line-height: 1.8; }
.sidebar-bottom { color: #c4ddc6; font-size: 11px; letter-spacing: .04em; }
.sidebar-line { display: block; width: 31px; height: 1px; margin-bottom: 16px; background: var(--accent); }
.voice-art { display: flex; align-items: center; justify-content: center; gap: 7px; width: 220px; height: 125px; margin: 40px 0 0; border: 1px solid rgba(255,255,255,.17); border-radius: 80px; background: rgba(255,255,255,.045); }
.voice-art span { width: 5px; border-radius: 10px; background: var(--accent-light); }
.voice-art span:nth-child(1), .voice-art span:nth-child(9) { height: 16px; opacity: .6; }
.voice-art span:nth-child(2), .voice-art span:nth-child(8) { height: 37px; opacity: .8; }
.voice-art span:nth-child(3), .voice-art span:nth-child(7) { height: 56px; }
.voice-art span:nth-child(4), .voice-art span:nth-child(6) { height: 77px; }
.voice-art span:nth-child(5) { height: 96px; background: white; }

.chat-panel { display: flex; flex-direction: column; height: calc(100vh - 36px); min-height: 600px; background: #fcfdfb; }
.chat-header { display: flex; align-items: center; gap: 12px; min-height: 86px; padding: 0 31px; border-bottom: 1px solid #E5ECEC; background: white; }
.assistant-avatar { position: relative; display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; color: var(--primary); background: #E4F0F1; font: 800 24px Manrope, sans-serif; }
.avatar-online { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border: 2px solid white; border-radius: 50%; background: #65be77; }
.chat-heading { display: flex; flex: 1; flex-direction: column; gap: 4px; }
.chat-heading strong { font: 800 13px Manrope, sans-serif; }
.chat-heading span { color: #7a887d; font-size: 11px; }
.text-button { border: 0; padding: 7px; color: #637367; background: transparent; font-size: 12px; font-weight: 700; }
.text-button:hover { color: var(--primary); text-decoration: underline; }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 25px 34px; scrollbar-color: #BCD0D2 transparent; }
.welcome { max-width: 500px; margin: min(9vh, 60px) auto 0; text-align: center; }
.welcome-icon { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 27px; border: 1px solid var(--accent-light); border-radius: 20px; color: var(--accent); background: #FFF4EC; font-size: 28px; }
.welcome h2 { margin: 13px 0 11px; font: 800 clamp(22px, 2.5vw, 31px)/1.25 Manrope, sans-serif; letter-spacing: -.045em; }
.welcome p { max-width: 360px; margin: auto; color: var(--muted); font-size: 13px; line-height: 1.7; }
.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 30px; }
.suggestion { border: 1px solid #D8E6E7; border-radius: 10px; padding: 9px 12px; color: var(--primary); background: white; font-size: 11px; font-weight: 600; }
.suggestion:hover { background: #FFF4EC; }
.message { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; margin: 0 0 21px; }
.message.user { align-items: flex-end; margin-left: auto; }
.message.system { margin: 15px auto; align-items: center; max-width: 90%; }
.message-label { margin: 0 0 6px; color: #778679; font-size: 10px; font-weight: 700; }
.message-bubble { padding: 12px 15px; border: 1px solid #E0E9EA; border-radius: 3px 15px 15px 15px; background: white; box-shadow: 0 3px 12px rgba(0,77,90,.035); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user .message-bubble { border-color: var(--primary); border-radius: 15px 3px 15px 15px; color: white; background: var(--primary); }
.message.system .message-bubble { border: 0; color: #985d25; background: #fff7e8; text-align: center; }
.message-bubble a { display: inline-block; color: var(--primary); font-weight: 800; text-decoration: underline; }
.controls { border-top: 1px solid #E5ECEC; padding: 17px 25px 15px; background: white; }
.call-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.call-indicator { display: flex; align-items: center; gap: 10px; color: #6a7c6b; font-size: 11px; }
.call-buttons { display: flex; gap: 8px; align-items: center; }
.start-button { display: flex; align-items: center; gap: 9px; border: 0; border-radius: 9px; padding: 11px 14px; color: white; background: var(--primary); white-space: nowrap; font-size: 11px; font-weight: 800; }
.icon-button, .end-button { border: 1px solid #D8E6E7; border-radius: 9px; height: 37px; color: var(--primary); background: white; font-size: 12px; font-weight: 700; }
.icon-button { width: 38px; font-size: 16px; }
.end-button { padding: 0 12px; }
.icon-button:not(:disabled):hover, .end-button:not(:disabled):hover { background: #F1F6F6; }
.composer { display: flex; align-items: flex-end; gap: 10px; border: 1px solid #D1DEDF; border-radius: 13px; padding: 8px 9px 8px 15px; background: #FAFCFC; }
.composer:focus-within { border-color: #6AADB5; box-shadow: 0 0 0 3px #E4F0F1; }
.composer textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; padding: 10px 0; background: transparent; color: var(--ink); font-size: 12px; line-height: 1.4; }
.composer textarea::placeholder { color: #879696; }
.composer button { flex: none; display: grid; place-items: center; width: 35px; height: 35px; border: 0; border-radius: 9px; color: white; background: var(--primary); font-size: 23px; line-height: 1; }
.composer-note { margin-top: 10px; color: #99a49a; text-align: center; font-size: 10px; line-height: 1.4; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 950px) {
  .app-page { padding: 0; }
  .shell { display: flex; flex-direction: column; min-height: 100vh; border: 0; border-radius: 0; }
  .sidebar { min-height: 0; padding: 17px 23px; }
  .sidebar-copy, .sidebar-bottom { display: none; }
  .brand { display: inline-flex; align-items: center; }
    .chat-panel { height: calc(100dvh - 68px); min-height: 0; }
}

@media (max-width: 600px) {
  .login-card { padding: 29px; }
  .login-card .brand { display: inline-flex; align-items: center; }
  .chat-header { min-height: 70px; padding: 0 18px; }
  .messages { padding: 20px 17px; }
  .welcome { margin-top: 8vh; }
  .welcome h2 { font-size: 24px; }
  .message { max-width: 92%; }
  .controls { padding: 12px; }
  .call-row { flex-wrap: wrap; }
  .call-indicator { width: 100%; }
  .call-buttons { width: 100%; }
  .start-button { flex: 1; justify-content: center; }
  .composer-note { display: none; }
}
