.account-page {
    min-height: 100vh;
    padding: 125px 0 90px;
}

.account-shell {
    max-width: 1100px;
    margin: 0 auto;
}

.account-header {
    margin-bottom: 28px;
}

.account-header h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(38px, 6vw, 66px);
    letter-spacing: -2px;
}

.account-header p {
    max-width: 700px;
    color: #9eacb9;
    line-height: 1.7;
}

.account-card {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 21px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.018)
        );
    backdrop-filter: blur(18px);
}

.account-form {
    display: grid;
    gap: 18px;
}

.account-form-field {
    display: grid;
    gap: 7px;
}

.account-form-field label {
    color: #dce6ef;
    font-size: 13px;
    font-weight: 800;
}

.account-form input,
.account-form textarea,
.account-form select {
    width: 100%;
    min-height: 50px;
    padding: 11px 14px;
    color: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: rgba(5, 10, 17, 0.84);
}

.account-form textarea {
    min-height: 120px;
    resize: vertical;
}

.account-form input:focus,
.account-form textarea:focus,
.account-form select:focus {
    border-color: rgba(255, 65, 65, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 45, 45, 0.1);
}

.account-errors {
    margin: 6px 0 0;
    color: #ff9f9f;
    font-size: 12px;
}

.account-help {
    color: #8493a1;
    font-size: 12px;
    line-height: 1.5;
}

.account-submit,
.account-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    color: #fff;
    border: 0;
    border-radius: 12px;
    background: var(--red);
    font-weight: 900;
    cursor: pointer;
}

.account-button--secondary {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.account-auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
}

.account-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.account-sidebar {
    position: sticky;
    top: 105px;
}

.account-navigation {
    display: grid;
    gap: 8px;
}

.account-navigation a,
.account-navigation button {
    display: flex;
    width: 100%;
    min-height: 45px;
    align-items: center;
    padding: 0 14px;
    color: #dce6ef;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
    text-align: left;
    cursor: pointer;
}

.account-navigation form {
    margin: 0;
}

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

.account-stat {
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.025);
}

.account-stat span {
    display: block;
    color: #8795a2;
    font-size: 12px;
}

.account-stat strong {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: 25px;
}

.account-orders {
    display: grid;
    gap: 13px;
}

.account-order {
    display: grid;
    grid-template-columns:
        minmax(110px, 0.7fr)
        minmax(160px, 1fr)
        minmax(130px, 0.7fr)
        auto;
    gap: 15px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.022);
}

.account-order strong {
    color: #fff;
}

.account-order small {
    color: #8e9ba8;
}

.account-status {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 999px;
    color: #dfe9f0;
    background: rgba(255, 255, 255, 0.06);
    font-size: 11px;
    font-weight: 800;
}

.account-order-items {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.account-order-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.022);
}

@media (max-width: 820px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
    }

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

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


/* ACCOUNT ORDER DETAILS START */

.account-order-customer {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom:
        1px solid rgba(255, 255, 255, 0.09);
}

.account-order-customer h2,
.account-order-items-title {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    line-height: 1.25;
}

.account-order-details {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.account-order-details > div {
    min-width: 0;
    padding: 14px 16px;
    border:
        1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background:
        rgba(255, 255, 255, 0.025);
}

.account-order-details dt {
    margin-bottom: 5px;
    color: #8fa5b8;
    font-size: 12px;
    font-weight: 700;
}

.account-order-details dd {
    margin: 0;
    color: #ffffff;
    overflow-wrap: anywhere;
    font-size: 15px;
    font-weight: 800;
}

.account-order-details a {
    color: #ffffff;
}

.account-order-comment {
    padding: 16px;
    border:
        1px solid rgba(117, 182, 223, 0.25);
    border-radius: 12px;
    background:
        rgba(117, 182, 223, 0.07);
}

.account-order-comment--manager {
    border-color:
        rgba(115, 214, 139, 0.28);
    background:
        rgba(115, 214, 139, 0.08);
}

.account-order-comment strong {
    color: #ffffff;
}

.account-order-comment p {
    margin: 8px 0 0;
    color: #cbd8e3;
    line-height: 1.6;
}

.account-order-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    margin-bottom: 28px;
}

.account-order-summary p {
    margin: 0;
}

.account-order-items-title {
    margin-bottom: 16px;
}

@media (max-width: 650px) {
    .account-order-details {
        grid-template-columns: 1fr;
    }

    .account-order-summary {
        display: grid;
        gap: 8px;
    }
}

/* ACCOUNT ORDER DETAILS END */

/* ACCOUNT HOME NAVIGATION START */

/*
 * Верхний логотип личного кабинета.
 * Используется существующий компонент .brand
 * из общего clean-v3.css.
 */
.account-topbar {
    position: absolute;
    z-index: 40;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
}

.account-topbar__inner {
    display: flex;
    min-height: 100px;
    align-items: center;
}

.account-home-brand {
    position: relative;
    z-index: 1;
    pointer-events: auto;
    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}

.account-home-brand:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.account-home-brand:focus-visible {
    outline:
        2px solid rgba(117, 182, 223, 0.9);
    outline-offset: 7px;
    border-radius: 10px;
}

/*
 * Пятая кнопка сохраняет размеры остальных
 * пунктов бокового меню, но слегка выделяется
 * как переход за пределы личного кабинета.
 */
.account-navigation__home {
    border-color:
        rgba(117, 182, 223, 0.34) !important;
    background:
        rgba(117, 182, 223, 0.07) !important;
}

.account-navigation__home:hover {
    border-color:
        rgba(117, 182, 223, 0.7) !important;
    background:
        rgba(117, 182, 223, 0.15) !important;
}

/*
 * На небольших экранах логотип становится
 * компактнее и не мешает заголовку кабинета.
 */
@media (max-width: 650px) {
    .account-topbar__inner {
        min-height: 82px;
    }

    .account-home-brand img {
        width: 44px;
        height: 44px;
    }

    .account-home-brand .brand__text strong {
        font-size: 18px;
    }

    .account-home-brand .brand__text small {
        font-size: 8px;
    }

    .account-page {
        padding-top: 105px;
    }
}

/* ACCOUNT HOME NAVIGATION END */


/* KOSMOSTORE REGISTRATION FORM FIX 2026-07-21 */
.account-form-field label:has(input[type="checkbox"]) {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    line-height: 1.55;
    cursor: pointer;
}

.account-form input[type="checkbox"] {
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    border-radius: 4px !important;
    accent-color: #ef443b;
}

.account-form-field label:has(input[type="checkbox"]) a {
    color: #ff8b82;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.account-submit:disabled,
.product-card__cart-control .add-to-cart:disabled {
    opacity: .48 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

@media (max-width: 620px) {
    .account-page {
        padding-top: 92px;
    }

    .account-card {
        padding: 19px;
    }
}
