:root {
  --navy: #1f2a44;
  --navy-2: #253556;
  --surface: #f5f7fb;
}

body {
  background: linear-gradient(180deg, #f4f7fb 0%, #edf1f7 100%);
  font-family: "Exo 2", sans-serif;
}

*,
*::before,
*::after {
  font-family: "Exo 2", sans-serif;
}

.bg-navy {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-2) 100%);
}

.app-navbar {
  z-index: 1030;
}

.navbar .nav-link-active {
  background: #ffffff;
  color: #1f2a44 !important;
  border-radius: 0.5rem;
  font-weight: 700;
}

.navbar .nav-link-active:hover,
.navbar .nav-link-active:focus {
  color: #1f2a44 !important;
  background: #ffffff;
}

.navbar .nav-link {
  padding-inline: 0.75rem;
  margin-inline: 0.1rem;
}

.navbar .nav-link:not(.nav-link-active) {
  color: rgba(255, 255, 255, 0.85) !important;
}

.navbar .nav-link:not(.nav-link-active):hover {
  color: #ffffff !important;
}

.stat-card {
  min-height: 110px;
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(31, 42, 68, 0.15), transparent 35%),
    radial-gradient(circle at bottom right, rgba(37, 53, 86, 0.15), transparent 35%),
    linear-gradient(180deg, #f8fbff 0%, #e9eef6 100%);
}

.table thead th {
  white-space: nowrap;
}

.card {
  border-radius: 1rem;
}

.form-control.bg-light,
.form-select.bg-light,
textarea.bg-light,
.form-control[readonly],
.form-select:disabled,
textarea[readonly] {
  color: #dc3545 !important;
  -webkit-text-fill-color: #dc3545;
  opacity: 1;
}

.form-control.bg-light::placeholder,
.form-control[readonly]::placeholder,
textarea.bg-light::placeholder,
textarea[readonly]::placeholder {
  color: rgba(220, 53, 69, 0.7);
}

.table-container {
  width: 100%;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 1rem;
}

.table-container table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}

.table-container thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #1f2a44;
  color: #fff;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #334;
  white-space: normal;
  line-height: 1.15;
  font-size: 0.82rem;
  padding: 0.65rem 0.55rem;
}

.table-container tbody td {
  border: 1px solid #ddd;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
  font-size: 0.9rem;
  padding: 0.55rem 0.5rem;
  text-align: center;
}

.items-table th:nth-child(1),
.items-table td:nth-child(1) { width: 7%; }
.items-table th:nth-child(2),
.items-table td:nth-child(2) { width: 5%; }
.items-table th:nth-child(3),
.items-table td:nth-child(3) { width: 11%; }
.items-table th:nth-child(4),
.items-table td:nth-child(4) { width: 7%; }
.items-table th:nth-child(5),
.items-table td:nth-child(5) { width: 4%; }
.items-table th:nth-child(6),
.items-table td:nth-child(6) { width: 13%; }
.items-table th:nth-child(7),
.items-table td:nth-child(7) { width: 7%; }
.items-table th:nth-child(8),
.items-table td:nth-child(8) { width: 5%; }
.items-table th:nth-child(9),
.items-table td:nth-child(9) { width: 6%; }
.items-table th:nth-child(10),
.items-table td:nth-child(10) { width: 7%; }
.items-table th:nth-child(11),
.items-table td:nth-child(11) { width: 7%; }
.items-table th:nth-child(12),
.items-table td:nth-child(12) { width: 7%; }
.items-table th:nth-child(13),
.items-table td:nth-child(13) { width: 8%; }

.items-table td:nth-child(1),
.items-table td:nth-child(11),
.items-table td:nth-child(12) {
  color: #dc3545;
  font-weight: 700;
}

.items-actions {
  display: flex;
  justify-content: center;
  align-items: center;
}

.items-actions .btn {
  width: auto;
  min-width: 6rem;
  white-space: nowrap;
  line-height: 1.05;
  padding-inline: 0.6rem;
}

.distribution-list-table th:nth-child(1),
.distribution-list-table td:nth-child(1) { width: 4%; }
.distribution-list-table th:nth-child(2),
.distribution-list-table td:nth-child(2) { width: 5%; }
.distribution-list-table th:nth-child(3),
.distribution-list-table td:nth-child(3) { width: 5%; }
.distribution-list-table th:nth-child(4),
.distribution-list-table td:nth-child(4) { width: 3%; }
.distribution-list-table th:nth-child(5),
.distribution-list-table td:nth-child(5) { width: 3%; }
.distribution-list-table th:nth-child(6),
.distribution-list-table td:nth-child(6) { width: 4%; }
.distribution-list-table th:nth-child(7),
.distribution-list-table td:nth-child(7) { width: 4%; }
.distribution-list-table th:nth-child(8),
.distribution-list-table td:nth-child(8) { width: 5%; }
.distribution-list-table th:nth-child(9),
.distribution-list-table td:nth-child(9) { width: 5%; }
.distribution-list-table th:nth-child(10),
.distribution-list-table td:nth-child(10) { width: 6%; }
.distribution-list-table th:nth-child(11),
.distribution-list-table td:nth-child(11) { width: 4%; }
.distribution-list-table th:nth-child(12),
.distribution-list-table td:nth-child(12) { width: 7%; }
.distribution-list-table th:nth-child(13),
.distribution-list-table td:nth-child(13) { width: 9%; }
.distribution-list-table th:nth-child(14),
.distribution-list-table td:nth-child(14) { width: 7%; }
.distribution-list-table th:nth-child(15),
.distribution-list-table td:nth-child(15) { width: 4%; }
.distribution-list-table th:nth-child(16),
.distribution-list-table td:nth-child(16) { width: 4%; }
.distribution-list-table th:nth-child(17),
.distribution-list-table td:nth-child(17) { width: 4%; }
.distribution-list-table th:nth-child(18),
.distribution-list-table td:nth-child(18) { width: 4%; }
.distribution-list-table th:nth-child(19),
.distribution-list-table td:nth-child(19) { width: 5%; }
.distribution-list-table th:nth-child(20),
.distribution-list-table td:nth-child(20) { width: 6%; }

.distribution-list-table thead th {
  font-size: 0.75rem;
  padding: 0.5rem 0.3rem;
}

.distribution-list-table tbody td {
  font-size: 0.8rem;
  padding: 0.4rem 0.3rem;
}

.distribution-list-table .text-break {
  text-align: center;
}

.distribution-list-table .btn {
  min-width: 4.75rem;
  white-space: nowrap;
}

.distribution-list-table .distribution-edit-btn {
  padding-inline: 0.55rem;
}

.distribution-list-table .distribution-obs-btn {
  min-width: 4.25rem;
  padding-inline: 0.55rem;
}

.distribution-list-table .distribution-info-red {
  color: #dc3545;
  font-weight: 700;
}

.distribution-list-table thead th.distribution-info-red {
  color: #ffffff;
}

.distribution-table-shell {
  position: relative;
  margin-top: 4.5rem;
}

.distribution-container {
  overflow-x: hidden;
}

.distribution-list-table {
  width: 100%;
  table-layout: fixed;
}

.distribution-list-table th,
.distribution-list-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.distribution-obs-card {
  position: absolute;
  top: -4rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 1rem);
  max-width: 1200px;
  z-index: 25;
}

.fornecedores-container {
  overflow-x: auto;
}

.fornecedores-table {
  min-width: 1900px;
}

.fornecedores-table thead th {
  font-size: 0.76rem;
  padding: 0.55rem 0.35rem;
  white-space: normal;
}

.fornecedores-table tbody td {
  font-size: 0.82rem;
  padding: 0.45rem 0.35rem;
}

.fornecedores-table th:nth-child(1),
.fornecedores-table td:nth-child(1) { width: 8%; }
.fornecedores-table th:nth-child(2),
.fornecedores-table td:nth-child(2) { width: 4%; }
.fornecedores-table th:nth-child(3),
.fornecedores-table td:nth-child(3) { width: 10%; }
.fornecedores-table th:nth-child(4),
.fornecedores-table td:nth-child(4) { width: 7%; }
.fornecedores-table th:nth-child(5),
.fornecedores-table td:nth-child(5) { width: 3%; }
.fornecedores-table th:nth-child(6),
.fornecedores-table td:nth-child(6) { width: 14%; }
.fornecedores-table th:nth-child(7),
.fornecedores-table td:nth-child(7) { width: 8%; }
.fornecedores-table th:nth-child(8),
.fornecedores-table td:nth-child(8) { width: 5%; }
.fornecedores-table th:nth-child(9),
.fornecedores-table td:nth-child(9) { width: 6%; }
.fornecedores-table th:nth-child(10),
.fornecedores-table td:nth-child(10) { width: 6%; }
.fornecedores-table th:nth-child(11),
.fornecedores-table td:nth-child(11) { width: 7%; }
.fornecedores-table th:nth-child(12),
.fornecedores-table td:nth-child(12) { width: 10%; }
.fornecedores-table th:nth-child(13),
.fornecedores-table td:nth-child(13) { width: 9%; }
.fornecedores-table th:nth-child(14),
.fornecedores-table td:nth-child(14) { width: 10%; }
.fornecedores-table th:nth-child(15),
.fornecedores-table td:nth-child(15) { width: 10%; }
.fornecedores-table th:nth-child(16),
.fornecedores-table td:nth-child(16) { width: 8%; }

.fornecedores-table th:nth-child(5),
.fornecedores-table th:nth-child(9) {
  text-align: center;
}

.detail-stack {
  display: grid;
  gap: 0.75rem;
}

.detail-stack > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  background: #f8fafc;
  border: 1px solid #e6ebf2;
  border-radius: 0.85rem;
}

.detail-label {
  color: #667085;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  font-weight: 600;
  text-align: right;
  color: #101828;
}

.detail-stack-compact {
  gap: 0.55rem;
}

.detail-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.2rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e6ebf2;
  border-radius: 0.85rem;
  flex-wrap: wrap;
}

.detail-line-label {
  color: #101828;
  font-weight: 700;
  white-space: nowrap;
}

.detail-line-value {
  color: #dc3545;
  font-weight: 700;
  min-width: 0;
}

.filters-panel {
  overflow: visible;
}

.filters-panel .row > [class*="col-"] {
  min-width: 0;
}

.filter-field {
  min-width: 0;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.searchable-select {
  position: relative;
  width: 100%;
}

.searchable-select.is-open .searchable-select-display,
.searchable-select.is-open .searchable-select-search-input {
  border-color: #4f7cff;
  box-shadow: 0 0 0 0.2rem rgba(79, 124, 255, 0.12);
}

.searchable-select-display {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 3.4rem 0.375rem 0.75rem;
  text-align: left;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) calc(50% - 0.15rem), calc(100% - 0.75rem) calc(50% - 0.15rem);
  background-size: 0.45rem 0.45rem, 0.45rem 0.45rem;
  background-repeat: no-repeat;
  border: 1px solid #d8dee8;
  border-radius: 0.5rem;
  color: #1f2a44;
  cursor: pointer;
}

.searchable-select-display:focus {
  outline: none;
}

.searchable-select-display.has-selection {
  color: #101828;
}

.searchable-select-clear {
  position: absolute;
  top: 50%;
  right: 2.15rem;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.searchable-select-clear:hover,
.searchable-select-clear:focus {
  background: #edf2ff;
  color: #173a8a;
  outline: none;
}

.searchable-select-display-label {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-select-highlight {
  background: #fff0a8;
  color: inherit;
  padding: 0;
}

.searchable-select-input {
  background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) calc(50% - 0.15rem), calc(100% - 0.75rem) calc(50% - 0.15rem);
  background-size: 0.45rem 0.45rem, 0.45rem 0.45rem;
  background-repeat: no-repeat;
  padding-right: 2.15rem;
}

.searchable-select-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 1060;
  max-height: 17rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: #ffffff;
  border: 1px solid rgba(31, 42, 68, 0.12);
  border-radius: 0.9rem;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.16);
  padding: 0.5rem;
}

.searchable-select-menu::-webkit-scrollbar {
  width: 10px;
}

.searchable-select-menu::-webkit-scrollbar-track {
  background: transparent;
}

.searchable-select-menu::-webkit-scrollbar-thumb {
  background: rgba(99, 115, 129, 0.35);
  border-radius: 999px;
  border: 2px solid #ffffff;
}

.searchable-select-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #1f2a44;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
}

.searchable-select-option:hover,
.searchable-select-option:focus {
  background: #edf2ff;
  outline: none;
}

.searchable-select-option.is-active {
  background: #dbe8ff;
  color: #173a8a;
  font-weight: 700;
}

.searchable-select-empty {
  padding: 0.75rem 0.8rem;
  color: #6b7280;
  font-size: 0.92rem;
}

.searchable-select-search-input {
  flex: 0 0 auto;
  margin-bottom: 0.2rem;
}

.searchable-select-options {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 0.1rem;
}
