/* Trang cá nhân */

.wp-personalPage {
    position: relative;
    padding: 40px 20px 72px;
}

.wp-personalPage::before {
    top: 0;
    z-index: -2;
    background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 1) 200px,
            rgba(255, 255, 255, 0.1) 100%
    );
}

.wp-personalPage::before,
.wp-personalPage::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
}

.wp-personalPage::after {
    bottom: 0;
    z-index: -3;
    background: url(/web/img/bg-shape-dark.jpg);
    background-repeat: no-repeat;
    background-size: cover;
}

.inner-ct-personalPage {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 25px rgb(2 22 42 / 8%);
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    z-index: 1;
    display: flex;
    gap: 0;
    align-items: stretch;
    overflow: hidden;
}

/* Sidebar tài khoản */
.account-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #f7f8fc;
    border-right: 1px solid #e8eaf2;
    padding: 24px 14px 16px;
}

.account-sidebar__profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 20px;
}

.account-sidebar__avatar {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.account-sidebar__avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e1e4ef;
}

.account-sidebar__avatar-edit {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 22px;
    height: 22px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.account-sidebar__identity {
    min-width: 0;
}

.account-sidebar__name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
    word-break: break-word;
}

.account-sidebar__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e9ebf3;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.account-sidebar__badge i {
    font-size: 9px;
    color: #9aa0b4;
}

.account-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 2px;
}

.account-sidebar__section {
    margin-bottom: 14px;
}

.account-sidebar__section-title {
    margin: 0 0 6px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9aa0b4;
}

.account-sidebar__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease,
    color 0.15s ease;
}

.account-sidebar__item:hover:not(.is-disabled) {
    background: #eef0f8;
    color: var(--primary-color);
    text-decoration: none;
}

.account-sidebar__item.is-active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.account-sidebar__item.is-active .account-sidebar__icon,
.account-sidebar__item--parent.is-open .account-sidebar__icon,
.account-sidebar__item--parent.is-active-parent .account-sidebar__icon {
    color: var(--primary-color);
}

.account-sidebar__item.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.account-sidebar__item-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.account-sidebar__icon {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: #7b8499;
    flex-shrink: 0;
}

.account-sidebar__chevron {
    font-size: 11px;
    color: #9aa0b4;
}

.account-sidebar__item--parent {
    font-weight: 600;
}

.account-sidebar__sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 0 6px 8px;
}

.account-sidebar__sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px 9px 14px;
    border-radius: 10px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease,
    color 0.15s ease;
}

.account-sidebar__sub-item:hover:not(.is-disabled) {
    background: #eef0f8;
    color: var(--primary-color);
    text-decoration: none;
}

.account-sidebar__sub-item.is-active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.account-sidebar__sub-item.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.account-sidebar__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid #c5cad8;
    background: transparent;
    flex-shrink: 0;
}

.account-sidebar__sub-item.is-active .account-sidebar__dot {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.account-sidebar__footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e4e7f0;
}

.account-sidebar__logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #e11d48;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.account-sidebar__logout:hover {
    background: #fff1f2;
}

.account-sidebar__logout i {
    width: 18px;
    text-align: center;
}

.wp-ava-name-personalPage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 200px;
    padding-right: 40px;
    border-right: 1px solid #e1e1e1;
}

.wp-part-ct-personalPage {
    flex: 1;
    min-width: 0;
    padding: 28px 28px 32px;
    background: #fff;
}

.account-content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.account-content-header h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.2;
}

.account-breadcrumb {
    margin: 0;
    font-size: 13px;
    color: #8b93a7;
}

.account-breadcrumb a {
    color: #8b93a7;
    text-decoration: none;
}

.account-breadcrumb a:hover,
.account-help-link {
    color: var(--primary-color);
}

.account-help-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.account-help-link:hover {
    text-decoration: underline;
}

/* Tab và biểu mẫu */
.personal-tabs {
    margin-bottom: 32px;
    gap: 12px;
    justify-content: flex-start;
}

.personal-tabs .gallery-tab {
    padding: 8px 16px;
    font-size: 15px;
    border-color: #d8dce2;
    color: #717882;
}

.personal-tabs .gallery-tab:hover {
    border-color: #ee950e;
    color: #ee950e;
}

.personal-tabs .gallery-tab.active {
    background: #ee950e;
    border-color: #ee950e;
    color: white;
}

.personal-tabs .gallery-tab i {
    font-size: 13px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.personal-form {
    display: flex;
    flex-direction: column;
}

.personal-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-icon-right {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
}

.input-with-icon .form-control:disabled {
    background-color: #f5f5f5;
    color: var(--text-light);
    cursor: not-allowed;
}

.tab-content .ce-btn-primary {
    width: auto !important;
}

.wp-btn-submit-personal {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    gap: 16px;
}

/* Form */
.form-title {
    font-size: 16px;
    display: flex;
    text-align: center;
}

.form-title.danger {
    color: var(--accent-color);
}

.accounts-link-item {
    display: flex;
    align-items: center;
    flex-direction: row;
    padding: 10px 12px 10px 0;
    justify-content: space-between;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    transition: 0.1s;
}

.account-link-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.identifier-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
}

.identifier-item {
    font-size: 14px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 12px 12px 0;
}

.identifier-info {
    display: flex;
    width: 100%;
    flex: 1;
    flex-direction: row;
}

.identifier-values {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: row;
}

.identifier-value {
    display: inline-flex;
}

.form-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.identifier-input {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 12px 10px 11px;
}

.identifier-field {
    flex: 1;
    min-width: 0;
}

.identifier-field .form-control {
    width: 100%;
}

.identifier-field .form-control.is-invalid {
    border-color: #dc3545;
}

.identifier-field .form-control.is-valid {
    border-color: #18a058;
}

.identifier-error,
.identifier-hint {
    margin: 5px 0 0;
    font-size: 13px;
    line-height: 1.35;
}

.identifier-error {
    color: var(--accent-color);
}

.identifier-hint {
    color: var(--text-color-secondary, #667085);
}

.email-input-info .otp-input-row {
    flex: 1;
    min-width: 0;
}

#email-input {
    width: 100%;
}

.input-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-function-container {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.identifier-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: auto;
}

.identifier-icon-container.main {
    background: #eef0fb;
    border-radius: 50%;
    width: 35px;
    height: 35px;
}

.identifier-icon-container.inner {
}

.identifier-icon-container i {
    color: var(--primary-color);
}

.identifier-icon-container.main.offset i {
    transform: translateX(2px);
}

.star-icon i {
    color: var(--secondary-color);
}

.star-icon:hover i {
    animation: fa-bounce 1s;
}

.form-footer {
    padding: 0 12px;
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.form-control.input {
    display: flex;
    flex: 1;
}

.identifier-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.identifier-control-row .form-control {
    flex: 1;
    min-width: 0;
}

.input-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Đổi mật khẩu */
.form-label-with-help {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 4px;
}

.form-label-without-help {
    display: flex;
    margin-bottom: 8px;
    gap: 4px;
}

.form-label-with-help label,
.form-label-without-help label {
    margin: 0;
}

.form-label-with-help__required-star {
    padding-right: 4px;
}

.password-format-help {
    width: 360px;
    max-width: calc(100vw - 64px);
}

.password-format-help strong {
    display: block;
    margin-bottom: 6px;
}

.password-format-help ul {
    margin: 0;
    padding-left: 18px;
}

.password-format-help li + li {
    margin-top: 4px;
}

.password-input.is-invalid {
    border-color: #dc3545;
}

.password-input.is-valid {
    border-color: #18a058;
}

.password-validation-error {
    margin: 5px 0 0;
    color: #dc3545;
    font-size: 13px;
    line-height: 1.35;
}

.password-hint {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

.password-hint i {
    margin-right: 4px;
    color: var(--secondary-color);
}

.verify-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-bottom: 15px;
}

label.verify-method {
    display: grid;
    grid-template-columns: 14px 20px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    box-sizing: border-box;
    width: 100%;
    min-height: 82px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #fff;
    color: var(--text-color);
    font-weight: 400;
    cursor: pointer;
    transition: border-color 0.2s ease,
    background-color 0.2s ease;
}

label.verify-method:hover,
label.verify-method.is-active {
    border-color: #2997cc;
    background: #f1f7ff;
}

label.verify-method input[type="radio"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #2997cc;
}

label.verify-method > i {
    width: 20px;
    color: #2997cc;
    font-size: 16px;
    text-align: center;
}

label.verify-method > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

label.verify-method strong,
label.verify-method small {
    display: block;
    margin: 0;
}

label.verify-method strong {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

label.verify-method small {
    overflow: hidden;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.verify-methods-info-left,
.verify-methods-info-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.verify-method-icon {
    color: #2997cc;
}

.verify-method {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: 1px solid #d5d5d5;
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition-fast);
}

.verify-method:hover,
.verify-method.is-active {
    border-color: #2997cc;
    background: #f1f7ff;
}

.verify-method input {
    margin: 0;
    accent-color: #2997cc;
}

.verify-method > i {
    color: #2997cc;
    text-align: center;
}

.verify-method > span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.verify-method strong {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
}

.verify-method small {
    overflow: hidden;
    color: var(--text-light);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forgot-password-link {
    position: absolute;
    top: 0;
    right: 0;
}

.forgot-password-link a {
    font-size: 14px;
    color: var(--primary-color-text);
    text-decoration: none;
    transition: var(--transition-fast);
}

.forgot-password-link a:hover {
    text-decoration: underline;
}

/* Lịch sử đơn hàng */
.order-history-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
    position: relative;
    z-index: 1;
}

.order-history-item {
    border: 1px solid #d5d5d5;
    border-radius: var(--radius-md);
    background: var(--white);
    transition: var(--transition-fast);
    position: relative;
    padding: 10px 10px 4px;
}

.order-history-item:first-child {
    margin-top: 16px;
}

.order-history-item:hover {
    border-color: #999ce7;
    background: #f5f6ff;
}

.order-history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.order-time {
    position: absolute;
    top: -23px;
    left: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color-text);
    background: #e6e8ff;
    border-radius: 12px 12px 0 0;
    transition: var(--transition-fast);
    margin: 0;
    padding: 1px 12px 20px;
    z-index: -1;
}

.order-history-item:hover .order-time {
    background: var(--primary-color);
    color: var(--white);
}

.order-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.order-info-row .dot {
    width: 4px;
    display: block;
    height: 4px;
    background: gray;
    border-radius: 50%;
    margin: 0 8px;
}

.order-info-item {
    font-size: 15px;
    position: relative;
}

.order-info-item i {
    color: var(--text-light);
    font-size: 13px;
}

.order-status {
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
}

.status-pending {
    background: #5054c2;
    color: var(--white);
}

.status-shipping {
    background: #ff9900;
    color: var(--white);
}

.status-success {
    background: #28a745;
    color: var(--white);
}

.status-cancelled {
    background: #ffe5e5;
    color: #dc3545;
}

.order-history-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 4px;
    border-top: 1px dashed #d1d1d1;
}

.order-total {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
}

.order-total strong {
    color: #e74c3c;
    font-size: 17px;
    margin-left: 4px;
}

#order-history .pagination-wrapper {
    margin-top: 32px;
}

/* Responsive trang cá nhân */
@media (max-width: 575px) {
    .wp-personalPage {
        padding-top: 20px;
    }

    .inner-ct-personalPage {
        flex-direction: column;
        justify-content: center;
        padding: 0;
        gap: 0;
    }

    .account-sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #e8eaf2;
    }

    .wp-ava-name-personalPage {
        padding-right: 0;
        border: none;
    }

    .wp-part-ct-personalPage {
        padding: 20px 16px 28px;
    }

    .account-content-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-content-header h2 {
        font-size: 22px;
    }

    .personal-tabs .gallery-tab {
        padding: 6px 10px;
        font-size: 14px;
    }

    .personal-tabs {
        column-gap: 6px;
        row-gap: 10px;
        justify-content: center;
    }

    .personal-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .wp-btn-submit-personal {
        text-align: center;
        margin-top: 0;
    }

    .order-info-row {
        gap: 0;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .wp-personalPage {
        padding-top: 20px;
    }

    .inner-ct-personalPage {
        flex-direction: column;
        justify-content: center;
        gap: 0;
        padding: 0;
    }

    .account-sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #e8eaf2;
    }

    .wp-ava-name-personalPage {
        padding-right: 0;
        border: none;
    }

    .wp-part-ct-personalPage {
        padding: 24px 20px 28px;
    }

    .wp-btn-submit-personal {
        text-align: center;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .wp-personalPage {
        padding-top: 0px;
    }

    .inner-ct-personalPage {
        padding: 0;
        gap: 0;
    }

    .account-sidebar {
        width: 240px;
    }

    .wp-part-ct-personalPage {
        padding: 24px;
    }

    .wp-ava-name-personalPage {
        padding-right: 20px;
        min-width: auto;
    }
}

/* Chi tiết đơn hàng */
.order-detail-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-order-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 16px;
}

.modal-order-info-item {
    padding: 6px 0px 6px 12px;
    border-radius: 10px;
    border: 1px solid #3f44b7;
    border-left-width: 4px;
}

.modal-order-info-item:has(.order-status) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 12px;
    min-height: 60px;
}

.modal-order-info-label {
    font-size: 15px;
    font-weight: 800;
    display: block;
}

.order-detail-content .order-status {
    display: inline-block;
}

.order-products-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-products-list .card-item-in-popup .quantity-his {
    font-weight: 500;
}

.order-products-list .card-item-in-popup {
    padding: 0 0 12px;
}

.order-products-list .card-item-in-popup .card-item-in-popup-price {
    position: relative;
    top: 1px;
    left: -2px;
}

.order-products-list .card-item-in-popup:last-child {
    border: none;
    padding-bottom: 0;
}

.order-notes {
    background: #fffbeb;
    padding: 16px;
    border-radius: var(--radius-md);
    border-left: 4px solid #fbbf24;
}

.order-notes h4 {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-notes h4 i {
    font-size: 12px;
}

.order-notes p {
    font-size: 14px;
    color: #78350f;
    margin: 0;
    line-height: 1.6;
}

.otp-input-center {
    display: flex;
    justify-content: center;
}

@media (max-width: 575px) {
    .modal-order-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 0;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .modal-order-info-grid {
        gap: 16px;
        margin-bottom: 0;
    }
}

/* Liên kết gia đình */

.account-child-page {
    display: grid;
    gap: 32px;
}

.family-link {
    display: grid;
    gap: 24px;
}

.family-link__intro {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
}

.family-link__title {
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 20px;
    font-weight: 700;
}

.family-link__description {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
}

.family-link__quota {
    margin: 6px 0 0;
    color: #4f46e5;
    font-size: 14px;
    font-weight: 600;
}

.family-link__quota--top {
    order: 0;
    margin: 0;
}

.family-link__notice {
    order: 2;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    line-height: 1.5;
}

.family-link__form {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.family-link__forms {
    order: 4;
    display: grid;
    gap: 16px;
}

.family-link__accordion-item {
    overflow: hidden;
    border: 1px solid #d8e0eb;
    border-radius: 14px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.family-link__accordion-item.is-open {
    border-color: #818cf8;
    box-shadow: 0 0 0 1px rgb(99 102 241 / 8%);
}

.family-link__accordion-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 72px;
    padding: 16px 20px;
    border: 0;
    background: #fff;
    color: #1f2937;
    text-align: left;
    cursor: pointer;
}

.family-link__accordion-title {
    display: grid;
    gap: 4px;
}

.family-link__accordion-title strong {
    font-size: 17px;
    font-weight: 700;
}

.family-link__accordion-title small {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.45;
}

.family-link__accordion-item.is-open .family-link__accordion-title strong,
.family-link__accordion-item.is-open .family-link__accordion-icon {
    color: #4f46e5;
}

.family-link__accordion-icon {
    color: #94a3b8;
    font-size: 13px;
    transition: color 0.2s ease, transform 0.2s ease;
    grid-column: 3;
}

.family-link__accordion-item.is-open .family-link__accordion-icon {
    transform: rotate(180deg);
}

.family-link__accordion-panel {
    border-top: 1px solid #e5e7eb;
}

.family-link__accordion-panel > .family-link__form {
    border: 0;
    border-radius: 0;
}

.family-link__create-quota {
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.family-link__notice--compact {
    margin-bottom: 18px;
}

.family-link__form-group {
    margin: 0;
}

.family-link__input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.family-link__input {
    min-width: 0;
}

.family-link__create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.family-link__password {
    position: relative;
}

.family-link__password .form-control {
    padding-right: 44px;
}

.family-link__password .toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transform: translateY(-50%);
}

.family-link__password .toggle-password:disabled {
    cursor: not-allowed;
}

.family-link__form .form-control.is-invalid {
    border-color: #dc2626;
}

.family-link__field-error,
.family-link__field-hint,
.family-link__field-success {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

.family-link__field-error {
    color: #dc2626;
}

.family-link__field-hint {
    color: #6b7280;
}

.family-link__field-success {
    color: #047857;
}

.family-link__create-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.family-link__state,
.family-link__empty {
    order: 3;
    display: grid;
    place-items: center;
    min-height: 220px;
    padding: 32px 20px;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    color: #6b7280;
    text-align: center;
}

.family-link__state {
    grid-auto-flow: column;
    align-content: center;
    justify-content: center;
    gap: 10px;
}

.family-link__empty-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 22px;
}

.family-link__empty h4 {
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
}

.family-link__empty p {
    max-width: 480px;
    margin: 0;
    line-height: 1.6;
}

.family-link__list {
    order: 3;
    display: grid;
    gap: 12px;
}

.family-link__member {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.family-link__member-main {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.family-link__avatar {
    width: 52px;
    height: 52px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    object-fit: cover;
}

.family-link__identity {
    min-width: 0;
}

.family-link__name-row {
    display: grid;
    grid-template-columns: minmax(0, max-content) max-content;
    align-items: center;
    justify-content: start;
    gap: 10px;
}

.family-link__name-row h4 {
    overflow: hidden;
    margin: 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.family-link__identity p {
    display: grid;
    grid-template-columns: 16px minmax(0, max-content);
    align-items: center;
    justify-content: start;
    gap: 6px;
    margin: 5px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.family-link__identity .family-link__date {
    display: block;
    color: #9ca3af;
    font-size: 13px;
}

.family-link__status {
    display: inline-grid;
    place-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.family-link__status.is-pending {
    background: #fff7ed;
    color: #c2410c;
}

.family-link__status.is-accepted {
    background: #ecfdf5;
    color: #047857;
}

.family-link__status.is-rejected,
.family-link__status.is-cancelled,
.family-link__status.is-removed {
    background: #f3f4f6;
    color: #6b7280;
}

.family-link__status.is-unknown {
    background: #eef2ff;
    color: #4338ca;
}

.family-link__actions {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    justify-content: end;
    gap: 8px;
}

@media (max-width: 767px) {
    .family-link__intro,
    .family-link__input-row,
    .family-link__create-grid,
    .family-link__member {
        grid-template-columns: 1fr;
    }

    .family-link__member {
        align-items: stretch;
    }

    .family-link__name-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .family-link__name-row h4 {
        white-space: normal;
    }

    .family-link__status {
        justify-self: start;
    }

    .family-link__actions {
        grid-auto-flow: row;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .family-link__accordion-trigger {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .family-link__create-quota {
        grid-column: 1;
        justify-self: start;
    }

    .family-link__accordion-icon {
        grid-column: 2;
        grid-row: 1;
    }

}

@media (max-width: 479px) {
    .account-child-page {
        gap: 24px;
    }

    .family-link {
        gap: 18px;
    }

    .family-link__form,
    .family-link__member {
        padding: 16px;
    }

    .family-link__accordion-trigger {
        min-height: 64px;
        padding: 14px 16px;
    }

    .family-link__accordion-title small {
        display: none;
    }

    .family-link__member-main {
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: start;
    }

    .family-link__avatar {
        width: 44px;
        height: 44px;
    }
}

/* Quản lý tài khoản con và đặt lại mật khẩu */

.child-management {
    display: grid;
    gap: 24px;
}

.child-management__intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
}

.child-management__title {
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 20px;
    font-weight: 700;
}

.child-management__description,
.child-management__form-heading p,
.child-management__list-heading p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
}

.child-management__quota {
    margin: 6px 0 0;
    color: #4f46e5;
    font-size: 14px;
    font-weight: 600;
}

.child-management__notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    line-height: 1.5;
    box-shadow: 0 4px 14px rgb(15 23 42 / 6%);
}

.child-management__notice i {
    margin-top: 3px;
    color: #4f46e5;
}

.child-management__form {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.child-management__form-heading,
.child-management__list-heading {
    margin-bottom: 18px;
}

.child-management__form-heading h4,
.child-management__list-heading h4 {
    margin: 0 0 5px;
    color: #1f2937;
    font-size: 17px;
    font-weight: 700;
}

.child-management__form-heading p,
.child-management__list-heading p {
    font-size: 14px;
}

.child-management__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.child-management__form-group {
    margin: 0;
}

.child-management__input {
    min-width: 0;
}

.child-management__password {
    position: relative;
}

.child-management__password .form-control {
    padding-right: 44px;
}

.child-management__password .toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transform: translateY(-50%);
}

.child-management__password .toggle-password:disabled {
    cursor: not-allowed;
}

.child-management__form .form-control.is-invalid {
    border-color: #dc2626;
}

.child-management__field-error,
.child-management__field-hint,
.child-management__field-success {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

.child-management__field-error {
    color: #dc2626;
}

.child-management__field-hint {
    color: #6b7280;
}

.child-management__field-success {
    color: #047857;
}

.child-management__form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.child-management__list-heading {
    margin: 0;
    padding-top: 4px;
}

.child-management__state,
.child-management__empty {
    display: grid;
    place-items: center;
    min-height: 220px;
    padding: 32px 20px;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    color: #6b7280;
    text-align: center;
}

.child-management__state {
    grid-auto-flow: column;
    align-content: center;
    justify-content: center;
    gap: 10px;
}

.child-management__empty-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 22px;
}

.child-management__empty h4 {
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
}

.child-management__empty p {
    max-width: 480px;
    margin: 0;
    line-height: 1.6;
}

.child-management__list {
    display: grid;
    gap: 12px;
}

.child-management__member {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.child-management__avatar {
    width: 52px;
    height: 52px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    object-fit: cover;
}

.child-management__identity {
    min-width: 0;
}

.child-management__name-row {
    display: grid;
    grid-template-columns: minmax(0, max-content) max-content;
    align-items: center;
    justify-content: start;
    gap: 10px;
}

.child-management__name-row h4 {
    overflow: hidden;
    margin: 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.child-management__identity p {
    display: grid;
    grid-template-columns: 16px minmax(0, max-content);
    align-items: center;
    justify-content: start;
    gap: 6px;
    margin: 5px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.child-management__identity .child-management__date {
    display: block;
    color: #9ca3af;
    font-size: 13px;
}

.child-management__member-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.child-management__status {
    display: inline-grid;
    place-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.child-management__status.is-pending {
    background: #fff7ed;
    color: #c2410c;
}

.child-management__status.is-accepted {
    background: #ecfdf5;
    color: #047857;
}

.child-management__status.is-rejected,
.child-management__status.is-cancelled,
.child-management__status.is-removed {
    background: #f3f4f6;
    color: #6b7280;
}

.child-management__status.is-unknown {
    background: #eef2ff;
    color: #4338ca;
}

.child-reset-password__backdrop {
    position: fixed;
    z-index: 1050;
    inset: 0;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 24px;
    background: rgb(15 23 42 / 55%);
}

.child-reset-password {
    width: min(100%, 720px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 60px rgb(15 23 42 / 24%);
}

.child-reset-password__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.child-reset-password__header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 20px;
    font-weight: 700;
}

.child-reset-password__header p {
    margin: 5px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.child-reset-password__close {
    /* visual lấy từ .ce-btn; chỉ giữ chỗ trong header */
    flex-shrink: 0;
}

.child-reset-password__body {
    padding: 24px;
}

.child-reset-password__intro {
    margin-bottom: 20px;
}

.child-reset-password__intro h4,
.child-reset-password__verify h4 {
    margin: 0;
    color: #1f2937;
    font-size: 17px;
    font-weight: 700;
}

.child-reset-password__intro p,
.child-reset-password__verify p {
    margin: 6px 0 0;
    color: #6b7280;
    line-height: 1.55;
}

.child-reset-password__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.child-reset-password__form-group {
    min-width: 0;
    margin: 0;
}

.child-reset-password__password-input {
    position: relative;
    min-width: 0;
}

.child-reset-password__password-input .form-control {
    padding-right: 44px;
}

.child-reset-password__password-input .toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transform: translateY(-50%);
}

.child-reset-password__password-input .toggle-password:disabled {
    cursor: not-allowed;
}

.child-reset-password__body .form-control.is-invalid {
    border-color: #dc2626;
}

.child-reset-password__field-error,
.child-reset-password__field-hint {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

.child-reset-password__field-error {
    color: #dc2626;
}

.child-reset-password__field-hint {
    color: #6b7280;
}

.child-reset-password__verify {
    display: grid;
    gap: 18px;
}

.child-reset-password__otp {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 4px 0;
}

.child-reset-password__otp-error {
    margin-top: -10px;
    text-align: center;
}

.child-reset-password__resend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 24px;
    color: #6b7280;
    font-size: 14px;
    text-align: right;
}

.child-reset-password__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.child-reset-password-enter-active,
.child-reset-password-leave-active {
    transition: opacity 0.18s ease;
}

.child-reset-password-enter-active .child-reset-password,
.child-reset-password-leave-active .child-reset-password {
    transition: opacity 0.18s ease,
    transform 0.18s ease;
}

.child-reset-password-enter-from,
.child-reset-password-leave-to {
    opacity: 0;
}

.child-reset-password-enter-from .child-reset-password,
.child-reset-password-leave-to .child-reset-password {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
}

@media (max-width: 767px) {
    .child-management__intro,
    .child-management__grid,
    .child-reset-password__grid {
        grid-template-columns: 1fr;
    }

    .child-management__form-actions {
        display: block;
    }

    .child-management__name-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .child-management__name-row h4 {
        white-space: normal;
    }

    .child-management__status {
        justify-self: start;
    }

    .child-management__member {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .child-management__member-actions {
        grid-column: 1 / -1;
    }

    .child-reset-password__backdrop {
        align-items: end;
        padding: 16px;
    }

    .child-reset-password {
        max-height: calc(100vh - 32px);
    }
}

@media (max-width: 479px) {
    .child-management {
        gap: 18px;
    }

    .child-management__form,
    .child-management__member {
        padding: 16px;
    }

    .child-management__member {
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: start;
    }

    .child-management__avatar {
        width: 44px;
        height: 44px;
    }

    .child-reset-password__backdrop {
        padding: 0;
    }

    .child-reset-password {
        width: 100%;
        max-height: 100vh;
        border-radius: 14px 14px 0 0;
    }

    .child-reset-password__header,
    .child-reset-password__body {
        padding: 18px 16px;
    }

    .child-reset-password__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .child-reset-password__actions .ce-btn {
        width: 100%;
    }
}
