html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Prevent iOS Safari auto-zoom on form inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[type="week"],
textarea,
select {
  font-size: 16px !important;
}

.fs-large {
    font-size: x-large !important; /* 20px */
}

/* Ensure placeholders also use 16px */
input::placeholder,
textarea::placeholder {
  font-size: 16px !important;
}

/* Bootstrap form controls - ensure minimum 16px font size */
.form-control,
.form-select,
.form-control-lg,
.form-control-sm {
  font-size: 16px !important;
}

/* Bootstrap input groups */
.input-group .form-control,
.input-group .form-select {
  font-size: 16px !important;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--dc-primary, #2196FA);
  transition: box-shadow 0.15s ease-in-out;
}

html {
  position: relative;
  min-height: 100%;
}

body {
    margin-bottom: env(safe-area-inset-bottom);
}

/* Mobile-specific body adjustments */
@media (max-width: 768px) {
    body {
        margin-bottom: env(safe-area-inset-bottom);
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    body {
        margin-bottom: env(safe-area-inset-bottom);
        font-size: 14px;
    }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Theme Toggle Button */
#theme-toggle {
  padding: 0.5rem;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.2s;
}

#theme-toggle:hover {
  opacity: 0.7;
}

#theme-toggle:focus {
  outline: 2px solid var(--dc-primary, var(--dc-primary, #2196FA));
  outline-offset: 2px;
}

/* Auth Page Styles */
.auth-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Mobile auth container */
@media (max-width: 768px) {
  .auth-container {
    min-height: 100vh;
    padding: 1.5rem 0.75rem;
    align-items: flex-start;
    padding-top: 2rem;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 1rem 0.5rem;
    padding-top: 1.5rem;
  }
}

.auth-card {
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  color: #ffffff;
  backdrop-filter: blur(10px);
}

/* Mobile auth card */
@media (max-width: 768px) {
  .auth-card {
    border-radius: 16px;
    padding: 2rem 1.5rem;
    margin: 0 0.5rem;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .auth-card {
    border-radius: 12px;
    padding: 1.5rem 1rem;
    margin: 0 0.25rem;
  }
}

[data-bs-theme="light"] .auth-card {
  color: #212529;
}

.back-button {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.back-button a {
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.8;
  transition: opacity 0.2s;
}

[data-bs-theme="light"] .back-button a {
  color: #212529 !important;
}

.back-button a:hover {
  opacity: 1;
}

.auth-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  margin-top: 1rem;
}

.auth-icon svg circle {
  fill: #6c757d;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

[data-bs-theme="light"] .auth-title {
  color: #212529;
}

.auth-subtitle {
  text-align: center;
  font-size: 0.875rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

[data-bs-theme="light"] .auth-subtitle {
  color: #4b5563;
}

.auth-link {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 500;
}

[data-bs-theme="light"] .auth-link {
  color: var(--dc-primary, var(--dc-primary, #2196FA));
}

.auth-link:hover {
  color: var(--dc-primary-dark, #1E88E5);
  opacity: 0.9;
}

[data-bs-theme="light"] .auth-link:hover {
  color: var(--dc-primary-dark, #1E88E5);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

[data-bs-theme="light"] .form-label {
  color: #1a1a1a;
}

.auth-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  transition: all 0.25s ease;
}

[data-bs-theme="light"] .auth-input {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #212529;
}

.auth-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
  box-shadow: none;
}

[data-bs-theme="light"] .auth-input:focus {
  border-color: rgba(0, 0, 0, 0.3);
  background: transparent;
  box-shadow: none;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="light"] .auth-input::placeholder {
  color: #4b5563;
}

.btn-auth {
  width: 100%;
  padding: 0.875rem;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-height: 48px;
}

/* Mobile auth button */
@media (max-width: 768px) {
  .btn-auth {
    min-height: 52px;
    padding: 1rem;
    font-size: 16px;
    border-radius: 12px;
  }
}

[data-bs-theme="light"] .btn-auth {
  background: var(--dc-primary, var(--dc-primary, #2196FA));
  color: #ffffff;
}

.btn-auth:hover:not(:disabled) {
  background: #f0f0f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

[data-bs-theme="light"] .btn-auth:hover:not(:disabled) {
  background: var(--dc-primary-dark, #1E88E5);
}

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

.auth-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  font-weight: 400;
}

[data-bs-theme="light"] .auth-divider {
  color: #4b5563;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 45%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="light"] .auth-divider::before,
[data-bs-theme="light"] .auth-divider::after {
  background: #dee2e6;
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.btn-auth-secondary {
  width: 100%;
  padding: 0.875rem;
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

/* Mobile auth secondary button */
@media (max-width: 768px) {
  .btn-auth-secondary {
    min-height: 52px;
    padding: 1rem;
    border-radius: 12px;
  }
}

[data-bs-theme="light"] .btn-auth-secondary {
  color: #212529;
  border: 1px solid #dee2e6;
}

.btn-auth-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="light"] .btn-auth-secondary:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.auth-footer {
  text-align: center;
  font-size: 0.75rem;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  font-weight: 400;
}

[data-bs-theme="light"] .auth-footer {
  color: #4b5563;
}

.form-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

[data-bs-theme="light"] .text-muted {
  color: #6c757d !important;
}

.text-center {
  text-align: center;
}

/* Theme Toggle in Auth Page */
.theme-toggle-auth {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.theme-toggle-auth #theme-toggle {
  padding: 0.5rem;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.2s;
  color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="light"] .theme-toggle-auth #theme-toggle {
  color: #212529;
}

.theme-toggle-auth #theme-toggle:hover {
  opacity: 0.7;
}

.theme-toggle-auth #theme-toggle:focus {
  outline: 2px solid var(--dc-primary, var(--dc-primary, #2196FA));
  outline-offset: 2px;
}

/* Bottom Navigation styles moved to theme.css for consistency */