:root {
  --bg0: #0e141b;
  --bg1: #15202b;
  --card: #1a2733;
  --line: #2b3b4c;
  --text: #e7eef6;
  --muted: #9bb0c3;
  --accent: #2f9e6b;
  --accent2: #3d8fd1;
  --danger: #e25b5b;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  font-family: "Segoe UI", "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--text); background: var(--bg0); }
body { position: relative; }

.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(61, 143, 209, .18), transparent 60%),
    radial-gradient(700px 420px at 90% 0%, rgba(47, 158, 107, .14), transparent 55%),
    linear-gradient(180deg, #0e141b 0%, #101820 100%);
}

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; border-bottom: 1px solid var(--line);
  background: rgba(14, 20, 27, .72); backdrop-filter: blur(8px);
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand strong { display: block; font-size: 15px; }
.brand small { color: var(--muted); }
.logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(145deg, var(--accent2), var(--accent));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.top-meta { display: flex; gap: 8px; }
.pill {
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: var(--bg1);
}
.pill.soft { opacity: .85; }

.shell {
  max-width: 980px; margin: 48px auto; padding: 0 20px;
  display: grid; grid-template-columns: 1.25fr .85fr; gap: 22px;
}
.card, .side {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); padding: 28px;
}
h1 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.02em; }
.lead { margin: 0 0 22px; color: var(--muted); line-height: 1.5; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.form label.row {
  grid-template-columns: auto 1fr; align-items: center; gap: 8px; color: var(--text);
}
.form input[type="text"], .form input[type="password"] {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg1); color: var(--text);
  outline: none;
}
.form input:focus { border-color: #4aa3d8; box-shadow: 0 0 0 3px rgba(61,143,209,.2); }
.btn {
  margin-top: 4px; border: 0; border-radius: 10px; padding: 12px 16px;
  background: linear-gradient(180deg, #3ea978, #2f9e6b); color: #fff;
  font-weight: 650; cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }
.err { margin: 0; color: #ffb4b4; font-size: 13px; line-height: 1.4; }
.note {
  margin-top: 22px; padding: 14px 16px; border-radius: 12px;
  background: rgba(61, 143, 209, .08); border: 1px solid rgba(61, 143, 209, .25);
}
.note p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.mono { font-family: ui-monospace, Consolas, monospace; color: #c9e4ff; }

.side h2 { margin: 0 0 14px; font-size: 16px; }
.side ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.status {
  margin-top: 22px; display: flex; align-items: center; gap: 8px;
  color: #b7f0d0; font-size: 13px;
}
.dot, .online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #35d392; box-shadow: 0 0 0 4px rgba(53, 211, 146, .15);
  display: inline-block;
}

.foot {
  text-align: center; color: #6f8294; font-size: 12px;
  padding: 18px 12px 40px;
}

/* support widget */
.support { position: fixed; right: 18px; bottom: 18px; z-index: 50; }
.support-fab {
  border: 0; border-radius: 999px; padding: 12px 16px;
  background: #1f3345; color: var(--text); border: 1px solid var(--line);
  box-shadow: var(--shadow); cursor: pointer; display: flex; gap: 8px; align-items: center;
}
.support-panel {
  width: min(360px, calc(100vw - 28px)); height: 460px;
  margin-bottom: 10px; display: flex; flex-direction: column;
  background: #13202c; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden;
}
.support-head {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: #172636;
}
.support-head small { display: block; color: var(--muted); margin-top: 2px; }
.support-head .x {
  border: 0; background: transparent; color: var(--muted);
  font-size: 22px; cursor: pointer; line-height: 1;
}
.support-log {
  flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.bubble {
  max-width: 85%; padding: 10px 12px; border-radius: 12px;
  font-size: 13px; line-height: 1.45;
}
.bubble.sys { background: #223546; color: #d5e4f2; align-self: flex-start; }
.bubble.me { background: #2f6f9f; color: #fff; align-self: flex-end; }
.bubble.typing {
  align-self: flex-start; background: #223546; color: var(--muted);
  font-style: italic;
}
.support-form {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  padding: 10px; border-top: 1px solid var(--line);
}
.support-form input {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--bg1); color: var(--text); outline: none;
}
.support-form button {
  border: 0; border-radius: 10px; width: 42px; background: var(--accent2); color: #fff; cursor: pointer;
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; margin-top: 24px; }
  .top { padding: 14px 16px; }
}
