:root {
  --blue: #0866f5;
  --cyan: #00c8f0;
  --ink: #202124;
  --muted: #687078;
  --line: #e6e9ef;
  --bg: #f8fafd;
  --hover: #edf4ff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Montserrat', sans-serif; color: var(--ink); background: var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; }
.app { min-height: 100vh; }
.topbar { height: 72px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; position: relative; z-index: 2; }
.brand, .topbar-actions { display: flex; align-items: center; gap: 16px; }
.brand img { width: 145px; height: auto; object-fit: contain; }
.brand-divider { height: 25px; width: 1px; background: var(--line); }
.product-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.login-button, .primary-button { border: none; border-radius: 9px; background: var(--blue); color: white; padding: 11px 18px; font-weight: 700; font-size: 13px; transition: .2s ease; }
.login-button:hover, .primary-button:hover { background: #0055d8; transform: translateY(-1px); }
.icon-button { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: 20px; transition: .2s ease; }
.icon-button:hover { background: var(--hover); border-color: #cbdcff; }
.profile-button { border: none; padding: 0; background: transparent; }
.profile-button img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.workspace { display: flex; min-height: calc(100vh - 72px); }
.sidebar { width: 275px; flex-shrink: 0; background: white; border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; }
.new-chat-button { border: 1px solid #dce7fb; border-radius: 10px; background: var(--hover); color: var(--blue); padding: 13px 15px; text-align: left; font-size: 13px; font-weight: 700; transition: .2s ease; }
.new-chat-button:hover { background: #e2edff; transform: translateY(-1px); }
.new-chat-button span { font-size: 19px; vertical-align: -1px; margin-right: 8px; }
.sidebar-heading { margin: 30px 8px 13px; font-size: 10px; font-weight: 800; letter-spacing: 1px; color: #9299a2; }
.chat-history { display: flex; flex-direction: column; gap: 5px; }
.empty-history { padding: 12px 9px; font-size: 12px; line-height: 1.6; color: #9299a2; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding: 17px 8px 0; }
.sidebar-status { font-size: 11px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #21c47b; }
.main-content { flex: 1; min-width: 0; position: relative; }
.welcome-screen { min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 30px; text-align: center; animation: appear .35s ease; }
.welcome-logo { width: 65px; height: 65px; border-radius: 20px; display: grid; place-items: center; color: white; font-size: 34px; font-weight: 800; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 8px 24px #0866f52b; margin-bottom: 25px; }
.welcome-screen h1 { font-size: clamp(23px, 3vw, 34px); font-weight: 800; margin: 0 0 12px; }
.welcome-screen h1 span { color: var(--blue); }
.welcome-screen p { color: var(--muted); font-size: 14px; margin: 0 0 27px; }
.conversation-screen { height: calc(100vh - 72px); display: flex; flex-direction: column; animation: appear .25s ease; }
.conversation-header { height: 76px; flex-shrink: 0; background: white; border-bottom: 1px solid var(--line); padding: 0 27px; display: flex; align-items: center; justify-content: space-between; }
.conversation-header h2 { font-size: 15px; margin: 0 0 5px; }
.conversation-header p { margin: 0; font-size: 11px; color: var(--muted); }
.call-actions { display: flex; gap: 9px; }
.messages { flex: 1; overflow-y: auto; padding: 25px; }
.message-composer { display: flex; align-items: center; gap: 10px; padding: 13px 18px; margin: 0 auto; width: min(850px, calc(100% - 40px)); background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 3px 15px #20212408; }
.message-composer:focus-within { border-color: #9bbfff; box-shadow: 0 0 0 3px #0866f510; }
.message-composer input { flex: 1; min-width: 0; border: none; outline: none; font-size: 13px; color: var(--ink); background: transparent; }
.message-composer button { width: 37px; height: 37px; border: none; border-radius: 10px; background: var(--blue); color: white; font-size: 18px; }
.message-composer button:disabled { opacity: .45; cursor: not-allowed; }
.composer-note { text-align: center; font-size: 10px; color: #9aa1a9; padding: 10px 0 15px; margin: 0; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; background: #10182866; display: grid; place-items: center; padding: 20px; }
.profile-modal { width: min(360px, 100%); background: white; border-radius: 17px; padding: 30px; text-align: center; position: relative; box-shadow: 0 15px 50px #0002; animation: appear .2s ease; }
.modal-close { position: absolute; right: 15px; top: 12px; border: none; background: transparent; font-size: 25px; color: var(--muted); }
.profile-modal > img { width: 75px; height: 75px; border-radius: 50%; object-fit: cover; }
.profile-modal h2 { font-size: 18px; margin: 14px 0 5px; }
.profile-modal p { color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.secondary-button, .signout-button { width: 100%; padding: 11px; border-radius: 9px; font-weight: 700; font-size: 12px; margin-top: 9px; }
.secondary-button { background: var(--hover); border: 1px solid #dce7fb; color: var(--blue); }
.signout-button { background: white; border: 1px solid var(--line); color: #d33; }
[hidden] { display: none !important; }
@keyframes appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 700px) {
  .topbar { height: 64px; padding: 0 13px; }
  .brand { gap: 10px; }
  .brand img { width: 112px; }
  .login-button { padding: 10px 12px; font-size: 11px; }
  .workspace { min-height: calc(100vh - 64px); }
  .sidebar { width: 64px; padding: 16px 8px; }
  .new-chat-button { text-align: center; padding: 10px 0; font-size: 0; }
  .new-chat-button span { font-size: 22px; margin: 0; }
  .sidebar-heading, .empty-history, .sidebar-status { display: none; }
  .conversation-screen { height: calc(100vh - 64px); }
  .conversation-header { padding: 0 14px; }
  .messages { padding: 15px; }
}
