/* ============================================================================
   Account / Auth pages — login, register, reset, my-orders, account
   Loaded per-page via {% block head %}. Reuses global tokens from style.css.
   ============================================================================ */

.account-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

/* --- Auth (login / register / reset) ------------------------------------- */
.auth-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}
@media (min-width: 860px) {
    .auth-layout.has-perks { grid-template-columns: 1.1fr 0.9fr; }
}

.auth-card {
    background: #fff;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg, 16px);
    padding: 2rem 1.75rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.auth-card__title { font-size: 1.5rem; font-weight: 800; margin: 0 0 0.25rem; }
.auth-card__subtitle { color: var(--color-text-muted); margin: 0 0 1.5rem; font-size: 0.95rem; }

.auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; background: #f1f5f9; padding: 4px; border-radius: var(--radius-full); }
.auth-tab {
    flex: 1; text-align: center; padding: 0.55rem; border: none; background: transparent;
    border-radius: var(--radius-full); font-weight: 600; font-size: 0.95rem; cursor: pointer;
    color: var(--color-text-muted); font-family: inherit;
}
.auth-tab.is-active { background: #fff; color: var(--color-text); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.auth-form { display: none; flex-direction: column; gap: 1rem; }
.auth-form.is-active { display: flex; }

.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field label { font-weight: 600; font-size: 0.9rem; }
.form-field .field-hint { font-size: 0.8rem; color: var(--color-text-muted); }

.auth-error {
    display: none; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;
    border-radius: var(--radius-md); padding: 0.6rem 0.8rem; font-size: 0.88rem;
}
.auth-error.is-visible { display: block; }
.auth-notice {
    display: none; background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0;
    border-radius: var(--radius-md); padding: 0.6rem 0.8rem; font-size: 0.88rem;
}
.auth-notice.is-visible { display: block; }

.btn-block { width: 100%; }

.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0; color: var(--color-text-muted); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }

.auth-forgot { background: none; border: none; color: var(--color-brand-orange); cursor: pointer; font-size: 0.85rem; font-family: inherit; padding: 0; align-self: flex-end; }

/* LINE button reused on auth page (full width) */
.btn-line-login {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%; background: #06C755; color: #fff; border: none;
    padding: 0.7rem 1rem; border-radius: var(--radius-full); font-weight: 600;
    text-decoration: none; font-size: 0.95rem;
}
.btn-line-login:hover { background: #05b34c; }

/* Perks panel */
.auth-perks { background: linear-gradient(160deg, #fff7f3, #fdeee6); border-radius: var(--radius-lg, 16px); padding: 1.75rem; }
.auth-perks__title { font-size: 1.15rem; font-weight: 800; margin: 0 0 1rem; }
.auth-perks__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.auth-perks__item { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.95rem; }
.auth-perks__icon { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--color-brand-orange); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem; }

/* --- My Orders ----------------------------------------------------------- */
.account-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.35rem; }
.account-title { font-size: 1.8rem; font-weight: 800; margin: 0; }
.account-subtitle { color: var(--color-text-muted); margin: 0 0 1.5rem; }

.points-banner {
    display: flex; align-items: center; gap: 0.6rem; background: linear-gradient(135deg, #E4632B, #f08a5d);
    color: #fff; border-radius: var(--radius-lg, 16px); padding: 1rem 1.25rem; margin-bottom: 1.75rem;
    font-weight: 600;
}
.points-banner__icon { font-size: 1.4rem; }

.orders-list { display: flex; flex-direction: column; gap: 1rem; }
.order-card {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    background: #fff; border: 1.5px solid var(--color-border); border-radius: var(--radius-lg, 16px);
    padding: 1.1rem 1.25rem; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.order-card:hover { border-color: var(--color-brand-orange); box-shadow: 0 6px 18px rgba(228,99,43,0.08); }
.order-card__id { font-weight: 700; }
.order-card__meta { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.2rem; }
.order-card__right { text-align: right; white-space: nowrap; }
.order-card__total { font-weight: 700; }
.order-status-chip { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: var(--radius-full); background: #f1f5f9; color: #475569; margin-top: 0.3rem; }

.account-empty { text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); }
.account-empty__emoji { font-size: 2.5rem; }

/* --- Account / profile --------------------------------------------------- */
.account-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 800px) { .account-grid { grid-template-columns: 1fr 1fr; } }

.account-section { background: #fff; border: 1.5px solid var(--color-border); border-radius: var(--radius-lg, 16px); padding: 1.5rem; }
.account-section__title { font-size: 1.05rem; font-weight: 700; margin: 0 0 1rem; }
.account-section--full { grid-column: 1 / -1; }

.points-card { background: linear-gradient(135deg, #1e293b, #334155); color: #fff; border-radius: var(--radius-lg, 16px); padding: 1.75rem; }
.points-card__value { font-size: 2.75rem; font-weight: 800; line-height: 1; }
.points-card__label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; opacity: 0.8; }
.points-card__worth { margin-top: 0.5rem; font-size: 0.95rem; opacity: 0.95; }

.history-list { list-style: none; margin: 0; padding: 0; }
.history-row { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--color-border); }
.history-row:last-child { border-bottom: none; }
.history-row__label { font-size: 0.9rem; }
.history-row__date { font-size: 0.78rem; color: var(--color-text-muted); }
.history-row__points { font-weight: 700; }
.history-row__points.is-positive { color: #15803d; }
.history-row__points.is-negative { color: #b91c1c; }
