/* Shared styles for /login /setup /forgot-password /reset/<token> /profile */

:root {
  --bg:            #0b0e13;
  --panel:         #12161d;
  --panel-2:       #1c2128;
  --border:        #1f2430;
  --border-strong: #30363d;
  --text:          #e6edf3;
  --muted:         #8b949e;
  --info:          #38bdf8;
  --info-soft:     rgba(56,189,248,0.15);
  --down:          #ef4444;
  --down-soft:     rgba(239,68,68,0.12);
  --up:            #22c55e;
  --up-soft:       rgba(34,197,94,0.15);
  --warn:          #f59e0b;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(ellipse at top, rgba(56,189,248,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(163,113,247,0.06) 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
}
body.compact { align-items: center; }

.card {
  width: 100%;
  max-width: 480px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.04) inset;
}
.card.wide { max-width: 600px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.brand .dot {
  width: 10px; height: 10px;
  background: var(--up);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(34,197,94,0.6);
}
.brand .name {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 24px;
  line-height: 1.5;
}
h2.section {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--info);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
h2.section:first-of-type { margin-top: 18px; }

label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 600;
}
.field { margin-bottom: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .row { grid-template-columns: 1fr; } }

input[type=text],
input[type=email],
input[type=password] {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus {
  outline: none;
  border-color: var(--info);
  box-shadow: 0 0 0 3px var(--info-soft);
}
input.error { border-color: var(--down); }
input[readonly] { background: rgba(255,255,255,0.03); color: var(--muted); }

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  cursor: pointer;
  user-select: none;
}
.toggle input { accent-color: var(--info); width: 16px; height: 16px; }
.toggle .label-text { font-size: 13px; color: var(--text); }
.toggle .label-hint { font-size: 11px; color: var(--muted); margin-left: auto; }

.help {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.field-error {
  margin-top: 5px;
  color: #fecaca;
  font-size: 12px;
}

.btn {
  width: 100%;
  background: var(--info);
  color: #0b0e13;
  border: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .05s ease, filter .15s ease;
  margin-top: 4px;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.banner {
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.banner.error { background: var(--down-soft); border: 1px solid rgba(239,68,68,0.4); color: #fecaca; }
.banner.success { background: var(--up-soft); border: 1px solid rgba(34,197,94,0.4); color: #bbf7d0; }
.banner.info { background: var(--info-soft); border: 1px solid rgba(56,189,248,0.4); color: #bae6fd; }
.banner.warn { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.4); color: #fcd34d; }

.aux-links {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.aux-links a { color: var(--muted); text-decoration: none; }
.aux-links a:hover { color: var(--info); }

.footer {
  margin-top: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.05em;
}

/* Profile page back nav */
.topnav {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}
.topnav a { color: var(--muted); text-decoration: none; }
.topnav a:hover { color: var(--info); }

/* Section card inside profile */
.section-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 18px 22px;
  margin-top: 16px;
}
.section-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}
.section-card .hint {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 16px;
  line-height: 1.5;
}
