:root {
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --bg: #f5f5f7;
  --sidebar: #111827;
  --sidebar-soft: #1f2937;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
  --soft-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
  letter-spacing: 0;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(320px, 480px);
  gap: 20px;
  align-content: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.09), transparent 28%),
    linear-gradient(135deg, #f8fafc 0%, #ffffff 48%, #eef2ff 100%);
}

.admin-portal {
  min-height: 100vh;
  background: var(--bg);
  padding: 28px;
}

.admin-login-card {
  max-width: 440px;
  margin: 8vh auto;
}

.admin-shell {
  display: grid;
  gap: 18px;
}

.admin-topbar {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.login-panel {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-brand {
  color: var(--ink);
  border-bottom-color: var(--line);
  padding: 0 0 18px;
  margin-bottom: 22px;
}

.login-brand .brand-mark {
  background: var(--sidebar);
  color: #ffffff;
}

.login-copy {
  color: var(--muted);
  margin: 8px 0 22px;
}

.login-form,
.setup-panel {
  display: grid;
  gap: 14px;
}

.login-form label,
.setup-panel label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.setup-panel h2 {
  margin-bottom: 4px;
}

.app-shell {
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px 18px;
  background: var(--sidebar);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-height: 100vh;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: var(--accent);
  font-weight: 800;
}

.brand p,
.brand span {
  margin: 0;
  display: block;
}

.brand p {
  font-size: 14px;
  font-weight: 800;
}

.brand span {
  color: #b8d7e4;
  font-size: 13px;
  font-weight: 700;
}

.nav {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 118, 110, 0.5) transparent;
}

.nav::-webkit-scrollbar {
  width: 6px;
}

.nav::-webkit-scrollbar-thumb {
  background: rgba(15, 118, 110, 0.5);
  border-radius: 999px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-title {
  padding: 8px 12px 4px;
  color: #9fb5c8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-subnav {
  display: grid;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-group.active .nav-group-title {
  color: #ffffff;
}

.nav-item {
  border: 0;
  width: 100%;
  border-radius: 8px;
  padding: 12px 14px;
  color: #d9e8ef;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
}

.nav-item:hover,
.nav-item.active {
  background: var(--sidebar-soft);
  color: #ffffff;
}

.nav-item,
button,
input,
select {
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #d9e8ef;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warning);
}

.status-dot.online {
  background: var(--success);
}

.shell {
  margin-left: 260px;
  min-height: 100vh;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.topbar-title {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 13px;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.1;
}

.company-name-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 10px 0 0;
  padding: 7px 11px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--soft-shadow);
}

.company-name-label span {
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.company-name-label strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 16px;
  margin-bottom: 14px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.shipment-search {
  display: flex;
  gap: 8px;
  min-width: 310px;
}

.shipment-search input {
  text-transform: uppercase;
}

select,
input {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 11px;
  min-height: 42px;
}

select:focus,
input:focus {
  border-color: rgba(37, 99, 235, 0.72);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
  outline: 0;
}

select:disabled {
  color: #9ca3af;
  background: #f9fafb;
  cursor: not-allowed;
}

#companySelect {
  min-width: 250px;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--soft-shadow);
}

button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), var(--soft-shadow);
}

.ghost-btn {
  background: #ffffff;
  color: var(--accent-dark);
  border: 1px solid var(--line);
  box-shadow: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin: 10px 0 14px;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.command-panel {
  grid-column: 1 / -1;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.command-tile {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.command-tile span,
.command-tile small {
  color: var(--muted);
  font-weight: 800;
}

.command-tile span {
  font-size: 12px;
  text-transform: uppercase;
}

.command-tile strong {
  color: var(--ink);
  font-size: 28px;
}

.command-tile small {
  font-size: 12px;
  line-height: 1.4;
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.subscription-contact-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.subscription-contact-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.subscription-contact-card h3,
.subscription-contact-card p,
.subscription-contact-card a {
  position: relative;
}

.contact-phone {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 8px;
  background: var(--sidebar);
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(17, 24, 39, 0.14);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.16);
}

.subscription-contact-card .contact-phone,
.subscription-contact-card .contact-phone:visited {
  background: var(--ink);
  color: #ffffff;
}

.contact-phone:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.form-grid label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  gap: 6px;
}

.form-grid .wide {
  grid-column: span 2;
}

.table-wrap {
  overflow: auto;
  padding: 0;
  box-shadow: var(--soft-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  background: #f9fafb;
}

tbody tr:hover {
  background: #f8fafc;
}

td {
  color: #1f2937;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 8px;
  background: #e7f8fb;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.badge.good {
  background: #dcfce7;
  color: #166534;
}

.badge.warn {
  background: #fef3c7;
  color: #92400e;
}

.badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid var(--line);
}

.summary-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.summary-row strong {
  text-align: right;
}

.priority-row strong {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.cost-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.delivery-estimate {
  display: grid;
  gap: 12px;
  border-color: rgba(15, 118, 110, 0.22);
}

.estimate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.estimate-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.estimate-head strong {
  text-align: right;
}

.estimate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.delivery-estimate .cost-box.profit strong {
  color: var(--success);
}

.delivery-estimate .cost-box.loss strong {
  color: var(--danger);
}

.estimate-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cost-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.form-help {
  margin-top: -6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-help strong {
  color: var(--ink);
  text-align: right;
}

.cost-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cost-box strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.shipment-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.detail-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.detail-card.full {
  grid-column: 1 / -1;
}

.detail-card dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.detail-card dt {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.detail-card dd {
  margin: 0;
  font-weight: 700;
}

.print-area {
  background: #ffffff;
}

.notice {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  background: #e7f8fb;
  color: var(--accent-dark);
  border: 1px solid #b6edf3;
  font-weight: 700;
}

.notice.error {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.save-popup {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: start center;
  padding-top: 28px;
  pointer-events: none;
}

.save-popup-card {
  width: min(420px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid #b7e4c7;
  border-left: 5px solid var(--success);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 35, 55, 0.18);
  padding: 16px;
  display: grid;
  gap: 6px;
  pointer-events: auto;
}

.save-popup-card strong {
  color: #166534;
  font-size: 16px;
}

.save-popup-card span {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.save-popup-card button {
  justify-self: end;
  margin-top: 4px;
  padding: 8px 14px;
}

.hidden {
  display: none;
}

.action-btn {
  padding: 8px 10px;
  font-size: 12px;
}

.danger-btn {
  background: var(--danger);
}

.danger-btn:hover {
  background: #991b1b;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-root.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}

.modal-card {
  position: relative;
  width: min(820px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 20px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
}

.modal-card small {
  color: var(--danger);
  font-weight: 700;
}

.search-result-row {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
}

.muted-text {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.service-error {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.58);
  padding: 20px;
}

.service-error > div {
  width: min(460px, 100%);
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
  display: grid;
  gap: 10px;
}

.service-error strong {
  color: #991b1b;
  font-size: 20px;
}

.service-error span {
  color: var(--muted);
  font-weight: 700;
}

/* Premium polish layer: keeps the app simple while improving spacing, contrast, and scanability. */
:root {
  --ink: #172026;
  --muted: #69727f;
  --line: #dde3ea;
  --panel: #ffffff;
  --bg: #f5f6f8;
  --sidebar: #ffffff;
  --sidebar-soft: #eef6f4;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --success: #16834a;
  --warning: #b7791f;
  --danger: #c2413d;
  --shadow: 0 18px 46px rgba(23, 32, 38, 0.08);
  --soft-shadow: 0 8px 24px rgba(23, 32, 38, 0.06);
}

body {
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.login-screen {
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f6f8 100%);
}

.login-panel,
.admin-topbar,
.stat-card,
.panel,
.detail-card,
.modal-card {
  border-color: rgba(221, 227, 234, 0.92);
  box-shadow: var(--shadow);
}

.login-panel,
.panel,
.detail-card,
.modal-card {
  background: rgba(255, 255, 255, 0.98);
}

.sidebar {
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 46px rgba(23, 32, 38, 0.05);
}

.brand {
  border-bottom-color: var(--line);
}

.brand-mark,
.login-brand .brand-mark {
  background: var(--ink);
  color: #ffffff;
}

.brand span,
.sidebar-footer {
  color: var(--muted);
}

.nav-item {
  color: #43505d;
}

.nav-item:hover,
.nav-item.active {
  background: var(--sidebar-soft);
  color: var(--accent-dark);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-group-title {
  color: var(--muted);
}

.nav-group.active .nav-group-title {
  color: var(--accent-dark);
}

.sidebar-footer {
  background: #f6f8fa;
  border: 1px solid var(--line);
}

.topbar {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.75);
}

.eyebrow {
  color: var(--accent-dark);
}

select,
input {
  border-color: #d7dde5;
  background: #fbfcfd;
}

select:hover,
input:hover {
  border-color: #c2cbd6;
}

select:focus,
input:focus {
  border-color: rgba(15, 118, 110, 0.72);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

button {
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.14);
}

button:hover {
  background: var(--accent-dark);
}

button:focus-visible {
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16), var(--soft-shadow);
}

.ghost-btn {
  color: var(--ink);
  border-color: #d7dde5;
}

.ghost-btn:hover {
  color: var(--accent-dark);
  background: #eef6f4;
}

.stat-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #d6a64f);
}

.stat-card strong,
.command-tile strong,
.cost-box strong {
  letter-spacing: 0;
}

.command-tile,
.summary-row,
.cost-box {
  background: #f8fafb;
  border-color: #e1e7ee;
}

.command-tile {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.summary-row {
  align-items: center;
}

.summary-row span,
.summary-row strong,
.command-tile,
.panel,
.detail-card,
td,
th {
  min-width: 0;
}

.summary-row strong {
  overflow-wrap: anywhere;
}

.setup-row {
  border-color: rgba(15, 118, 110, 0.22);
  background: #eef6f4;
}

.setup-row strong {
  color: var(--accent-dark);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f8fa;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: #f2f7f6;
}

.badge {
  background: #eaf5f3;
  color: var(--accent-dark);
}

.notice {
  background: #eef6f4;
  color: var(--accent-dark);
  border-color: rgba(15, 118, 110, 0.22);
}

.save-popup-card {
  border-color: rgba(22, 131, 74, 0.24);
  box-shadow: 0 20px 52px rgba(23, 32, 38, 0.18);
}

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: auto;
    min-height: auto;
    padding: 12px;
    gap: 12px;
    max-height: none;
    overflow: visible;
  }

  .sidebar .brand {
    padding: 0 0 10px;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 0 0 auto;
    min-height: auto;
    padding-right: 0;
    padding-bottom: 4px;
  }

  .nav-group {
    flex: 0 0 auto;
    gap: 4px;
  }

  .nav-group-title {
    padding: 4px 8px 0;
    text-align: center;
  }

  .nav-subnav {
    display: flex;
    gap: 8px;
    padding-left: 0;
    border-left: 0;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 12px;
    white-space: nowrap;
    text-align: center;
  }

  .sidebar-footer {
    display: none;
  }

  .shell {
    margin-left: 0;
    padding: 18px;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .company-name-label,
  .contact-phone {
    justify-content: center;
    width: 100%;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .shipment-search {
    min-width: 0;
    width: 100%;
  }

  .shipment-search button {
    flex: 0 0 auto;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .stats-grid,
  .dashboard-grid,
  .command-grid,
  .form-grid,
  .cost-result,
  .estimate-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  #companySelect {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .login-screen {
    gap: 14px;
    padding: 14px;
  }

  .login-panel {
    padding: 20px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .shell {
    padding: 12px;
  }

  .eyebrow {
    font-size: 12px;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card,
  .panel {
    padding: 14px;
  }

  .table-wrap {
    padding: 0;
  }

  th,
  td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .modal-root {
    padding: 12px;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
    padding: 16px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .sidebar,
  .topbar,
  .stats-grid,
  .section-heading,
  .notice,
  .nav {
    display: none !important;
  }

  .shell {
    margin: 0;
    padding: 0;
  }

  .view {
    display: none !important;
  }

  #view-shipment {
    display: block !important;
  }

  .detail-card {
    box-shadow: none;
    break-inside: avoid;
  }
}
