html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  --bs-body-bg: #f6f0e6;
  background-color: #f6f0e6;
  margin-bottom: 60px;
}

.drop-zone {
    border: 2px dashed #0d6efd;
    border-radius: 8px;
    background-color: #f8fbff;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

    .drop-zone.drag-over {
        background-color: #e7f1ff;
        border-color: #0a58ca;
    }

@media print {
  header,
  footer,
  nav,
  .navbar,
  .print-hidden,
  .no-print {
    display: none !important;
  }

  body {
    margin: 0;
  }

  main {
    padding: 0;
  }

  .print-container {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .print-card {
    border: 1px solid #dee2e6;
    box-shadow: none !important;
  }

  .page-break {
    page-break-after: always;
  }

  .page-break:last-child {
    page-break-after: auto;
  }
}

.invoice-report-page .card {
  border-radius: 0.9rem;
}

.invoice-report-toolbar {
  background: linear-gradient(135deg, #f9fbff 0%, #eef5ff 100%);
}

.invoice-report-page .table thead th {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.invoice-report-page .card-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark-mode {
  background-color: #121212;
  color: #e9ecef;
}

body.dark-mode .navbar,
body.dark-mode .footer,
body.dark-mode .card,
body.dark-mode .dropdown-menu {
  background-color: #1e1e1e;
  color: #e9ecef;
}

body.dark-mode .card,
body.dark-mode .dropdown-menu,
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .table,
body.dark-mode .table th,
body.dark-mode .table td {
  border-color: #2c2c2c;
}

body.dark-mode .table,
body.dark-mode .table thead,
body.dark-mode .table tbody,
body.dark-mode .table td,
body.dark-mode .table th {
  background-color: #181818;
  color: #e9ecef;
}

body.dark-mode .table thead,
body.dark-mode .table-light {
  background-color: #1f1f1f !important;
  color: #e9ecef;
}

body.dark-mode a,
body.dark-mode .nav-link,
body.dark-mode .navbar-brand {
  color: #d8e9ff;
}

body.dark-mode .nav-link:hover,
body.dark-mode .navbar-brand:hover,
body.dark-mode a:hover {
  color: #a6c8ff;
}

body.dark-mode .dropdown-item {
  color: #e9ecef;
}

body.dark-mode .dropdown-item:hover {
  background-color: #2c2c2c;
}

body.dark-mode .card {
  border-color: #2b2b2b;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.35);
}

body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #1a1a1a;
}

body.dark-mode .table-striped > tbody > tr:nth-of-type(even) {
  background-color: #161616;
}

body.dark-mode .badge.bg-light,
body.dark-mode .card.bg-light {
  background-color: #1f1f1f !important;
  color: #e9ecef;
}

body.dark-mode .badge.bg-light {
  border-color: #2c2c2c;
}

body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode textarea,
body.dark-mode input,
body.dark-mode select {
  background-color: #2c2c2c;
  color: #e9ecef;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
  box-shadow: 0 0 0 0.1rem #3d5a80, 0 0 0 0.25rem #0d6efd;
}

body.dark-mode .btn-link,
body.dark-mode .btn-link:hover,
body.dark-mode .btn-link:focus {
  color: #d8e9ff;
}

body.dark-mode footer,
body.dark-mode .footer {
  background-color: #1a1a1a;
  color: #bbbbbb;
}

.cut-pressure-rule {
  border: 1px solid #dbe7f4;
  border-radius: 0.75rem;
  background: #f8fbff;
  padding: 1rem;
}

.cut-pressure-metric {
  border-left: 0.35rem solid #cfd8e3;
}

.cut-pressure-metric-success {
  border-left-color: #198754;
}

.cut-pressure-metric-danger {
  border-left-color: #dc3545;
}

.cut-pressure-group {
  overflow: hidden;
  background: #fff;
}

.cut-pressure-mini-table th {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cut-pressure-why {
  min-width: 18rem;
}

.cut-pressure-filter-table {
  max-height: 30rem;
  overflow: auto;
}

.cut-pressure-filter-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.cut-pressure-order-row .form-check-input:indeterminate {
  background-color: #6c757d;
  border-color: #6c757d;
}

.cut-pressure-lines-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
}

body.dark-mode .cut-pressure-rule {
  background-color: #17202a;
  border-color: #2b3a49;
}

body.dark-mode .cut-pressure-group {
  background-color: #1e1e1e;
  border-color: #2b2b2b !important;
}

body.dark-mode .cut-pressure-order-lines-row .bg-light {
  background-color: #181818 !important;
}

body.dark-mode .invoice-report-toolbar {
  background: linear-gradient(135deg, #17202a 0%, #1d2b38 100%);
}

body.dark-mode .invoice-report-page .card-header.bg-white,
body.dark-mode .invoice-report-page .table-light {
  background-color: #1f1f1f !important;
  color: #e9ecef;
}

body.dark-mode .invoice-report-page .card-header {
  border-bottom-color: #2c2c2c;
}

.product-select-dropdown .select2-results__options {
  max-height: 28rem !important;
}

.overview-home {
  --overview-border: #d8e2ec;
  --overview-muted: #617386;
}

.overview-hero {
  border: 1px solid var(--overview-border);
  border-radius: 0.5rem;
  background: #f7fafc;
  padding: 1.5rem;
}

.overview-hero-copy {
  max-width: 44rem;
}

.overview-eyebrow {
  color: var(--overview-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-title {
  color: #1c2f43;
  font-size: 2.65rem;
  font-weight: 750;
  line-height: 1.05;
}

.overview-subtitle {
  color: #415367;
  font-size: 1.05rem;
}

.overview-chip {
  border: 1px solid var(--overview-border);
  border-radius: 999px;
  background: #fff;
  color: #34485c;
  font-size: 0.88rem;
  padding: 0.35rem 0.7rem;
}

.overview-hero-panel {
  min-width: min(100%, 31rem);
}

.overview-period-controls {
  border: 1px solid var(--overview-border);
  border-radius: 0.5rem;
  background: #fff;
  padding: 1rem;
}

.overview-date-field {
  min-width: 11rem;
}

.overview-metric-card {
  background: #fff;
  box-shadow: 0 0.35rem 1.2rem rgba(28, 47, 67, 0.06);
}

body.dark-mode .overview-home {
  --overview-border: #344455;
  --overview-muted: #a8b7c6;
}

body.dark-mode .overview-hero,
body.dark-mode .overview-period-controls,
body.dark-mode .overview-metric-card,
body.dark-mode .overview-chip {
  background-color: #1e1e1e;
  border-color: var(--overview-border);
}

body.dark-mode .overview-title {
  color: #f1f6fb;
}

body.dark-mode .overview-subtitle,
body.dark-mode .overview-chip {
  color: #d7e1eb;
}
