/* فاز ۳: فرم‌ها، ورود، سبد، پنل کاربری، مسیر سفارش */
.page-title { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.muted { color: var(--muted); font-size: 13px; margin-block: 8px; }
.link { color: var(--red); font-weight: 600; }
.empty { padding: 32px; text-align: center; background: var(--soft); border-radius: var(--radius); }
.btn-light { background: var(--soft); color: var(--navy); padding: 6px 14px; font-size: 13px; }
.btn-light:hover { background: var(--border); }
.link-btn { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--red); }
.cart-badge { background: var(--red); color: var(--white); font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 999px; margin-inline-start: -8px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-block: 12px; font-weight: 600; }
.alert-ok { background: #e8f7ee; color: #14683a; }
.alert-err { background: #fdeaec; color: #a4121f; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form-narrow { max-width: 460px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field textarea {
    font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: inherit;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--red); outline-offset: 1px; }
.error { color: var(--red-dark); font-size: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.auth-card { max-width: 440px; margin-inline: auto; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card .btn-block { margin-top: 4px; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { background: var(--soft); font-size: 13px; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form input { width: 64px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.cart-total { margin-block: 16px; font-size: 16px; }
.cart-total strong { color: var(--red); font-size: 20px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.summary { padding: 18px; background: var(--soft); border-radius: var(--radius); }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; border-bottom: 1px solid var(--border); font-size: 13px; }
h2 { font-size: 18px; font-weight: 800; margin-block: 20px 10px; }

.account-layout { display: grid; grid-template-columns: 210px 1fr; gap: 28px; align-items: start; }
.account-nav { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--soft); border-radius: var(--radius); }
.account-nav a, .account-nav .link-btn { padding: 9px 12px; border-radius: 8px; text-align: start; width: 100%; }
.account-nav a:hover { background: var(--border); }
.account-nav a.is-active { background: var(--red); color: var(--white); }
.card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 24px; }
.card code { background: var(--soft); padding: 4px 8px; border-radius: 6px; }
.order-list li a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; }
.order-list li a:hover { border-color: var(--red); }

/* مسیر حرکت سفارش */
.timeline { display: flex; margin-block: 20px 28px; padding: 0; list-style: none; counter-reset: s; }
.timeline li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 12px; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; top: 11px; inset-inline-start: 50%; width: 100%; height: 3px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--white); border: 3px solid var(--border); }
.timeline li.done { color: var(--navy); }
.timeline li.done::before { background: var(--red); }
.timeline li.done .dot { background: var(--red); border-color: var(--red); }
.timeline li.current { color: var(--red); font-weight: 800; }
.timeline li.current .dot { border-color: var(--red); box-shadow: 0 0 0 4px rgba(229, 37, 53, .2); }
.events { display: flex; flex-direction: column; gap: 8px; }
.events li { padding-inline-start: 12px; border-inline-start: 3px solid var(--border); }

@media (max-width: 860px) {
    .account-layout, .checkout-grid { grid-template-columns: 1fr; }
    .account-nav { flex-direction: row; flex-wrap: wrap; }
    .account-nav a, .account-nav .link-btn { width: auto; }
    .timeline { flex-direction: column; gap: 14px; }
    .timeline li { flex-direction: row; gap: 12px; text-align: start; font-size: 14px; }
    .timeline li::before { display: none; }
}
