html {
  font-size: 14px;
}

@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 #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.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;
}

/* View Mode Toggle Styles */
.mobile-view {
  /* Mobile-specific styles */
  font-size: 14px;
  overflow-x: hidden;
  width: 100%;
}

.mobile-view .container {
  max-width: 100%;
  padding-left: 10px;
  padding-right: 10px;
  overflow-x: hidden;
}

.mobile-view body {
  overflow-x: hidden;
  width: 100%;
}

.mobile-view .navbar-brand {
  font-size: 1.1rem;
}

.mobile-view .nav-link {
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
}

.mobile-view .btn {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

.mobile-view .card {
  margin-bottom: 1rem;
}

.mobile-view .table {
  font-size: 0.875rem;
  width: 100%;
  table-layout: fixed;
}

.mobile-view .table th,
.mobile-view .table td {
  padding: 0.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.mobile-view .table-responsive {
  overflow-x: hidden;
}

.mobile-view .form-control {
  font-size: 0.875rem;
}

.mobile-view .form-label {
  font-size: 0.875rem;
}

.mobile-view .dropdown-menu {
  font-size: 0.875rem;
}

.mobile-view .modal-dialog {
  margin: 0.5rem;
  max-width: calc(100vw - 1rem);
}

.mobile-view .modal-content {
  font-size: 0.875rem;
  max-width: 100%;
  overflow-x: hidden;
}

.mobile-view .alert {
  font-size: 0.875rem;
  padding: 0.75rem;
}

.mobile-view .badge {
  font-size: 0.75rem;
}

.mobile-view .small {
  font-size: 0.8rem;
}

.mobile-view .text-muted {
  font-size: 0.8rem;
}

/* Prevent horizontal scroll in mobile view */
.mobile-view * {
  max-width: 100%;
  box-sizing: border-box;
}

.mobile-view .row {
  margin-left: 0;
  margin-right: 0;
}

.mobile-view .col,
.mobile-view [class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
}

.mobile-view .card-body {
  padding: 0.75rem;
}

.mobile-view .btn {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-view .navbar {
  padding-left: 10px;
  padding-right: 10px;
}

.mobile-view .navbar-nav {
  margin-left: 0;
  margin-right: 0;
}

/* Desktop view styles (default) */
.desktop-view {
  /* Desktop-specific styles */
  font-size: 16px;
}

.desktop-view .container {
  max-width: 1200px;
}

/* Custom Toggle Switch Styling */
.view-mode-toggle {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px; 
}

.toggle-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.toggle-label i {
  font-size: 1rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

input:checked + .toggle-slider {
  background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
  box-shadow: inset 0 2px 4px rgba(13, 110, 253, 0.3);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 2px 12px rgba(13, 110, 253, 0.3);
}

input:checked + .toggle-slider .toggle-handle {
  opacity: 1;
  background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
}

input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Active state styling */
input:checked ~ .toggle-label:last-child {
  color: #0d6efd;
  font-weight: 600;
}

input:not(:checked) ~ .toggle-label:first-child {
  color: #0d6efd;
  font-weight: 600;
}

/* Hover effects */
.toggle-container:hover .toggle-slider {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

.toggle-container:hover input:checked + .toggle-slider {
  box-shadow: inset 0 2px 6px rgba(13, 110, 253, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .footer .row {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .view-mode-toggle {
    justify-content: center;
  }
  
  .toggle-container {
    padding: 6px 12px;
    gap: 8px;
  }
  
  .toggle-label {
    font-size: 0.8rem;
  }
  
  .toggle-switch {
    width: 45px;
    height: 22px;
  }
  
  .toggle-slider:before {
    height: 16px;
    width: 16px;
  }
  
  input:checked + .toggle-slider:before {
    transform: translateX(23px);
  }
}

@media (max-width: 576px) {
  .toggle-container {
    padding: 4px 8px;
    gap: 6px;
  }
  
  .toggle-label {
    font-size: 0.75rem;
  }
  
  .toggle-label i {
    font-size: 0.875rem;
  }
}

/* Darker borders for all textboxes and textareas */
.form-control,
.form-select,
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="time"],
input[type="datetime-local"],
textarea {
  border-color: #495057 !important;
  border-width: 2px !important;
}

.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
textarea:focus {
  border-color: #212529 !important;
  box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0.25) !important;
}