/* Cubik — design tokens (docs/BRAND.md) — sin negro puro */
:root {
  --brand-navy: #0f2744;
  --brand-navy-mid: #1a3d66;
  --brand-navy-dark: #0a1c32;
  --brand-orange: #f7941d;
  --brand-orange-dark: #d97a08;
  --brand-orange-light: #ffba42;
  --brand-blue: #29abe2;
  --brand-blue-dark: #1e8fbf;
  --brand-blue-light: #5ec4ef;
  --brand-white: #ffffff;
  --brand-gray-50: #f4f7fb;
  --brand-gray-100: #e8eef5;
  --brand-gray-200: #d1dbe8;
  --brand-gray-500: #6b7c92;
  --brand-gray-700: #3d5068;

  --surface-warm: rgba(247, 148, 29, 0.08);
  --surface-cool: rgba(41, 171, 226, 0.12);
  --surface-navy: rgba(15, 39, 68, 0.05);
  --surface-danger: rgba(192, 57, 43, 0.08);

  --bg: var(--brand-gray-50);
  --surface: var(--brand-white);
  --card: var(--brand-white);
  --border: var(--brand-gray-200);
  --text: var(--brand-navy);
  --text-muted: var(--brand-gray-700);
  --text-on-dark: var(--brand-white);
  --accent: var(--brand-orange);
  --accent-hover: var(--brand-orange-dark);
  --accent-secondary: var(--brand-blue);
  --accent-secondary-hover: var(--brand-blue-dark);
  --accent-soft: var(--surface-warm);
  --accent-blue-soft: var(--surface-cool);
  --status-ok: var(--brand-blue-dark);
  --status-ok-bg: var(--surface-cool);
  --status-warn: var(--brand-orange-dark);
  --status-warn-bg: var(--surface-warm);
  --shadow: 0 4px 24px rgba(15, 39, 68, 0.1);
  --radius: 12px;
  --font: "Segoe UI", Inter, system-ui, sans-serif;
}

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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.site-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  border-bottom: 3px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(90deg, var(--brand-orange) 0%, var(--brand-blue) 50%, var(--brand-navy) 100%) border-box;
  box-shadow: var(--shadow);
}

.brand-logo-wrap {
  flex-shrink: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  line-height: 0;
}

.brand-logo {
  width: min(200px, 42vw);
  height: auto;
  display: block;
  border: none;
  border-radius: 0;
}

.brand-copy h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--brand-navy);
}

.brand-copy .tagline {
  margin: 0.2rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-orange);
}

.header-actions {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.tab-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

.invite-tester {
  margin: 1rem 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius);
}

.invite-tester h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.invite-steps {
  margin: 0.5rem 0 0.75rem 1.2rem;
  padding: 0;
}

.invite-link-wrap {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.9rem;
}

.invite-link-wrap a {
  color: var(--accent-hover);
  font-weight: 600;
}

.demo-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(90deg, var(--brand-navy) 0%, var(--brand-navy-mid) 55%, var(--brand-blue-dark) 100%);
  color: var(--text-on-dark);
  font-size: 0.85rem;
}

.demo-bar .tab-sm {
  border-color: var(--brand-orange);
  color: var(--brand-white);
}

.demo-bar a.tab-sm {
  text-decoration: none;
  display: inline-block;
}

.tab-outline {
  background: transparent;
  color: var(--brand-navy);
  border: 2px solid var(--brand-navy-mid);
}

.tab-outline:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue-dark);
}

.register-only {
  display: none;
}

.auth-panel.is-register .register-only {
  display: block;
}

.auth-panel .admin-only {
  display: none;
}

.auth-panel.is-register .admin-only {
  display: none;
}

.auth-panel {
  margin: 0 1.5rem 1rem;
  max-width: 440px;
}

.auth-intent-step {
  width: 100%;
}

.auth-intent-grid {
  margin-bottom: 0.75rem;
}

.auth-intent-cancel {
  display: block;
  margin: 0 auto;
}

.auth-intent-badge {
  margin: 0 0 0.35rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-navy-mid);
  background: var(--brand-gray-50);
  border-radius: 8px;
  text-align: center;
}

.auth-intent-badge[hidden] {
  display: none;
}

.auth-context {
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-sizing: border-box;
}

.auth-context[hidden] {
  display: none !important;
}

.auth-context-flow {
  display: block;
  width: min(100%, 15rem);
  height: auto;
  margin: 0 auto 0.55rem;
}

.auth-context-copy {
  text-align: center;
}

.auth-context-icon {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.auth-context-role {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.2;
}

.auth-context-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-wrap: balance;
}

.auth-context[data-role='carrier'] {
  border-color: rgba(41, 171, 226, 0.35);
  background: linear-gradient(180deg, rgba(41, 171, 226, 0.08) 0%, var(--surface) 100%);
}

.auth-context[data-role='shipper'] {
  border-color: rgba(247, 148, 29, 0.35);
  background: linear-gradient(180deg, rgba(247, 148, 29, 0.08) 0%, var(--surface) 100%);
}

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

.auth-panel.has-auth-intent[data-auth-role='carrier'] #auth-submit {
  background: #29abe2;
  border-color: #29abe2;
}

.auth-panel.has-auth-intent[data-auth-role='carrier'] #auth-submit:hover:not(:disabled) {
  filter: brightness(1.05);
}

.auth-panel.has-auth-intent[data-auth-role='shipper'] #auth-submit {
  background: #f7941d;
  border-color: #f7941d;
}

.auth-panel.has-auth-intent[data-auth-role='shipper'] #auth-submit:hover:not(:disabled) {
  filter: brightness(1.05);
}

.auth-panel.has-auth-intent.is-register[data-auth-role='carrier'] #auth-submit {
  background: #29abe2;
  border-color: #29abe2;
}

.auth-panel.has-auth-intent.is-register[data-auth-role='shipper'] #auth-submit {
  background: #f7941d;
  border-color: #f7941d;
}

.auth-role-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding: 4px;
  margin: 0 0 0.55rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--brand-gray-50);
  box-sizing: border-box;
}

.auth-role-toggle[hidden] {
  display: none !important;
}

.auth-role-toggle-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 9px;
  background: var(--brand-blue, #29abe2);
  transition: left 0.22s ease, background 0.22s ease;
  pointer-events: none;
}

.auth-role-toggle[data-active='shipper'] .auth-role-toggle-pill {
  left: calc(50%);
  background: var(--brand-orange, #f7941d);
}

.auth-role-toggle-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 0.62rem 0.45rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--brand-navy);
  transition: color 0.15s ease;
}

.auth-role-toggle-btn[aria-selected='true'] {
  color: var(--text-on-dark, #fff);
}

.auth-panel.has-auth-intent .auth-role-picker {
  display: none;
}

.auth-role-picker {
  margin: 0.5rem 0 0.75rem;
}

.auth-role-picker-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-role-picker-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.auth-role-pill {
  padding: 0.55rem 0.45rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-navy);
  cursor: pointer;
  line-height: 1.25;
}

.auth-role-pill.active {
  border-color: var(--brand-orange);
  background: var(--surface-warm);
  color: var(--brand-navy);
}

.auth-panel.has-auth-intent .auth-role-picker-btns .auth-role-pill:not(.active) {
  opacity: 0.55;
}

body.cubik-app #auth-panel .auth-intent-step {
  display: none !important;
}

body.cubik-app #auth-panel .auth-intent-step,
body.cubik-app #auth-panel #auth-form-wrap,
body.cubik-app #auth-panel .auth-context {
  width: min(100%, 24rem);
}

.auth-error {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #991b1b;
  background: #fee2e2;
  border: 2px solid #dc2626;
  border-radius: 8px;
}

.auth-error[hidden] {
  display: none;
}

.auth-otp-step {
  margin: 0.5rem 0 0;
}

.auth-otp-lead {
  margin: 0 0 1rem;
  line-height: 1.45;
}

.auth-otp-digits {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  margin: 0 0 1rem;
}

.auth-otp-digit {
  width: 3.25rem;
  height: 3.25rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border: 2px solid var(--border, #cbd5e1);
  border-radius: 12px;
  background: #fff;
  color: var(--brand-navy, #0f2744);
  box-sizing: border-box;
}

.auth-otp-digit:focus {
  outline: none;
  border-color: var(--brand-orange, #f7941d);
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.25);
}

.auth-otp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  margin: 0 0 1rem;
}

.auth-otp-submit {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: var(--brand-navy, #0f2744);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.auth-otp-submit:hover:not(:disabled) {
  background: #16355a;
}

.auth-otp-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

body.cubik-app #auth-panel .auth-otp-step:not([hidden]) ~ #form-auth,
body.cubik-app #auth-panel .auth-otp-step:not([hidden]) ~ .auth-login-footer {
  display: none !important;
}

.auth-user {
  font-size: 0.75rem;
}

.suggestions-box {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem;
  background: var(--brand-gray-50);
  border-radius: 8px;
  border: 1px dashed var(--border);
}

.suggestion-item {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.match-form .step-label {
  margin: 1rem 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.match-form .step-label:first-of-type {
  margin-top: 0;
}

.match-selected {
  padding: 0.65rem 0.75rem;
  background: var(--surface-cool);
  border-left: 3px solid var(--brand-blue);
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.btn-match-cta {
  width: 100%;
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  font-size: 1.05rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(247, 148, 29, 0.35);
}

.btn-match-cta:hover {
  background: var(--accent-hover);
}

.suggestion-item .use-suggestion {
  margin-top: 0.35rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

.brand-copy .lead {
  margin: 0;
  color: var(--text-muted);
  max-width: 40rem;
  font-size: 0.95rem;
}

.hero-tag {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-cool);
  color: var(--brand-blue-dark);
  font-weight: 600;
}

nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: var(--surface);
}

.tab {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.tab:hover {
  border-color: var(--accent);
}

.tab.active {
  border-color: var(--brand-navy);
  background: var(--brand-navy);
  color: var(--text-on-dark);
}

main {
  padding: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

form,
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button[type="submit"],
.actions button {
  background: var(--accent);
  color: var(--brand-white);
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

button[type="submit"]:hover,
.actions button:hover {
  background: var(--accent-hover);
}

.actions button {
  font-size: 0.8rem;
  margin-right: 0.35rem;
}

.item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 0.6rem;
  background: var(--brand-gray-50);
}

.item p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.pill {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  margin-left: 0.35rem;
  font-weight: 700;
}

.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.legal-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.legal-check input[type="checkbox"] {
  width: auto;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
}

.cargo-trust-line {
  font-size: 0.82rem;
  background: var(--surface-cool);
  border-left: 3px solid var(--brand-blue);
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
}

.active-trip-banner {
  margin: 0;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(90deg, var(--brand-navy) 0%, var(--brand-navy-mid) 55%, var(--brand-blue-dark) 100%);
  border-bottom: none;
  color: var(--text-on-dark);
}

.active-trip-banner .active-trip-tag,
.active-trip-banner .active-trip-route,
.active-trip-banner .muted {
  color: var(--text-on-dark);
}

.active-trip-banner .active-trip-tag {
  color: var(--brand-orange-light);
}

.active-trip-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.active-trip-tag {
  margin: 0;
  font-weight: 800;
  color: var(--accent-hover);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.active-trip-route {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

.suggestions-searching.is-searching {
  border-color: var(--brand-blue);
  background: var(--surface-cool);
}

.searching-trucks {
  margin: 0;
  font-weight: 600;
  color: var(--accent-hover);
}

.searching-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.35rem;
  animation: pulse-dot 1s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

#list-trips h3 {
  margin: 1rem 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.trip-card .pill {
  vertical-align: middle;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-section {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.maps-gated-section.maps-gated-locked {
  opacity: 0.55;
  pointer-events: none;
}

.maps-gate-hint {
  margin: 0.5rem 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-cool);
  border-left: 3px solid var(--brand-blue);
}

.maps-weight-hint {
  font-size: 0.85rem;
  margin: 0.25rem 0 0.75rem;
}

.match-budget-hint {
  padding: 0.5rem 0.75rem;
  background: var(--surface-cool);
  border-left: 3px solid var(--brand-blue-dark);
  margin: 0.5rem 0;
}

.match-price-box {
  margin: 0.5rem 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-navy);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.match-price-box input[type='number'],
.match-price-box .match-offer-input--wide {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0.35rem 0 0.5rem;
  font-size: 1.05rem;
  padding: 0.65rem 0.75rem;
}

.match-offer-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.match-price-cta {
  margin-top: 0.65rem;
}

.match-price-box .btn-match-cta {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1.1rem;
  font-size: 1.02rem;
  font-weight: 800;
  border-radius: 10px;
}

.suggestion-actions-hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.match-price-box .btn-accept-match {
  display: block;
  width: 100%;
  margin: 0;
  padding: 1rem 1.35rem;
  font-size: 1.12rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  background: var(--accent);
  color: var(--brand-white);
  border: 3px solid var(--brand-navy-mid);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(247, 148, 29, 0.35);
}

.match-price-box .btn-accept-match:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 26px rgba(247, 148, 29, 0.45);
}

.match-price-box .btn-accept-match:active {
  transform: translateY(1px);
  box-shadow: 0 3px 12px rgba(247, 148, 29, 0.35);
}

.match-price-outside {
  color: var(--status-warn);
  font-size: 0.88rem;
  margin: 0.35rem 0;
  padding: 0.4rem 0.5rem;
  background: var(--status-warn-bg);
  border-radius: 4px;
}

.maps-geo-readonly:read-only {
  background: var(--brand-gray-100);
}

.address-wrap {
  position: relative;
}

.address-suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow-y: auto;
}

.address-suggestions li button {
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
}

.address-suggestions li button:hover {
  background: var(--accent-soft);
}

.distance-box {
  padding: 0.65rem 0.75rem;
  background: var(--surface-cool);
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--brand-blue);
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.distance-box-line {
  display: block;
  line-height: 1.4;
  margin: 0.15rem 0;
}

.suggestions-box {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem;
  background: var(--brand-gray-100);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.suggestion-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item .use-suggestion,
.suggestion-item .match-suggestion-now {
  margin-top: 0.35rem;
  margin-right: 0.4rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.suggestion-item .match-suggestion-now {
  background: var(--brand-navy);
  color: var(--text-on-dark);
}

select.offer-picked {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}

.board-actor {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.65rem;
  background: var(--brand-gray-100);
  border-radius: 8px;
  font-size: 0.85rem;
}

.board-actor select {
  margin-top: 0.25rem;
  width: 100%;
  max-width: 360px;
}

.active-proposal-banner {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--status-warn-bg);
  border: 1px solid var(--brand-orange-light);
  border-radius: 8px;
  font-size: 0.88rem;
}

.match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.match-actions button {
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
}

.match-actions .btn-match-progress {
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: var(--brand-white);
  border: 2px solid var(--brand-navy-mid);
}

.btn-match-cta,
.match-actions .btn-match-cta {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: var(--brand-white);
  border: 2px solid var(--brand-navy-mid);
  border-radius: 8px;
  cursor: pointer;
}

.btn-match-cta:hover,
.match-actions .btn-match-cta:hover {
  background: var(--accent-hover);
}

.match-price-box .btn-match-cta {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1.1rem;
  font-size: 1.02rem;
  font-weight: 800;
  border-radius: 10px;
}

.chat-presets-carousel {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 0.15rem 0 0.35rem;
  margin-bottom: 0.35rem;
}

.chat-presets-carousel .tab {
  flex: 0 0 auto;
  scroll-snap-align: start;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-emergency-label {
  margin-top: 0.35rem;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--status-warn);
}

.chat-presets-label {
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.chat-preset-emergency {
  border-color: var(--brand-orange) !important;
  font-weight: 700;
}

.help-drawer .help-trip-context {
  margin: 0 0.85rem 0.65rem;
  padding: 0.55rem 0.65rem;
  background: var(--surface-cool);
  border-left: 3px solid var(--brand-orange);
  border-radius: 8px;
  font-size: 0.85rem;
}

.help-drawer .help-trip-context span {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.help-drawer-body {
  padding: 0 0.85rem 0.5rem;
  overflow-y: auto;
  flex: 1;
}

.help-bot-bubble {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.65rem;
}

.help-bot-bubble.help-bot-ok {
  border-left: 3px solid var(--status-ok);
}

.help-bot-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--brand-orange);
  margin-bottom: 0.25rem;
}

.help-option-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.help-option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.delivery-close-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.delivery-close-actions .link-btn {
  align-self: center;
  font-size: 0.92rem;
}

.trip-payment-badge {
  font-size: 0.82rem;
  margin: 0.35rem 0 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  line-height: 1.35;
}

.trip-payment-pilot {
  background: #f4f4f5;
  color: #52525b;
  border: 1px solid #e4e4e7;
}

.trip-payment-hold {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.trip-delivery-awaiting {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.trip-delivery-awaiting-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: #1e40af;
}

.trip-card-awaiting .trip-status-pill {
  background: #dbeafe;
  color: #1d4ed8;
}

.trip-payment-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-weight: 600;
}

.trip-payment-settlement {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.trip-payment-charged {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.trip-payment-settlement-head,
.trip-payment-charged-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.45rem;
}

.trip-payment-pill {
  font-size: 0.72rem;
}

.trip-payment-amount {
  font-size: 0.95rem;
}

.trip-payment-negative {
  color: #b91c1c;
}

.trip-payment-breakdown {
  display: grid;
  gap: 0.2rem;
  font-size: 0.8rem;
  margin: 0.35rem 0;
}

.trip-pay-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.trip-pay-row.fee {
  color: #7c2d12;
}

.trip-pay-row.total {
  padding-top: 0.25rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  font-weight: 600;
}

.trip-payment-hint {
  display: block;
  font-size: 0.74rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.cubik-pay-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e4e4e7;
  margin: 0.35rem 0;
}

.cubik-pay-bar-sm {
  height: 6px;
}

.cubik-pay-bar-freight {
  background: var(--brand-blue, #1e3a5f);
}

.cubik-pay-bar-fee {
  background: var(--brand-orange, #f97316);
}

.cubik-saldo-pilot {
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: linear-gradient(160deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid var(--border);
}

.cubik-saldo-head h3 {
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-pilot {
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.72rem;
}

.cubik-balance-card {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.cubik-balance-card.cubik-balance-negative {
  border-color: #fecaca;
  background: #fff5f5;
}

.cubik-balance-card.cubik-balance-positive {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.cubik-balance-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
}

.cubik-balance-amount {
  margin: 0.15rem 0;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
}

.cubik-balance-negative .cubik-balance-amount {
  color: #b91c1c;
}

.cubik-balance-positive .cubik-balance-amount {
  color: #047857;
}

.cubik-balance-sub {
  margin: 0;
  font-size: 0.82rem;
}

.cubik-status-hint {
  font-size: 0.86rem;
  margin: 0.5rem 0 0.75rem;
  line-height: 1.4;
}

.cubik-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.5rem 0;
}

@media (max-width: 520px) {
  .cubik-breakdown-grid {
    grid-template-columns: 1fr;
  }
}

.cubik-breakdown-item {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  font-size: 0.82rem;
}

.cubik-breakdown-item strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
}

.cubik-breakdown-item.fee strong {
  color: #c2410c;
}

.cubik-amount-negative {
  color: #b91c1c;
}

.cubik-amount-positive {
  color: #047857;
}

.cubik-bar-legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  margin: 0.25rem 0 0.75rem;
}

.cubik-bar-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.2rem;
}

.dot-freight {
  background: var(--brand-blue, #1e3a5f);
}

.dot-fee {
  background: var(--brand-orange, #f97316);
}

.cubik-trips-heading {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.88rem;
}

.cubik-trip-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cubik-trip-row {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
}

.cubik-trip-row:last-child {
  border-bottom: none;
}

.cubik-trip-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.cubik-trip-pill {
  font-size: 0.68rem;
}

.cubik-trip-amounts {
  margin: 0.15rem 0;
  line-height: 1.35;
}

.cubik-trip-when {
  margin: 0;
  font-size: 0.78rem;
}

.cubik-trips-more {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

.trip-payment-pending {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.trip-payment-pending .btn-pilot-pay {
  width: 100%;
  margin-top: 0.5rem;
}

.cubik-pending-block {
  margin: 0.75rem 0;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed var(--brand-orange, #f97316);
}

.cubik-pending-block h4 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.pilot-pay-breakdown {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem;
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.pilot-pay-note {
  font-size: 0.82rem;
  margin: 0.5rem 0;
}

.pilot-pay-processing {
  text-align: center;
  padding: 1.25rem 0.5rem;
}

.pilot-pay-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid #e4e4e7;
  border-top-color: var(--brand-orange, #f97316);
  border-radius: 50%;
  animation: pilot-pay-spin 0.8s linear infinite;
  margin-bottom: 0.75rem;
}

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

#pilot-pay-actions {
  padding: 0 1rem 1rem;
}

.pilot-pay-drawer {
  width: min(340px, 100vw);
}

@media (min-width: 641px) {
  .pilot-pay-drawer.chat-drawer {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 0;
    transform: translateX(-50%);
    width: min(360px, calc(100vw - 2rem));
    max-width: 360px;
    border-left: none;
    border-top: 3px solid var(--accent);
    border-radius: 16px 16px 0 0;
    max-height: min(90vh, 640px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  }
}

.trip-payment-settlement-head .trip-payment-pill + .trip-payment-pill {
  margin-left: 0;
}

.help-detail-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.help-option-btn:active {
  border-color: var(--brand-orange);
  background: var(--surface-warm);
}

.help-option-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brand-navy);
}

.help-option-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.help-footnote {
  font-size: 0.72rem;
  margin-top: 0.5rem;
}

.help-detail-form {
  padding: 0 0.85rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.help-detail-form textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.help-done-btn {
  width: 100%;
  margin-top: 0.5rem;
}

.nav-picker-card .nav-picker-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.nav-picker-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-navy);
  cursor: pointer;
}

.nav-picker-btn:active {
  border-color: var(--brand-orange);
}

.nav-picker-icon {
  font-size: 1.35rem;
}

.trip-party-row,
.match-party-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.trip-party-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
}

.trip-party-meta {
  flex: 1;
  min-width: 0;
}

.trip-party-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.2;
}

.trip-party-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.trip-status-pill {
  margin-left: auto;
  flex-shrink: 0;
}

.trip-contact-bar {
  margin: 0.15rem 0 0.45rem;
}

.trip-call-btn {
  font-size: 0.75rem !important;
}

.trip-route-line {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.88rem;
}

.call-modal-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding: 0.45rem 0.5rem;
  background: var(--surface-cool);
  border-radius: 8px;
}

.notif-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.35rem;
}

.distance-box-eta {
  line-height: 1.45;
}

.prep-checklist {
  border: 1px solid var(--border, #e8e4df);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}

.prep-checklist legend {
  font-weight: 600;
  padding: 0 0.25rem;
}

.timing-advanced {
  margin: 0.5rem 0 1rem;
}

.timing-advanced summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand, var(--brand-orange));
}

.board-matches-block {
  margin: 1.5rem 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border, #e8e4df);
}

.board-market-block {
  margin-top: 0.5rem;
}

.pill-with-date {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.pill-with-date .pill-date {
  font-weight: 500;
  opacity: 0.92;
  font-size: 0.92em;
}

.proposal-compare-panel {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-orange);
  border-radius: 10px;
}

.proposal-compare-panel h3 {
  margin: 0 0 0.5rem;
}

.compare-mode-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.compare-table-wrap {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.compare-table th,
.compare-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border, #e8e4df);
  vertical-align: top;
}

.compare-row-top {
  background: var(--surface-cool);
}

.pill-rec {
  background: var(--brand-orange);
  color: var(--text-on-dark);
}

.pill-ok {
  background: var(--status-ok-bg);
  color: var(--status-ok);
}

.pill-warn {
  background: var(--status-warn-bg);
  color: var(--status-warn);
}

.compare-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.btn-sm {
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
}

.notif-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.notif-date {
  font-size: 0.82rem;
  color: var(--muted, #666);
  white-space: nowrap;
}

.match-meta {
  margin: 0.25rem 0 0.5rem;
}

.match-carrier-offer-cta {
  margin: 0.5rem 0;
}

.match-carrier-offer-cta .btn-secondary {
  font-weight: 600;
}

.match-role-hint,
.match-cancel-hint {
  width: 100%;
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
}

.match-cancel-hint {
  margin-bottom: 0.35rem;
}

.match-actions button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-trip-rate {
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.5rem 0.9rem;
  background: var(--accent);
  color: var(--brand-white);
  border: 2px solid var(--brand-navy-mid);
  border-radius: 8px;
  cursor: pointer;
}

.trip-rated-badge {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-hover);
  padding: 0.35rem 0.55rem;
  background: var(--accent-soft);
  border-radius: 8px;
}

.trip-ratings-box {
  margin: 0.5rem 0 0.65rem;
  padding: 0.55rem 0.65rem;
  background: var(--surface-cool);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-blue);
  border-radius: 8px;
  font-size: 0.85rem;
}

.trip-ratings-heading {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-hover);
}

.trip-rating-line {
  margin: 0.2rem 0;
}

.trip-rating-label {
  font-weight: 600;
  color: var(--text);
}

.trip-reputation-line strong {
  color: var(--accent-hover);
}

.match-rep-line {
  margin: 0.35rem 0 0.5rem;
}

.match-rep-badge {
  display: inline-block;
  font-size: 0.88rem;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--surface-warm);
  border: 1px solid rgba(247, 148, 29, 0.35);
  color: var(--text);
}

.match-rep-badge.match-rep-new {
  background: var(--surface-2, #f4f4f5);
  border-color: #ddd;
  color: var(--text-muted);
}

.match-rep-inline {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-hover);
  margin-left: 0.35rem;
}

.kyc-banner {
  border-left: 4px solid var(--brand-orange);
  background: var(--surface);
}

.kyc-banner-inner p {
  margin: 0.35rem 0;
}

body.kyc-pending #form-load button[type="submit"],
body.kyc-pending #form-offer button[type="submit"],
body.kyc-pending #btn-create-match {
  opacity: 0.55;
  pointer-events: none;
}

.admin-kyc-panel {
  border-left: 4px solid var(--brand-blue);
}

.admin-kyc-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.trip-rating-tags {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.rate-stars-picker {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.rate-star-btn {
  font-size: 2rem;
  line-height: 1;
  padding: 0.15rem 0.25rem;
  border: none;
  background: transparent;
  color: var(--brand-gray-200);
  cursor: pointer;
}

.rate-star-btn.active {
  color: var(--brand-orange-light);
}

.rate-tags-section {
  margin-bottom: 0.75rem;
}

.rate-tags-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.rate-tags-hint {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.rate-required-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--brand-gray-100);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.rate-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rate-tag-chip {
  font-size: 0.8rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.rate-tag-chip:hover {
  border-color: var(--accent);
}

.rate-tag-chip.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  font-weight: 700;
  color: var(--accent-hover);
}

#rate-submit-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 800;
  background: var(--accent);
  color: var(--brand-white);
  border: 2px solid var(--brand-navy-mid);
  border-radius: 10px;
  cursor: pointer;
}

#rate-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#rate-submit-btn:not(:disabled):hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--brand-navy);
  border: 2px solid var(--brand-navy-mid);
}

.btn-secondary:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue-dark);
}

.btn-danger {
  background: var(--brand-navy-dark);
  color: var(--text-on-dark);
  border: 2px solid var(--brand-navy-dark);
}

.match-cancel-meta {
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

.matches-history {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.matches-history summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.matches-history .item {
  opacity: 0.92;
}

.notif-bell {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
}

.notif-count {
  background: var(--brand-orange);
  color: var(--text-on-dark);
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
  margin-left: 0.2rem;
}

.account-penalties-panel {
  margin: 0 auto 1rem;
  max-width: 960px;
  padding: 0 1rem;
  border-left: 4px solid var(--brand-orange);
}

.account-penalties-panel:not([hidden]) {
  display: block;
}

.account-penalties-panel h2 {
  margin: 0 0 0.35rem;
}

.penalty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.75rem 0;
}

@media (max-width: 640px) {
  .penalty-grid {
    grid-template-columns: 1fr;
  }
}

.penalty-grid h3 {
  font-size: 0.9rem;
  margin: 0 0 0.35rem;
}

.penalty-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-hover);
  margin: 0 0 0.5rem;
}

.penalty-total.receivable {
  color: var(--status-ok);
}

.penalty-line {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.penalty-bank-warn {
  background: var(--status-warn-bg);
  border: 1px solid var(--brand-orange);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-size: 0.88rem;
  margin: 0.5rem 0;
}

.card-exp-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin: 0.35rem 0 0.5rem;
}

.payment-method-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  margin: 0.25rem 0.35rem 0.25rem 0;
}

.wallet-section {
  margin: 1rem 0 0.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--brand-gray-50);
}

.wallet-section h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.wallet-section h4 {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.88rem;
  color: var(--brand-blue-dark);
}

.wallet-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.wallet-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.wallet-row:last-child {
  border-bottom: none;
}

.wallet-row-main strong {
  display: inline;
  margin-right: 0.35rem;
}

.wallet-row-sub {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
}

.wallet-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
}

.wallet-empty {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.88rem;
}

.pill-ok {
  background: var(--status-ok-bg, #dcfce7);
  color: var(--status-ok, #166534);
  border: 1px solid var(--status-ok, #16a34a);
}

.claim-proof-preview-wrap {
  margin: 0.5rem 0;
}

.claim-proof-preview {
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.penalty-creditor-review {
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--accent-soft);
}

.creditor-proof-thumb-wrap {
  margin: 0.5rem 0;
}

.creditor-proof-thumb {
  max-width: 100%;
  max-height: 140px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.creditor-proof-large {
  max-width: 100%;
  max-height: 55vh;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.creditor-review-proof {
  min-height: 120px;
  margin: 0.75rem 0;
  text-align: center;
}

.btn-creditor-review {
  font-weight: 700;
}

.pill-warn {
  background: #ffebee;
  color: #b71c1c;
  font-size: 0.72rem;
}

.notif-penalty-summary {
  padding: 0.65rem;
  margin-bottom: 0.75rem;
  background: var(--brand-gray-50);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.notif-penalty-summary h4 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.notif-panel {
  position: fixed;
  top: 4.5rem;
  right: 1rem;
  z-index: 900;
  width: min(360px, 92vw);
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.notif-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.notif-item.unread {
  background: var(--accent-soft);
  padding: 0.65rem;
  border-radius: 8px;
  margin-bottom: 0.35rem;
}

.notif-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.notif-cta {
  background: var(--accent);
  color: #fff;
  border: none;
}

.match-mutual-banner {
  font-size: 0.88rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  margin: 0.35rem 0;
}

.match-mutual-banner.action-needed {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

.btn-mutual-banner {
  flex-shrink: 0;
  margin: 0;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(242, 101, 34, 0.4);
}

.btn-mutual-banner:hover {
  background: var(--accent-hover);
}

.match-mutual-banner.waiting {
  background: var(--brand-gray-100);
  color: var(--text-muted);
}

.match-mutual-banner.ready {
  background: #e8f5e9;
  border: 1px solid #81c784;
}

.match-item.match-highlight {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.mutual-cta-highlight {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent-hover) !important;
  font-weight: 700;
}

.chat-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(400px, 100vw);
  z-index: 950;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

.chat-drawer[hidden] {
  display: none;
}

.support-admin-actions[hidden] {
  display: none !important;
}

.chat-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  min-height: 120px;
}

.chat-bubble {
  margin-bottom: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  max-width: 95%;
}

.chat-bubble.mine {
  background: var(--accent-soft);
  margin-left: auto;
}

.chat-bubble.theirs {
  background: var(--brand-gray-100);
}

.chat-role {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-hover);
}

.chat-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.chat-form {
  display: flex;
  gap: 0.35rem;
}

.chat-form input {
  flex: 1;
}

.cancel-modal-card-wide {
  max-width: 480px;
}

.cancel-path-panel.cancel-path-active {
  padding: 0.85rem;
  margin-bottom: 1rem;
  background: var(--accent-soft);
  border-radius: 10px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px rgba(242, 101, 34, 0.2);
}

.cancel-path-panel.cancel-path-active .cancel-path-tag {
  display: inline-block;
}

.cancel-path-tag {
  display: none;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-hover);
  margin: 0 0 0.35rem;
}

.cancel-path-tag-alt {
  color: var(--brand-gray-700);
}

.cancel-path-switch {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.cancel-path-back {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

.cancel-modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.cancel-mutual-panel {
  padding: 0.75rem;
  margin-bottom: 1rem;
  background: var(--brand-gray-50);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.cancel-mutual-panel h4,
.cancel-other-panel h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.cancel-mutual-panel button {
  margin: 0.35rem 0.35rem 0 0;
}

.cancel-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cancel-modal[hidden] {
  display: none;
}

.cancel-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.cancel-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 2px solid var(--accent);
}

.cancel-modal-card h3 {
  margin: 0 0 0.5rem;
}

.cancel-stage-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-hover);
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.5rem;
  background: var(--accent-soft);
  border-radius: 6px;
}

.cancel-modal-card select,
.cancel-modal-card textarea {
  width: 100%;
  margin-bottom: 0.65rem;
}

.penalty-box {
  padding: 0.55rem 0.65rem;
  background: var(--status-warn-bg);
  border-radius: 8px;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  border-left: 3px solid var(--brand-orange);
}

.cancel-agreement {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.cancel-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.match-form .step-label {
  margin: 1rem 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.match-form .step-label:first-of-type {
  margin-top: 0;
}

.match-selected {
  padding: 0.65rem 0.75rem;
  background: var(--surface-cool);
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 0.5rem 0;
  border-left: 3px solid var(--brand-blue);
}

.btn-match-cta {
  width: 100%;
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  font-size: 1.05rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(247, 148, 29, 0.35);
}

.btn-match-cta:hover {
  background: var(--accent-hover);
}

.auth-login-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.auth-panel.is-forgot #form-auth {
  display: none;
}

.auth-forgot {
  margin-top: 0.5rem;
}

#change-password-panel form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#change-password-panel .btn-secondary {
  margin-top: 0.35rem;
}

.pw-strength {
  margin: 0.35rem 0 0.65rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(15, 39, 68, 0.08);
  font-size: 0.88rem;
}

.pw-strength-lead {
  margin: 0 0 0.45rem;
  color: var(--brand-gray-700, #444);
  font-size: 0.85rem;
}

.pw-strength-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pw-strength-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.28rem 0;
  color: var(--brand-gray-600, #555);
}

.pw-strength-icon {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.pw-strength-item.pw-strength-ok {
  color: #0d8a5b;
}

.pw-strength-item.pw-strength-ok .pw-strength-icon {
  background: #d1fae5;
  color: #0d8a5b;
}

.pw-strength-item.pw-strength-fail .pw-strength-icon {
  background: #fee2e2;
  color: #b42318;
}

.carrier-presence {
  margin-bottom: 1rem;
}

.carrier-available-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  margin: 0.5rem 0;
}

.carrier-available-toggle input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.trip-map-wrap {
  margin: 0.65rem 0;
}

.trip-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.trip-map-stale {
  flex: 1 1 100%;
  margin: 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border-radius: 8px;
}

.trip-map-help-btn {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}

.load-cargo-freight-insight {
  margin: 0.45rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.load-cargo-freight-warn {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.trip-map-eta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(242, 101, 34, 0.1);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.trip-map-nav-btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.65rem;
}

.trip-map-live {
  width: 100%;
  height: min(56vw, 360px);
  min-height: 240px;
  border-radius: 10px;
  border: 2px solid var(--border);
  overflow: hidden;
  background: #e8eaed;
}

.trip-map-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 2px solid var(--border);
  display: block;
}

.trip-map-meta {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

.active-trip-banner .trip-map-wrap {
  margin-top: 0.5rem;
}

.pwa-install-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-blue);
  background: var(--surface);
}

.pwa-install-banner p {
  margin: 0;
  flex: 1 1 200px;
}

.admin-hub-nav {
  margin-top: 0.75rem;
  border: none;
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-mid) 70%, var(--brand-blue-dark) 100%);
  color: var(--text-on-dark);
}

.admin-hub-title {
  margin: 0 0 0.5rem;
  color: var(--text-on-dark);
}

.admin-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.admin-hub-hint {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.88);
}

.admin-hub-hint a {
  color: var(--brand-orange-light);
}

.admin-hub-nav .tab {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-on-dark);
}

.admin-hub-nav .tab:not(.tab-outline) {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: var(--text-on-dark);
}

.admin-hub-nav .tab-outline {
  background: transparent;
  border-color: var(--brand-blue-light);
  color: var(--brand-blue-light);
}

.admin-hub-nav .tab-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-on-dark);
  color: var(--text-on-dark);
}

.admin-kyc-panel:target,
.admin-ops-panel:target {
  outline: 2px solid var(--brand-blue);
  outline-offset: 4px;
}

.admin-kyc-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
  padding: 0;
  border: none;
  background: transparent;
}

.admin-kyc-panel .admin-kyc-list {
  margin-top: 0.75rem;
}

.admin-kyc-item .pill-muted {
  background: var(--brand-gray-100);
  color: var(--text-muted);
}

.admin-ops-panel {
  margin-top: 1rem;
  border-left: 4px solid var(--brand-navy-mid);
}

.admin-ops-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin: 0.75rem 0 1rem;
}

.admin-ops-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-ops-filter select {
  min-width: 12rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.admin-ops-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.admin-kpi-card {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--brand-gray-50);
}

.admin-kpi-card strong {
  display: block;
  font-size: 1.15rem;
  color: var(--accent);
}

.admin-kpi-card span {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.admin-ops-trips {
  overflow-x: auto;
}

.admin-ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.admin-ops-table th,
.admin-ops-table td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.admin-ops-table th {
  background: var(--brand-gray-100);
  font-weight: 600;
}

.admin-ops-table tr:nth-child(even) {
  background: var(--brand-gray-50);
}

.pill-pilot {
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.site-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: var(--brand-gray-500);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* Programar viaje (Uber-style) */
.trip-schedule {
  margin: 0.75rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--brand-gray-50);
}

.schedule-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.schedule-mode-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
}

.schedule-mode-tab small {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.schedule-mode-tab:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.schedule-mode-tab input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.schedule-pick-panel {
  margin-bottom: 0.75rem;
}

.pill-scheduled {
  background: var(--surface-warm);
  color: var(--status-warn);
  border: 1px solid rgba(247, 148, 29, 0.35);
}

.trip-schedule-line {
  margin: 0.35rem 0 0.5rem;
}

.notif-offer-line {
  margin: 0.35rem 0;
  font-size: 0.92rem;
}

.notif-offer-line .notif-date {
  font-weight: 500;
  color: var(--text-muted);
}

.penalty-block-banner {
  border: 2px solid #c62828;
  background: #ffebee;
  margin: 0 auto 1rem;
  max-width: 960px;
  padding: 0 1rem;
}

.penalty-block-banner:not([hidden]) {
  display: block;
}

.penalty-block-banner .penalty-block-inner {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #ef9a9a;
  background: #fff;
}

.penalty-block-inner {
  padding: 0.25rem 0;
}

.penalty-block-warn {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  margin: 0.5rem 0;
}

.penalty-grace-hint {
  margin: 0.35rem 0;
}

.support-drawer .chat-bubble.moderator {
  border-left: 3px solid var(--brand-blue);
  background: var(--surface-cool);
}

.support-lead {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.support-admin-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

body.penalty-blocked #btn-create-match,
body.penalty-blocked #form-load button[type="submit"],
body.penalty-blocked #form-offer button[type="submit"] {
  opacity: 0.55;
  pointer-events: none;
}

.legal-check-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin: 0.75rem 0;
}

.legal-check-row .legal-check {
  margin: 0;
  flex: 1 1 14rem;
}

.load-capacity-hint.load-capacity-warn {
  color: var(--status-warn);
  background: var(--status-warn-bg);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border-left: 3px solid var(--brand-orange);
}

.schedule-eta-info {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--surface-cool);
  border-radius: 8px;
  font-size: 0.92rem;
}

.terms-modal-frame {
  width: 100%;
  min-height: 50vh;
  height: 55vh;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.form-errors-panel {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  background: var(--status-warn-bg);
  border-left: 4px solid var(--brand-orange);
  border-radius: 8px;
  font-size: 0.92rem;
}

.form-errors-panel ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.field-missing-flash {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
  transition: outline 0.2s ease;
}

.chat-mode-hint {
  margin: 0.5rem 0;
  padding: 0.5rem 0.65rem;
  background: var(--surface-cool);
  border-radius: 8px;
  font-size: 0.88rem;
}

.chat-mode-hint.chat-mode-free {
  background: var(--status-ok-bg);
}

.chat-bubble.moderator {
  border-left: 3px solid var(--brand-blue);
  background: var(--surface-cool);
}

/* Direcciones Google Maps — lista de sugerencias */
.address-search-status {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.address-suggestions {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow-y: auto;
}

.address-suggestions li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.address-suggestions li:last-child {
  border-bottom: none;
}

.address-suggestions button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.address-suggestions button:hover,
.address-suggestions button:focus {
  background: var(--surface-cool);
}

body.cubik-app .address-suggestions.address-suggestions-portal {
  z-index: 900;
  margin: 0;
  box-sizing: border-box;
}

body.cubik-app .address-suggestions.address-suggestions-portal-aligned {
  /* top/left/width los fija maps-ui.js según el input */
  max-height: min(260px, 42vh);
  box-shadow: 0 8px 28px rgba(15, 39, 68, 0.2);
}

body.cubik-app .address-suggestions.address-suggestions-portal:not(.address-suggestions-portal-aligned) {
  left: max(0.75rem, var(--app-safe-left, 0px));
  right: max(0.75rem, var(--app-safe-right, 0px));
  bottom: calc(var(--app-nav-h, 4.25rem) + var(--app-safe-bottom, 0px) + var(--kb-inset, 0px) + 0.35rem);
  max-height: min(260px, 40vh);
}

body.cubik-app.maps-picker-open .address-suggestions.address-suggestions-portal:not([hidden]) {
  display: block;
}

/* Ayuda urgencia al publicar carga (opción A — copy honesto) */
.load-urgency-hint {
  margin: 0.35rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--brand-gray-50);
  font-size: 0.9rem;
}

.load-urgency-hint--urgent {
  border-color: rgba(247, 148, 29, 0.45);
  background: var(--surface-warm);
}

.load-urgency-hint--flexible {
  border-color: rgba(41, 171, 226, 0.35);
  background: var(--surface-cool);
}

.load-urgency-hint__title {
  margin: 0 0 0.45rem;
  font-weight: 600;
  color: var(--text);
}

.load-urgency-hint__list {
  margin: 0 0 0.5rem 1.1rem;
  padding: 0;
}

.load-urgency-hint__list li {
  margin: 0.25rem 0;
}

.load-urgency-hint__foot {
  margin: 0;
  font-size: 0.82rem;
}

.match-budget-hint {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(41, 171, 226, 0.35);
  background: var(--surface-cool);
  font-size: 0.88rem;
}

.trip-arrival-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 101, 34, 0.35);
  background: linear-gradient(135deg, rgba(255, 248, 240, 0.98), rgba(255, 236, 220, 0.95));
  box-shadow: 0 6px 18px rgba(15, 39, 68, 0.08);
}

.trip-arrival-banner--approaching {
  animation: trip-arrival-pulse 2.4s ease-in-out infinite;
}

.trip-arrival-banner--arrived {
  border-color: rgba(34, 160, 107, 0.45);
  background: linear-gradient(135deg, rgba(240, 255, 248, 0.98), rgba(226, 247, 236, 0.95));
  animation: none;
}

.trip-arrival-banner-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.trip-arrival-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.trip-arrival-banner-copy strong {
  color: var(--text);
  font-size: 0.95rem;
}

@keyframes trip-arrival-pulse {
  0%,
  100% {
    box-shadow: 0 6px 18px rgba(242, 101, 34, 0.12);
  }
  50% {
    box-shadow: 0 8px 22px rgba(242, 101, 34, 0.22);
  }
}
