/* Личный кабинет (все страницы контроллера Account). Цвета — из палитры сайта (переменные в site.css) */

/* ===== Общие элементы страниц кабинета ===== */
.page-account h1 {
    font-weight: 700;
    color: var(--hc-primary);
}

/* Карточки */
.page-account .card.shadow-container {
    border: 0;
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow-soft);
}

.page-account .card-header {
    padding: 1rem 1.5rem;
    border: 0;
    border-radius: var(--hc-radius) var(--hc-radius) 0 0 !important;
    background: var(--hc-sky-soft);
    color: var(--hc-primary);
    font-size: 1.1rem;
    font-weight: 700;
}

.page-account .card-body {
    padding: 1.4rem;
}

.page-account .card-title {
    margin-bottom: .75rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--hc-primary);
}

/* Кнопки */
.page-account .btn {
    border-radius: 999px;
    font-weight: 600;
}

.page-account .btn-primary {
    box-shadow: 0 4px 12px rgba(27, 110, 194, 0.25);
}

    .page-account .btn-primary:hover {
        background-color: var(--hc-primary-dark);
    }

.page-account .btn-secondary {
    border-color: #dbe8f7;
    background: #fff;
    color: #4a5866;
}

    .page-account .btn-secondary:hover {
        background: var(--hc-sky-soft);
        color: var(--hc-primary);
    }

.page-account .btn-outline-secondary {
    border-color: #dbe8f7;
    color: #4a5866;
}

    .page-account .btn-outline-secondary:hover {
        border-color: var(--hc-primary);
        background: var(--hc-primary);
        color: #fff;
    }

/* Поля форм */
.page-account .form-label {
    color: #4a5866;
    font-weight: 600;
}

.page-account .form-control,
.page-account .form-select {
    border: 2px solid #dbe8f7;
    border-radius: 12px;
}

    .page-account .form-control:focus,
    .page-account .form-select:focus {
        border-color: var(--hc-sky);
        box-shadow: 0 0 0 4px rgba(117, 175, 245, 0.2);
    }

.page-account .form-check-input {
    border: 2px solid #b9d0ec;
}

    .page-account .form-check-input:checked {
        border-color: var(--hc-primary);
        background-color: var(--hc-primary);
    }

/* Таблицы */
.page-account .table {
    --bs-table-striped-bg: #f7faff;
    overflow: hidden;
    border-radius: 12px;
    vertical-align: middle;
}

    .page-account .table > :not(caption) > * > * {
        padding: .65rem .75rem;
        border-bottom-color: #e8f0fa;
    }

    .page-account .table .table-primary,
    .page-account .table thead tr {
        --bs-table-bg: var(--hc-sky-soft);
        --bs-table-striped-bg: var(--hc-sky-soft);
        color: var(--hc-primary);
    }

        .page-account .table .table-primary > th,
        .page-account .table thead th {
            font-weight: 700;
        }

/* Вкладки */
.page-account .nav-tabs {
    gap: .5rem;
    border-bottom: 0;
}

    .page-account .nav-tabs .nav-link {
        padding: .5rem 1.1rem;
        border: 1px solid #dbe8f7 !important;
        border-radius: 999px !important;
        background: #fff;
        color: #2b3a4a !important;
        font-weight: 600;
    }

        .page-account .nav-tabs .nav-link i {
            color: var(--hc-primary);
        }

        .page-account .nav-tabs .nav-link:hover {
            background: var(--hc-sky-soft);
        }

        .page-account .nav-tabs .nav-link.active {
            border-color: var(--hc-primary) !important;
            background: var(--hc-primary);
            color: #fff !important;
        }

            .page-account .nav-tabs .nav-link.active i {
                color: #fff;
            }

.page-account .tab-content {
    padding-top: .75rem;
}

/* Пагинация */
.page-account .pagination {
    flex-wrap: wrap;
    gap: .35rem;
}

.page-account .page-link {
    min-width: 40px;
    border: 1px solid #dbe8f7;
    border-radius: 10px !important;
    color: var(--hc-primary);
    font-weight: 600;
    text-align: center;
}

    .page-account .page-link:hover {
        background: var(--hc-sky-soft);
    }

.page-account .page-item.active .page-link {
    border-color: var(--hc-primary);
    background: var(--hc-primary);
    color: #fff;
}

/* Сообщения */
.page-account .alert {
    border: 0;
    border-radius: 14px;
}

.page-account .alert-warning {
    background: #fff4e0;
    color: #8a5a00;
}

.page-account .alert-info {
    background: var(--hc-sky-soft);
    color: var(--hc-primary);
}

/* Модальные окна */
.page-account .modal-content {
    border: 0;
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow);
}

.page-account .modal-header {
    border-bottom-color: #e8f0fa;
}

.page-account .modal-title {
    font-weight: 700;
    color: var(--hc-primary);
}

.page-account .modal-footer {
    border-top-color: #e8f0fa;
}

/* ===== Профиль и меню (AccountView) ===== */
.cab-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #e8f0fa;
}

.cab-avatar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--hc-sky-soft);
    color: var(--hc-primary);
    font-size: 2.6rem;
}

    .cab-avatar img {
        width: 64px;
        height: 64px;
    }

.cab-profile-info {
    min-width: 0;
}

.cab-name {
    margin-bottom: .35rem;
    font-size: 1.35rem;
    font-weight: 700;
}

    .cab-name a {
        color: var(--hc-primary);
        text-decoration: none;
    }

.cab-level {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-bottom: .25rem;
    color: #4a5866;
}

    .cab-level .badge {
        padding: .35rem .75rem;
        border-radius: 999px;
        font-size: .9rem;
    }

.cab-id {
    color: #4a5866;
    font-size: .95rem;
}

.cab-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    margin-top: 1.1rem;
}

.cab-menu-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .6rem .75rem;
    border-radius: 12px;
    background: #f7faff;
    color: #2b3a4a;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s;
}

    .cab-menu-item i {
        flex-shrink: 0;
        color: var(--hc-primary);
        font-size: 1.15rem;
    }

    .cab-menu-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cab-menu-item:hover {
        background: var(--hc-sky-soft);
        color: var(--hc-primary);
    }

    .cab-menu-item.active {
        background: var(--hc-primary);
        color: #fff;
    }

        .cab-menu-item.active i {
            color: #fff;
        }

/* ===== Блоки правой колонки ===== */
.cab-block-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .9rem;
}

    .cab-block-head .card-title {
        margin: 0;
    }

.cab-block-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--hc-sky-soft);
    color: var(--hc-primary);
    font-size: 1.4rem;
}

.cab-block-avatar {
    border-radius: 50%;
}

    .cab-block-avatar img {
        width: 40px;
        height: 40px;
    }

.cab-list-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .25rem .75rem;
    padding: .45rem 0;
    border-bottom: 1px solid #f0f5fb;
    color: #4a5866;
}

    .cab-list-row:last-child {
        border-bottom: 0;
    }

    .cab-list-row strong {
        max-width: 100%;
        color: #2b3a4a;
    }

    .cab-list-row a {
        color: var(--hc-primary);
    }

.cab-bonus strong {
    color: var(--hc-primary);
    font-size: 1.1rem;
}

.cab-requirements {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 14px;
    background: #fff4e0;
    color: #6b4a00;
    line-height: 1.6;
}

.cab-requirements-title {
    margin-bottom: .3rem;
    color: #c0392b;
    font-weight: 700;
}

/* Адреса */
.cab-addresses {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.cab-addr {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem .75rem;
    border: 1px solid #e8f0fa;
    border-radius: 14px;
    background: #f7faff;
    transition: border-color .15s, background .15s;
}

    .cab-addr:hover {
        border-color: #b9d0ec;
        background: #fff;
    }

.cab-addr-body {
    display: flex;
    flex: 1 1 auto;
    align-items: flex-start;
    gap: .7rem;
    min-width: 0;
    color: #2b3a4a;
    text-decoration: none;
    cursor: pointer;
}

    .cab-addr-body:hover {
        color: #2b3a4a;
    }

.cab-addr-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--hc-sky-soft);
    color: var(--hc-primary);
    font-size: 1.1rem;
}

.cab-addr-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.4;
}

    .cab-addr-text strong {
        color: #2b3a4a;
    }

    .cab-addr-text span {
        color: #4a5866;
        font-size: .93rem;
    }

    .cab-addr-text > * {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.cab-addr-actions {
    display: flex;
    flex-shrink: 0;
    gap: .35rem;
}

.cab-addr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #dbe8f7;
    border-radius: 10px;
    background: #fff;
    color: var(--hc-primary);
    font-size: .95rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

    .cab-addr-btn:hover {
        border-color: var(--hc-primary);
        background: var(--hc-primary);
        color: #fff;
    }

    .cab-addr-btn.cab-addr-remove {
        color: #c82333;
    }

        .cab-addr-btn.cab-addr-remove:hover {
            border-color: #c82333;
            background: #c82333;
            color: #fff;
        }

/* Окно добавления/изменения адреса */
#addAddressModal .modal-body .row {
    align-items: center;
}

    #addAddressModal .modal-body .row > .col-4 {
        color: #4a5866;
        font-weight: 600;
    }

.cab-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    padding: .6rem 1.1rem;
    border-radius: 14px !important;
    border: 2px dashed #b9d0ec;
    background: #fff;
    color: var(--hc-primary);
}

    .cab-add-btn:hover {
        border-color: var(--hc-primary);
        background: var(--hc-sky-soft);
        color: var(--hc-primary);
    }

/* ===== Адаптив ===== */
@media (max-width: 991.98px) {
    .page-account .table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 575px) {
    .page-account .card-body {
        padding: 1.1rem;
    }

    .cab-menu {
        grid-template-columns: 1fr 1fr;
    }

    .page-account .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: .4rem;
    }

        .page-account .nav-tabs .nav-item {
            flex-shrink: 0;
        }
}
