@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: #0a357a;
  --primary-dark: #082856;
  --blue-light: #bdd5fa;
  --surface: #f4f7fc;
  --ink: #17243a;
  --muted: #61718a;
  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

* { 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 #739dde; outline-offset: 3px; }

.brand { display: inline-flex; align-items: center; align-self: flex-start; }
.brand img { display: block; width: 220px; max-width: 100%; height: auto; }
.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: #082856; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #93a2b9; box-shadow: 0 0 0 4px #eaf0f8; }
.status-dot.active { background: #2871c9; box-shadow: 0 0 0 4px #e4efff; }

.login-page { display: grid; place-items: center; min-height: 100vh; padding: 25px; background: radial-gradient(circle at 6% 80%, #dce7f9 0, transparent 38%), radial-gradient(circle at 95% 5%, #e3ecfa 0, transparent 35%), #f4f7fc; }
.login-card { width: min(100%, 490px); padding: 43px; border: 1px solid #e1e7f0; border-radius: 22px; background: white; box-shadow: 0 24px 80px rgba(10, 53, 122, .09); }
.login-card .brand { margin-bottom: 72px; }
.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 #d6dfed; border-radius: 10px; padding: 0 14px; background: #fbfcfe; }
.form-error { margin: 12px 0 0; color: #ad3434; font-size: 12px; }
.login-footer { display: flex; gap: 11px; align-items: center; margin-top: 52px; color: #64748b; 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 #dce4f0; border-radius: 18px; overflow: hidden; background: white; box-shadow: 0 18px 65px rgba(10, 53, 122, .06); }
.sidebar { display: flex; flex-direction: column; min-height: 600px; padding: 34px 40px; color: white; background: radial-gradient(circle at 15% 90%, #215c9e 0, transparent 45%), linear-gradient(152deg, #0a357a, #082856 76%); }
.brand-light { padding: 9px 13px; border-radius: 9px; background: white; }
.sidebar-copy { display: flex; flex: 1; flex-direction: column; justify-content: center; max-width: 410px; padding: 42px 0 20px; }
.eyebrow-light { color: var(--blue-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: #d0e0f7; font-size: 14px; line-height: 1.8; }
.sidebar-bottom { color: #c9dbf4; font-size: 11px; letter-spacing: .04em; }
.sidebar-line { display: block; width: 31px; height: 1px; margin-bottom: 16px; background: var(--blue-light); }
.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(--blue-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: #fafcff; }
.chat-header { display: flex; align-items: center; gap: 12px; min-height: 86px; padding: 0 31px; border-bottom: 1px solid #e7edf5; background: white; }
.assistant-avatar { position: relative; display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; color: var(--primary); background: #e7effc; 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: #95a4bb; }
.avatar-online.active { background: #2871c9; }
.chat-heading { display: flex; flex: 1; flex-direction: column; gap: 4px; }
.chat-heading strong { font: 800 13px Manrope, sans-serif; }
.chat-heading span { color: #61718a; font-size: 11px; }
.text-button { border: 0; padding: 7px; color: #61718a; 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: #c9d6e9 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 #d4e1f5; border-radius: 20px; color: var(--primary); background: #edf3fd; 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 #dce5f2; border-radius: 10px; padding: 9px 12px; color: var(--primary); background: white; font-size: 11px; font-weight: 600; }
.suggestion:hover { background: #edf3fd; }
.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: #61718a; font-size: 10px; font-weight: 700; }
.message-bubble { padding: 12px 15px; border: 1px solid #e2e9f4; border-radius: 3px 15px 15px 15px; background: white; box-shadow: 0 3px 12px rgba(10,53,122,.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; }
.controls { border-top: 1px solid #e7edf5; 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; flex: 1; align-items: center; gap: 10px; min-width: 0; color: #61718a; font-size: 11px; line-height: 1.5; }
.call-indicator .status-dot { flex: none; }
.call-buttons { display: flex; flex: none; 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 #dbe4f2; 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: #eff4fc; }
.composer { display: flex; align-items: flex-end; gap: 10px; border: 1px solid #d8e2f0; border-radius: 13px; padding: 8px 9px 8px 15px; background: #f7faff; }
.composer:focus-within { border-color: #739dde; box-shadow: 0 0 0 3px #e7effc; }
.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: #697990; }
.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: #697990; 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: 100dvh; border: 0; border-radius: 0; }
  .sidebar { flex: none; height: 82px; min-height: 0; padding: 12px 23px; }
  .sidebar-copy, .sidebar-bottom { display: none; }
  .sidebar .brand { padding: 5px 9px; }
  .sidebar .brand img { width: 170px; }
  .chat-panel { height: calc(100dvh - 82px); min-height: 0; }
}

@media (max-width: 600px) {
  .login-card { padding: 29px; }
  .login-card .brand { margin-bottom: 55px; }
  .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 { flex-basis: 100%; }
  .call-buttons { width: 100%; }
  .start-button { flex: 1; justify-content: center; }
  .composer-note { display: none; }
}
