html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.2rem rgba(37, 140, 251, 0.35);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ——— Auth / Login ——— */
.auth-body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #3d7ab8 45%, #6eb5e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 1rem;
  box-shadow: 0 1.25rem 3rem rgba(15, 35, 60, 0.35);
  animation: fadeUp 0.45s ease;
}

.login-card .card-body {
  padding: 2rem 2.25rem;
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, #2563eb, #38bdf8);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0.5rem 1.25rem rgba(37, 99, 235, 0.35);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ——— Dashboard shell ——— */
.dashboard-body {
  margin: 0;
  min-height: 100vh;
  background: #f4f6f9;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(180deg, #132238 0%, #1b3352 100%);
  flex-shrink: 0;
}

.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-nav .nav-link {
  color: rgba(255, 255, 255, 0.78);
  border-radius: 0.5rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-nav .nav-link.active {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-wrap {
  background: #f4f6f9;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
}

.content-area {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.stat-card {
  border: none;
  border-radius: 0.85rem;
  box-shadow: 0 0.35rem 1rem rgba(15, 35, 60, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1.25rem rgba(15, 35, 60, 0.1);
}

.stat-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.table-card {
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: 0 0.35rem 1rem rgba(15, 35, 60, 0.06);
}

.table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom-width: 1px;
}

.badge-stock-ok {
  background: #dcfce7;
  color: #166534;
}

.badge-stock-low {
  background: #fee2e2;
  color: #991b1b;
}

.mobile-sidebar {
  background: linear-gradient(180deg, #132238 0%, #1b3352 100%);
  color: #fff;
}

.mobile-sidebar .offcanvas-title {
  color: #fff;
}

.btn-mobile-menu {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-mobile-menu:hover,
.btn-mobile-menu:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
}

.inventory-actions .btn {
  min-width: 70px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 0.2rem 0.55rem !important;
}

.payment-badge {
  display: inline-block;
  min-width: 72px;
  text-align: center;
  font-weight: 600;
  border: 1px solid transparent;
}

.payment-pending {
  color: #8a4b00 !important;
  background-color: #fff3cd !important;
  border-color: #f5d98a !important;
}

.payment-partial {
  color: #0b5d7a !important;
  background-color: #cff4fc !important;
  border-color: #94d8e9 !important;
}

.payment-paid {
  color: #0f5132 !important;
  background-color: #d1e7dd !important;
  border-color: #97d0b5 !important;
}

.value-positive {
  color: #198754 !important;
}

@media (max-width: 991.98px) {
  .content-area {
    padding-top: 0.5rem !important;
  }

  #inventoryTable td,
  #inventoryTable th {
    white-space: nowrap;
  }

  .inventory-actions {
    justify-content: flex-start !important;
  }

  .inventory-actions .btn {
    min-width: auto;
  }
}
