/* =============================================
   AUTH SPA STYLESHEET — auth.css
   Adept Telecommunication
============================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }
[x-cloak] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #f1f5f9;
}

.container {
  width: 100%;
  max-width: 440px;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

/* ===== VIEW PANELS — absolute positioning for smooth crossfade ===== */
.card > div {
  transition: opacity 0.3s ease;
}

/* ===== LOGO ===== */
.logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo img {
  display: block;
  margin: 0 auto;
}

.logo-icon {
  width: 70px;
  height: 70px;
  background: #000435;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.logo-icon iconify-icon { font-size: 36px; color: white; }

h1 {
  font-size: 1.75rem;
  color: #1a202c;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.subtitle {
  text-align: center;
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ===== FORM ===== */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
}

.input-wrapper { position: relative; }

input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.3s;
  outline: none;
  background: #f8fafc;
}

input:focus {
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #718096;
  font-size: 20px;
  pointer-events: none;
  z-index: 1;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #718096;
  cursor: pointer;
  padding: 4px;
  z-index: 1;
}

.password-toggle:hover { color: #667eea; }

/* ===== BUTTONS ===== */
.btn {
  width: 100%;
  padding: 14px;
  background: #000435;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover { transform: translateY(-1px); opacity: 0.95; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: white;
  color: #2d3748;
  border: 2px solid #e2e8f0;
}

.btn-secondary:hover { background: #f8fafc; border-color: #667eea; }

.biometric-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 12px;
  font-weight: 600;
  color: #2d3748;
}

.biometric-btn:hover { border-color: #667eea; background: white; }

/* ===== ALERTS ===== */
.alert {
  padding: 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-error   { background: #fee;    color: #c53030; border: 1px solid #feb2b2; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }

/* ===== LINKS ===== */
.text-link {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
}

.text-link:hover { opacity: 0.8; }

.footer-text {
  text-align: center;
  margin-top: 20px;
  color: #718096;
  font-size: 0.9rem;
}

/* ===== OTP ===== */
.otp-container {
  position: relative;
  width: 100%;
  margin: 0 auto 16px;
}

.otp-hidden { 
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
} 

.otp-ui {
  display: flex;
  gap: 8px;
  justify-content: center;
  cursor: text;
}

.otp-cell {
  width: 42px;
  height: 48px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}

.otp-cell--active {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.otp-cell--filled {
  border-color: #2d3748;
  background: #f8fafc;
}

.otp-ui--focused .otp-cell--active {
  border-color: #667eea;
}

/* ===== PASSWORD STRENGTH ===== */
.strength-meter {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.strength-bar { height: 100%; transition: all 0.3s; }
.strength-weak   { width: 33%;  background: #ef4444; }
.strength-medium { width: 66%;  background: #f59e0b; }
.strength-strong { width: 100%; background: #10b981; }

/* ===== LOADING SPINNER ===== */
.loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

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

/* ===== FAB ===== */
.fab-wrapper {
  position: fixed;
  bottom: 3.5rem;
  right: 2rem;
  z-index: 999999;
}

.fab-checkbox { display: none; }

.fab {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: #0c0f39;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}

.fab-wheel {
  position: absolute;
  bottom: 5.5rem;
  right: 0.5rem;
  width: 3.5rem;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.8rem;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .25s ease;
  z-index: 999998;
}

.fab-checkbox:checked ~ .fab-wheel { transform: scaleY(1); }

.fab-action {
  position: relative;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  text-decoration: none;
}

.fab-checkbox:checked ~ .fab-wheel .fab-action { 
  opacity: 1; 
  transform: translateY(0); 
}

.fab-action iconify-icon,
.fab iconify-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-action-1 { background: #2d2d2d; }
.fab-action-2 { background: #546e7a; }
.fab-action-3 { background: #1877F2; }
.fab-action-4 { background: #25D366; }
.fab-action-5 { background: #229ED9; }