:root {
  --bg: #edf2ec;
  --bg-soft: #dfe8e1;
  --panel: rgba(250, 252, 249, 0.98);
  --panel-light: rgba(240, 245, 240, 0.96);
  --line: rgba(11, 33, 23, 0.13);
  --line-strong: rgba(11, 33, 23, 0.2);
  --text: #16221b;
  --muted: #5d7268;
  --accent: #f0a202;
  --accent-soft: rgba(240, 162, 2, 0.16);
  --accent-red: #e53935;
  --success: #48c78e;
  --radius: 24px;
  --shadow: 0 16px 40px rgba(28, 44, 36, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(240, 162, 2, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(229, 57, 53, 0.08), transparent 20%),
    linear-gradient(180deg, #f5f7f3 0%, #eef3ee 54%, #e5ede7 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 22, 20, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 24px rgba(8, 10, 9, 0.28);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: 16px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f4f7f3);
  border: 1px solid rgba(11, 33, 23, 0.12);
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.brand img {
  width: 118px;
}

.brand strong,
.panel h1,
.panel h2,
.hero-card h1 {
  margin: 0;
}

.brand span,
.muted,
.table-sub,
.metric-card span,
.carrier-item span,
.label-grid span {
  color: var(--muted);
}

.brand strong {
  color: #18231c;
}

.topbar .brand span {
  color: #62746a;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  padding: 10px 14px;
  border-radius: 16px;
  color: #e7eee8;
  transition: 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nav a.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f6faf7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.nav-main {
  flex: 1;
  justify-content: center;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.topbar-user {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-user strong {
  font-size: 0.95rem;
  color: #f5f7f4;
}

.topbar-user span {
  color: #c9d3cc;
  font-size: 0.86rem;
}

.nav-meta a {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content {
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: 24px 20px 28px;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f3f6f3);
}

.flash-success {
  border-color: rgba(72, 199, 142, 0.36);
}

.flash-error {
  border-color: rgba(229, 57, 53, 0.36);
}

.hero-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 24px;
  overflow: hidden;
  border-color: rgba(240, 162, 2, 0.2);
  background:
    linear-gradient(135deg, rgba(252, 253, 251, 0.98), rgba(251, 242, 220, 0.96)),
    var(--panel);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--accent), #f5d27b);
}

.hero-card-compact {
  padding: 18px 22px;
  gap: 18px;
  align-items: center;
}

.hero-card-compact .hero-copy h1 {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  margin: 8px 0 6px;
}

.hero-card-compact .hero-copy p {
  margin: 0;
  line-height: 1.45;
}

.hero-copy {
  max-width: 760px;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  margin: 12px 0;
}

.hero-copy p {
  max-width: 760px;
  color: #54675e;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #915e00;
  border: 1px solid rgba(240, 162, 2, 0.28);
  font-size: 0.88rem;
}

.badge-accent {
  background: rgba(72, 199, 142, 0.12);
  border-color: rgba(72, 199, 142, 0.24);
  color: #237d54;
}

.metric-grid,
.quick-actions,
.export-grid {
  display: grid;
  gap: 16px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-self: stretch;
  min-width: 360px;
}

.metric-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: auto;
}

.metric-card,
.action-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 124px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #eef3ee);
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 14px rgba(29, 43, 35, 0.05);
}

.metric-card strong,
.action-card strong {
  font-size: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: start;
}

.grid-2-import {
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.35fr);
}

.import-controls-panel {
  max-width: 100%;
}

.import-history-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  align-self: start;
  width: 100%;
  min-width: 0;
}

.import-history-header {
  flex: 0 0 auto;
  margin: 0 0 12px;
}

.import-history-header h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.import-history-header .muted {
  margin: 0;
}

.import-history-wrap {
  flex: 0 0 auto;
  align-self: stretch;
  margin: 0;
  max-height: min(72vh, 780px);
  overflow: auto;
}

.import-history-wrap table {
  margin: 0;
}

.import-history-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3ee;
  box-shadow: 0 1px 0 var(--line);
}

.panel {
  position: relative;
  padding: 24px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, rgba(253, 254, 252, 0.98), rgba(242, 247, 242, 0.98));
  border-color: rgba(11, 33, 23, 0.15);
}

.panel::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(22, 34, 27, 0.7), rgba(240, 162, 2, 0.65));
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(11, 33, 23, 0.08);
}

.carrier-stack {
  display: grid;
  gap: 14px;
}

.carrier-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #fcfdfb, #eef3ee);
  box-shadow:
    inset 4px 0 0 rgba(240, 162, 2, 0.24),
    0 4px 10px rgba(29, 43, 35, 0.04);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(11, 33, 23, 0.12);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f5f8f4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  text-align: left;
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  background: linear-gradient(180deg, #eaf0ea, #dde7df);
  border-bottom: 1px solid rgba(11, 33, 23, 0.14);
}

th {
  color: #233129;
  font-size: 0.92rem;
  font-weight: 700;
}

tbody tr {
  transition: background-color 0.18s ease;
}

tbody tr:hover {
  background: rgba(240, 162, 2, 0.08);
}

tbody tr.is-share-active,
tbody tr.is-share-active:hover {
  background: linear-gradient(90deg, rgba(240, 162, 2, 0.22), rgba(240, 162, 2, 0.08));
  box-shadow: inset 4px 0 0 var(--accent);
}

tbody tr.is-share-active td {
  background: transparent;
}

tbody tr:nth-child(even) {
  background: rgba(247, 250, 246, 0.65);
}

tbody tr.is-share-active:nth-child(even),
tbody tr.is-share-active:nth-child(even):hover {
  background: linear-gradient(90deg, rgba(240, 162, 2, 0.22), rgba(240, 162, 2, 0.08));
}

tbody tr:last-child td {
  border-bottom: 0;
}

.table-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.86rem;
}

.shipment-link {
  display: inline-block;
  color: inherit;
}

.shipment-link strong {
  transition: color 0.2s ease;
}

.shipment-link:hover strong {
  color: #8a5a00;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}

.toolbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filters,
.form-grid,
.form-actions,
.login-layout {
  display: grid;
  gap: 16px;
}

.filters {
  grid-template-columns: 2fr repeat(2, minmax(160px, 220px)) auto;
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(11, 33, 23, 0.12);
  background: linear-gradient(180deg, #e8efe8, #dfe8e1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.filters.filters-client {
  grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(120px, 150px)) minmax(160px, 1fr) auto auto;
  margin-bottom: 0;
}

.filters.filters-client .filter-show-delivered {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.88rem;
  color: var(--muted);
  align-self: center;
  margin: 0;
}

.filters.filters-client .filter-show-delivered input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.filters.filters-wide {
  grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(110px, 140px)) minmax(150px, 1fr) auto;
}

.shipment-action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.share-wrap {
  position: relative;
}

.tracking-btn svg,
.share-btn svg {
  width: 20px;
  height: 20px;
}

.tracking-btn:hover,
.share-btn:hover {
  color: var(--accent);
  border-color: rgba(240, 162, 2, 0.45);
  background: var(--accent-soft);
}

.share-btn .share-btn-icon {
  width: 20px;
  height: 20px;
}

.share-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 260px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.share-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.share-menu-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.share-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.share-menu-close svg {
  width: 16px;
  height: 16px;
}

.share-menu-close:hover {
  color: #c62828;
  background: rgba(198, 40, 40, 0.08);
}

.share-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.share-menu-item:hover {
  background: var(--accent-soft);
}

.share-menu-whatsapp svg {
  width: 18px;
  height: 18px;
  color: #25d366;
}

.share-email-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.share-email-label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.share-email-label input {
  min-height: 38px;
  padding: 8px 12px;
}

label.share-frequent-check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}

label.share-frequent-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  flex: 0 0 18px;
  border-radius: 4px;
  background: #fff;
  accent-color: var(--accent);
  cursor: pointer;
}

label.share-frequent-check span {
  display: block;
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: 500;
  color: #3d4f45;
}

.share-frequent-fields {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(240, 162, 2, 0.08);
  border: 1px solid rgba(240, 162, 2, 0.2);
}

.share-frequent-field {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.share-frequent-field input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.88rem;
}

.btn-small {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.tracking-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.filters.filters-client input,
.filters.filters-client select {
  padding: 10px 14px;
  min-height: 42px;
  border-radius: 14px;
}

.form-card,
.stack-form {
  display: grid;
  gap: 16px;
}

.shipment-form .form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff, #f6f9f5);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(240, 162, 2, 0.48);
  box-shadow: 0 0 0 3px rgba(240, 162, 2, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
}

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

.btn-primary {
  color: #f6faf7;
  background: linear-gradient(135deg, #21382d, #16261e);
  border: 1px solid rgba(11, 33, 23, 0.22);
  box-shadow: 0 8px 18px rgba(18, 34, 27, 0.22);
}

.btn-secondary {
  background: linear-gradient(180deg, #ffffff, #edf3ee);
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: 0 4px 10px rgba(29, 43, 35, 0.04);
}

.btn-ghost {
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff, #eef3ee);
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: 0 3px 8px rgba(29, 43, 35, 0.04);
}

.hint-box {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfcfa, #eef3ee);
  border: 1px solid var(--line-strong);
  color: var(--muted);
}

.login-layout {
  grid-template-columns: 1.1fr minmax(320px, 420px);
  align-items: center;
}

.login-help {
  margin: 14px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.login-partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 16px;
}

.login-partners img {
  display: block;
  max-height: 42px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.quick-actions {
  grid-template-columns: repeat(3, 1fr);
}

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

.label-body {
  background: #f6f7f3;
  color: #151515;
  padding: 20px;
}

.label-card {
  max-width: 880px;
  margin: 0 auto;
  padding: 26px;
  border-radius: 28px;
  border: 1px solid #d8dfd6;
  background: white;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.label-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.label-header img {
  width: 180px;
}

.barcode {
  margin: 24px 0;
  padding: 18px;
  border: 2px dashed #1a1a1a;
  border-radius: 16px;
  text-align: center;
  font: 800 2rem/1 "Courier New", monospace;
  letter-spacing: 4px;
}

.label-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.label-grid > div {
  padding: 16px;
  border-radius: 16px;
  background: #f3f5f1;
}

.label-grid strong {
  display: block;
  margin-top: 6px;
}

.label-grid p {
  margin: 6px 0 0;
}

.print-btn {
  width: 100%;
}

.import-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}

.import-stats div {
  padding: 16px;
  border-radius: 16px;
  background: var(--panel-light);
  border: 1px solid var(--line);
}

.import-stats dt {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.import-stats dd {
  margin: 8px 0 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.import-schedule-box {
  margin: 20px 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(240, 162, 2, 0.25);
  background: rgba(240, 162, 2, 0.06);
}

.import-schedule-box h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.import-ftp-now-form {
  margin-top: 12px;
}

.import-history-table {
  font-size: 0.9rem;
}

.import-form {
  max-width: 520px;
}

.import-hint {
  margin-top: 20px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.checkbox-row-disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.checkbox-row-disabled input {
  cursor: not-allowed;
}

.checkbox-row input {
  width: auto;
}

.muted-list {
  margin: 0 0 20px;
  padding-left: 18px;
  color: var(--muted);
}

.form-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0 16px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.import-clear-form {
  margin-top: 20px;
}

.excel-detail-list {
  margin-top: 16px;
}

.detail-grid {
  margin-top: 8px;
}

.detail-list {
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-list dd {
  margin: 0;
  word-break: break-word;
}

/* --- Panel agencia (inicio) vs cliente --- */

.shell-agency {
  background:
    radial-gradient(circle at 12% 0%, rgba(240, 162, 2, 0.14), transparent 32%),
    linear-gradient(180deg, #e8ece9 0%, #dde6df 100%);
}

.shell-client {
  background:
    radial-gradient(circle at top right, rgba(72, 199, 142, 0.08), transparent 22%),
    linear-gradient(180deg, #f5f7f3 0%, #eef3ee 54%, #e5ede7 100%);
}

.shell-agency .topbar {
  border-bottom-color: rgba(240, 162, 2, 0.35);
}

.shell-agency .nav a.is-active {
  background: rgba(240, 162, 2, 0.22);
  border-color: rgba(240, 162, 2, 0.45);
  color: #fff8e8;
}

.shell-client .nav a.is-active {
  background: rgba(72, 199, 142, 0.18);
  border-color: rgba(72, 199, 142, 0.35);
}

.shell-client .main-content .panel:first-child {
  border-color: rgba(72, 199, 142, 0.18);
}

.panel-client-expeditions {
  padding: 8px 10px;
  margin-bottom: 12px;
}

.panel-client-expeditions .filters.filters-client {
  margin-bottom: 6px;
  padding: 6px 8px;
  gap: 6px;
}

.panel-client-expeditions .filters.filters-client input,
.panel-client-expeditions .filters.filters-client select {
  padding: 4px 6px;
  min-height: 26px;
  font-size: 0.7rem;
  border-radius: 8px;
}

.panel-client-expeditions .filters.filters-client .filter-show-delivered {
  font-size: 0.7rem;
}

.panel-client-expeditions .filters.filters-client .btn {
  padding: 4px 8px;
  font-size: 0.7rem;
  min-height: 26px;
}

.table-wrap-compact {
  border-radius: 8px;
}

.table-compact {
  min-width: 480px;
  font-size: 0.65rem;
  line-height: 1.2;
}

.table-compact th,
.table-compact td {
  padding: 2px 4px;
  vertical-align: middle;
}

.table-compact thead th {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  padding-top: 3px;
  padding-bottom: 3px;
}

.table-compact td strong {
  font-size: 0.66rem;
  font-weight: 700;
}

.table-compact .badge {
  padding: 1px 5px;
  font-size: 0.58rem;
  gap: 2px;
  line-height: 1.15;
}

.table-compact .table-actions-cell {
  padding-left: 2px;
  padding-right: 2px;
}

.table-compact .table-actions-cell .icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.table-compact .tracking-btn svg,
.table-compact .share-btn svg,
.table-compact .share-btn .share-btn-icon {
  width: 12px;
  height: 12px;
}

.table-compact .shipment-action-group {
  gap: 2px;
}

.agency-home {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 4px 16px;
}

.agency-home--compact .agency-home-board {
  padding: 14px 16px 12px;
  border-radius: 18px;
  border: 2px solid rgba(240, 162, 2, 0.35);
  background: linear-gradient(125deg, #1a2b22 0%, #243a2f 48%, #2a4034 100%);
  color: #f4f7f4;
  box-shadow: 0 12px 32px rgba(18, 34, 27, 0.2);
}

.agency-home-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.agency-home-top-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.agency-home-deco {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(240, 162, 2, 0.12);
  border: 1px solid rgba(240, 162, 2, 0.3);
}

.agency-home-deco .bi {
  font-size: 1.1rem;
  line-height: 1;
  color: #ffc84d;
}

.agency-home-deco .bi:nth-child(2) {
  font-size: 1.25rem;
  color: #ffe08a;
}

.agency-home-greeting {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(244, 247, 244, 0.75);
}

.agency-home-kicker {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(240, 162, 2, 0.22);
  border: 1px solid rgba(240, 162, 2, 0.5);
  color: #ffe8a8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.agency-home-title {
  margin: 0 0 6px;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  line-height: 1.2;
  color: #fff;
}

.agency-home-lead {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(244, 247, 244, 0.78);
  max-width: 48ch;
}

.agency-home-lead strong {
  color: #ffd88a;
  font-weight: 600;
}

.agency-home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.agency-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.agency-stat-icon {
  font-size: 0.95rem;
  color: rgba(255, 200, 77, 0.85);
}

.agency-stat-value {
  font-size: 1.35rem;
  line-height: 1;
  color: #ffd88a;
}

.agency-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(244, 247, 244, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.agency-home-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.agency-home-actions-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(244, 247, 244, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.agency-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agency-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 140px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f7faf8;
  border: 1px solid rgba(240, 162, 2, 0.35);
  color: var(--text);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.agency-action-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 162, 2, 0.65);
  box-shadow: 0 6px 16px rgba(240, 162, 2, 0.2);
}

.agency-action-chip-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.agency-action-chip-text strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.agency-action-chip-text small {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.25;
}

.agency-action-chip-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(240, 162, 2, 0.35);
  color: #915e00;
}

.agency-action-chip-icon .bi {
  font-size: 1.05rem;
  line-height: 1;
}

.shell-agency .main-content {
  padding-top: 12px;
  padding-bottom: 20px;
}

@media (max-width: 1180px) {
  .login-layout,
  .grid-2,
  .grid-2-import,
  .metric-grid,
  .export-grid,
  .shipment-form .form-grid,
  .quick-actions,
  .client-toolbar,
  .agency-action-row {
    flex-direction: column;
  }

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

  .nav-main {
    justify-content: flex-start;
  }

  .main-content {
    padding: 18px;
  }

  .hero-card {
    flex-direction: column;
  }

  .filters,
  .filters.filters-client,
  .filters.filters-wide {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }
}

@media print {
  .print-btn {
    display: none;
  }

  .label-body {
    padding: 0;
    background: #fff;
  }

  .label-card {
    box-shadow: none;
    border: 0;
  }
}
