/* ==================================================== payment page ====== */

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    margin-bottom: var(--sp-5);
    border-radius: var(--radius-pill);
    background: var(--brass-12);
    font-size: var(--step--1);
}

.countdown strong { font-size: var(--step-1); }
.countdown.is-low { background: var(--alert-10); color: var(--alert); }
.countdown.is-over { background: var(--ink-06); color: var(--ink-55); }

.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; }

.qr-img {
    display: inline-block;
    width: 260px;
    max-width: 100%;
    margin-inline: auto;
    padding: var(--sp-3);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.qr-img svg { width: 100%; height: auto; display: block; }

.upi-id, .upi-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
    border-top: var(--border);
    margin-top: var(--sp-4);
    text-align: left;
}

.upi-amount { margin-top: 0; }
.upi-id strong, .upi-amount strong { flex: 1; word-break: break-all; }

.app-buttons { margin-bottom: var(--sp-5); }
.app-buttons h3 { margin-bottom: var(--sp-3); }

.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }

.app-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    border: 1px solid var(--ink-12);
    border-radius: var(--radius);
    background: var(--white);
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}

.app-btn:hover { border-color: var(--ink); }

.order-lines h4 { margin-bottom: var(--sp-3); }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* ------------------------------------------------ pincode auto-fill ----- */

.pin-status { font-size: var(--step--1); margin-top: var(--sp-2); min-height: 20px; }
.pin-status.is-ok { color: var(--success); }
.pin-status.is-bad { color: var(--alert); font-weight: 600; }
.pin-status.is-neutral { color: var(--ink-55); }

.input[readonly] { background: var(--ink-06); color: var(--ink-70); cursor: not-allowed; }

@media (max-width: 800px) {
    .pay-grid { grid-template-columns: 1fr; }
    .qr-img { width: 230px; }
}

/* ========================================================= account ====== */

.account-nav {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: var(--sp-4);
    margin-bottom: var(--sp-6);
    border-bottom: var(--border);
}

.account-nav a {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: var(--step--1);
    font-weight: 600;
    text-decoration: none;
    color: var(--ink-70);
}

.account-nav a:hover { background: var(--ink-06); color: var(--ink); }
.account-nav a.is-active { background: var(--ink); color: var(--on-dark); }
.account-nav form { margin-left: auto; }

.stat-card {
    display: block;
    padding: var(--sp-5);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    background: var(--page);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.2s ease;
}

.stat-card:hover { box-shadow: var(--shadow-lift); }
.stat-card strong { display: block; font-family: var(--font-display); font-size: var(--step-4); line-height: 1; }
.stat-card span { color: var(--ink-55); font-size: var(--step--1); }

.auth-card { max-width: 480px; margin-inline: auto; }
.auth-card h1 { margin-bottom: var(--sp-2); }

/* --------------------------------------------------------- order rows --- */

.order-row {
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--sp-4);
    margin-bottom: var(--sp-4);
    background: var(--page);
}

.order-row-head { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.order-row-head .muted { margin-left: var(--sp-3); font-size: var(--step--1); }
.order-row-items { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

.order-thumb {
    display: block;
    width: 52px;
    height: 64px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--mist);
    border: 1px solid var(--hairline);
    flex: 0 0 auto;
}

.order-thumb img { width: 100%; height: 100%; object-fit: cover; }

.order-detail { display: grid; grid-template-columns: 1fr 340px; gap: var(--sp-6); align-items: start; }

.order-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: var(--sp-4);
    align-items: center;
    padding: var(--sp-3) 0;
    border-bottom: var(--border);
}

.order-item:last-child { border-bottom: 0; }

/* ---------------------------------------------------------- timeline --- */

.timeline { list-style: none; padding: 0; margin: 0; }

.timeline-step {
    position: relative;
    padding-left: var(--sp-6);
    padding-bottom: var(--sp-5);
    font-size: var(--step--1);
}

.timeline-step:last-child { padding-bottom: 0; }

.timeline-step::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 16px;
    bottom: 0;
    width: 2px;
    background: var(--ink-12);
}

.timeline-step:last-child::before { display: none; }

.timeline-dot {
    position: absolute;
    left: 2px;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--ink-12);
    background: var(--page);
}

.timeline-step.is-done .timeline-dot { background: var(--ink); border-color: var(--ink); }
.timeline-step.is-done::before { background: var(--ink); }
.timeline-step.is-current .timeline-dot { box-shadow: 0 0 0 4px var(--brass-12); }
.timeline-step.is-done .timeline-label { font-weight: 600; }
.timeline-label .muted { display: block; font-weight: 400; }

.timeline-dead { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

@media (max-width: 900px) {
    .order-detail { grid-template-columns: 1fr; }
}
