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;
  height: 100%;
}

body {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Dashboard Card Styles */
.dashboard-card {
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px var(--card-shadow);
  border-color: #3498db;
}

.dashboard-card-header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-card-header i {
  font-size: 1.25rem;
}

.dashboard-card-body {
  padding: 1.5rem 1rem;
  text-align: center;
}

.dashboard-card-footer {
  padding: 0.5rem 1rem;
  background-color: var(--secondary-bg);
  color: var(--primary-text);
  font-size: 0.85rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #3498db;
  margin: 0;
}

/* Vibrant Dashboard Card Colors */
.dashboard-card:nth-child(1) .dashboard-card-header {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E72 100%);
}

.dashboard-card:nth-child(1) .stat-number {
  color: var(--vibrant-red);
}

.dashboard-card:nth-child(2) .dashboard-card-header {
  background: linear-gradient(135deg, #4ECDC4 0%, #3BA89C 100%);
}

.dashboard-card:nth-child(2) .stat-number {
  color: var(--vibrant-teal);
}

.dashboard-card:nth-child(3) .dashboard-card-header {
  background: linear-gradient(135deg, #FFE66D 0%, #FFC93D 100%);
}

.dashboard-card:nth-child(3) .stat-number {
  color: var(--vibrant-yellow);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dashboard-card:nth-child(4) .dashboard-card-header {
  background: linear-gradient(135deg, #9B59B6 0%, #8B4BA0 100%);
}

.dashboard-card:nth-child(4) .stat-number {
  color: var(--vibrant-purple);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-pending {
  background: linear-gradient(135deg, rgba(255, 206, 86, 0.3) 0%, rgba(255, 193, 7, 0.3) 100%);
  color: #FFE66D;
  border: 1px solid #FFE66D;
}

.status-badge.status-processing {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.3) 0%, rgba(78, 205, 196, 0.3) 100%);
  color: #4ECDC4;
  border: 1px solid #4ECDC4;
}

.status-badge.status-processed {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(39, 174, 96, 0.3) 100%);
  color: #2ECC71;
  border: 1px solid #2ECC71;
}

.status-badge.status-cancelled {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.3) 0%, rgba(255, 142, 114, 0.3) 100%);
  color: #FF6B6B;
  border: 1px solid #FF6B6B;
}

/* Table Styles */
.table-hover tbody tr:hover {
  background-color: var(--secondary-bg);
  cursor: pointer;
}

/* Vibrant Navbar Styling */
.navbar {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
  border-bottom: 3px solid #4ECDC4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
  color: #4ECDC4 !important;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.navbar-brand:hover {
  color: #FF6B6B !important;
}

/* Vibrant Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2980B9 0%, #1B5E8B 100%);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-success:hover {
  background: linear-gradient(135deg, #27AE60 0%, #1E8449 100%);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #FF5252 0%, #E63946 100%);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  transform: translateY(-2px);
}

.btn-warning {
  background: linear-gradient(135deg, #FFE66D 0%, #FFC93D 100%);
  border: none;
  color: #333;
  transition: all 0.3s ease;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #FFC93D 0%, #FF9800 100%);
  box-shadow: 0 4px 12px rgba(255, 230, 109, 0.4);
  transform: translateY(-2px);
}

/* Vibrant Card Borders on Dark Theme */
[data-theme="dark"] .card {
  border: 2px solid transparent;
  background: linear-gradient(#252525, #252525) padding-box,
              linear-gradient(135deg, #4ECDC4, #FF6B6B) border-box;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .card {
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Vibrant Sidebar */
.sidebar {
  background: linear-gradient(180deg, #1a1a1a 0%, #252525 100%);
}

.sidebar-nav-item {
  transition: all 0.3s ease;
}

.sidebar-nav-item:hover {
  background: rgba(78, 205, 196, 0.1);
  border-left: 4px solid #4ECDC4;
  padding-left: calc(0.5rem - 4px);
}

.sidebar-nav-item.active {
  background: rgba(255, 107, 107, 0.15);
  border-left: 4px solid #FF6B6B;
  padding-left: calc(0.5rem - 4px);
  color: #FF6B6B;
}

/* Form Controls with Vibrant Focus */
.form-control:focus,
.form-select:focus {
  border-color: #4ECDC4;
  box-shadow: 0 0 0 0.2rem rgba(78, 205, 196, 0.25);
}

.form-check-input:checked {
  background-color: #4ECDC4;
  border-color: #4ECDC4;
}

.form-check-input:checked:focus {
  border-color: #4ECDC4;
  box-shadow: 0 0 0 0.2rem rgba(78, 205, 196, 0.25);
}

/* Feature Card Styling */
.feature-card {
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #4ECDC4;
}

.feature-card h5 {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card i {
  color: #3498db;
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

.feature-card p {
  color: #555 !important;
}

/* Center Logo Styling */
.display-5 i {
  display: inline-block;
  padding: 20px;
  border: 3px solid #FF4444;
  border-radius: 8px;
  background: rgba(255, 68, 68, 0.05);
  color: #FF4444;
}

/* Password Input Field - Override all styles */
#PasswordDisplay {
  background-color: #ffffff !important;
  color: #000000 !important;
  font-family: monospace !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  border: 2px solid #0d6efd !important;
  padding: 12px !important;
}

#PasswordDisplay::placeholder {
  color: #999 !important;
}

#PasswordDisplay:focus {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #0d6efd !important;
}

/* Professional Footer Styling */
.fullscreen-footer {
  width: 100%;
  clear: both;
  margin-top: auto;
}

.fullscreen-footer a {
  transition: color 0.3s ease;
}

.fullscreen-footer a:hover {
  color: #4ECDC4 !important;
}

.fullscreen-footer .list-unstyled li a:hover i {
  transform: translateX(2px);
  transition: transform 0.2s ease;
}

.footer-section {
  padding: 1rem 0;
}

.footer-title {
  font-weight: 700;
  color: #fff;
}

.footer-desc {
  color: #999;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Login/Register Button Hover Effects */
.navbar-nav .btn-primary:hover {
  background: linear-gradient(135deg, #0052CC 0%, #003D99 100%);
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

.navbar-nav .btn-outline-primary:hover {
  background-color: #0052CC;
  border-color: #0052CC;
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* Nav item spacing for buttons */
.navbar-nav .nav-item.ms-2 {
  margin-left: 0.5rem !important;
}

@media (max-width: 768px) {
  .navbar-nav .btn {
    width: 100%;
    margin: 0.5rem 0;
    text-align: left;
  }

  .fullscreen-footer .row {
    text-align: center;
  }

  .fullscreen-footer .col-lg-4,
  .fullscreen-footer .col-lg-2 {
    margin-bottom: 1.5rem;
  }

  /* Mobile Dashboard Date Range Filter - Horizontal scroll */
  .date-range-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.75rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .date-range-filter-bar .filter-label {
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.85rem;
    min-width: max-content;
    padding-right: 0.5rem;
  }

  .date-range-filter-bar .filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }

  .filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 20px;
    flex-shrink: 0;
  }

  /* Mobile Dashboard KPI Cards - Optimized for small screens */
  .dashboard-card {
    margin-bottom: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }

  .dashboard-card-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .dashboard-card-header i {
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  .dashboard-card-body {
    padding: 0.75rem 0.5rem;
    min-height: auto;
  }

  .stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0.25rem 0;
    line-height: 1.1;
  }

  .stat-label {
    font-size: 0.7rem;
    margin-top: 0.25rem;
    line-height: 1.3;
    color: #666;
  }

  .dashboard-card-footer {
    padding: 0.3rem 0.5rem;
    font-size: 0.65rem;
    line-height: 1.2;
  }

  /* Mobile Container padding */
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Mobile Row margins */
  .row {
    margin-left: -0.375rem;
    margin-right: -0.375rem;
  }

  .row > [class*="col-"] {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
  }

  /* Mobile card spacing */
  .mb-4 {
    margin-bottom: 1rem;
  }

  .mb-3 {
    margin-bottom: 0.75rem;
  }

  /* Dashboard heading - more compact */
  .display-6 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .display-6 i {
    margin-right: 0.25rem;
  }

  /* Welcome text - smaller */
  p.text-muted {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  /* Table responsive on mobile */
  .table-responsive {
    font-size: 0.75rem;
  }

  .table th,
  .table td {
    padding: 0.4rem 0.25rem;
    vertical-align: middle;
  }

  .table thead th {
    font-weight: 600;
    font-size: 0.7rem;
  }

  /* Chart containers - adjust height for mobile */
  canvas {
    max-height: 200px !important;
  }

  /* Order summary stats - single column layout */
  .order-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
  }

  .stat-item .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }

  .stat-item .stat-text {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
  }

  .stat-item .stat-count {
    font-size: 1.25rem;
    font-weight: 700;
  }

  /* List group items on mobile */
  .list-group-item {
    padding: 0.75rem;
  }

  .list-group-item h6 {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }

  .list-group-item p {
    font-size: 0.7rem;
    margin-bottom: 0 !important;
  }

  .list-group-item .badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
  }
}

/* Extra small phones - ultra compact */
@media (max-width: 500px) {
  .dashboard-card {
    margin-bottom: 0.4rem;
    border-radius: 6px;
  }

  .dashboard-card-header {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
    gap: 0.3rem;
  }

  .dashboard-card-header i {
    font-size: 0.85rem;
  }

  .dashboard-card-body {
    padding: 0.6rem 0.4rem;
  }

  .stat-number {
    font-size: 1.5rem;
    margin: 0.2rem 0;
  }

  .stat-label {
    font-size: 0.65rem;
    margin-top: 0.15rem;
  }

  .dashboard-card-footer {
    padding: 0.25rem 0.4rem;
    font-size: 0.6rem;
  }

  /* Date range filter - even more compact */
  .filter-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
  }

  /* Heading compression */
  .display-6 {
    font-size: 1.1rem;
  }

  p.text-muted {
    font-size: 0.7rem;
  }

  /* Order stats - 2x2 grid remains compact */
  .order-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .stat-item {
    padding: 0.35rem;
  }

  .stat-item .stat-icon {
    font-size: 1.25rem;
    margin-bottom: 0.15rem;
  }

  .stat-item .stat-text {
    font-size: 0.65rem;
  }

  .stat-item .stat-count {
    font-size: 1.1rem;
  }

  .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .row > [class*="col-"] {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}

