/* EKA Yoga Theme CSS */
/* Color tokens (WCAG-aware combinations) */
:root {
  --rose-200: #eac3d1; /* soft pink */
  --lilac-300: #c7a5d9; /* warm lilac */
  --violet-700: #6b4a7e; /* muted violet (primary action) */
  --violet-800: #5a3c6a;
  --blue-300: #8fbbd9; /* calming blue */
  --blue-900: #17354a; /* dark blue for text on light */
  --white: #ffffff;
  --offwhite: #faf7f9;
  --gold-400: #d5b66b; /* subtle golden accents */
  --text-900: #1e293b; /* dark readable text */
  --text-700: #334155;
  --heading-color: #2c3e50; /* Dark headings for better contrast */
  --label-color: #2c3e50; /* Dark labels for better contrast */
  --error-color: #dc2626;
  --success-color: #16a34a;
  --warning-color: #f59e0b;

  --bg-app: var(--offwhite);
  --bg-surface: var(--white);

  --focus-ring: 0 0 0 3px rgba(213,182,107,0.45);
}

/* Global layout and typography */
html { scroll-behavior: smooth; }
body {
  background: linear-gradient(135deg, rgba(234,195,209,0.35), rgba(199,165,217,0.25)) fixed, var(--bg-app);
  color: var(--text-900);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.7;
}

h1, h2, h3, h4 { color: #2c3e50; letter-spacing: 0.2px; font-weight: 600; }
.display-script { font-family: "Sacramento", "Cormorant Garamond", serif; letter-spacing: 0.5px; }

/* Accessibility-friendly focus styles */
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus-ring); border-radius: 8px; }

/* Organic shapes and rounded corners */
.rounded-curve { border-radius: 18px; }
.rounded-pill-xl { border-radius: 999px; }

/* Subtle texture overlay (SVG dot pattern) */
.texture-overlay {
  position: relative;
}
.texture-overlay::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='%23c7a5d933'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3Ccircle cx='34' cy='34' r='1'/%3E%3Ccircle cx='18' cy='50' r='1'/%3E%3Ccircle cx='50' cy='18' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

/* Navbar theme */
.navbar-yoga {
  background: linear-gradient(90deg, var(--violet-700), var(--lilac-300));
}
.navbar-yoga .nav-link { color: var(--white) !important; opacity: 0.9; }
.navbar-yoga .nav-link:hover { opacity: 1; }

/* Hero section */
.hero-yoga {
  background: radial-gradient(circle at 20% 10%, rgba(218, 180, 212, 0.25) 0%, rgba(143, 187, 217, 0.25) 30%, rgba(255,255,255,0) 60%),
              linear-gradient(135deg, rgba(234,195,209,0.35), rgba(199,165,217,0.25));
  padding: 80px 0;
}
.hero-yoga .title { font-size: 3rem; font-weight: 700; }
.hero-yoga .subtitle { font-size: 1.25rem; color: var(--text-700); }

/* Buttons (override Bootstrap primary) */
.btn-primary,
.btn-yoga {
  background-color: var(--violet-700) !important;
  border-color: var(--violet-700) !important;
  color: var(--white) !important;
}
.btn-primary:hover,
.btn-yoga:hover { background-color: var(--violet-800) !important; border-color: var(--violet-800) !important; }

.btn-outline-yoga {
  color: var(--violet-700);
  border-color: var(--violet-700);
}
.btn-outline-yoga:hover { color: var(--white); background-color: var(--violet-700); }

/* Cards */
.card-yoga {
  background: var(--bg-surface);
  border: 1px solid rgba(27,31,59,0.08);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(27,31,59,0.06);
}
.card-yoga .card-header { background: transparent; border-bottom: 0; color: var(--blue-900); font-weight: 600; }

/* Forms */
.form-label { color: var(--label-color); font-weight: 500; font-size: 0.95rem; margin-bottom: 0.5rem; display: block; }
.form-control {
  border-radius: 12px;
  border-color: rgba(27,31,59,0.18);
}
.form-control:focus { box-shadow: var(--focus-ring); border-color: var(--violet-700); }

/* Lotus / Mandala icon styling */
.icon-yoga { width: 28px; height: 28px; display: inline-block; }
.icon-fill-primary { fill: var(--violet-700); }
.icon-stroke-gold { stroke: var(--gold-400); }

/* Section spacing */
.section-yoga { padding: 60px 0; }

/* Animations */
.fade-in { opacity: 0; transform: translateY(8px); transition: opacity 600ms ease, transform 600ms ease; }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

.slide-up { opacity: 0; transform: translateY(18px); transition: opacity 800ms ease, transform 800ms ease; }
.slide-up.is-visible { opacity: 1; transform: translateY(0); }

/* Interactive background subtle response */
.bg-reactive { transition: background-position 1200ms ease; background-size: 120% 120%; }
.bg-reactive:hover { background-position: 55% 45%; }

/* Accessibility helpers */
.text-on-light { color: var(--blue-900); }
.text-on-dark { color: var(--white); }

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-yoga { padding: 60px 0; }
  .hero-yoga .title { font-size: 2.4rem; }
}
@media (max-width: 576px) {
  .hero-yoga { padding: 40px 0; }
  .hero-yoga .title { font-size: 2rem; }
}

/* Offcanvas sidebar theme */
.offcanvas-yoga {
  background: linear-gradient(180deg, var(--violet-700), var(--lilac-300));
}
.offcanvas-yoga .offcanvas-title { color: var(--white); }
.offcanvas-yoga .nav-link { color: var(--white) !important; opacity: 0.95; }
.offcanvas-yoga .nav-link:hover { opacity: 1; }

/* Mobile bottom tab bar */
.mobile-tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1030;
  background: linear-gradient(90deg, var(--violet-700), var(--lilac-300));
  color: var(--white);
  border-top: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: saturate(140%) blur(6px);
}
.mobile-tabbar .tab-item {
  flex: 1 1 0;
  text-align: center;
  padding: 10px 6px;
  font-size: 0.85rem;
  color: var(--white);
  text-decoration: none;
  opacity: 0.92;
}
.mobile-tabbar .tab-item:focus-visible { box-shadow: var(--focus-ring); }
.mobile-tabbar .tab-item.active,
.mobile-tabbar .tab-item:hover { opacity: 1; }
.mobile-tabbar .tab-label { display: block; margin-top: 2px; }

@media (min-width: 992px) {
  .mobile-tabbar { display: none; }
}
@media (max-width: 991.98px) {
  .navbar-yoga .d-lg-flex { display: none !important; }
}

/* Authentication Page Specific Styles */
.auth-container {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--bg-surface);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(27,31,59,0.08), 0 8px 16px rgba(27,31,59,0.04);
  border: 1px solid rgba(27,31,59,0.06);
  overflow: hidden;
  max-width: 480px;
  width: 100%;
  position: relative;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--violet-700), var(--lilac-300), var(--rose-200));
}

.auth-header {
  text-align: center;
  padding: 2.5rem 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(234,195,209,0.15), rgba(199,165,217,0.1));
}

.auth-header .brand-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--violet-700), var(--lilac-300));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(107,74,126,0.3);
}

.auth-header h1 {
  color: var(--heading-color);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.auth-header h2, 
.auth-header h3, 
.auth-header h4 {
  color: var(--heading-color);
}

/* Form Text and Help Styles */
.form-text {
  color: var(--text-700);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.text-danger {
  color: var(--error-color) !important;
}

.text-success {
  color: var(--success-color) !important;
}

.text-warning {
  color: var(--warning-color) !important;
}

.auth-header p {
  color: var(--text-700);
  font-size: 0.95rem;
  margin: 0;
  opacity: 0.9;
}

.auth-body {
  padding: 2rem;
}

.auth-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-of-type {
  margin-bottom: 2rem;
}

.form-label {
  font-weight: 500;
  color: var(--text-700);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: block;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(27,31,59,0.08);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: rgba(255,255,255,0.9);
}

.form-control:focus {
  border-color: var(--violet-700);
  box-shadow: 0 0 0 3px rgba(107,74,126,0.1);
  background: var(--white);
}

.form-control::placeholder {
  color: rgba(44, 62, 80, 0.6);
  font-style: italic;
}

.form-control.error {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-control.success {
  border-color: var(--success-color);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.btn-auth {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--violet-700), var(--lilac-300));
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(107,74,126,0.3);
}

.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(107,74,126,0.4);
  background: linear-gradient(135deg, var(--violet-800), var(--violet-700));
}

.btn-auth:focus {
  outline: 2px solid var(--violet-700);
  outline-offset: 2px;
}

.btn-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Enhanced Interactive Elements */
a {
  transition: all 0.2s ease;
}

a:hover {
  transform: translateY(-1px);
}

.btn {
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

/* Password Toggle Enhancement */
.password-toggle {
  transition: all 0.2s ease;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
}

.password-toggle:hover {
  background: rgba(107, 74, 126, 0.1);
}

.password-toggle:focus {
  outline: 2px solid var(--violet-700);
  outline-offset: 2px;
}

.btn-auth:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(107,74,126,0.3);
}

.auth-links {
  text-align: center;
  padding: 1.5rem 2rem 2rem;
  background: rgba(234,195,209,0.05);
  border-top: 1px solid rgba(27,31,59,0.06);
}

.auth-links p {
  margin: 0;
  color: var(--text-700);
  font-size: 0.9rem;
}

.auth-links a {
  color: var(--violet-700);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-links a:hover {
  color: var(--violet-800);
  text-decoration: underline;
}

.alert {
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border: none;
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(220,38,38,0.08));
  color: #dc2626;
  border-left: 4px solid #dc2626;
}

.alert-success {
  background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(16,185,129,0.08));
  color: #16a34a;
  border-left: 4px solid #16a34a;
}

.file-input-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-label {
  display: block;
  padding: 0.875rem 1rem;
  border: 2px dashed rgba(27,31,59,0.2);
  border-radius: 12px;
  text-align: center;
  color: var(--text-700);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  cursor: pointer;
  background: rgba(255,255,255,0.5);
}

.file-input-label:hover {
  border-color: var(--violet-700);
  background: rgba(107,74,126,0.05);
}

.file-input.has-file .file-input-label {
  border-color: #16a34a;
  background: rgba(34,197,94,0.05);
  color: #16a34a;
}

.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-700);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.password-toggle:hover {
  opacity: 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .auth-container {
    padding: 1rem 0.5rem;
    min-height: calc(100vh - 160px);
  }
  
  .auth-card {
    max-width: 100%;
    border-radius: 16px;
    margin: 0;
  }
  
  .auth-header {
    padding: 2rem 1.5rem 1rem;
  }
  
  .auth-header .brand-logo {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .auth-header h1 {
    font-size: 1.5rem;
  }
  
  .auth-body {
    padding: 1.5rem;
  }
  
  .auth-links {
    padding: 1rem 1.5rem 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .btn-auth {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .auth-header {
    padding: 1.5rem 1rem 0.75rem;
  }
  
  .auth-body {
    padding: 1.25rem;
  }
  
  .auth-links {
    padding: 0.75rem 1rem 1.25rem;
  }
  
  /* Small mobile brand logo */
  .atlas-auth .brand-logo,
  .library-auth .brand-logo {
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
    border-radius: 6px;
  }
}

/* Fixed Bottom Navigation Menu - Mobile First */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: linear-gradient(135deg, var(--violet-700), var(--lilac-300));
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 8px;
  min-height: 48px;
  flex: 1;
  max-width: 80px;
}

.bottom-nav-item:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.bottom-nav-item.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

.bottom-nav-item:focus {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.bottom-nav-icon {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.bottom-nav-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-align: center;
  line-height: 1;
}

/* Hide on larger screens */
@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

/* Enhanced Footer Styles */
.footer-main {
  background: linear-gradient(135deg, var(--violet-700), var(--lilac-300));
  color: var(--white);
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

/* Add bottom padding for mobile when nav is present */
body.has-bottom-nav {
  padding-bottom: 80px;
}

@media (max-width: 767px) {
  body.has-bottom-nav .footer-main {
    padding-bottom: 80px;
  }
}

.footer-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.footer-content {
  padding: 3rem 0 2rem;
}

.footer-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
}

.footer-section-title {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  opacity: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0;
  transition: all 0.2s ease;
  border-radius: 4px;
  width: fit-content;
}

.footer-link:hover {
  color: var(--white);
  opacity: 1;
  transform: translateX(4px);
}

.footer-link.active {
  color: var(--white);
  font-weight: 500;
  opacity: 1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.footer-info {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-copyright {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

.footer-tagline {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  font-weight: 300;
}

/* Enhanced Mobile Tabbar */
.mobile-tabbar {
  background: linear-gradient(90deg, var(--violet-700), var(--lilac-300));
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: saturate(140%) blur(6px);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  min-height: 56px;
}

.tab-item:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.tab-item.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

.tab-icon {
  font-size: 1.2rem;
  margin-bottom: 2px;
  display: block;
}

.tab-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
  .footer-content {
    padding: 1.5rem 0 1rem;
  }
  
  .footer-navigation {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .footer-section-title {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }
  
  .footer-link {
    font-size: 0.8rem;
    padding: 0.125rem 0;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 1rem;
  }
  
  .footer-info {
    text-align: left;
    width: 100%;
  }
  
  .logo-text {
    font-size: 1.25rem;
  }
  
  .logo-subtitle {
    font-size: 0.7rem;
  }
  
  .footer-copyright {
    font-size: 0.8rem;
  }
  
  .footer-tagline {
    font-size: 0.75rem;
  }
  
  .tab-icon {
    font-size: 1rem;
  }
  
  .tab-label {
    font-size: 0.65rem;
  }
}

/* Extremely Compact Mobile Footer */
@media (max-width: 480px) {
  .footer-main {
    padding: 0;
  }
  
  .footer-content {
    padding: 1rem 0 0.75rem;
  }
  
  /* Compact navigation layout */
  .footer-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    justify-content: center;
  }
  
  .footer-links-group {
    flex: 0 0 calc(50% - 0.375rem);
    max-width: calc(50% - 0.375rem);
  }
  
  .footer-section-title {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
    opacity: 0.9;
  }
  
  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .footer-link {
    font-size: 0.7rem;
    padding: 0.125rem 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    white-space: nowrap;
  }
  
  .footer-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
  }
  
  /* Compact bottom section */
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 0.5rem;
  }
  
  .footer-brand {
    flex: 1;
  }
  
  .footer-logo {
    flex-direction: row;
    align-items: baseline;
    gap: 0.25rem;
  }
  
  .logo-text {
    font-size: 1rem;
    font-weight: 600;
  }
  
  .logo-subtitle {
    font-size: 0.6rem;
    opacity: 0.8;
  }
  
  .footer-info {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
  }
  
  .footer-copyright {
    font-size: 0.65rem;
    opacity: 0.8;
    line-height: 1.2;
  }
  
  .footer-tagline {
    font-size: 0.6rem;
    opacity: 0.7;
    line-height: 1.2;
  }
  
  /* Compact mobile tabbar */
  .mobile-tabbar {
    padding: 4px 0;
  }
  
  .tab-item {
    padding: 4px 2px;
    min-height: 44px;
  }
  
  .tab-icon {
    font-size: 0.85rem;
    margin-bottom: 1px;
  }
  
  .tab-label {
    font-size: 0.6rem;
    line-height: 1;
  }
}

/* Body layout for footer positioning */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main,
.auth-container {
  flex: 1;
}

/* Atlas & Library Authentication Themes */
/* Atlas Theme - Professional/Portfolio focused */
.atlas-theme {
  --primary-color: #1e3a8a; /* Professional blue */
  --secondary-color: #f59e0b; /* Gold accent */
  --background-gradient: linear-gradient(135deg, rgba(30, 58, 138, 0.08) 0%, rgba(55, 48, 163, 0.06) 50%, rgba(245, 158, 11, 0.08) 100%);
  --surface-color: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-dark: #2c3e50; /* Dark text for better contrast */
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --focus-color: #3b82f6;
}

/* Library Theme - Knowledge/Learning focused */
.library-theme {
  --primary-color: #065f46; /* Deep green */
  --secondary-color: #0891b2; /* Cyan accent */
  --background-gradient: linear-gradient(135deg, rgba(6, 95, 70, 0.08) 0%, rgba(4, 120, 87, 0.06) 50%, rgba(8, 145, 178, 0.08) 100%);
  --surface-color: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-dark: #2c3e50; /* Dark text for better contrast */
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --focus-color: #06b6d4;
}

/* Atlas Authentication Styles */
body.atlas-auth {
  background: var(--background-gradient);
  color: var(--text-primary);
}

.atlas-auth h1, 
.atlas-auth h2, 
.atlas-auth h3, 
.atlas-auth h4,
.atlas-auth .auth-header h1,
.atlas-auth .auth-header h2,
.atlas-auth .auth-header h3,
.atlas-auth .auth-header h4 {
  color: var(--text-dark) !important;
  font-weight: 600;
}

.atlas-auth .form-label {
  color: var(--text-dark) !important;
  font-weight: 500;
}

.atlas-auth .auth-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.atlas-auth .auth-header {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.03), rgba(245, 158, 11, 0.03));
  border-bottom: 2px solid var(--primary-color);
  border-radius: 16px 16px 0 0;
}

.atlas-auth .brand-logo {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.atlas-auth .btn-auth {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 4px 14px 0 rgba(30, 58, 138, 0.3);
  border: none;
  color: white;
  font-weight: 600;
}

.atlas-auth .btn-auth:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.atlas-auth .btn-auth:hover {
  background: linear-gradient(135deg, #1e40af, #d97706);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(30, 58, 138, 0.4);
}

.atlas-auth .btn-auth:hover {
  background: linear-gradient(135deg, #1e40af, #d97706);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(30, 58, 138, 0.4);
}

/* Library Authentication Styles */
body.library-auth {
  background: var(--background-gradient);
  color: var(--text-primary);
}

.library-auth h1, 
.library-auth h2, 
.library-auth h3, 
.library-auth h4,
.library-auth .auth-header h1,
.library-auth .auth-header h2,
.library-auth .auth-header h3,
.library-auth .auth-header h4 {
  color: var(--text-dark) !important;
  font-weight: 600;
}

.library-auth .form-label {
  color: var(--text-dark) !important;
  font-weight: 500;
}

.library-auth .auth-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.library-auth .auth-header {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.03), rgba(8, 145, 178, 0.03));
  border-bottom: 2px solid var(--primary-color);
  border-radius: 16px 16px 0 0;
}

.library-auth .brand-logo {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(6, 95, 70, 0.3);
}

.library-auth .btn-auth {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 4px 14px 0 rgba(6, 95, 70, 0.3);
  border: none;
  color: white;
  font-weight: 600;
}

.library-auth .btn-auth:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.library-auth .btn-auth:hover {
  background: linear-gradient(135deg, #047857, #0284c7);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(6, 95, 70, 0.4);
}

.library-auth .btn-auth:hover {
  background: linear-gradient(135deg, #047857, #0284c7);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(6, 95, 70, 0.4);
}

/* Enhanced Form Controls */
.form-control,
.form-select {
  border: 2px solid rgba(44, 62, 80, 0.15);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.95);
  color: #2c3e50;
  backdrop-filter: blur(4px);
}

.form-control::placeholder {
  color: rgba(44, 62, 80, 0.6);
  font-style: italic;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
  background: var(--surface-color);
  outline: none;
}

/* Atlas and Library specific form styling */
.atlas-auth .form-control,
.atlas-auth .form-select {
  border-color: rgba(30, 58, 138, 0.15);
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.98);
}

.atlas-auth .form-control:focus,
.atlas-auth .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
  background: var(--surface-color);
}

.library-auth .form-control,
.library-auth .form-select {
  border-color: rgba(6, 95, 70, 0.15);
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.98);
}

.library-auth .form-control:focus,
.library-auth .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.1);
  background: var(--surface-color);
}

/* Ensure all form labels are dark and visible */
.auth-form .form-label {
  color: var(--text-dark) !important;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: block;
}

.atlas-auth .auth-form .form-label,
.library-auth .auth-form .form-label {
  color: var(--text-dark) !important;
  font-weight: 500;
}

/* Form text styling for better contrast */
.auth-form .form-text {
  color: var(--text-dark);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  opacity: 0.8;
  font-weight: 400;
}

.atlas-auth .auth-form .form-text,
.library-auth .auth-form .form-text {
  color: var(--text-dark);
}

.form-control::placeholder {
  color: rgba(44, 62, 80, 0.7);
  font-style: italic;
}

.atlas-auth .form-control::placeholder,
.library-auth .form-control::placeholder {
  color: rgba(44, 62, 80, 0.7);
}

/* Enhanced error states */
.form-control[aria-invalid="true"] {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  background: rgba(255, 255, 255, 0.98);
}

.form-control[aria-invalid="false"] {
  border-color: var(--success-color);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
  background: rgba(255, 255, 255, 0.98);
}

/* Form text and help styling */
.auth-form .form-text {
  color: #2c3e50;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  opacity: 0.8;
}

.atlas-auth .auth-form .form-text,
.library-auth .auth-form .form-text {
  color: #2c3e50;
}

/* Password Match Indicator */
.password-match small {
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
  color: var(--text-dark);
  font-weight: 500;
}

.password-match .text-danger {
  color: var(--error-color) !important;
}

.password-match .text-success {
  color: var(--success-color) !important;
}

/* Library Card Number Display */
.library-card-number {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--primary-color);
  letter-spacing: 2px;
  margin: 0.5rem 0;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--focus-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.form-control:invalid {
  border-color: var(--error-color);
}

.form-control:valid {
  border-color: var(--success-color);
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.strength-weak {
  color: var(--error-color);
}

.strength-medium {
  color: var(--warning-color);
}

.strength-strong {
  color: var(--success-color);
}

.strength-bar {
  height: 4px;
  border-radius: 2px;
  margin-top: 0.25rem;
  transition: all 0.3s ease;
}

.strength-bar.weak {
  background: var(--error-color);
  width: 33%;
}

.strength-bar.medium {
  background: var(--warning-color);
  width: 66%;
}

.strength-bar.strong {
  background: var(--success-color);
  width: 100%;
}

/* WCAG 2.1 Accessibility Enhancements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus indicators for accessibility */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .auth-card {
    border: 2px solid var(--text-primary);
  }
  
  .form-control,
  .form-select {
    border: 2px solid var(--text-primary);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Library Card Number Generator Display */
.library-card-preview {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary-color);
  letter-spacing: 2px;
}

.library-card-preview.has-value {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-color: var(--success-color);
  color: var(--success-color);
}

/* Error and Success States */
.alert {
  border: none;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  color: #dc2626;
  border-left: 4px solid #dc2626;
}

.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
  color: #059669;
  border-left: 4px solid #059669;
}

.alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
  color: #d97706;
  border-left: 4px solid #d97706;
}

/* Responsive adjustments for module auth pages */
@media (max-width: 768px) {
  .auth-container {
    padding: 1rem 0.5rem;
    /* Ensure space for bottom navigation */
    padding-bottom: 100px;
  }
  
  .auth-card {
    max-width: 100%;
    border-radius: 16px;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
  }
  
  .auth-header {
    padding: 2rem 1.5rem 1rem;
  }
  
  .auth-body {
    padding: 1.5rem;
  }
  
  .form-control,
  .form-select {
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.98);
  }
  
  .btn-auth {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
  
  .bottom-nav {
    display: flex;
  }
  
  body.has-bottom-nav {
    padding-bottom: 80px;
  }
  
  /* Mobile brand logo adjustments */
  .atlas-auth .brand-logo,
  .library-auth .brand-logo {
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
  }
}

/* Mobile-first navigation improvements */
@media (max-width: 480px) {
  .bottom-nav-item {
    padding: 0.375rem 0.5rem;
    min-height: 44px;
  }
  
  .bottom-nav-icon {
    font-size: 1rem;
  }
  
  .bottom-nav-label {
    font-size: 0.65rem;
  }
  
  .auth-header {
    padding: 1.5rem 1rem 0.75rem;
  }
  
  .auth-body {
    padding: 1.25rem;
  }
  
  .auth-links {
    padding: 0.75rem 1rem 1.25rem;
  }
  
  /* Small mobile brand logo */
  .atlas-auth .brand-logo,
  .library-auth .brand-logo {
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .auth-header {
    padding: 1.5rem 1rem 0.75rem;
  }
  
  .auth-body {
    padding: 1.25rem;
  }
  
  .brand-logo {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .auth-header h1 {
    font-size: 1.5rem;
  }
  
  .library-card-preview {
    font-size: 1rem;
    padding: 0.75rem;
  }
}