/* Credentials shell (C1 Aurora). Imports the shared design tokens from
   _tokens.css; the --c1-* aliases below stay so existing component CSS
   keeps working, but the underlying values come from one place now. */

@import url('_tokens.css');

:root {
  /* Credentials shell aliases -> shared tokens. Change the brand emerald in
     _tokens.css and every --c1-emerald reference picks it up. */
  --c1-bg:          var(--chassis-bg-cred);
  --c1-panel:       var(--chassis-panel);
  --c1-panel-end:   var(--chassis-panel-end);
  --c1-border:      var(--border);
  --c1-border-soft: var(--border-soft);
  --c1-fg:          var(--ink-cred-fg);
  --c1-fg-soft:     var(--ink-soft);
  --c1-fg-muted:    var(--ink-cred-mute);
  --c1-fg-dim:      var(--ink-cred-dim);
  --c1-emerald:     var(--brand-emerald);
  --c1-emerald-soft: var(--brand-emerald-soft);
  --c1-danger:      var(--status-danger-warm);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    min-height: 100vh;
    background-color: #1a1a1a;
    /* Layer stack, bottom to top:
       1. Geometric triangle pattern (five linear-gradient bands).
       2. Diagonal vignette running TL -> BR: pushes the corners darker so
          the centered blue hue reads as a soft spotlight instead of a flat wash.
       3. Centered radial pool of the credential-blue theme color, fading
          to transparent at ~70% so the corners stay in the dark base. */
    background-image:
        radial-gradient(ellipse 1400px 1000px at 50% 50%, rgba(0, 102, 204, 0.22), rgba(0, 102, 204, 0.08) 35%, transparent 70%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.5) 100%),
        linear-gradient(30deg, #1e1e1e 12%, transparent 12.5%, transparent 87%, #1e1e1e 87.5%),
        linear-gradient(150deg, #1e1e1e 12%, transparent 12.5%, transparent 87%, #1e1e1e 87.5%),
        linear-gradient(30deg, #1e1e1e 12%, transparent 12.5%, transparent 87%, #1e1e1e 87.5%),
        linear-gradient(150deg, #1e1e1e 12%, transparent 12.5%, transparent 87%, #1e1e1e 87.5%),
        linear-gradient(60deg, rgba(30,30,30,0.6) 25%, transparent 25.5%, transparent 75%, rgba(30,30,30,0.6) 75%);
    background-size: 100% 100%, 100% 100%, 80px 140px, 80px 140px, 80px 140px, 80px 140px, 80px 140px;
    background-position: 0 0, 0 0, 0 0, 0 0, 40px 70px, 40px 70px, 40px 70px;
    background-attachment: fixed, fixed, scroll, scroll, scroll, scroll, scroll;
    color: var(--c1-fg-soft);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}



/* Ambient gradient pools */
.bg-glow {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 18% 22%, rgba(80, 230, 195, 0.10), transparent 70%),
    radial-gradient(ellipse 800px 700px at 88% 78%, rgba(99, 130, 255, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle noise */
.bg-noise {
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.04;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}

/* Back link */
.back-link {
  position: absolute; top: 22px; left: 22px; z-index: 5;
  color: var(--c1-fg-muted);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.back-link:hover {
  color: var(--c1-emerald);
  background: rgba(80, 230, 195, 0.06);
}

/* Form container (narrow + wide variants) */
.form-card {
  position: relative; z-index: 10;
  background: linear-gradient(180deg, var(--c1-panel) 0%, var(--c1-panel-end) 100%);
  border: 1px solid var(--c1-border);
  border-radius: 14px;
  padding: 40px 38px;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  animation: cardIn 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.form-card.wide { max-width: 640px; padding: 44px 48px; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Wordmark */
.wordmark {
  margin: 0 auto 24px;
  display: flex; justify-content: center; align-items: center; gap: 10px;
}
.wordmark-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  /* Background gradient + text fallback for pages that still inline letters;
     the real brand image is rendered by the child <img> below. */
  background: transparent;
  border-radius: 8px;
  color: #060912; font-weight: 800; font-size: 13px;
}
.wordmark-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(80, 230, 195, 0.35));
}
.wordmark-name {
  color: var(--c1-fg);
  font-family: var(--font-body);
  font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
}

/* Eyebrow pill */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px;
  background: rgba(80, 230, 195, 0.08);
  border: 1px solid rgba(80, 230, 195, 0.22);
  border-radius: 999px;
  font-size: 11px; color: var(--c1-emerald-soft);
  font-weight: 500; letter-spacing: 0.04em;
  white-space: nowrap;
  margin-bottom: 16px;
}
.eyebrow-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--c1-emerald);
  box-shadow: 0 0 6px var(--c1-emerald);
}

.eyebrow-row { display: flex; justify-content: center; margin-bottom: 14px; }
.eyebrow-row .eyebrow { margin-bottom: 0; }

/* Step indicator (wizard) */
.step-indicator {
  text-align: center;
  color: var(--c1-fg-dim);
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 500;
  margin-bottom: 14px;
}

/* Titles */
.title {
  font-family: var(--font-body);
  font-weight: 600; font-size: 28px;
  line-height: 1.1; letter-spacing: -0.02em;
  color: var(--c1-fg);
  text-align: center;
  margin: 0 0 8px;
}
.title.lg { font-size: 32px; margin-bottom: 10px; }
.title em {
  font-family: var(--font-display);
  font-style: italic; font-weight: 400;
  color: var(--c1-emerald);
  letter-spacing: -0.01em;
}

.sub {
  text-align: center;
  color: var(--c1-fg-muted);
  font-size: 14px; line-height: 1.55;
  margin: 0 0 28px;
}
.sub a { color: var(--c1-emerald); font-weight: 500; text-decoration: none; }
.sub a:hover { text-decoration: underline; }

/* Inputs */
.input,
.select {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--c1-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--c1-fg);
  font-size: 14px; font-weight: 400;
  font-family: var(--font-body);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  outline: none;
}
.input::placeholder { color: var(--c1-fg-dim); }
.input:focus, .select:focus {
  border-color: rgba(80, 230, 195, 0.5);
  background: rgba(80, 230, 195, 0.03);
  box-shadow: 0 0 0 3px rgba(80, 230, 195, 0.12);
}
.select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa3bb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.select option { background: var(--c1-panel); color: var(--c1-fg); }

.field-row { position: relative; }
.field-row .input { padding-right: 42px; }
.toggle-eye {
  position: absolute; right: 12px; top: 22px;
  color: var(--c1-fg-muted); cursor: pointer; line-height: 0;
}

.label {
  display: block;
  color: var(--c1-fg-muted);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 6px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: span 2; }

/* Buttons */
.btn-primary {
  display: block;
  width: 100%;
  background: var(--c1-emerald);
  color: #060912;
  border: none;
  border-radius: 8px;
  padding: 13px 22px;
  font-size: 14px; font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  cursor: pointer;
  margin: 16px 0 8px;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow:
    0 0 0 1px rgba(80, 230, 195, 0.4),
    0 8px 22px rgba(80, 230, 195, 0.12);
}
.btn-primary:hover { background: #6df0d2; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--c1-fg-soft);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 14px; font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--c1-fg);
}

.nav-row { display: flex; gap: 10px; margin-top: 16px; }
.nav-row .btn-primary { margin: 0; flex: 2; }
.nav-row .btn-ghost { flex: 1; }

/* OAuth */
.oauth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 14px;
  color: var(--c1-fg-dim);
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase;
}
.oauth-divider::before,
.oauth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--c1-border);
}

.oauth-stack { display: flex; flex-direction: column; gap: 8px; }

.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--c1-border);
  border-radius: 8px;
  color: var(--c1-fg-soft);
  font-size: 13px; font-weight: 500;
  font-family: var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.oauth-btn:hover {
  background: rgba(80, 230, 195, 0.04);
  border-color: rgba(80, 230, 195, 0.25);
  color: var(--c1-fg);
}

/* OAuth verified banner */
.verified-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px;
  margin: 8px 0 16px;
  background: rgba(80, 230, 195, 0.08);
  border: 1px solid rgba(80, 230, 195, 0.25);
  border-radius: 8px;
  color: var(--c1-emerald-soft);
  font-size: 13px;
}
.verified-banner .check {
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(80, 230, 195, 0.18);
  color: var(--c1-emerald);
  display: inline-grid; place-items: center;
  font-size: 9px; font-weight: 700;
}
.verified-banner .verified-email { color: var(--c1-fg); font-weight: 600; }

/* Role chips */
.role-row {
  display: flex; gap: 8px;
  margin-bottom: 18px;
}
.role-chip {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--c1-border);
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--c1-fg-soft);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.role-chip:hover {
  background: rgba(80, 230, 195, 0.04);
  border-color: rgba(80, 230, 195, 0.25);
}
.role-chip.selected {
  background: rgba(80, 230, 195, 0.08);
  border-color: rgba(80, 230, 195, 0.4);
  color: var(--c1-fg);
  box-shadow: 0 0 0 3px rgba(80, 230, 195, 0.08);
}
.role-chip .radio {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.role-chip.selected .radio { border-color: var(--c1-emerald); }
.role-chip.selected .radio::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--c1-emerald);
}

/* Password strength */
.pwd-strength {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.pwd-bars { display: flex; gap: 4px; flex: 1; }
.pwd-bar {
  height: 3px; flex: 1; border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
}
.pwd-bar.lvl1 { background: #ff4444; }
.pwd-bar.lvl2 { background: #ff8800; }
.pwd-bar.lvl3 { background: #ffcc00; }
.pwd-bar.lvl4 { background: #00ff88; }
.pwd-strength-text {
  font-size: 11px; color: var(--c1-fg-muted);
  letter-spacing: 0.04em; font-weight: 500;
  min-width: 40px; text-align: right;
}

/* Inline link row */
.link-row { text-align: center; margin-top: 18px; color: var(--c1-fg-dim); font-size: 13px; }
.link-row a { color: var(--c1-fg-muted); font-weight: 500; text-decoration: none; }
.link-row a:hover { color: var(--c1-emerald); }
.link-row.right { text-align: right; margin-top: 6px; margin-bottom: 18px; }

/* Status banners */
.banner-pending {
  background: rgba(255, 200, 0, 0.06);
  border: 1px solid rgba(255, 200, 0, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 20px;
  color: #f0c98a;
  font-size: 13px;
  line-height: 1.55;
}
.banner-pending strong { color: #ffd480; font-weight: 600; }

.school-info {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.school-info.valid {
  background: rgba(80, 230, 195, 0.08);
  border: 1px solid rgba(80, 230, 195, 0.3);
  color: var(--c1-emerald-soft);
}
.school-info.invalid {
  background: rgba(255, 142, 99, 0.06);
  border: 1px solid rgba(255, 142, 99, 0.3);
  color: var(--c1-danger);
}

/* Trust row */
.trust {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding-top: 18px; margin-top: 22px;
  border-top: 1px solid var(--c1-border-soft);
  font-size: 11px;
  color: var(--c1-fg-dim);
}
.trust-label { letter-spacing: 0.14em; text-transform: uppercase; }
.trust-logos {
  display: flex; gap: 12px; align-items: center;
  font-family: var(--font-display);
  font-style: italic; font-size: 14px;
  color: var(--c1-fg-muted);
}

/* Page index (only on the index page) */
.index-grid {
  position: relative; z-index: 10;
  max-width: 980px; width: 90%;
  padding: 60px 0;
}
.index-grid h1 {
  font-family: var(--font-body);
  font-weight: 600; font-size: 36px;
  letter-spacing: -0.025em; color: var(--c1-fg);
  margin: 0 0 8px;
}
.index-grid h1 em {
  font-family: var(--font-display);
  font-style: italic; font-weight: 400;
  color: var(--c1-emerald);
}
.index-grid .sub { text-align: left; margin-bottom: 32px; max-width: 580px; }
.index-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.index-card {
  background: linear-gradient(180deg, var(--c1-panel) 0%, var(--c1-panel-end) 100%);
  border: 1px solid var(--c1-border);
  border-radius: 12px;
  padding: 22px 22px 20px;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: border-color 0.2s, transform 0.15s;
}
.index-card:hover {
  border-color: rgba(80, 230, 195, 0.3);
  transform: translateY(-2px);
}
.index-card-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px; color: var(--c1-fg-dim);
  margin-bottom: 12px;
}
.index-card h3 {
  font-family: var(--font-body);
  font-size: 18px; font-weight: 600;
  color: var(--c1-fg);
  margin: 0 0 6px;
}
.index-card p {
  font-size: 13px; line-height: 1.5;
  color: var(--c1-fg-muted);
  margin: 0 0 18px;
}
.index-card-go {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  color: var(--c1-emerald);
  letter-spacing: 0.04em;
}
