.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 2.6em;
    color: #4fc3ff;
    margin-bottom: 8px;
}

.header .subtitle {
    font-size: 1.1em;
    color: #ccc;
}

.lookup-card,
.result-card {
    max-width: 520px;
    margin: 0 auto 24px;
    padding: 28px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.lookup-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lookup-card label {
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9fb3c0;
    margin-top: 8px;
}

.lookup-card input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 1em;
}

.lookup-card input:focus {
    outline: none;
    border-color: #4fc3ff;
}

.lookup-card .hint {
    font-size: 0.85em;
    color: #8aa0ad;
}

.lookup-card button {
    margin-top: 12px;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: #00ffcc;
    color: #0f2027;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
}

.lookup-card button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.error {
    color: #ff8a8a;
    font-size: 0.92em;
}

.result-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.result-head h2 {
    font-size: 1.4em;
    color: #fff;
}

.ref {
    font-family: var(--font-code), 'Courier New', monospace;
    color: #9fb3c0;
    letter-spacing: 1px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 6px 0 22px;
}

.step {
    text-align: center;
    font-size: 0.78em;
    color: #7f939f;
}

.step .bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

.step.done {
    color: #e8edf2;
}

.step.done .bar {
    background: #00ffcc;
}

.step.current .bar {
    background: linear-gradient(90deg, #00ffcc, #4fc3ff);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

/* the finished steps fill in one after another when the order shows up */
@media (prefers-reduced-motion: no-preference) {
    .step.done .bar {
        transform-origin: left center;
        animation: step-fill 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .step:nth-child(2) .bar { animation-delay: 0.12s; }
    .step:nth-child(3) .bar { animation-delay: 0.24s; }
    .step:nth-child(4) .bar { animation-delay: 0.36s; }
}

@keyframes step-fill {
    from {
        transform: scaleX(0);
    }
}

.stopped {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 138, 138, 0.08);
    border-left: 3px solid #ff8a8a;
    margin-bottom: 18px;
}

.facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    font-size: 0.95em;
}

.facts dt {
    color: #8aa0ad;
}

.facts dd {
    color: #fff;
    overflow-wrap: anywhere;
}

.facts a {
    color: #4fc3ff;
}

.items {
    list-style: none;
}

.items li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.help {
    text-align: center;
    color: #8aa0ad;
    font-size: 0.9em;
}

.help a {
    color: #4fc3ff;
}

@media (max-width: 640px) {
    .header h1 { font-size: 2em; }
    .lookup-card, .result-card { padding: 20px; }
    /* still one line of four: it reads as progress; the labels get smaller
       and may wrap */
    .steps { gap: 4px; }
    .step { font-size: 0.7em; text-wrap: balance; }
}

/* phones: the title started at the top of the screen, under the menu button
   (fixed, top right, 20-64px down); it now starts just below it */
@media (max-width: 600px) {
    .header h1 {
        padding-top: 20px;
    }
}

/* the result rises in when it shows (OrderLookup.tsx adds .is-shown, again on
   every lookup), and the step the order is at breathes a soft glow */
.step.current .bar {
    position: relative;
}

.step.current .bar::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 16px rgba(0, 255, 204, 0.85);
    opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .result-card.is-shown {
        animation: result-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .step.current .bar::after {
        animation: step-glow 2.4s ease-in-out 1s infinite;
    }
}

@keyframes result-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

@keyframes step-glow {
    50% {
        opacity: 1;
    }
}
