:root {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: #111a2b;
  --panel-2: #162236;
  --line: rgba(148, 163, 184, 0.16);
  --text: #e5eefb;
  --muted: #93a4bd;
  --accent: #4f8cff;
  --accent-2: #2dd4bf;
  --danger: #fb7185;
  --success: #34d399;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(79, 140, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 28%),
    var(--bg);
  color: var(--text);
}
.shell { min-height: 100vh; padding: 28px; }
.auth-layout {
  max-width: 1120px;
  margin: 0 auto;
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 1.2fr minmax(320px, 440px);
  gap: 24px;
  align-items: center;
}
.hero-panel, .card, .sidebar, .chat-card {
  background: rgba(17, 26, 43, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.hero-panel { padding: 40px; min-height: 420px; display: flex; flex-direction: column; justify-content: center; }
.auth-card { padding: 28px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  color: var(--accent-2);
  margin-bottom: 10px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 44px; line-height: 1.05; margin-bottom: 12px; }
.lede { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 60ch; }
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
input {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(10, 16, 28, 0.92);
  color: var(--text);
  padding: 0 14px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
.button.primary { background: linear-gradient(135deg, var(--accent), #6ea8ff); color: white; }
.button.secondary { background: rgba(79, 140, 255, 0.12); color: var(--text); border-color: rgba(79, 140, 255, 0.3); }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button.full { width: 100%; }
.text-link { color: #b7cae6; text-decoration: none; font-size: 14px; }
.notice {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.notice.success { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.28); }
.notice.error { background: rgba(251, 113, 133, 0.12); border: 1px solid rgba(251, 113, 133, 0.28); }
.workspace {
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}
.sidebar { padding: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.panel-title { font-size: 28px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.chat-card { padding: 0; display: grid; grid-template-rows: auto 1fr auto; min-height: 78vh; }
.chat-header { padding: 24px; border-bottom: 1px solid var(--line); }
.chat-log { padding: 24px; overflow: auto; display: grid; gap: 12px; align-content: start; }
.bubble {
  padding: 14px 16px;
  border-radius: 8px;
  max-width: min(720px, 100%);
  line-height: 1.55;
}
.bubble.assistant { background: rgba(79, 140, 255, 0.12); }
.bubble.user { background: rgba(45, 212, 191, 0.12); margin-left: auto; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.dashboard { max-width: 1280px; margin: 0 auto; display: grid; gap: 20px; }
.dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.subnav { display: flex; gap: 10px; flex-wrap: wrap; }
.subnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.subnav-link.active { background: rgba(79, 140, 255, 0.14); border-color: rgba(79, 140, 255, 0.34); }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.14);
  color: var(--text);
  font-size: 13px;
}
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 12px;
  cursor: pointer;
}
.mini.approve { background: rgba(52, 211, 153, 0.16); color: var(--text); border-color: rgba(52, 211, 153, 0.25); }
.mini.reject { background: rgba(251, 113, 133, 0.16); color: var(--text); border-color: rgba(251, 113, 133, 0.25); }
.mini.neutral { background: rgba(148, 163, 184, 0.12); color: var(--text); border-color: rgba(148, 163, 184, 0.24); }

@media (max-width: 980px) {
  .auth-layout, .workspace, .grid-two { grid-template-columns: 1fr; }
  .shell { padding: 18px; }
  h1 { font-size: 34px; }
}
