/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 *
 * The Litera theme (litera.css) is automatically included via stylesheet_link_tag :app
 * which loads all CSS files in this directory.
 */

/* ============================================
   Dark Header Bar (Stacker Jr. style)
   ============================================ */
.app-header {
  background-color: #343a40;
  color: #ffffff;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 0;
}

.app-header .container-xl {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-brand {
  flex-shrink: 0;
  margin-right: 3rem;
}

.app-brand .brand-link {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}

.app-brand .brand-link:hover {
  color: #f8f9fa;
  text-decoration: none;
}

.app-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex: 1;
  justify-content: flex-end;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2.5rem;
  align-items: center;
}

/* Ensure navigation is visible on desktop */
@media (min-width: 992px) {
  .app-nav .navbar-collapse {
    display: flex !important;
    visibility: visible !important;
    height: auto !important;
  }

  .app-nav .navbar-collapse.collapse {
    display: flex !important;
  }

  .nav-menu {
    display: flex !important;
  }

  .app-nav .navbar-toggler {
    display: none !important;
  }
}

.nav-menu .nav-item {
  margin: 0;
}

.nav-menu .nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-menu .nav-link:hover,
.nav-menu .nav-link.active {
  color: #f8f9fa;
  text-decoration: none;
}

.nav-menu .nav-link.dropdown-toggle::after {
  border-top-color: #ffffff;
}

.app-header .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.25rem 0.5rem;
}

.app-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.app-header .dropdown-menu {
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.app-header .dropdown-item {
  color: #212529;
}

.app-header .dropdown-item:hover,
.app-header .dropdown-item.active {
  background-color: #f8f9fa;
  color: #212529;
}

/* ============================================
   Main Content Area
   ============================================ */
.app-main {
  background-color: #f5f5f5;
  min-height: calc(100vh - 80px);
  padding: 2rem 0;
}

.content-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
  padding: 0;
}

.page-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
  color: #212529;
}

/* ============================================
   Stat Cards
   ============================================ */
.stat-card {
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  margin-bottom: 1rem;
}

.stat-body {
  padding: 1.5rem 1rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #212529;
  margin: 0;
}

/* ============================================
   Data Tables (Stacker Jr. style)
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
}

.data-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #495057;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table th.text-center {
  text-align: center;
}

/* Modal Styles for Idle Timeout */
.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-dialog {
  position: relative;
  width: auto;
  max-width: 500px;
  margin: 1.75rem auto;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 3.5rem);
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
  outline: 0;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(0.3rem - 1px);
  border-top-right-radius: calc(0.3rem - 1px);
}

.modal-header.bg-warning {
  background-color: #ffc107;
  color: #000;
}

.modal-title {
  margin-bottom: 0;
  line-height: 1.5;
  font-size: 1.25rem;
  font-weight: 500;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
  border-bottom-right-radius: calc(0.3rem - 1px);
  border-bottom-left-radius: calc(0.3rem - 1px);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.modal-backdrop.show {
  opacity: 0.5;
}

body.modal-open {
  overflow: hidden;
}

.data-table td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #dee2e6;
  color: #212529;
  vertical-align: top;
}

.data-table td.text-center {
  text-align: center;
}

.data-table tbody tr:hover {
  background-color: #f8f9fa;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Report summary rows */
.data-table tbody tr.table-secondary {
  background-color: #e9ecef;
  font-weight: 600;
}

.data-table tbody tr.table-secondary td {
  border-top: 2px solid #dee2e6;
  border-bottom: 2px solid #dee2e6;
  padding: 0.5rem 1rem;
  vertical-align: middle;
}

/* Report footer (grand total) */
.data-table tfoot {
  background-color: #212529;
  color: #ffffff;
}

.data-table tfoot tr {
  font-weight: 700;
}

.data-table tfoot td {
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  vertical-align: middle;
}

/* Table header links (blue, clickable) */
.table-header-link {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  white-space: nowrap;
}

.table-header-link:hover {
  color: #0a58ca;
  text-decoration: underline;
}

/* Active sorted column styling */
.table-header-link.sorted {
  color: #0a58ca;
  font-weight: 700;
}

.table-header-link.sorted:hover {
  color: #084298;
}

.sort-indicator {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: normal;
  display: inline-block;
  min-width: 1.25rem;
  margin-left: 0.25rem;
  opacity: 0.7;
}

.table-header-link:hover .sort-indicator {
  opacity: 1;
  color: #0d6efd;
}

.table-header-link.sorted .sort-indicator {
  color: #0a58ca;
  font-weight: 700;
  opacity: 1;
}

/* Center-aligned sortable headers */
.data-table th.text-center .table-header-link {
  justify-content: center;
}

/* Table data links */
.table-data-link {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
}

.table-data-link:hover {
  color: #0a58ca;
  text-decoration: underline;
}

/* ============================================
   Action Buttons (Stacker Jr. style)
   ============================================ */
.btn-view {
  background-color: #0d6efd !important;
  color: #ffffff !important;
  border: 1px solid #0d6efd !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  display: inline-block;
  transition: all 0.2s ease;
  margin-right: 0.5rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  min-width: 70px;
  text-align: center;
  opacity: 1 !important;
}

.btn-view:hover {
  background-color: #0a58ca !important;
  border-color: #0a58ca !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
  transform: translateY(-1px);
  opacity: 1 !important;
}

.btn-view:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  opacity: 1 !important;
}

.btn-view:visited {
  color: #ffffff !important;
  background-color: #0d6efd !important;
  opacity: 1 !important;
}

.btn-edit {
  background-color: #198754 !important;
  color: #ffffff !important;
  border: 1px solid #198754 !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  min-width: 70px;
  text-align: center;
  opacity: 1 !important;
}

.btn-edit:hover {
  background-color: #157347 !important;
  border-color: #157347 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(25, 135, 84, 0.3);
  transform: translateY(-1px);
  opacity: 1 !important;
}

.btn-edit:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  opacity: 1 !important;
}

.btn-edit:visited {
  color: #ffffff !important;
  background-color: #198754 !important;
  opacity: 1 !important;
}

.btn-delete {
  background-color: #dc3545 !important;
  color: #ffffff !important;
  border: 1px solid #dc3545 !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  min-width: 70px;
  text-align: center;
  opacity: 1 !important;
}

.btn-delete:hover {
  background-color: #bb2d3b !important;
  border-color: #bb2d3b !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
  transform: translateY(-1px);
  opacity: 1 !important;
}

.btn-delete:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  opacity: 1 !important;
}

.btn-delete:visited {
  color: #ffffff !important;
  background-color: #dc3545 !important;
  opacity: 1 !important;
}

/* Button group for action buttons */
.data-table .btn-group {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

/* ============================================
   Pagination (Stacker Jr. style)
   ============================================ */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  padding: 1rem 0;
}

.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination li {
  margin: 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  background-color: #ffffff;
  min-width: 2.5rem;
  text-align: center;
}

.pagination a:hover {
  background-color: #0d6efd;
  color: #ffffff;
  border-color: #0d6efd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.pagination .current {
  background-color: #0d6efd !important;
  color: #ffffff !important;
  border-color: #0d6efd !important;
  font-weight: 600;
  cursor: default;
}

.pagination .disabled a,
.pagination .disabled span {
  color: #6c757d;
  background-color: #f8f9fa;
  border-color: #dee2e6;
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination .disabled a:hover {
  background-color: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
  transform: none;
  box-shadow: none;
}

.pagination .page {
  margin: 0 0.25rem;
}

.pagination .prev,
.pagination .next {
  font-weight: 600;
  padding: 0.5rem 1rem;
}

.pagination .prev a,
.pagination .next a {
  min-width: auto;
  padding: 0.5rem 1rem;
}

.btn-danger.btn-sm {
  background-color: #dc3545;
  color: #ffffff;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s;
}

.btn-danger.btn-sm:hover {
  background-color: #bb2d3b;
  color: #ffffff;
  text-decoration: none;
}

/* Mobile responsiveness for header */
@media (max-width: 991px) {
  .app-header {
    padding: 0.75rem 0;
  }

  .app-brand .brand-link {
    font-size: 1.25rem;
  }

  /* Navbar collapse - full screen overlay on mobile */
  .app-header .navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #343a40;
    z-index: 1050;
    padding: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    max-height: 100vh;
  }

  .app-header .navbar-collapse.show {
    transform: translateX(0);
  }

  .app-header .nav-menu {
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 3.5rem 0 1rem 0;
    margin: 0;
    list-style: none;
  }

  .app-header .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .app-header .nav-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .app-header .nav-link {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
    width: 100%;
  }

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

  /* Close button for mobile menu */
  .app-header .mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: transparent;
    z-index: 1051;
    padding: 0;
    line-height: 1;
  }

  .app-header .mobile-menu-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  /* Dropdown toggle styling on mobile */
  .app-header .dropdown-toggle {
    justify-content: space-between;
    position: relative;
  }

  .app-header .dropdown-toggle::after {
    margin-left: auto;
    margin-top: 0.25rem;
    transition: transform 0.2s ease;
  }

  .app-header .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
  }

  /* Dropdown menu on mobile - always visible when parent has show class */
  .app-header .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin-top: 0;
    box-shadow: none;
    border: none;
    background-color: rgba(0, 0, 0, 0.2);
    display: none;
    /* Hidden by default */
  }

  .app-header .dropdown.show .dropdown-menu {
    display: block;
  }

  .app-header .dropdown-item {
    color: #ffffff;
    padding: 0.75rem 2rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .app-header .dropdown-item:last-child {
    border-bottom: none;
  }

  .app-header .dropdown-item:hover,
  .app-header .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
  }
}

/* Mobile and Small Tablet Responsive Styles (phones, small tablets) */
@media (max-width: 767px) {

  /* Page header adjustments */
  .page-header {
    padding: 0.75rem 0;
    margin: 0;
  }

  .page-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
  }

  /* Compact header layout for reports */
  .page-header .d-flex.flex-column {
    gap: 0.75rem !important;
  }

  .page-header .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  /* Search form - stack vertically on mobile */
  .page-header .d-flex.gap-2 {
    flex-direction: column;
    width: 100%;
  }

  .page-header .form-control {
    width: 100% !important;
    margin-bottom: 0.5rem;
  }

  .page-header .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  /* Hide stat cards on mobile (save space) */
  .stat-card {
    display: none;
  }

  /* Tables - make horizontally scrollable on mobile */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
    position: relative;
    width: calc(100% + 2rem);
    max-width: 100vw;
  }

  .data-table {
    font-size: 0.75rem;
    min-width: 650px;
    /* Force horizontal scroll for wide tables */
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
    font-size: 0.75rem;
  }

  .data-table th {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.6rem 0.6rem;
    letter-spacing: 0.02em;
  }

  /* Add spacing between table headers */
  .data-table th {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .data-table th:first-child {
    padding-left: 0.5rem;
  }

  .data-table th:last-child {
    padding-right: 0.5rem;
  }

  /* Optimize column widths for reports on mobile */
  .data-table th:first-child,
  .data-table td:first-child {
    min-width: 70px;
    max-width: 100px;
  }

  .data-table th:nth-child(2),
  .data-table td:nth-child(2) {
    min-width: 90px;
    max-width: 130px;
  }

  .data-table th:nth-child(3),
  .data-table td:nth-child(3) {
    min-width: 70px;
    max-width: 100px;
  }

  .data-table th:nth-child(4),
  .data-table td:nth-child(4),
  .data-table th:nth-child(5),
  .data-table td:nth-child(5) {
    min-width: 55px;
    max-width: 70px;
  }

  .data-table th:nth-child(6),
  .data-table td:nth-child(6) {
    min-width: 80px;
    max-width: 110px;
  }

  /* Additional columns for wine purchases table (8 columns) */
  .data-table th:nth-child(7),
  .data-table td:nth-child(7) {
    min-width: 80px;
    max-width: 120px;
  }

  .data-table th:nth-child(8),
  .data-table td:nth-child(8) {
    min-width: 100px;
    max-width: 140px;
  }

  /* Increase min-width for tables with 8 columns (wine purchases) */
  .wine-purchases-table {
    min-width: 850px;
  }

  /* Specific column widths for wine purchases table */
  .wine-purchases-table th:first-child,
  .wine-purchases-table td:first-child {
    min-width: 90px;
    max-width: 110px;
  }

  .wine-purchases-table th:nth-child(2),
  .wine-purchases-table td:nth-child(2) {
    min-width: 110px;
    max-width: 150px;
  }

  .wine-purchases-table th:nth-child(3),
  .wine-purchases-table td:nth-child(3) {
    min-width: 80px;
    max-width: 100px;
  }

  .wine-purchases-table th:nth-child(4),
  .wine-purchases-table td:nth-child(4) {
    min-width: 60px;
    max-width: 80px;
  }

  .wine-purchases-table th:nth-child(5),
  .wine-purchases-table td:nth-child(5) {
    min-width: 75px;
    max-width: 100px;
  }

  .wine-purchases-table th:nth-child(6),
  .wine-purchases-table td:nth-child(6) {
    min-width: 70px;
    max-width: 90px;
  }

  .wine-purchases-table th:nth-child(7),
  .wine-purchases-table td:nth-child(7) {
    min-width: 80px;
    max-width: 120px;
  }

  .wine-purchases-table th:nth-child(8),
  .wine-purchases-table td:nth-child(8) {
    min-width: 120px;
    max-width: 160px;
  }

  /* Truncate long text in cells with ellipsis */
  .data-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }

  /* Tasting notes row - allow wrapping on mobile */
  .data-table td[colspan] {
    white-space: normal;
    word-wrap: break-word;
    max-width: none;
    padding-left: 1rem !important;
    font-size: 0.7rem;
  }

  /* Buttons in tables - smaller on mobile */
  .data-table .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .data-table .btn-group {
    flex-direction: column;
    gap: 0.25rem;
  }

  /* Cards - full width, better spacing */
  .card {
    margin-bottom: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  /* Forms - full width inputs */
  .form-control,
  .form-select {
    width: 100%;
    font-size: 16px;
    /* Prevents zoom on iOS */
  }

  /* Buttons - full width on mobile for better touch targets */
  .btn {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-height: 44px;
    /* iOS touch target minimum */
  }

  /* Content card padding */
  .content-card {
    padding: 1rem;
  }

  /* Container padding */
  .container-xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Modal adjustments */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .modal-content {
    border-radius: 0.5rem;
  }

  .modal-body {
    padding: 1rem;
    font-size: 0.95rem;
  }

  /* Pagination - smaller on mobile */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pagination a,
  .pagination span {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
    min-width: 2rem;
  }
}

/* Tablet Responsive Styles (iPad, small tablets in portrait) */
@media (min-width: 768px) and (max-width: 991px) {

  /* Tables - still scrollable but with more space */
  .data-table {
    font-size: 0.9rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.6rem 0.85rem;
  }

  /* Stat cards - show but smaller */
  .stat-card {
    margin-bottom: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  /* Search form - can be side by side on tablet */
  .page-header .form-control {
    width: auto;
    min-width: 180px;
  }
}

/* iPad Pro 13" and larger screen optimizations */
@media (min-width: 1200px) {

  /* Better spacing for large screens */
  .container-xl {
    max-width: 1400px;
  }

  /* Larger, more readable tables on big screens */
  .table {
    font-size: 1rem;
  }

  .table th,
  .table td {
    padding: 0.75rem 1rem;
  }

  /* Better card spacing */
  .card {
    margin-bottom: 1.5rem;
  }

  /* Optimize form field sizes for large screens */
  .form-control,
  .form-select {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
  }

  /* Better button sizing */
  .btn {
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
  }

  /* Summary cards on index page */
  .card-body h3 {
    font-size: 2rem;
  }

  .card-body h5 {
    font-size: 0.9rem;
  }
}

/* Extra large screens (iPad Pro 13" landscape, large desktops) */
@media (min-width: 1400px) {
  .container-xl {
    max-width: 1600px;
  }

  /* Even more spacing on very large screens */
  .table th,
  .table td {
    padding: 1rem 1.25rem;
  }
}