:root {
  --bg: #0b0f17;
  --card: #141b2d;
  --line: #25304a;
  --text: #e8eefc;
  --muted: #9aa8c2;
  --accent: #22c8a3;
  --danger: #e25b71;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top right,#1a2740, #0b0f17 55%); color: var(--text); font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto; }
.shell { display: grid; grid-template-columns: 300px 1fr; min-height: 100vh; }
.sidebar { border-right: 1px solid var(--line); padding: 18px; background: rgba(10,15,25,.7); }
.brand { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; line-height: 1.7; }
.side-btn { width: 100%; margin: 0 0 10px; padding: 10px 12px; background: #111a2c; border: 1px solid var(--line); color: var(--text); border-radius: 10px; cursor: pointer; }
.side-btn.danger { border-color: #612635; color: #ffc5cf; }
.hint { color: var(--muted); display: block; margin-top: 14px; font-size: 12px; }
.chat-main { display: grid; grid-template-rows: 56px 1fr auto auto; }
.chat-main > header { border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 18px; font-weight: 600; }
.messages { padding: 20px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 74%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); white-space: pre-wrap; line-height: 1.45; }
.msg.user { align-self: flex-end; background: #183645; border-color: #1f5870; }
.msg.assistant { align-self: flex-start; background: var(--card); }
.msg.meta { align-self: center; background: transparent; color: var(--muted); border-style: dashed; font-size: 12px; max-width: 90%; }
.composer, .otp-bar { display: grid; grid-template-columns: 1fr 140px; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
input, button { border-radius: 12px; border: 1px solid var(--line); background: #11192a; color: var(--text); padding: 12px; }
button { background: #16424e; border-color: #1f6577; cursor: pointer; font-weight: 600; }
.login-body { display: grid; place-items: center; min-height: 100vh; }
.login-card { width: min(420px, 92vw); border: 1px solid var(--line); border-radius: 18px; padding: 26px; background: rgba(20,27,45,.85); }
.login-card .sub { color: var(--muted); margin-top: -8px; margin-bottom: 18px; }
.login-card form { display: grid; gap: 10px; }
.error { color: #ffc5cf; border: 1px solid #652435; padding: 10px; border-radius: 10px; background: rgba(90,32,47,.2); }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--line); }
}
