:root {
    --brand-primary: #1b2a5b;
    --brand-secondary: #e6842a;
    --brand-surface: rgba(255, 255, 255, 0.72);
    --brand-surface-strong: rgba(255, 255, 255, 0.88);
    --brand-border: rgba(27, 42, 91, 0.14);
    --brand-muted: #5f6d89;
    --brand-success: #1f8f6a;
    --brand-warning: #d08a1f;
    --brand-danger: #d94f4f;
    --brand-bg-start: #eef3f8;
    --brand-bg-end: #dbe6f2;
    --ink-900: #1a2442;
    --ink-700: #33415f;
    --shadow-soft: 0 24px 60px rgba(19, 34, 69, 0.14);
    --shadow-strong: 0 26px 90px rgba(14, 27, 54, 0.18);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --font-display: 'Sora', sans-serif;
    --font-body: 'Manrope', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--ink-900);
    background:
        radial-gradient(circle at top left, rgba(230, 132, 42, 0.18), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(27, 42, 91, 0.18), transparent 26%),
        linear-gradient(140deg, var(--brand-bg-start) 0%, var(--brand-bg-end) 100%);
    overflow-x: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.abc-bg-anim {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.abc-bg-anim::before,
.abc-bg-anim::after {
    content: '';
    position: absolute;
    inset: 0;
}

.abc-bg-anim::before {
    background:
        radial-gradient(circle, rgba(27, 42, 91, 0.12) 0 1.4px, transparent 2px) 0 0 / 220px 220px,
        radial-gradient(circle, rgba(230, 132, 42, 0.12) 0 1px, transparent 2px) 75px 50px / 240px 240px;
    opacity: 0.65;
    animation: particlesDrift 44s linear infinite;
}

.abc-bg-anim::after {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.22) 100%);
    opacity: 0.8;
}

.circle,
.mesh,
.truck {
    position: absolute;
    opacity: 0.18;
}

.circle {
    border-radius: 26px;
    filter: blur(0.3px);
    animation: floatSoft 20s ease-in-out infinite alternate;
}

.circle.orange {
    width: 120px;
    height: 120px;
    background: rgba(230, 132, 42, 0.24);
    left: -30px;
    top: 62vh;
}

.circle.green {
    width: 86px;
    height: 86px;
    background: rgba(27, 42, 91, 0.22);
    right: 10vw;
    top: 14vh;
    animation-delay: 3s;
}

.circle.yellow {
    width: 70px;
    height: 70px;
    background: rgba(27, 42, 91, 0.16);
    left: 18vw;
    bottom: 12vh;
    animation-delay: 6s;
}

.mesh {
    border-radius: 36px;
    transform: rotate(28deg);
    filter: blur(2px);
}

.mesh-a {
    width: 220px;
    height: 220px;
    right: -60px;
    top: 18vh;
    background: rgba(255, 255, 255, 0.26);
}

.mesh-b {
    width: 180px;
    height: 180px;
    left: 10vw;
    bottom: -40px;
    background: rgba(230, 132, 42, 0.12);
}

.truck {
    font-size: clamp(8rem, 18vw, 12rem);
    color: rgba(230, 132, 42, 0.16);
    right: 6vw;
    bottom: 8vh;
    transform: rotate(-18deg);
    animation: rocketDrift 24s ease-in-out infinite alternate;
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 52px;
}

.hero-panel {
    background: linear-gradient(160deg, var(--brand-surface-strong), rgba(255, 255, 255, 0.5));
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(26px);
    padding: clamp(22px, 4vw, 42px);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.brand-lockup {
    display: grid;
    gap: 14px;
    align-content: start;
}

.eyebrow,
.tagline,
.card-kicker,
.fact-label,
.status-label {
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(27, 42, 91, 0.1);
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--brand-primary);
}

.logo {
    width: clamp(148px, 20vw, 230px);
    max-width: 100%;
}

.tagline {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-secondary);
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--ink-900);
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1.03;
    max-width: 10ch;
}

.subtitle,
.side-copy,
.notice-header p,
.empty-state p {
    margin: 0;
    color: var(--brand-muted);
    line-height: 1.65;
    font-size: 1rem;
}

.search-card,
.result-card,
.side-card,
.notice-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62));
    border: 1px solid var(--brand-border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(22px);
}

.search-card {
    border-radius: var(--radius-lg);
    padding: 20px;
    display: grid;
    gap: 16px;
}

.tracking-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-input,
.search-button,
.action-btn,
.image-tile {
    font: inherit;
}

.search-input {
    width: 100%;
    min-width: 0;
    border-radius: 18px;
    border: 1px solid rgba(27, 42, 91, 0.18);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink-900);
    padding: 15px 18px;
    font-size: 1.08rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-input:focus {
    border-color: rgba(230, 132, 42, 0.55);
    box-shadow: 0 0 0 4px rgba(230, 132, 42, 0.12);
    transform: translateY(-1px);
}

.search-button,
.action-btn {
    border: none;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.search-button {
    padding: 0 22px;
    min-height: 56px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(120deg, var(--brand-secondary) 0%, var(--brand-primary) 100%);
    box-shadow: 0 18px 34px rgba(27, 42, 91, 0.18);
}

.search-button:hover,
.action-btn:hover,
.image-tile:hover {
    transform: translateY(-2px);
}

.status-rail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.status-pill,
.micro-pill {
    border-radius: 18px;
    border: 1px solid rgba(27, 42, 91, 0.08);
    background: rgba(255, 255, 255, 0.74);
}

.status-pill {
    padding: 12px 14px;
    display: grid;
    gap: 4px;
}

.status-pill strong {
    font-size: 0.98rem;
    color: var(--ink-900);
}

.status-pill.loading strong {
    color: var(--brand-primary);
}

.status-label,
.card-kicker,
.fact-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--brand-muted);
}

.result-shell {
    margin-top: 22px;
}

.results-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
    gap: 18px;
    align-items: start;
}

.results-grid.single-column {
    grid-template-columns: 1fr;
}

.results-column,
.results-side,
.delivery-list {
    display: grid;
    gap: 18px;
}

.result-card {
    border-radius: 28px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
}

.card-media {
    padding: 18px;
    background: linear-gradient(180deg, rgba(27, 42, 91, 0.08), rgba(255, 255, 255, 0.28));
    border-right: 1px solid rgba(27, 42, 91, 0.08);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.image-tile {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(27, 42, 91, 0.08);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-empty {
    min-height: 184px;
    border-radius: 20px;
    border: 1px dashed rgba(27, 42, 91, 0.18);
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 16px;
    color: var(--brand-muted);
    text-align: center;
}

.image-empty i {
    font-size: 2rem;
    color: var(--brand-secondary);
}

.card-body,
.side-card,
.notice-card {
    padding: 22px;
}

.card-body {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.card-topline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.card-topline.compact {
    align-items: center;
}

.card-topline h2 {
    font-family: var(--font-display);
    font-size: 1.45rem;
}

.card-topline h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.status-badge {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
}

.status-badge.success {
    background: linear-gradient(120deg, var(--brand-success), #197d5d);
}

.status-badge.warning {
    background: linear-gradient(120deg, var(--brand-warning), #b46e11);
}

.status-badge.danger {
    background: linear-gradient(120deg, var(--brand-danger), #b93d3d);
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.side-facts {
    grid-template-columns: 1fr;
}

.fact-item {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 14px 15px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(27, 42, 91, 0.08);
}

.fact-item.accent {
    background: linear-gradient(135deg, rgba(230, 132, 42, 0.14), rgba(27, 42, 91, 0.08));
}

.fact-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink-700);
    overflow-wrap: anywhere;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action-row.centered {
    justify-content: center;
}

.action-btn {
    min-height: 46px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink-900);
    border: 1px solid rgba(27, 42, 91, 0.1);
    box-shadow: 0 12px 28px rgba(27, 42, 91, 0.08);
}

.action-btn.primary {
    color: #fff;
    background: linear-gradient(120deg, var(--brand-secondary), var(--brand-primary));
    border-color: transparent;
}

.micro-pill {
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--brand-primary);
}

.notice-card,
.side-card {
    border-radius: 28px;
}

.local-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.7));
}

.notice-header {
    display: flex;
    gap: 14px;
    align-items: start;
}

.notice-header i,
.empty-icon i {
    font-size: 1.4rem;
    color: var(--brand-secondary);
}

.notice-error .notice-header i {
    color: var(--brand-danger);
}

.notice-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.notice-line {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(27, 42, 91, 0.08);
}

.payload-details {
    margin-top: 16px;
}

.payload-details summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--brand-primary);
}

.payload-details pre {
    margin: 14px 0 0;
    padding: 16px;
    max-height: 300px;
    overflow: auto;
    border-radius: 18px;
    background: rgba(15, 24, 50, 0.92);
    color: #e9efff;
    font-size: 0.76rem;
    line-height: 1.6;
}

.empty-state,
.loading-state {
    text-align: center;
}

.site-credit {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 18px 8px 6px;
    color: var(--brand-muted);
    font-size: 0.92rem;
}

.site-credit strong,
.site-credit a {
    color: var(--brand-primary);
    font-weight: 800;
    text-decoration: none;
}

.site-credit a:hover {
    color: var(--brand-secondary);
}

.empty-state {
    padding-block: 38px;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin: 0 auto 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(230, 132, 42, 0.14), rgba(27, 42, 91, 0.08));
}

.spinner-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    min-height: 90px;
    font-weight: 700;
    color: var(--ink-700);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(11, 17, 36, 0.74);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 760px);
    max-height: 86vh;
    object-fit: contain;
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.close {
    position: absolute;
    top: 18px;
    right: 28px;
    color: #fff;
    font-size: 46px;
    cursor: pointer;
}

@keyframes particlesDrift {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-80px, -60px, 0);
    }
}

@keyframes floatSoft {
    0% {
        transform: translateY(0) rotate(14deg) scale(1);
    }
    100% {
        transform: translateY(-52px) rotate(24deg) scale(1.08);
    }
}

@keyframes rocketDrift {
    0% {
        transform: translate3d(0, 0, 0) rotate(-18deg);
    }
    100% {
        transform: translate3d(-120px, -18px, 0) rotate(-8deg);
    }
}

@media (max-width: 1080px) {
    .hero-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }

    .results-side {
        order: -1;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 20px, 100%);
        padding-top: 14px;
    }

    .hero-panel,
    .search-card,
    .card-body,
    .side-card,
    .notice-card,
    .card-media {
        padding: 16px;
    }

    h1 {
        max-width: none;
        font-size: 2rem;
    }

    .tracking-form,
    .facts-grid {
        grid-template-columns: 1fr;
    }

    .search-button {
        width: 100%;
    }

    .result-card {
        grid-template-columns: 1fr;
    }

    .card-media {
        border-right: none;
        border-bottom: 1px solid rgba(27, 42, 91, 0.08);
    }

    .image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-topline {
        flex-direction: column;
    }

    .status-badge {
        align-self: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .abc-bg-anim::before,
    .circle,
    .truck,
    .search-button,
    .action-btn,
    .image-tile {
        animation: none !important;
        transition: none !important;
    }
}

/* Modal: X en magenta al hover */
.close:hover, .close:focus{ color: var(--enic-pink); }