/* ─── Customer Login / Account screens ─────────────────────────────────── */

/* Login forms stay in a comfortable centred column. */
.login-wrap { max-width: 520px; margin: 0 auto; padding: 18px 0 90px; }

/* The account page uses the full width on larger screens, like the rest of
   the shop, instead of a narrow mobile-only column. */
.account-wrap { max-width: none; margin: 0; padding: 18px clamp(12px, 2vw, 28px) 90px; }

/* Profile form / order detail stay readable even when the page is wide. */
.acc-narrow { max-width: 760px; margin: 0 auto; }

.login-card { padding: 22px 18px; }
.login-head { text-align: center; margin-bottom: 16px; }
.login-ic { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: var(--green-light); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.login-head h3 { font-family: 'Baloo 2', sans-serif; font-size: 20px; margin: 0 0 4px; color: var(--green-dark); }
.login-head p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }

.acc-btn { width: 100%; margin-top: 14px; }
.acc-links { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; align-items: stretch; }
.acc-link-btn { background: none; border: none; color: var(--green); font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 8px 0; text-align: center; text-decoration: none; display: inline-block; }
.acc-link-btn:hover { text-decoration: underline; }
.acc-hint { font-size: 12.5px; color: var(--muted); text-align: center; margin: 12px 0 0; }
#otpResendRow { margin-top: 12px; text-align: center; }
.acc-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 10px; cursor: pointer; }
.acc-remember input { accent-color: var(--green); width: 16px; height: 16px; }

.acc-otp, .acc-pin { letter-spacing: 8px; font-size: 18px; text-align: center; }

/* ─── Account page ─────────────────────────────────────────────────────── */
.account-head { display: flex; align-items: center; gap: 12px; padding: 16px; }
.account-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex: none; }
.account-head-txt { flex: 1; min-width: 0; }
.account-head-txt h3 { font-family: 'Baloo 2', sans-serif; font-size: 17px; margin: 0; color: var(--text); }
.account-head-txt p { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.acc-logout-btn { background: none; border: 1px solid #fca5a5; color: #dc2626; width: 38px; height: 38px; border-radius: 10px; font-size: 15px; cursor: pointer; flex: none; }

.acc-tabs { display: flex; gap: 8px; margin: 14px 0 4px; }
.acc-tabs button { flex: 1; background: var(--card-bg); border: 1px solid #e5e7eb; border-radius: var(--radius-sm); padding: 10px 6px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.acc-tabs button.active { background: var(--green); border-color: var(--green); color: #fff; }

/* Order sections: Current / Overdue / Completed */
.acc-subtabs { flex-wrap: wrap; margin: 12px 0 6px; }
.acc-subtabs button { min-width: 0; line-height: 1.25; }
.acc-subtabs button em { font-style: normal; font-weight: 800; margin-left: 6px; opacity: .85; }
.acc-subtabs button.active em { opacity: 1; }

.acc-sec-title { display: flex; align-items: center; gap: 8px; font-family: 'Baloo 2', sans-serif; font-size: 16px; font-weight: 800; color: var(--green-dark); margin: 6px 0 12px; }
.acc-sec-title i { color: var(--green); }
.acc-sec-title span { font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 700; color: var(--muted); background: #f3f4f6; border-radius: 20px; padding: 2px 9px; }

/* On tablet/desktop the tab rows sit at their natural width on the left
   instead of stretching the full page width. */
@media (min-width: 700px) {
  .acc-tabs button { flex: 0 0 auto; padding: 10px 24px; }
  .acc-subtabs button { flex: 0 0 auto; padding: 9px 18px; }
}

/* Responsive order cards: 1 column on phones, more on tablet/desktop. */
.acc-orders-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 700px) { .acc-orders-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .acc-orders-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.acc-orders-grid .acc-order { margin-bottom: 0; height: 100%; min-width: 0; overflow: hidden; }

.acc-order { width: 100%; text-align: left; display: block; margin-bottom: 10px; padding: 14px; cursor: pointer; }
.acc-order:hover { border-color: var(--green-mid); }
.acc-order-overdue { border-color: #fca5a5; background: #fff7f7; }
.acc-order-overdue:hover { border-color: #ef4444; }
.acc-due-late { color: #b91c1c; font-weight: 700; }

.acc-order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.acc-order-top > div:first-child { min-width: 0; }
.acc-order-top small { overflow-wrap: anywhere; }
.acc-order-top b { font-size: 14px; color: var(--text); }
.acc-order-top small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.acc-status { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; background: #f3f4f6; color: #374151; white-space: nowrap; }
.st-delivered { background: #dcfce7; color: #15803d; }
.st-pending, .st-confirmed { background: #fef9c3; color: #a16207; }
.st-cancelled, .st-rejected { background: #fee2e2; color: #b91c1c; }
.st-out_for_delivery { background: #dbeafe; color: #1d4ed8; }

.acc-order-mid { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.acc-order-bot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; border-top: 1px dashed #e5e7eb; padding-top: 8px; font-size: 13px; }
.acc-order-bot span { color: var(--muted); font-size: 11.5px; }

.acc-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.acc-item:last-child { border-bottom: none; }
.acc-item-em { flex: none; width: 36px; height: 36px; border-radius: 8px; overflow: hidden; border: 1px solid #f0f2f1; background: #fff; display: grid; place-items: center; }
.acc-item-em img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acc-item-txt { flex: 1; min-width: 0; }
.acc-item-txt b { font-size: 13.5px; color: var(--text); }
.acc-item-txt small { display: block; font-size: 12px; color: var(--muted); }

.acc-detail-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; }
.acc-detail-row span { color: var(--muted); flex: none; }
.acc-detail-row b { text-align: right; }
.acc-total { font-size: 15px; font-weight: 700; color: var(--green-dark); }

.acc-hist { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.acc-hist .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-mid); margin-top: 5px; flex: none; }
.acc-hist b { display: block; font-size: 13px; }
.acc-hist small { font-size: 12px; color: var(--muted); }

.acc-empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.acc-empty i { font-size: 32px; color: var(--green-mid); display: block; margin-bottom: 10px; }
.acc-empty p { font-size: 13px; margin: 0 0 8px; }

.acc-ta { resize: vertical; min-height: 56px; }
.half-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .half-2 { grid-template-columns: 1fr; } }
/* ── Track Order timeline ── */
.track-tl { display: flex; flex-direction: column; margin-top: 12px; }
.track-step { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; position: relative; }
.track-step::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: -8px; width: 2px; background: var(--border); }
.track-step:last-child::before { display: none; }
.track-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--border); color: #9ca3af; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; z-index: 1; }
.track-step.done .track-dot { background: var(--green); color: #fff; }
.track-dot.fail { background: #dc2626 !important; color: #fff !important; }
.track-step.now .track-dot { box-shadow: 0 0 0 4px rgba(26,107,58,.15); }
.track-step b { font-size: 13.5px; display: block; }
.track-step small { font-size: 11px; color: var(--muted); }
.track-step:not(.done) b { color: var(--muted); font-weight: 500; }
