/* TUM Onboarding Portal - Dark Theme Stylesheet */
:root {
  --tum-blue: #0065BD;
  --tum-header: #0e396e;
  --tum-lighter: #eef3f9;
  --bg-main: #020617;
  --card-bg: #0f172a;
  --card-border: #1e293b;
  --input-bg: #1e293b;
  --input-border: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── TUM Header ────────────────────────────────────────────── */
.tum-header {
  background-color: var(--tum-header);
  color: #ffffff;
  height: 102px;
  min-height: 102px;
  position: relative;
  z-index: 50;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.tum-header-inner {
  max-width: 1664px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.tum-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.tum-logo-link:hover {
  opacity: 0.8;
}

.tum-logo-svg {
  width: 80px;
  height: 42px;
  fill: currentColor;
}

.tum-logo-text {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 400;
  color: #ffffff;
}

.tum-header-divider {
  height: 28px;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.2);
}

.tum-brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.tum-app-title {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.tum-app-title:hover {
  color: #bfdbfe;
}

.tum-app-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  transition: color 0.15s ease;
}

.tum-app-subtitle:hover {
  color: #ffffff;
}

/* ── Main Layout ───────────────────────────────────────────── */
.main-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 101, 189, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(14, 57, 110, 0.08) 0%, transparent 50%);
}

.onboarding-card {
  width: 100%;
  max-width: 580px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* ── Step Progress Indicator ────────────────────────────────── */
.stepper-header {
  padding: 24px 32px 18px;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid var(--card-border);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.step-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.step-item.active .step-circle {
  background: var(--tum-blue);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 101, 189, 0.5);
}

.step-item.active .step-label {
  color: #93c5fd;
  font-weight: 600;
}

.step-item.completed .step-circle {
  background: #064e3b;
  border-color: var(--accent-green);
  color: #6ee7b7;
}

.step-item.completed .step-label {
  color: #6ee7b7;
}

.stepper-line {
  position: absolute;
  top: 16px;
  left: 16%;
  right: 16%;
  height: 2px;
  background: var(--card-border);
  z-index: 1;
}

/* ── Card Content ──────────────────────────────────────────── */
.card-body {
  padding: 32px;
}

.card-title {
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Forms and Inputs ──────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-label-hint {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: normal;
  margin-left: 4px;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.form-control {
  width: 100%;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--tum-blue);
  box-shadow: 0 0 0 3px rgba(0, 101, 189, 0.25);
}

.form-control::placeholder {
  color: var(--text-dim);
}

.otp-input {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 26px;
  letter-spacing: 12px;
  text-align: center;
  padding: 14px;
  font-weight: 700;
  color: #93c5fd;
}

/* ── Password Visibility & Generator ────────────────────────── */
.input-btn-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.input-btn-toggle:hover {
  color: #ffffff;
}

/* ── Password Strength Meter ────────────────────────────────── */
.strength-container {
  margin-top: 12px;
}

.strength-bar-bg {
  height: 6px;
  background: var(--input-bg);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

.strength-label {
  font-weight: 600;
}

/* ── Policy Checklist ──────────────────────────────────────── */
.policy-checklist {
  list-style: none;
  margin: 16px 0 24px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px 18px;
}

.policy-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.policy-item:last-child {
  margin-bottom: 0;
}

.policy-item.met {
  color: #6ee7b7;
}

.policy-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
}

/* ── Password Generator Toolbar ─────────────────────────────── */
.generator-box {
  background: rgba(30, 41, 59, 0.4);
  border: 1px dashed var(--input-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.generator-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.btn-generate {
  background: rgba(0, 101, 189, 0.15);
  border: 1px solid rgba(0, 101, 189, 0.4);
  color: #93c5fd;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-generate:hover {
  background: var(--tum-blue);
  color: #ffffff;
  border-color: var(--tum-blue);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  background-color: var(--tum-blue);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn-primary:hover {
  background-color: #0b549e;
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: var(--input-bg);
  color: #ffffff;
  border-color: var(--input-border);
}

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.4;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.alert-info {
  background-color: rgba(0, 101, 189, 0.12);
  border: 1px solid rgba(0, 101, 189, 0.35);
  color: #93c5fd;
}

.alert-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── User Chip / Anchor Summary ────────────────────────────── */
.anchor-chip {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.anchor-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.anchor-value {
  font-size: 14px;
  font-weight: 500;
  color: #93c5fd;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* ── Success Display ───────────────────────────────────────── */
.success-box {
  text-align: center;
  padding: 20px 0 10px;
}

.success-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--accent-green);
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  text-align: left;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.details-table td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--card-border);
}

.details-table tr:last-child td {
  border-bottom: none;
}

.details-table .key {
  color: var(--text-dim);
  width: 35%;
}

.details-table .val {
  color: #ffffff;
  font-weight: 500;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: #93c5fd;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .tum-logo-text {
    display: none;
  }
  .card-body {
    padding: 24px 20px;
  }
  .stepper-header {
    padding: 20px 16px 14px;
  }
  .step-label {
    font-size: 10px;
  }
  .otp-input {
    font-size: 20px;
    letter-spacing: 6px;
  }
}
