@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

: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; }
.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%; }
.msg img { display: block; max-width: 280px; width: 100%; border-radius: 12px; margin-top: 10px; border: 1px solid var(--line); }
.composer, .otp-bar { display: grid; grid-template-columns: 96px 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;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 20%, rgba(34, 200, 163, 0.14), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(66, 214, 255, 0.16), transparent 28%),
    linear-gradient(145deg, #050b14 0%, #09121f 45%, #071523 100%);
}
.login-body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 26%, transparent 90%);
}
.login-shell {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 22px;
  align-items: stretch;
  font-family: 'Space Grotesk', system-ui, sans-serif;
}
.login-brand-panel,
.login-card {
  border: 1px solid rgba(145, 198, 255, .18);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .34);
  backdrop-filter: blur(18px);
}
.login-brand-panel {
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(10, 18, 33, .94), rgba(8, 15, 28, .88)),
    radial-gradient(circle at top right, rgba(66, 214, 255, .18), transparent 44%);
}
.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 11px/1.2 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #42d6ff;
}
.login-kicker.alt { color: #ffb36b; }
.login-brand-panel h1 {
  margin: 12px 0 14px;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: .92;
}
.login-copy,
.login-signal span,
.login-card .sub {
  color: var(--muted);
}
.login-copy {
  max-width: 48ch;
  margin: 0;
}
.login-copy code {
  font-family: 'IBM Plex Mono', monospace;
  color: #42d6ff;
}
.login-signals {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}
.login-signal {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(145, 198, 255, .14);
  background: rgba(255, 255, 255, .03);
}
.login-signal strong {
  display: block;
  margin-bottom: 6px;
}
.login-card {
  width: 100%;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(13, 22, 38, .96), rgba(11, 20, 35, .9)),
    radial-gradient(circle at top left, rgba(255, 179, 107, .08), transparent 40%);
}
.login-card-head h2 {
  margin: 10px 0 8px;
  font-size: 2rem;
}
.login-card .sub {
  margin: 0 0 18px;
}
.login-form {
  display: grid;
  gap: 14px;
}
.login-field {
  display: grid;
  gap: 8px;
}
.login-field span {
  font: 500 11px/1.2 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #42d6ff;
}
.login-form input,
.login-form button {
  min-height: 52px;
  font-family: inherit;
}
.login-form input {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(145, 198, 255, .14);
}
.login-form input:focus {
  outline: none;
  border-color: #42d6ff;
  box-shadow: 0 0 0 3px rgba(66, 214, 255, .12);
}
.login-form button {
  color: #04111c;
  background: linear-gradient(135deg, #42d6ff, #22c8a3);
  border-color: transparent;
}
.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); }
  .login-shell { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .login-body { padding: 14px; }
  .login-brand-panel,
  .login-card { padding: 22px 18px; border-radius: 20px; }
  .login-card-head h2 { font-size: 1.7rem; }
}
