:root {
  color-scheme: dark;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: #0b1120;
  color: #edf2f7;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 80% 0%, #1c3550 0, transparent 42%),
    #0b1120;
}
.shell { max-width: 1440px; margin: auto; padding: 26px; }
.topbar, .brand, .status, .chat-head {
  display: flex; align-items: center; justify-content: space-between;
}
.brand { justify-content: flex-start; gap: 13px; }
.logo {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 14px; background: linear-gradient(145deg,#38bdf8,#2563eb);
  font-size: 24px; font-weight: 800;
}
h1 { font-size: 18px; margin: 0 0 3px; }
small, .muted { color: #91a3b8; }
.brand small { font-size: 9px; letter-spacing: 2px; }
.status, .mode {
  border: 1px solid #26384c; border-radius: 30px;
  padding: 9px 14px; color: #a9bacb; font-size: 12px;
}
.status span {
  display: inline-block; width: 8px; height: 8px;
  background: #34d399; border-radius: 50%; margin-left: 7px;
}
.hero {
  margin: 38px 0 25px; display: flex; align-items: end;
  justify-content: space-between; gap: 20px;
}
.eyebrow { color: #38bdf8; font-size: 10px; letter-spacing: 2px; }
h2 { font-size: clamp(27px,4vw,40px); margin: 8px 0; }
.workspace {
  display: grid; grid-template-columns: 230px minmax(0,1fr);
  gap: 18px; min-height: 570px;
}
.sidebar, .chat {
  background: rgba(17,27,44,.88); border: 1px solid #25354a;
  border-radius: 18px;
}
.sidebar { padding: 20px 14px; }
.sidebar h3 { font-size: 13px; color: #9fb0c4; padding: 0 9px; }
.nav { padding: 14px 10px; color: #aab8c8; font-size: 13px; border-radius: 9px; }
.nav.active { background: #18334d; color: #7dd3fc; }
.security {
  margin-top: 35px; padding: 13px; border-radius: 12px;
  background: #102e2b; color: #6ee7b7; font-size: 12px;
}
.security p { color: #a2c8bd; line-height: 1.7; }
.chat { display: flex; flex-direction: column; overflow: hidden; }
.chat-head { padding: 18px 22px; border-bottom: 1px solid #25354a; }
.chat-head small { display: block; margin-top: 5px; }
.ai-mark {
  padding: 9px 12px; color: #7dd3fc; background: #12314a;
  border-radius: 10px; font-size: 12px;
}
.login { max-width: 420px; width: 100%; margin: auto; padding: 30px; }
.login h3 { font-size: 20px; }
input, textarea {
  width: 100%; padding: 14px; border: 1px solid #34465d;
  border-radius: 11px; color: white; background: #0d1727;
  font: inherit; outline: none;
}
input:focus, textarea:focus { border-color: #38bdf8; }
button {
  border: 0; border-radius: 10px; padding: 13px 19px;
  background: linear-gradient(120deg,#0284c7,#2563eb);
  color: white; font: inherit; font-weight: 700; cursor: pointer;
}
.login button { width: 100%; margin-top: 12px; }
.error { color: #fca5a5; font-size: 12px; }
.conversation { display: flex; flex: 1; flex-direction: column; min-height: 500px; }
.welcome { text-align: center; margin: auto auto 20px; padding: 20px; }
.welcome-icon { font-size: 35px; color: #38bdf8; }
.welcome p { color: #91a3b8; }
.messages { padding: 10px 22px; overflow-y: auto; max-height: 340px; }
.message {
  white-space: pre-wrap; line-height: 1.8; padding: 13px 16px;
  border-radius: 13px; margin: 10px 0; max-width: 88%;
}
.user-message { background: #173653; margin-right: auto; }
.ai-message { background: #1b293b; margin-left: auto; }
.composer {
  margin: auto 18px 0; padding: 12px; display: flex; gap: 10px;
  border: 1px solid #2a3b51; border-radius: 14px; background: #101b2b;
}
.composer textarea { border: 0; resize: vertical; background: transparent; }
.composer button { align-self: end; white-space: nowrap; }
.footnote { text-align: center; padding: 10px; color: #788ba1; }
footer { text-align: center; color: #52657b; font-size: 10px; padding: 22px; }
[hidden] { display: none !important; }
@media(max-width:760px) {
  .shell { padding: 14px; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hero { align-items: start; flex-direction: column; margin-top: 28px; }
  .conversation { min-height: 520px; }
  .composer { flex-direction: column; }
  .composer button { width: 100%; }
}
