/* ============================================================
   auth.css
   Modern Light Theme (compatible with old structure)
   ============================================================ */

.auth-body {
  overflow: auto;
  background: var(--bg-base);
}

.auth-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ============================================================
   LEFT PANEL
   ============================================================ */

.auth-left {
  width: 380px;
  flex-shrink: 0;
  background: var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Decorative Background */
.auth-left::before {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 320px;
  height: 320px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  pointer-events: none;
}

.auth-left::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}

.auth-left-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 2;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  z-index: 2;
}

.brand-icon {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.brand-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: 24px;
  color: #fff;
}

.brand-name span {
  color: rgba(255,255,255,0.72);
}

.auth-tagline {
  font-size: var(--text-md);
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  max-width: 260px;
}

.auth-left-footer {
  position: absolute;
  bottom: var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.45);
  z-index: 2;
}

/* ============================================================
   RIGHT PANEL
   ============================================================ */

.auth-right {
  flex: 1;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}

.auth-card-title {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--text-2xl);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.auth-card-title span {
  color: var(--accent);
}

.auth-card-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-base);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

/* ============================================================
   FORM
   ============================================================ */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.input-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  background: var(--bg-base);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-display);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

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

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,123,246,0.1);
}

.input-wrapper .form-input {
  padding-right: 44px;
}

.input-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  opacity: 0.5;
  cursor: pointer;
  transition: opacity var(--transition);
  display: flex;
  align-items: center;
}

.input-eye:hover {
  opacity: 1;
}

.form-link-row {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-sm);
}

.form-link {
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: var(--fw-bold);
  cursor: pointer;
  text-decoration: none;
}

.form-link:hover {
  text-decoration: underline;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
  flex: 1;
  width: 100%;
  height: 57.2px;
  padding: 16px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
  font-size: var(--text-lg);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  margin-bottom: var(--space-md);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-group {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
  background: var(--bg-base);
  width: 57.2px;
  height: 57.2px;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
}

.btn-back:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-back:active {
  transform: scale(0.98);
}

/* ============================================================
   AUTH SWITCH
   ============================================================ */

.auth-switch {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: 20px;
}

.auth-switch a {
  color: var(--accent);
  font-weight: var(--fw-bold);
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ============================================================
   REGISTER STEPS
   ============================================================ */

.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: var(--space-xl);
  width: 100%;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  background: white;
  transition: all 0.3s;
  z-index: 2;
}

.step-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.step-dot.done {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.step-label {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-top: 6px;
}

.step-label.active {
  color: var(--text-primary);
  font-weight: var(--fw-bold);
}

.step-line {
  width: 32px;
  height: 2px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  flex: 1;
  margin: 0 4px;
}

.step-line.done {
  background: var(--green);
}

.progress-line {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  z-index: 1;
  transform: translateY(-50%);
  transition: width 0.3s ease;
  margin-top: 35px;
}

/* ============================================================
   GENDER SELECT
   ============================================================ */

.gender-options {
  display: flex;
  gap: var(--space-sm);
}

.gender-btn {
  flex: 1;
  padding: 12px;
  background: var(--bg-base);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.gender-btn.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59,123,246,0.08);
}

/* ============================================================
   BLOOD TYPE SELECT
   ============================================================ */

.blood-options {
  display: flex;
  gap: var(--space-xs);
}

.blood-btn {
  flex: 1;
  padding: 10px;
  background: var(--bg-base);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.blood-btn.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59,123,246,0.08);
}

/* ============================================================
   FORM ROW
   ============================================================ */

.form-row {
  display: flex;
  gap: var(--space-md);
}

.form-row .form-group {
  flex: 1;
}

/* ============================================================
   PASSWORD STRENGTH
   ============================================================ */

.pw-strength {
  display: flex;
  gap: 4px;
  margin-top: var(--space-xs);
}

.pw-bar {
  flex: 1;
  height: 3px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  transition: background var(--transition);
}

.pw-bar.weak   { background: var(--red); }
.pw-bar.medium { background: var(--yellow); }
.pw-bar.strong { background: var(--green); }

/* ============================================================
   CONFIRM PAGE
   ============================================================ */

.confirm-section {
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.confirm-section-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: var(--text-sm);
}

.confirm-row:last-child {
  border-bottom: none;
}

.confirm-row .key {
  color: var(--text-secondary);
}

.confirm-row .val {
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
  text-align: right;
  max-width: 60%;
}

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(231, 48, 42, 0.10);
  border: 1px solid rgba(231, 48, 42, 0.28);
  color: var(--red, #E7302A);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.form-alert::before {
  content: "!";
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  background: var(--red, #E7302A);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  margin-top: 1px;
}

.form-alert[hidden] {
  display: none;
}



/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet — left panel jadi lebih kecil */
@media (max-width: 900px) {
  .auth-left {
    width: 260px;
    padding: var(--space-xl) var(--space-lg);
  }

  .brand-icon {
    width: 56px;
    height: 56px;
  }

  .brand-icon img {
    width: 34px;
    height: 34px;
  }

  .brand-name {
    font-size: 18px;
  }

  .auth-tagline {
    font-size: 13px;
  }

  .auth-card {
    padding: 28px 24px;
  }
}

/* Mobile — left panel hilang, full single column */
@media (max-width: 640px) {
  .auth-layout {
    flex-direction: column;
    min-height: 100vh;
  }

  .auth-left {
    width: 100%;
    min-height: 130px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
  }

  /* Aksen bulat — kiri bawah */
  .auth-left::before {
    display: block;
    width: 180px;
    height: 180px;
    bottom: -70px;
    left: -50px;
    top: unset;
    right: unset;
  }

  /* Aksen bulat — kanan atas */
  .auth-left::after {
    display: block;
    width: 130px;
    height: 130px;
    top: -50px;
    right: -30px;
    bottom: unset;
    left: unset;
  }

  /* Aksen tambahan — tengah kanan (ekstra dekorasi) */
  .auth-left-center::after {
    content: '';
    position: absolute;
    right: 60px;
    bottom: -40px;
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
  }

  .auth-left-center {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    z-index: 2;
    position: relative;
  }

  .auth-brand {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
  }

  .brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }

  .brand-icon img {
    width: 30px;
    height: 30px;
  }

  .brand-name {
    font-size: 17px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.1);
  }

  /* Tagline tampil kecil di bawah brand name */
  .auth-tagline {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
    max-width: unset;
    line-height: 1.4;
  }

  .auth-left-footer {
    display: none;
  }

  .auth-right {
    flex: 1;
    align-items: flex-start;
    padding: var(--space-lg) var(--space-md);
  }

  .auth-card {
    padding: 24px 20px;
    border-radius: var(--radius-lg);
  }

  .auth-card-title {
    font-size: 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .gender-options {
    flex-direction: column;
  }

  .blood-options {
    flex-wrap: wrap;
  }

  .blood-btn {
    min-width: calc(25% - 4px);
  }

  .steps-indicator {
    margin-bottom: var(--space-lg);
  }

  .step-label {
    font-size: 9px;
  }

  .btn-primary {
    font-size: 15px;
    height: 50px;
    padding: 14px;
  }

  .btn-back {
    width: 50px;
    height: 50px;
  }
}

/* Small mobile — extra padding reduction */
@media (max-width: 380px) {
  .auth-right {
    padding: var(--space-md) var(--space-sm);
  }

  .auth-card {
    padding: 20px 16px;
  }

  .form-input {
    padding: 10px 12px;
    font-size: 14px;
  }
}