/* ================================================================
   FMHSYNC AUTHENTICATION PAGES (Login & Register)
   ================================================================
   
   This file contains all authentication-related styles.
   Used for: Login Page, Register Page
   
   TABLE OF CONTENTS:
   1. Variables & Imports
   2. Auth Page Container
   3. Background Decorations
   4. Auth Container & Layout
   5. Branding Section (Left Side)
   6. Form Section (Right Side)
   7. Form Elements
   8. Social Buttons
   9. Register Page Specific
   10. Responsive Design
   ================================================================ */

/* ================================================================
   1. VARIABLES & IMPORTS
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  /* Primary Palette */
  --teal: #009688;
  --teal-dark: #00796b;
  --teal-darker: #004d40;
  --teal-light: #b2dfdb;
  --teal-bg: #e0f2f1;
  
  /* Neutrals */
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-800: #424242;
  --dark: #1a1a2e;
  
  /* Gradients */
  --gradient-teal: linear-gradient(135deg, #009688 0%, #00796b 50%, #004d40 100%);
  
  /* Shadows */
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  
  /* Transitions */
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================================
   2. AUTH PAGE CONTAINER
   ================================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

/* ================================================================
   3. BACKGROUND DECORATIONS
   ================================================================ */
.auth-bg-shapes {
  display: none;
}

/* ================================================================
   4. AUTH CONTAINER & LAYOUT
   ================================================================ */
.auth-container {
  display: flex;
  width: 100%;
  height: 100vh;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* ================================================================
   5. BRANDING SECTION (LEFT SIDE)
   ================================================================ */
.auth-branding {
  flex: 0 0 42%;
  background: var(--gradient-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* Scattered static paw prints */
.auth-paw-scatter {
  position: absolute;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.auth-branding::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.auth-branding-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 380px;
  width: 100%;
}

/* Auth Logo */
.auth-logo {
  display: flex;
  align-items: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 1.5rem;
  gap: 0.6rem;
  letter-spacing: -0.5px;
}

.auth-logo-img {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

/* Home Button */
.auth-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.auth-home-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(-5px);
  border-color: rgba(255, 255, 255, 0.4);
}

.auth-home-btn:active {
  transform: translateX(-5px) scale(0.95);
  opacity: 0.9;
}

/* Branding Text */
.auth-branding h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--white);
  letter-spacing: -1px;
  line-height: 1.2;
}

.auth-branding p {
  font-size: 0.92rem;
  line-height: 1.7;
  opacity: 0.85;
  margin-bottom: 2rem;
  color: rgba(255,255,255,0.9);
}

/* Auth Features List */
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: var(--transition);
}

.auth-feature:hover {
  background: rgba(255,255,255,0.18);
  transform: translateX(6px);
}

.auth-feature i {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.9);
}

.auth-feature span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--white);
}

/* Auth Illustration — removed */
.auth-illustration {
  display: none;
}

.auth-paw-prints {
  display: none;
}

/* ================================================================
   6. FORM SECTION (RIGHT SIDE)
   ================================================================ */
.auth-form-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 2.5rem;
  background: var(--white);
  overflow-y: auto;
  height: 100vh;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 400px;
  margin: auto 0;
  padding: 1rem 0;
}

.auth-form-header {
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 1.2rem;
}

.auth-form-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.4rem;
  letter-spacing: -0.5px;
}

.auth-form-header p {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* ================================================================
   7. FORM ELEMENTS
   ================================================================ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-800);
}

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

.auth-input-wrapper > i:first-child {
  position: absolute;
  left: 0.9rem;
  font-size: 1.1rem;
  color: var(--gray-500);
  transition: var(--transition);
}

.auth-input-wrapper input {
  width: 100%;
  padding: 0.75rem 0.9rem 0.75rem 2.5rem;
  font-size: 0.88rem;
  font-family: 'Poppins', sans-serif;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: transparent;
  color: var(--dark);
  transition: all 0.2s ease;
  outline: none;
}

.auth-input-wrapper input:focus {
  border-color: var(--teal);
  background: transparent;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.auth-input-wrapper input:focus + i,
.auth-input-wrapper input:focus ~ i:first-of-type {
  color: var(--teal);
}

.auth-input-wrapper textarea {
  width: 100%;
  padding: 0.75rem 0.9rem 0.75rem 2.5rem;
  font-size: 0.88rem;
  font-family: 'Poppins', sans-serif;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: var(--gray-50);
  color: var(--dark);
  transition: var(--transition);
  outline: none;
  resize: vertical;
  min-height: 80px;
}

.auth-input-wrapper textarea:focus {
  border-color: var(--teal);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.1);
}

.auth-input-wrapper textarea:focus + i,
.auth-input-wrapper textarea:focus ~ i:first-of-type {
  color: var(--teal);
}

.auth-input-wrapper.error textarea {
  border-color: #e63946;
  background: #fff5f5;
}

.form-help {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
  font-weight: 400;
}

.auth-input-wrapper.error input {
  border-color: #e63946;
  background: #fff5f5;
}

.auth-input-wrapper.error > i:first-child {
  color: #e63946;
}

.auth-error {
  font-size: 0.72rem;
  color: #e63946;
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  color: var(--gray-500);
  font-size: 1.1rem;
  transition: var(--transition);
}

.password-toggle:hover {
  color: var(--teal);
}

.password-toggle:active {
  transform: scale(0.92);
  opacity: 0.8;
}

/* Password Strength */
.password-strength {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

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

.strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.3s ease, background 0.3s ease;
  border-radius: 2px;
}

.strength-text {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-500);
  min-width: 45px;
}

/* Auth Form Options */
.auth-form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--gray-600);
  cursor: pointer;
}

.auth-checkbox input {
  display: none;
}

.auth-checkbox .checkmark {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  position: relative;
  transition: var(--transition);
}

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

.auth-checkbox input:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: bold;
}

.auth-checkbox a {
  color: var(--teal);
  text-decoration: underline;
}

.auth-forgot {
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.auth-forgot:hover {
  text-decoration: underline;
}

.auth-forgot:active {
  opacity: 0.7;
}

/* Auth Submit Button */
.auth-submit {
  width: 100%;
  padding: 0.85rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.3rem;
  background: var(--gradient-teal);
  color: var(--white);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 150, 136, 0.3);
}

.auth-submit i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.auth-submit:hover i {
  transform: translateX(5px);
}

.auth-submit:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 12px rgba(0, 150, 136, 0.2);
}

.auth-submit.loading {
  pointer-events: none;
  opacity: 0.8;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.2rem 0;
}

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

.auth-divider span {
  padding: 0 0.8rem;
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ================================================================
   8. SOCIAL BUTTONS — removed
   ================================================================ */
.auth-divider,
.auth-social-buttons,
.auth-social-btn {
  display: none;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-footer p {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.auth-footer a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

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

.auth-footer a:active {
  opacity: 0.7;
}

.auth-checkbox a:active {
  opacity: 0.7;
}

/* ================================================================
   9. REGISTER PAGE SPECIFIC
   ================================================================ */
.auth-register .auth-branding {
  align-items: center;
  padding: 3rem 2.5rem;
}

.auth-register .auth-form-wrapper {
  max-width: 420px;
}

.auth-register .auth-form-section {
  padding: 2rem 2.5rem;
}

.auth-register .auth-form {
  gap: 0.8rem;
}

.auth-register .auth-form-header {
  margin-bottom: 1.2rem;
}

.auth-register .auth-form-header h2 {
  font-size: 1.4rem;
}

.auth-register .auth-input-wrapper input {
  padding: 0.7rem 0.85rem 0.7rem 2.4rem;
  font-size: 0.85rem;
}

/* ================================================================
   10. RESPONSIVE DESIGN
   ================================================================ */
@media (max-width: 768px) {
  .auth-page {
    min-height: 100vh;
  }

  .auth-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .auth-branding {
    flex: none;
    padding: 2rem 1.5rem 1.5rem;
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .auth-branding-content {
    max-width: 100%;
    text-align: center;
  }

  .auth-logo {
    justify-content: center;
    margin-bottom: 1rem;
  }

  .auth-branding h1 {
    font-size: 1.6rem;
  }

  .auth-branding p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .auth-features {
    display: none;
  }

  .auth-illustration {
    display: none;
  }

  .auth-form-section {
    padding: 1.5rem 1.2rem 2rem;
    height: auto;
    overflow: visible;
  }

  .auth-form-wrapper {
    max-width: 100%;
  }

  .auth-form-header h2 {
    font-size: 1.3rem;
  }

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

  .auth-social-buttons {
    flex-direction: column;
  }

  .auth-social-btn {
    justify-content: center;
  }

  .auth-shape-1,
  .auth-shape-2,
  .auth-shape-3 {
    display: none;
  }

  .auth-register .auth-form-wrapper {
    max-width: 100%;
  }

  .auth-register .auth-form-section {
    padding: 1.5rem 1.2rem 2rem;
  }
}

/* ================================================================
   11. ANIMATIONS
   ================================================================ */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes floatElement {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ================================================================
   12. AUTH MESSAGES (Django messages)
   ================================================================ */
.auth-messages {
  margin-bottom: 1rem;
}

.auth-message {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.auth-message i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.auth-message.error {
  background: #fff5f5;
  color: #e63946;
  border: 1px solid #fecdd3;
}

.auth-message.success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* ================================================================
   13. BRANCH SELECTION PAGE
   ================================================================ */
.branch-select-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-teal);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.branch-select-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.branch-select-container {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: branchFadeIn 0.5s ease;
}

@keyframes branchFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.branch-select-header {
  text-align: center;
  margin-bottom: 2rem;
}

.branch-select-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--teal-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
}

.branch-select-icon i {
  font-size: 2rem;
  color: var(--teal);
}

.branch-select-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.branch-select-header p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
}

/* Branch Grid */
.branch-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.branch-card-form {
  display: contents;
}

.branch-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.2rem;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  font-family: 'Poppins', 'Inter', sans-serif;
}

.branch-card:hover {
  border-color: var(--teal);
  background: var(--teal-bg);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 150, 136, 0.12);
}

.branch-card:active {
  transform: translateX(4px) scale(0.99);
}

/* Card Icon */
.branch-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.branch-card:hover .branch-card-icon {
  background: var(--teal);
  border-color: var(--teal);
}

.branch-card-icon i {
  font-size: 1.3rem;
  color: var(--teal);
  transition: color 0.3s ease;
}

.branch-card:hover .branch-card-icon i {
  color: var(--white);
}

/* Card Info */
.branch-card-info {
  flex: 1;
  min-width: 0;
}

.branch-card-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.25rem;
  letter-spacing: -0.3px;
}

.branch-card-city,
.branch-card-phone,
.branch-card-hours {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--gray-600);
  margin-top: 0.15rem;
}

.branch-card-city i,
.branch-card-phone i,
.branch-card-hours i {
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Card Arrow */
.branch-card-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.branch-card-arrow i {
  font-size: 1.2rem;
  color: var(--gray-500);
  transition: all 0.3s ease;
}

.branch-card:hover .branch-card-arrow i {
  color: var(--teal);
  transform: translateX(3px);
}

/* Empty State */
.branch-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--gray-600);
}

.branch-empty i {
  font-size: 2.5rem;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
}

.branch-empty p {
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Footer / Skip */
.branch-select-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--gray-200);
}

.branch-skip-btn {
  background: none;
  border: none;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.branch-skip-btn:hover {
  color: var(--teal);
  background: var(--teal-bg);
}

.branch-skip-btn:active {
  transform: scale(0.97);
}

/* Responsive */
@media (max-width: 768px) {
  .branch-select-page {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .branch-select-container {
    padding: 1.8rem 1.2rem;
    border-radius: 16px;
  }

  .branch-select-header h1 {
    font-size: 1.3rem;
  }

  .branch-card {
    padding: 1rem;
  }
}

