:root {
    --orange: #ff800d;
    --orange-dark: #e06d00;
    --ink: #14161d;
    --text: #2e3140;
    --muted: #6b7280;
    --line: #e6e4ee;
    --bg: #f4f3f8;
    --card: #ffffff;
    --do: #ff800d;
    --ro: #3d4d73;
    --danger: #c2410c;
    --ok: #0f766e;
    --shadow: 0 18px 50px rgba(20, 22, 29, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Figtree", system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(255, 128, 13, 0.16), transparent 55%),
        var(--bg);
    min-height: 100vh;
}
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

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

.tr-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 1.25rem 1.35rem 4rem;
}

.tr-access-remaining {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ok);
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.4;
}

.tr-access-remaining:not([hidden]) {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(15, 118, 110, 0.12), rgba(255, 128, 13, 0.12));
    border: 1px solid rgba(15, 118, 110, 0.35);
    animation: tr-access-pop 0.55s ease-out, tr-access-pulse 0.9s ease-in-out 0.55s;
}

.tr-field.is-access-ok .tr-hint#usage-code-hint {
    display: none;
}

.tr-access-block { gap: 0.35rem; }
.tr-access-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.tr-access-head .tr-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
}
.tr-request-code-btn {
    border: none;
    background: transparent;
    color: var(--orange-dark);
    font-weight: 800;
    font-size: 0.86rem;
    padding: 0.2rem 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.tr-request-code-btn:hover { color: var(--orange); }
.tr-optional { font-weight: 600; color: var(--muted); font-size: 0.78rem; }

.tr-modal-request {
    padding: 1.25rem;
    background: rgba(15, 13, 24, 0.62);
    backdrop-filter: blur(8px);
}
#trial-access-gate {
    z-index: 5200;
}
#trial-code-success {
    z-index: 5310;
}
#trial-no-code-success {
    z-index: 5300;
}
.tr-code-success-hero {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(45, 212, 191, 0.42), transparent 55%),
        radial-gradient(80% 60% at 0% 100%, rgba(59, 130, 246, 0.32), transparent 50%),
        linear-gradient(145deg, #0f172a 0%, #134e4a 52%, #1e293b 100%);
}
.tr-code-success-icon {
    background: linear-gradient(145deg, #14b8a6, #0d9488);
    box-shadow: 0 12px 28px rgba(20, 184, 166, 0.38);
}
.tr-code-success-next {
    margin-top: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.28);
    line-height: 1.5;
}
.tr-done-mark--modal {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    line-height: 3rem;
    border-radius: 50%;
    background: rgba(15, 118, 110, 0.25);
    color: #a7f3d0;
    font-weight: 800;
}
.tr-no-code-success-hero {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(255, 128, 13, 0.5), transparent 55%),
        radial-gradient(80% 60% at 0% 100%, rgba(15, 118, 110, 0.38), transparent 50%),
        linear-gradient(145deg, #14161d 0%, #1a2744 50%, #0f172a 100%);
}
.tr-nc-hero-icon {
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto 0.85rem;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #ff800d, #e06d00);
    color: #fff;
    box-shadow: 0 12px 28px rgba(255, 128, 13, 0.38);
}
.tr-nc-hero-sub {
    margin: 0.5rem auto 0;
    max-width: 20rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
}
.tr-no-code-success-body {
    padding-top: 1.15rem;
}
.tr-done-screen {
    overflow: hidden;
    padding: 0;
    border: none;
    box-shadow: 0 18px 48px rgba(20, 22, 29, 0.1);
}
.tr-done-screen-hero {
    padding: 2rem 1.5rem 1.75rem;
    text-align: center;
    color: #fff;
}
.tr-done-screen-hero .tr-request-kicker,
.tr-done-screen-hero h2 {
    color: #fff;
}
.tr-done-screen-body {
    padding: 1.25rem 1.5rem 1.75rem;
}
.tr-done-screen--light {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 28px rgba(20, 22, 29, 0.06);
}
.tr-done-screen-hero--light {
    background: #fff;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}
.tr-done-screen-hero--light .tr-request-kicker {
    color: var(--muted);
}
.tr-done-screen-hero--light h2 {
    color: var(--ink);
    margin: 0.35rem 0 0;
}
.tr-done-screen-hero--light .tr-nc-hero-sub {
    color: var(--muted);
}
.tr-done-screen--light .tr-done-screen-body {
    background: #fff;
}
.tr-nc-empresa-card {
    margin-bottom: 1.1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 6px 20px rgba(20, 22, 29, 0.04);
}
.tr-nc-empresa-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.25rem;
}
.tr-nc-empresa-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.3;
    word-break: break-word;
}
.tr-nc-timeline {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.tr-nc-timeline-item {
    display: grid;
    grid-template-columns: 1.35rem 1fr;
    gap: 0.75rem;
    padding-bottom: 1rem;
    position: relative;
}
.tr-nc-timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 0.45rem;
    top: 1.35rem;
    bottom: 0.15rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 128, 13, 0.45), var(--line));
    border-radius: 2px;
}
.tr-nc-timeline-dot {
    width: 0.95rem;
    height: 0.95rem;
    margin-top: 0.2rem;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 4px rgba(255, 128, 13, 0.18);
    z-index: 1;
}
.tr-nc-timeline-dot--muted {
    background: #fff;
    border: 2px solid #c4c0d4;
    box-shadow: none;
}
.tr-nc-timeline-item strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 0.2rem;
}
.tr-nc-timeline-item p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--muted);
    font-weight: 600;
}
.tr-nc-timeline-item--now strong { color: var(--orange-dark); }
.tr-nc-footnote {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: rgba(15, 118, 110, 0.07);
    border: 1px solid rgba(15, 118, 110, 0.2);
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--text);
    font-weight: 600;
}
.tr-nc-cta {
    width: 100%;
    padding: 0.92rem 1.25rem;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(255, 128, 13, 0.32);
}
.tr-modal-request.is-visible .tr-request-panel {
    animation: tr-request-in 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.tr-request-panel {
    width: min(440px, 100%);
    border-radius: 26px;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 28px 80px rgba(20, 22, 29, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    transform-origin: center center;
}
@keyframes tr-request-in {
    0% { opacity: 0; transform: translateY(18px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.tr-request-hero {
    position: relative;
    padding: 1.75rem 1.6rem 1.35rem;
    color: #fff;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(255, 128, 13, 0.45), transparent 55%),
        radial-gradient(80% 60% at 0% 100%, rgba(67, 24, 255, 0.35), transparent 50%),
        linear-gradient(145deg, #14161d 0%, #2a2640 48%, #1e1b2e 100%);
    text-align: center;
}
.tr-request-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.15s ease;
}
.tr-request-close:hover { background: rgba(255, 255, 255, 0.22); }
.tr-request-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.85rem;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #ff800d, #e06d00);
    color: #fff;
    box-shadow: 0 12px 28px rgba(255, 128, 13, 0.35);
}
.tr-request-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}
.tr-request-hero h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.tr-request-lead {
    margin: 0.55rem auto 0;
    max-width: 22rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
}
.tr-request-body {
    padding: 1.35rem 1.5rem 1.5rem;
    background: linear-gradient(180deg, #fafbff 0%, #fff 40%);
}
.tr-request-field { gap: 0.4rem; margin-bottom: 0.85rem; }
.tr-request-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 0.02em;
}
.tr-request-field input {
    border-radius: 14px;
    padding: 0.82rem 0.95rem;
    border: 1.5px solid #e8e6f0;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tr-request-field input::placeholder { color: #a8a8b8; font-weight: 500; }
.tr-request-field input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(255, 128, 13, 0.18);
}
.tr-request-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.35rem;
}
.tr-request-submit {
    width: 100%;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(255, 128, 13, 0.28);
}
.tr-request-cancel {
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.35rem;
    cursor: pointer;
}
.tr-request-cancel:hover { color: var(--ink); }
.tr-request-feedback {
    margin: 0 0 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.45;
}
.tr-request-feedback.is-ok {
    background: rgba(15, 118, 110, 0.1);
    border: 1px solid rgba(15, 118, 110, 0.35);
    color: var(--ok);
}
.tr-request-feedback.is-err {
    background: #fff7f5;
    border: 1px solid #fdba74;
    color: var(--danger);
}

@keyframes tr-access-pop {
    0% { opacity: 0; transform: translateY(6px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tr-access-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.25); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(15, 118, 110, 0); }
}

#btn-process:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tr-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}
.tr-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--ink);
}
.tr-brand-on-dark { color: #fff; }
.tr-brand-logo { height: 40px; width: auto; }
.tr-topbar-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.tr-topbar-back:hover {
    border-color: rgba(255, 128, 13, 0.45);
    background: rgba(255, 255, 255, 0.1);
}
.tr-topbar-back svg { stroke: currentColor; }

.tr-hero { margin-bottom: 0.15rem; }
.tr-hero-kicker {
    margin: 0 0 0.35rem;
    color: var(--orange);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.tr-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.85rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: var(--ink);
    font-weight: 800;
}
.tr-hero-brand { color: var(--orange); }

.tr-steps {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 1.4rem;
}
.tr-steps li {
    flex: 1;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
}
.tr-steps li span {
    display: inline-flex;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-right: 0.35rem;
    background: #efeef4;
    font-size: 0.75rem;
}
.tr-steps li.is-current {
    color: var(--ink);
    border-color: #ffd0a8;
    background: #fff7f0;
}
.tr-steps li.is-current span,
.tr-steps li.is-done span {
    background: var(--orange);
    color: #fff;
}
.tr-steps li.is-done { color: var(--ink); }

.tr-steps-wizard {
    margin-top: 0;
    margin-bottom: 1.25rem;
}
.tr-steps-wizard li {
    font-size: 0.8rem;
    padding: 0.4rem 0.55rem;
}
.tr-wizard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: flex-end;
}

.tr-card {
    background: var(--card);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 1.35rem 1.35rem 1.5rem;
    margin-bottom: 1rem;
}
.tr-kicker {
    margin: 0 0 0.2rem;
    color: var(--orange);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.tr-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.tr-lead {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Pantalla intro — flujo visual */
#screen-intro .tr-intro-card {
    background: #fff;
}
.tr-intro-card {
    padding: 0;
    overflow: hidden;
    background: #fff;
}
.tr-intro-hero {
    padding: 1.5rem 1.5rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.tr-intro-hero .tr-kicker { margin-bottom: 0.35rem; }
.tr-intro-hero h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.45rem, 4vw, 1.75rem);
    line-height: 1.15;
}
.tr-intro-lead {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--muted);
    font-weight: 600;
    max-width: 36rem;
}

.tr-intro-flow {
    list-style: none;
    margin: 0;
    padding: 1.25rem 1.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
}
.tr-intro-step {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    gap: 0.85rem;
    align-items: stretch;
    position: relative;
}
.tr-intro-step:not(.tr-intro-step--last) .tr-intro-step-rail::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 2.5rem;
    bottom: -0.35rem;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(255, 128, 13, 0.45), rgba(230, 228, 238, 0.9));
    border-radius: 2px;
}
.tr-intro-step-rail {
    position: relative;
    display: flex;
    justify-content: center;
    padding-top: 0.35rem;
}
.tr-intro-step-num {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, var(--orange), var(--orange-dark));
    box-shadow: 0 4px 14px rgba(255, 128, 13, 0.35);
    z-index: 1;
}
.tr-intro-step-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tr-intro-step-card:hover {
    border-color: rgba(255, 128, 13, 0.35);
    box-shadow: 0 8px 24px rgba(20, 22, 29, 0.06);
}
.tr-intro-step-card--highlight {
    background: #fff;
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.08);
}
.tr-intro-step-icon {
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}
.tr-intro-step-icon--load { background: rgba(255, 128, 13, 0.14); color: var(--orange-dark); }
.tr-intro-step-icon--check { background: rgba(61, 77, 115, 0.12); color: var(--ro); }
.tr-intro-step-icon--key { background: rgba(107, 114, 128, 0.12); color: #4b5563; }
.tr-intro-step-icon--route { background: rgba(15, 118, 110, 0.14); color: var(--ok); }
.tr-intro-step-text h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.tr-intro-step-text p {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
    font-weight: 500;
}
.tr-intro-step-text p strong { font-weight: 800; color: var(--ink); }
.tr-intro-pill {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 128, 13, 0.12);
    color: var(--orange-dark);
    border: 1px solid rgba(255, 128, 13, 0.22);
}
.tr-intro-pill--muted {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    border-color: rgba(107, 114, 128, 0.2);
}
.tr-intro-pill--success {
    background: rgba(15, 118, 110, 0.12);
    color: var(--ok);
    border-color: rgba(15, 118, 110, 0.28);
}

.tr-intro-footnote {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0 1.25rem 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: #fff;
    border: 1px dashed rgba(255, 128, 13, 0.45);
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 600;
}
.tr-intro-footnote svg {
    flex: none;
    margin-top: 0.1rem;
    color: var(--orange-dark);
}
.tr-intro-footnote p { margin: 0; }
.tr-intro-footnote strong { color: var(--ink); }

.tr-intro-cta {
    width: calc(100% - 2.5rem);
    margin: 0 1.25rem 1.35rem;
    padding: 0.95rem 1.25rem;
    font-size: 1.02rem;
    font-weight: 800;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(255, 128, 13, 0.35);
}

@media (max-width: 520px) {
    .tr-intro-step-card { flex-direction: column; gap: 0.5rem; }
    .tr-intro-hero { padding: 1.25rem 1.15rem 1rem; }
    .tr-intro-flow { padding-left: 1rem; padding-right: 1rem; }
    .tr-intro-footnote { margin-left: 1rem; margin-right: 1rem; }
    .tr-intro-cta { width: calc(100% - 2rem); margin-left: 1rem; margin-right: 1rem; }
}
#screen-summary:not([hidden]) {
    padding-bottom: calc(12.5rem + env(safe-area-inset-bottom, 0px));
}
.tr-summary-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    margin: 0;
    padding: 0.5rem 1.35rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(244, 243, 248, 0) 0%, rgba(244, 243, 248, 0.88) 28%, var(--bg) 100%);
    pointer-events: none;
}
.tr-summary-footer-card {
    max-width: 920px;
    margin: 0 auto;
    pointer-events: auto;
    background: #fff;
    border-radius: 20px 20px 18px 18px;
    border: 1px solid var(--line);
    box-shadow:
        0 -4px 24px rgba(20, 22, 29, 0.06),
        0 16px 48px rgba(20, 22, 29, 0.12);
    padding: 0.85rem 1.1rem calc(0.95rem + env(safe-area-inset-bottom, 0px));
}
.tr-summary-mail-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(255, 128, 13, 0.1), rgba(15, 118, 110, 0.07));
    border: 1px solid rgba(255, 128, 13, 0.22);
}
.tr-summary-mail-callout-icon {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #ff800d, #e06d00);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 128, 13, 0.28);
}
.tr-summary-mail-callout-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--orange-dark);
}
.tr-summary-mail-callout-body {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 600;
    color: var(--text);
}
.tr-summary-mail-callout-body strong {
    color: var(--ink);
    font-weight: 800;
}
.tr-summary-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 0.65rem;
    align-items: stretch;
}
.tr-summary-btn-back {
    border-radius: 14px;
    padding: 0.85rem 0.75rem;
    font-weight: 800;
}
.tr-summary-btn-confirm {
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font-weight: 800;
    font-size: 0.98rem;
    box-shadow: 0 10px 26px rgba(255, 128, 13, 0.32);
}
@media (max-width: 520px) {
    #screen-summary:not([hidden]) {
        padding-bottom: calc(16.5rem + env(safe-area-inset-bottom, 0px));
    }
    .tr-summary-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .tr-summary-footer-actions {
        grid-template-columns: 1fr;
    }
    .tr-summary-mail-callout {
        padding: 0.75rem 0.85rem;
        margin-bottom: 0.85rem;
    }
    .tr-summary-mail-callout-body {
        font-size: 0.86rem;
    }
}
#screen-summary:not([hidden]) #summary-error:not([hidden]) {
    margin-bottom: calc(11rem + env(safe-area-inset-bottom, 0px));
}

.tr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1rem;
}
.tr-span-2 { grid-column: 1 / -1; }
.tr-field { display: flex; flex-direction: column; gap: 0.35rem; }
.tr-field label,
.tr-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
}
.tr-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}
.tr-hint strong { color: var(--ink); font-weight: 700; }

select,
input[type="text"],
input[type="email"],
input[type="time"],
input[type="number"],
textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    background: #fbfbfe;
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    font-size: 1rem;
    color: var(--ink);
    outline: none;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.45; }
input[type="time"] { max-width: 240px; }
select:focus,
input:focus, textarea:focus {
    border-color: var(--orange);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 128, 13, 0.15);
}
.is-invalid {
    border-color: var(--danger) !important;
    background: #fff7f5 !important;
}
.tr-error {
    display: none;
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 600;
}
.is-invalid + .tr-error,
.tr-field.is-invalid .tr-error,
#transport-box.is-invalid .tr-error { display: block; }

.tr-map {
    height: 240px;
    border-radius: 16px;
    border: 1px solid var(--line);
    overflow: hidden;
    background:
        linear-gradient(180deg, #f7f6fb, #eceaf3);
}
.tr-map-note { margin-top: 0.45rem; }

.tr-drop-single { margin-top: 0.35rem; }
.tr-card-do { border-top: 3px solid rgba(255, 128, 13, 0.55); }
.tr-card-ro { border-top: 3px solid rgba(61, 77, 115, 0.45); }

.tr-choice-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
}
.tr-choice-btn {
    border: 1.5px solid var(--line);
    background: #fbfbfe;
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.tr-choice-btn:hover {
    border-color: #ffd0a8;
    background: #fff;
}
.tr-choice-btn.is-selected {
    border-color: var(--orange);
    background: #fff7f0;
    box-shadow: 0 0 0 3px rgba(255, 128, 13, 0.12);
    color: var(--ink);
}
.tr-recommend-note { margin-top: 0.25rem; }
.tr-transport-manual {
    margin-top: 0.5rem;
    display: none !important;
}
.tr-transport-manual.is-manual-mode {
    display: flex !important;
    flex-direction: column;
    gap: 0.35rem;
}

.tr-vars-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.tr-vars-panel.is-open,
.tr-collapse-panel.is-open {
    max-height: 4200px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 1rem;
}

.tr-collapse-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.tr-collapse-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    margin: 0.75rem 0 0;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: #fbfbfe;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.tr-collapse-trigger:hover {
    border-color: #ffd0a8;
    background: #fff;
}
.tr-collapse-trigger[aria-expanded="true"] {
    border-color: var(--orange);
    background: #fff7f0;
}
.tr-collapse-icon {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--orange);
    border-bottom: 2px solid var(--orange);
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    margin-top: -4px;
}
.tr-collapse-trigger[aria-expanded="true"] .tr-collapse-icon {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.tr-orders-bundle {
    margin-bottom: 1.75rem;
    border-top: 3px solid var(--line);
}
.tr-orders-section-do.tr-orders-bundle { border-top-color: rgba(255, 128, 13, 0.55); }
.tr-orders-section-ro.tr-orders-bundle { border-top-color: rgba(61, 77, 115, 0.45); }
.tr-orders-section-head {
    margin-bottom: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.tr-orders-section-note {
    margin: 0.65rem 0 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}
.tr-orders-bundle .tr-orders-section-body {
    padding-top: 0.25rem;
    gap: 0;
}
.tr-dispatch-block {
    padding: 1.15rem 0 1.25rem;
    border-bottom: 1px dashed var(--line);
}
.tr-dispatch-block:last-child {
    border-bottom: none;
    padding-bottom: 0.35rem;
}
.tr-dispatch-block-ro .tr-doc-title { color: var(--ro); }
.tr-orders-section-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.tr-orders-section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
    max-width: 720px;
}
.tr-orders-section-do .tr-orders-section-head h2 { color: #c25600; }
.tr-orders-section-ro .tr-orders-section-head h2 { color: var(--ro); }
.tr-orders-section-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tr-hero-with-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.25rem;
}
.tr-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tr-summary-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(20, 22, 29, 0.06);
}
.tr-summary-action .material-icons { font-size: 18px; color: var(--orange); }
.tr-summary-action:hover {
    border-color: #ffd0a8;
    background: #fff7f0;
}

.tr-drops {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.tr-drop {
    border: 1.5px dashed #d5d2e0;
    border-radius: 16px;
    padding: 1rem;
    background: #fbfbfe;
    min-height: 180px;
    transition: border-color 0.15s, background 0.15s;
}
.tr-drop.is-over,
.tr-drop:hover {
    border-color: var(--orange);
    background: #fff8f3;
}
.tr-drop.is-invalid { border-color: var(--danger); background: #fff7f5; }
.tr-drop-hit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.2rem;
    color: inherit;
}
.tr-drop-title { font-weight: 800; color: var(--ink); }
.tr-drop-sub { color: var(--muted); font-size: 0.88rem; }
.tr-files {
    list-style: none;
    margin: 0.8rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.tr-files li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.4rem 0.55rem 0.4rem 0.7rem;
    font-size: 0.88rem;
}
.tr-files li.tr-file-error {
    border-color: #fecaca;
    background: #fff5f5;
}
.tr-files li.tr-file-error span {
    color: #b91c1c;
}
.tr-files li.tr-file-pending,
.tr-files li.tr-file-reading {
    border-color: #bfdbfe;
    background: #f0f9ff;
}
.tr-files li.tr-file-pending span,
.tr-files li.tr-file-reading span {
    color: #1e40af;
}
.tr-files .tr-file-state {
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 700;
    color: #3b82f6;
    margin-left: 0.35rem;
}
.tr-files button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.15rem 0.35rem;
}
.tr-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.tr-badge-do { background: #fff1e6; color: #c25600; }
.tr-badge-ro { background: #eef2f8; color: var(--ro); }

#transport-pick {
    appearance: none;
    -webkit-appearance: none;
    margin-bottom: 0.75rem;
    padding-right: 2.6rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2314161d' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
}
.tr-transports { display: flex; flex-direction: column; gap: 0.55rem; }
.tr-transports:empty { display: none; }
.tr-transport {
    display: grid;
    grid-template-columns: 1fr 120px auto;
    gap: 0.6rem;
    align-items: center;
}
.tr-transport-copy { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.tr-transport-name { font-weight: 700; color: var(--ink); }
.tr-transport-specs { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.tr-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: 1.2rem;
}
.tr-linkish {
    margin-top: 0.7rem;
    border: 0;
    background: transparent;
    color: var(--orange-dark);
    font-weight: 800;
    padding: 0;
}

.tr-submitbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    align-items: center;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.7rem;
    box-shadow: var(--shadow);
}
.tr-btn {
    border: 0;
    border-radius: 999px;
    padding: 0.85rem 1.3rem;
    font-weight: 800;
    font-size: 1rem;
}
.tr-btn-primary { background: var(--orange); color: #fff; }
.tr-btn-primary:hover { background: var(--orange-dark); }
.tr-btn-primary:disabled { opacity: 0.65; cursor: wait; }
.tr-btn-ghost {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--line);
}
.tr-btn-ghost:hover { border-color: #cfcdda; }
.tr-form-error {
    margin: 0;
    color: var(--danger);
    font-weight: 700;
    font-size: 0.9rem;
}

.tr-recap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.7rem;
    margin-bottom: 1.15rem;
}
.tr-recap-item {
    background: #f7f6fb;
    border-radius: 14px;
    padding: 0.8rem 0.95rem;
    min-width: 0;
}
.tr-recap-wide { grid-column: 1 / -1; }
.tr-recap-item span {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.tr-recap-item strong {
    display: block;
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.tr-recap-title {
    margin: 0.15rem 0 0.55rem;
    color: var(--orange);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.tr-op-summary-card h2 {
    margin-bottom: 0.75rem;
}
.tr-op-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}
.tr-op-summary-empty {
    margin: 0;
    color: var(--muted);
}
@media (max-width: 900px) {
    .tr-op-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 520px) {
    .tr-op-summary-grid {
        grid-template-columns: 1fr;
    }
}
.tr-fleet {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 0.85rem 1rem;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.55rem;
    background: #fff;
}
.tr-fleet-type {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
}
.tr-fleet-qty {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}
.tr-fleet-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.tr-fleet-specs li {
    min-width: 7.2rem;
    background: #fff7f0;
    border-radius: 12px;
    padding: 0.45rem 0.65rem;
    color: var(--ink);
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.2;
}
.tr-fleet-specs small {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.tr-fleet-recommend-lead {
    margin: 0 0 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: rgba(15, 118, 110, 0.07);
    border: 1px solid rgba(15, 118, 110, 0.2);
    font-size: 0.86rem;
    line-height: 1.45;
    font-weight: 600;
    color: var(--text);
}
.tr-fleet-recommend-lead strong {
    color: var(--ink);
    font-weight: 800;
}
.tr-fleet-fallback {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}
.tr-prompt-recap { margin: 1rem 0 0.2rem; }
.tr-fleet-recap { margin-top: 0.25rem; }
.tr-fleet-recap .tr-collapse-title small {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}
.tr-fleet-recap .tr-fleet-list {
    padding-top: 0.75rem;
    max-height: min(28rem, 55vh);
    overflow-y: auto;
    padding-right: 0.15rem;
}
.tr-recap-map {
    margin-top: 0.7rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    overflow: hidden;
    background: #eceaf3;
}
.tr-recap-map iframe {
    display: block;
    width: 100%;
    height: 240px;
    border: 0;
}
.tr-recap-map-link {
    display: block;
    padding: 0.5rem 0.8rem;
    background: #fff;
    border-top: 1px solid var(--line);
    color: var(--orange);
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}
.tr-recap-map-link:hover { text-decoration: underline; }
.tr-vars-table-wrap {
    overflow-x: auto;
    margin-top: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.tr-vars-recap { margin-top: 0.5rem; }
.tr-vars-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.tr-vars-table th,
.tr-vars-table td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    text-align: left;
}
.tr-vars-table thead th {
    background: #f7f6fb;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 800;
}
.tr-vars-table tbody tr:last-child td { border-bottom: 0; }
.tr-vars-name { min-width: 11rem; }
.tr-vars-key {
    display: block;
    font-weight: 800;
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.tr-vars-label {
    display: block;
    color: var(--ink);
    font-weight: 600;
    margin-top: 0.12rem;
}
.tr-vars-value { min-width: 7.5rem; }
.tr-vars-value .tr-vars-input {
    width: 100%;
    max-width: 9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
    font: inherit;
    font-weight: 700;
}
.tr-vars-value select.tr-vars-input { max-width: 7rem; }
.tr-vars-value.is-invalid .tr-vars-input { border-color: var(--bad); }
.tr-vars-value.is-invalid .tr-error { display: block; }
.tr-vars-format {
    color: var(--muted);
    font-size: 0.82rem;
    min-width: 8rem;
}
.tr-warn {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 14px;
    padding: 0.8rem 0.95rem;
    margin-bottom: 1rem;
}
.tr-warn ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }

.tr-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tr-dispatch-card {
    margin-bottom: 1.35rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--do);
    box-shadow: 0 10px 28px rgba(20, 22, 29, 0.05);
}
.tr-dispatch-card:last-child { margin-bottom: 0; }
.tr-dispatch-card-ro {
    border-left-color: var(--ro);
}
.tr-doc-kicker {
    margin: 0 0 0.85rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
}
.tr-dispatch-head {
    margin-bottom: 1rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid var(--line);
}
.tr-doc-title { margin: 0; color: var(--ink); font-size: 1.35rem; letter-spacing: -0.02em; }
.tr-doc-meta { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.96rem; line-height: 1.45; }
.tr-dispatch-body { margin-top: 0.15rem; }
.tr-lines-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
}
.tr-lines { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 760px; }
.tr-lines th {
    text-align: left;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--ink);
    padding: 0.7rem 0.75rem;
    background: #f7f6fb;
    border-bottom: 1px solid var(--line);
    vertical-align: bottom;
}
.tr-lines th small {
    display: inline;
    margin-left: 0.2rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.tr-lines th.num { white-space: nowrap; }
.tr-lines th.num,
.tr-lines td.num { text-align: right; }
.tr-lines td {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid #f0eef5;
    vertical-align: middle;
    color: var(--ink);
}
.tr-lines tbody tr:last-child td { border-bottom: 0; }
.tr-lines td.sku { font-weight: 800; white-space: nowrap; }
.tr-lines td.desc { min-width: 240px; width: 28%; }
.tr-lines input,
.tr-lines textarea {
    width: 100%;
    min-width: 0;
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 8px;
    padding: 0.2rem 0.15rem;
    font-size: 0.92rem;
    color: var(--ink);
    resize: none;
    line-height: 1.35;
    field-sizing: content;
}
.tr-lines td.num input { text-align: right; font-variant-numeric: tabular-nums; }
.tr-lines input:focus,
.tr-lines textarea:focus {
    background: #fff;
    border: 1.5px solid var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 128, 13, 0.15);
    padding: 0.25rem 0.35rem;
}
.tr-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}
.tr-col-head h3 { margin: 0; font-size: 1.05rem; color: var(--ink); }
.tr-count { color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.tr-order {
    border: 1px solid var(--line);
    border-left: 4px solid var(--do);
    border-radius: 14px;
    padding: 0.8rem;
    margin-bottom: 0.65rem;
    background: #fff;
}
.tr-order-ro { border-left-color: var(--ro); }
.tr-order-top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.55rem;
    color: var(--muted);
    font-size: 0.8rem;
}
.tr-order-top button {
    border: 0;
    background: transparent;
    color: var(--danger);
    font-weight: 700;
}
.tr-order .tr-grid { gap: 0.55rem; }
.tr-order textarea { min-height: 84px; }
.tr-empty {
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: 1rem;
    color: var(--muted);
    background: #fbfbfe;
}
.tr-add {
    width: 100%;
    margin-top: 0.2rem;
    border-radius: 12px;
    border: 1px dashed #d5d2e0;
    background: #fff;
    padding: 0.7rem;
    font-weight: 800;
    color: var(--ink);
}
.tr-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tr-done {
    text-align: center;
    padding: 2.5rem 1.4rem 2rem;
}
.tr-done-mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    background: #ecfdf5;
    color: var(--ok);
    font-size: 2rem;
    font-weight: 800;
}
.tr-done h2 { font-size: 1.8rem; margin-bottom: 0.4rem; }
.tr-done p { color: var(--muted); font-size: 1.05rem; }
.tr-done strong { color: var(--ink); }

.pac-container { z-index: 4000; font-family: "Figtree", sans-serif; }

.tr-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(20, 22, 29, 0.58);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
body.tr-trial-overlay-open {
    overflow: hidden;
}
.tr-modal[hidden] { display: none !important; }

/* Overlays de flujo (lectura de archivos / agente) */
.tr-modal-flow {
    z-index: 5100;
    padding: 1.25rem;
    background: rgba(15, 13, 24, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.tr-modal-flow.is-visible {
    opacity: 1;
}
.tr-modal-flow.is-visible .tr-flow-panel {
    animation: tr-request-in 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}
.tr-flow-panel {
    width: min(440px, 100%);
    border-radius: 26px;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 28px 80px rgba(20, 22, 29, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}
.tr-flow-hero {
    position: relative;
    padding: 1.65rem 1.5rem 1.25rem;
    text-align: center;
    color: #fff;
}
.tr-flow-hero--files {
    background:
        radial-gradient(110% 70% at 100% 0%, rgba(67, 24, 255, 0.42), transparent 55%),
        radial-gradient(90% 60% at 0% 100%, rgba(255, 128, 13, 0.35), transparent 50%),
        linear-gradient(145deg, #14161d 0%, #252040 50%, #1a1828 100%);
}
.tr-flow-hero--agent {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(255, 128, 13, 0.48), transparent 55%),
        radial-gradient(80% 60% at 0% 100%, rgba(67, 24, 255, 0.38), transparent 50%),
        linear-gradient(145deg, #14161d 0%, #2a2640 48%, #1e1b2e 100%);
}
.tr-flow-orbit {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
}
.tr-flow-orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(255, 128, 13, 0.85);
    border-right-color: rgba(255, 255, 255, 0.15);
    animation: tr-spin 1.1s linear infinite;
}
.tr-flow-orbit-ring--slow {
    inset: 4px;
    border-top-color: rgba(255, 255, 255, 0.35);
    animation-duration: 1.8s;
    animation-direction: reverse;
}
.tr-flow-orbit-ring--fast {
    inset: -4px;
    opacity: 0.55;
    animation-duration: 0.75s;
}
.tr-flow-orbit-core {
    position: absolute;
    inset: 14px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #ff800d, #e06d00);
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 128, 13, 0.35);
    animation: tr-flow-pulse 2.2s ease-in-out infinite;
}
@keyframes tr-flow-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 24px rgba(255, 128, 13, 0.35); }
    50% { transform: scale(1.04); box-shadow: 0 14px 32px rgba(255, 128, 13, 0.45); }
}
.tr-flow-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}
.tr-flow-hero h2 {
    margin: 0;
    font-size: 1.38rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.22;
}
.tr-flow-status {
    margin: 0.65rem auto 0;
    max-width: 20rem;
    min-height: 1.35em;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    transition: opacity 0.25s ease;
}
.tr-flow-status.is-fading { opacity: 0.35; }
.tr-flow-body {
    padding: 1.25rem 1.45rem 1.45rem;
    background: linear-gradient(180deg, #fafbff 0%, #fff 45%);
}
.tr-flow-steps {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.tr-flow-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: #9ca3af;
    line-height: 1.35;
    transition: color 0.25s ease, transform 0.25s ease;
}
.tr-flow-steps li span {
    flex-shrink: 0;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    background: #eceaf3;
    color: #6b7280;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.tr-flow-steps li.is-active {
    color: var(--ink);
    transform: translateX(2px);
}
.tr-flow-steps li.is-active span {
    background: linear-gradient(145deg, #ff800d, #e06d00);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 128, 13, 0.35);
}
.tr-flow-steps li.is-done {
    color: #6b7280;
}
.tr-flow-steps li.is-done span {
    background: #e8f5ec;
    color: #15803d;
}
.tr-flow-progress {
    height: 4px;
    border-radius: 999px;
    background: #eceaf3;
    overflow: hidden;
    margin-bottom: 0.85rem;
}
.tr-flow-progress-bar {
    display: block;
    height: 100%;
    width: 38%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff800d, #ffb347, #ff800d);
    background-size: 200% 100%;
    animation: tr-flow-progress 1.6s ease-in-out infinite;
}
.tr-flow-progress-bar--long {
    animation-duration: 2.4s;
}
@keyframes tr-flow-progress {
    0% { transform: translateX(-120%); background-position: 0% 50%; }
    100% { transform: translateX(320%); background-position: 100% 50%; }
}
.tr-flow-hint {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--muted);
}
.tr-flow-hint strong {
    color: var(--ink);
    font-weight: 800;
}

.tr-modal-card .tr-hint {
    margin: 0.75rem 0 0;
    line-height: 1.45;
}
.tr-modal-card .tr-hint strong {
    color: var(--ink);
    font-weight: 800;
}
.tr-modal-card {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 1.35rem 1.4rem 1.5rem;
}
.tr-modal-spinner {
    width: 42px;
    height: 42px;
    margin-top: 1rem;
    border-radius: 50%;
    border: 3px solid #efeef4;
    border-top-color: var(--orange);
    animation: tr-spin 0.8s linear infinite;
}
@keyframes tr-spin { to { transform: rotate(360deg); } }
.tr-summary-link {
    color: var(--orange-dark);
    font-weight: 800;
    text-decoration: none;
}
.tr-summary-link:hover { text-decoration: underline; }

.tr-wrap-wide { max-width: min(1280px, 100%); }
.tr-lg-geo-proposals-wrap {
    padding: 0;
    overflow: hidden;
}

.tr-lg-geo-proposals-wrap .tr-lg-geo-proposals-fragment {
    margin: 0;
}

.tr-lg-geo-proposals-fragment {
    margin: 0 0 1.5rem;
}

.tr-lg-geo-proposals-fragment #main-app-container {
    background: transparent;
}

.tr-lg-geo-proposals-fragment body,
.tr-lg-geo-proposals-fragment {
    font-family: 'Figtree', 'DM Sans', 'Inter', sans-serif;
}

.tr-geo-embed-wrap {
    margin: 0 0 1.25rem;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #f4f7fe;
}
.tr-geo-embed {
    display: block;
    width: 100%;
    min-height: 920px;
    border: 0;
    background: #f4f7fe;
}
.tr-geo-embed-fallback {
    margin: 0;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: var(--muted, #64748b);
    background: #fff7ed;
    border-top: 1px solid var(--line);
}
.tr-geo-embed-fallback a {
    color: var(--accent, #4318ff);
    font-weight: 600;
}

.tr-order-cards {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.85rem;
}
.tr-order-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.85rem 0.95rem 1rem;
    background: #fff;
    box-shadow: 0 10px 28px rgba(20, 22, 29, 0.05);
}
.tr-order-card.is-invalid { border-color: #fdba74; background: #fffaf5; }
.tr-order-card.is-valid { border-color: #6ee7b7; }
.tr-order-card.is-parsing { opacity: 0.85; }
.tr-order-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.tr-order-card-file {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--muted);
}
.tr-order-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 0.75rem;
}
.tr-order-card-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.65rem;
}
.tr-order-card-totals label,
.tr-order-confirm {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
}
.tr-order-confirm {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.75rem;
}
.tr-card-issues {
    margin: 0 0 0.5rem;
    padding-left: 1.1rem;
    color: #c2410c;
    font-size: 0.78rem;
    font-weight: 700;
}
.tr-field-invalid input,
.tr-field-invalid textarea {
    border-color: #fb923c !important;
    background: #fff7ed;
}
.tr-prov {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.3;
}

@media (max-width: 840px) {
    .tr-topbar-back { margin-left: 0; width: 100%; justify-content: center; }
    .tr-choice-row { grid-template-columns: 1fr; }
    .tr-grid, .tr-drops, .tr-split, .tr-recap-grid, .tr-fleet { grid-template-columns: 1fr; }
    .tr-span-2 { grid-column: auto; }
    .tr-steps li { font-size: 0.78rem; padding-inline: 0.4rem; }
    .tr-submitbar, .tr-actions { flex-direction: column; align-items: stretch; }
    .tr-btn { width: 100%; }
    .tr-transport { grid-template-columns: 1fr 96px auto; }
}
