/* ============================================================
   PharmaDash — Auth Pages (Login, Signup, Password Reset)
   ============================================================ */

/* --- Auth Page Layout --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* Gradient background with mesh */
.auth-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #001d54 0%, #003087 40%, #005eb8 100%);
  z-index: 0;
}
.auth-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}
.auth-bg-orb-1 {
  width: 400px; height: 400px;
  background: rgba(0,169,206,0.15);
  top: -10%; right: -5%;
  animation: float-slow 8s ease-in-out infinite;
}
.auth-bg-orb-2 {
  width: 300px; height: 300px;
  background: rgba(0,150,57,0.1);
  bottom: -10%; left: -5%;
  animation: float-medium 10s ease-in-out infinite;
}

/* --- Split Layout (Desktop) --- */
.auth-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.auth-branding {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  color: #fff;
  position: relative;
}
.auth-branding-content {
  max-width: 420px;
}
.auth-branding .auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2.5rem;
  text-decoration: none;
  color: #fff;
}
.auth-branding .auth-logo .logo-icon {
  width: 42px; height: 42px;
  background: url('/images/logo-icon.svg') center/contain no-repeat;
  border: none;
  border-radius: 12px;
  display: block;
  font-size: 0;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
  flex-shrink: 0;
}
.auth-branding .auth-logo span {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.auth-branding h1 {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 1rem;
}
.auth-branding h1 .highlight {
  background: linear-gradient(135deg, #4ade80 0%, #00A9CE 50%, #60a5fa 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s linear infinite;
}
.auth-branding p {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.auth-features-list {
  list-style: none;
}
.auth-features-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}
.auth-features-list li .check-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(74,222,128,0.15);
  border: 1px solid rgba(74,222,128,0.3);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Form Side --- */
.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  position: relative;
}
.auth-card-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}
.auth-card-logo .logo-icon {
  width: 36px; height: 36px;
  background: url('/images/logo-icon.svg') center/contain no-repeat;
  border-radius: 10px;
  display: block;
  font-size: 0;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
  flex-shrink: 0;
}
.auth-card-logo span {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.auth-card .tagline {
  color: #666;
  font-size: 14px;
  margin-bottom: 2rem;
  font-weight: 500;
}
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-lighter);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}
.auth-back-link:hover { color: var(--primary-light); }

/* --- Form Styles --- */
.auth-form .form-group { margin-bottom: 1.25rem; }
.auth-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  letter-spacing: 0.3px;
}
.auth-form label .label-hint {
  font-weight: 400;
  color: #888;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d0d5db;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  background-color: #ffffff;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(0,94,184,0.1);
}
.auth-form input::placeholder { color: #999; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-row .form-group { margin-bottom: 0; }

.submit-button {
  width: 100%;
  padding: 13px;
  background-color: var(--primary-light);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
  font-family: 'Inter', sans-serif;
}
.submit-button:hover {
  background-color: #003f7f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,94,184,0.3);
}
.submit-button:active { transform: translateY(0); }
.submit-button:disabled {
  background-color: #b8d4e5;
  cursor: not-allowed;
  transform: none;
}

.error-message {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 14px;
}

.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 14px;
  color: #666;
}
.auth-link a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}
.auth-link a:hover { color: #003f7f; }

.forgot-password {
  text-align: right;
  margin-top: 0.5rem;
}
.forgot-password a {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.forgot-password a:hover { color: #003f7f; }

/* --- Password Requirements --- */
.password-requirements {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-top: 0.5rem;
  font-size: 12px;
  color: #666;
}
.password-req-item {
  display: flex;
  align-items: center;
  padding: 4px 0;
}
.password-req-check {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 3px;
  border: 1px solid #d0d5db;
  margin-right: 6px;
  text-align: center;
  line-height: 13px;
  font-size: 10px;
  color: var(--accent-green);
  font-weight: 700;
  background-color: #ffffff;
  transition: all 0.2s;
}
.password-req-check.active {
  background-color: #ecfdf5;
  border-color: var(--accent-green);
}

/* --- Terms Checkbox --- */
.terms-checkbox {
  display: flex;
  align-items: flex-start;
  margin: 1.5rem 0;
  font-size: 13px;
  color: #666;
}
.terms-checkbox input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-right: 0.75rem;
  margin-top: 1px;
  cursor: pointer;
  accent-color: var(--primary-light);
  flex-shrink: 0;
}
.terms-checkbox a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
}
.terms-checkbox a:hover { text-decoration: underline; }

/* --- ODS Search --- */
.ods-search-wrapper { position: relative; }
.ods-search-results {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: white;
  border: 1px solid #d0d5db;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: none;
}
.ods-search-results.visible { display: block; }
.ods-result-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s;
}
.ods-result-item:hover { background-color: #f0f7ff; }
.ods-result-item:last-child { border-bottom: none; }
.ods-result-code {
  font-weight: 700;
  color: var(--primary-light);
  font-size: 14px;
  font-family: monospace;
}
.ods-result-name {
  font-size: 13px;
  color: #333;
  margin-left: 6px;
}
.ods-result-postcode {
  font-size: 12px;
  color: #888;
  float: right;
}
.ods-selected-info {
  background-color: #ecfdf5;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 12px;
  margin-top: 0.5rem;
  font-size: 13px;
  color: #166534;
  display: none;
}
.ods-selected-info.visible { display: block; }
.ods-selected-info .ods-pharmacy-name {
  font-weight: 700;
  font-size: 14px;
}
.ods-selected-info .ods-address {
  color: #4b5563;
  margin-top: 4px;
}
.ods-clear-btn {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 12px;
  float: right;
  text-decoration: underline;
}
.ods-hint {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .auth-split { flex-direction: column; }
  .auth-branding { display: none; }
  .auth-form-side { padding: 1.5rem; }
  .auth-card { padding: 2rem; max-width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-row .form-group { margin-bottom: 1.25rem; }
  .auth-form input[type="text"],
  .auth-form input[type="email"],
  .auth-form input[type="password"],
  .submit-button {
    font-size: 16px;
  }
}
@media (max-width: 480px) {
  .auth-card { padding: 1.5rem; border-radius: 12px; }
  .auth-card-logo span { font-size: 20px; }
}
