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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
}

.auth-container {
  display: flex;
  min-height: 100vh;
}

.auth-left {
  flex: 0 0 420px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 50%, #1e3a5f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(96,165,250,0.1) 0%, transparent 50%);
}

.auth-brand {
  position: relative;
  z-index: 1;
  color: #fff;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 48px;
}

.auth-logo h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.auth-logo h1 span {
  color: #60a5fa;
}

.brand-since {
  font-size: 13px;
  color: #94b8db;
  margin: 2px 0 0;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: #d1e3f6;
}

.auth-stars {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #94b8db;
}

.auth-stars .stars {
  color: #fbbf24;
  font-size: 16px;
}

.verify-info {
  text-align: center;
  margin-top: 20px;
}

.verify-icon {
  margin-bottom: 20px;
}

.verify-info h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #fff;
}

.verify-info p {
  font-size: 15px;
  color: #b8d4f0;
  line-height: 1.6;
}

.verify-tips {
  margin-top: 24px;
  text-align: left;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px 20px;
}

.verify-tips p { font-size: 14px; margin-bottom: 8px; color: #d1e3f6; }

.verify-tips ul {
  list-style: none;
  padding: 0;
}

.verify-tips li {
  font-size: 13px;
  color: #94b8db;
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.verify-tips li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #60a5fa;
}

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.auth-card h2 {
  font-size: 26px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.auth-subtitle {
  color: #64748b;
  font-size: 15px;
  margin-bottom: 28px;
}

.auth-subtitle strong {
  color: #1e3a5f;
}

.verify-header {
  text-align: center;
  margin-bottom: 8px;
}

.verify-header svg {
  margin-bottom: 12px;
}

.verify-header + .auth-subtitle {
  text-align: center;
}

.verify-card {
  max-width: 480px;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: flex;
  gap: 14px;
}

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

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.required { color: #ef4444; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}

input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.password-strength {
  margin-top: 8px;
  min-height: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-strength span {
  font-size: 12px;
  font-weight: 500;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.strength-bar div {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s, background 0.3s;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 22px;
  cursor: pointer;
}

.checkbox-label input {
  margin-top: 2px;
  accent-color: #1e3a5f;
}

.checkbox-label a {
  color: #3b82f6;
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.auth-btn:hover {
  opacity: 0.92;
}

.auth-btn:active {
  transform: scale(0.99);
}

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

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

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

.auth-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid #fecaca;
}

.auth-success {
  background: #f0fdf4;
  color: #16a34a;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid #bbf7d0;
}

.auth-link {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: #64748b;
}

.auth-link a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

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

.code-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 24px 0;
}

.code-digit {
  width: 52px !important;
  height: 60px;
  text-align: center;
  font-size: 26px !important;
  font-weight: 700;
  color: #1e3a5f !important;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 !important;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  font-family: 'Courier New', monospace;
}

.code-digit:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  transform: scale(1.05);
}

.code-digit.shake {
  animation: shake 0.4s ease;
}

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

.timer-bar {
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 4px;
  transition: width 1s linear;
}

.timer-text {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

.resend-section {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.resend-section p {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
}

.resend-btn {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s;
  font-family: inherit;
}

.resend-btn:hover {
  background: #eff6ff;
}

.resend-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.resend-btn.pulse {
  animation: pulse 1.5s ease infinite;
}

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

.resend-cooldown {
  font-size: 13px;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .auth-container {
    flex-direction: column;
  }
  .auth-left {
    flex: none;
    padding: 30px 24px;
  }
  .auth-features {
    display: none;
  }
  .auth-logo {
    margin-bottom: 0;
    justify-content: center;
  }
  .auth-stars {
    display: none;
  }
  .verify-info {
    display: none;
  }
  .auth-right {
    padding: 24px 16px;
  }
  .auth-card {
    padding: 28px 24px;
    border-radius: 16px;
  }
  .code-digit {
    width: 44px !important;
    height: 52px;
    font-size: 22px !important;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 400px) {
  .code-inputs {
    gap: 6px;
  }
  .code-digit {
    width: 38px !important;
    height: 46px;
    font-size: 20px !important;
    border-radius: 8px;
  }
}
