:root {
  --navy-950: #020914;
  --navy-900: #061326;
  --navy-800: #0a2346;
  --blue: #0b4a8a;
  --blue-light: #1a68b5;
  --panel: #0b2b54;
  --panel-soft: #0d376c;
  --gold: #e5b950;
  --gold-soft: #f3d98f;
  --white: #f8fafc;
  --muted: #b5c2d5;
  --green: #62d994;
  --amber: #f7bd61;
  --red: #ff7b7b;
  --line: #36577e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html,
body {
  margin: 0;
  min-height: 100%;
  color-scheme: dark;
  background: radial-gradient(circle at top, #0a2140 0, var(--navy-950) 48rem);
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select { font: inherit; }
button { cursor: pointer; }
body { display: flex; justify-content: center; }

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: #0b4a8a;
  z-index: 9999;
  pointer-events: none;
}

body.auth-pending .app-shell { display: none; }

.auth-loading {
  align-self: center;
  padding: 18px 22px;
  border: 1px solid rgba(229, 185, 80, .48);
  border-radius: 14px;
  background: rgba(7, 27, 53, .92);
  color: var(--gold-soft);
  font-size: .9rem;
  font-weight: 850;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(11, 74, 138, .46), transparent 18rem),
    linear-gradient(180deg, var(--navy-900), #05101f);
}

.brand-header {
  background: linear-gradient(145deg, #0b4f91, #082f65 78%);
  border-bottom: 1px solid rgba(229, 185, 80, .72);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

.brand-header img {
  display: block;
  width: 100%;
  height: 142px;
  padding: 12px 18px 2px;
  object-fit: contain;
}

.brand-header nav {
  display: flex;
  justify-content: space-around;
  gap: 4px;
  padding: 5px 8px 11px;
}

.brand-header nav button {
  border: 0;
  background: transparent;
  color: #b6c6dc;
  font-size: .61rem;
  letter-spacing: .035em;
}

.brand-header nav button.active {
  color: var(--gold);
  font-weight: 900;
}

.tester-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(2, 11, 23, .55);
  color: var(--muted);
  font-size: .7rem;
}

.tester-session-bar strong { color: var(--white); }
.tester-session-bar button {
  border: 0;
  background: transparent;
  color: var(--gold-soft);
  font-size: .7rem;
  font-weight: 850;
}

main { padding: 18px; }

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: .73rem;
  font-weight: 900;
  letter-spacing: .14em;
}

h1,
h2,
h3,
p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: 1.75rem; line-height: 1.1; }
h2 { margin: 0; font-size: 1.25rem; }
h3 { margin: 0 0 11px; font-size: 1rem; }

.sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}

.counter-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid rgba(229, 185, 80, .72);
  border-radius: 19px;
  background:
    radial-gradient(circle at 100% 0, rgba(31, 104, 178, .48), transparent 48%),
    linear-gradient(135deg, #0a2d59, #071a34);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}

.counter-head,
.section-head,
.vehicle-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.text-button {
  flex: 0 0 auto;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--gold-soft);
  font-size: .75rem;
  font-weight: 800;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 15px;
}

.counter-grid div {
  padding: 11px 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  background: rgba(2, 11, 23, .34);
  text-align: center;
}

.counter-grid strong {
  display: block;
  color: var(--gold);
  font-size: 1.55rem;
  line-height: 1;
}

.counter-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .68rem;
}

.counter-note,
.action-note,
.privacy-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.4;
}

.hero { padding: 3px 2px 10px; }

.exchange-rate-status {
  display: inline-flex;
  align-items: center;
  margin: 12px 0 0;
  padding: 8px 11px;
  border: 1px solid rgba(229, 185, 80, .42);
  border-radius: 999px;
  background: rgba(229, 185, 80, .08);
  color: var(--gold-soft);
  font-size: .75rem;
  font-weight: 850;
  line-height: 1.3;
}

.exchange-rate-status.live {
  border-color: rgba(93, 211, 158, .48);
  background: rgba(93, 211, 158, .08);
  color: var(--green);
}

.exchange-rate-status.fallback { color: var(--amber); }

.exchange-rate-chooser {
  width: min(100%, 430px);
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(229, 185, 80, .24);
  border-radius: 14px;
  background: rgba(8, 28, 49, .72);
}

.exchange-rate-chooser label {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-soft);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .02em;
}

.exchange-rate-chooser select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 11px;
  border: 1px solid rgba(229, 185, 80, .48);
  border-radius: 10px;
  background: #0b2945;
  color: var(--white);
  font: inherit;
  font-size: .82rem;
  font-weight: 850;
}

.exchange-rate-chooser small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.35;
}

.consistency-status {
  display: flex;
  align-items: center;
  width: fit-content;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.4;
}

.consistency-status::before {
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(93, 211, 158, .1);
  content: '';
}

.consistency-status.locked { color: var(--green); }
.consistency-status.error { color: var(--red); }
.consistency-status.error::before { background: var(--red); }

.vin-form label,
.select-label {
  display: block;
  margin: 15px 0 7px;
  color: var(--gold);
  font-size: .77rem;
  font-weight: 900;
}

.vin-input,
.select-label select {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  outline: none;
  background: #f8fafc;
  color: #071326;
  font-weight: 850;
}

.vin-input {
  min-height: 50px;
  padding: 13px 12px;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.vin-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(229, 185, 80, .2);
}

.field-help {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.4;
}

.scheme-guide {
  margin: 17px 0 20px;
  border: 1px solid rgba(229, 185, 80, .58);
  border-radius: 19px;
  background:
    radial-gradient(circle at 100% 0, rgba(26, 104, 181, .32), transparent 44%),
    linear-gradient(155deg, rgba(11, 55, 108, .98), rgba(5, 24, 49, .98));
  box-shadow: 0 16px 34px rgba(0, 0, 0, .2);
  overflow: hidden;
}

.scheme-guide-toggle,
.scheme-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.scheme-guide-toggle {
  padding: 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.scheme-guide-toggle::-webkit-details-marker { display: none; }
.scheme-guide-toggle::marker { content: ''; }

.scheme-guide-toggle:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: -4px;
  border-radius: 18px;
}

.scheme-guide-heading,
.scheme-guide-heading .eyebrow {
  display: block;
}

.scheme-guide-heading { min-width: 0; }

.scheme-guide-title {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1.18;
}

.scheme-guide-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scheme-chevron {
  color: var(--gold-soft);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform .2s ease;
}

.scheme-guide[open] .scheme-chevron { transform: rotate(180deg); }

.scheme-guide-content {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(229, 185, 80, .18);
}

.scheme-count,
.scheme-title span {
  flex: 0 0 auto;
  border: 1px solid rgba(229, 185, 80, .46);
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .045em;
  line-height: 1;
}

.scheme-count { padding: 7px 9px; }
.scheme-title span { padding: 5px 7px; }

.scheme-intro {
  margin: 9px 0 13px;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}

.scheme-grid { display: grid; gap: 9px; }

.scheme-item {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 13px;
  background: rgba(2, 13, 28, .42);
}

.scheme-title strong {
  color: var(--gold);
  font-size: .83rem;
  letter-spacing: .04em;
}

.scheme-item h3 {
  margin: 8px 0 4px;
  font-size: .86rem;
}

.scheme-item p {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.42;
}

.primary {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 13px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f1c865, #d39b34);
  color: #061326;
  font-size: .86rem;
  font-weight: 950;
  letter-spacing: .025em;
  box-shadow: 0 10px 24px rgba(196, 136, 31, .18);
}

.primary:active { transform: translateY(1px); }
.primary:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}
.consult-button { margin-top: 12px; }
.no-vin-trailer-button {
  display: block;
  width: 100%;
  margin: 12px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(243, 217, 143, .82);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(229, 185, 80, .16), rgba(11, 74, 138, .28));
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 8px 20px rgba(0, 0, 0, .2);
  color: var(--gold-soft);
  font-size: clamp(1.05rem, 4.8vw, 1.25rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .01em;
  text-align: center;
}
.no-vin-trailer-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.status { min-height: 1.2em; margin-top: 9px; font-size: .8rem; line-height: 1.35; }
.status.ok { color: var(--green); }
.status.warn { color: var(--amber); }
.status.error { color: var(--red); }

.card {
  margin: 13px 0;
  padding: 16px;
  border: 1px solid rgba(229, 185, 80, .56);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(14, 51, 96, .98), rgba(7, 28, 55, .98));
  box-shadow: 0 14px 35px rgba(0, 0, 0, .18);
}

.pending-chip,
.assigned-chip {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(229, 185, 80, .5);
  border-radius: 999px;
  color: var(--gold);
  font-size: .67rem;
  font-weight: 850;
}

.assigned-chip {
  border-color: rgba(93, 211, 158, .48);
  background: rgba(93, 211, 158, .08);
  color: var(--green);
}

.vehicle h2 { margin: 7px 0 10px; font-size: 1.3rem; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #1a64a7; font-size: .73rem; font-weight: 900; }
.vehicle-year {
  min-width: 4.25ch;
  padding: 7px 13px 6px;
  border: 1px solid rgba(229, 185, 80, .9);
  background: rgba(229, 185, 80, .1);
  box-shadow: 0 0 0 3px rgba(229, 185, 80, .08), 0 8px 24px rgba(0, 0, 0, .22);
  color: var(--gold);
  font-size: clamp(1.85rem, 8vw, 2.5rem);
  line-height: 1;
  letter-spacing: .035em;
  text-align: center;
}
.verified { flex: 0 0 auto; color: var(--green); font-size: .75rem; font-weight: 900; }

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  color: #edf3fb;
  font-size: .83rem;
}

.mono {
  margin: 13px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem;
}

.route-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 14px 0;
}

.route {
  min-height: 45px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #081b35;
  color: var(--white);
  font-weight: 950;
}

.route.active {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.route.disabled { opacity: .42; cursor: not-allowed; }

.route span { display: block; }

.tmec-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 13px;
  padding: 12px 13px;
  border: 1px solid rgba(229, 185, 80, .68);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(80, 57, 14, .28), rgba(4, 22, 44, .58));
}

.tmec-control[hidden] { display: none; }
.tmec-control strong { display: block; color: var(--gold); font-size: .8rem; }
.tmec-control span { display: block; margin-top: 4px; color: #e3e9f1; font-size: .72rem; line-height: 1.4; }

.tmec-toggle {
  min-width: 132px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--gold);
  border-radius: 11px;
  background: rgba(229, 185, 80, .1);
  color: var(--gold);
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .035em;
}

.tmec-toggle.active {
  background: linear-gradient(135deg, #f1c865, #d39b34);
  color: #061326;
}

.tmec-toggle:disabled { cursor: not-allowed; opacity: .72; }

.summary-grid {
  display: grid;
  grid-template-columns: .75fr 1.35fr .8fr;
  gap: 8px;
}

.summary-grid div,
.pev {
  padding: 11px;
  border-radius: 12px;
  background: rgba(3, 19, 39, .56);
}

.summary-grid small,
.pev small { display: block; color: var(--muted); font-size: .64rem; font-weight: 850; }
.summary-grid strong { display: block; margin-top: 5px; color: var(--green); font-size: .91rem; }
.pev { margin: 13px 0; }
.pev strong { display: block; margin-top: 5px; color: var(--gold); font-size: 1.34rem; }
.rule-note { margin: 8px 0 0; color: #d5dfeb; font-size: .78rem; line-height: 1.4; }

.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .075);
  font-size: .85rem;
}

.row span { color: var(--muted); }
.row b { flex: 0 0 auto; white-space: nowrap; }

.exchange-rate-row { align-items: flex-start; }
.exchange-rate-row > span:first-child { flex: 0 0 5.25rem; }
.exchange-rate-value {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}
.exchange-rate-value b,
.exchange-rate-value small { display: block; }
.exchange-rate-value b {
  color: var(--white);
  font-size: .85rem;
  white-space: normal;
}
.exchange-rate-value small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 750;
  line-height: 1.3;
  white-space: normal;
}

.total,
.grand {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 13px;
  border-top: 1px solid var(--gold);
  color: var(--gold);
  font-size: .86rem;
  font-weight: 900;
}

.total strong,
.grand strong { font-size: 1.06rem; }
.pending {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--gold);
  color: var(--gold);
  font-size: .8rem;
  font-weight: 950;
}
.pending strong { flex: 0 0 auto; font-size: .92rem; white-space: nowrap; }

.select-label select {
  margin-top: 7px;
  padding: 11px;
  border-color: var(--line);
  background: #071b35;
  color: var(--white);
  font-weight: 700;
}

.usd p,
.gate p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.48;
}

.formula {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, .55fr);
  gap: 6px;
  align-items: center;
  margin: 12px 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(3, 19, 39, .55);
  text-align: center;
  font-size: .68rem;
}

.formula i { color: var(--gold); font-style: normal; font-weight: 950; }
.formula strong { color: var(--green); }
.quote-actions {
  margin: 15px 0;
  scroll-margin-bottom: calc(104px + env(safe-area-inset-bottom));
}
.share-button { min-height: 57px; }
.continue-button { margin: 3px 0 15px; }

.review-card {
  display: flex;
  gap: 13px;
  border-color: rgba(247, 189, 97, .65);
}

.review-card > div { min-width: 0; flex: 1; }
.review-card h3 { margin-bottom: 5px; color: var(--amber); }
.review-card p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.review-icon { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 50%; background: rgba(247, 189, 97, .15); color: var(--amber); font-weight: 950; }

.error-report-card {
  border-color: rgba(98, 217, 148, .42);
  background:
    radial-gradient(circle at 100% 0, rgba(98, 217, 148, .1), transparent 45%),
    linear-gradient(180deg, #0a294f, #071b35);
}

.error-report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.error-report-heading h3 { margin-bottom: 5px; }
.error-report-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
}

.report-error-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(98, 217, 148, .48);
  border-radius: 10px;
  background: rgba(98, 217, 148, .1);
  color: var(--green);
  font-size: .72rem;
  font-weight: 950;
}

.error-report-form {
  display: grid;
  gap: 8px;
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.error-report-form label {
  color: var(--gold-soft);
  font-size: .76rem;
  font-weight: 850;
}

.error-report-form label span {
  color: var(--muted);
  font-weight: 650;
}

.error-report-form input,
.error-report-form select,
.error-report-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  outline: none;
  background: #f8fafc;
  color: #071326;
  font-size: .84rem;
}

.error-report-form textarea { min-height: 105px; resize: vertical; }
.error-report-form input:focus,
.error-report-form select:focus,
.error-report-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(229, 185, 80, .18);
}

.error-report-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 5px;
}

.error-report-actions .primary { width: auto; min-height: 45px; }
.error-report-status {
  min-height: 1.2em;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}
.error-report-status.ok { color: var(--green); }
.error-report-status.error { color: var(--red); }

.customs-value-form {
  margin-top: 15px;
  padding: 14px;
  border: 1px solid rgba(229, 185, 80, .45);
  border-radius: 14px;
  background: rgba(2, 13, 28, .42);
}

.customs-value-form[hidden] { display: none; }
.customs-value-form label {
  display: block;
  margin: 11px 0 7px;
  color: var(--gold-soft);
  font-size: .78rem;
  font-weight: 900;
}

.customs-value-form input:not([type="checkbox"]),
.customs-value-form select {
  width: 100%;
  min-height: 49px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  outline: none;
  background: #f8fafc;
  color: #071326;
  font-size: 1rem;
  font-weight: 850;
}

.customs-value-form input:not([type="checkbox"]):focus,
.customs-value-form select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(229, 185, 80, .2);
}

.customs-value-form .tmec-trailer-confirmation {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}
.customs-value-form .tmec-trailer-confirmation input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--gold);
}

.customs-value-form .customs-value-context { color: var(--gold-soft); font-weight: 850; }
.customs-value-form .customs-value-help { margin-top: 7px; }
.customs-value-form .primary { margin-top: 12px; }
.customs-value-form .customs-value-error { min-height: 1.2em; margin-top: 8px; color: var(--red); }

.documents-panel {
  margin: 18px -2px;
  padding: 18px;
  border: 1px solid rgba(229, 185, 80, .78);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(24, 90, 157, .4), transparent 40%),
    linear-gradient(180deg, #0b2c57, #071b35);
}

.documents-head { margin-bottom: 15px; }
.document-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.upload-card {
  display: flex;
  min-height: 125px;
  flex-direction: column;
  justify-content: center;
  padding: 13px;
  border: 1px dashed #6284aa;
  border-radius: 14px;
  background: rgba(2, 13, 27, .28);
  cursor: pointer;
}

.upload-card.has-file { border-style: solid; border-color: var(--green); background: rgba(56, 178, 112, .08); }
.upload-title { color: var(--white); font-size: .8rem; font-weight: 900; }
.upload-help { margin: 6px 0; color: var(--muted); font-size: .68rem; }
.upload-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-status { color: var(--gold); font-size: .69rem; font-weight: 850; }
.upload-card.has-file .upload-status { color: var(--green); }

.evidence-details {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 13px;
  background: rgba(3, 17, 34, .38);
}

.evidence-details summary { color: var(--gold-soft); font-size: .78rem; font-weight: 850; cursor: pointer; }
.evidence-details p { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.wide-upload { display: block; margin-top: 10px; color: var(--white); font-size: .75rem; }
.wide-upload input { display: block; width: 100%; margin-top: 6px; color: var(--muted); font-size: .7rem; }

.history-panel { position: fixed; z-index: 20; inset: 16px; max-width: 488px; margin: auto; overflow: auto; box-shadow: 0 28px 90px rgba(0, 0, 0, .72); }
.history-list { margin-top: 6px; }
.history-empty { color: var(--muted); font-size: .8rem; }
.history-item { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.history-item:last-child { border-bottom: 0; }
.history-item strong { display: block; color: var(--white); font-size: .77rem; }
.history-item span { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; }

.bottom-nav {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 520px);
  grid-template-columns: repeat(5, 1fr);
  padding: 11px 6px calc(11px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-top: 1px solid rgba(229, 185, 80, .48);
  background: rgba(4, 16, 32, .97);
  backdrop-filter: blur(12px);
}

.bottom-nav button { border: 0; background: transparent; color: #9eafc5; font-size: .68rem; }
.bottom-nav button.active { color: var(--gold); font-weight: 950; }

.toast {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: 88px;
  left: 18px;
  max-width: 480px;
  margin-inline: auto;
  padding: 12px 14px;
  border: 1px solid rgba(229, 185, 80, .72);
  border-radius: 13px;
  background: #071b35;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .42);
  color: var(--white);
  font-size: .79rem;
  line-height: 1.4;
}

@media (min-width: 720px) {
  body { padding: 28px; }
  .app-shell { overflow: hidden; min-height: calc(100vh - 56px); border: 1px solid rgba(229, 185, 80, .5); border-radius: 28px; box-shadow: 0 35px 90px rgba(0, 0, 0, .48); }
  .bottom-nav { bottom: 28px; border-radius: 0 0 28px 28px; }
  .history-panel { inset: 70px 0; }
}

@media (max-width: 365px) {
  main { padding: 14px; }
  .brand-header img { height: 125px; padding-inline: 10px; }
  .document-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .formula { grid-template-columns: 1fr; }
  .formula i { transform: rotate(90deg); }
  .exchange-rate-row { gap: 10px; }
  .exchange-rate-row > span:first-child { flex-basis: 4.7rem; }
  .exchange-rate-value b { font-size: .8rem; }
  .error-report-heading { align-items: flex-start; flex-direction: column; }
  .tmec-control { grid-template-columns: 1fr; }
  .tmec-toggle { width: 100%; }
}
