/* ==========================================================================
   H.D. Wire — Export Management System
   External Design System (do not import via build step — linked as static CSS)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   Reset — must come first, fixes stray default margins/backgrounds
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #F7F8FA;
  min-height: 100%;
}

.app-shell { min-height: 100vh; }

:root {
  /* Palette */
  --navy-950: #0A1A2A;
  --navy-900: #0F2438;
  --navy-800: #17324B;
  --navy-700: #204261;
  --navy-100: #E4EAF1;

  --amber-600: #C77D2E;
  --amber-500: #DB9645;
  --amber-100: #FBEBDA;

  --paper: #F7F8FA;
  --surface: #FFFFFF;
  --border: #DDE3EA;
  --border-strong: #C3CCD6;

  --ink-900: #101826;
  --ink-700: #3B4657;
  --ink-500: #6B7686;
  --ink-400: #8D96A3;

  --green-600: #1D7A4C;
  --green-100: #DFF3E7;
  --blue-600: #2158A6;
  --blue-100: #E1EAF7;
  --red-600: #B7333B;
  --red-100: #FBE4E5;
  --yellow-700: #8A6414;
  --yellow-100: #FBF0D6;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(15, 36, 56, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 36, 56, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 36, 56, 0.14);

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

/* ==========================================================================
   Base
   ========================================================================== */

body {
  font-family: var(--font-ui);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(199, 125, 46, 0.05), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(15, 36, 56, 0.04), transparent 40%);
  background-attachment: fixed;
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--amber-100); color: var(--navy-900); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-400); }

/* Type scale */
.page-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber-600);
  margin-bottom: 4px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--navy-950);
}

.section-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

.font-mono, .ref-code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

a { color: var(--blue-600); }

/* ==========================================================================
   App Shell — Sidebar Layout
   ========================================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
  color: var(--navy-100);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 2px 0 16px rgba(0,0,0,0.15);
}

.app-sidebar__brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

.app-sidebar__brand::after {
  content: '';
  position: absolute;
  left: 20px;
  bottom: -1px;
  width: 32px;
  height: 2px;
  background: var(--amber-600);
}

.app-sidebar__brand-name {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.01em;
}

.app-sidebar__brand-sub {
  font-size: 10.5px;
  color: var(--navy-100);
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 3px;
}

.app-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.app-sidebar__section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy-100);
  opacity: 0.35;
  padding: 16px 10px 7px;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--navy-100);
  opacity: 0.72;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 2px;
  position: relative;
  transition: background 0.15s ease, opacity 0.15s ease, padding-left 0.15s ease;
}

.app-nav-link:hover {
  background: rgba(255,255,255,0.055);
  opacity: 1;
  text-decoration: none;
  padding-left: 16px;
}

.app-nav-link.is-active {
  background: rgba(219, 150, 69, 0.14);
  color: #fff;
  opacity: 1;
  font-weight: 600;
}

.app-nav-link.is-active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--amber-600);
  border-radius: 0 3px 3px 0;
}

.app-sidebar__footer {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: var(--navy-100);
  opacity: 0.6;
}

.app-main {
  flex: 1;
  min-width: 0;
}

.app-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-topbar__title {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}

.app-content {
  padding: 22px 28px 48px;
  max-width: none;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.card__body { padding: 22px 24px; }

.card__header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border-strong);
}

.stat-card__label {
  font-size: 11.5px;
  color: var(--ink-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card__value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--navy-900);
  margin-top: 6px;
}

.stat-card--accent::before { background: var(--amber-600); }
.stat-card--green::before { background: var(--green-600); }
.stat-card--blue::before { background: var(--blue-600); }

/* ==========================================================================
   Document Group Cards — signature element (customs "stamp" top bar)
   Used on shipment show page: Export Customs / COO / LC groups
   ========================================================================== */

.doc-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.doc-group:hover { box-shadow: var(--shadow-md); }

.doc-group__bar {
  height: 5px;
  background-repeat: repeat-x;
  background-size: 14px 5px;
}

.doc-group--customs .doc-group__bar { background-color: var(--green-600); }
.doc-group--coo .doc-group__bar { background-color: var(--blue-600); }
.doc-group--lc .doc-group__bar { background-color: var(--amber-600); }

.doc-group__body { padding: 20px 22px; }

.doc-group__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.doc-group__icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.doc-group__icon svg { width: 18px; height: 18px; stroke-width: 1.8; fill: none; }

.doc-group--customs .doc-group__icon { background: var(--green-100); color: var(--green-600); }
.doc-group--coo .doc-group__icon { background: var(--blue-100); color: var(--blue-600); }
.doc-group--lc .doc-group__icon { background: var(--amber-100); color: var(--amber-600); }

.doc-group__title { font-size: 15px; font-weight: 700; color: var(--navy-950); }
.doc-group__subtitle { font-size: 12px; color: var(--ink-500); margin-top: 1px; }

.doc-group__desc {
  font-size: 12.5px;
  color: var(--ink-500);
  margin: 10px 0 14px;
  line-height: 1.5;
}

.doc-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--paper);
  color: var(--ink-700);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.doc-chip:hover {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.doc-chip svg { width: 14px; height: 14px; stroke-width: 2; fill: none; }

/* ==========================================================================
   Empty States
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 44px 24px;
  color: var(--ink-500);
}
.empty-state__icon {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  color: var(--ink-400);
}
.empty-state__title { font-size: 14px; font-weight: 600; color: var(--ink-700); margin-bottom: 4px; }
.empty-state__desc { font-size: 12.5px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn svg { width: 15px; height: 15px; stroke-width: 2; fill: none; }

.btn-primary { background: var(--navy-900); color: #fff; }
.btn-primary:hover { background: var(--navy-800); color: #fff; }

.btn-accent { background: var(--amber-600); color: #fff; }
.btn-accent:hover { background: var(--amber-500); color: #fff; }

.btn-outline { background: var(--surface); color: var(--ink-700); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--paper); color: var(--ink-900); }

.btn-success { background: var(--green-600); color: #fff; }
.btn-success:hover { background: #176B42; color: #fff; }

.btn-info { background: var(--blue-600); color: #fff; }
.btn-info:hover { background: #1B4A8E; color: #fff; }

.btn-warning { background: #C99A1F; color: #fff; }
.btn-warning:hover { background: #B0860F; color: #fff; }

.btn-danger { background: var(--red-600); color: #fff; }
.btn-danger:hover { background: #9C2A31; color: #fff; }

.btn-success-outline { background: var(--green-100); color: var(--green-600); border-color: #B4E1C6; }
.btn-success-outline:hover { background: #CDEBDA; color: var(--green-600); }

.btn-info-outline { background: var(--blue-100); color: var(--blue-600); border-color: #B9CCE9; }
.btn-info-outline:hover { background: #D3E1F4; color: var(--blue-600); }

.btn-warning-outline { background: var(--yellow-100); color: var(--yellow-700); border-color: #EBD69A; }
.btn-warning-outline:hover { background: #F5E4B8; color: var(--yellow-700); }

.btn-danger-outline { background: var(--red-100); color: var(--red-600); border-color: #F0BFC2; }
.btn-danger-outline:hover { background: #F8D2D4; color: var(--red-600); }

.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 12px 22px; font-size: 14.5px; }

.btn-danger-text { color: var(--red-600); font-weight: 600; font-size: 13px; background: none; border: none; cursor: pointer; }
.btn-danger-text:hover { text-decoration: underline; }

.btn-link-text { color: var(--blue-600); font-weight: 600; font-size: 13px; text-decoration: none; }
.btn-link-text:hover { text-decoration: underline; }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-pro {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-pro thead th {
  background: var(--navy-950);
  color: var(--navy-100);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 11px 16px;
}

.table-pro tbody td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--ink-700);
}

.table-pro tbody tr:hover { background: var(--paper); }

.table-pro tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius-md); }
.table-pro tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-md); }

/* ==========================================================================
   Status Badges — "seal stamp" signature
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.badge-draft { background: var(--yellow-100); color: var(--yellow-700); border-color: #EBD69A; }
.badge-sealed { background: var(--blue-100); color: var(--blue-600); border-color: #B9CCE9; }
.badge-shipped { background: #E4E9F7; color: var(--navy-700); border-color: #C6D0EE; }
.badge-completed { background: var(--green-100); color: var(--green-600); border-color: #B4E1C6; }

/* Stamp badge — larger, used on the shipment show page header */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border: 1.5px solid currentColor;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(-1.5deg);
  position: relative;
}
.stamp::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid currentColor;
  border-radius: 4px;
  opacity: 0.5;
}
.stamp-draft { color: var(--yellow-700); }
.stamp-sealed { color: var(--blue-600); }
.stamp-shipped { color: var(--navy-700); }
.stamp-completed { color: var(--green-600); }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 6px;
}

.form-label__required {
  color: var(--red-600);
  font-size: 13px;
}

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy-800);
  margin: 30px 0 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 9px;
}
.form-section-title:first-child { margin-top: 0; }

.form-section-title__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--navy-900);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ink-900);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--ink-400);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--amber-600);
  box-shadow: 0 0 0 3.5px rgba(199, 125, 46, 0.14);
  background: #fff;
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--ink-400); }

.form-input:disabled, .form-select:disabled { background: var(--paper); color: var(--ink-400); cursor: not-allowed; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7686' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-hint { font-size: 12px; color: var(--ink-500); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--red-600); margin-top: 5px; font-weight: 500; }

.form-grid { display: grid; gap: 18px; }
.form-grid--2 { grid-template-columns: repeat(2, 1fr); }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.form-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .form-grid--2, .form-grid--3, .form-grid--4 { grid-template-columns: 1fr; }
}

/* Form shell wrapping the whole page form */
.form-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.form-shell__body { padding: 28px 30px; }

.form-shell__actions {
  padding: 16px 30px;
  background: var(--paper);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: 18px;
}

.alert-success { background: var(--green-100); color: var(--green-600); border-color: #B4E1C6; }
.alert-error { background: var(--red-100); color: var(--red-600); border-color: #F0BFC2; }

/* ==========================================================================
   Repeatable Row Group (items / containers / coils in forms)
   ========================================================================== */

.row-group {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 16px 16px 44px;
  margin-bottom: 12px;
  background: var(--paper);
  position: relative;
  transition: border-color 0.15s ease;
}
.row-group:hover { border-color: var(--border-strong); }

.row-group__num {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy-900);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.row-group__remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-600);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  border: none;
  transition: background 0.15s ease;
}
.row-group__remove:hover { background: var(--red-100); }
.row-group__remove svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }

.add-row-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-800);
  background: var(--navy-100);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.add-row-btn:hover { background: #D8E1EC; border-color: var(--navy-700); }
.add-row-btn svg { width: 15px; height: 15px; stroke-width: 2.2; fill: none; }

/* ==========================================================================
   Pagination (Laravel default markup passthrough)
   ========================================================================== */

.pagination-wrap nav { font-size: 13px; }

/* ==========================================================================
   Table Action Buttons — global, used in every index/show table row
   ========================================================================== */

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-500);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.action-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

/* View — neutral navy */
.action-btn--view:hover {
  background: var(--navy-100);
  border-color: var(--navy-700);
  color: var(--navy-900);
}

/* Edit — amber accent */
.action-btn--edit:hover {
  background: var(--amber-100);
  border-color: var(--amber-600);
  color: var(--amber-600);
}

/* Delete — red, and slightly different resting state to signal caution */
.action-btn--delete {
  color: var(--red-600);
  border-color: #F0BFC2;
}
.action-btn--delete:hover {
  background: var(--red-100);
  border-color: var(--red-600);
  color: var(--red-600);
}

/* Wide variant — icon + label, for primary row actions like "Manage Coils" */
.action-btn--wide {
  width: auto;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
}

/* Delete forms sit inline with the icon buttons without breaking the flex row */
.table-actions form { display: inline-flex; margin: 0; }

/* ==========================================================================
   DataTables Reskin — matches .table-pro visual language
   ========================================================================== */

.dt-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 0 20px 4px;
  overflow: hidden;
  margin-top: 4px;
}

/* Top controls row (search + length) */
.dt-wrap .dataTables_wrapper > .row:first-child,
.dt-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  margin: 0 -20px 0;
  padding-left: 20px;
  padding-right: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.dataTables_length label,
.dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
  margin: 0;
  white-space: nowrap;
}

.dataTables_length select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 7px 30px 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7686' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 62px;
  height: 34px;
  cursor: pointer;
}
.dataTables_length select::-ms-expand { display: none; }

.dataTables_filter {
  display: flex;
  align-items: center;
}

.dataTables_filter label {
  position: relative;
  gap: 0;
}

.dataTables_filter input {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  direction: ltr !important;
  border: 1.5px solid var(--border-strong) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 14px 8px 36px !important;
  margin-left: 0 !important;
  font-size: 13px !important;
  width: 240px !important;
  height: 34px !important;
  background-color: var(--surface) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238D96A3' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 12px 50% !important;
  background-size: 15px 15px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dataTables_filter input:focus {
  outline: none;
  border-color: var(--amber-600);
  box-shadow: 0 0 0 3.5px rgba(199, 125, 46, 0.14);
}

/* Chrome/Safari inject their own search-field decorations even with appearance:none on some versions — kill them explicitly */
.dataTables_filter input[type="search"]::-webkit-search-decoration,
.dataTables_filter input[type="search"]::-webkit-search-cancel-button,
.dataTables_filter input[type="search"]::-webkit-search-results-button,
.dataTables_filter input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

/* The actual table */
table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

table.dataTable thead th {
  background: var(--navy-950);
  color: var(--navy-100);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 11px 16px !important;
  border-bottom: none !important;
}

table.dataTable thead th:first-child { border-top-left-radius: var(--radius-sm); }
table.dataTable thead th:last-child { border-top-right-radius: var(--radius-sm); }

/* Sort icons */
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
  opacity: 0.5;
  right: 12px !important;
}

table.dataTable tbody td {
  padding: 12px 16px !important;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--ink-700);
}

table.dataTable tbody tr:hover { background: var(--paper); }
table.dataTable.no-footer { border-bottom: none; }
table.dataTable.stripe tbody tr.odd { background: transparent; }

/* Bottom controls row (info + pagination) */
/* Bottom controls row (info + pagination) */
.dataTables_wrapper .row:last-child {
  padding: 14px 4px 16px;
  align-items: center;
}

.dataTables_info {
  font-size: 12.5px;
  color: var(--ink-500);
  padding-top: 0 !important;
  white-space: nowrap;
}

.dataTables_paginate {
  padding-top: 0 !important;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dataTables_paginate .paginate_button {
  padding: 7px 13px !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border) !important;
  color: var(--ink-700) !important;
  font-size: 12.5px !important;
  font-weight: 600;
  background: var(--surface) !important;
  margin: 0 !important;
  cursor: pointer;
  line-height: 1.2;
}
.dataTables_paginate .paginate_button:hover {
  background: var(--navy-100) !important;
  border-color: var(--navy-700) !important;
  color: var(--navy-900) !important;
}
.dataTables_paginate .paginate_button.current {
  background: var(--navy-900) !important;
  border-color: var(--navy-900) !important;
  color: #fff !important;
}
.dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.dataTables_paginate .paginate_button.disabled:hover {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--ink-700) !important;
}

.dataTables_wrapper .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0 !important;
}
.dataTables_wrapper .row > div { padding: 0 !important; }

/* Loading / processing indicator */
.dataTables_processing {
  background: var(--surface) !important;
  color: var(--ink-700) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md) !important;
  font-size: 13px !important;
  font-weight: 600;
}

@media (max-width: 640px) {
  .dt-controls, .dataTables_wrapper .row { flex-direction: column; align-items: stretch; }
  .dataTables_filter input { width: 100%; }
}



/* ==========================================================================
   DataTables Layout Fix
   Replaces the ".row"-based selectors in the DataTables Reskin section —
   vanilla DataTables (no Bootstrap adapter) never wraps controls in a
   ".row" div, so those rules were dead code. This targets the real
   DOM DataTables generates:

   <div class="dataTables_wrapper">
     <div class="dataTables_length">...</div>
     <div class="dataTables_filter">...</div>
     <table class="dataTable">...</table>
     <div class="dataTables_info">...</div>
     <div class="dataTables_paginate">...</div>
   </div>

   DELETE from the original stylesheet:
     - .dt-wrap .dataTables_wrapper > .row:first-child, .dt-controls { ... }
     - .dataTables_wrapper .row:last-child { ... }
     - .dataTables_wrapper .row { ... }
     - .dataTables_wrapper .row > div { ... }

   Then add everything below.
   ========================================================================== */

.dataTables_wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "length  filter"
    "table   table"
    "info    paginate";
  column-gap: 12px;
}

.dataTables_length {
  grid-area: length;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.dataTables_filter {
  grid-area: filter;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  justify-self: end;
  display: flex;
  align-items: center;
}

table.dataTable {
  grid-area: table;
  width: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.dataTables_info {
  grid-area: info;
  padding: 14px 0 16px;
  align-self: center;
}

.dataTables_paginate {
  grid-area: paginate;
  padding: 14px 0 16px;
  justify-self: end;
  align-self: center;
}

@media (max-width: 640px) {
  .dataTables_wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "length"
      "filter"
      "table"
      "info"
      "paginate";
  }
  .dataTables_filter,
  .dataTables_paginate {
    justify-self: stretch;
  }
  .dataTables_filter input {
    width: 100% !important;
  }
}



/* ==========================================================================
   DataTables Fix #2 — pagination number visibility + control-row alignment
   Replace the .dataTables_wrapper grid rules and .dataTables_paginate
   .paginate_button rules from the previous fix with the versions below.
   ========================================================================== */

.dt-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 0 20px 4px;
  overflow: hidden;
  margin-top: 4px;
}

.dataTables_wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "length  filter"
    "table   table"
    "info    paginate";
  column-gap: 12px;
}

/* Control row — matches the table's own left/right inset exactly */
.dataTables_length,
.dataTables_filter {
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.dataTables_length { grid-area: length; justify-self: start; }
.dataTables_filter { grid-area: filter; justify-self: end; }

table.dataTable {
  grid-area: table;
  width: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.dataTables_info {
  grid-area: info;
  padding: 16px 0;
  align-self: center;
  justify-self: start;
}

.dataTables_paginate {
  grid-area: paginate;
  padding: 12px 0;
  align-self: center;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Pagination buttons — fixed so the page number is always centered and visible */
.dataTables_paginate .paginate_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 12px !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border) !important;
  color: var(--ink-700) !important;
  font-size: 12.5px !important;
  font-weight: 600;
  line-height: 1 !important;
  background: var(--surface) !important;
  margin: 0 !important;
  cursor: pointer;
  box-sizing: border-box;
}

.dataTables_paginate .paginate_button:hover {
  background: var(--navy-100) !important;
  border-color: var(--navy-700) !important;
  color: var(--navy-900) !important;
}

.dataTables_paginate .paginate_button.current {
  background: var(--navy-900) !important;
  border-color: var(--navy-900) !important;
  color: #ffffff !important;
  font-weight: 700;
}

.dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.dataTables_paginate .paginate_button.disabled:hover {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--ink-700) !important;
}

@media (max-width: 640px) {
  .dataTables_wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "length"
      "filter"
      "table"
      "info"
      "paginate";
  }
  .dataTables_length,
  .dataTables_filter,
  .dataTables_info,
  .dataTables_paginate {
    justify-self: stretch;
  }
  .dataTables_filter input {
    width: 100% !important;
  }
}
/* ==========================================================================
   DataTables Fix #3 — bulletproof pagination number visibility
   Uses the table's own ID (#buyersTable_paginate is what DataTables
   auto-generates: {tableId}_paginate) so this wins the cascade even if
   an old .dataTables_paginate rule is still sitting elsewhere in the file.

   If you use this same table pattern elsewhere with a different table id
   (e.g. #shipmentsTable, #productsTable), duplicate this block and swap
   the id — or better, delete any old .paginate_button rules first so you
   only maintain one copy of this.
   ========================================================================== */

.dataTables_info {
  margin-top: 16px !important;
}

#buyersTable_paginate {
  margin-top: 16px !important;
}

#buyersTable_paginate .paginate_button {
  position: relative;
  display: inline-block !important;
  box-sizing: border-box !important;
  min-width: 34px;
  height: 34px;
  padding: 0 12px !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--ink-700) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  font-family: var(--font-ui) !important;
  text-align: center;
  line-height: 32px !important; /* height minus border, vertically centers text without flex */
  margin: 0 !important;
  cursor: pointer;
}

#buyersTable_paginate .paginate_button:hover {
  background: var(--navy-100) !important;
  border-color: var(--navy-700) !important;
  color: var(--navy-900) !important;
}

#buyersTable_paginate .paginate_button.current {
  background: var(--navy-900) !important;
  border-color: var(--navy-900) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

#buyersTable_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#buyersTable_paginate .paginate_button.disabled:hover {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--ink-700) !important;
}


/* ==========================================================================
   Additions for app.blade.php / sidebar.blade.php update
   Append to app-custom.css
   ========================================================================== */

/* Nav link icons */
.app-nav-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  flex-shrink: 0;
}

/* Mobile hamburger toggle — hidden on desktop, shown under 960px */
.sidebar-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-700);
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.sidebar-toggle-btn:hover {
  background: var(--paper);
  border-color: var(--border-strong);
}

/* Mobile sidebar close button (X) inside the sidebar itself */
.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--navy-100);
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-close-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.sidebar-close-btn:hover { background: rgba(255,255,255,0.15); }

/* Backdrop shown behind the sidebar on mobile when open */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 26, 42, 0.5);
  z-index: 150; /* below .app-sidebar's z-index (--z-sticky: 200) */
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.sidebar-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Cleaned-up logout button — replaces the inline-styled version */
.sidebar-logout-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-100);
  opacity: 0.75;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.sidebar-logout-btn:hover {
  opacity: 1;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
}

@media (max-width: 960px) {
  .sidebar-toggle-btn { display: inline-flex; }
  .sidebar-close-btn { display: inline-flex; }
  .sidebar-backdrop { display: block; }
}