:root {
    --account-bg: #fcf8f2;
    --account-surface: rgba(255, 255, 255, 0.94);
    --account-surface-soft: rgba(255, 250, 244, 0.92);
    --account-border: rgba(138, 90, 43, 0.14);
    --account-border-strong: rgba(138, 90, 43, 0.24);
    --account-ink: #25170d;
    --account-muted: #6c594a;
    --account-accent: #8a5a2b;
    --account-accent-strong: #6f4420;
    --account-accent-soft: rgba(138, 90, 43, 0.08);
    --account-success: #2f6c45;
    --account-danger: #b9382f;
    --account-shadow: 0 24px 60px rgba(40, 24, 10, 0.08);
    --account-shadow-soft: 0 18px 34px rgba(40, 24, 10, 0.06);
}

.header-actions .account-btn,
.header-right .account-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
    color: var(--account-accent-strong);
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(247, 237, 225, 0.96));
    border: 1px solid var(--account-border);
    box-shadow: 0 12px 28px rgba(56, 35, 15, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    overflow: hidden;
}

.header-actions .account-btn:hover,
.header-right .account-btn:hover {
    transform: translateY(-1px);
    border-color: var(--account-border-strong);
    box-shadow: 0 16px 34px rgba(56, 35, 15, 0.12);
    background: linear-gradient(180deg, rgba(255, 253, 249, 1), rgba(250, 242, 232, 0.98));
}

.header-actions .account-btn svg,
.header-right .account-btn svg {
    width: 18px;
    height: 18px;
}

.header-actions .account-btn.is-authenticated::after,
.header-right .account-btn.is-authenticated::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--account-success);
    box-shadow: 0 0 0 3px rgba(255, 250, 244, 0.95);
}

.mobile-account-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    color: #fffaf4;
    background: linear-gradient(135deg, var(--account-accent), #b2743c);
    box-shadow: 0 16px 30px rgba(68, 39, 15, 0.16);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.mobile-account-link svg {
    width: 18px;
    height: 18px;
}

.customer-auth-page,
.customer-dashboard-page {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--account-ink);
    background:
        radial-gradient(circle at top left, rgba(199, 155, 99, 0.22), transparent 28%),
        radial-gradient(circle at 85% 12%, rgba(245, 130, 32, 0.08), transparent 22%),
        linear-gradient(180deg, #fcf8f2 0%, #f4ecdf 50%, #fffaf4 100%);
}

.customer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.customer-auth-shell {
    padding: 28px 0 56px;
}

.customer-auth-topbar,
.account-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    margin-bottom: 28px;
    border: 1px solid var(--account-border);
    border-radius: 28px;
    background: rgba(255, 251, 247, 0.84);
    backdrop-filter: blur(16px);
    box-shadow: var(--account-shadow-soft);
}

.customer-brand,
.account-brand {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}

.customer-brand strong,
.account-brand strong {
    font-size: 24px;
    letter-spacing: -0.03em;
}

.customer-brand span,
.account-brand span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--account-accent);
    font-weight: 700;
}

.customer-auth-link,
.account-nav-link,
.account-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.customer-auth-link,
.account-nav-link {
    color: var(--account-accent-strong);
    background: var(--account-surface-soft);
    border: 1px solid var(--account-border);
}

.customer-auth-link:hover,
.account-nav-link:hover,
.account-logout:hover {
    transform: translateY(-1px);
}

.account-logout {
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #22150d, #6f4420);
    color: #fff8f1;
    box-shadow: 0 18px 28px rgba(43, 24, 10, 0.18);
}

.customer-auth-layout {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 460px);
    gap: 28px;
    align-items: stretch;
}

.customer-auth-aside,
.customer-auth-card,
.account-panel,
.account-hero {
    border: 1px solid var(--account-border);
    border-radius: 30px;
    background: var(--account-surface);
    box-shadow: var(--account-shadow);
}

.customer-auth-aside {
    padding: 34px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(199, 155, 99, 0.24), transparent 26%),
        linear-gradient(160deg, rgba(42, 24, 12, 0.98), rgba(96, 61, 31, 0.95) 58%, rgba(138, 90, 43, 0.88) 100%);
    color: #fff8f1;
}

.customer-auth-aside::after {
    content: "";
    position: absolute;
    inset: auto -90px -90px auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 243, 229, 0.22), transparent 65%);
}

.customer-auth-chip,
.account-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.customer-auth-chip {
    background: rgba(255, 255, 255, 0.12);
    color: #f8ddbd;
}

.account-chip {
    background: rgba(138, 90, 43, 0.09);
    color: var(--account-accent-strong);
}

.customer-auth-aside h1,
.account-hero h1 {
    margin: 18px 0 10px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.customer-auth-aside p,
.account-hero p {
    margin: 0;
    color: rgba(255, 245, 235, 0.82);
    line-height: 1.72;
    max-width: 56ch;
}

.customer-auth-list {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.customer-auth-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 248, 241, 0.88);
}

.customer-auth-list svg {
    width: 18px;
    height: 18px;
    color: #f3d2a7;
    flex: 0 0 auto;
    margin-top: 2px;
}

.customer-auth-card {
    padding: 30px;
}

.customer-auth-card h2,
.account-panel h2 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.customer-auth-card p,
.account-panel .section-note {
    margin: 8px 0 0;
    color: var(--account-muted);
    line-height: 1.65;
}

.customer-auth-status {
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.55;
}

.customer-auth-status.is-neutral {
    color: #6a5445;
    background: rgba(138, 90, 43, 0.07);
    border-color: rgba(138, 90, 43, 0.12);
}

.customer-auth-status.is-success {
    color: #205235;
    background: rgba(47, 108, 69, 0.08);
    border-color: rgba(47, 108, 69, 0.14);
}

.customer-auth-status.is-error {
    color: #8f2f28;
    background: rgba(185, 56, 47, 0.08);
    border-color: rgba(185, 56, 47, 0.14);
}

.customer-auth-tabs {
    display: inline-grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    padding: 6px;
    margin: 22px 0 18px;
    border-radius: 18px;
    background: rgba(138, 90, 43, 0.08);
}

.customer-auth-tab {
    min-height: 44px;
    border: none;
    border-radius: 14px;
    font: inherit;
    font-weight: 700;
    color: var(--account-muted);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.customer-auth-tab.is-active {
    color: var(--account-accent-strong);
    background: #fffdf9;
    box-shadow: 0 8px 18px rgba(48, 29, 10, 0.08);
}

.customer-auth-form[hidden] {
    display: none;
}

.customer-form-grid {
    display: grid;
    gap: 16px;
}

.customer-field {
    display: grid;
    gap: 8px;
}

.customer-field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--account-ink);
}

.customer-field input {
    min-height: 50px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(138, 90, 43, 0.18);
    background: #fffdfb;
    color: var(--account-ink);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.customer-field input:focus {
    outline: none;
    border-color: rgba(138, 90, 43, 0.45);
    box-shadow: 0 0 0 4px rgba(138, 90, 43, 0.1);
    background: #ffffff;
}

.customer-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.customer-btn,
.customer-btn-secondary {
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.customer-btn {
    border: none;
    color: #fff8f1;
    background: linear-gradient(135deg, var(--account-accent), #b2743c);
    box-shadow: 0 18px 28px rgba(68, 39, 15, 0.18);
}

.customer-btn:hover,
.customer-btn-secondary:hover {
    transform: translateY(-1px);
}

.customer-btn[disabled] {
    opacity: 0.75;
    cursor: wait;
    transform: none;
}

.customer-btn-secondary {
    border: 1px solid var(--account-border);
    color: var(--account-accent-strong);
    background: var(--account-surface-soft);
}

.customer-auth-note {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(138, 90, 43, 0.12);
    color: var(--account-muted);
    line-height: 1.65;
}

.customer-auth-note a {
    color: var(--account-accent-strong);
    font-weight: 700;
}

.account-dashboard-shell {
    padding: 28px 0 56px;
}

.account-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.account-hero {
    padding: 28px 30px;
    margin-bottom: 24px;
    background:
        radial-gradient(circle at top right, rgba(199, 155, 99, 0.2), transparent 24%),
        linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(249, 243, 236, 0.94));
}

.account-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.account-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(138, 90, 43, 0.08);
    color: var(--account-accent-strong);
    font-size: 13px;
    font-weight: 600;
}

.account-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.account-stat-card {
    padding: 18px 18px 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(138, 90, 43, 0.12);
    box-shadow: 0 12px 26px rgba(52, 31, 14, 0.06);
}

.account-stat-card strong {
    display: block;
    font-size: 28px;
    letter-spacing: -0.04em;
    margin-bottom: 6px;
}

.account-stat-card span {
    color: var(--account-muted);
    line-height: 1.55;
}

.account-grid {
    display: grid;
    gap: 24px;
}

.account-grid-main {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.account-panel {
    padding: 24px;
}

.account-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.account-panel-header small {
    display: block;
    margin-top: 4px;
    color: var(--account-muted);
    font-size: 13px;
}

.account-list,
.account-order-list,
.account-address-grid,
.account-wishlist-grid {
    display: grid;
    gap: 16px;
}

.account-list-item,
.account-address-card,
.account-order-card,
.wishlist-card,
.account-empty,
.account-signin-prompt {
    border-radius: 22px;
    border: 1px solid rgba(138, 90, 43, 0.12);
    background: rgba(255, 252, 248, 0.9);
    box-shadow: 0 14px 26px rgba(52, 31, 14, 0.05);
}

.account-list-item,
.account-address-card,
.account-order-card,
.account-empty,
.account-signin-prompt {
    padding: 18px;
}

.account-list-item strong,
.account-address-card strong,
.account-order-card strong,
.wishlist-info strong {
    display: block;
    font-size: 16px;
    letter-spacing: -0.02em;
}

.account-list-item span,
.account-address-card span,
.account-order-card span,
.account-empty p,
.account-signin-prompt p,
.wishlist-info p {
    display: block;
    margin-top: 6px;
    color: var(--account-muted);
    line-height: 1.6;
}

.account-order-head,
.wishlist-headline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.order-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.order-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.order-badge.status {
    color: #7b4b1f;
    background: rgba(138, 90, 43, 0.1);
}

.order-badge.payment {
    color: #205235;
    background: rgba(47, 108, 69, 0.1);
}

.order-item-preview {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.order-item-preview div {
    font-size: 14px;
    color: var(--account-muted);
}

.account-address-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.account-address-card.is-default {
    border-color: rgba(138, 90, 43, 0.28);
    box-shadow: 0 18px 30px rgba(52, 31, 14, 0.08);
}

.account-address-card .address-type {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(138, 90, 43, 0.08);
    color: var(--account-accent-strong);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.account-wishlist-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.wishlist-card {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wishlist-media {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(245, 236, 224, 0.82), rgba(236, 224, 210, 0.88));
}

.wishlist-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wishlist-info {
    display: grid;
    gap: 8px;
}

.wishlist-meta {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--account-accent);
    font-weight: 700;
}

.wishlist-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.wishlist-price .current {
    font-size: 18px;
    font-weight: 800;
    color: var(--account-accent-strong);
}

.wishlist-price .original {
    color: #a18a77;
    text-decoration: line-through;
}

.wishlist-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.wishlist-actions .wishlist-btn,
.wishlist-actions .wishlist-link {
    min-height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.wishlist-actions .wishlist-btn {
    border: none;
    color: #fff9f3;
    cursor: pointer;
    background: linear-gradient(135deg, var(--account-accent), #b2743c);
    box-shadow: 0 16px 26px rgba(68, 39, 15, 0.18);
}

.wishlist-actions .wishlist-link {
    border: 1px solid rgba(138, 90, 43, 0.16);
    color: var(--account-accent-strong);
    background: rgba(255, 250, 244, 0.88);
}

.wishlist-actions .wishlist-btn.secondary {
    color: var(--account-danger);
    background: rgba(185, 56, 47, 0.08);
    box-shadow: none;
}

.wishlist-actions .wishlist-btn:hover,
.wishlist-actions .wishlist-link:hover {
    transform: translateY(-1px);
}

.account-empty,
.account-signin-prompt {
    text-align: center;
}

.account-empty h3,
.account-signin-prompt h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.account-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.loading-state {
    display: grid;
    place-items: center;
    min-height: 40vh;
    text-align: center;
}

.loading-state strong {
    font-size: 20px;
    letter-spacing: -0.03em;
}

.loading-state p {
    margin: 8px 0 0;
    color: var(--account-muted);
}

@media (max-width: 980px) {
    .customer-auth-layout,
    .account-grid-main {
        grid-template-columns: 1fr;
    }

    .account-stat-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .customer-shell {
        width: min(100% - 24px, 100%);
    }

    .customer-auth-shell,
    .account-dashboard-shell {
        padding: 18px 0 40px;
    }

    .customer-auth-topbar,
    .account-topbar {
        padding: 16px;
        border-radius: 24px;
        flex-direction: column;
        align-items: stretch;
    }

    .account-topbar-actions {
        width: 100%;
    }

    .account-topbar-actions > * {
        flex: 1 1 auto;
    }

    .customer-auth-card,
    .customer-auth-aside,
    .account-panel,
    .account-hero {
        border-radius: 24px;
        padding: 20px;
    }

    .wishlist-actions {
        grid-template-columns: 1fr;
    }
}
