.inventory-detail {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  background: #f8f9fb;
  border: 1px solid #e9edf5;
  padding: 1.25rem;
  gap: 1.5rem;
}

.inventory-detail-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid #e0e6f1;
}

.inventory-detail-thumb {
  width: 100%;
  height: auto;
  max-height: 200px;
}

.inventory-detail-image-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: #f1f4f9;
  border: 1px dashed #c5cedf;
}

.inventory-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 1rem;
}

.inventory-detail-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: #ffffff;
  border: 1px solid #e0e6f1;
  padding: 0.75rem 1rem;
}

.inventory-detail-field.highlight {
  border-color: #0d6efd;
  background: #e9f2ff;
}

.inventory-detail-field .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #6c757d;
  letter-spacing: 0.05em;
}

.inventory-detail-field .value {
  font-weight: 600;
  color: #12263f;
}

.inventory-detail-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.inventory-detail-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.inventory-detail-actions .btn span {
  font-weight: 600;
}

@media (max-width: 992px) {
  .inventory-detail {
    grid-template-columns: 1fr;
  }

  .inventory-detail-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

.inventory-detail-grid {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.inventory-detail-actions {
  justify-content: stretch;
  flex-wrap: wrap;
}

.inventory-filters {
  flex-wrap: nowrap;
  width: 100%;
}

.inventory-filter-input,
.inventory-filter-select {
  flex: 1 1 0;
  min-width: 140px;
}

.inventory-filter-input {
  display: flex;
}

.inventory-filter-input .form-control {
  width: 100%;
  min-height: 32px;
}

.inventory-filter-select {
  width: 100%;
  min-height: 32px;
}
.inventory-table-col-product {
  width: 65%;
}

.inventory-table-col-compact {
  width: 17.5%;
}
#monthly-summary-card {
  background-color: #000;
  color: #fff;
}

#monthly-fixed-card {
  background-color: #000;
  color: #fff;
}

#monthly-fixed-card .stat-card,
#monthly-fixed-card .form-label,
#monthly-fixed-card .text-muted,
#monthly-fixed-card h3,
#monthly-fixed-card h4 {
  color: #fff !important;
}

#monthly-fixed-card .form-select,
#monthly-fixed-card .form-control {
  background-color: #111;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

#monthly-fixed-card .form-select:focus,
#monthly-fixed-card .form-control:focus {
  background-color: #111;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

#monthly-fixed-card .list-group-item {
  background-color: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

#monthly-summary-card .stat-card {
  color: inherit;
}

#monthly-summary-subtitle {
  color: #fff!important;
}

.dashboard-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 1050;
}

.dashboard-modal.hidden {
  display: none;
}

.dashboard-modal-dialog {
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  outline: none;
}

.dashboard-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  color: #343a40;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  z-index: 2;
}

.dashboard-modal-close:focus,
.dashboard-modal-close:hover {
  color: #000;
  background-color: rgba(0, 0, 0, 0.1);
}

:root {
  color-scheme: light;
}

.success-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: #28a745;
  color: white;
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
  min-width: 200px;
}

.success-notification i {
  font-size: 2.5rem;
}

.success-notification span {
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.success-notification.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #f4f6fb;
  color: #1a1a1a;
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 5.5rem;
}

.app-content {
  flex: 1;
}

.nav-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -18px 32px rgba(19, 40, 78, 0.16);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0.35rem 0.75rem calc(env(safe-area-inset-bottom, 1rem));
}

.nav-bottom button {
  background: transparent;
  color: #617192;
  padding: 0.4rem 0.6rem;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-height: 3.5rem;
}

.btn.disabled,
.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.nav-bottom button i {
  font-size: 1.15rem;
}

.nav-bottom button.active {
  color: #0d6efd;
}

.nav-bottom button.active i {
  color: #0d6efd;
}

.card-flat {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(19, 40, 78, 0.12);
  border: none;
  border-radius: 0;
}

.btn {
  border-radius: 0;
}

.form-control,
.form-select {
  border-radius: 0;
  border: 1px solid #dee2e6;
}

.card-flat h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.badge-stock {
  background: #0d6efd;
  color: #ffffff;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.badge-expense {
  background: #212529;
  color: #ffffff;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.badge-sold {
  background: #dc3545;
  color: #ffffff;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.hidden {
  display: none !important;
}

.floating-action {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: #0d6efd;
  color: #ffffff;
  padding: 1rem 1.25rem;
  font-size: 1.125rem;
  border: none;
  box-shadow: 0 18px 32px rgba(13, 110, 253, 0.25);
}

.floating-action:active {
  transform: translateY(1px);
}

.notification-panel {
  background: #fee7e8;
  color: #9b1c20;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 12px 28px rgba(155, 28, 32, 0.15);
}

.notification-panel h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem 0;
}

.notification-panel ul {
  margin: 0;
  padding-left: 1rem;
}

.notification-panel li {
  margin-bottom: 0.25rem;
}

.stat-card {
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 10px 22px rgba(51, 63, 85, 0.12);
  border: none;
  border-radius: 0;
}

.stat-card-loss {
  background: #fdecec;
  box-shadow: 0 10px 22px rgba(207, 55, 55, 0.25);
}

.stat-card-loss h3 {
  color: #a11f1f;
}

.stat-card-loss p {
  color: #a11f1f;
}

.dashboard-settings-group + .dashboard-settings-group {
  padding-top: 1.5rem;
  border-top: 1px solid #e9edf5;
}

.btn-icon {
  border: none;
  background: transparent;
  color: #617192;
  padding: 0.4rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(19, 40, 78, 0.12);
}

.btn-icon:focus,
.btn-icon:hover {
  color: #0d6efd;
}

.btn-icon i {
  font-size: 1.35rem;
}

.stat-card h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #617192;
  margin-bottom: 0.5rem;
}

.stat-card p {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
  color: #0d1933;
}

.cart-item {
  border-bottom: 1px solid #e9edf5;
  padding: 0.75rem 0;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item .btn {
  padding: 0.35rem 0.6rem;
}

.list-group-item {
  border-radius: 0 !important;
}

#category-list .list-group-item {
  border: none;
  border-bottom: 1px solid #e9edf5;
  padding: 0.75rem 0;
}

#category-list .list-group-item:last-child {
  border-bottom: none;
}

.inventory-actions .btn i {
  font-size: 1rem;
}

.inventory-actions .btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(19, 40, 78, 0.2);
}

.image-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 17, 34, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  padding: 1.5rem;
}

.image-modal {
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(9, 17, 34, 0.35);
  padding: 1.5rem;
  border-radius: 0;
  max-width: min(90vw, 600px);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.image-modal img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  box-shadow: 0 16px 32px rgba(19, 40, 78, 0.18);
}

.image-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: #1a1a1a;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.image-modal-close:focus,
.image-modal-close:hover {
  color: #0d6efd;
}

.image-modal-caption {
  font-size: 0.95rem;
  color: #617192;
  text-align: center;
}

.security-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 17, 34, 0.8);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 1.5rem) 1.5rem 1.5rem 1.5rem;
}

.security-card {
  background: #ffffff;
  padding: 2rem;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 48px rgba(9, 17, 34, 0.25);
}

.security-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.security-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

#monthly-summary-products-section th[data-sort-key] {
  cursor: pointer;
  user-select: none;
}

#monthly-summary-products-section th[data-sort-key]:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

