
:root {
  --fm-red: #ff1717;
  --fm-red-dark: #b90000;
  --fm-black: #050505;
  --fm-panel: #111111;
  --fm-panel-2: #181818;
  --fm-border: rgba(255,255,255,.11);
  --fm-text: #f6f6f6;
  --fm-muted: #9d9d9d;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body.auth-page {
  margin: 0;
  background:
    radial-gradient(circle at 85% 10%, rgba(255,23,23,.13), transparent 30rem),
    radial-gradient(circle at 10% 90%, rgba(255,23,23,.05), transparent 25rem),
    #050505;
  color: var(--fm-text);
  font-family: "Inter", sans-serif;
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(120deg, transparent 0 90px, rgba(255,255,255,.014) 92px 93px);
}

.auth-nav {
  position: relative;
  z-index: 10;
  padding: 1rem 0;
  border-bottom: 1px solid var(--fm-border);
  background: rgba(5,5,5,.72);
  backdrop-filter: blur(14px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: white;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.55rem;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.03em;
}

.auth-brand span span { color: var(--fm-red); }

.auth-shell {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 3rem 0;
}

.auth-card {
  overflow: hidden;
  border: 1px solid var(--fm-border);
  border-radius: 1.2rem;
  background: rgba(17,17,17,.92);
  box-shadow: 0 30px 100px rgba(0,0,0,.58);
}

.auth-visual {
  position: relative;
  min-height: 100%;
  padding: 3rem;
  background:
    linear-gradient(145deg, rgba(255,23,23,.94), rgba(115,0,0,.92)),
    #b90000;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(125deg, transparent 0 60px, rgba(255,255,255,.055) 62px 64px);
}

.auth-visual > * { position: relative; z-index: 2; }

.auth-visual img {
  width: min(100%, 430px);
  display: block;
  margin: 0 auto 2rem;
  filter: drop-shadow(0 25px 50px rgba(0,0,0,.45));
}

.auth-visual h1,
.auth-form-panel h1,
.onboarding-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  line-height: .95;
}

.auth-visual h1 { font-size: clamp(2.7rem, 5vw, 4.8rem); }

.auth-form-panel { padding: clamp(2rem, 5vw, 4rem); }

.auth-form-panel h1 { font-size: clamp(2.4rem, 4vw, 3.8rem); }

.auth-form-panel .lead,
.auth-subtext { color: var(--fm-muted); }

.form-label {
  color: #d8d8d8;
  font-size: .82rem;
  font-weight: 700;
}

.form-control,
.form-select {
  min-height: 50px;
  color: white;
  background: #0d0d0d;
  border: 1px solid var(--fm-border);
  border-radius: .55rem;
}

.form-control:focus,
.form-select:focus {
  color: white;
  background: #0d0d0d;
  border-color: var(--fm-red);
  box-shadow: 0 0 0 .2rem rgba(255,23,23,.12);
}

.form-control::placeholder { color: #666; }

.form-select {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.input-group-text {
  color: #777;
  background: #0d0d0d;
  border-color: var(--fm-border);
}

.password-toggle {
  cursor: pointer;
  border-left: 0;
}

.form-check-input {
  background-color: #111;
  border-color: #555;
}

.form-check-input:checked {
  background-color: var(--fm-red);
  border-color: var(--fm-red);
}

.btn-fm {
  --bs-btn-bg: var(--fm-red);
  --bs-btn-border-color: var(--fm-red);
  --bs-btn-hover-bg: #e20d0d;
  --bs-btn-hover-border-color: #e20d0d;
  --bs-btn-color: white;
  min-height: 50px;
  font-weight: 800;
  border-radius: .55rem;
}

.btn-outline-fm {
  min-height: 50px;
  border-color: var(--fm-border);
  color: white;
  font-weight: 700;
}

.btn-outline-fm:hover {
  color: white;
  background: #1c1c1c;
  border-color: #555;
}

.auth-link { color: var(--fm-red); font-weight: 700; }

.auth-link:hover { color: #ff5757; }

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: #777;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--fm-border);
}

.auth-alert {
  display: none;
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  border-radius: .55rem;
  font-size: .86rem;
}

.auth-alert.show { display: block; }

.auth-alert.error {
  color: #ffd6d6;
  background: rgba(255,23,23,.12);
  border: 1px solid rgba(255,23,23,.3);
}

.auth-alert.success {
  color: #d6ffe2;
  background: rgba(27,200,91,.1);
  border: 1px solid rgba(27,200,91,.28);
}

.demo-notice {
  padding: .8rem 1rem;
  margin-bottom: 1.25rem;
  color: #e8e8e8;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--fm-border);
  border-radius: .55rem;
  font-size: .78rem;
}

.demo-notice i { color: var(--fm-red); margin-right: .4rem; }

.password-strength {
  height: 5px;
  overflow: hidden;
  margin-top: .5rem;
  border-radius: 999px;
  background: #242424;
}

.password-strength span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--fm-red);
  transition: width .2s ease;
}

.password-rules {
  padding-left: 1.1rem;
  color: #777;
  font-size: .75rem;
}

/* Onboarding */
.onboarding-page {
  min-height: 100vh;
  padding-bottom: 3rem;
}

.onboarding-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1050px;
  margin: 2rem auto 0;
  padding: 0 1rem;
}

.onboarding-card {
  border: 1px solid var(--fm-border);
  border-radius: 1.1rem;
  background: rgba(16,16,16,.96);
  box-shadow: 0 30px 100px rgba(0,0,0,.55);
}

.onboarding-header {
  padding: 2rem;
  border-bottom: 1px solid var(--fm-border);
}

.onboarding-title { font-size: clamp(2.3rem, 5vw, 4rem); }

.progress-shell {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #282828;
}

.progress-bar-fm {
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b90000, var(--fm-red));
  transition: width .3s ease;
}

.step-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  margin-top: 1.25rem;
}

.step-indicator {
  color: #686868;
  font-size: .72rem;
  text-align: center;
}

.step-indicator span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0 auto .35rem;
  border-radius: 50%;
  border: 1px solid #444;
  background: #111;
  font-weight: 800;
}

.step-indicator.active,
.step-indicator.complete { color: white; }

.step-indicator.active span,
.step-indicator.complete span {
  border-color: var(--fm-red);
  background: var(--fm-red);
}

.step-panel {
  display: none;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.step-panel.active { display: block; }

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
}

.choice-card {
  position: relative;
  display: block;
  min-height: 125px;
  padding: 1.25rem;
  cursor: pointer;
  border: 1px solid var(--fm-border);
  border-radius: .8rem;
  background: #111;
  transition: .2s ease;
}

.choice-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,23,23,.45);
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card:has(input:checked) {
  border-color: var(--fm-red);
  background: rgba(255,23,23,.08);
  box-shadow: 0 0 0 1px rgba(255,23,23,.2);
}

.choice-card i {
  color: var(--fm-red);
  font-size: 1.45rem;
  margin-bottom: .65rem;
}

.choice-card strong { display: block; }

.choice-card small { color: var(--fm-muted); }

.onboarding-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2rem 2rem;
}

.summary-card {
  padding: 1.1rem;
  border: 1px solid var(--fm-border);
  border-radius: .75rem;
  background: #0c0c0c;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.summary-row:last-child { border-bottom: 0; }

.summary-row span:first-child { color: var(--fm-muted); }

.dashboard-placeholder {
  min-height: 100vh;
  padding: 6rem 0;
  background: #050505;
}

.dashboard-card {
  padding: 3rem;
  border: 1px solid var(--fm-border);
  border-radius: 1rem;
  background: #111;
  text-align: center;
}

@media (max-width: 991.98px) {
  .auth-visual { display: none; }
}

@media (max-width: 767.98px) {
  .choice-grid { grid-template-columns: 1fr; }

  .step-indicator { font-size: 0; }
  .step-indicator span { font-size: .72rem; }

  .onboarding-actions {
    padding: 1rem 1.5rem 1.5rem;
  }
}
