/* ── Account Layout ── */
.acct-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2rem);
    align-items: start;
    min-height: calc(100vh - 160px);
}

/* ── Sidebar ── */
.acct-sidebar {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    overflow: hidden;
    position: sticky;
    top: 90px;
}

.acct-sidebar-top {
    padding: 28px 22px 22px;
    background: linear-gradient(150deg, #f0fdf9 0%, #eef3ff 100%);
    border-bottom: 1px solid #eee;
    text-align: center;
}

.acct-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6ee7b7, #3fbcac, #3a7bd5, #3d3370);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    letter-spacing: 1px;
}

.acct-sidebar-name {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin-bottom: 3px;
}

.acct-sidebar-email {
    font-size: 12px;
    color: #888;
    word-break: break-all;
    margin-bottom: 8px;
}

.acct-sidebar-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(63, 188, 172, 0.12);
    color: #2a9d8f;
}

/* ── Sidebar Nav ── */
.acct-nav {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
}

.acct-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.acct-nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.acct-nav-link:hover {
    background: #f7f8fa;
    color: #111;
}

.acct-nav-link.active {
    background: linear-gradient(90deg, rgba(63, 188, 172, 0.08) 0%, transparent 100%);
    color: #3fbcac;
    font-weight: 600;
    border-left-color: #3fbcac;
}

.acct-nav-link.active svg {
    opacity: 1;
}

.acct-nav-logout {
    margin-top: 4px;
    border-top: 1px solid #f0f0f0;
    color: #c0392b;
}

.acct-nav-logout:hover {
    background: #fff5f5;
    color: #c0392b;
}

/* ── Main Content ── */
.acct-main {
    padding-left: 32px;
    min-width: 0;
}

.acct-section {
    /* container for all section content */
}

.acct-page-header {
    margin-bottom: 20px;
}

.acct-page-header h1 {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: #111;
    margin: 0;
}

/* ── Welcome Banner ── */
.acct-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #6ee7b7 0%, #3fbcac 40%, #3a7bd5 80%, #3d3370 100%);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 24px;
    color: #fff;
}

.acct-welcome-greeting {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}

.acct-welcome-since {
    font-size: 13px;
    opacity: 0.85;
    margin: 0;
}

/* ── Stat Cards ── */
.acct-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.acct-stat {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.acct-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #111;
    line-height: 1;
    margin-bottom: 6px;
}

.acct-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ── Section Subheader ── */
.acct-section-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.acct-section-subheader h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #111;
}

.acct-view-all {
    font-size: 13px;
    font-weight: 600;
    color: #3fbcac;
    text-decoration: none;
}

.acct-view-all:hover {
    color: #2a9d8f;
    text-decoration: underline;
}

/* ── Empty State ── */
.acct-empty {
    text-align: center;
    padding: 48px 20px;
    color: #999;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 12px;
}

/* ── Order Rows ── */
.acct-order {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
}

.acct-order-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    background: #fafafa;
    transition: background 0.15s;
    user-select: none;
    gap: 12px;
}

.acct-order-hd:hover {
    background: #f2f3f5;
}

.acct-order-hd-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.acct-order-id {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acct-order-meta {
    font-size: 12px;
    color: #999;
}

.acct-order-hd-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.acct-order-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-complete {
    background: #d1fae5;
    color: #065f46;
}

.acct-order-price {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
}

.acct-order-chevron {
    width: 20px;
    height: 20px;
    color: #aaa;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.acct-order-chevron svg {
    width: 20px;
    height: 20px;
}

.acct-order-hd.open .acct-order-chevron {
    transform: rotate(180deg);
}

/* ── Order Body (collapsible) ── */
.acct-order-bd {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.acct-order-bd.open {
    max-height: 600px;
}

.acct-order-items {
    list-style: none;
    margin: 0;
    padding: 14px 18px 0;
}

.acct-order-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13px;
    color: #444;
    border-bottom: 1px solid #f2f2f2;
}

.acct-order-items li:last-child {
    border-bottom: none;
}

.acct-order-ship {
    margin: 12px 18px;
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px 14px;
}

.acct-order-ship-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 4px;
}

.acct-order-ship-addr {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

.acct-order-foot {
    padding: 10px 18px 14px;
    font-size: 12px;
    color: #888;
}

/* ── Account Detail Cards ── */
.acct-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 16px;
}

.acct-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.acct-card-sub {
    font-size: 13px;
    color: #777;
    margin: 0 0 14px;
}

.acct-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.acct-form-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.acct-field {
    display: flex;
    flex-direction: column;
}

.acct-field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 6px;
}

.acct-field input {
    padding: 11px 13px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
    color: #111;
}

.acct-field input:focus {
    outline: none;
    border-color: #3fbcac;
    box-shadow: 0 0 0 3px rgba(63, 188, 172, 0.1);
}

/* ── Form Actions ── */
.acct-form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.acct-btn-primary {
    padding: 11px 22px;
    border: none;
    border-radius: 9px;
    background: linear-gradient(135deg, #6ee7b7, #3fbcac, #3a7bd5, #3d3370);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

.acct-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(63, 188, 172, 0.28);
}

/* ── Messages ── */
.acct-msg {
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    min-height: 20px;
}

.acct-msg.success {
    color: #065f46;
}

.acct-msg.error {
    color: #c0392b;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .acct-layout {
        grid-template-columns: 220px 1fr;
        gap: 0;
    }

    .acct-stats {
        grid-template-columns: 1fr 1fr;
    }

    .acct-form-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .acct-layout {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .acct-sidebar {
        position: static;
        margin-bottom: 20px;
    }

    .acct-main {
        padding-left: 0;
    }

    .acct-stats {
        grid-template-columns: 1fr 1fr;
    }

    .acct-form-grid {
        grid-template-columns: 1fr;
    }

    .acct-form-grid-3 {
        grid-template-columns: 1fr;
    }

    .acct-welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .acct-order-hd-right {
        gap: 8px;
    }

    .acct-order-badge {
        display: none;
    }
}

@media (max-width: 480px) {
    .acct-stats {
        grid-template-columns: 1fr;
    }
}
