:root {
  --ink: #172033;
  --muted: #617086;
  --line: #dbe3ea;
  --paper: #fbfcfd;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0b4f49;
  --landing-ink: #10202b;
  --landing-muted: #5d6c78;
  --landing-line: #d8e1e6;
  --landing-paper: #f7faf9;
  --landing-accent: #0f766e;
  --landing-navy: #123047;
  --landing-gold: #b7791f;
  --warn: #b45309;
  --bad: #b91c1c;
  --good: #15803d;
  --shadow: 0 20px 55px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.yo-client-box {
  display: grid;
  gap: 10px;
}

.yo-client-box select:disabled {
  color: var(--muted);
  background: #eef3f7;
  cursor: not-allowed;
}

.client-party-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.goods-description-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.client-party-grid > label,
.client-party-grid .yo-client-box,
.goods-description-grid > label {
  min-width: 0;
}

.client-party-grid > label,
.client-party-grid > .yo-client-box {
  width: 100%;
  min-height: 156px;
  display: grid;
  align-content: start;
}

.client-party-grid > .yo-client-box > label {
  display: grid;
  gap: 8px;
}

.country-option-cancelled {
  color: var(--bad);
  font-weight: 800;
}

.country-option-active {
  color: var(--ink);
}

.country-select-cancelled {
  color: var(--bad);
  border-color: var(--bad);
  font-weight: 800;
}

.error-text {
  color: var(--bad) !important;
  font-weight: 800;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #eef3f7;
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

a {
  color: inherit;
}

.public-mode .login-screen,
.public-mode .shell,
.public-mode .modal-backdrop {
  display: none !important;
}

body:not(.public-mode) .site-header,
body:not(.public-mode) .landing,
body:not(.public-mode) .landing-footer {
  display: none !important;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(216, 225, 230, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--landing-ink);
  font-weight: 900;
  text-decoration: none;
}

.site-brand-mark {
  display: inline-grid;
  min-width: 78px;
  min-height: 40px;
  place-items: center;
  color: #fff;
  background: var(--landing-navy);
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--landing-muted);
  font-size: 14px;
  font-weight: 800;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--landing-accent);
}

.nav-system-button,
.landing-primary-button,
.landing-secondary-button,
.landing-text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  cursor: pointer;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.nav-system-button,
.landing-secondary-button {
  color: var(--landing-ink);
  border: 1px solid var(--landing-line);
  background: #fff;
}

.landing-primary-button {
  color: #fff;
  background: var(--landing-accent);
}

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

.landing-secondary-button:hover,
.nav-system-button:hover {
  border-color: var(--landing-accent);
  color: var(--landing-accent);
}

.landing-text-button {
  color: var(--landing-navy);
  background: transparent;
}

.landing {
  color: var(--landing-ink);
  background: #fff;
}

.hero-section {
  display: grid;
  min-height: calc(100vh - 72px);
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(42px, 7vw, 92px) clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--landing-line);
  background:
    linear-gradient(115deg, rgba(247, 250, 249, 0.98), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(90deg, rgba(18, 48, 71, 0.04) 0 1px, transparent 1px 80px);
}

.landing-eyebrow {
  margin: 0 0 12px;
  color: var(--landing-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 850px;
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 740px;
  margin: 24px 0 0;
  color: var(--landing-muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.5;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-visual {
  display: grid;
  gap: 18px;
  min-height: 520px;
  align-content: center;
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid var(--landing-line);
  background:
    linear-gradient(160deg, rgba(18, 48, 71, 0.96), rgba(15, 118, 110, 0.88)),
    #123047;
  box-shadow: 0 24px 60px rgba(18, 48, 71, 0.2);
}

.route-map {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.route-node {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  background: var(--landing-gold);
}

.route-line {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.72);
}

.route-line.short {
  flex: 0.45;
}

.control-panel {
  padding: 26px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.control-panel span {
  display: block;
  color: #d8f3ee;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.control-panel strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.control-panel p {
  margin: 16px 0 0;
  color: #edf7f5;
  line-height: 1.5;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.signal-grid span {
  min-height: 72px;
  padding: 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
  font-weight: 900;
}

.landing-section {
  padding: clamp(52px, 7vw, 96px) clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--landing-line);
  background: #fff;
}

.section-intro {
  max-width: 880px;
}

.section-intro h2,
.cta-band h2 {
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.section-intro p,
.large-copy {
  margin: 18px 0 0;
  color: var(--landing-muted);
  font-size: 18px;
  line-height: 1.65;
}

.benefit-grid,
.stack-grid,
.public-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.benefit-grid.compact,
.stack-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.benefit-grid article,
.stack-grid article,
.method-steps article {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--landing-line);
  background: var(--landing-paper);
}

.benefit-grid span {
  display: block;
  color: var(--landing-gold);
  font-size: 13px;
  font-weight: 900;
}

.benefit-grid h3,
.stack-grid h3,
.public-form h3 {
  margin: 10px 0 8px;
  color: var(--landing-ink);
  font-size: 20px;
}

.benefit-grid p,
.stack-grid p,
.method-steps p {
  margin: 0;
  color: var(--landing-muted);
  line-height: 1.55;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

.platform-section,
.forms-section {
  background: var(--landing-paper);
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.feature-list span {
  padding: 10px 13px;
  border: 1px solid var(--landing-line);
  color: var(--landing-ink);
  background: #fff;
  font-weight: 850;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.method-steps span {
  display: block;
  margin-bottom: 10px;
  color: var(--landing-navy);
  font-size: 22px;
  font-weight: 900;
}

.cta-band {
  color: #fff;
  background: var(--landing-navy);
}

.cta-band h2 {
  max-width: 1040px;
  color: #fff;
}

.cta-band .landing-secondary-button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  background: transparent;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.faq-list details {
  padding: 18px 20px;
  border: 1px solid var(--landing-line);
  background: var(--landing-paper);
}

.faq-list summary {
  cursor: pointer;
  color: var(--landing-ink);
  font-weight: 900;
}

.faq-list p {
  margin: 12px 0 0;
  color: var(--landing-muted);
  line-height: 1.6;
}

.legal-note,
.privacy-copy {
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.55;
}

.public-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.public-form {
  padding: 24px;
  border: 1px solid var(--landing-line);
  background: #fff;
}

.public-form label {
  font-size: 13px;
}

.public-form textarea {
  width: 100%;
  padding: 10px 12px;
  resize: vertical;
  color: var(--ink);
  border: 1px solid #c9d4df;
  font: inherit;
}

.public-form .landing-primary-button {
  width: fit-content;
}

.landing-footer {
  display: grid;
  grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1fr);
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: #dbe8ee;
  background: #10202b;
}

.landing-footer p {
  margin: 6px 0 0;
  line-height: 1.55;
}

.landing-footer a {
  color: #fff;
  font-weight: 900;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-brand {
  gap: 16px;
  margin-bottom: 24px;
}

.brand-logo {
  display: block;
  width: min(230px, 46vw);
  max-height: 74px;
  padding: 6px 8px;
  border: 1px solid #d7e1ec;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.policy-panel,
.form-panel,
.result-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.policy-panel {
  position: sticky;
  top: 24px;
  min-height: calc(100vh - 48px);
  padding: 24px;
}

.form-panel,
.result-panel {
  padding: 26px;
}

.form-panel {
  border-color: #6b7280;
  border-width: 2px;
}

.form-panel form > label,
.form-panel .client-party-grid > label,
.form-panel .goods-description-grid > label,
.form-panel .associate-selector-panel,
.form-panel .yo-client-box,
.form-panel .mexico-postal-panel,
.form-panel .currency-grid,
.form-panel .insured-value-grid,
.form-panel .container-insurance-grid,
.form-panel .departure-date-grid,
.form-panel .departure-detail-grid,
.form-panel .security-protocol-box,
.form-panel .coverage-detail-grid,
.form-panel .coverage-line-grid,
.form-panel .checks {
  padding: 14px;
  border: 2px solid #6b7280;
  background: #dbeafe;
  border-radius: 8px;
}

.payment-method-box {
  display: grid;
  gap: 8px;
}

.payment-method-box .field-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.payment-method-box label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #213449;
  font-size: 13px;
  font-weight: 700;
}

.payment-method-box input {
  width: auto;
  min-height: auto;
}

.payment-method-dropdown {
  position: relative;
}

.payment-method-dropdown summary {
  min-height: 42px;
  padding: 10px 38px 10px 12px;
  border: 1px solid #8292a6;
  border-radius: 7px;
  background: #fff;
  color: #213449;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.payment-method-dropdown summary::-webkit-details-marker {
  display: none;
}

.payment-method-dropdown summary::after {
  content: "\25BE";
  position: absolute;
  top: 10px;
  right: 13px;
  font-size: 17px;
  transition: transform 0.18s ease;
}

.payment-method-dropdown[open] summary::after {
  transform: rotate(180deg);
}

.payment-method-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #8292a6;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(33, 52, 73, 0.18);
}

.payment-method-options label {
  padding: 5px 6px;
  border-radius: 5px;
}

.payment-method-options label:hover {
  background: #eaf2ff;
}

.payment-method-options label.disabled-option {
  color: #8a97a8;
  cursor: not-allowed;
  background: #f1f4f8;
}

.payment-method-options label.disabled-option input {
  cursor: not-allowed;
}

.security-protocol-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
  gap: 14px;
  align-items: center;
}

.security-protocol-box strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0;
}

.security-protocol-box p {
  margin: 6px 0 0;
  color: #415166;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.protocol-acceptance {
  margin: 0;
}

.premium-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.premium-preview-box {
  padding: 14px;
  border: 1px solid #b9ddff;
  background: #f7fbff;
  border-radius: 8px;
}

.premium-preview-box h3 {
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 2px solid #9bd0ff;
  color: #0963c7;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.premium-preview-box dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.premium-preview-box div {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(180px, 300px);
  gap: 12px;
  align-items: center;
}

.premium-preview-box dt,
.premium-preview-box dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.premium-preview-box dt {
  color: #315267;
  text-align: right;
  text-transform: uppercase;
}

.premium-preview-box dd {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px dashed #9bd0ff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #0b63c7;
  text-align: right;
}

.premium-preview-box .premium-input-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.premium-preview-box .premium-input-cell input {
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: #0b63c7;
  font: inherit;
  font-weight: 900;
  text-align: right;
}

.premium-preview-box .premium-input-cell input:focus {
  outline: 2px solid #9bd0ff;
  border-radius: 6px;
  background: #ffffff;
}

.premium-minimum-note {
  display: block;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #facc15;
  background: #fffbeb;
  color: #854d0e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.premium-preview-box div:last-child dt,
.premium-preview-box div:last-child dd {
  color: #0958bd;
  font-size: 15px;
}

.time-picker-field {
  display: grid;
  grid-template-columns: minmax(72px, 0.7fr) minmax(72px, 0.7fr) auto;
  gap: 8px;
  align-items: center;
}

.time-picker-field input {
  text-align: center;
}

.time-picker-open {
  min-height: 42px;
  white-space: nowrap;
}

.ampm-switch {
  display: inline-flex;
  gap: 6px;
}

.ampm-switch .active {
  border-color: var(--accent);
  background: #dff4ef;
  color: var(--accent-dark);
}

.clock-modal {
  width: min(460px, 100%);
}

.clock-picker {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.clock-display {
  width: 100%;
  padding: 14px;
  border: 2px solid #96adc3;
  border-radius: 8px;
  background: #f7fbff;
  color: #0b4f49;
  font-size: 32px;
  font-weight: 900;
  text-align: center;
}

.clock-mode-tabs,
.clock-ampm {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.clock-mode-tabs .active,
.clock-ampm .active {
  border-color: var(--accent);
  background: #dff4ef;
  color: var(--accent-dark);
}

.clock-face {
  position: relative;
  width: min(280px, 72vw);
  aspect-ratio: 1;
  border: 3px solid #6f8195;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 58%, #f0f6fb 59% 100%);
  box-shadow: inset 0 0 0 8px #e7eef5;
  cursor: pointer;
}

.clock-number {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #213449;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.clock-number:hover,
.clock-number.active {
  border-color: var(--accent);
  background: #dff4ef;
  color: var(--accent-dark);
}

.clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 4px;
  border-radius: 999px;
  background: #0f766e;
  transform-origin: bottom center;
  pointer-events: none;
}

.hour-hand {
  height: 70px;
}

.minute-hand {
  height: 96px;
  width: 3px;
  background: #0b4f49;
}

.clock-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #0b4f49;
  pointer-events: none;
}

.form-panel input,
.form-panel select,
.form-panel textarea {
  border-width: 2px;
  border-color: #2563eb;
  background: #ffffff;
}

.form-panel .field-note,
.form-panel .search-help,
.form-panel .client-help {
  color: #415166;
}

.dollar-fix-row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.dollar-fix-row input {
  min-width: 0;
}

.dollar-fix-row .field-note {
  margin: 0;
  line-height: 1.35;
}

.capture-brand-header {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.capture-brand-header img {
  display: block;
  width: min(560px, 100%);
  max-height: 145px;
  padding: 8px 12px;
  border: 1px solid #d7e1ec;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.capture-brand-header h1 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: white;
  background: var(--accent);
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 24px;
}

.policy-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.policy-list div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.status-card {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.status-card strong {
  display: block;
  margin-left: 22px;
}

.status-card p {
  margin: 8px 0 0 22px;
  color: var(--muted);
  line-height: 1.45;
}

.status-dot {
  float: left;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--muted);
}

.status-card.good .status-dot {
  background: var(--good);
}

.status-card.warn .status-dot {
  background: var(--warn);
}

.status-card.bad .status-dot {
  background: var(--bad);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.current-clock {
  min-width: 190px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: #f8fbff;
  text-align: right;
}

.current-clock span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.current-clock strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

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

.merchandise-heading-tools {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.user-form-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

form {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

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

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

.container-insurance-grid {
  grid-template-columns: minmax(150px, 0.7fr) minmax(320px, 1.55fr) minmax(220px, 1fr) minmax(210px, 1fr);
  align-items: start;
}

.departure-date-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.departure-detail-grid {
  grid-template-columns: repeat(6, minmax(132px, 1fr));
}

.mexico-postal-panel {
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f8fbff;
}

.form-panel .mexico-postal-panel[data-mexico-postal="origin"] {
  border-color: #74b99a;
  background: #dcf7e9;
}

.form-panel .mexico-postal-panel[data-mexico-postal="destination"] {
  border-color: #74b99a;
  background: #dcf7e9;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid #c9d4df;
  background: #fff;
  outline: none;
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle.active {
  color: var(--accent-dark);
  border-color: #c9d4df;
  background: #eef7f6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.disabled-field,
input:disabled,
select:disabled,
textarea:disabled {
  background: #eef3f7;
  color: var(--muted);
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  font: inherit;
  line-height: 1.45;
}

.invalid-field {
  border-color: var(--bad) !important;
  background: #fff5f5;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12) !important;
}

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

.insurance-value-box {
  padding: 14px;
  border: 1px solid #c9d4df;
  background: #f8fbfd;
  border-radius: 8px;
}

.insurance-value-note {
  color: #334155;
  line-height: 1.45;
}

.validation-summary {
  padding: 12px 14px;
  border: 1px solid #fecaca;
  color: var(--bad);
  background: #fff5f5;
  font-weight: 800;
}

.search-wrap {
  position: relative;
}

.search-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 280px;
  overflow: auto;
  border: 1px solid #c9d4df;
  background: white;
  box-shadow: 0 16px 32px rgba(23, 32, 51, 0.16);
}

.search-option,
.search-empty {
  width: 100%;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-align: left;
}

.search-option {
  cursor: pointer;
}

.search-option:hover,
.search-option.active {
  background: #e8f4f2;
}

.search-option strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.search-option span,
.search-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search-option.excluded strong,
.search-option.excluded span,
.search-empty.excluded {
  color: var(--bad);
}

.client-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.client-top-action {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: -6px;
}

.quote-toggle {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 2px solid #8798aa;
  border-radius: 8px;
  background: #fbfdff;
  white-space: nowrap;
}

.quote-toggle input {
  width: auto;
  min-height: auto;
  padding: 0;
}

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

.compact-button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 12px;
}

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

.check {
  display: flex;
  min-height: 58px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-weight: 700;
}

.check input {
  width: 18px;
  min-height: 18px;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

.split-actions {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

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

.secondary-button {
  color: var(--ink);
  background: #e8eef3;
}

.secondary-button:hover {
  background: #d9e2ea;
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #9aa7b3;
}

.result-panel {
  margin-top: 18px;
}

.admin-panel {
  position: fixed;
  z-index: 80;
  top: 4vh;
  left: 50%;
  width: min(1280px, calc(100vw - 32px));
  max-height: 92vh;
  overflow: auto;
  margin: 0;
  padding: 26px;
  border: 8px solid #9ca3af;
  background: var(--panel);
  box-shadow: 0 0 0 1px #6b7280, 0 24px 70px rgba(15, 23, 42, 0.28);
  transform: translateX(-50%);
}

.admin-panel[hidden] {
  display: none;
}

.admin-login {
  max-width: 520px;
}

.admin-database {
  display: grid;
  gap: 20px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #1d4ed8;
  background: #dbeafe;
  color: #0f3f8c;
  cursor: pointer;
  font-weight: 800;
}

.admin-tab:hover,
.admin-tab.active {
  color: #fff;
  border-color: #0f3f8c;
  background: #1d4ed8;
}

.admin-tab.admin-tab-alert {
  color: #991b1b;
  border-color: #ef4444;
  background: #fee2e2;
}

.admin-tab.admin-tab-alert:hover,
.admin-tab.admin-tab-alert.active {
  color: #fff;
  border-color: #b91c1c;
  background: #dc2626;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: grid;
  gap: 20px;
}

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

.module-card {
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.module-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.module-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.module-card strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.security-note {
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  background: #eff6ff;
  font-weight: 700;
  line-height: 1.45;
}

.identity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.identity-grid h3 {
  margin: 0 0 10px;
}

.role-grid,
.permission-list {
  display: grid;
  gap: 10px;
}

.role-card,
.permission-group {
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.role-card p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.45;
}

.role-card span,
.status-pill,
.permission-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  background: #eef2ff;
  font-size: 12px;
  font-weight: 800;
}

.permission-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.status-toggle {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.status-toggle.active {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.status-toggle.cancelled {
  border-color: #fecaca;
  background: #fff5f5;
  color: #991b1b;
}

.allowed-merch-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #b9d7d2;
  background: #f2fbf9;
}

.allowed-merch-box h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.allowed-merch-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.allowed-merch-box > strong {
  color: var(--accent-dark);
  font-size: 16px;
}

.immediate-merch-box {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.immediate-merch-box > strong {
  color: #1d4ed8;
}

.allowed-merch-list {
  display: flex;
  max-height: 180px;
  overflow: auto;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.allowed-chip {
  padding: 7px 9px;
  border: 1px solid #cfe3df;
  background: #f8fcfb;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.immediate-chip {
  border-color: #bfdbfe;
  background: #f8fbff;
}

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

.catalog-search {
  display: grid;
  grid-template-columns: minmax(260px, 360px);
  gap: 6px;
  margin: 0;
}

.catalog-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.catalog-search label,
.catalog-search {
  margin: 0;
}

.catalog-search input {
  min-height: 42px;
}

.table-summary-row {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 8px;
}

.report-toolbar {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.report-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-form {
  display: grid;
  max-width: 520px;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.report-export-button {
  align-self: end;
  min-height: 42px;
}

.report-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.report-totals article {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #eef6ff;
}

.report-totals span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-totals strong {
  display: block;
  margin-top: 8px;
  color: var(--accent-dark);
  font-size: 18px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.table-caption {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  background: #fff;
}

.client-table th,
.client-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.client-table th {
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
  text-transform: uppercase;
}

.client-table td {
  font-size: 13px;
}

.report-table {
  min-width: 2200px;
}

.report-table th,
.report-table td {
  white-space: nowrap;
}

.client-table tr.ofac-pending-row td {
  background: #fef2f2;
}

.client-table tr.merchandise-row-good td {
  background: #f8fff9;
}

.client-table tr.merchandise-row-warn td {
  background: #fffbeb;
}

.client-table tr.merchandise-row-bad td {
  background: #fff5f5;
}

.status-pill.status-good {
  border-color: #bbf7d0;
  color: #166534;
  background: #dcfce7;
}

.status-pill.status-warn {
  border-color: #fde68a;
  color: #92400e;
  background: #fef3c7;
}

.status-pill.status-bad {
  border-color: #fecaca;
  color: var(--bad);
  background: #fee2e2;
}

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

.ofac-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.ofac-switch input {
  width: 42px;
  height: 22px;
  appearance: none;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fee2e2;
  cursor: pointer;
  position: relative;
}

.ofac-switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bad);
  transition: transform 0.16s ease, background 0.16s ease;
}

.ofac-switch input:checked {
  border-color: #bbf7d0;
  background: #dcfce7;
}

.ofac-switch input:checked::after {
  transform: translateX(20px);
  background: #166534;
}

.small-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.small-button:hover {
  background: #eef3f7;
}

.small-button.status-ok {
  border-color: #16a34a;
  background: #dcfce7;
  color: #166534;
}

.small-button.status-ok:hover {
  background: #bbf7d0;
}

.small-button.status-danger {
  border-color: #dc2626;
  background: #fee2e2;
  color: #991b1b;
}

.small-button.status-danger:hover {
  background: #fecaca;
}

.small-button.status-warn {
  border-color: #facc15;
  background: #fef3c7;
  color: #92400e;
}

.small-button.status-warn:hover {
  background: #fde68a;
}

.danger-button {
  color: var(--bad);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.summary-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
}

.certificate-preview {
  padding: 28px;
  border: 1px solid var(--line);
  background: #fff;
}

.cert-sheet {
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid #253044;
  background: white;
}

.cert-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  color: white;
  background: #253044;
}

.cert-head h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.cert-code {
  min-width: 230px;
  text-align: right;
}

.cert-code strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  letter-spacing: 0;
}

.cert-body {
  padding: 22px;
}

.cert-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.cert-table th,
.cert-table td {
  padding: 10px 12px;
  border: 1px solid #cbd5df;
  text-align: left;
  vertical-align: top;
}

.cert-table th {
  width: 28%;
  background: #eef3f7;
  font-size: 12px;
  text-transform: uppercase;
}

.cert-section-title {
  margin: 20px 0 10px;
  font-size: 16px;
  text-transform: uppercase;
}

.cert-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.message {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #f4c7a1;
  color: #7c2d12;
  background: #fff7ed;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 32, 51, 0.56);
}

.modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: 0 28px 70px rgba(23, 32, 51, 0.3);
}

#userCreateModal .modal {
  width: min(1080px, 100%);
}

.review-detail-modal {
  width: min(1120px, 100%);
}

.info-modal {
  width: min(720px, 100%);
}

.info-panel {
  display: grid;
  gap: 18px;
  padding: 16px;
  border: 1px solid #94a3b8;
  background: #eef6ff;
  color: #172033;
  line-height: 1.5;
  text-align: center;
}

.info-panel p {
  margin: 0;
}

.review-observation-field {
  display: block;
  margin-top: 16px;
}

.info-modal-lead {
  color: #475569;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.25;
}

.info-modal-warning {
  margin-top: 8px !important;
  padding-top: 18px;
  border-top: 1px solid #cbd5e1;
  color: #334155;
  font-size: 16px;
  font-weight: 900;
}

.norm-link-button {
  display: inline-flex;
  justify-content: center;
  min-width: 210px;
}

.review-detail-table th {
  width: 220px;
}

.associate-logo {
  width: 64px;
  height: 42px;
  object-fit: contain;
  display: block;
  border: 1px solid var(--line);
  background: white;
}

.identity-grid.compact {
  margin-top: 2px;
}

.identity-grid.compact h3 {
  margin-top: 0;
}

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

@media (max-width: 1050px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-section,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-visual {
    min-height: 420px;
  }

  .benefit-grid,
  .benefit-grid.compact,
  .stack-grid,
  .method-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .policy-panel {
    position: static;
    min-height: auto;
  }

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

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

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

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

  .dollar-fix-row {
    grid-template-columns: minmax(100px, 140px) minmax(0, 1fr);
  }

  .client-party-grid,
  .goods-description-grid {
    grid-template-columns: 1fr;
  }

  .security-protocol-box {
    grid-template-columns: 1fr;
  }

  .premium-preview-grid {
    grid-template-columns: 1fr;
  }

  .premium-preview-box div {
    grid-template-columns: 1fr;
  }

  .premium-preview-box dt {
    text-align: left;
  }

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

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

@media (max-width: 720px) {
  .site-header {
    position: static;
    padding: 14px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .site-nav a,
  .nav-system-button {
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--landing-line);
    background: #fff;
    text-align: center;
  }

  .hero-section,
  .landing-section {
    padding: 34px 14px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

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

  .landing-primary-button,
  .landing-secondary-button,
  .landing-text-button {
    width: 100%;
  }

  .hero-visual {
    min-height: 340px;
  }

  .signal-grid,
  .benefit-grid,
  .benefit-grid.compact,
  .stack-grid,
  .method-steps,
  .public-form-grid,
  .landing-footer {
    grid-template-columns: 1fr;
  }

  .public-form {
    padding: 18px;
  }

  .shell {
    padding: 12px;
  }

  .form-panel,
  .policy-panel,
  .result-panel {
    padding: 18px;
  }

  .two,
  .three,
  .four,
  .six,
  .five,
  .checks,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .cert-head {
    align-items: stretch;
    flex-direction: column;
  }

  .field-row {
    align-items: stretch;
    flex-direction: column;
  }

  .dollar-fix-row {
    grid-template-columns: 1fr;
  }

  .cert-code {
    text-align: left;
  }
}
