.account-layout {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: clamp(16px, 2.5vw, 28px);
}

.account-sidebar {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.account-panel { padding: clamp(16px, 2.6vw, 28px); }

.account-heading {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.035em;
}

.account-profile {
    display: grid;
    gap: 14px;
    margin-block: 20px;
}

.account-profile dt {
    color: var(--shop-muted);
    font-size: .825rem;
}

.account-profile dd {
    margin: 3px 0 0;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.account-editor {
    border-top: 1px solid var(--shop-line);
}

.account-editor summary {
    padding: 12px 0;
    color: var(--shop-blue);
    font-size: .925rem;
    font-weight: 700;
    cursor: pointer;
}

.account-editor summary:focus-visible {
    outline: 2px solid #2f62db;
    outline-offset: 3px;
}

.account-form {
    display: grid;
    justify-items: start;
    gap: 12px;
    padding-bottom: 14px;
}

.account-form label { width: 100%; font-size: .875rem; font-weight: 650; }

.account-form input:not([type="hidden"]) {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 9px 11px;
    border: 1px solid #bdcbe2;
    border-radius: 7px;
}

.account-form p {
    margin: 0;
    color: var(--shop-muted);
    font-size: .8rem;
    line-height: 1.5;
}

.account-support {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.account-support a {
    display: flex;
    align-items: center;
    min-height: 38px;
    color: var(--shop-blue);
    font-size: .925rem;
    font-weight: 650;
}

.account-support a:hover,
.account-logout button:hover { text-decoration: none; }

.account-logout {
    padding-inline: 4px;
}

.account-logout button {
    min-height: 42px;
    color: var(--shop-muted);
    font-size: .9rem;
    font-weight: 650;
}

.account-orders-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.account-no-orders {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 16px;
    min-height: 220px;
    padding: 20px 12px;
    border: 1px solid var(--shop-line);
    border-radius: 12px;
    background: var(--shop-soft);
    text-align: center;
}

.account-no-orders p { margin: 0; font-weight: 700; }

.account-order-list { margin: 0; padding: 0; list-style: none; }

.account-order-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(84px, auto) auto;
    align-items: center;
    gap: 12px 16px;
    padding: 15px 0;
    border-top: 1px solid var(--shop-line);
}

.account-order-summary,
.account-order-payment { overflow-wrap: anywhere; }

.account-order-summary p,
.account-order-payment p {
    margin: 3px 0 0;
    color: var(--shop-muted);
    font-size: .825rem;
}

.account-order-payment p { color: var(--shop-blue); font-weight: 650; }

.account-guest-note {
    margin: 17px 0 0;
    color: var(--shop-muted);
    font-size: .86rem;
    line-height: 1.6;
}


@media (max-width: 740px) {
    .account-layout { grid-template-columns: minmax(0, 1fr); }
    .account-orders { grid-row: 1; }
}

.account-settings { max-width: 850px; display: grid; gap: 16px; }
.account-settings .shop-title { margin: 0; }
.account-settings :is(h2,h3) { margin: 0 0 10px; color: var(--shop-ink); }
.account-settings h2 { font-size: 1.2rem; }
.account-settings h3 { font-size: 1rem; }
.account-settings p { line-height: 1.65; overflow-wrap: anywhere; }
.account-settings section { scroll-margin-top: 78px; }
.account-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; }
.account-shortcuts a { border: 1px solid #c5d1e1; color: #19468e; padding: 7px 12px; border-radius: 8px; text-decoration: none; background: #fff; }
.account-address { padding: 14px 0; border-bottom: 1px solid var(--shop-line); }
.account-address small { font-size: .76rem; color: #245d52; }
.account-settings .account-form { max-width: 440px; }
.account-settings .account-check { display: flex; gap: 7px; align-items: center; }
.account-settings .account-check input[type="checkbox"] { width: auto; margin: 0; }
.account-program-admin { width: min(920px,calc(100% - 32px)); margin: 28px auto; }
.account-program-admin a { color: #24518a; }
.account-program-admin h1,.account-program-admin h2,.account-program-admin h3 { margin: 12px 0; }
.account-program-admin section { background: #fff; border: 1px solid #d4deea; border-radius: 10px; padding: 18px; margin: 14px 0; }
.account-program-admin p,.account-program-admin li { line-height: 1.65; margin: 10px 0; }
.account-program-admin .program-period,.account-program-admin .program-actions { display: block; margin: 12px 0; }
.account-program-admin .program-tier { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: end; margin: 10px 0; }
.account-program-admin .program-tier label { display: grid; gap: 4px; }
.account-program-admin input:not([type=checkbox]),.account-program-admin button { min-height: 36px; padding: 5px 8px; border: 1px solid #b9c6d3; border-radius: 5px; }
.account-program-admin input { min-width: 0; }
@media(max-width:640px) { .account-program-admin .program-tier { grid-template-columns: minmax(0,1fr) minmax(0,1fr); padding-bottom: 12px; border-bottom: 1px solid #dae2eb; } }

@media (max-width: 440px) {
    .account-order-list li { grid-template-columns: minmax(0, 1fr) minmax(76px, auto); }
    .account-order-list li > a { grid-column: 1 / -1; justify-self: start; }
}

.account-logout, .account-guest-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid #dce4ef; }
.account-guest-note { display: flex; justify-content: flex-end; }
.account-order-payment .member-pill { margin-top: 4px; }
.account-terms { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #dce4ef; border-radius: 8px; font-size: .875rem; cursor: pointer; }
.account-terms input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--site-blue, #0033cc); }
