:root {
  --bg0: #061428;
  --bg1: #071f3a;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.10);
  --txt: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.60);
  --line: rgba(255,255,255,.12);
  --gold: #f6c24a;
  --teal: #2fd0c7;
  --gemini: #8aa6ff;
  --accent: #c8b89a;
  --error: #e2534a;
  --ok: #7fd6a0;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--txt);
  font-family: 'DM Mono', ui-monospace, monospace;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(47,208,199,.22), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(246,194,74,.14), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.wrap { width: min(980px, 100%); }
.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,.03));
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 18px 70px rgba(0,0,0,.45);
  overflow: hidden;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  inset: -120px -120px auto auto;
  width: 360px; height: 360px;
  background:
    radial-gradient(circle at 30% 30%, rgba(47,208,199,.20), transparent 60%),
    radial-gradient(circle at 60% 60%, rgba(246,194,74,.18), transparent 62%);
  filter: blur(16px);
  opacity: .9;
  pointer-events: none;
  border-radius: 999px;
}
.logo {
  width: 86px; height: 86px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.04);
  padding: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.45), 0 0 0 6px rgba(47,208,199,.08);
  flex: 0 0 auto;
}
.logo img { width: 100%; height: 100%; border-radius: 999px; display: block; filter: saturate(1.08) contrast(1.05); }
header { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; position: relative; }
h1 { font-family: 'DM Serif Display', serif; font-size: 28px; font-weight: 400; letter-spacing: .2px; }
header p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; font-size: 14px; }
.panel { display: block; animation: fadeUp .35s ease both; position: relative; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.field-group { margin-bottom: 14px; }
label {
  display: block;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--txt);
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  padding: .65rem .85rem;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.28); }
.msg { font-size: 13px; margin-bottom: 14px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.25); position: relative; }
.msg.err { color: var(--error); border-color: rgba(226,83,74,.45); }
.msg.ok { color: var(--ok); border-color: rgba(127,214,160,.4); }
.hidden { display: none; }
.hint-text { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 16px; }
.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #0a0a09;
  border: none;
  border-radius: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .8rem;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  margin-top: 18px;
}
.btn-primary:hover { opacity: .88; }
.btn-primary:active { transform: scale(.99); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-secondary {
  width: 100%;
  background: transparent;
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .8rem;
  cursor: pointer;
  margin-top: 12px;
}
.btn-secondary:hover { border-color: rgba(255,255,255,.3); }
.links { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; }
.links a { color: var(--accent); text-decoration: none; }
.links a:hover { text-decoration: underline; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
h2 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 20px; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 4px; }
a.btn {
  text-decoration: none;
  color: var(--txt);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card2), rgba(255,255,255,.04));
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
a.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
}
.left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.name { font-weight: 500; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }
.dot-gold { background: var(--gold); }
.dot-teal { background: var(--teal); }
.dot-gemini { background: var(--gemini); }
.hint { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arrow { font-size: 18px; opacity: .8; }
footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  position: relative;
}
.logout-btn { background: none; border: none; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 12px; cursor: pointer; padding: 0; transition: color .2s; }
.logout-btn:hover { color: var(--error); }
.msgs { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.msg-item { border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 12px; padding: 12px 14px; background: rgba(0,0,0,.18); }
.msg-item.read { border-left-color: var(--line); opacity: .75; }
.msg-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; overflow-wrap: anywhere; }
.msg-meta strong { color: var(--txt); font-weight: 500; }
.msg-meta a { color: var(--accent); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; }
.btn-small { margin-top: 10px; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; font-family: 'DM Mono', monospace; font-size: 11px; padding: 5px 10px; cursor: pointer; }
.btn-small:hover { color: var(--txt); border-color: rgba(255,255,255,.3); }
.btn-small:disabled { opacity: .4; cursor: not-allowed; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  header { align-items: flex-start; }
  .logo { width: 74px; height: 74px; }
}
