/* Auth CSS - Styles for login, register, and authentication pages */

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
  /* Primary Colors - WCAG 2.2 AA/AAA Compliant */
  --color-primary: #0066cc;
  --color-primary-light: #1d4ed8;
  --color-primary-lighter: #2563eb;
  --color-primary-dark: #0369a1;
  --color-primary-darker: #0284c7;

  /* Sky Blue (used for buttons/accents) - WCAG 2.2 AA Compliant */
  --color-sky: #0369a1;
  --color-sky-light: #0891b2;
  --color-sky-bg: #e0f2fe;
  --color-sky-bg-light: #bae6fd;

  /* Success Colors - WCAG 2.2 Compliant */
  --color-success: #047857;
  --color-success-light: #059669;
  --color-success-lighter: #16a34a;
  --color-success-dark: #047857;
  --color-success-darker: #166534;
  --color-success-bg: #f0fdf4;
  --color-success-bg-light: #dcfce7;
  --color-success-bg-lighter: #bbf7d0;

  /* Warning Colors - WCAG 2.2 Compliant */
  --color-warning: #b45309;
  --color-warning-bg: #fef3c7;
  --color-warning-bg-light: #fde68a;

  /* Error Colors - WCAG 2.2 Compliant */
  --color-error: #dc2626;
  --color-error-bg: #fecaca;

  /* Text Colors - WCAG 2.2 AAA Compliant */
  --color-text-primary: #1e293b;
  --color-text-secondary: #334155;
  --color-text-tertiary: #334155;
  --color-text-muted: #374151;

  /* Background Colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;

  /* Border Colors */
  --color-border-light: #cbd5e1;
  --color-border-medium: #cbd5e1;

  /* White/Black */
  --color-white: #fff;
  --color-black: #000;

  /* RGBA Values */
  --overlay-black-08: rgba(0, 0, 0, 0.08);
  --overlay-black-10: rgba(0, 0, 0, 0.1);
}

/* ========================================
   Container & Layout
   ======================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}

.col-md-6,
.col-md-8,
.col-lg-5 {
  width: 100%;
  padding: 0 0.75rem;
}

@media (min-width: 768px) {
  .col-md-6 {
    width: 50%;
  }
  .col-md-8 {
    width: 66.666667%;
  }
}

@media (min-width: 992px) {
  .col-lg-5 {
    width: 41.666667%;
  }
}

.justify-content-center {
  justify-content: center;
}

/* ========================================
   Cards
   ======================================== */
.card {
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 1px 3px var(--overlay-black-08);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--overlay-black-10);
}

.card:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px var(--overlay-black-08);
}

.card:focus-visible {
  outline: var(--focus-width, 3px) solid var(--focus-color, #2563eb);
  outline-offset: var(--focus-offset, 2px);
  overflow: visible;
}

.card-body {
  padding: 1.5rem;
}

.card-header {
  padding: 1.5rem;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border-light);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.shadow {
  box-shadow: 0 1px 3px var(--overlay-black-10);
}

/* ========================================
   Forms
   ======================================== */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 1rem /* WCAG 3.0 min */;
  font-weight: 600;
  color: var(--color-text-tertiary);
  margin-bottom: 0.375rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  background: var(--color-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* WCAG 2.4.7 - Enhanced focus indicator contrast */
.form-control:focus {
  border-color: var(--focus-color, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
  outline: none;
}

.form-control:focus-visible {
  outline: var(--focus-width, 3px) solid var(--focus-color, #2563eb);
  outline-offset: 0;
  border-color: var(--focus-color, #2563eb);
}

select.form-control,
.form-select {
  /**
   * Remove default browser styling for selects
   * Note: -webkit-appearance is kept for Safari 15.3 and earlier.
   * Standard `appearance` has full support in Safari 15.4+, Chrome 84+,
   * Firefox 80+, Edge 84+.
   * @see https://caniuse.com/css-appearance
   */
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23545454' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem /* WCAG 3.0 min */;
  color: var(--color-text-muted);
}

.text-muted {
  color: var(--color-text-muted) !important;
}

/* Form validation states */
.form-control:invalid:not(:placeholder-shown) {
  border-color: var(--color-error);
  background-color: #fef2f2;
}

.form-control.is-invalid {
  border-color: var(--color-error);
  background-color: #fef2f2;
}

.form-control:valid:not(:placeholder-shown) {
  border-color: var(--color-success-light);
  background-color: var(--color-success-bg);
}

/* WCAG 2.4.7 - Enhanced focus indicator contrast for validation states */
.form-control:invalid:focus,
.form-control:invalid:focus-visible {
  outline: var(--focus-width, 3px) solid var(--focus-color-error, #dc2626);
  outline-offset: 0;
  border-color: var(--focus-color-error, #dc2626);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

.form-control:valid:focus,
.form-control:valid:focus-visible {
  outline: var(--focus-width, 3px) solid var(--focus-color-success, #059669);
  outline-offset: 0;
  border-color: var(--focus-color-success, #059669);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 1rem /* WCAG 3.0 min */;
  color: var(--color-error);
}

.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

/* Form check inputs - WCAG 2.2 AAA tap target (44x44px minimum) */
.form-check-input {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

.form-check {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.form-check-label {
  padding-left: 0.5rem;
  cursor: pointer;
}

/* ========================================
   Alerts
   ======================================== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.alert-success {
  background: var(--color-success-bg-light);
  color: var(--color-success-darker);
  border: 1px solid var(--color-success-bg-lighter);
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid var(--color-error-bg);
}

.alert-warning {
  background: var(--color-warning-bg);
  color: #92400e;
  border: 1px solid var(--color-warning-bg-light);
}

.alert-info {
  background: var(--color-sky-bg);
  color: #064663;
  border: 1px solid var(--color-sky-bg-light);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  -webkit-user-select: none; /* Safari fallback */
  user-select: none;
  border: 1px solid transparent;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 12px;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
}

.btn:focus,
.btn:focus-visible {
  outline: var(--focus-width, 3px) solid var(--focus-color, #2563eb);
  outline-offset: var(--focus-offset, 2px);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.btn-primary {
  color: var(--color-white);
  background: var(--color-sky);
  border-color: var(--color-sky);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: 0 4px 12px rgba(3, 105, 161, 0.4);
}

.btn-primary:active {
  background: var(--color-primary-darker);
  border-color: var(--color-primary-darker);
  box-shadow: 0 2px 6px rgba(3, 105, 161, 0.3);
  transform: scale(0.98);
}

.btn-secondary {
  color: var(--color-white);
  background: #4a4a4a;
  border-color: #4a4a4a;
}

.btn-secondary:hover {
  background: #333333;
  border-color: #333333;
}

.btn-secondary:active {
  background: #1a1a1a;
  transform: scale(0.98);
}

.w-100 {
  width: 100% !important;
}

/* ========================================
   Bootstrap Nav Tabs
   ======================================== */
.nav {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.nav-tabs {
  border-bottom: 1px solid var(--color-border-light);
}

.nav-item {
  margin-bottom: -1px;
}

.nav-link {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-tabs .nav-link {
  margin-bottom: -1px;
  background: none;
  border: 1px solid transparent;
}

.nav-tabs .nav-link:hover {
  border-color: var(--color-border-light) var(--color-border-light) var(--color-border-light);
  isolation: isolate;
}

.nav-tabs .nav-link.active {
  color: var(--color-sky);
  background: var(--color-white);
  border-color: var(--color-border-light) var(--color-border-light) var(--color-white);
}

.nav-link:focus,
.nav-link:focus-visible {
  outline: var(--focus-width, 3px) solid var(--focus-color, #2563eb);
  outline-offset: var(--focus-offset, 2px);
  background-color: rgba(37, 99, 235, 0.08);
}

/* ========================================
   Tab Content
   ======================================== */
.tab-content {
  margin-top: 1rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.tab-pane.fade {
  transition: opacity 0.15s linear;
}

.tab-pane.fade:not(.show) {
  opacity: 0;
}

.tab-pane.fade.show {
  opacity: 1;
}

/* ========================================
   Auth-Specific Styles
   ======================================== */

/* Forgot Password Link (Login page) */
.forgot-password-link {
  text-align: right;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.forgot-password-link a {
  font-size: 1rem /* WCAG 3.0 min */;
  color: #0056b3;
  display: inline-block;
  padding: 0.5rem 0.25rem;
  min-height: 44px;
  line-height: 1.5;
}

/* Auth Section (Forgot/Reset Password pages) */
.auth-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  background: var(--color-bg-secondary);
}

.auth-card {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.auth-card--wide {
  max-width: 48rem;
}

.auth-card--centered {
  text-align: center;
}

.auth-card h1 {
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.auth-subtitle {
  color: #374151;  /* WCAG AAA: 7.0:1 on white */
  margin-bottom: 1.5rem;
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-links a {
  color: #0056b3;
}

.auth-links--stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-links--stack .btn {
  width: 100%;
}

.auth-submit {
  width: 100%;
  justify-content: center;
}

.auth-status-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.auth-status-icon svg {
  width: 64px;
  height: 64px;
}

/* 2FA Verification Styles */
.verify-2fa-section {
  padding: 3rem 1rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
}

.verify-2fa-card {
  max-width: 450px;
  width: 100%;
  margin: 0 auto;
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.verify-2fa-card h1 {
  margin-bottom: 0.5rem;
  color: #1e293b;
  text-align: center;
}

.verify-2fa-card > p {
  color: #374151;  /* WCAG AAA: 7.0:1 on white */
  margin-bottom: 2rem;
  text-align: center;
}

.code-input {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 0.75rem;
  padding: 1rem;
}

.help-text {
  margin-top: 0.5rem;
  font-size: 1rem /* WCAG 3.0 min */;
  color: #374151;  /* WCAG AAA: 7.0:1 on white */
}

.divider {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #e2e8f0;
}

.divider span {
  background: white;
  padding: 0 1rem;
  position: relative;
  color: #374151;  /* WCAG AAA: 7.0:1 on white */
  font-size: 1rem /* WCAG 3.0 min */;
}

.backup-code-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
}

.backup-code-section summary {
  cursor: pointer;
  color: #0056b3;
  font-weight: 500;
  list-style: none;
}

.backup-code-section summary::marker {
  display: none; /* Standard - Firefox, Chrome 83+ */
}

.backup-code-section summary::-webkit-details-marker {
  display: none; /* Safari fallback */
}

.backup-code-section[open] summary {
  margin-bottom: 1rem;
}

.backup-code-section form {
  margin-top: 1rem;
}

.footer-links {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.footer-links a {
  color: #374151;  /* WCAG AAA: 7.0:1 on white */
  text-decoration: none;
  font-size: 1rem /* WCAG 3.0 min */;
}

.footer-links a:hover {
  color: #1e293b;
  text-decoration: underline;
}

/* ========================================
   Spinner (for loading states)
   ======================================== */
.spinner-border {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  vertical-align: text-bottom;
  border: 0.15em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
  width: 0.875rem;
  height: 0.875rem;
  border-width: 0.125em;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   Utility Classes
   ======================================== */
.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%); /* Deprecated but kept for older browser support */
  clip-path: inset(50%); /* Modern standard property */
  white-space: nowrap;
  border-width: 0;
}

.text-center {
  text-align: center !important;
}

.text-danger {
  color: var(--color-error) !important;
}

.text-success {
  color: var(--color-success) !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mt-1 {
  margin-top: 0.25rem !important;
}

.me-1 {
  margin-right: 0.25rem !important;
}

.me-2 {
  margin-right: 0.5rem !important;
}

.ms-1 {
  margin-left: 0.25rem !important;
}

.py-4 {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

.py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.p-4 {
  padding: 1.5rem !important;
}

.h4 {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
}

/* ========================================
   Auth Route Utility Compatibility
   ======================================== */
.w-full {
  width: 100% !important;
}

.mr-2 {
  margin-right: 0.5rem !important;
}

.mt-2 {
  margin-top: 0.5rem !important;
}

.mt-6 {
  margin-top: 1.5rem !important;
}

.mt-8 {
  margin-top: 2rem !important;
}

.pt-6 {
  padding-top: 1.5rem !important;
}

.border-t {
  border-top: 1px solid var(--color-border-light) !important;
}

.border-gray-200 {
  border-color: var(--color-border-light) !important;
}

.border-red-500 {
  border-color: var(--color-error) !important;
}

.text-red-600 {
  color: var(--color-error) !important;
}

.text-red-700,
.text-red-800 {
  color: #991b1b !important;
}

.text-green-600,
.text-green-800 {
  color: var(--color-success-dark) !important;
}

.text-blue-800 {
  color: #1e40af !important;
}

.bg-red-50 {
  background: #fef2f2 !important;
}

.bg-green-50 {
  background: #f0fdf4 !important;
}

.bg-blue-50 {
  background: #eff6ff !important;
}

.border-red-200 {
  border-color: #fecaca !important;
}

.border-green-200 {
  border-color: #bbf7d0 !important;
}

.border-blue-200 {
  border-color: #bfdbfe !important;
}

.animate-spin {
  animation: spinner-border 0.75s linear infinite;
}

.h-5,
.w-5 {
  width: 1.25rem !important;
  height: 1.25rem !important;
}

/* ========================================
   Auth Route Compatibility Layer
   ======================================== */
.absolute {
  position: absolute !important;
}

.relative {
  position: relative !important;
}

.block {
  display: block !important;
}

.inline-block {
  display: inline-block !important;
}

.flex-1 {
  flex: 1 1 0% !important;
}

.flex-shrink-0 {
  flex-shrink: 0 !important;
}

.items-start {
  align-items: flex-start !important;
}

.justify-center {
  justify-content: center !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

.gap-3 {
  gap: 0.75rem !important;
}

.gap-6 {
  gap: 1.5rem !important;
}

.grid-cols-1 {
  grid-template-columns: 1fr !important;
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.min-h-screen {
  min-height: 100vh !important;
}

.min-h-\[44px\] {
  min-height: 44px !important;
}

.max-w-md {
  max-width: 28rem !important;
}

.max-w-2xl {
  max-width: 42rem !important;
}

.bg-gray-50 {
  background: var(--color-bg-secondary) !important;
}

.bg-sky-700 {
  background: var(--color-sky) !important;
}

.text-white {
  color: var(--color-white) !important;
}

.text-gray-600 {
  color: var(--color-text-muted) !important;
}

.text-gray-700 {
  color: var(--color-text-secondary) !important;
}

.text-gray-900 {
  color: var(--color-text-primary) !important;
}

.text-sky-600 {
  color: var(--color-sky-light) !important;
}

.text-sky-700 {
  color: var(--color-sky) !important;
}

.font-bold {
  font-weight: 700 !important;
}

.font-medium {
  font-weight: 500 !important;
}

.font-semibold {
  font-weight: 600 !important;
}

.text-lg {
  font-size: 1.125rem !important;
  line-height: 1.75rem !important;
}

.text-2xl {
  font-size: 1.5rem !important;
  line-height: 2rem !important;
}

.leading-6 {
  line-height: 1.5rem !important;
}

.border {
  border: 1px solid var(--color-border-light) !important;
}

.border-0 {
  border: 0 !important;
}

.border-2 {
  border: 2px solid currentColor !important;
}

.border-b {
  border-bottom: 1px solid var(--color-border-light) !important;
}

.border-b-2 {
  border-bottom: 2px solid transparent !important;
}

.border-white {
  border-color: var(--color-white) !important;
}

.border-gray-300 {
  border-color: var(--color-border-light) !important;
}

.border-t-transparent {
  border-top-color: transparent !important;
}

.rounded {
  border-radius: 0.375rem !important;
}

.rounded-full {
  border-radius: 9999px !important;
}

.cursor-pointer {
  cursor: pointer !important;
}

.select-none {
  user-select: none !important;
}

.m-0 {
  margin: 0 !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mb-6 {
  margin-bottom: 1.5rem !important;
}

.mb-8 {
  margin-bottom: 2rem !important;
}

.ml-2 {
  margin-left: 0.5rem !important;
}

.mr-1 {
  margin-right: 0.25rem !important;
}

.mt-0\.5 {
  margin-top: 0.125rem !important;
}

.-mb-px {
  margin-bottom: -1px !important;
}

.p-0 {
  padding: 0 !important;
}

.p-1 {
  padding: 0.25rem !important;
}

.p-8 {
  padding: 2rem !important;
}

.px-1 {
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

.px-4 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.py-3 {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

.py-12 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.pr-12 {
  padding-right: 3rem !important;
}

.space-y-1 > * + * {
  margin-top: 0.25rem !important;
}

.space-y-6 > * + * {
  margin-top: 1.5rem !important;
}

.list-disc {
  list-style-type: disc !important;
}

.list-inside {
  list-style-position: inside !important;
}

.inset-0 {
  inset: 0 !important;
}

.right-3 {
  right: 0.75rem !important;
}

.top-1\/2 {
  top: 50% !important;
}

.-translate-y-1\/2 {
  transform: translateY(-50%) !important;
}

.opacity-25 {
  opacity: 0.25 !important;
}

.opacity-75 {
  opacity: 0.75 !important;
}

.underline {
  text-decoration: underline !important;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke !important;
  transition-duration: 0.2s !important;
  transition-timing-function: ease !important;
}

.tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.w-4 {
  width: 1rem !important;
}

.h-4 {
  height: 1rem !important;
}

.focus\:outline-none:focus {
  outline: none !important;
}

.focus\:border-transparent:focus {
  border-color: transparent !important;
}

.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px rgba(3, 105, 161, 0.2) !important;
}

.focus\:ring-offset-2:focus {
  outline-offset: 2px !important;
}

.focus\:ring-sky-500:focus {
  outline: 2px solid var(--color-sky) !important;
}

.hover\:bg-gray-50:hover {
  background: var(--color-bg-secondary) !important;
}

.hover\:bg-sky-800:hover {
  background: var(--color-primary-dark) !important;
}

.hover\:border-gray-300:hover {
  border-color: var(--color-border-light) !important;
}

.hover\:text-gray-700:hover {
  color: var(--color-text-secondary) !important;
}

.hover\:text-sky-800:hover {
  color: var(--color-primary-dark) !important;
}

.tab-nav {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.login-tab,
.register-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex: 1 1 0%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-panels {
  margin-top: 1.5rem;
}

.tab-panel[hidden] {
  display: none !important;
}

.password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
}

/* ========================================
   Responsive Utilities
   ======================================== */
@media (max-width: 640px) {
  .verify-2fa-card {
    padding: 1.5rem;
  }

  .code-input {
    font-size: 1.25rem;
    letter-spacing: 0.5rem;
  }

  .auth-card,
  .verify-2fa-card {
    padding: 1.5rem;
  }
}

@media (max-width: 767px) {
  .card-body {
    padding: 1.25rem;
  }

  .container {
    padding: 0 0.75rem;
  }
}

/* ========================================
   Accessibility: Reduced Motion Support
   ======================================== */
/* Respect user's reduced motion preference - WCAG 2.1 Success Criterion 2.3.3 */
@media (prefers-reduced-motion: reduce) {
    /* Global animation and transition override */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Disable all keyframe animations */
    .spinner-border {
        animation: none !important;
        border-left-color: transparent !important;
    }

    /* Remove transform-based hover effects */
    .card:hover,
    .card:active,
    .auth-card:hover,
    .auth-card:active,
    button:active,
    .btn:active {
        transform: none !important;
    }

    /* Disable smooth scrolling */
    html {
        scroll-behavior: auto !important;
    }
}
