/* ============================================
   Xrecharge — Styles Apple Design System
   ============================================ */

:root {
  --apple-blue: #007AFF;
  --apple-green: #34C759;
  --apple-red: #FF3B30;
  --apple-orange: #FF9500;
  --apple-yellow: #FFCC00;
  --apple-purple: #AF52DE;
  --apple-gray: #8E8E93;
  --apple-gray2: #AEAEB2;
  --apple-gray3: #C7C7CC;
  --apple-gray4: #D1D1D6;
  --apple-gray5: #E5E5EA;
  --apple-gray6: #F2F2F7;
  --apple-bg: #F2F2F7;
  --apple-card: #FFFFFF;
  --apple-separator: rgba(60, 60, 67, 0.12);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--apple-bg);
  color: #1C1C1E;
  padding-bottom: env(safe-area-inset-bottom, 0);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* ============================================
   Layout
   ============================================ */
.page-container {
  min-height: 100vh;
  background: var(--apple-bg);
  max-width: 768px;
  margin: 0 auto;
  animation: slideUp 0.4s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.content-area {
  padding: 20px;
  padding-bottom: 120px;
}

.space-y > * + * { margin-top: 16px; }

/* ============================================
   Glass Effect
   ============================================ */
.glass {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

/* ============================================
   Apple Navigation Header
   ============================================ */
.apple-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 12px 20px;
}

.apple-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 32px;
}

.apple-nav-title {
  font-size: 17px;
  font-weight: 600;
  color: #1C1C1E;
}

.apple-nav-back {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--apple-blue);
  font-size: 17px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}

/* ============================================
   Home Header
   ============================================ */
.home-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 12px 20px;
}

.home-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-title {
  font-size: 28px;
  font-weight: 700;
  color: #1C1C1E;
  letter-spacing: -0.5px;
}

.home-subtitle {
  font-size: 13px;
  color: var(--apple-gray);
  margin-top: -2px;
}

.avatar-btn {
  width: 40px;
  height: 40px;
  background: var(--apple-gray5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.avatar-btn .avatar-initial {
  font-size: 15px;
  font-weight: 600;
  color: var(--apple-blue);
}

/* ============================================
   Referral Banner
   ============================================ */
.referral-banner {
  background: linear-gradient(to right, var(--apple-blue), #5856D6);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 20px 0;
  cursor: pointer;
}

.referral-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.referral-text {
  flex: 1;
  min-width: 0;
}

.referral-text p:first-child {
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.referral-text p:last-child {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

/* ============================================
   Segmented Control
   ============================================ */
.segmented-control {
  margin: 0 20px;
  background: rgba(229, 229, 234, 0.8);
  border-radius: 10px;
  padding: 2px;
  display: flex;
}

.segment-btn {
  flex: 1;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: var(--apple-gray);
}

.segment-btn.active {
  background: white;
  color: #1C1C1E;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0.5px 1.5px rgba(0, 0, 0, 0.06);
}

.segment-logo {
  height: 12px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.segment-logo-lg {
  height: 15px;
}

.segment-btn.active .segment-logo {
  opacity: 1;
}

.platform-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-gray);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 8px;
}

/* ============================================
   Amount Display + Keypad
   ============================================ */
.amount-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin: 0 20px;
}

.amount-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-gray);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.amount-value {
  text-align: center;
  padding: 12px 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.amount-number {
  font-size: 48px;
  font-weight: 200;
  color: #1C1C1E;
  letter-spacing: -1px;
  line-height: 1;
}

.amount-cursor {
  font-size: 48px;
  font-weight: 200;
  color: var(--apple-blue);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

.amount-currency {
  font-size: 20px;
  font-weight: 400;
  color: var(--apple-gray3);
  margin-left: 8px;
  align-self: flex-end;
  margin-bottom: 4px;
}

.amount-divider {
  height: 1px;
  background: var(--apple-gray5);
  margin: 12px 0;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.preset-chip {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--apple-gray6);
  color: #3A3A3C;
}

.preset-chip.active {
  background: var(--apple-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.keypad {
  margin: 12px 20px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--apple-gray5);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.key-btn {
  background: white;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 400;
  color: #1C1C1E;
  border: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.08s ease;
}

.key-btn:active {
  background-color: #D1D1D6;
}

/* ============================================
   Action Buttons
   ============================================ */
.action-buttons {
  padding: 20px;
  display: flex;
  gap: 12px;
  padding-bottom: 112px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.15s ease;
  width: 100%;
}

.btn:active {
  transform: scale(0.97);
  opacity: 0.7;
}

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

.btn-blue {
  background: var(--apple-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.btn-green {
  background: var(--apple-green);
  color: white;
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.2);
}

.btn-red-outline {
  background: white;
  color: var(--apple-red);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-sm {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-lg {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ============================================
   Deposit / Withdraw Amount Card
   ============================================ */
.deposit-amount {
  text-align: center;
}

.deposit-amount-value {
  font-size: 40px;
  font-weight: 700;
  color: #1C1C1E;
  letter-spacing: -1px;
  margin-top: 8px;
}

.deposit-amount-currency {
  font-size: 18px;
  font-weight: 500;
  color: var(--apple-gray3);
  margin-left: 6px;
}

.instant-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.instant-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apple-green);
}

.instant-badge span {
  font-size: 12px;
  color: var(--apple-green);
  font-weight: 500;
}

/* ============================================
   Form Fields
   ============================================ */
.form-section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 16px;
  margin-bottom: 6px;
}

.form-group {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
}

.form-group + .form-group {
  border-top: 1px solid var(--apple-gray5);
}

.form-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.form-field {
  flex: 1;
}

.form-field label {
  display: block;
  font-size: 11px;
  color: var(--apple-gray);
  font-weight: 500;
}

.form-field input {
  width: 100%;
  font-size: 15px;
  color: #1C1C1E;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  margin-top: 2px;
  font-family: inherit;
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  margin-top: 2px;
}

.phone-prefix {
  font-size: 15px;
  font-weight: 600;
  color: #1C1C1E;
  white-space: nowrap;
  user-select: none;
  padding-right: 10px;
  margin-right: 10px;
  border-right: 1.5px solid var(--apple-gray4);
  line-height: 1;
}

.phone-input-wrap input {
  flex: 1;
  margin-top: 0;
}

.form-field input::placeholder {
  color: var(--apple-gray3);
}

.form-field input:focus {
  box-shadow: none;
}

/* ============================================
   Warning Box
   ============================================ */
.warning-box {
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.12);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.warning-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--apple-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.warning-icon span {
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.warning-title {
  color: var(--apple-red);
  font-weight: 600;
  font-size: 13px;
}

.warning-text {
  color: rgba(255, 59, 48, 0.7);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.5;
}

/* ============================================
   Info Box (Instructions)
   ============================================ */
.info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-icon {
  width: 36px;
  height: 36px;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-title {
  font-size: 15px;
  font-weight: 600;
  color: #1C1C1E;
}

.info-text {
  font-size: 13px;
  color: var(--apple-gray);
  margin-top: 4px;
  line-height: 1.5;
}

.info-text strong {
  color: #1C1C1E;
  font-weight: 600;
}

.info-note {
  margin-top: 12px;
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-note .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--apple-green);
  flex-shrink: 0;
}

.info-note span {
  color: var(--apple-green);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  animation: toastIn 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.toast.success {
  background: var(--apple-green);
  color: white;
}

.toast.error {
  background: var(--apple-red);
  color: white;
}

.toast.hide {
  animation: toastOut 0.3s ease forwards;
}

/* ============================================
   Transaction Row
   ============================================ */
.tx-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
}

.tx-row + .tx-row {
  border-top: 1px solid var(--apple-gray5);
}

.tx-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tx-icon.deposit { background: rgba(0, 122, 255, 0.1); }
.tx-icon.withdraw { background: rgba(52, 199, 89, 0.1); }

.tx-info {
  flex: 1;
  min-width: 0;
}

.tx-label {
  font-size: 15px;
  font-weight: 500;
  color: #1C1C1E;
}

.tx-time {
  font-size: 12px;
  color: var(--apple-gray);
}

.tx-amount {
  text-align: right;
  flex-shrink: 0;
}

.tx-amount-value {
  font-size: 15px;
  font-weight: 600;
}

.tx-amount-value.deposit { color: var(--apple-blue); }
.tx-amount-value.withdraw { color: var(--apple-green); }

.tx-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
}

.tx-status .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.tx-status .dot.success { background: var(--apple-green); }
.tx-status .dot.pending { background: var(--apple-orange); }
.tx-status .dot.failed { background: var(--apple-red); }

.tx-status span {
  font-size: 11px;
  font-weight: 500;
}

.tx-status span.success { color: var(--apple-green); }
.tx-status span.pending { color: var(--apple-orange); }
.tx-status span.failed { color: var(--apple-red); }

/* ============================================
   Summary Card (Historique)
   ============================================ */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.summary-item {
  text-align: center;
}

.summary-item + .summary-item {
  border-left: 1px solid var(--apple-gray5);
}

.summary-label {
  font-size: 11px;
  color: var(--apple-gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.summary-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.summary-value.blue { color: var(--apple-blue); }
.summary-value.green { color: var(--apple-green); }

/* ============================================
   Date Header (Pronostics)
   ============================================ */
.date-header {
  text-align: center;
  margin-bottom: 4px;
}

.date-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1C1C1E;
  text-transform: capitalize;
}

.date-header p {
  font-size: 13px;
  color: var(--apple-gray);
  margin-top: 2px;
}

/* ============================================
   Pronostic Card
   ============================================ */
.prono-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.prono-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.prono-league {
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-blue);
  background: rgba(0, 122, 255, 0.08);
  padding: 2px 10px;
  border-radius: 50px;
}

.prono-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prono-confidence {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
}

.prono-confidence.high { color: var(--apple-green); background: rgba(52, 199, 89, 0.1); }
.prono-confidence.medium { color: var(--apple-blue); background: rgba(0, 122, 255, 0.1); }
.prono-confidence.low { color: var(--apple-orange); background: rgba(255, 149, 0, 0.1); }

.prono-time {
  font-size: 11px;
  color: var(--apple-gray);
}

.prono-match {
  font-size: 15px;
  font-weight: 600;
  color: #1C1C1E;
}

.prono-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--apple-gray5);
}

.prono-tip {
  background: #1C1C1E;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 50px;
}

.prono-odds {
  font-size: 13px;
  color: var(--apple-gray);
}

.prono-odds strong {
  color: #1C1C1E;
  font-size: 15px;
  font-weight: 700;
}

/* ============================================
   Profile Card
   ============================================ */
.profile-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--apple-blue), #5856D6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.profile-avatar span {
  color: white;
  font-size: 28px;
  font-weight: 700;
}

.profile-avatar.placeholder {
  background: linear-gradient(135deg, var(--apple-gray5), var(--apple-gray4));
}

.profile-name {
  font-size: 17px;
  font-weight: 600;
  color: #1C1C1E;
  text-align: center;
}

.profile-phone {
  font-size: 13px;
  color: var(--apple-gray);
  text-align: center;
  margin-top: 2px;
}

.profile-subtitle {
  font-size: 13px;
  color: var(--apple-gray);
  text-align: center;
  margin-top: 2px;
}

/* ============================================
   Referral Card (Compte)
   ============================================ */
.referral-code-box {
  background: var(--apple-gray6);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.referral-code-label {
  font-size: 11px;
  color: var(--apple-gray);
  font-weight: 500;
}

.referral-code-value {
  font-size: 24px;
  font-weight: 700;
  color: #1C1C1E;
  letter-spacing: 4px;
  margin-top: 4px;
}

.referral-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.referral-count .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apple-green);
}

.referral-count span {
  font-size: 13px;
  color: var(--apple-gray);
}

.referral-count strong {
  color: #1C1C1E;
  font-weight: 600;
}

/* ============================================
   Auth Toggle
   ============================================ */
.auth-toggle {
  background: rgba(229, 229, 234, 0.8);
  border-radius: 10px;
  padding: 2px;
  display: flex;
}

.auth-toggle-btn {
  flex: 1;
  padding: 7px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: var(--apple-gray);
}

.auth-toggle-btn.active {
  background: white;
  color: #1C1C1E;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0.5px 1.5px rgba(0, 0, 0, 0.06);
}

/* ============================================
   Info Row (Membre depuis)
   ============================================ */
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.info-row-label {
  font-size: 15px;
  color: #1C1C1E;
}

.info-row-value {
  font-size: 15px;
  color: var(--apple-gray);
}

/* ============================================
   Section Label
   ============================================ */
.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 16px;
  margin-bottom: 6px;
}

/* ============================================
   Tab Bar
   ============================================ */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tabbar-inner {
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 8px 20px;
}

.tab-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  transition: transform 0.15s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.15s ease;
}

.tab-link:active {
  transform: scale(0.97);
  opacity: 0.7;
}

.tab-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--apple-gray);
}

.tab-link.active .tab-label {
  color: var(--apple-blue);
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Empty / Auth required states
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 0;
}

.empty-state p {
  font-size: 15px;
  color: var(--apple-gray);
}

.empty-state a {
  color: var(--apple-blue);
  font-size: 15px;
  font-weight: 500;
  display: inline-block;
  margin-top: 8px;
}

/* ============================================
   OTP Inputs
   ============================================ */
.otp-icon-wrap {
  display: flex;
  justify-content: center;
}

.otp-inputs-wrap {
  display: flex;
  justify-content: center;
}

.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.otp-digit {
  width: 46px;
  height: 54px;
  border: 2px solid var(--apple-gray4);
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: #1C1C1E;
  background: white;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  -webkit-appearance: none;
}

.otp-digit:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.otp-digit.filled {
  border-color: var(--apple-blue);
  background: rgba(0, 122, 255, 0.04);
}

.otp-digit.error {
  border-color: var(--apple-red);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
  animation: shake 0.4s ease;
}

.otp-digit.success {
  border-color: var(--apple-green);
  background: rgba(52, 199, 89, 0.06);
}

.otp-timer {
  font-size: 13px;
  color: var(--apple-gray);
}

.otp-timer strong {
  color: var(--apple-blue);
  font-weight: 700;
}

.otp-resend-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--apple-blue);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}

.otp-resend-link:active {
  opacity: 0.6;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ============================================
   Forgot password link
   ============================================ */
.forgot-link {
  text-align: center;
  color: var(--apple-blue);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.hidden { display: none !important; }
.flex-1 { flex: 1; }

/* ============================================
   Animations
   ============================================ */
@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes toastIn {
  from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes toastOut {
  from { transform: translateX(-50%) translateY(0); opacity: 1; }
  to { transform: translateX(-50%) translateY(-20px); opacity: 0; }
}

/* Card hover (desktop only) */
@media (hover: hover) {
  .card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .card-hover:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

/* Hide scrollbar */
::-webkit-scrollbar { display: none; }
body { -ms-overflow-style: none; scrollbar-width: none; }
