/* ============================================
   Poultry Pro - Admin Dashboard Stylesheet
   Laravel Edition - Version 3.0
   ============================================ */

:root {
  --primary: #2d5a3a;
  --primary-light: #3d7a4d;
  --primary-dark: #1e3320;
  --accent: #e8a838;
  --accent-light: #f5d078;
  --accent-dark: #c9922a;
  --danger: #dc3545;
  --success: #16a34a;
  --warning: #eab308;
  --info: #0891b2;
  --sidebar-bg: linear-gradient(180deg, #1a2e1c 0%, #152418 100%);
  --sidebar-bg-solid: #1a2e1c;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-width: 268px;
  --header-height: 56px;
  --breadcrumb-height: 38px;
  --app-header-offset: calc(var(--header-height) + var(--breadcrumb-height));
  --page-content-gap: 0.5rem;
  --fab-size: 56px;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --bg-light: #f0f4f1;
  --bg-white: #ffffff;
  --surface-elevated: #ffffff;
  --shadow-sm: 0 1px 3px rgb(15 23 42 / 0.06);
  --shadow-md: 0 4px 14px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 12px 28px rgb(15 23 42 / 0.1);
  --shadow-xl: 0 24px 48px rgb(15 23 42 / 0.12);
  --radius-sm: 0.5rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  background-color: var(--bg-light);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 90, 58, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(232, 168, 56, 0.06), transparent);
  font-family: var(--font-sans);
  margin: 0;
  padding-bottom: 70px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================
   LAYOUT - MAIN WRAPPER
   ============================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg-solid);
  background-image: var(--sidebar-bg);
  color: #e8f0e8;
  z-index: 1040;
  transition: left 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar.show {
  left: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1035;
  display: none;
}

.sidebar-overlay.show {
  display: block;
}

.sidebar-brand {
  padding: 1.35rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.sidebar-brand i {
  font-size: 1.75rem;
  color: var(--primary-dark);
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(232, 168, 56, 0.35);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.sidebar-section {
  padding: 0.5rem 0;
}

.sidebar-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.75rem 1.25rem 0.25rem;
  font-weight: 600;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  margin: 0.125rem 0.75rem;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.sidebar-menu a:hover {
  background: var(--sidebar-hover);
  color: white;
}

/* Active state - controlled by Blade */
.sidebar-menu a.active,
.sidebar-menu li.active > a {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-color: rgba(232, 168, 56, 0.35);
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 600;
}

.sidebar-menu i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.sidebar-nav {
  padding: 0.35rem 0 1rem;
}

.sidebar-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.75rem 1.25rem;
}

/* Desktop-only items (hidden on mobile sidebar) */
.sidebar-desktop-only {
  display: none;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.user-info-sidebar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.badge-count {
  background: var(--accent);
  color: #000;
  font-size: 0.7rem;
  padding: 0.2em 0.6em;
  border-radius: 1rem;
  font-weight: 700;
  margin-left: auto;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
  flex: 1;
  transition: margin-left 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 0;
  margin-top: 0;
  width: 100%;
  min-width: 0;
}

/* ============================================
   HEADER & BREADCRUMB (fixed — stays on top while scrolling)
   ============================================ */
.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
}

.dashboard-header {
  background: transparent;
  color: var(--text-primary);
  padding: 0 1.25rem;
  border-bottom: 3px solid var(--accent);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-title {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-dark);
  min-width: 0;
}

.header-title__icon {
  font-size: 1.65rem;
  color: var(--accent-dark);
  flex-shrink: 0;
  line-height: 1;
}

.header-title__text {
  white-space: nowrap;
  line-height: 1.2;
}

/* Phone / tablet: icon only in sticky header */
@media (max-width: 767.98px) {
  .header-title__text {
    display: none !important;
  }
}

/* Desktop: brand name only (no icon required, but keep compact) */
@media (min-width: 768px) {
  .header-title__icon {
    display: none;
  }
}

.menu-toggle {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--primary);
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.menu-toggle:hover {
  background: #e9f3e9;
  border-color: var(--primary-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
}

.header-actions .icon-btn:hover:not(:disabled) {
  background: #e9f3e9;
  color: var(--primary);
  border-color: rgba(45, 90, 58, 0.25);
}

.header-actions .icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#headerNotifBadge {
  font-size: 0.65rem;
  padding: 0.2em 0.45em;
  min-width: 1.1rem;
}

/* ============================================
   PWA INSTALL BANNER
   ============================================ */
.pwa-install-banner {
  position: fixed;
  bottom: 72px;
  left: 0;
  right: 0;
  z-index: 1045;
  padding: 0 0.75rem;
  pointer-events: none;
}

.pwa-install-inner {
  pointer-events: auto;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(232, 168, 56, 0.35);
}

.pwa-install-icon img {
  border-radius: 10px;
  display: block;
}

.pwa-install-close {
  text-decoration: none !important;
}

@media (min-width: 768px) {
  .pwa-install-banner {
    bottom: 1.25rem;
    left: auto;
    right: 1.25rem;
    width: 380px;
    padding: 0;
  }
}

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--bg-white);
}

/* Header user dropdown */
.header-user-dropdown .dropdown-toggle::after {
  margin-left: 0.35rem;
  vertical-align: 0.15em;
}

.header-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: var(--transition);
}

.header-user-btn:hover,
.header-user-btn:focus,
.header-user-btn.show {
  background: #e9f3e9;
  border-color: rgba(45, 90, 58, 0.25);
  color: var(--primary-dark);
}

.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.header-user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-dropdown .dropdown-menu {
  min-width: 220px;
  border-radius: var(--radius-md);
  border-color: var(--border-color);
  padding: 0.35rem 0;
}

.header-user-dropdown .dropdown-item {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.header-user-dropdown .dropdown-item i {
  opacity: 0.75;
}

.icon-btn.is-refreshing i {
  animation: header-spin 0.65s linear;
}

/* Settings page */
.settings-nav-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.settings-nav-link:hover {
  background: #e9f3e9;
  color: var(--primary-dark);
}

.settings-nav-link.active {
  background: #e9f3e9;
  color: var(--primary-dark);
  font-weight: 600;
}

.settings-panel .card-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
}

.settings-panel .card-header small {
  display: block;
  margin-top: 0.15rem;
}

.settings-toggle-list {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin: 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-white);
}

.settings-toggle-row:last-child {
  border-bottom: none;
}

.settings-toggle-row:hover {
  background: #fafcfa;
}

.settings-toggle-title {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.settings-toggle-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.settings-toggle-row .form-check-input {
  width: 2.5em;
  height: 1.25em;
  cursor: pointer;
}

@media (max-width: 991px) {
  .settings-nav.sticky-top {
    position: static !important;
  }

  .settings-nav .card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .settings-nav-link {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 0.8125rem;
    padding: 0.5rem 0.65rem;
  }
}

@keyframes header-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.breadcrumb-container {
  flex-shrink: 0;
  width: 100%;
  background: #f8faf9;
  border-top: 1px solid var(--border-color);
  padding: 0.4rem 1.25rem 0.5rem;
  min-height: var(--breadcrumb-height);
  display: flex;
  align-items: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  background: transparent;
  gap: 0.15rem;
}

.breadcrumb-item {
  font-size: 0.875rem;
  line-height: 1.35;
}

.breadcrumb-item + .breadcrumb-item {
  padding-left: 0.35rem;
}

.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #6c757d;
  font-weight: 600;
}

.breadcrumb-item+.breadcrumb-item::before {
  color: #adb5bd;
  content: "›";
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 300;
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
  flex: 1;
  margin-top: var(--app-header-offset);
  padding: var(--page-content-gap) 1.25rem 1.25rem;
  min-width: 0;
  overflow-x: clip;
}

.page-content > .page-header:first-child,
.page-content > .alert:first-child + .page-header {
  margin-top: 15px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.65rem;
}

.page-title-section h4 {
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 0;
  margin-bottom: 0.1rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.page-title-section h4 i {
  color: var(--primary);
}

.page-title-section small {
  color: var(--text-secondary);
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ============================================
   DASHBOARD STATS CARDS
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background: var(--surface-elevated);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.85;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(45, 90, 58, 0.2);
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #e9f3e9, #f0f7f1);
  color: var(--primary);
}

.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.orange { background: #fff7ed; color: #ea580c; }
.stat-icon.teal { background: #ccfbf1; color: #0d9488; }

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--primary-dark);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.stat-change {
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.stat-change.up {
  background: #d1fae5;
  color: #059669;
}

.stat-change.down {
  background: #fee2e2;
  color: #dc2626;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background: var(--surface-elevated);
  transition: box-shadow 0.25s ease;
}

.card.border-0.shadow-sm:hover,
.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-weight: 600;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-header h6 {
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  background: white;
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-poultry {
  font-size: var(--poultry-table-font, 0.875rem);
  background: white;
  margin-bottom: 0;
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.table-poultry thead th {
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  font-weight: 600;
  font-size: var(--poultry-table-header-font, 0.8125rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap !important;
  padding: var(--poultry-table-pad-y, 0.8rem) var(--poultry-table-pad-x, 1rem);
  border: none;
  line-height: 1.25;
}

.table-poultry tbody td {
  padding: var(--poultry-table-pad-y, 0.8rem) var(--poultry-table-pad-x, 1rem);
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: var(--poultry-table-font, 0.875rem);
  line-height: 1.3;
  white-space: nowrap !important;
}

.table-poultry tbody tr:nth-child(even) {
  background: rgba(240, 244, 241, 0.5);
}

.table-poultry tbody tr:hover {
  background: #e9f3e9 !important;
}

.table-poultry tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   RESPONSIVE TABLE SIZING (screen width)
   ============================================ */
.table-responsive {
  container-type: inline-size;
  container-name: poultry-table;
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  overflow-y: hidden;

  /* Default (desktop / wide card) */
  --poultry-table-font: 0.875rem;
  --poultry-table-header-font: 0.8125rem;
  --poultry-table-pad-x: 1rem;
  --poultry-table-pad-y: 0.8rem;
  --poultry-table-badge-font: 0.75rem;
  --poultry-table-btn-font: 0.8125rem;
  --poultry-table-btn-pad: 0.3rem 0.5rem;
}

.table-responsive .badge-status {
  font-size: var(--poultry-table-badge-font);
}

.table-responsive .table-actions .btn,
.table-responsive .table-actions .btn-action {
  font-size: var(--poultry-table-btn-font);
  padding: var(--poultry-table-btn-pad);
}

/* Scale down as the scroll area gets narrower (phones, narrow cards) */
@container poultry-table (max-width: 900px) {
  .table-poultry {
    font-size: 0.8125rem;
  }

  .table-poultry thead th {
    font-size: 0.75rem;
    padding: 0.65rem 0.75rem;
  }

  .table-poultry tbody td {
    font-size: 0.8125rem;
    padding: 0.65rem 0.75rem;
  }

  .badge-status {
    font-size: 0.7rem;
  }

  .table-actions .btn,
  .table-actions .btn-action {
    font-size: 0.75rem;
  }
}

@container poultry-table (max-width: 640px) {
  .table-poultry {
    font-size: 0.75rem;
  }

  .table-poultry thead th {
    font-size: 0.6875rem;
    padding: 0.5rem;
    white-space: nowrap;
  }

  .table-poultry tbody td {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .badge-status {
    font-size: 0.65rem;
  }

  .table-actions .btn,
  .table-actions .btn-action {
    font-size: 0.7rem;
    padding: 0.2rem 0.35rem;
  }
}

@container poultry-table (max-width: 420px) {
  .table-poultry {
    font-size: 0.6875rem;
  }

  .table-poultry thead th {
    font-size: 0.625rem;
    padding: 0.4rem 0.35rem;
  }

  .table-poultry tbody td {
    font-size: 0.6875rem;
    padding: 0.4rem 0.35rem;
  }

  .badge-status {
    font-size: 0.6rem;
  }

  .table-actions .btn,
  .table-actions .btn-action {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
  }
}

/* Wide report tables (integration, batch report, closure) */
.table-responsive .integration-report-table,
.table-responsive .batch-report-table,
.table-responsive .closure-table,
.report-capture-wrapper .integration-report-table,
.report-capture-wrapper .batch-report-table,
.report-capture-wrapper .closure-table {
  font-size: var(--poultry-report-font, 0.78rem);
}

.table-responsive .integration-report-table th,
.report-capture-wrapper .integration-report-table th,
.table-responsive .batch-report-table th,
.report-capture-wrapper .batch-report-table th,
.table-responsive .closure-table th,
.report-capture-wrapper .closure-table th {
  font-size: var(--poultry-report-header-font, 0.68rem);
  padding: var(--poultry-report-pad-y, 0.35rem) var(--poultry-report-pad-x, 0.4rem);
  text-align: center;
  vertical-align: middle;
}

.table-responsive .integration-report-table td,
.report-capture-wrapper .integration-report-table td,
.table-responsive .batch-report-table td,
.report-capture-wrapper .batch-report-table td,
.table-responsive .closure-table td,
.report-capture-wrapper .closure-table td {
  font-size: var(--poultry-report-font, 0.78rem);
  padding: var(--poultry-report-pad-y, 0.3rem) var(--poultry-report-pad-x, 0.4rem);
  text-align: center;
  vertical-align: middle;
}

.report-capture-wrapper {
  --poultry-report-font: 0.78rem;
  --poultry-report-header-font: 0.68rem;
  --poultry-report-pad-x: 0.4rem;
  --poultry-report-pad-y: 0.3rem;
}

.report-capture-wrapper #report-capture.batch-flock-report,
.report-capture-wrapper #report-capture.integration-daily-report,
.report-capture-wrapper #report-capture.poultry-report-capture {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.report-capture-wrapper #report-capture.batch-flock-report .batch-report-table th,
.report-capture-wrapper #report-capture.integration-daily-report .poultry-report-table th,
.report-capture-wrapper #report-capture.integration-daily-report .integration-report-table th {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.64rem;
  font-weight: var(--br-report-fw-header, 700);
}

.report-capture-wrapper #report-capture.batch-flock-report .batch-report-table td,
.report-capture-wrapper #report-capture.integration-daily-report .poultry-report-table td,
.report-capture-wrapper #report-capture.integration-daily-report .integration-report-table td {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: var(--br-report-fw-data, 600);
}

.report-capture-wrapper #report-capture.integration-daily-report .poultry-report-table .col-farmer,
.report-capture-wrapper #report-capture.integration-daily-report .integration-report-table .col-farmer {
  font-weight: var(--br-report-fw-data, 600);
}

/* Viewport fallback (browsers without container queries) */
@supports not (container-type: inline-size) {
  @media (max-width: 991.98px) {
    .table-responsive {
      --poultry-table-font: 0.8125rem;
      --poultry-table-header-font: 0.75rem;
      --poultry-table-pad-x: 0.75rem;
      --poultry-table-pad-y: 0.65rem;
    }
  }

  @media (max-width: 767.98px) {
    .table-responsive {
      --poultry-table-font: 0.75rem;
      --poultry-table-header-font: 0.6875rem;
      --poultry-table-pad-x: 0.5rem;
      --poultry-table-pad-y: 0.5rem;
    }

    .table-responsive .table-poultry thead th {
      white-space: nowrap;
    }
  }

  @media (max-width: 575.98px) {
    .table-responsive {
      --poultry-table-font: 0.6875rem;
      --poultry-table-header-font: 0.625rem;
      --poultry-table-pad-x: 0.35rem;
      --poultry-table-pad-y: 0.4rem;
    }
  }
}

/* Reports: full design width; horizontal scroll when viewport is narrower (report-fit.js) */
.page-content .report-capture-wrapper {
  width: 100%;
  max-width: 100%;
}

.report-capture-wrapper--scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

/* Viewport tuning for list tables on small phones (works alongside container queries) */
@media (max-width: 767.98px) {
  .page-content .card .table-responsive {
    --poultry-table-font: 0.75rem;
    --poultry-table-header-font: 0.6875rem;
    --poultry-table-pad-x: 0.5rem;
    --poultry-table-pad-y: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .page-content .card .table-responsive {
    --poultry-table-font: 0.6875rem;
    --poultry-table-header-font: 0.625rem;
    --poultry-table-pad-x: 0.35rem;
    --poultry-table-pad-y: 0.4rem;
  }
}

/* ============================================
   BADGES & STATUS
   ============================================ */
.badge-status {
  padding: 0.35em 0.7em;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-active, .badge-healthy, .badge-completed, .badge-delivered {
  background: #d1fae5;
  color: #059669;
}

.badge-inactive, .badge-suspended, .badge-cancelled {
  background: #fee2e2;
  color: #dc2626;
}

.badge-pending, .badge-warning, .badge-monitor, .badge-on-leave {
  background: #fef3c7;
  color: #d97706;
}

.badge-info, .badge-growing, .badge-processing, .badge-scheduled, .badge-in-transit {
  background: #dbeafe;
  color: #2563eb;
}

.badge-harvest {
  background: #ede9fe;
  color: #7c3aed;
}

/* ============================================
   TABLE ACTIONS
   ============================================ */
.table-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-action {
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  line-height: 1;
}

.btn-action:hover {
  transform: scale(1.1);
}

/* ============================================
   FORMS
   ============================================ */
.form-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-control,
.form-select {
  border-radius: var(--radius-md);
  border-color: var(--border-color);
  font-size: 0.875rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(45, 90, 58, 0.12);
}

.input-group-text {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: #f8faf9;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.required-star {
  color: var(--danger);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  font-weight: 600;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  padding: 0.45rem 1rem;
  transition: var(--transition);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(45, 90, 58, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(30, 51, 32, 0.3);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
}

.btn-warning {
  background: var(--warning);
  border-color: var(--warning);
  color: #000;
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
}

.btn-info {
  background: var(--info);
  border-color: var(--info);
  color: #000;
}

/* ============================================
   SEARCH BOX
   ============================================ */
.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 62, 45, 0.1);
  background: white;
}

.search-box .search-icon {
  color: #94a3b8;
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  color: var(--text-primary);
  width: 100%;
  min-width: 150px;
}

.search-box input::placeholder {
  color: #94a3b8;
}

/* ============================================
   PAGE FILTER PANEL (unified list & report filters)
   ============================================ */
.page-filter-panel {
  border: 1px solid var(--border-color) !important;
  overflow: hidden;
}

.page-filter-panel__header {
  background: linear-gradient(180deg, #f8faf9 0%, #f1f5f2 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 1rem;
}

.page-filter-panel__header-row {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
  width: 100%;
  min-width: 0;
}

.page-filter-panel__header-row .page-filter-panel__title {
  flex: 0 1 auto;
  min-width: 0;
}

.page-filter-panel__header-row .page-filter-panel__summary {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.page-filter-panel__header-row .page-filter-panel__chevron {
  flex: 0 0 auto;
  margin-left: auto;
}

.page-filter-panel__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.page-filter-panel__summary {
  font-size: 0.8rem;
  color: #64748b;
}

.page-filter-panel__body {
  padding: 1rem 1rem 0.85rem;
}

.page-filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.page-filter-panel .form-control,
.page-filter-panel .form-select {
  font-size: 0.875rem;
  border-color: #dbe3df;
  min-height: 2.35rem;
}

.page-filter-panel .form-control:focus,
.page-filter-panel .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 62, 45, 0.08);
}

.page-filter-panel .search-box {
  width: 100%;
  min-height: 2.35rem;
}

.page-filter-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  background: #f0f7f2;
  border: 1px solid #d4e5da;
  border-radius: var(--radius-md);
}

.page-filter-preset-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-filter-period-summary {
  font-size: 0.8rem;
  color: #475569;
}

.page-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e8eeea;
}

.page-filter-panel .form-check-label {
  font-size: 0.85rem;
}

@media (max-width: 575.98px) {
  .page-filter-presets {
    flex-direction: column;
    align-items: stretch;
  }

  .page-filter-preset-btns {
    width: 100%;
  }

  .page-filter-preset-btns .btn {
    flex: 1;
  }
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  margin-bottom: 0;
}

.pagination .page-link {
  color: var(--primary);
  border-color: var(--border-color);
  font-size: 0.875rem;
}

.pagination .page-link:hover {
  background: #e9f3e9;
}

.pagination .active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.quick-action-btn {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 0.5rem;
  text-align: center;
  transition: var(--transition);
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.quick-action-btn:hover {
  background: #e9f3e9;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--primary);
}

.quick-action-btn i {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
  color: var(--primary-light);
  display: block;
}

.quick-action-btn small {
  font-size: 0.75rem;
  font-weight: 500;
}

/* ============================================
   VIEW DETAIL PAGE
   ============================================ */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
}

.detail-item {
  margin-bottom: 0;
  padding: 0.75rem 1rem;
  background: #f8faf9;
  border-radius: var(--radius-md);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.detail-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.detail-value {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.9375rem;
}

/* ============================================
   FLOATING ACTION BUTTON
   ============================================ */
.fab-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 1025;
}

.fab-main {
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: var(--primary);
  border: none;
  box-shadow: 0 6px 20px rgba(244, 182, 66, 0.5);
  cursor: pointer;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

.fab-main:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(244, 182, 66, 0.6);
}

.fab-main:active {
  transform: scale(0.95);
}

.fab-main i {
  transition: transform 0.3s ease;
}

.fab-main.open i {
  transform: rotate(45deg);
}

.fab-options {
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
}

.fab-options.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fab-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.fab-option-label {
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0;
  transform: translateX(20px);
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.fab-options.show .fab-option-label {
  opacity: 1;
  transform: translateX(0);
}

.fab-option-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.fab-option-btn:hover {
  transform: scale(1.1);
}

.fab-option-btn.entry-btn { background: #3b82f6; }
.fab-option-btn.lifting-btn { background: #8b5cf6; }
.fab-option-btn.order-btn { background: #ef4444; }
.fab-option-btn.transfer-btn { background: #10b981; }
.fab-option-btn.flock-btn { background: #f59e0b; }

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: var(--shadow-lg);
  z-index: 1020;
  display: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.2rem;
}

.scroll-top-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.scroll-top-btn.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   BOTTOM NAVIGATION (MOBILE)
   ============================================ */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0.2rem calc(0.5rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  z-index: 1030;
}

.mobile-bottom-nav a {
  text-align: center;
  color: #6c757d;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  flex: 1;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-bottom-nav a i {
  font-size: 1.3rem;
  display: block;
  margin-bottom: 2px;
}

.mobile-bottom-nav a.active {
  color: var(--primary);
  font-weight: 700;
  background: #e9f3e9;
}

.mobile-bottom-nav a.active i {
  color: var(--accent-dark);
}

.mobile-bottom-nav a.mobile-trip-nav--start {
  color: #198754;
  font-weight: 700;
}

.mobile-bottom-nav a.mobile-trip-nav--start.active {
  background: #d1e7dd;
}

.mobile-bottom-nav a.mobile-trip-nav--end {
  color: #dc3545;
  font-weight: 700;
}

.mobile-bottom-nav a.mobile-trip-nav--end.active {
  background: #f8d7da;
}

.field-trip-active-banner {
  border-bottom: 1px solid #ffc107;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 80%, rgba(232, 168, 56, 0.15), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(45, 90, 58, 0.2), transparent 45%),
    linear-gradient(145deg, var(--primary-dark) 0%, #152418 50%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo i {
  font-size: 2rem;
  color: var(--primary-dark);
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(232, 168, 56, 0.4);
}

.login-logo h3 {
  margin-top: 1rem;
  color: var(--primary-dark);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-custom {
  min-width: 300px;
  max-width: 400px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 3.7s forwards;
  position: relative;
  overflow: hidden;
}

.toast-custom::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast-success::before { background: var(--success); }
.toast-error::before { background: var(--danger); }
.toast-warning::before { background: var(--warning); }
.toast-info::before { background: var(--info); }

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: #d97706; }
.toast-info .toast-icon { color: var(--info); }

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.toast-message {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text-primary);
}

/* ============================================
   CUSTOM MODAL (Alert/Confirm)
   ============================================ */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.custom-modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 450px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.2s ease;
}

.custom-modal-icon {
  text-align: center;
  margin-bottom: 1rem;
}

.custom-modal-icon i {
  font-size: 3rem;
}

.custom-modal-icon.confirm i { color: var(--accent); }
.custom-modal-icon.warning i { color: var(--warning); }
.custom-modal-icon.delete i { color: var(--danger); }
.custom-modal-icon.success i { color: var(--success); }
.custom-modal-icon.info i { color: var(--info); }

.custom-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
}

.custom-modal-body {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.custom-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-sm {
  height: 6px;
  border-radius: 10px;
}

/* ============================================
   ACTIVITY LOG
   ============================================ */
.activity-list .activity-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.activity-list .activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.activity-icon.success { background: #d1fae5; color: #059669; }
.activity-icon.warning { background: #fef3c7; color: #d97706; }
.activity-icon.info { background: #dbeafe; color: #2563eb; }
.activity-icon.danger { background: #fee2e2; color: #dc2626; }
.activity-icon.primary { background: #e0e7ff; color: #4f46e5; }

.activity-item:hover {
  background: #f8fafc;
  border-radius: 8px;
}

.activity-content {
  flex: 1;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.cursor-pointer { cursor: pointer; }
.text-primary-custom { color: var(--primary); }
.bg-primary-custom { background: var(--primary); }
.fw-semibold { font-weight: 600; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet and above (768px+) */
@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .mobile-bottom-nav {
    display: none;
  }

  .sidebar {
    left: 0;
  }

  .main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }

  .header-wrapper {
    left: var(--sidebar-width);
    right: 0;
    width: calc(100% - var(--sidebar-width));
  }

  .menu-toggle {
    display: none;
  }

  .dashboard-header {
    padding: 0 2rem;
  }

  .breadcrumb-container {
    padding: 0.45rem 2rem 0.55rem;
  }

  .page-content {
    padding: 0.4rem 1.75rem 1.35rem;
  }

  .scroll-top-btn {
    bottom: 30px;
  }

  .fab-container {
    bottom: 30px;
    right: 30px;
  }

  .sidebar-desktop-only {
    display: block;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (992px+) */
@media (min-width: 992px) {
  .sidebar {
    left: 0;
  }

  .main-content {
    margin-left: var(--sidebar-width);
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .detail-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Mobile only (max 767px) */
@media (max-width: 767px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-actions {
    width: 100%;
  }

  .search-box {
    max-width: 100%;
    width: 100%;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .header-user-name {
    max-width: 100px;
  }

  .login-card {
    padding: 1.5rem;
  }
}

/* Small mobile (max 480px) */
@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-actions {
    flex-direction: column;
    gap: 0.25rem;
  }

  .table-poultry .table-actions {
    flex-direction: row;
    flex-wrap: nowrap;
  }
}

/* ============================================
   DESIGN POLISH (v3)
   ============================================ */

.page-content > .alert {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.page-content > .alert-success {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #065f46;
}

.page-content > .alert-danger {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #991b1b;
}

.page-content > .alert-warning {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #92400e;
}

.page-content > .alert-info {
  background: linear-gradient(135deg, #ecfeff, #cffafe);
  color: #155e75;
}

.user-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow: 0 2px 8px rgba(232, 168, 56, 0.35);
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
}

/* page-header base styles defined above */

.badge-status {
  letter-spacing: 0.02em;
}

.fab-main {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 8px 24px rgba(232, 168, 56, 0.45);
}

.scroll-top-btn {
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
}

/* Empty table state */
.table-poultry tbody tr td[colspan] {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  white-space: normal;
}

/* List cards on index pages */
.page-content > .card.border-0.shadow-sm {
  border: 1px solid var(--border-color) !important;
  overflow: hidden;
}

/* Batches list — segmented status tabs */
.batch-list-panel {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--surface-elevated);
}

.batch-list-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0;
  padding: 0.65rem;
  background: linear-gradient(180deg, #f4f8f5 0%, #eef4f0 100%);
  border-bottom: 1px solid var(--border-color);
}

.batch-list-tabs__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.batch-list-tabs__item:hover {
  border-color: rgba(45, 90, 58, 0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: inherit;
}

.batch-list-tabs__item.is-active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(45, 90, 58, 0.08) 0%, rgba(45, 90, 58, 0.02) 100%);
  box-shadow: 0 4px 16px rgba(30, 51, 32, 0.12);
}

.batch-list-tabs__item.is-active .batch-list-tabs__label {
  color: var(--primary-dark);
}

.batch-list-tabs__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.batch-list-tabs__icon--active {
  background: rgba(45, 90, 58, 0.12);
  color: var(--primary);
}

.batch-list-tabs__icon--closed {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.batch-list-tabs__item.is-active .batch-list-tabs__icon--active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
}

.batch-list-tabs__item.is-active .batch-list-tabs__icon--closed {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
  color: #fff;
}

.batch-list-tabs__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.batch-list-tabs__label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.batch-list-tabs__hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.batch-list-tabs__count {
  flex-shrink: 0;
  min-width: 2rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: center;
}

.batch-list-tabs__item.is-active .batch-list-tabs__count {
  background: var(--primary);
  color: #fff;
}

.batch-list-panel .batch-list-card {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
}

/* ============================================
   ENTITY SHOW PAGES (detail / view)
   ============================================ */
.entity-show-page {
  --entity-show-gap: 0.85rem;
}

.entity-show-header {
  margin-bottom: 1rem;
}

.entity-show-header__actions {
  max-width: 100%;
}

.entity-show-layout {
  align-items: flex-start;
}

.entity-show-aside {
  display: flex;
  flex-direction: column;
  gap: var(--entity-show-gap);
}

.entity-show-photo-link {
  display: block;
  text-align: center;
  padding: 0.35rem;
}

.entity-show-photo-img {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
  object-fit: contain;
}

.entity-show-photo-card .entity-show-panel__body {
  padding: 0.65rem !important;
}

.entity-show-footnote {
  padding: 0.65rem 0.85rem;
  background: #f8faf9;
  border: 1px dashed #d4e5da;
  border-radius: var(--radius-md);
}

/* Summary stats strip */
.entity-show-stats {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(165deg, #ffffff 0%, #f7faf8 55%, #f2f7f3 100%);
  border: 1px solid rgba(45, 90, 58, 0.12);
  box-shadow: 0 2px 10px rgba(30, 51, 32, 0.06);
}

.entity-show-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
}

.entity-show-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.65rem;
}

.entity-show-stats__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  background: #fff;
  border: 1px solid #e8eeea;
  border-radius: var(--radius-md);
  min-width: 0;
}

.entity-show-stats__icon {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--primary);
  background: linear-gradient(180deg, #f0f7f2 0%, #e8f2eb 100%);
}

.entity-show-stats__body {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.entity-show-stats__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.entity-show-stats__value {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
}

.entity-show-stats__item.entity-show-stats__item--alert {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff8f8 0%, #fff 100%);
}

.entity-show-stats__item.entity-show-stats__item--alert .entity-show-stats__icon {
  color: #dc2626;
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
}

.entity-show-stats__item.entity-show-stats__item--alert .entity-show-stats__value {
  color: #b91c1c;
}

@media (min-width: 768px) {
  .entity-show-stats__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.75rem;
  }
}

/* Panels */
.entity-show-panel {
  border-radius: var(--radius-xl) !important;
  border: 1px solid rgba(45, 90, 58, 0.1) !important;
  overflow: hidden;
}

.entity-show-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #f8faf9 0%, #f1f5f2 100%) !important;
  border-bottom: 1px solid rgba(45, 90, 58, 0.1) !important;
  padding: 0.75rem 1rem !important;
}

.entity-show-panel__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.entity-show-panel__icon {
  color: var(--primary);
  font-size: 1rem;
}

.entity-show-panel__body {
  padding: 1rem !important;
}

/* Detail fields — label / value rows (no mini-cards) */
.entity-show-page .detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e2e8e4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.entity-show-page .detail-item {
  display: grid;
  grid-template-columns: minmax(7.25rem, 38%) 1fr;
  align-items: center;
  gap: 0.5rem 0.85rem;
  padding: 0.62rem 0.9rem;
  margin: 0;
  background: #fff;
  border: none;
  border-bottom: 1px solid #eef2ef;
  border-radius: 0;
  box-shadow: none;
}

.entity-show-page .detail-item::before {
  display: none;
}

.entity-show-page .detail-item:last-child {
  border-bottom: none;
}

.entity-show-page .detail-item:nth-child(even) {
  background: #f9fbfa;
}

.entity-show-page .detail-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0;
  line-height: 1.3;
}

.entity-show-page .detail-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  text-align: right;
  font-variant-numeric: tabular-nums;
  word-break: normal;
  overflow-wrap: anywhere;
}

.entity-show-page .detail-value a {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.entity-show-page .detail-value a:hover {
  text-decoration: underline;
}

.entity-show-page .detail-notes {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: #f8faf9;
  border: 1px solid #e2e8e4;
  border-radius: var(--radius-md);
}

.entity-show-page .detail-notes .detail-label {
  margin-bottom: 0.25rem;
}

.entity-show-page .detail-notes .detail-value {
  text-align: left;
  font-weight: 600;
}

@media (min-width: 768px) {
  .entity-show-page .detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entity-show-page .detail-item {
    border-bottom: 1px solid #eef2ef;
    border-right: 1px solid #eef2ef;
  }

  .entity-show-page .detail-item:nth-child(2n) {
    border-right: none;
  }

  .entity-show-page .detail-item:last-child:nth-child(odd) {
    border-right: none;
  }

  .entity-show-page .detail-item:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

/* App shell forces 4 columns on .detail-grid at 992px+ — override on show pages */
@media (min-width: 992px) {
  .app-shell .page-content:not(:has(.report-capture-wrapper)) .entity-show-page .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Data tables inside show pages */
.entity-show-page .entity-show-table-wrap,
.entity-show-page .table-responsive {
  -webkit-overflow-scrolling: touch;
}

.entity-show-page .entity-show-table,
.entity-show-page .table-poultry,
.entity-show-page .table {
  width: 100%;
  margin-bottom: 0;
  font-size: 0.8125rem;
  border-collapse: separate;
  border-spacing: 0;
}

.entity-show-page .entity-show-table thead th,
.entity-show-page .table-poultry thead th,
.entity-show-page .table thead th {
  background: linear-gradient(180deg, #f4f8f5 0%, #eef4f0 100%);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom: 1px solid #dce5e0;
  padding: 0.55rem 0.7rem;
  white-space: nowrap;
  vertical-align: middle;
}

.entity-show-page .entity-show-table tbody td,
.entity-show-page .table-poultry tbody td,
.entity-show-page .table tbody td {
  padding: 0.58rem 0.7rem;
  vertical-align: middle;
  border-bottom: 1px solid #eef2ef;
  color: var(--text-primary);
}

.entity-show-page .entity-show-table tbody tr:last-child td,
.entity-show-page .table-poultry tbody tr:last-child td,
.entity-show-page .table tbody tr:last-child td {
  border-bottom: none;
}

.entity-show-page .entity-show-table tbody tr:hover,
.entity-show-page .table-poultry tbody tr:hover,
.entity-show-page .table-hover tbody tr:hover {
  background: #f6faf7;
}

.entity-show-page .entity-show-table tfoot th,
.entity-show-page .entity-show-table tfoot td,
.entity-show-page .table-poultry tfoot th,
.entity-show-page .table-poultry tfoot td,
.entity-show-page .table tfoot th,
.entity-show-page .table tfoot td {
  background: #f1f5f2;
  font-weight: 700;
  border-top: 1px solid #dce5e0;
  padding: 0.6rem 0.7rem;
}

.entity-show-page .entity-show-table .text-end,
.entity-show-page .table .text-end {
  font-variant-numeric: tabular-nums;
}

.entity-show-page .entity-show-table-empty td,
.entity-show-page .table tbody td.text-center.text-muted {
  padding: 1.25rem 0.7rem;
  font-size: 0.8125rem;
}

@media (max-width: 767.98px) {
  .entity-show-page .entity-show-table-wrap .entity-show-table,
  .entity-show-page .entity-show-table-wrap .table-poultry,
  .entity-show-page .table-responsive .table-poultry,
  .entity-show-page .table-responsive .table {
    min-width: 32rem;
  }

  .entity-show-page .entity-show-table thead th,
  .entity-show-page .table-poultry thead th,
  .entity-show-page .table thead th {
    padding: 0.5rem 0.55rem;
    font-size: 0.625rem;
  }

  .entity-show-page .entity-show-table tbody td,
  .entity-show-page .table-poultry tbody td,
  .entity-show-page .table tbody td {
    padding: 0.5rem 0.55rem;
    font-size: 0.75rem;
  }
}

/* Quick links */
.entity-show-quick-links {
  border-radius: var(--radius-xl) !important;
  border: 1px solid rgba(45, 90, 58, 0.1) !important;
}

.entity-show-quick-links__header {
  background: linear-gradient(180deg, #f8faf9 0%, #f1f5f2 100%) !important;
  border-bottom: 1px solid rgba(45, 90, 58, 0.08) !important;
  padding: 0.7rem 1rem !important;
}

.entity-show-quick-links__header h6 {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.entity-show-quick-links__body {
  padding: 0.85rem 1rem !important;
}

.entity-show-quick-links__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.entity-show-quick-links__grid .btn {
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
}

/* Sidebar meta */
.entity-show-meta {
  border-radius: var(--radius-xl) !important;
  border: 1px solid rgba(45, 90, 58, 0.1) !important;
  position: sticky;
  top: calc(var(--app-header-offset) + 0.5rem);
}

.entity-show-meta__header {
  background: linear-gradient(180deg, #f8faf9 0%, #f1f5f2 100%) !important;
  border-bottom: 1px solid rgba(45, 90, 58, 0.08) !important;
  padding: 0.7rem 1rem !important;
}

.entity-show-meta__header h6 {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.entity-show-meta__body {
  padding: 0.85rem 1rem !important;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.entity-show-meta__row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem 0.65rem;
  background: #f8faf9;
  border: 1px solid #e8eeea;
  border-radius: var(--radius-md);
}

.entity-show-meta__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: #fff;
  border: 1px solid #e2e8e4;
}

.entity-show-meta__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.entity-show-meta__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.entity-show-meta__value {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

/* Hero banner (batch, etc.) */
.entity-show-hero {
  border-radius: var(--radius-xl) !important;
  border: 1px solid rgba(45, 90, 58, 0.12) !important;
  box-shadow: 0 4px 16px rgba(30, 51, 32, 0.06) !important;
  overflow: hidden;
}

.entity-show-hero--active {
  border-left: 4px solid var(--success) !important;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, #fff 55%) !important;
}

.entity-show-hero--closed {
  border-left: 4px solid #94a3b8 !important;
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.08) 0%, #fff 55%) !important;
}

.entity-show-hero__icon {
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
}


.detail-grid .detail-value a {
  font-weight: 700;
}

/* Generic cards inside show pages */
.entity-show-page > .card.border-0.shadow-sm,
.entity-show-page .entity-show-layout .card.border-0.shadow-sm,
.entity-show-page .row .card.border-0.shadow-sm {
  border-radius: var(--radius-xl) !important;
  border: 1px solid rgba(45, 90, 58, 0.1) !important;
  overflow: hidden;
}

.entity-show-page .card > .card-header.bg-white {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #f8faf9 0%, #f1f5f2 100%) !important;
  border-bottom: 1px solid rgba(45, 90, 58, 0.1) !important;
  padding: 0.75rem 1rem !important;
}

.entity-show-page .card > .card-header.bg-white .fw-semibold,
.entity-show-page .card > .card-header.bg-white h6 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0;
}

.entity-show-page .card > .card-body:not(.p-0) {
  padding: 1rem !important;
}

.entity-show-page .card.border-start.border-4 {
  border-radius: var(--radius-xl) !important;
}

.entity-show-page dl.row dt {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.entity-show-page dl.row dd {
  font-weight: 700;
  color: var(--text-primary);
}

.entity-show-page .table-responsive {
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

@media (max-width: 767.98px) {
  .entity-show-meta {
    position: static;
  }

  .entity-show-header .page-actions,
  .entity-show-page .page-header .page-actions {
    width: 100%;
  }

  .entity-show-header__actions .btn,
  .entity-show-page .page-header .page-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 2.5rem;
  }

  .entity-show-header__actions .btn-outline-secondary,
  .entity-show-page .page-header .page-actions .btn-outline-secondary {
    flex: 1 1 100%;
  }

  .entity-show-stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .batch-list-tabs {
    grid-template-columns: 1fr;
  }

  .batch-list-tabs__item {
    padding: 0.75rem 0.9rem;
  }

  .batch-list-tabs__hint {
    display: none;
  }
}

/* Entity show pages (batch, farm, etc.) */
.entity-show-hero {
  border-left: 4px solid var(--secondary);
}
.entity-show-hero--active {
  border-left-color: var(--success);
  background: linear-gradient(135deg, rgba(25, 135, 84, 0.08) 0%, rgba(255, 255, 255, 0) 65%);
}
.entity-show-hero--closed {
  border-left-color: var(--secondary);
  background: linear-gradient(135deg, rgba(108, 117, 125, 0.1) 0%, rgba(255, 255, 255, 0) 65%);
}
.entity-show-hero__icon {
  width: 48px;
  height: 48px;
}
.history-tabs .nav-link {
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.75rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
}
.history-tabs .nav-link.active {
  color: var(--primary-dark);
  background: transparent;
  border-bottom-color: var(--primary);
}
.history-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
}
.history-empty i {
  font-size: 2rem;
  opacity: 0.45;
  display: block;
  margin-bottom: 0.5rem;
}
.entity-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border-color, #eee);
}
.entity-sidebar-link:last-child {
  border-bottom: none;
}
.entity-sidebar-link:hover {
  color: var(--primary);
}
.audit-trail-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color, #eee);
}
.audit-trail-item:last-child {
  border-bottom: none;
}

.page-filter-active-chips {
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border-color);
}

/* ============================================
   TOP PAGE LOADER (browser-style progress line)
   ============================================ */
.top-page-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10050;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.top-page-loader.is-active {
  opacity: 1;
}

.top-page-loader__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary-light) 55%, var(--accent-light) 100%);
  box-shadow: 0 0 10px rgba(232, 168, 56, 0.45);
  transform-origin: left center;
  transition: width 0.25s ease;
}

.top-page-loader.is-complete .top-page-loader__bar {
  width: 100% !important;
  transition: width 0.15s ease;
}

/* ============================================
   APP SHELL — MOBILE + TABLET (not report pages)
   Report blades / capture wrapper / report-fit.js unchanged.
   ============================================ */
.app-shell .page-content:not(:has(.report-capture-wrapper)) {
  min-width: 0;
}

/* Tablet (768px – 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .app-shell .page-content:not(:has(.report-capture-wrapper)) {
    padding: 0.35rem 1.5rem 1.25rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-header {
    margin-bottom: 0.65rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-title-section h4 {
    font-size: 1.15rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .entity-show-highlight .entity-show-stat-value {
    font-size: 1.05rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .row.g-3 > .col-xl-4,
  .app-shell .page-content:not(:has(.report-capture-wrapper)) .row.g-3 > .col-xl-8 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Mobile (≤767px) */
@media (max-width: 767.98px) {
  .app-shell .page-content:not(:has(.report-capture-wrapper)) {
    padding: 0.3rem 0.85rem 0.85rem;
  }

  .app-shell .dashboard-header {
    padding: 0 0.85rem;
  }

  .app-shell .breadcrumb-container {
    padding: 0.35rem 0.85rem 0.45rem;
  }

  .app-shell .breadcrumb-item {
    font-size: 0.8125rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.35rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-title-section h4 {
    font-size: 1.1rem;
    line-height: 1.35;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions > .dropdown,
  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions > form,
  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions > a,
  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions > .btn {
    width: 100%;
    margin: 0;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions .btn,
  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions .dropdown > .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.8125rem;
    padding: 0.5rem 0.65rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions .dropdown {
    grid-column: 1 / -1;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions .dropdown > .btn {
    display: flex;
    align-items: center;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions form .btn {
    width: 100%;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .stats-row {
    gap: 0.65rem;
    margin-bottom: 1.25rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .stat-card {
    padding: 1rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .stat-card:hover {
    transform: none;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .stat-value {
    font-size: 1.35rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .detail-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .entity-show-hero .card-body {
    flex-direction: column;
    align-items: stretch !important;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .entity-show-hero .d-flex.align-items-center.gap-2 {
    width: 100%;
    justify-content: flex-start;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .entity-show-highlight .entity-show-stat {
    text-align: center;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .history-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -0.25rem;
    padding-bottom: 0.15rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .history-tabs::-webkit-scrollbar {
    display: none;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .history-tabs .nav-item {
    flex-shrink: 0;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .history-tabs .nav-link {
    padding: 0.65rem 0.85rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .history-tabs .badge {
    font-size: 0.65rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .card-header .d-flex.justify-content-between {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .alert.d-flex.justify-content-between {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.65rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .alert .btn {
    align-self: stretch;
    width: 100%;
    margin-left: 0 !important;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-filter-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .batch-list-tabs__item {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .batch-list-tabs__label {
    font-size: 0.9rem;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) canvas[id$="Chart"] {
    max-height: 200px !important;
    width: 100% !important;
  }

  .app-shell .fab-container {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    right: 1rem;
  }

  .app-shell .scroll-top-btn {
    bottom: calc(8.5rem + env(safe-area-inset-bottom, 0px));
    right: 1rem;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .app-shell .page-content:not(:has(.report-capture-wrapper)) .stats-row {
    grid-template-columns: 1fr;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) .page-actions {
    grid-template-columns: 1fr;
  }
}

/* Tablet: full-width dashboard chart row */
@media (min-width: 768px) and (max-width: 991.98px) {
  .app-shell .page-content:not(:has(.report-capture-wrapper)) .row.mb-4 > [class*="col-lg-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .app-shell .page-content:not(:has(.report-capture-wrapper)) canvas[id$="Chart"] {
    max-height: 240px !important;
  }
}

/* ============================================
   MOBILE ENTITY LIST (card layout for indexes)
   ============================================ */
.mobile-entity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-entity-card {
  position: relative;
  background: linear-gradient(165deg, #ffffff 0%, #f7faf8 55%, #f2f7f3 100%);
  border: 1px solid rgba(45, 90, 58, 0.12);
  border-radius: var(--radius-xl);
  box-shadow:
    0 1px 2px rgba(30, 51, 32, 0.04),
    0 8px 24px rgba(30, 51, 32, 0.07);
  overflow: hidden;
  transition: box-shadow 0.22s ease, transform 0.18s ease;
}

.mobile-entity-card:active {
  transform: scale(0.988);
  box-shadow: 0 4px 14px rgba(30, 51, 32, 0.08);
}

.mobile-entity-card__glow {
  position: absolute;
  top: -40px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(232, 168, 56, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.mobile-entity-card__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem 0.5rem;
  background: linear-gradient(90deg, rgba(45, 90, 58, 0.07) 0%, transparent 100%);
  border-bottom: 1px solid rgba(45, 90, 58, 0.08);
}

.mobile-entity-card__date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.mobile-entity-card__date i {
  color: var(--accent-dark);
  font-size: 0.85rem;
}

.mobile-entity-card__topbar-end {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.mobile-entity-card__topbar-end .badge-status {
  font-size: 0.65rem;
  padding: 0.2rem 0.45rem;
}

.mobile-entity-card__id {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.mobile-entity-card__hero {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.85rem 0.75rem;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.mobile-entity-card__hero:active {
  background: rgba(45, 90, 58, 0.04);
}

.mobile-entity-card__avatar {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, var(--primary-light) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 12px rgba(30, 51, 32, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.mobile-entity-card__hero-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mobile-entity-card__farm {
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-entity-card__sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.mobile-entity-card__batch {
  color: var(--primary);
  background: rgba(45, 90, 58, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.mobile-entity-card__sep {
  color: #cbd5e1;
}

.mobile-entity-card__hero-chevron {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #94a3b8;
  opacity: 0.7;
}

.mobile-entity-card__alert-banner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0.75rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #991b1b;
  background: linear-gradient(90deg, #fef2f2 0%, #fff5f5 100%);
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
}

.mobile-entity-card__alert-banner i {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.mobile-entity-card__metrics {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 0.75rem 0.8rem;
}

.mobile-entity-card__metric {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.7rem;
  background: #fff;
  border: 1px solid #e8eeea;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.mobile-entity-card__metric--balance {
  border-color: #cfe0d4;
  background: linear-gradient(90deg, #f8fcf9 0%, #fff 100%);
}

.mobile-entity-card__metric--feed {
  border-style: dashed;
  border-color: #d4e5da;
}

.mobile-entity-card__metric-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--primary);
  background: linear-gradient(180deg, #f0f7f2 0%, #e8f2eb 100%);
}

.mobile-entity-card__metric--balance .mobile-entity-card__metric-icon {
  color: var(--success);
  background: linear-gradient(180deg, #ecfdf3 0%, #dcfce7 100%);
}

.mobile-entity-card__metric--feed .mobile-entity-card__metric-icon {
  color: var(--accent-dark);
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}

.mobile-entity-card__metric-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.mobile-entity-card__metric-value {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.mobile-entity-card__metric-value--sm {
  font-size: 1rem;
}

.mobile-entity-card__metric-slash {
  margin: 0 0.2rem;
  color: #94a3b8;
  font-weight: 500;
}

.mobile-entity-card__metric-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mobile-entity-card__metric-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--success);
  background: #dcfce7;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  letter-spacing: 0;
  text-transform: none;
}

.mobile-entity-card__feed-used {
  color: var(--primary-dark);
}

.mobile-entity-card__feed-recv {
  color: #64748b;
  font-weight: 700;
}

.mobile-entity-card__actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem 0.75rem;
  background: rgba(255, 255, 255, 0.65);
  border-top: 1px solid rgba(45, 90, 58, 0.1);
}

.mobile-entity-card__actions .mobile-entity-card__action--primary {
  min-width: 5.5rem;
}

.mobile-entity-card__action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.65rem;
  padding: 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-entity-card__action:active {
  transform: scale(0.97);
}

.mobile-entity-card__action--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
  box-shadow: 0 3px 10px rgba(45, 90, 58, 0.25);
}

.mobile-entity-card__action--edit {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.mobile-entity-card__action--danger {
  flex: 0 0 2.65rem;
  width: 2.65rem;
  padding: 0;
  color: #b91c1c;
  background: #fff;
  border-color: #fecaca;
}

.mobile-entity-card__delete-form {
  flex: 0 0 auto;
}

.mobile-entity-empty {
  background: linear-gradient(180deg, #fff 0%, #f8faf9 100%);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-xl);
  padding: 2.5rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Collapsible filter panel (mobile) */
.page-filter-panel__header--collapsible {
  cursor: pointer;
  user-select: none;
}

.page-filter-panel__chevron {
  transition: transform 0.2s ease;
  color: var(--primary);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.15rem;
}

.page-filter-panel__chevron.is-open {
  transform: rotate(180deg);
}

@media (min-width: 768px) {
  .page-filter-panel__header--collapsible {
    cursor: default;
    pointer-events: none;
  }

  .page-filter-panel__collapse.collapse {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
  }

  .page-filter-panel__collapse.collapsing {
    height: auto !important;
    transition: none !important;
  }
}

/* Daily entry — feed balance snapshot */
.farm-feed-balance-card {
  background: linear-gradient(180deg, #f8fbf9 0%, #f2f7f4 100%);
  border: 1px solid #c5d6cb;
  border-left: 4px solid var(--primary);
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
  box-shadow: 0 1px 4px rgba(30, 69, 48, 0.06);
}

.farm-feed-balance-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.4rem;
  background: rgba(45, 90, 58, 0.12);
  color: var(--primary);
  font-size: 1.1rem;
}

.farm-feed-balance-card__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}

.farm-feed-balance-card__sub {
  font-size: 0.7rem;
  line-height: 1.2;
}

.farm-feed-balance-card__divider {
  height: 1px;
  background: rgba(197, 214, 203, 0.9);
  margin: 0.55rem 0 0.5rem;
}

.ffb-total {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.ffb-total__n {
  font-weight: 700;
  font-size: 0.9rem;
}

.ffb-total--kg {
  background: #e8f5ec;
  border-color: #9fd4b3;
  color: #14532d;
}

.ffb-total--bags {
  background: #e8f2fc;
  border-color: #a8c8fa;
  color: #0c4a6e;
}

.ffb-total--types {
  background: #fff8e8;
  border-color: #e8c878;
  color: #713f12;
}

.farm-feed-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.45rem;
  max-height: 10.5rem;
  overflow-y: auto;
}

.farm-feed-balance-item {
  background: #fff;
  border: 1px solid #d4e5da;
  border-radius: 0.4rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.farm-feed-balance-item__name {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.farm-feed-balance-item__nums {
  color: var(--text-primary);
  font-size: 0.8125rem;
}

.farm-feed-balance-item__sep {
  margin: 0 0.25rem;
  color: #94a3b8;
}

@media (max-width: 575.98px) {
  .farm-feed-balance-grid {
    grid-template-columns: 1fr;
  }

  .farm-feed-balance-totals {
    width: 100%;
  }
}