.account-side {
    position: sticky;
    top: 1rem;
}

.account-page {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    margin: 1.25rem 0 2rem;
}

.account-sidebar,
.account-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.account-sidebar {
    position: sticky;
    top: 1rem;
    padding: 1rem;
}

.account-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.account-sidebar-user strong,
.account-sidebar-user span {
    display: block;
}

.account-sidebar-user span {
    color: var(--muted);
    font-size: 0.88rem;
}

.account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    color: var(--brand);
    background: #fff1f2;
    font-size: 1.45rem;
    flex: 0 0 auto;
}

.account-nav {
    display: grid;
    gap: 0.35rem;
    margin-top: 1rem;
}

.account-nav a,
.account-nav button {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.7rem 0.75rem;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    background: transparent;
    text-decoration: none;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.account-nav a:hover,
.account-nav a.is-active,
.account-nav button:hover {
    color: var(--brand-dark);
    background: #fff1f2;
}

.account-logout-form {
    margin: 0;
}

.account-nav i {
    width: 1.1rem;
    text-align: center;
}

.account-main {
    display: grid;
    min-width: 0;
    gap: 1rem;
}

.account-panel {
    padding: clamp(1rem, 2vw, 1.35rem);
    scroll-margin-top: 1rem;
}

.account-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.account-section-head h1,
.account-section-head h2 {
    margin: 0;
    font-weight: 800;
}

.account-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.account-stat-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #f8fafc;
    text-decoration: none;
}

.account-stat-card:hover {
    border-color: #f1aeb5;
    color: var(--ink);
    background: #fff7f7;
}

.account-stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.account-stat-card strong {
    color: var(--brand-dark);
    font-size: 1.7rem;
    line-height: 1;
}

.account-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    color: #fff !important;
    background: var(--brand);
}

.account-placeholder {
    padding: 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: var(--muted);
    background: #f8fafc;
}

.account-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

@media (max-width: 991.98px) {
    .account-page {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-sidebar {
        position: static;
    }

    .account-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .account-page {
        gap: 0.75rem;
        margin-top: 0.75rem;
    }

    .account-sidebar,
    .account-panel {
        border-radius: 10px;
    }

    .account-sidebar {
        padding: 0.85rem;
    }

    .account-sidebar-user {
        min-width: 0;
    }

    .account-sidebar-user > div {
        min-width: 0;
    }

    .account-sidebar-user strong,
    .account-sidebar-user span {
        overflow-wrap: anywhere;
    }

    .account-nav {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.25rem;
    }

    .account-nav a,
    .account-nav button {
        padding: 0.65rem;
    }

    .account-panel {
        padding: 0.9rem;
    }

    .account-section-head {
        gap: 0.65rem;
    }

    .account-section-head .btn {
        width: 100%;
    }

    .account-stat-grid {
        gap: 0.65rem;
    }

    .account-stat-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.65rem;
        padding: 0.8rem;
    }

    .account-stat-card strong {
        font-size: 1.4rem;
    }

    .order-mini-list a {
        flex-wrap: wrap;
    }

    .account-actions {
        justify-content: stretch;
    }
}

@media (max-width: 420px) {
    .account-stat-card {
        grid-template-columns: 2.15rem minmax(0, 1fr) auto;
        column-gap: 0.45rem;
        padding: 0.65rem;
    }

    .account-stat-card > span:not(.account-stat-icon) {
        min-width: 0;
        font-size: 0.86rem;
        line-height: 1.3;
    }

    .account-stat-card > strong {
        min-width: 1ch;
        padding-left: 0.15rem;
        justify-self: end;
        font-size: 1.2rem;
        text-align: right;
    }

    .account-stat-icon {
        width: 2.15rem;
        height: 2.15rem;
    }
}
