/* ============================================================
   Milkify Order Tracker — Design System (mobile-first)
   Navy #002857 · Sky #1987B2 · Gold #FAC407
   ============================================================ */

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

:root {
    --navy:              #002857;
    --navy-dark:         #001A3A;
    --navy-light:        #0A3D72;
    --navy-faint:        #E6EDF5;
    --sky:               #1987B2;
    --sky-dark:          #126E92;
    --sky-light:         #63B4D6;
    --sky-faint:         #E3F3FA;
    --gold:              #FAC407;
    --gold-dark:         #D4A600;
    --gold-light:        #FDE68A;
    --gold-faint:        #FFF9E1;

    --white:             #FFFFFF;
    --warm-white:        #FAFBFC;
    --pearl:             #F1F3F6;
    --silver:            #D8DDE5;
    --slate:             #64748B;
    --charcoal:          #334155;

    --sage:              #16A34A;
    --sage-bg:           #DCFCE7;
    --amber:             #D97706;
    --amber-bg:          #FEF3C7;
    --rose:              #DC2626;
    --rose-bg:           #FEE2E2;

    --color-primary:     var(--navy);
    --color-accent:      var(--sky);
    --color-highlight:   var(--gold);

    --surface-page:      var(--warm-white);
    --surface-card:      var(--white);

    --text-primary:      var(--charcoal);
    --text-secondary:    var(--slate);
    --text-heading:      var(--navy);

    --font-heading:      'Outfit', sans-serif;
    --font-body:         'Nunito Sans', sans-serif;

    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-full: 9999px;

    --shadow-xs:  0 1px 2px rgba(0,40,87,0.04);
    --shadow-sm:  0 1px 3px rgba(0,40,87,0.06), 0 1px 2px rgba(0,40,87,0.04);
    --shadow-md:  0 4px 14px rgba(0,40,87,0.08), 0 2px 4px rgba(0,40,87,0.03);
    --shadow-lg:  0 10px 36px rgba(0,40,87,0.10), 0 4px 10px rgba(0,40,87,0.05);
    --shadow-glow-sky: 0 0 0 3px rgba(25,135,178,0.2);

    --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast:    150ms;
    --dur-normal:  250ms;
    --dur-slow:    400ms;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--surface-page);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--color-accent); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--sky-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ── Typography (mobile base) ───────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-heading);
}
h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4 { font-size: 0.9rem; }
small, .text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }

@media (min-width: 640px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }
    h3 { font-size: 1.125rem; }
    h4 { font-size: 1rem; }
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-in { animation: fadeUp var(--dur-slow) var(--ease-out) both; }
.stagger-1  { animation-delay: 0.06s; }
.stagger-2  { animation-delay: 0.12s; }
.stagger-3  { animation-delay: 0.18s; }
.stagger-4  { animation-delay: 0.24s; }
.stagger-5  { animation-delay: 0.30s; }
.stagger-6  { animation-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Auth / Login Layout ─────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background:
        radial-gradient(ellipse at 30% 80%, rgba(25,135,178,0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 20%, rgba(0,40,87,0.05) 0%, transparent 50%),
        linear-gradient(170deg, var(--warm-white) 0%, var(--pearl) 100%);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-lg) var(--space-md) var(--space-md);
    animation: fadeUp 0.5s var(--ease-out) both;
    border: 1px solid rgba(0,40,87,0.05);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--navy) 0%, var(--sky) 60%, var(--gold) 100%);
}
.auth-card__logo {
    text-align: center;
    margin-bottom: var(--space-lg);
}
.auth-card__logo img {
    max-width: 140px;
    height: auto;
    margin: 0 auto var(--space-sm);
}
.auth-card__logo h1 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 2px;
}
.auth-card__logo p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

@media (min-width: 640px) {
    .auth-page { padding: var(--space-xl); }
    .auth-card {
        padding: var(--space-2xl) var(--space-2xl) var(--space-xl);
        border-radius: var(--radius-xl);
    }
    .auth-card__logo img { max-width: 160px; }
    .auth-card__logo h1 { font-size: 1.25rem; }
    .auth-card__logo { margin-bottom: var(--space-xl); }
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 var(--space-md);
    background: var(--navy);
    box-shadow: 0 2px 8px rgba(0,40,87,0.15);
}
.site-header__brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    min-width: 0;
}
.site-header__brand img {
    height: 22px;
    width: auto;
    flex-shrink: 0;
}
.site-header__brand span {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: var(--space-sm);
    margin-left: 2px;
    white-space: nowrap;
}
.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}
.site-header__user {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    display: none;
}
.site-header .btn-logout {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: all var(--dur-fast);
    text-decoration: none;
}
.site-header .btn-logout:hover {
    background: rgba(255,255,255,0.15);
    color: var(--white);
}

@media (min-width: 640px) {
    .site-header {
        height: 60px;
        padding: 0 var(--space-lg);
    }
    .site-header__brand img { height: 28px; }
    .site-header__brand span { font-size: 0.85rem; }
    .site-header__user { display: inline; font-size: 0.8rem; }
    .site-header .btn-logout { font-size: 0.8rem; padding: 0.3rem 0.75rem; }
}

/* ── Main Content ────────────────────────────────────────── */
.main-content {
    max-width: 680px;
    margin: 0 auto;
    padding: var(--space-md);
    padding-bottom: var(--space-2xl);
}
@media (min-width: 640px) {
    .main-content {
        padding: var(--space-lg);
        padding-bottom: var(--space-3xl);
    }
}

/* ── Order Hero ──────────────────────────────────────────── */
.order-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    position: relative;
    overflow: hidden;
}
.order-hero::after {
    content: '';
    position: absolute;
    top: -40%; right: -15%;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(25,135,178,0.12);
    pointer-events: none;
}
.order-hero__top {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}
.order-hero__number {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}
.order-hero__date {
    font-size: 0.8rem;
    opacity: 0.7;
}
.order-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    position: relative;
    z-index: 1;
}

@media (min-width: 640px) {
    .order-hero {
        border-radius: var(--radius-lg);
        padding: var(--space-xl) var(--space-xl) var(--space-lg);
        margin-bottom: var(--space-xl);
    }
    .order-hero::after { width: 280px; height: 280px; }
    .order-hero__top {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: var(--space-md);
    }
    .order-hero__number { font-size: 1.6rem; }
    .order-hero__date { font-size: 0.85rem; margin-top: 2px; }
}

/* ── Progress Stepper ────────────────────────────────────── */
.stepper {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: var(--space-md);
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.stepper__step {
    flex: 1;
    min-width: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
}
.stepper__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 11px;
    left: calc(50% + 12px);
    right: calc(-50% + 12px);
    height: 2px;
    background: var(--silver);
    border-radius: 2px;
    z-index: 0;
}
.stepper__step.done:not(:last-child)::after {
    background: var(--sky);
}
.stepper__step.active:not(:last-child)::after {
    background: linear-gradient(90deg, var(--sky) 0%, var(--silver) 100%);
}
.stepper__dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--pearl);
    border: 2.5px solid var(--silver);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: all var(--dur-normal) var(--ease-out);
    flex-shrink: 0;
}
.stepper__step.done .stepper__dot {
    background: var(--sky);
    border-color: var(--sky);
    color: var(--white);
}
.stepper__step.active .stepper__dot {
    background: var(--white);
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(25,135,178,0.15);
    animation: pulse 2.5s ease-in-out infinite;
}
.stepper__dot svg {
    width: 11px;
    height: 11px;
}
.stepper__dot .dot-inner {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sky);
}
.stepper__label {
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 3px;
    line-height: 1.2;
    max-width: 56px;
}
.stepper__step.done .stepper__label { color: var(--sky-dark); }
.stepper__step.active .stepper__label { color: var(--navy); font-weight: 700; }

@media (min-width: 640px) {
    .stepper {
        margin-bottom: var(--space-xl);
        padding: 0 var(--space-xs);
        overflow-x: visible;
    }
    .stepper__step { min-width: auto; }
    .stepper__dot { width: 32px; height: 32px; border-width: 3px; }
    .stepper__dot svg { width: 14px; height: 14px; }
    .stepper__dot .dot-inner { width: 8px; height: 8px; }
    .stepper__step:not(:last-child)::after {
        top: 15px;
        left: calc(50% + 18px);
        right: calc(-50% + 18px);
        height: 3px;
    }
    .stepper__label {
        font-size: 0.7rem;
        margin-top: var(--space-xs);
        max-width: 80px;
    }
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,40,87,0.05);
    transition: box-shadow var(--dur-normal) var(--ease-out);
    margin-bottom: var(--space-md);
}
.card-interactive { cursor: pointer; }

.card__header {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--pearl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}
.card__header h3 {
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.card__header svg {
    width: 16px;
    height: 16px;
    color: var(--sky);
    flex-shrink: 0;
}
.card__body { padding: var(--space-md); }

@media (min-width: 640px) {
    .card { border-radius: var(--radius-lg); }
    .card:hover { box-shadow: var(--shadow-md); }
    .card-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
    .card__header {
        padding: var(--space-md) var(--space-lg);
        gap: var(--space-md);
    }
    .card__header h3 { font-size: 0.95rem; }
    .card__header svg { width: 18px; height: 18px; }
    .card__body { padding: var(--space-lg); }
}

/* ── Status Rows ──────────────────────────────────────────── */
.status-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--pearl);
}
.status-row:last-child { border-bottom: none; }
.status-row__icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.status-row__icon svg { width: 16px; height: 16px; }
.status-row__icon--pending  { background: var(--pearl); color: var(--slate); }
.status-row__icon--active   { background: var(--sky-faint); color: var(--sky); }
.status-row__icon--done     { background: var(--sage-bg); color: var(--sage); }
.status-row__icon--warning  { background: var(--amber-bg); color: var(--amber); }
.status-row__icon--fail     { background: var(--rose-bg); color: var(--rose); }
.status-row__content { flex: 1; min-width: 0; }
.status-row__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 1px;
}
.status-row__value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}
.status-row__detail {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
    word-break: break-word;
}

@media (min-width: 640px) {
    .status-row { gap: var(--space-md); }
    .status-row__icon { width: 36px; height: 36px; border-radius: var(--radius-md); }
    .status-row__icon svg { width: 18px; height: 18px; }
    .status-row__label { font-size: 0.8rem; margin-bottom: 2px; }
    .status-row__value { font-size: 0.95rem; }
    .status-row__detail { font-size: 0.8rem; }
}

/* ── Item Rows ────────────────────────────────────────────── */
.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--pearl);
}
.item-row:last-child { border-bottom: none; }
.item-name { font-weight: 600; font-size: 0.82rem; line-height: 1.3; }
.item-variant { font-size: 0.72rem; color: var(--text-secondary); }
.item-status { text-align: right; flex-shrink: 0; }

@media (min-width: 640px) {
    .item-row { padding: var(--space-md) 0; gap: var(--space-md); }
    .item-name { font-size: 0.9rem; }
    .item-variant { font-size: 0.78rem; }
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0.15rem 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.badge-navy    { background: rgba(255,255,255,0.15); color: var(--white); }
.badge-sky     { background: var(--sky-faint); color: var(--sky-dark); }
.badge-gold    { background: var(--gold-faint); color: var(--gold-dark); border: 1px solid var(--gold-light); }
.badge-success { background: var(--sage-bg); color: #15803D; }
.badge-warning { background: var(--amber-bg); color: #92400E; }
.badge-danger  { background: var(--rose-bg); color: var(--rose); }
.badge-muted   { background: var(--pearl); color: var(--slate); }
.badge-dot::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

@media (min-width: 640px) {
    .badge {
        gap: 4px;
        padding: 0.2rem 0.65rem;
        font-size: 0.7rem;
    }
    .badge-dot::before { width: 6px; height: 6px; }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.55rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    text-decoration: none;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}
.btn-primary:hover {
    background: var(--navy-dark);
    border-color: var(--navy-dark);
    color: var(--white);
}

.btn-accent {
    background: var(--sky);
    color: var(--white);
    border-color: var(--sky);
}
.btn-accent:hover {
    background: var(--sky-dark);
    border-color: var(--sky-dark);
    color: var(--white);
}

.btn-gold {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    font-weight: 700;
}
.btn-gold:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--navy);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--silver);
}
.btn-outline:hover {
    background: var(--navy-faint);
    border-color: var(--navy);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
    padding: 0.35rem 0.6rem;
}
.btn-ghost:hover { background: var(--pearl); color: var(--text-primary); }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
.btn-block { width: 100%; white-space: normal; text-align: center; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

@media (min-width: 640px) {
    .btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
    .btn svg { width: 18px; height: 18px; }
    .btn-primary:hover, .btn-accent:hover, .btn-gold:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }
    .btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
    .btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-md); }
.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}
.form-hint { font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px; }
.form-control {
    display: block;
    width: 100%;
    padding: 0.65rem 0.8rem;
    font-family: var(--font-body);
    font-size: 1rem; /* 16px prevents iOS zoom */
    color: var(--text-primary);
    background: var(--white);
    border: 1.5px solid var(--silver);
    border-radius: var(--radius-md);
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
    appearance: none;
}
.form-control::placeholder { color: var(--slate); opacity: 0.5; }
.form-control:focus {
    outline: none;
    border-color: var(--sky);
    box-shadow: var(--shadow-glow-sky);
}
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

@media (min-width: 640px) {
    .form-group { margin-bottom: var(--space-lg); }
    .form-label { font-size: 0.85rem; }
    .form-hint { font-size: 0.78rem; }
    .form-control { padding: 0.7rem 0.9rem; font-size: 0.95rem; }
    textarea.form-control { min-height: 90px; }
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    border: 1px solid transparent;
    animation: fadeUp var(--dur-slow) var(--ease-out) both;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--sage-bg); color: #15803D; border-color: #86EFAC; }
.alert-danger  { background: var(--rose-bg); color: var(--rose); border-color: #FCA5A5; }
.alert-warning { background: var(--amber-bg); color: #92400E; border-color: #FCD34D; }
.alert-info    { background: var(--sky-faint); color: var(--sky-dark); border-color: var(--sky-light); }

@media (min-width: 640px) {
    .alert { padding: var(--space-md) var(--space-lg); font-size: 0.9rem; margin-bottom: var(--space-lg); }
    .alert svg { width: 20px; height: 20px; }
}

/* ── Address Block ────────────────────────────────────────── */
.address-block {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-primary);
}
@media (min-width: 640px) {
    .address-block { font-size: 0.9rem; }
}

/* ── Section Header ───────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    margin-top: var(--space-lg);
}
.section-header h2 { font-size: 0.95rem; }
.section-header svg { width: 18px; height: 18px; color: var(--sky); flex-shrink: 0; }

@media (min-width: 640px) {
    .section-header { margin-bottom: var(--space-md); margin-top: var(--space-xl); }
    .section-header h2 { font-size: 1.05rem; }
    .section-header svg { width: 20px; height: 20px; }
}

/* ── Other Orders List ────────────────────────────────────── */
.order-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--pearl);
    transition: background var(--dur-fast);
    gap: var(--space-sm);
    -webkit-tap-highlight-color: transparent;
}
.order-link:last-child { border-bottom: none; }
.order-link:hover { background: var(--navy-faint); color: inherit; }
.order-link__number {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
}
.order-link__date {
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.order-link__arrow {
    color: var(--silver);
    flex-shrink: 0;
    transition: color var(--dur-fast), transform var(--dur-fast);
}
.order-link:hover .order-link__arrow {
    color: var(--sky);
    transform: translateX(3px);
}

@media (min-width: 640px) {
    .order-link { padding: var(--space-md) var(--space-lg); }
    .order-link__number { font-size: 0.95rem; }
    .order-link__date { font-size: 0.78rem; }
}

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,28,58,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: flex-end; /* slide up from bottom on mobile */
    justify-content: center;
    z-index: 300;
    padding: 0;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--surface-card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    padding: var(--space-lg) var(--space-md) var(--space-xl);
    animation: fadeUp 0.25s var(--ease-out);
    -webkit-overflow-scrolling: touch;
}
.modal h3 {
    margin-bottom: var(--space-xs);
    font-size: 1.1rem;
}
.modal__subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}
.modal__actions {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}
.modal__actions .btn { width: 100%; }
.modal__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
}

@media (min-width: 640px) {
    .modal-overlay {
        align-items: center;
        padding: var(--space-lg);
    }
    .modal {
        max-width: 520px;
        border-radius: var(--radius-xl);
        padding: var(--space-2xl);
    }
    .modal h3 { font-size: 1.2rem; }
    .modal__subtitle { font-size: 0.85rem; margin-bottom: var(--space-lg); }
    .modal__actions {
        flex-direction: row;
        justify-content: flex-end;
        margin-top: var(--space-xl);
    }
    .modal__actions .btn { width: auto; }
}

/* ── Support Callout ──────────────────────────────────────── */
.support-callout {
    background: var(--navy-faint);
    border: 1px solid rgba(0,40,87,0.08);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-primary);
}
.support-callout a { font-weight: 600; color: var(--sky); }
.support-callout strong { color: var(--navy); }

@media (min-width: 640px) {
    .support-callout { padding: var(--space-md); font-size: 0.85rem; }
}

/* ── Urgent Warning ───────────────────────────────────────── */
.urgent-warning {
    background: var(--amber-bg);
    border: 1px solid #FCD34D;
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.82rem;
    line-height: 1.5;
    color: #92400E;
    margin-top: var(--space-sm);
}
.urgent-warning strong { color: #78350F; }
.urgent-warning a { color: #92400E; font-weight: 700; text-decoration: underline; }

@media (min-width: 640px) {
    .urgent-warning { padding: var(--space-md); font-size: 0.85rem; }
}

/* ── Info Notice ──────────────────────────────────────────── */
.info-notice {
    background: var(--sky-faint);
    border: 1px solid rgba(25,135,178,0.15);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--sky-dark);
}
@media (min-width: 640px) {
    .info-notice { padding: var(--space-md); font-size: 0.85rem; }
}

/* ── Radio Group ──────────────────────────────────────────── */
.radio-group { display: flex; flex-direction: column; gap: var(--space-sm); }
.radio-option {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
}
.radio-option input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--sky);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .radio-option { font-size: 0.9rem; }
}

/* ── Utilities ────────────────────────────────────────────── */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-sm { gap: var(--space-sm); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
    padding: var(--space-md) !important;
    font-size: 0.7rem !important;
    line-height: 1.6;
}
@media (min-width: 640px) {
    footer {
        padding: var(--space-lg) !important;
        font-size: 0.75rem !important;
    }
}
