@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=Cinzel:wght@400;600;700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
    --tr-primary:      #062037;
    --tr-primary-dark: #041425;
    --tr-accent:       #C5A054;
    --tr-accent-light: #DCC07A;
    --tr-accent-pale:  rgba(197, 160, 84, .10);
    --tr-cream:        #FAF7F2;
    --tr-white:        #FFFFFF;
    --tr-text:         #062037;
    --tr-text-muted:   #6b7d8e;
    --tr-border:       rgba(6, 32, 55, .10);
    --tr-radius:       14px;
    --tr-transition:   .35s cubic-bezier(.4, 0, .2, 1);
}

.tr-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 24px 80px;
    font-family: 'DM Sans', sans-serif;
    color: var(--tr-text);
    background-color: var(--tr-cream);
}

/* ── Header ── */
.tr-header { 
    text-align: center; 
    margin-bottom: 48px; 
}

.tr-eyebrow {
    font-family: 'Cinzel', serif;
    font-size: .72rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--tr-accent);
    margin-bottom: 12px;
}

.tr-title { 
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 2.8rem); 
    font-weight: 700; 
    color: var(--tr-primary);
    margin: 0;
} 

.tr-title em { 
    font-family: 'Cormorant Garamond', serif; 
    font-style: italic; 
    color: var(--tr-accent); 
    font-weight: 600;
}

.tr-subtitle { 
    color: var(--tr-text-muted); 
    margin-top: 12px; 
    font-size: .95rem;
    line-height: 1.6;
}

/* ── Search Card ── */
.tr-search-card {
    background: var(--tr-white);
    padding: 40px;
    border-radius: var(--tr-radius);
    box-shadow: 0 4px 20px rgba(6, 32, 55, 0.06);
    border: 1px solid var(--tr-border);
}

.tr-form { 
    display: grid; 
    grid-template-columns: 1fr 1fr auto; 
    gap: 20px; 
    align-items: flex-end; 
}

.tr-input-group label { 
    display: block; 
    font-size: .72rem; 
    text-transform: uppercase; 
    letter-spacing: .12em; 
    margin-bottom: 8px; 
    color: var(--tr-text-muted); 
    font-weight: 600;
}

.tr-input-group input { 
    width: 100%; 
    padding: 14px 16px; 
    border: 1px solid var(--tr-border); 
    border-radius: 8px; 
    transition: all var(--tr-transition); 
    font-size: .92rem;
    background: var(--tr-cream);
    color: var(--tr-text);
    font-family: inherit;
}

.tr-input-group input:focus { 
    border-color: var(--tr-primary); 
    outline: none; 
    box-shadow: 0 0 0 3px rgba(6, 32, 55, 0.08); 
    background: var(--tr-white);
}

.tr-btn { 
    background: var(--tr-primary); 
    color: var(--tr-white); 
    padding: 14px 32px; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: all var(--tr-transition);
    display: inline-flex; 
    align-items: center; 
    gap: 10px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: .82rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    height: 48px;
}

.tr-btn:hover { 
    background: var(--tr-primary-dark);
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(6, 32, 55, 0.2);
}

.tr-error-msg {
    display: none; 
    margin-top: 12px; 
    color: #dc2626; 
    font-size: .82rem;
    font-weight: 500;
}

/* ── Result Section ── */
.tr-result { 
    margin-top: 48px; 
    animation: trFadeIn .6s ease-out; 
}

.tr-status-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 48px; 
    border-bottom: 1px solid var(--tr-border); 
    padding-bottom: 24px; 
    flex-wrap: wrap;
    gap: 16px;
}

.tr-summary {
    display: flex;
    flex-direction: column; 
    gap: 8px;           
    align-items: flex-start; 
}

.tr-summary p {
    margin: 0;
    color: var(--tr-text-muted);
    font-size: .92rem;
}

.tr-summary strong { color: var(--tr-text); }

.tr-badge { 
    background: var(--tr-accent-pale); 
    color: var(--tr-primary); 
    padding: 6px 16px; 
    border-radius: 50px; 
    font-size: .72rem; 
    font-weight: 700; 
    letter-spacing: .06em;
    text-transform: uppercase;
    border: 1px solid rgba(197, 160, 84, .2);
}

.tr-order-no { 
    font-size: .9rem; 
    font-weight: 600; 
    color: var(--tr-primary);
}

/* ── Stepper ── */
.tr-stepper { 
    display: flex; 
    align-items: flex-start; /* Changed to flex-start for better line alignment */
    justify-content: space-between; 
    margin: 0 0 60px; 
    position: relative;
}

.tr-step { 
    text-align: center; 
    position: relative; 
    z-index: 2; 
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tr-step-circle { 
    width: 48px; 
    height: 48px; 
    background: var(--tr-white); 
    border: 2px solid var(--tr-border); 
    border-radius: 50%; 
    margin-bottom: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--tr-text-muted); 
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.tr-step.active .tr-step-circle { 
    border-color: var(--tr-primary); 
    color: var(--tr-primary); 
    box-shadow: 0 0 0 4px rgba(6, 32, 55, 0.08); 
}

.tr-step.completed .tr-step-circle { 
    background: var(--tr-primary); 
    border-color: var(--tr-primary); 
    color: var(--tr-white); 
}

.tr-step-label { 
    font-size: .72rem; 
    color: var(--tr-text-muted); 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: .06em; 
}

.tr-step.active .tr-step-label, 
.tr-step.completed .tr-step-label { 
    color: var(--tr-primary); 
}

/* Lines connecting steps */
.tr-step-line { 
    flex: 1; 
    height: 2px; 
    background: var(--tr-border); 
    margin-top: 24px; /* Half of circle height */
    z-index: 1;
}

.tr-step-line.active { 
    background: var(--tr-primary); 
}

/* ── Timeline ── */
.tr-timeline { 
    background: var(--tr-white); 
    padding: 36px; 
    border-radius: var(--tr-radius); 
    border: 1px solid var(--tr-border);
    box-shadow: 0 4px 16px rgba(6, 32, 55, 0.04);
}

.tr-timeline-title { 
    font-size: 1.2rem; 
    margin: 0 0 28px; 
    color: var(--tr-primary); 
    font-family: 'Cinzel', serif; 
    letter-spacing: .04em;
}

.tr-timeline-item { 
    display: flex; 
    gap: 24px; 
    margin-bottom: 24px; 
    padding-left: 24px; 
    border-left: 2px solid var(--tr-border); 
    position: relative; 
}

.tr-timeline-item:last-child { margin-bottom: 0; }

.tr-timeline-item::before { 
    content: ''; 
    position: absolute; 
    left: -7px; 
    top: 4px; 
    width: 12px; 
    height: 12px; 
    background: var(--tr-accent); 
    border-radius: 50%; 
    border: 2px solid var(--tr-white);
    box-shadow: 0 0 0 2px rgba(197, 160, 84, 0.2);
}

.tr-time { 
    min-width: 140px; 
    font-size: .82rem; 
    color: var(--tr-text-muted); 
    font-weight: 500; 
    padding-top: 2px;
}

.tr-desc strong { 
    display: block; 
    font-size: .95rem; 
    margin-bottom: 4px; 
    color: var(--tr-text); 
}

.tr-desc p { 
    font-size: .86rem; 
    color: var(--tr-text-muted); 
    line-height: 1.5; 
    margin: 0;
}

/* ── Animation ── */
@keyframes trFadeIn { 
    from { opacity: 0; transform: translateY(16px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
    .tr-form {
        grid-template-columns: 1fr 1fr;
    }
    .tr-btn {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

/* Small Tablet & Large Mobile */
@media (max-width: 768px) {
    .tr-container {
        padding: 40px 16px 60px;
    }
    .tr-search-card {
        padding: 28px 20px;
    }
    .tr-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Switch Stepper to Vertical */
    .tr-stepper {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 24px; /* Space for the line */
        border-left: 2px solid var(--tr-border);
        gap: 0;
        padding-left: 24px;
    }
    
    .tr-step {
        flex-direction: row;
        text-align: left;
        gap: 16px;
        margin-bottom: 32px;
        width: 100%;
    }
    
    .tr-step:last-child { margin-bottom: 0; }
    
    .tr-step-circle {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .tr-step-line {
        display: none; /* Hidden, the border-left of parent acts as the line */
    }
    
    .tr-timeline-item {
        flex-direction: column;
        gap: 4px;
    }
    .tr-time { min-width: auto; }
}

/* Mobile */
@media (max-width: 480px) {
    .tr-header { margin-bottom: 32px; }
    .tr-status-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .tr-step-circle {
        width: 40px;
        height: 40px;
    }
    .tr-step-circle svg { width: 16px; height: 16px; }
    .tr-timeline { padding: 24px 16px; }
}