/* =====================================================
   CRUST BROS — Customer account pages
   Reuses brand tokens from ../css/styles.css
   ===================================================== */

body.acct-body {
    background: var(--bg, #FAF6EB);
    min-height: 100vh;
}

/* Login + signup card layout */
.acct {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(214, 169, 81, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(196, 69, 49, 0.15) 0%, transparent 55%),
        linear-gradient(180deg, var(--green-800, #142A1C) 0%, var(--green-600, #1E3D28) 100%);
}
.acct__card {
    width: 100%;
    max-width: 460px;
    background: var(--cream-50, #FAF6EB);
    border-radius: 28px;
    padding: 2.5rem 2.2rem;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    text-align: center;
    border: 1px solid rgba(214, 169, 81, 0.4);
}
.acct__brand {
    display: inline-flex;
    margin-bottom: 1rem;
}
.acct__brand img {
    width: 70px; height: 70px;
    border-radius: 50%;
    border: 3px solid var(--gold-500, #C9A04C);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}
.acct h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.7rem;
    color: var(--green-600, #1E3D28);
    font-weight: 800;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}
.acct__lead {
    color: var(--muted, #6B7A6F);
    margin-bottom: 1.4rem;
    font-size: 0.95rem;
    line-height: 1.55;
}
.acct__loyalty-promo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    background: rgba(214, 169, 81, 0.1);
    border: 1px dashed var(--gold-500);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: var(--gold-700);
    font-weight: 600;
    font-size: 0.88rem;
}
.acct__dots {
    display: flex;
    gap: 0.4rem;
}
.acct__dots .dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: rgba(176, 137, 47, 0.2);
    border: 1.5px solid rgba(176, 137, 47, 0.35);
    transition: all 0.3s var(--ease);
}
.acct__dots .dot.is-filled {
    background: var(--gold-500);
    border-color: var(--gold-500);
}
.acct__dots .dot.is-reward {
    background: var(--green-600);
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(214, 169, 81, 0.3);
}

.acct__form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    text-align: left;
}
.acct__field { display: flex; flex-direction: column; gap: 0.3rem; }
.acct__field label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--green-600);
}
.acct__field label small { color: var(--muted); font-weight: 400; margin-left: 0.3rem; }
.acct__field input {
    padding: 0.85rem 1rem;
    border: 1.5px solid rgba(176, 137, 47, 0.3);
    border-radius: 12px;
    background: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.acct__field input:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 4px rgba(214, 169, 81, 0.15);
}
.acct__field input.is-error { border-color: var(--tomato, #C44531); }
.acct__err {
    font-size: 0.82rem;
    color: var(--tomato, #C44531);
    min-height: 1em;
}
.acct__check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
    cursor: pointer;
    line-height: 1.45;
    padding: 0.5rem 0;
}
.acct__check input {
    margin-top: 3px;
    width: 18px; height: 18px;
    accent-color: var(--green-600);
    cursor: pointer;
}
.acct__alt {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.4rem;
}
.acct__alt a {
    color: var(--gold-700);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(176, 137, 47, 0.3);
    text-underline-offset: 3px;
}
.acct__alt a:hover { color: var(--green-600); }
.acct__error {
    background: rgba(196, 69, 49, 0.1);
    color: var(--tomato);
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

/* ===== Logged-in account dashboard ===== */
body.acct-body--logged-in {
    background:
        radial-gradient(ellipse at 0% 0%, rgba(214, 169, 81, 0.06) 0%, transparent 50%),
        var(--bg, #FAF6EB);
}
.acct-nav {
    background: var(--green-700);
    color: var(--cream-100);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 50;
}
.acct-nav__brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--cream-100);
}
.acct-nav__brand img {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid var(--gold-500);
}
.acct-nav__brand strong {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    font-size: 1.1rem;
}
.acct-nav__right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.acct-nav__user {
    color: rgba(245, 233, 208, 0.75);
    font-size: 0.9rem;
}
.acct-nav .btn--ghost {
    color: var(--cream-100);
    border-color: rgba(245, 233, 208, 0.3);
}
.acct-nav .btn--ghost:hover {
    background: rgba(245, 233, 208, 0.1);
    border-color: var(--cream-100);
}

.acct-main {
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem 1.4rem 4rem;
}

.acct-hero {
    background: linear-gradient(155deg, #fff 0%, var(--cream-50) 100%);
    border: 1px solid rgba(176, 137, 47, 0.18);
    border-radius: 28px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.acct-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.1;
    color: var(--green-600);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0.6rem 0;
}
.acct-hero h1 strong {
    color: var(--gold-600);
    font-style: italic;
    font-weight: 800;
}
.acct-hero__sub {
    color: var(--muted);
    margin-bottom: 1.8rem;
    font-size: 1rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.acct-hero__cta { padding: 1.05rem 2rem; font-size: 1rem; }
.btn--large { padding: 1rem 1.8rem; font-size: 1rem; }

.acct-progress {
    display: inline-flex;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    padding: 0.8rem 1.1rem;
    background: rgba(214, 169, 81, 0.1);
    border-radius: 999px;
    border: 1px solid rgba(214, 169, 81, 0.25);
}
.acct-progress__dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: rgba(176, 137, 47, 0.2);
    border: 1.5px solid rgba(176, 137, 47, 0.35);
    transition: all 0.4s var(--ease);
}
.acct-progress__dot.is-filled {
    background: var(--gold-500);
    border-color: var(--gold-500);
    box-shadow: 0 2px 6px rgba(214, 169, 81, 0.4);
}
.acct-progress__dot.is-reward {
    background: var(--green-600);
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(214, 169, 81, 0.3);
    animation: rewardPulse 1.4s ease-in-out infinite;
}
@keyframes rewardPulse {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.15); }
}
.acct-progress__meta {
    color: var(--muted);
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin-bottom: 1.6rem;
}
.acct-progress__meta strong { color: var(--green-600); }
.dot-sep {
    width: 4px; height: 4px;
    background: var(--muted);
    border-radius: 50%;
    opacity: 0.4;
}

.acct-banner {
    background: var(--green-600);
    color: var(--cream-100);
    border-radius: 18px;
    padding: 1.4rem 1.8rem;
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    border: 1px solid var(--gold-500);
}
.acct-banner h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--gold-400);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}
.acct-banner p { color: rgba(245, 233, 208, 0.78); font-size: 0.92rem; }
@media (max-width: 600px) {
    .acct-banner { flex-direction: column; align-items: flex-start; }
}

.acct-section { margin-bottom: 2.5rem; }
.acct-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--green-600);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.acct-details {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(176, 137, 47, 0.16);
    padding: 0.6rem 1.4rem;
    list-style: none;
}
.acct-details li {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px dashed rgba(176, 137, 47, 0.18);
    font-size: 0.95rem;
    color: var(--muted);
}
.acct-details li:last-child { border-bottom: 0; }
.acct-details li strong { color: var(--ink); font-weight: 600; }

.acct-orders { display: grid; gap: 0.8rem; }
.acct-order {
    background: #fff;
    border: 1px solid rgba(176, 137, 47, 0.16);
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
}
.acct-order__ref {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    color: var(--green-600);
    font-size: 1.05rem;
}
.acct-order__date {
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}
.acct-order__meta {
    font-size: 0.88rem;
    color: var(--ink-soft);
}
.acct-order__meta .reward {
    background: rgba(214, 169, 81, 0.18);
    color: var(--gold-700);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-left: 0.5rem;
    vertical-align: middle;
}
.acct-order__total {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    color: var(--gold-600);
    font-size: 1.2rem;
    text-align: right;
}
.acct-order__status {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.acct-ledger {
    list-style: none;
    background: #fff;
    border: 1px solid rgba(176, 137, 47, 0.16);
    border-radius: 14px;
    overflow: hidden;
}
.acct-ledger li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.9rem 1.4rem;
    border-bottom: 1px dashed rgba(176, 137, 47, 0.16);
    font-size: 0.92rem;
}
.acct-ledger li:last-child { border-bottom: 0; }
.acct-ledger li.is-positive .change { color: var(--green-500); }
.acct-ledger li.is-negative .change { color: var(--tomato, #C44531); }
.acct-ledger .change { font-weight: 800; font-family: 'Playfair Display', Georgia, serif; font-size: 1.05rem; }
.acct-ledger .reason { color: var(--ink-soft); font-weight: 500; }
.acct-ledger .when { color: var(--muted); font-size: 0.82rem; }
.acct-empty { color: var(--muted); padding: 1rem 1.4rem; font-style: italic; }

/* ===== EMAIL VERIFICATION BANNER ===== */
.acct-verify-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(232, 146, 14, 0.1);
    border: 1.5px solid rgba(232, 146, 14, 0.45);
    border-radius: 14px;
    padding: 1rem 1.3rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.acct-verify-banner__icon {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(232, 146, 14, 0.15);
    color: #b06c00;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.acct-verify-banner__text {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.acct-verify-banner__text strong {
    color: #7a4d00;
    font-size: 0.95rem;
    display: block;
}
.acct-verify-banner__text span { color: var(--muted); font-size: 0.88rem; }
.acct-verify-banner__text em { font-style: normal; font-weight: 600; color: var(--ink-soft); }
.acct-verify-banner__btn {
    background: #E8920E;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.acct-verify-banner__btn:hover:not(:disabled) { background: #c97c0c; }
.acct-verify-banner__btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ===== DANGER ZONE ===== */
.acct-danger {
    border-top: 1px dashed rgba(196, 69, 49, 0.25);
    padding-top: 2rem;
    margin-top: 1rem;
}
.acct-danger h2 {
    color: var(--tomato, #C44531);
    font-size: 1.1rem;
}
.acct-danger p {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
    max-width: 540px;
}
.btn--danger-outline {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    border: 2px solid rgba(196, 69, 49, 0.45);
    color: var(--tomato, #C44531);
    background: transparent;
    cursor: pointer;
    transition: all 0.25s var(--ease);
}
.btn--danger-outline:hover {
    background: var(--tomato, #C44531);
    border-color: var(--tomato, #C44531);
    color: #fff;
}

/* ===== CONFIRM MODAL ===== */
.acct-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
}
.acct-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.acct-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 31, 20, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}
.acct-modal__box {
    position: relative;
    z-index: 1;
    background: var(--cream-50, #FAF6EB);
    border-radius: 22px;
    padding: 2rem 2.2rem;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 30px 70px rgba(0,0,0,0.3);
    border: 1px solid rgba(196, 69, 49, 0.2);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.3s var(--ease);
}
.acct-modal.is-open .acct-modal__box {
    transform: translateY(0) scale(1);
}
.acct-modal__box h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    color: var(--tomato, #C44531);
    font-weight: 800;
    margin-bottom: 0.7rem;
}
.acct-modal__box p {
    color: var(--ink-soft, #2C3D31);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}
.acct-modal__confirm-text {
    font-weight: 600;
    color: var(--ink, #0E1F14);
    margin-bottom: 0.5rem !important;
}
.acct-modal__actions {
    display: flex;
    gap: 0.7rem;
    margin-top: 1.3rem;
}
.btn--ghost-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.3rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    border: 2px solid rgba(14, 31, 20, 0.2);
    color: var(--ink-soft, #2C3D31);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    flex: 1;
}
.btn--ghost-dark:hover {
    background: rgba(14, 31, 20, 0.06);
    border-color: var(--green-600, #1E3D28);
}
.acct-modal__actions .btn--danger {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.3rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    background: var(--tomato, #C44531);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.acct-modal__actions .btn--danger:hover:not(:disabled) { background: #a83a29; }
.acct-modal__actions .btn--danger:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 600px) {
    .acct-order { grid-template-columns: 1fr; gap: 0.4rem; }
    .acct-order__total { text-align: left; }
}
