/* E4E Roster — base styles */
/* UCSD palette: navy #182B49, gold #C69214 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #182B49;
  --gold:   #C69214;
  --bg:     #F5F6F8;
  --surface:#FFFFFF;
  --text:   #1A1A2E;
  --muted:  #6B7280;
  --border: #E5E7EB;
  --danger: #DC2626;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, background .15s;
  text-decoration: none;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn-primary  { background: var(--navy); color: #fff; }
.btn-secondary{ background: var(--border); color: var(--text); }
.btn-ghost    { background: transparent; color: var(--muted); }
.btn-sm       { padding: .3rem .8rem; font-size: .85rem; }
.btn-full     { width: 100%; }

/* ── Alerts ──────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-bottom: 1rem;
}
.alert-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }

/* ── Auth page ───────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
}

.auth-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.auth-header { text-align: center; margin-bottom: 2rem; }

.auth-logo {
  display: inline-block;
  background: var(--navy);
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .05em;
  padding: .4rem .9rem;
  border-radius: 6px;
  margin-bottom: .75rem;
}

.auth-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
}

.auth-header p {
  color: var(--muted);
  font-size: .875rem;
  margin-top: .25rem;
}

.auth-note {
  margin-top: 1.25rem;
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
}

/* ── App shell ───────────────────────────── */
.app-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow);
}

.app-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .02em;
  color: #fff;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.app-nav a {
  color: rgba(255,255,255,.8);
  font-size: .9rem;
}
.app-nav a:hover { color: #fff; text-decoration: none; }

.nav-user {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
}

.app-main {
  max-width: 1100px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.app-main h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

/* ── Cards ───────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--navy);
}

.card p { margin-bottom: 1rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

/* ── Utilities ───────────────────────────── */
.text-muted { color: var(--muted); font-size: .9rem; }

.tag {
  display: inline-block;
  background: var(--surface-alt, #F1F5F9);
  color: var(--text, #1E293B);
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 4px;
  font-size: .78rem;
  padding: .15rem .45rem;
  font-family: monospace;
}

.info-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .35rem 1.25rem;
  font-size: .9rem;
}
.info-list dt { color: var(--muted); font-weight: 500; }
.info-list dd { margin: 0; }

/* ── Admin ───────────────────────────────── */
.badge-admin {
  font-size: .7rem;
  font-weight: 700;
  background: var(--gold);
  color: var(--navy);
  padding: .15rem .45rem;
  border-radius: 4px;
  letter-spacing: .04em;
  vertical-align: middle;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

/* ── Wizard ──────────────────────────────── */
.wizard-header { margin-bottom: 1.75rem; }

.wizard-steps {
  display: flex;
  gap: 0;
  list-style: none;
  margin-top: .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 640px;
}

.wizard-steps li {
  flex: 1;
  text-align: center;
  padding: .5rem .75rem;
  font-size: .85rem;
  color: var(--muted);
  background: var(--bg);
  border-right: 1px solid var(--border);
}
.wizard-steps li:last-child { border-right: none; }
.wizard-steps li.active { background: var(--navy); color: #fff; font-weight: 600; }
.wizard-steps li.done  { background: #EEF2FF; color: var(--navy); }

/* ── Forms ───────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label { font-size: .875rem; font-weight: 600; color: var(--text); }

.form-group input,
.form-group select,
.form-group textarea {
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--navy); }

.form-hint { font-size: .78rem; color: var(--muted); }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .4rem .75rem;
  padding: .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 200px;
  overflow-y: auto;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .875rem;
  cursor: pointer;
}

.form-actions { display: flex; gap: .75rem; align-items: center; }

/* ── Alert variants ──────────────────────── */
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.alert-warn    { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ── Detail table ────────────────────────── */
.detail-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .9rem; }
.detail-table th, .detail-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--border); text-align: left; }
.detail-table th { width: 140px; color: var(--muted); font-weight: 600; }

.username-preview {
  font-family: monospace;
  font-size: 1rem;
  padding: .4rem .75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy);
  min-height: 2.2rem;
}

.temp-password {
  font-family: monospace;
  background: var(--bg);
  padding: .2rem .4rem;
  border-radius: 4px;
  font-size: .95rem;
}
