:root {
  --bg-color: #0b0f19;
  --card-bg: rgba(20, 27, 45, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --input-bg: rgba(15, 23, 42, 0.6);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-focus: #3b82f6;
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-main);
}

.auth-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
}

.auth-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.08);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.4s ease-out;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), rgba(139, 92, 246, 0.8), transparent);
}

.brand-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.5);
  margin-bottom: 16px;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.brand-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.brand-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Alert Notification */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease-out;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.alert-info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field {
  width: 100%;
  padding: 14px 18px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: var(--transition);
  outline: none;
}

.input-field:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px var(--primary-glow);
  background: rgba(15, 23, 42, 0.85);
}

.input-field::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

/* Primary Button */
.btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 8px 20px -4px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 25px -4px var(--primary-glow);
  transform: translateY(-1px);
}

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

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Secondary Button */
.btn-secondary {
  width: 100%;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  margin-top: 12px;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
  display: inline-block;
  transition: var(--transition);
  text-decoration: none;
}

.btn-link:hover {
  color: var(--text-main);
}

/* Code OTP Input */
.code-inputs-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.otp-box {
  width: 48px;
  height: 56px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: var(--transition);
}

.otp-box:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px var(--primary-glow);
  background: rgba(15, 23, 42, 0.9);
}

/* Call-In Section */
.call-in-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin: 20px 0;
}

.phone-display {
  font-size: 22px;
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: 0.5px;
  margin: 12px 0;
  user-select: all;
}

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-sm);
  color: #93c5fd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
  transition: var(--transition);
}

.call-btn:hover {
  background: rgba(59, 130, 246, 0.25);
}

/* Pulse Beacon */
.beacon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
}

.beacon {
  width: 10px;
  height: 10px;
  background-color: var(--warning);
  border-radius: 50%;
  position: relative;
}

.beacon::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid var(--warning);
  animation: pulse 1.5s infinite;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Footer Info */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-dim);
}

.auth-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--text-main);
}

/* Method Badge */
.method-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  70% { transform: scale(2); opacity: 0; }
  100% { transform: scale(2); opacity: 0; }
}

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

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 30px 20px;
  }
  .otp-box {
    width: 42px;
    height: 50px;
    font-size: 20px;
  }
}
