/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */

html,
body {
  height: 100%;
}

.navbar-expand-lg .navbar-nav .nav-link {
  padding-right: 1rem !important;
  padding-left: 1rem !important;
}

.slot-order-status-complete {
  background-color: #0f4a36;
  color: white;
  padding: 5px;
  border: 1px solid #172b17;
  border-radius: 5px;
  margin: 5px;
}

.slot-order-status-part {
  background-color: #9c5a2b;
  color: white;
  padding: 5px;
  border: 1px solid #3a2a1c;
  border-radius: 5px;
  margin: 5px;
}


.slot-order-status-new {
  background-color: #1f6373;
  color: white;
  padding: 5px;
  border: 1px solid #143143;
  border-radius: 5px;
  margin: 5px;
}


.slot-order-status {
  background-color: #8e8e8e;
  color: white;
  padding: 5px;
  border: 1px solid #222222;
  border-radius: 5px;
  margin: 5px;
}


.la-logo {
  width: 290px;
}

.wrap {
  min-height: 100%;
  height: auto;
  margin: 0 auto -60px;
  padding: 0 0 60px;
}

.wrap > .jumbotron {
  padding: 108px 22px 14px;
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY & LINKS
   ═══════════════════════════════════════════════════════════════ */

a {
  color: var(--la-text-link);
  text-decoration: none;
  font-weight: bold;
}

.page-link {
  color: var(--la-text-link);
}

.hint-block {
  display: block;
  margin-top: 5px !important;
  color: var(--la-text-muted);
}

.not-set {
  color: #c55;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* ─── Panel ─────────────────────────────────────────────────────── */

.panel {
  background-color: var(--la-bg-surface);
  border: 1px solid var(--la-border);
  padding: 10px 14px;
  border-radius: var(--bs-border-radius);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}

.panel:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

.item.panel {
  background-color: var(--la-bg-surface);
}

.panel-heading {
  font-weight: bold;
}

/* ─── Footer ─────────────────────────────────────────────────────── */

.footer {
  height: 60px;
  background: linear-gradient(90deg, var(--la-bg-page) 0%, #f6f8fa 100%);
  border-top: 1px solid var(--la-border-footer);
  padding-top: 20px;
  box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.05);
}

/* ─── Nav link active state ──────────────────────────────────────── */

.nav-link.active {
  color: var(--la-bg-surface) !important;
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--bs-border-radius-sm);
}

/* ─── Tables ─────────────────────────────────────────────────────── */

.table {
  --bs-table-bg: var(--la-bg-surface);
  --bs-table-hover-bg: var(--la-bg-hover);
  --bs-table-border-color: var(--la-border-table);
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.table thead th {
  background: linear-gradient(180deg, var(--la-thead-from) 0%, var(--la-thead-to) 100%);
  color: var(--la-thead-color);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: none;
  padding: 10px 12px;
}

/* Sort links inside dark thead must be light, not the default grey */
.table thead th a,
.table thead th a:hover,
.kv-table-header th a,
.kv-table-header th a:hover {
  color: var(--la-thead-color);
  text-decoration: none;
}

.table thead th a:hover,
.kv-table-header th a:hover {
  color: var(--la-bg-surface);
  text-decoration: underline;
}

/* Sliding accent bar + soft inner glow on the leading cell */
.table tbody tr:hover > td,
.table tbody tr:hover > th {
  --bs-table-bg-state: var(--bs-table-hover-bg);
}

.table tbody tr:hover {
  cursor: pointer;
}

.table thead tr:hover > th,
.table thead tr:hover > td {
  --bs-table-bg-state: initial;
  cursor: default;
}

/* ─── GridView ───────────────────────────────────────────────────── */

.grid-view {
  background: var(--la-bg-surface);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.grid-view th {
  white-space: nowrap;
}

.kv-grid-container {
  padding: 5px;
}

/* ─── Forms ──────────────────────────────────────────────────────── */

.form-group {
  padding-bottom: 10px;
  padding-top: 10px;
}

.form-control {
  border-color: #c8d8e4;
  border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--la-accent-teal);
  box-shadow: 0 0 0 3px rgba(46, 160, 200, 0.15);
}

/* ─── Error summary ──────────────────────────────────────────────── */

.error-summary {
  color: #a94442;
  background: linear-gradient(90deg, #fdf7f7 0%, var(--la-bg-surface) 100%);
  border-left: 4px solid #e74c3c;
  border-radius: 0 var(--bs-border-radius-sm) var(--bs-border-radius-sm) 0;
  padding: 10px 20px;
  margin: 0 0 15px;
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.10);
}

/* ─── Badges ─────────────────────────────────────────────────────── */

.badge {
  --bs-badge-border-radius: var(--bs-border-radius-sm);
  --bs-badge-font-size: 11px;
  --bs-badge-padding-x: 7px;
  --bs-badge-padding-y: 3px;
  --bs-badge-font-weight: 600;
  letter-spacing: 0.03em;
}

/* ─── Pagination ─────────────────────────────────────────────────── */

.pagination {
  --bs-pagination-color: var(--la-primary-navy);
  --bs-pagination-border-color: #d8e6ef;
  --bs-pagination-hover-bg: var(--la-bg-subtle);
  --bs-pagination-hover-color: var(--la-text-heading);
  --bs-pagination-active-color: var(--la-bg-surface);
  --bs-pagination-active-bg: var(--la-primary-dark);
  --bs-pagination-active-border-color: var(--la-primary-dark);
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--la-primary-dark) 0%, var(--la-primary) 100%);
}

/* ─── Buttons ────────────────────────────────────────────────────── */

.btn-group {
  margin-right: 5px;
}

/* ─── URN info badges ────────────────────────────────────────────── */

span.urn-info {
  padding: 0 2px;
  font-weight: bold;
  color: white;
  background: gray;
}

span.urn-info[data-urn^=R] {
  background: red;
}

span.urn-info[data-urn^=G] {
  background: green;
}

span.urn-info[data-urn^=B] {
  background: blue;
}

span.urn-info[data-urn^=Y] {
  color: black;
  background: yellow;
}

[data-box-ship-packing-id] {
  cursor: pointer;
}

/* ─── Scrollbar (webkit) ─────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--la-scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--la-border-muted);
  border-radius: var(--bs-border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--la-primary);
}

/* ─── Modal z-index ──────────────────────────────────────────────── */

/* Ensure KrajeeDialog confirm/alert boxes appear above DynaGrid settings modals */
.bootstrap-dialog.modal {
  z-index: 1065 !important;
}

.modal-backdrop ~ .modal-backdrop {
  z-index: 1060 !important;
}

/* ═══════════════════════════════════════════════════════════════
   SORTWALL OVERVIEW GRID
   ═══════════════════════════════════════════════════════════════ */

.sw-grid {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.sw-slot {
  border: 2px solid #ccc;
  border-radius: 6px;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.sw-slot.free {
  background-color: #d4edda;
  border-color: #28a745;
}

.sw-slot.occupied {
  background-color: #fff3cd;
  border-color: #ffc107;
}

.sw-slot .slot-container {
  font-weight: bold;
  font-size: 14px;
}

.sw-slot .slot-order {
  color: #6c757d;
  font-size: 11px;
}

.sw-slot .slot-status {
  font-size: 11px;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   ARTICLE SEARCH
   ═══════════════════════════════════════════════════════════════ */

.la-search-panel {
  margin: 14px 0 8px;
}

.la-search-panel.la-search-inline {
  margin: 0;
  display: inline-block;
  vertical-align: middle;
}

.la-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 520px;
  background: #fff;
  border: 1.5px solid #c8d0db;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.la-search-inline .la-search-wrap {
  max-width: 280px;
  height: 38px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: none;
}

.la-search-inline .la-search-input {
  padding: 6px 6px 6px 0;
  font-size: 14px;
}

.la-search-wrap:focus-within {
  border-color: #3c8dbc;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, .13), 0 1px 4px rgba(0, 0, 0, .08);
  background: #f8fbff;
}

.la-search-icon {
  flex: 0 0 auto;
  padding: 0 10px 0 13px;
  font-size: 13px;
  color: #b0bac6;
  pointer-events: none;
  transition: color .18s ease;
}

.la-search-wrap:focus-within .la-search-icon {
  color: #3c8dbc;
}

.la-search-input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  background: transparent;
  padding: 8px 6px 8px 0;
  font-size: 13.5px;
  color: #2d3748;
  font-family: inherit;
  line-height: 1.4;
  min-width: 0;
}

.la-search-input::placeholder {
  color: #a0aab8;
  font-style: italic;
}

.la-search-clear {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 5px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #a0aab8;
  font-size: 11px;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
  padding: 0;
}

.la-search-clear:hover {
  background: #f0f4f8;
  color: #e74c3c;
}

.la-search-hint {
  display: none;
}

mark.la-highlight {
  background: #f8d7da;
  color: #c0392b;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 600;
}

/* Make expand-all icon visible on dark header */
.kv-expand-header-cell .kv-expand-header-icon {
  color: #fff;
}

/* PHPInfo iframe */
.phpinfo-frame {
  width: 100%;
  height: 420px;
  border: none;
  display: block;
  scrollbar-width: thin;
  scrollbar-color: #90a4ae #e8ecef;
}

.phpinfo-frame::-webkit-scrollbar {
  width: 8px;
}

.phpinfo-frame::-webkit-scrollbar-track {
  background: #e8ecef;
  border-radius: 4px;
}

.phpinfo-frame::-webkit-scrollbar-thumb {
  background: #90a4ae;
  border-radius: 4px;
}

.phpinfo-frame::-webkit-scrollbar-thumb:hover {
  background: #607d8b;
}

/* ─── Item image thumbnail ──────────────────────────────────────── */

.item-thumb {
  height: 40px;
  width: auto;
  cursor: pointer;
  border-radius: 3px;
}

.item-thumb-popup {
  max-width: 300px;
  max-height: 300px;
}

/* ─── Boxpacker 3D visualisation back button ────────────────────── */

.back-button {
  position: fixed;
  top: 1em;
  left: 1em;
  z-index: 10;
  pointer-events: all;
}
