/* Admin Dashboard Styles */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --info-color: #3498db;
  --light-color: #ecf0f1;
  --dark-color: #34495e;
  --border-radius: 4px;
  --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

body {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  background-color: #f8f9fa;
}

/* Sidebar Styles */
.sidebar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  z-index: 1000;
}

.sidebar {
  min-height: 100vh;
  background-color: var(--dark-color);
  transition: all 0.3s ease;
}

.sidebar .nav-link {
  padding: 0.75rem 1.25rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.sidebar .nav-link:hover {
  color: rgba(255, 255, 255, 0.9);
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.2);
}

.sidebar .nav-link i {
  margin-right: 0.5rem;
  width: 20px;
  text-align: center;
}

.sidebar-header {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content Adjustment */
main {
  margin-left: 250px;
  padding: 1rem 2rem;
  transition: margin-left 0.3s ease-in-out;
}

.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 1.5rem;
}

.card-header {
  border-bottom: 1px solid #f0f0f0;
  background-color: #fff;
  font-weight: 500;
}

.card-footer {
  border-top: 1px solid #f0f0f0;
  background-color: #fff;
}

#stats-rows-index .card-footer {
  display: none !important;
}

/* Tables */
.table {
  margin-bottom: 0;
}

.table th {
  font-weight: 600;
  border-top: none;
}

.table td,
.table th {
  vertical-align: middle;
  padding: 0.75rem 1rem;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.015);
}

/* Forms */
.form-control {
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-color: #dce4ec;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

.btn {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #1a252f;
  border-color: #1a252f;
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.4em 0.6em;
}

/* Login Form */
.login-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Custom Utilities */
.icon-box {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.1);
}

/* Mobile Styles */
@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 250px;
    height: 100vh;
    z-index: 1040;
    transition: all 0.3s ease;
  }

  .sidebar.show {
    left: 0;
  }

  main {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 1rem !important;
  }

  /* Add overlay when sidebar is shown */
  .sidebar.show::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }

  #sidebarToggle {
    display: block;
  }

  .d-md-block {
    display: none !important;
  }

  .card {
    margin-bottom: 1rem;
  }

  .container-fluid {
    padding-bottom: 100px !important;
  }
}

/* Status Styling */
.status-badge {
  font-size: 85%;
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: 10rem;
}

.status-badge.success {
  background-color: var(--success-color);
  color: white;
}

.status-badge.warning {
  background-color: var(--warning-color);
  color: white;
}

.status-badge.danger {
  background-color: var(--danger-color);
  color: white;
}

/* Custom form styling */
.custom-form {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
}

.custom-form legend {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

/* Salary calculator styling */
.salary-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.salary-result {
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  margin-top: 1rem;
}

.salary-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Settings page */
.settings-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.settings-card h5 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

/* Custom switch */
.custom-switch {
  padding-left: 2.5rem;
}

.custom-switch .custom-control-label::before {
  left: -2.5rem;
  height: 1.25rem;
  width: 2.25rem;
  border-radius: 0.625rem;
}

.custom-switch .custom-control-label::after {
  top: calc(0.25rem + 2px);
  left: calc(-2.5rem + 2px);
  width: calc(1.25rem - 4px);
  height: calc(1.25rem - 4px);
  border-radius: 0.625rem;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
  transform: translateX(1rem);
}

/* Search box */
.search-box {
  position: relative;
}

.search-box .form-control {
  padding-left: 2.5rem;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  color: #adb5bd;
}

/* Date range picker for reports */
.date-filter {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* Print styling */
@media print {
  .sidebar,
  .btn,
  .no-print {
    display: none !important;
  }

  main {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  .table {
    width: 100% !important;
  }
}

/* Mobile Navigation - Base Styles (All Users) */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
}

.mobile-nav-items {
    display: flex; /* Default for non-admins */
    justify-content: space-around; /* Default for non-admins */
    align-items: center;
    padding: 0 1rem;
}

/* Scrolling Styles - ONLY for Admin User */
.mobile-nav.mobile-nav-admin {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Hide scrollbar visually but keep functionality */
.mobile-nav.mobile-nav-admin::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}
.mobile-nav.mobile-nav-admin {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.mobile-nav.mobile-nav-admin .mobile-nav-items {
    display: inline-flex; /* Use inline-flex for admin to allow overflow */
    justify-content: flex-start; /* Align items to the start when scrolling */
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6c757d;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.mobile-nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

.mobile-nav-item.active {
    color: #007bff;
}

.mobile-nav-item:hover {
    color: #0056b3;
}

/* Adjust main content padding for mobile nav */
@media (max-width: 767.98px) {
    .main-content {
        padding-bottom: 4rem;
    }
}

/* Add space for mobile nav bar */
.content-wrapper {
    padding-bottom: 80px !important;
}

.container {
    padding-bottom: 80px !important;
}

.main-content {
    padding-bottom: 80px !important;
}
