/* =====================================================
   AUTH PAGE STYLES - FamilyMed
   ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #25CED1;
  --primary-dark: #1aacaf;
  --primary-light: rgba(37, 206, 209, 0.12);
  --accent: #FF8A5B;
  --accent-dark: #e0723e;
  --bg: #F4F4F4;
  --card: #FFFFFF;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --error: #ef4444;
  --success: #10b981;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  overflow-x: hidden;
}

/* ---- Background ---- */
.auth-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d1b2a 0%, #16213e 40%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.floating-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(37, 206, 209, 0.08);
  animation: floatShape 8s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: -80px;
  left: -80px;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  top: 60%;
  right: -60px;
  animation-delay: 2s;
  background: rgba(255, 138, 91, 0.08);
}

.shape-3 {
  width: 150px;
  height: 150px;
  bottom: -40px;
  left: 30%;
  animation-delay: 4s;
}

.shape-4 {
  width: 100px;
  height: 100px;
  top: 30%;
  left: 15%;
  animation-delay: 1s;
  background: rgba(255, 138, 91, 0.06);
}

@keyframes floatShape {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

/* ---- Auth Container ---- */
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 1000px;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
}

/* ---- Left Panel ---- */
.auth-left {
  padding: 52px 44px;
  background: linear-gradient(160deg, rgba(37, 206, 209, 0.15) 0%, rgba(255, 138, 91, 0.08) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

.auth-headline {
  font-size: 30px;
  font-weight: 800;
  color: white;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.auth-headline br {
  display: block;
}

.auth-subtext {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin-bottom: 36px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  font-weight: 500;
}

.feature-icon-wrap {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: rgba(37, 206, 209, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon-wrap svg {
  width: 16px;
  height: 16px;
  color: #25CED1;
}

/* ---- Right Panel ---- */
.auth-right {
  background: var(--card);
  padding: 48px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

/* ---- Tabs ---- */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s;
  font-family: var(--font);
}

.tab-btn.active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* ---- Forms ---- */
.auth-form h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.form-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

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

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: white;
  transition: all 0.2s;
  outline: none;
}

.input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.input-wrapper input::placeholder {
  color: #b0b7c3;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9ca3af;
  pointer-events: none;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: #9ca3af;
  display: flex;
  align-items: center;
}

.toggle-pass svg {
  width: 16px;
  height: 16px;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.forgot-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  color: var(--primary-dark);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  background: white;
}

.checkbox-label input:checked+.checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input:checked+.checkmark::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.terms-label {
  margin-bottom: 20px;
}

.terms-label a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 13px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s;
  font-family: var(--font);
  box-shadow: 0 4px 14px rgba(37, 206, 209, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 206, 209, 0.45);
}

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

.btn-primary svg {
  width: 18px;
  height: 18px;
}

.btn-primary.loading {
  opacity: 0.7;
  pointer-events: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-demo {
  width: 100%;
  padding: 11px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: var(--font);
}

.btn-demo:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-demo svg {
  width: 16px;
  height: 16px;
}

/* Password strength */
.password-strength {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 4px;
  transition: all 0.4s;
  width: 0%;
}

#strengthText {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* Messages */
.form-error {
  color: var(--error);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  padding: 10px;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 8px;
}

.form-success {
  color: var(--success);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  padding: 10px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 8px;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.modal-box {
  background: white;
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-box p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .auth-left {
    display: none;
  }

  .auth-right {
    padding: 36px 28px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .auth-right {
    padding: 28px 20px;
  }
}