/* HL Empire - Silica Silo Management System v2 */
:root {
  --gold-gradient: linear-gradient(to right, #BD8842 0%, #ECC961 50%, #BD8842 100%);
  --gold-dark: #BD8842;
  --gold-light: #ECC961;
  --black: #000000;
  --black-soft: #0a0a0a;
  --black-mid: #111111;
  --black-light: #1a1a1a;
  --dark-blue: #000000;
  --dark-blue-mid: #000000;
  --dark-blue-light: #1a1a1a;
  --accent-blue: #BD8842;
  --white: #ffffff;
  --off-white: #fafafa;
  --light-gray: #f0f0f0;
  --medium-gray: #d4d4d4;
  --border-gray: #e5e5e5;
  --text-dark: #000000;
  --text-gray: #444444;
  --text-muted: #666666;
  --green: #15803d;
  --green-light: #22c55e;
  --green-bg: #dcfce7;
  --orange: #c2410c;
  --orange-light: #f97316;
  --orange-bg: #ffedd5;
  --red: #b91c1c;
  --red-light: #ef4444;
  --red-bg: #fee2e2;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --header-height: 72px;
  --nav-height: 48px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--text-dark);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

/* ========== HEADER ========== */
.app-header {
  background: var(--black);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  border-bottom: none;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(1.5rem, env(safe-area-inset-right, 0px)) 0 max(1.5rem, env(safe-area-inset-left, 0px));
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.logo-badge {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--black);
  color: var(--gold-light);
  font-weight: 800;
  font-size: 1rem;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.header-logo {
  height: 48px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 0;
  background: transparent;
}

.header-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  min-width: 0;
}

.header-title span {
  display: block;
  font-size: 0.78rem;
  opacity: 0.85;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.header-datetime {
  text-align: right;
  font-size: 0.82rem;
  opacity: 0.95;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(236, 201, 97, 0.35);
  color: var(--white);
}

.header-datetime .date {
  font-size: 0.75rem;
  opacity: 0.85;
}

.header-datetime .time {
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--gold-light);
}

/* ========== STATUS BAR ========== */
.status-bar-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border-gray);
  box-shadow: var(--shadow-sm);
}

.status-bar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.status-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  padding: 0.45rem 0.85rem;
  background: var(--off-white);
  border: 1px solid var(--border-gray);
  border-radius: 999px;
  white-space: nowrap;
}

.status-item.total {
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--gold-dark);
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.status-item.total .status-label,
.status-item.total .status-value {
  color: var(--white);
}

.status-label {
  color: var(--text-gray);
  font-weight: 500;
}

.status-value {
  font-weight: 700;
  color: var(--text-dark);
}

.status-empty {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 500;
}

/* ========== NAVIGATION ========== */
.app-nav {
  background: var(--black);
  display: flex;
  flex-wrap: wrap;
  padding: 0 0.75rem;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.nav-toggle,
.nav-overlay {
  display: none;
}

.nav-toggle {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(236, 201, 97, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1090;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nav-link.active {
  background: rgba(236, 201, 97, 0.15);
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

/* ========== MAIN CONTENT ========== */
.main-content {
  padding: 1.75rem 1.5rem 2.5rem;
  padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}

.page-title {
  font-size: 1.75rem;
  color: var(--black);
  margin-bottom: 0.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-title + .alert,
.main-content > .alert:first-of-type {
  margin-top: 1rem;
}

.page-subtitle {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* ========== SILO GRID ========== */
.silo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.silo-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-gray);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.silo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.silo-header {
  background: var(--black);
  color: var(--white);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--gold-dark);
}

.silo-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.silo-afs-badge {
  background: var(--gold-gradient);
  color: var(--black);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  border: 1px solid var(--gold-light);
  box-shadow: 0 2px 10px rgba(236, 201, 97, 0.4);
  letter-spacing: 0.02em;
}

.silo-body {
  padding: 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

/* Silo tank graphic — industrial cylindrical silo (not phone-shaped) */
.silo-graphic {
  width: 96px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 2px 14px;
}

.silo-roof {
  position: relative;
  width: 82px;
  height: 14px;
  background: linear-gradient(180deg, #94a3b8 0%, #cbd5e1 45%, #e2e8f0 100%);
  border: 3px solid var(--black);
  border-bottom: none;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  z-index: 3;
  box-shadow: inset 0 3px 6px rgba(255, 255, 255, 0.45);
}

.silo-roof::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 16px;
  background: linear-gradient(90deg, #64748b 0%, #94a3b8 50%, #64748b 100%);
  border: 2px solid var(--black);
  border-radius: 3px 3px 0 0;
  z-index: 4;
}

.silo-tank {
  width: 82px;
  height: 120px;
  border-left: 3px solid var(--black);
  border-right: 3px solid var(--black);
  border-bottom: 3px solid var(--black);
  border-radius: 0;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 23px,
      rgba(15, 39, 68, 0.05) 23px,
      rgba(15, 39, 68, 0.05) 24px
    ),
    linear-gradient(90deg, #d8dee8 0%, #f1f5f9 18%, #e8edf3 50%, #f1f5f9 82%, #d8dee8 100%);
  box-shadow:
    inset 5px 0 10px rgba(0, 0, 0, 0.04),
    inset -5px 0 10px rgba(0, 0, 0, 0.06);
}

.silo-tank::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.06) 100%);
  z-index: 2;
  pointer-events: none;
}

.silo-tank::after {
  content: '';
  position: absolute;
  top: 0;
  right: 10px;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.07) 0%, rgba(0, 0, 0, 0.02) 100%);
  z-index: 2;
  pointer-events: none;
}

.silo-hopper {
  position: relative;
  width: 82px;
  height: 20px;
  margin-top: -1px;
}

.silo-hopper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
  clip-path: polygon(0 0, 100% 0, 72% 100%, 28% 100%);
  box-shadow:
    inset 3px 0 0 var(--black),
    inset -3px 0 0 var(--black),
    inset 0 -3px 0 var(--black);
  box-sizing: border-box;
}

.silo-hopper::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 11px;
  background: linear-gradient(90deg, #475569 0%, #64748b 50%, #475569 100%);
  border: 2px solid var(--black);
  border-radius: 0 0 4px 4px;
  z-index: 2;
}

.silo-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0;
  z-index: 0;
  background-color: #bd8842db;
  background-image:
    radial-gradient(circle at 25% 75%, rgba(255, 255, 255, 0.3) 0.8px, transparent 0.8px),
    radial-gradient(circle at 70% 30%, rgba(0, 0, 0, 0.08) 0.6px, transparent 0.6px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(to top, #8f6528 0%, #bd8842 35%, #d4a85a 65%, #ecc961db 100%);
  background-size: 7px 7px, 11px 11px, 9px 9px, 100% 100%;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1), 0 -3px 8px rgba(189, 136, 66, 0.35);
}

.silo-fill::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -8%;
  width: 116%;
  height: 10px;
  background: radial-gradient(ellipse at center, #ecc961 0%, #bd8842db 55%, transparent 100%);
  border-radius: 50%;
  pointer-events: none;
}

.silo-fill.green,
.silo-fill.orange,
.silo-fill.red {
  background-color: #bd8842db;
  background-image:
    radial-gradient(circle at 25% 75%, rgba(255, 255, 255, 0.3) 0.8px, transparent 0.8px),
    radial-gradient(circle at 70% 30%, rgba(0, 0, 0, 0.08) 0.6px, transparent 0.6px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(to top, #8f6528 0%, #bd8842 35%, #d4a85a 65%, #ecc961db 100%);
  background-size: 7px 7px, 11px 11px, 9px 9px, 100% 100%;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1), 0 -3px 8px rgba(189, 136, 66, 0.35);
}

.silo-info {
  flex: 1;
  min-width: 0;
}

.silo-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-gray);
  gap: 0.5rem;
}

.silo-info-row:last-of-type {
  border-bottom: none;
}

.silo-info-label {
  color: var(--text-gray);
  font-weight: 500;
  font-size: 0.8rem;
}

.silo-info-value {
  font-weight: 700;
  color: var(--text-dark);
  text-align: right;
}

.silo-info-row-qty {
  background: linear-gradient(to right, rgba(189, 136, 66, 0.1), rgba(236, 201, 97, 0.16));
  border: 1px solid rgba(189, 136, 66, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  margin: 0.2rem 0;
}

.silo-info-row-qty .silo-info-label {
  color: var(--text-dark);
  font-weight: 700;
}

.silo-info-row-qty .silo-info-value {
  color: var(--gold-dark);
  font-size: 1.05rem;
  font-weight: 800;
}

.silo-alert {
  margin-top: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.silo-alert.low {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid var(--orange-light);
}

.silo-alert.near {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-light);
}

/* ========== FORMS ========== */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  max-width: 760px;
  border: 1px solid var(--border-gray);
}

.form-card h3 {
  color: var(--black);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  margin-bottom: 0.25rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-label .required {
  color: var(--red);
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--border-gray);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 4px rgba(189, 136, 66, 0.25);
}

.form-control:disabled,
.form-control[readonly] {
  background: var(--light-gray);
  color: var(--text-gray);
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.calc-display {
  background: var(--green-bg);
  border: 2px solid var(--green-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-weight: 800;
  color: var(--green);
  font-size: 1.2rem;
  text-align: center;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.2;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--black);
}

.btn-primary:hover {
  background: var(--black-light);
  border-color: var(--gold-dark);
}

.btn-success {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: var(--white);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red), var(--red-light));
  color: var(--white);
}

.btn-warning {
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--text-dark);
  border: 2px solid var(--border-gray);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
}

.btn-group {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* ========== ALERTS ========== */
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 4px solid;
}

.alert-error {
  background: var(--red-bg);
  color: var(--red);
  border-left-color: var(--red);
}

.alert-success {
  background: var(--green-bg);
  color: var(--green);
  border-left-color: var(--green);
}

.alert-info {
  background: #faf5eb;
  color: var(--black);
  border-left-color: var(--gold-dark);
}

.alert-warning {
  background: var(--orange-bg);
  color: var(--orange);
  border-left-color: var(--orange);
}

.hidden {
  display: none !important;
}

/* ========== TABLES ========== */
.table-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-gray);
}

.table-card-title {
  margin: 0;
  padding: 1.35rem 1.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
}

.form-card-title {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
}

.orders-page-section {
  max-width: 100%;
  margin-bottom: 1.5rem;
}

.form-card.orders-page-section {
  max-width: 100%;
}

.table-card .table-toolbar {
  margin-top: 1rem;
  padding: 1rem 1.5rem 1.25rem;
}

.table-card .table-wrap {
  padding: 0 1.5rem 1.5rem;
}

.table-card-title + .table-wrap {
  padding-top: 0.75rem;
}

/* ========== SEARCHABLE SELECT ========== */
.search-select {
  position: relative;
}

.search-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-select-input {
  width: 100%;
  cursor: text;
}

.search-select-input.has-value {
  font-weight: 600;
}

.search-select-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 100;
}

.search-select.open .search-select-list {
  display: block;
}

.search-select-item {
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s;
}

.search-select-item:hover,
.search-select-item.active {
  background: var(--off-white);
}

.search-select-item.selected {
  background: #faf5eb;
  color: var(--black);
  font-weight: 700;
}

.search-select-empty {
  padding: 0.85rem 0.9rem;
  color: var(--text-gray);
  font-size: 0.88rem;
  text-align: center;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-gray);
  background: var(--off-white);
  padding: 1.25rem;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-width: 100%;
}

.table-wrap .data-table {
  min-width: 640px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  background: var(--black);
  color: var(--white);
  padding: 0.85rem 0.75rem;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--gold-dark);
}

.data-table th:hover {
  background: var(--black-light);
}

.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-gray);
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: var(--off-white);
}

.data-table .actions {
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-feed { background: var(--green-bg); color: var(--green); }
.badge-dispatch { background: var(--red-bg); color: var(--red); }
.badge-adjustment { background: var(--orange-bg); color: var(--orange); }
.badge-reset { background: #fce7f3; color: #be185d; }
.badge-initial { background: #dbeafe; color: #1d4ed8; }

/* ========== DISPATCH SOURCES ========== */
.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
  padding: 1.25rem;
  background: var(--light-gray);
  border-radius: var(--radius);
  border: 1px solid var(--border-gray);
}

.source-item label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.source-item .silo-stock {
  font-size: 0.78rem;
  color: var(--text-gray);
  margin-bottom: 0.4rem;
  min-height: 2.5rem;
}

.source-total {
  text-align: center;
  padding: 1rem;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1rem;
  transition: background 0.3s;
  border-bottom: 3px solid var(--gold-dark);
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-gray);
}

.modal-header {
  background: var(--black);
  color: var(--white);
  padding: 1.1rem 1.35rem;
  font-weight: 800;
  font-size: 1.05rem;
  border-bottom: 3px solid var(--gold-dark);
}

.modal-body {
  padding: 1.35rem;
}

.modal-footer {
  padding: 1rem 1.35rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  border-top: 1px solid var(--border-gray);
  background: var(--off-white);
}

/* ========== SETUP ========== */
.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.setup-silo-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border-gray);
  border-top: 4px solid var(--black);
}

.setup-silo-card h3 {
  color: var(--black);
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
  font-weight: 800;
}

/* ========== REPORTS ========== */
.report-table {
  margin-top: 1.5rem;
}

.settings-section {
  max-width: 540px;
}

.settings-section + .settings-section {
  margin-top: 1.5rem;
}

/* ========== LOADING ========== */
.loading {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-gray);
  grid-column: 1 / -1;
}

.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-gray);
  border-top-color: var(--gold-dark);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== QUICK ACTIONS (Dashboard) ========== */
.quick-actions {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-gray);
  box-shadow: var(--shadow-sm);
}

.quick-actions-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-gray);
  margin-bottom: 1rem;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 769px) {
  .app-chrome {
    position: sticky;
    top: var(--header-height);
    z-index: 998;
  }

  .status-bar {
    flex-wrap: nowrap;
    padding-left: max(1.5rem, calc((100vw - 1440px) / 2 + 1.5rem));
    padding-right: max(1.5rem, calc((100vw - 1440px) / 2 + 1.5rem));
  }

  .status-bar-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .app-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-left: max(1.5rem, calc((100vw - 1440px) / 2 + 1.5rem));
    padding-right: max(1.5rem, calc((100vw - 1440px) / 2 + 1.5rem));
    box-sizing: border-box;
  }
}

@media (min-width: 1025px) {
  .silo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .silo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .setup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .header-datetime {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }

  .header-datetime .time {
    font-size: 1.1rem;
  }

  .header-datetime .date {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 58px;
  }

  .header-inner {
    height: var(--header-height);
    flex-wrap: nowrap;
    padding: 0.65rem max(1rem, env(safe-area-inset-right, 0px)) 0.65rem max(1rem, env(safe-area-inset-left, 0px));
  }

  .header-left {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-datetime {
    display: none;
  }

  .header-logo {
    display: none;
  }

  .logo-badge {
    display: flex;
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .header-title {
    font-size: 0.92rem;
    overflow: hidden;
  }

  .header-title span {
    font-size: 0.68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-overlay {
    display: block;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav-overlay {
    opacity: 1;
    visibility: visible;
  }

  .status-bar-wrap {
    position: relative;
    top: auto;
    overflow: visible;
    max-height: none;
  }

  .status-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.75rem max(1rem, env(safe-area-inset-right, 0px)) 0.75rem max(1rem, env(safe-area-inset-left, 0px));
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  .status-item {
    white-space: normal;
    width: auto;
    min-width: 0;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.72rem;
    padding: 0.5rem 0.55rem;
    border-radius: var(--radius-sm);
    line-height: 1.35;
  }

  .status-item.total {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.78rem;
  }

  .app-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(82vw, 300px);
    flex-direction: column;
    flex-wrap: nowrap;
    padding: calc(var(--header-height) + 1rem) 0 max(1.5rem, env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s ease;
    z-index: 1100;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
  }

  body.nav-open .app-nav {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-link {
    width: 100%;
    padding: 0.95rem 1.25rem;
    font-size: 0.95rem;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .nav-link.active {
    border-left-color: var(--gold-light);
    border-bottom-color: transparent;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 1.25rem;
    max-width: 100%;
  }

  .silo-body {
    flex-direction: column;
    align-items: center;
  }

  .silo-info {
    width: 100%;
  }

  .silo-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .silo-grid {
    gap: 1rem;
    margin: 1rem 0 1.5rem;
  }

  .main-content {
    padding: 1.25rem max(1rem, env(safe-area-inset-right, 0px)) max(2rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  }

  .page-title {
    font-size: 1.4rem;
    word-break: break-word;
  }

  .page-subtitle {
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .table-toolbar .form-group {
    width: 100%;
  }

  .table-toolbar .btn {
    width: 100%;
  }

  .table-card-title {
    padding: 1.1rem 1rem 0;
    font-size: 1rem;
  }

  .table-card .table-toolbar {
    padding: 0.85rem 1rem 1rem;
  }

  .table-card .table-wrap {
    padding: 0 1rem 1.25rem;
  }

  .orders-list-card .table-wrap {
    overflow-x: hidden;
    padding: 1rem;
  }

  .orders-list-card .table-wrap .data-table {
    min-width: 0;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.65rem 0.55rem;
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .btn-group .btn {
    width: 100%;
    justify-content: center;
  }

  .quick-actions {
    padding: 1rem 1.1rem;
  }

  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem;
  }

  .setup-grid {
    gap: 1rem;
  }

  .setup-silo-card {
    padding: 1.15rem;
  }

  .settings-section {
    max-width: 100%;
  }

  .modal-overlay {
    align-items: flex-start;
    padding: 0.5rem;
    padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
  }

  .modal,
  .modal-lg {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 1rem);
    display: flex;
    flex-direction: column;
    margin: auto 0;
  }

  .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-lg .modal-body,
  .modal-lg .modal-header,
  .modal-lg .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .modal-lg .modal-header {
    font-size: 1.05rem;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
  }

  .modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.65rem;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .orders-list-card .status-action-cell {
    flex-direction: column;
    align-items: flex-start;
  }

  .orders-list-card .data-table th:last-child,
  .orders-list-card .data-table td:last-child {
    min-width: 150px;
  }

  .orders-list-card .status-action-cell .btn-sm {
    width: 100%;
    justify-content: center;
  }

  .form-control,
  .search-select-input,
  select.form-control,
  textarea.form-control {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .header-title span {
    display: none;
  }

  .header-title {
    font-size: 0.85rem;
    line-height: 1.25;
  }

  .status-bar {
    gap: 0.4rem;
    padding: 0.65rem max(0.75rem, env(safe-area-inset-right, 0px)) 0.65rem max(0.75rem, env(safe-area-inset-left, 0px));
  }

  .status-item {
    font-size: 0.68rem;
    padding: 0.45rem 0.4rem;
  }

  .status-item.total {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .silo-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .silo-card:hover {
    transform: none;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 1rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .table-wrap .data-table:not(.mobile-accordion-active) {
    min-width: 560px;
  }

  .orders-list-card .table-wrap {
    overflow-x: hidden;
    padding: 1rem;
  }

  .orders-list-card .table-wrap .data-table {
    min-width: 0;
  }

  .calc-display {
    font-size: 1rem;
    padding: 0.75rem;
  }
}

@media (max-width: 360px) {
  .logo-badge {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .nav-toggle {
    width: 38px;
    height: 38px;
  }

  .status-bar {
    grid-template-columns: 1fr;
  }

  .status-item.total {
    grid-column: 1;
  }

  .orders-subnav a {
    font-size: 0.7rem;
    padding: 0.5rem 0.35rem;
  }

  .btn {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }
}

/* ========== ORDERS MODULE ========== */
.orders-subnav {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  margin: 0;
  padding: 0.35rem;
  background: var(--black);
  border-radius: var(--radius);
  border: 2px solid var(--gold-dark);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 360px;
}

.orders-subnav a {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.62rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.orders-subnav a:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.orders-subnav a:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.orders-subnav a.active {
  background: var(--gold-gradient);
  color: var(--black);
  box-shadow: 0 2px 10px rgba(189, 136, 66, 0.45);
}

.page-top-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
}

.status-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
}

.status-badge-clickable {
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.status-badge-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.status-transport { background: #e0f2fe; color: #0369a1; border-color: #7dd3fc; }
.status-vehicle-na { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.status-arrived { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
.status-loading { background: #ffedd5; color: #c2410c; border-color: #fdba74; }
.status-billing { background: #fce7f3; color: #be185d; border-color: #f9a8d4; }
.status-cancel-client { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.status-cancel-hl { background: #fecaca; color: #991b1b; border-color: #f87171; }
.status-dispatched { background: #dcfce7; color: #15803d; border-color: #86efac; }
.status-default { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }

.modal-order-summary {
  background: var(--off-white);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1rem;
  font-size: 0.88rem;
}

.modal-order-summary .summary-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
  margin-bottom: 0.15rem;
}

.modal-order-summary .summary-value {
  font-weight: 700;
  color: var(--black);
}

.modal-vehicle-fields {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-gray);
}

.modal-vehicle-fields .vehicle-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold-dark);
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.modal-close-hint {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-top: 0.5rem;
}

.modal-lg {
  max-width: 1140px;
  width: 96%;
}

.modal-lg .modal-body {
  padding: 1.75rem 2rem;
}

.modal-lg .modal-header {
  padding: 1.35rem 2rem;
  font-size: 1.15rem;
}

.modal-lg .modal-footer {
  padding: 1.15rem 2rem;
}

.page-top-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-top-bar .page-title {
  margin-bottom: 0;
}

.page-top-actions {
  flex-shrink: 0;
  align-self: flex-end;
}

@media (max-width: 768px) {
  .page-top-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-top-left {
    width: 100%;
    align-items: stretch;
  }

  .orders-subnav {
    max-width: none;
  }

  .page-top-actions {
    width: 100%;
    align-self: stretch;
  }

  .page-top-actions .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .orders-subnav a {
    font-size: 0.76rem;
    padding: 0.55rem 0.45rem;
  }
}

.status-action-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.orders-list-card .data-table th,
.orders-list-card .data-table td {
  padding: 0.9rem 1rem;
}

.orders-list-card .data-table th:last-child,
.orders-list-card .data-table td:last-child {
  white-space: nowrap;
}

@media (min-width: 769px) {
  .orders-list-card .data-table th:last-child,
  .orders-list-card .data-table td:last-child {
    min-width: 200px;
  }
}

.orders-list-card .status-action-cell {
  gap: 0.65rem;
}

.orders-list-card .status-action-cell .btn-sm {
  white-space: nowrap;
}

.orders-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-gray);
  margin: 0;
}

.modal-company-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.1rem;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold-dark);
}

.modal-company-name .modal-company-label {
  color: var(--text-gray);
  font-weight: 800;
  margin-right: 0.35rem;
}

@media (max-width: 600px) {
  .modal-order-summary {
    grid-template-columns: 1fr;
  }

  .modal {
    max-width: 100%;
    margin: 0;
    border-radius: var(--radius-sm);
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .modal-company-name {
    font-size: 0.92rem;
    padding: 0.75rem;
    word-break: break-word;
  }
}

@media (hover: hover) and (pointer: fine) {
  .silo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
}

@media (hover: none) {
  .silo-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  .btn:hover {
    transform: none;
  }
}

/* ========== ORDERS MOBILE ACCORDION (table design unchanged) ========== */
@media (max-width: 768px) {
  .orders-list-card .table-wrap {
    overflow-x: hidden;
    padding: 1rem;
  }

  .orders-list-card .data-table.mobile-accordion-active {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  .orders-list-card .data-table.mobile-accordion-active th,
  .orders-list-card .data-table.mobile-accordion-active td {
    padding: 0.5rem;
    vertical-align: middle;
  }

  .orders-list-card .data-table.mobile-accordion-active th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    font-size: 0.62rem;
    letter-spacing: 0;
    text-transform: none;
    hyphens: none;
  }

  .orders-list-card .data-table.mobile-accordion-active td {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: top;
  }

  .orders-list-card .data-table.mobile-accordion-active :is(th, td):nth-child(1) {
    width: 22%;
  }

  .orders-list-card .data-table.mobile-accordion-active :is(th, td):nth-child(3) {
    width: 28%;
  }

  .orders-list-card .data-table.mobile-accordion-active :is(th, td):nth-child(9) {
    width: 50%;
    min-width: 0;
  }

  .orders-list-card .data-table.mobile-accordion-active :is(th):nth-child(1),
  .orders-list-card .data-table.mobile-accordion-active :is(th):nth-child(3),
  .orders-list-card .data-table.mobile-accordion-active :is(th):nth-child(9) {
    max-width: 0;
  }

  .orders-list-card .data-table.mobile-accordion-active td:nth-child(1),
  .orders-list-card .data-table.mobile-accordion-active td:nth-child(3) {
    vertical-align: middle;
  }

  .orders-list-card .data-table.mobile-accordion-active th:last-child,
  .orders-list-card .data-table.mobile-accordion-active td:last-child {
    min-width: 0;
  }

  .orders-list-card .data-table.mobile-accordion-active th:nth-child(9) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .orders-list-card .data-table.mobile-accordion-active td:nth-child(9) {
    white-space: normal;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .orders-list-card .data-table.mobile-accordion-active .status-action-cell {
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: center;
  }

  .orders-list-card .data-table.mobile-accordion-active .status-badge {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    overflow: hidden;
    text-align: center;
    -webkit-box-pack: center;
    line-height: 1.2;
    padding: 0.3rem 0.2rem;
    font-size: 0.7rem;
  }

  .orders-list-card .data-table.mobile-accordion-active :is(th, td):nth-child(2),
  .orders-list-card .data-table.mobile-accordion-active :is(th, td):nth-child(4),
  .orders-list-card .data-table.mobile-accordion-active :is(th, td):nth-child(5),
  .orders-list-card .data-table.mobile-accordion-active :is(th, td):nth-child(6),
  .orders-list-card .data-table.mobile-accordion-active :is(th, td):nth-child(7),
  .orders-list-card .data-table.mobile-accordion-active :is(th, td):nth-child(8),
  .orders-list-card .data-table.mobile-accordion-active :is(th, td):nth-child(10) {
    display: none;
  }

  .orders-list-card .data-table.mobile-accordion-active tr.orders-data-row {
    cursor: pointer;
  }

  .orders-list-card .mobile-detail-row td {
    padding: 0;
    border-bottom: 1px solid var(--border-gray);
    background: var(--off-white);
  }

  .orders-list-card .mobile-row-details-inner {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
  }

  .orders-list-card .mobile-detail-fields {
    padding: 0.75rem;
  }

  .orders-list-card .mobile-detail-field {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border-gray);
  }

  .orders-list-card .mobile-detail-field:last-child {
    border-bottom: none;
  }

  .orders-list-card .mobile-detail-field-label {
    font-weight: 700;
    color: var(--text-gray);
    flex-shrink: 0;
  }

  .orders-list-card .mobile-detail-field-value {
    text-align: right;
    word-break: break-word;
  }

  .orders-list-card .mobile-detail-actions {
    padding: 0 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .orders-list-card .mobile-detail-actions .btn-sm {
    width: 100%;
    margin: 0 !important;
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .orders-list-card .mobile-detail-row {
    display: none !important;
  }
}
