/* =========================================================
   Custom Overrides – School Management System
   Purpose: Project-specific UI rules only
   Modern, efficient, and beautiful design
   ========================================================= */

/* =========================================================
   Inter Font – Local Import
   ========================================================= */

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}


/* ---------------------------------------------------------
   1. Typography – Clean & Readable
   --------------------------------------------------------- */

:root {
  /* --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; */
  --bs-body-font-family: "Inter", sans-serif;
  --bs-body-font-size: 0.9375rem;
  --bs-body-line-height: 1.6;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
  text-rendering: optimizeLegibility;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--theme-text-main);
}

/* Links */
a {
  color: var(--theme-text-link);
  text-decoration: none;
  transition: color var(--theme-transition-fast);
}

a:hover {
  color: var(--theme-text-link-hover);
}

/* Selection */
::selection {
  background-color: var(--theme-primary-soft);
  color: var(--theme-primary);
}


/* ---------------------------------------------------------
   2. Layout Adjustments
   --------------------------------------------------------- */

@media (min-width: 1200px) {
  .burger-btn {
    display: none !important;
  }
}

#main #main-content{
  padding: 1.5rem 2rem;
  background-color: var(--theme-bg-page);
  min-height: calc(100vh - 60px);
}

#main-dash #main-content {
  padding: 2.5rem;
  background-color: var(--theme-bg-page);
  min-height: calc(100vh - 60px);
}

/* Keep module navigation viewport-bound while allowing long menus to scroll. */
#app {
  min-height: 100vh;
  min-height: 100dvh;
}

#sidebar .sidebar-wrapper {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#sidebar .sidebar-header {
  flex: 0 0 auto;
}

#sidebar .sidebar-menu {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

#main,
#main-dash,
#main-content {
  min-height: 100vh;
  min-height: 100dvh;
}


/* Content width constraint for readability */
.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
}


/* ---------------------------------------------------------
   3. Cards – Primary Content Surface
   --------------------------------------------------------- */

.card {
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-lg);
  background-color: var(--theme-bg-card);
  box-shadow: var(--theme-shadow-card);
  overflow: hidden;
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--theme-border-light);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header .card-title {
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

/* Stat cards */
.card-stat {
  border-left: 4px solid var(--theme-primary);
}

.card-stat.success {
  border-left-color: var(--theme-success);
}

.card-stat.warning {
  border-left-color: var(--theme-warning);
}

.card-stat.danger {
  border-left-color: var(--theme-danger);
}

.card-stat .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--theme-text-main);
}

.card-stat .stat-label {
  font-size: 0.8125rem;
  color: var(--theme-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
}


/* ---------------------------------------------------------
   4. Tables – Admin-Friendly & Dense
   --------------------------------------------------------- */

.table {
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.table thead th {
  background-color: var(--theme-bg-hover);
  color: var(--theme-text-secondary);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--theme-border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table tbody tr {
  transition: background-color var(--theme-transition-fast);
}

.table tbody tr:hover {
  background-color: var(--theme-primary-softer);
}

.table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--theme-border-light);
  color: var(--theme-text-secondary);
}

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

/* Zebra striping (subtle) */
.table-striped tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.015);
}

/* Table links */
.table td a {
  font-weight: 500;
  /* color: var(--theme-primary); */
}

.table td a:hover {
  color: var(--theme-primary-hover);
  text-decoration: underline;
}

/* Action column */
.table td.actions,
.table th.actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.table td.actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.table td.actions .btn + .btn {
  margin-left: 0.25rem;
}

/* Dense table variant */
.table-dense thead th {
  padding: 0.5rem 0.75rem;
  font-size: 0.625rem;
}

.table-dense tbody td {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

/* Responsive table wrapper */
.table-responsive {
  border-radius: var(--theme-radius-lg);
  margin: -1px;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--theme-border);
  border-radius: var(--theme-radius-full);
}


/* ---------------------------------------------------------
   5. Status Badges – Semantic & Clear
   --------------------------------------------------------- */

.badge {
  font-weight: 500;
  font-size: 0.6875rem;
  padding: 0.35em 0.65em;
  border-radius: var(--theme-radius-full);
  letter-spacing: 0.02em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: var(--theme-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-badge.active,
.status-badge.success {
  background-color: var(--theme-success-bg);
  color: var(--theme-success);
}

.status-badge.inactive,
.status-badge.muted {
  background-color: var(--theme-bg-active);
  color: var(--theme-text-muted);
}

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

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

.status-badge.info {
  background-color: var(--theme-info-bg);
  color: var(--theme-info);
}

/* Dot indicator */
.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}


/* ---------------------------------------------------------
   6. Sidebar Polish – Compact & Dense
   --------------------------------------------------------- */

.sidebar-wrapper .sidebar-menu {
  padding: 0.25rem 0;
}

.sidebar-wrapper .sidebar-menu .sidebar-link {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.3;
  border-radius: var(--theme-radius-sm);
  display: flex;
  align-items: center;
}

.sidebar-wrapper .sidebar-menu .sidebar-item {
  margin: 0;
}

.sidebar-wrapper .sidebar-title {
  padding: 0.5rem 0.75rem 0.2rem;
  margin-top: 0.125rem;
  margin-bottom: 0;
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.sidebar-wrapper .sidebar-menu .submenu .submenu-link {
  padding: 0.3rem 0.75rem 0.3rem 2rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-wrapper .sidebar-menu .submenu .submenu-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-wrapper .sidebar-menu .submenu .submenu-item.active .submenu-link {
  color: #fff;
  background: rgba(37, 99, 235, 0.15);
}

.sidebar-link i,
.sidebar-link svg {
  font-size: 1rem;
  width: 1.25rem;
  margin-right: 0.5rem;
  opacity: 0.85;
  flex-shrink: 0;
}

.sidebar-item.active > .sidebar-link i,
.sidebar-item.active > .sidebar-link svg {
  opacity: 1;
  color: var(--theme-primary);
}

.sidebar-link:hover i,
.sidebar-link:hover svg {
  opacity: 1;
}

/* Remove the old left indicator, using right indicator from theme.css */
.sidebar-wrapper .sidebar-menu .sidebar-item.active > .sidebar-link::before {
  display: none;
}

.sidebar-wrapper .sidebar-menu .sidebar-link:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: -2px;
}

/* Submenu indicator */
.sidebar-link[data-bs-toggle]::after {
  font-size: 0.625rem;
  opacity: 0.5;
  margin-left: auto;
}

/* Sidebar badge styling */
.sidebar-link .badge {
  font-size: 0.5625rem;
  padding: 0.2em 0.5em;
  margin-left: auto;
  background: rgba(37, 99, 235, 0.3);
  color: #93c5fd;
}


/* ---------------------------------------------------------
   7. Page Header
   --------------------------------------------------------- */

.page-heading {
  margin-bottom: 1.5rem;
}

.page-title {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.125rem;
  color: var(--theme-text-main);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--theme-text-muted);
  margin-bottom: 0;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.page-actions .btn {
  white-space: nowrap;
}


/* ---------------------------------------------------------
   8. Filter Row (List Pages)
   --------------------------------------------------------- */

.card .card-header.filter-row {
  background-color: var(--theme-bg-card);
  border-bottom: 1px solid var(--theme-border);
  padding: 1rem 1.25rem;
}

.filter-row .form-control,
.filter-row .form-select {
  height: 38px;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--theme-radius-md);
  border-color: var(--theme-border);
  transition: border-color var(--theme-transition-fast), 
              box-shadow var(--theme-transition-fast);
}

.filter-row .form-control:focus,
.filter-row .form-select:focus {
  border-color: var(--theme-primary);
  box-shadow: var(--theme-shadow-focus);
}

.filter-row .row {
  gap: 0.75rem;
}

.filter-row .form-check {
  margin-top: 0.375rem;
}

.filter-row .form-check-input {
  cursor: pointer;
  width: 1rem;
  height: 1rem;
}

.filter-row .form-check-input:checked {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
}

.filter-row .form-check-label {
  font-size: 0.875rem;
  color: var(--theme-text-secondary);
  cursor: pointer;
}

.filter-row ::placeholder {
  color: var(--theme-text-placeholder);
}


/* ---------------------------------------------------------
   9. Form Elements – Modern & Clean
   --------------------------------------------------------- */

.form-control,
.form-select {
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--theme-radius-md);
  border: 1px solid var(--theme-border);
  background-color: var(--theme-bg-card);
  color: var(--theme-text-main);
  transition: border-color var(--theme-transition-fast),
              box-shadow var(--theme-transition-fast);
}

.form-control:hover,
.form-select:hover {
  border-color: var(--theme-text-placeholder);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--theme-primary);
  box-shadow: var(--theme-shadow-focus);
  outline: none;
}

.form-control:disabled,
.form-select:disabled {
  background-color: var(--theme-bg-active);
  color: var(--theme-text-disabled);
  cursor: not-allowed;
}

.form-control::placeholder {
  color: var(--theme-text-placeholder);
}

/* Select arrow */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2364748b' d='M7.247 11.14 2.451 5.658c-.566-.647-.106-1.658.753-1.658h9.592c.86 0 1.32 1.01.753 1.658L8.753 11.14a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-size: 12px;
  padding-right: 2.25rem;
}

/* Form labels */
.form-label {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--theme-text-secondary);
  margin-bottom: 0.375rem;
}

/* Required indicator */
.form-label.required::after {
  content: " *";
  color: var(--theme-danger);
}

/* Form text / help */
.form-text {
  font-size: 0.75rem;
  color: var(--theme-text-muted);
  margin-top: 0.25rem;
}

/* Input groups */
.input-group .form-control,
.input-group .form-select {
  border-radius: var(--theme-radius-md);
}

.input-group-text {
  background-color: var(--theme-bg-hover);
  border-color: var(--theme-border);
  color: var(--theme-text-muted);
  font-size: 0.875rem;
}


/* ---------------------------------------------------------
   10. Pagination – Compact & Clear
   --------------------------------------------------------- */

.card-footer {
  background-color: var(--theme-bg-card);
  border-top: 1px solid var(--theme-border-light);
  padding: 0.75rem 1.25rem;
}

.pagination {
  margin-bottom: 0;
  gap: 0.25rem;
}

.pagination .page-item .page-link {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: var(--theme-radius-md);
  border: 1px solid var(--theme-border);
  color: var(--theme-text-secondary);
  background-color: var(--theme-bg-card);
  transition: all var(--theme-transition-fast);
}

.pagination .page-item .page-link:hover {
  background-color: var(--theme-primary-soft);
  border-color: var(--theme-primary);
  color: var(--theme-primary);
}

.pagination .page-item.active .page-link {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: var(--theme-text-inverse);
}

.pagination .page-item.disabled .page-link {
  background-color: var(--theme-bg-hover);
  color: var(--theme-text-disabled);
  border-color: var(--theme-border);
}

.pagination-summary {
  font-size: 0.8125rem;
  color: var(--theme-text-muted);
}

.pagination-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.pagination-nav {
  min-width: 0;
}

.pagination-shell .pagination {
  flex-wrap: wrap;
}

.list-page-shell--bare {
  display: grid;
  gap: var(--theme-space-lg);
}

.list-page-bare-filters,
.list-page-bare-content {
  min-width: 0;
}


/* ---------------------------------------------------------
   11. Empty States
   --------------------------------------------------------- */

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--theme-text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  color: var(--theme-text-placeholder);
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--theme-text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  font-size: 0.875rem;
  max-width: 400px;
  margin: 0 auto;
}

.empty-state-action {
  margin-top: 1.5rem;
}


/* ---------------------------------------------------------
   12. Utility Classes
   --------------------------------------------------------- */

/* Text utilities */
.text-primary { color: var(--theme-primary) !important; }
.text-success { color: var(--theme-success) !important; }
.text-warning { color: var(--theme-warning) !important; }
.text-danger { color: var(--theme-danger) !important; }
.text-muted { color: var(--theme-text-muted) !important; }

/* Background utilities */
.bg-primary-soft { background-color: var(--theme-primary-soft) !important; }
.bg-success-soft { background-color: var(--theme-success-soft) !important; }
.bg-warning-soft { background-color: var(--theme-warning-soft) !important; }
.bg-danger-soft { background-color: var(--theme-danger-soft) !important; }

/* Border utilities */
.border-primary { border-color: var(--theme-primary) !important; }
.border-success { border-color: var(--theme-success) !important; }
.border-warning { border-color: var(--theme-warning) !important; }
.border-danger { border-color: var(--theme-danger) !important; }

/* Prevent text selection on icons */
.bi, [class^="bi-"] {
  user-select: none;
}

/* Truncate text */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Divider */
.divider {
  height: 1px;
  background-color: var(--theme-border);
  margin: 1rem 0;
}

/* Loading spinner */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--theme-border);
  border-top-color: var(--theme-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--theme-bg-hover) 25%,
    var(--theme-bg-active) 50%,
    var(--theme-bg-hover) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--theme-radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ---------------------------------------------------------
   13. Responsive Adjustments
   --------------------------------------------------------- */

/* Reusable compact patterns for dashboards, lists, details, and workflows */
.mobile-metric-grid,
[class*="metric-grid"],
[class*="metrics-grid"],
[class*="summary-grid"],
[class*="stats-grid"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--theme-space-sm);
}

.mobile-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--theme-space-sm);
}

.mobile-priority-actions {
  order: 1;
}

.mobile-priority-status {
  order: 2;
}

.mobile-priority-details {
  order: 3;
}

.mobile-help-card {
  overflow: hidden;
}

.mobile-help-toggle {
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.mobile-help-toggle:hover,
.mobile-help-toggle:focus-visible {
  text-decoration: underline;
}

/* Reusable mobile metric anti-stretch utilities */
@media (max-width: 575.98px) {
  .mobile-no-flex-grow {
    flex: 0 0 auto !important;
    width: 100% !important;
  }

  .mobile-grid-auto-rows {
    align-items: start !important;
    align-content: start !important;
    grid-auto-rows: minmax(0, auto) !important;
  }

  .mobile-stat-compact {
    min-height: 0 !important;
    height: auto !important;
    align-self: start !important;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.6rem;
  }
}

@media (max-width: 991.98px) {
  #main #main-content, #main-dash #main-content {
    padding: 1rem;
  }
  
  .page-title {
    font-size: 1.25rem;
  }
  
  .table thead th {
    font-size: 0.625rem;
    padding: 0.625rem 0.75rem;
  }
  
  .table tbody td {
    padding: 0.625rem 0.75rem;
  }
}

@media (max-width: 575.98px) {
  #main #main-content,
  #main-dash #main-content {
    padding: 0.75rem;
  }

  .dashboard-container {
    padding: 0.25rem;
  }

  .page-heading {
    margin-bottom: 0.875rem;
  }

  .page-title {
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .page-subtitle {
    font-size: 0.8rem;
  }

  .page-actions-wrap {
    position: sticky;
    top: 0.35rem;
    z-index: 9;
    /* background: rgba(248, 250, 252, 0.92); */
    border-radius: var(--theme-radius-md);
    padding: 0.375rem;
    backdrop-filter: blur(4px);
  }

  .page-actions {
    gap: 0.375rem;
  }

  .page-actions .btn,
  .btn-group .btn {
    min-height: 44px;
  }

  .card {
    border-radius: var(--theme-radius-md);
  }

  .card-header {
    padding: 0.65rem 0.8rem;
    min-height: 0;
  }

  .card-body,
  .card-footer {
    padding: 0.75rem;
  }

  .card-body p:last-child,
  .card-body .mb-4,
  .card-body .mb-3 {
    margin-bottom: 0.5rem !important;
  }

  .card-stat,
  [class*="stat-card"],
  [class*="summary-card"],
  [class*="metric-card"] {
    padding: 0.65rem 0.75rem;
    min-height: 0;
    border-radius: var(--theme-radius-md);
  }

  .card-stat .stat-value,
  [class*="stat-card"] [class*="value"],
  [class*="summary-card"] [class*="value"],
  [class*="metric-card"] [class*="value"] {
    font-size: clamp(1rem, 5.5vw, 1.35rem);
    line-height: 1.1;
    margin-bottom: 0.15rem;
  }

  .card-stat .stat-label,
  [class*="stat-card"] [class*="label"],
  [class*="summary-card"] [class*="label"],
  [class*="metric-card"] [class*="label"] {
    font-size: 0.68rem;
    line-height: 1.25;
    letter-spacing: 0.03em;
  }

  .mobile-metric-grid,
  .mobile-summary-strip,
  [class*="metric-grid"],
  [class*="metrics-grid"],
  [class*="summary-grid"],
  [class*="stats-grid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .mobile-help-card.is-collapsed .card-body {
    display: none;
  }

  .mobile-help-card .card-header {
    gap: 0.5rem;
  }

  .mobile-help-card .mobile-help-toggle {
    margin-left: auto;
    white-space: nowrap;
  }

  .table {
    font-size: 0.79rem;
  }

  .table thead th {
    padding: 0.5rem 0.55rem;
    font-size: 0.6rem;
  }

  .table tbody td {
    padding: 0.5rem 0.55rem;
    line-height: 1.35;
  }

  .table .btn,
  .table .btn-group .btn {
    min-height: 40px;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
  }

  .form-control,
  .form-select {
    min-height: 44px;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }

  .page-heading .row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .page-actions {
    width: 100%;
  }
  
  .page-actions .btn {
    flex: 1;
  }
  
  .filter-row .form-control,
  .filter-row .form-select {
    width: 100%;
  }

  .pagination-shell {
    flex-direction: column;
    align-items: stretch;
  }

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

  .pagination-shell .pagination {
    justify-content: center;
  }
}

@media (min-width: 420px) and (max-width: 575.98px) {
  .mobile-metric-grid,
  .mobile-summary-strip,
  [class*="metric-grid"],
  [class*="metrics-grid"],
  [class*="summary-grid"],
  [class*="stats-grid"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ---------------------------------------------------------
   14. Animations & Transitions
   --------------------------------------------------------- */

/* Fade in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn var(--theme-transition-slow) ease-out;
}

/* Pulse animation for notifications */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Hover lift effect */
.hover-lift {
  transition: transform var(--theme-transition-base), 
              box-shadow var(--theme-transition-base);
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-md);
}

/* ── Global button size: default all buttons to Bootstrap sm ──────────── */
.btn:not(.btn-lg):not(.btn-sm) {
  padding: var(--bs-btn-padding-y, 0.25rem) var(--bs-btn-padding-x, 0.5rem);
  font-size: var(--bs-btn-font-size, 0.875rem);
  border-radius: var(--bs-btn-border-radius, 0.25rem);
}
