/*
 * Профиль покупателя, история заказов и настройки учётной записи.
 */
/* Личный кабинет: профиль всегда доступен, настройка пароля раскрывается по запросу. */
.tv-account-settings {
    max-width: 850px;
    margin: 0 0 42px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.tv-account-panel {
    min-width: 0;
    background: #fffdf8;
    border: 1px solid #eaded2;
    border-radius: 15px;
    padding: 28px;
    box-shadow: 0 12px 32px rgba(82,60,47,.035);
    scroll-margin-top: 110px;
}
.tv-account-panel-head h2 {
    font: normal 27px Georgia,serif;
    color: #73574e;
    margin: 10px 0;
}
.tv-account-panel-head p {
    color: #796c65;
    font: 14px/1.7 Georgia,serif;
    margin: 0 0 22px;
}
.tv-account-settings-form {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px 20px;
    align-items: start;
}
.tv-account-settings-form label {
    display: block;
    min-width: 0;
    color: #5f504a;
    font: 600 13px/1.45 'Trebuchet MS',Arial,sans-serif;
}
.tv-account-settings-form input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-top: 7px;
    border: 1px solid #dfd3c6!important;
    border-radius: 8px!important;
    background: #fff!important;
    min-height: 46px;
    color: #463c38;
}
.tv-account-settings-form .btn {
    justify-self: start;
    grid-column: 1/-1;
    border-radius: 8px;
    background: #906b64;
    border-color: #906b64;
}
.tv-account-settings-form .btn:hover {
    background: #795750;
    border-color: #795750;
}
.tv-account-security {
    border: 1px solid #eaded2;
    border-radius: 15px;
    background: #fffdf8;
    scroll-margin-top: 110px;
    overflow: hidden;
}
.tv-account-security>summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    cursor: pointer;
    list-style: none;
    padding: 20px 26px;
    color: #73574e;
    user-select: none;
    transition: background .18s ease;
}
.tv-account-security>summary::-webkit-details-marker {
    display: none;
}
.tv-account-security>summary:hover,.tv-account-security[open]>summary {
    background: #faf2ea;
}
.tv-account-security-summary {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.tv-account-security-summary strong {
    font: normal 21px Georgia,serif;
}
.tv-account-security-summary small {
    font: 13px/1.5 'Trebuchet MS',Arial,sans-serif;
    color: #83716a;
}
.tv-account-security-action {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    font: 600 13px 'Trebuchet MS',Arial,sans-serif;
    color: #856158;
}
.tv-account-security-chevron {
    font-size: 18px;
    transition: transform .18s ease;
}
.tv-account-security[open] .tv-account-security-chevron {
    transform: rotate(180deg);
}
.tv-account-security-content {
    border-top: 1px solid #eaded2;
    padding: 24px 26px 28px;
}
.tv-account-security-content>p {
    color: #796c65;
    font: 14px/1.6 Georgia,serif;
    margin: 0 0 20px;
}
.tv-account-security-content .tv-account-settings-form {
    max-width: 680px;
}
.account-order-history {
    scroll-margin-top: 110px;
}
/* Адаптация элементов к доступной ширине экрана. */
@media(max-width:650px) {
    .tv-account-settings-form {
        grid-template-columns: 1fr;
    }
    .tv-account-panel {
        padding: 22px;
    }
    .tv-account-security>summary {
        padding: 18px 20px;
    }
    .tv-account-security-content {
        padding: 22px 20px;
    }
    .tv-account-security-action {
        gap: 5px;
    }
    .tv-account-security-summary strong {
        font-size: 19px;
    }
    .tv-account-security-summary small {
        font-size: 12px;
    }
}
@media(prefers-reduced-motion:reduce) {
    .tv-account-security>summary,.tv-account-security-chevron {
        transition: none;
    }
}
/* Двухколоночный кабинет: профиль слева, история справа. */
.account-dashboard .tv-account-workspace {
    display: grid;
    grid-template-columns: minmax(0,0.92fr) minmax(0,1.18fr);
    align-items: start;
    gap: 24px;
    margin-top: 24px;
}
.account-dashboard .tv-account-settings {
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    gap: 16px;
}
.account-dashboard .tv-account-panel {
    padding: 24px;
}
.account-dashboard .tv-account-settings-form {
    grid-template-columns: minmax(0,1fr);
    gap: 14px;
}
.account-dashboard .tv-account-panel-head h2 {
    margin: 7px 0;
    font-size: 26px;
}
.account-dashboard .tv-account-panel-head p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
}
.account-dashboard .tv-account-settings-form input {
    min-height: 43px;
    margin-top: 5px;
}
.account-dashboard .tv-account-settings-form .btn {
    grid-column: 1;
    max-width: 100%;
    min-height: 44px;
    margin-top: 4px;
}
.account-dashboard .account-order-history {
    min-width: 0;
    padding: 24px;
    background: #fffdf8;
    border: 1px solid #eaded2;
    border-radius: 15px;
    box-shadow: 0 12px 32px rgba(82,60,47,.035);
}
.account-dashboard .tv-order-history-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 18px;
}
.account-dashboard .tv-order-history-head h2 {
    font-size: 26px;
    margin: 0;
}
.account-dashboard .tv-order-history-count {
    font: 600 12px/1.4 'Trebuchet MS',Arial,sans-serif;
    color: #927970;
    white-space: nowrap;
}
.account-dashboard .tv-account-orders {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.account-dashboard .tv-account-order {
    min-width: 0;
    border: 1px solid #eaded2;
    background: #fffefa;
    border-radius: 11px;
    padding: 16px 17px;
    transition: border-color .2s ease,box-shadow .2s ease;
}
.account-dashboard .tv-account-order:hover {
    border-color: #d6bfb4;
    box-shadow: 0 6px 18px rgba(88,62,50,.055);
}
.account-dashboard .tv-account-order-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 11px;
}
.account-dashboard .tv-account-order-number {
    display: block;
    overflow-wrap: anywhere;
    font: 700 15px/1.35 'Trebuchet MS',Arial,sans-serif;
    color: #684e49;
}
.account-dashboard .tv-account-order-date {
    display: block;
    margin-top: 5px;
    color: #948179;
    font: 12px/1.45 'Trebuchet MS',Arial,sans-serif;
}
.account-dashboard .tv-account-order-top .status-pill {
    flex-shrink: 0;
    max-width: 52%;
    white-space: normal;
    text-align: center;
}
.account-dashboard .tv-account-order-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee4d9;
}
.account-dashboard .tv-account-order-payment {
    min-width: 0;
    color: #81716a;
    font: 12px/1.5 'Trebuchet MS',Arial,sans-serif;
    overflow-wrap: anywhere;
}
.account-dashboard .tv-account-order-total {
    font: 700 17px/1.3 Georgia,serif;
    color: #75594f;
    white-space: nowrap;
}
.account-dashboard .tv-account-order-link {
    display: inline-block;
    margin-top: 12px;
    font: 600 13px 'Trebuchet MS',Arial,sans-serif;
    color: #855e58;
    text-decoration: none;
}
.account-dashboard .tv-account-order-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.account-dashboard .account-no-orders {
    padding: 12px 0 8px;
}
@media(max-width:980px) {
    .account-dashboard .tv-account-workspace {
        grid-template-columns: minmax(0,1fr);
        gap: 18px;
    }
    .account-dashboard .tv-account-settings-form {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .account-dashboard .tv-account-settings-form .btn {
        grid-column: 1/-1;
    }
    .account-dashboard .tv-account-security-content .tv-account-settings-form {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}
@media(max-width:650px) {
    .account-dashboard .tv-account-workspace {
        gap: 15px;
    }
    .account-dashboard .tv-account-panel,.account-dashboard .account-order-history {
        padding: 19px;
    }
    .account-dashboard .tv-account-settings-form,.account-dashboard .tv-account-security-content .tv-account-settings-form {
        grid-template-columns: minmax(0,1fr);
    }
    .account-dashboard .tv-account-order {
        padding: 14px;
    }
    .account-dashboard .tv-account-order-bottom {
        flex-wrap: wrap;
    }
    .account-dashboard .tv-account-order-total {
        margin-left: auto;
    }
    .account-dashboard .tv-order-history-head h2 {
        font-size: 24px;
    }
}
@media(prefers-reduced-motion:reduce) {
    .account-dashboard .tv-account-order {
        transition: none;
    }
}
.tv-account-profile-form input[readonly] {
    background: #fcf9f5;
    color: #614e44;
    cursor: default;
    box-shadow: none;
}
.tv-account-profile-form.is-editing input:not([readonly]) {
    background: #fff;
    border-color: #cda995;
}
.tv-profile-action-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.tv-profile-action-bar [hidden] {
    display: none!important;
}
