/* ============================================================
   Khu tài khoản khách hàng: shell, danh sách booking, chi tiết booking, form và trang auth.
   Nạp thêm sau ksite.css (token --k-site-* nằm ở file đó), chỉ trên các trang cần.
   ============================================================ */

/* ----- Khu tài khoản 1240 = 300 + 24 + 916 ----- */

.ksite-account {
    padding-block: 24px 40px;
}

.ksite-account__body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 12px;
}

.ksite-account__side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ksite-account__main {
    min-width: 0;
}

.ksite-account-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-lg);
    box-shadow: var(--k-site-shadow-filter);
}

.ksite-account-menu__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--k-site-heading);
}

.ksite-account-menu__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 0 0;
    margin: 0;
    list-style: none;
    border-top: 1px solid var(--k-site-border);
}

.ksite-account-menu__link {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--k-site-sub-text);
    border-radius: var(--k-site-radius-full);
}

.ksite-account-menu__link:hover {
    background: var(--k-site-surface-search);
}

.ksite-account-menu__link.is-active {
    color: var(--k-site-primary);
    background: var(--k-site-surface-search);
}

.ksite-account-menu__link[aria-disabled="true"] {
    color: var(--k-site-muted-soft);
    cursor: default;
}

.ksite-account-menu__link[aria-disabled="true"]:hover {
    background: none;
}

.ksite-account-menu__logout {
    padding-top: 16px;
    border-top: 1px solid var(--k-site-border);
}

.ksite-account-menu__logout button {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--k-site-note);
    cursor: pointer;
    background: none;
    border: 0;
    border-radius: var(--k-site-radius-full);
}

.ksite-account-menu__logout button:hover {
    color: var(--k-site-danger);
    background: var(--k-site-surface-elevated);
}

/* ----- Danh sách booking của khách ----- */

.ksite-account-head h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--k-site-heading);
}

.ksite-account-head p {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--k-site-sub-text);
}

.ksite-account-tabs {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 16px 12px 0 16px;
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-sm);
    box-shadow: var(--k-site-shadow-filter);
}

.ksite-account-tabs__tab {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--k-site-sub-text);
    white-space: nowrap;
}

.ksite-account-tabs__tab::after {
    width: 100%;
    height: 3px;
    content: "";
    background: transparent;
    border-radius: var(--k-site-radius-full);
}

.ksite-account-tabs__tab.is-active {
    color: var(--k-site-primary);
}

.ksite-account-tabs__tab.is-active::after {
    background: var(--k-site-primary);
}

.ksite-booking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.ksite-booking-card {
    display: flex;
    align-items: stretch;
    min-height: 140px;
    overflow: hidden;
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-lg);
}

.ksite-booking-card:hover {
    box-shadow: var(--k-site-shadow-sm);
}

/* Ảnh đặt tuyệt đối: để nó tham gia dòng flex thì chiều cao gốc của file sẽ kéo cao cả thẻ. */
.ksite-booking-card__media {
    position: relative;
    flex: 0 0 180px;
    background: var(--k-site-track);
}

.ksite-booking-card__media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ksite-booking-card__body {
    display: flex;
    flex: 1;
    gap: 16px;
    min-width: 0;
    padding: 16px;
}

.ksite-booking-card__main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    min-width: 0;
}

.ksite-booking-card__type {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--k-site-surface);
    background: var(--k-site-primary);
    border-radius: var(--k-site-radius-sm);
}

.ksite-booking-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--k-site-brand-navy);
}

.ksite-booking-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--k-site-sub-text);
}

.ksite-booking-card__meta span {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ksite-booking-card__dot {
    width: 3px;
    height: 3px;
    background: var(--k-site-sub-text);
    border-radius: var(--k-site-radius-full);
}

.ksite-booking-card__code {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--k-site-sub-text);
}

/* 283 = 266 nội dung + 16 padding + 1 đường kẻ dọc, đúng khối phải của frame 222:1151. */
.ksite-booking-card__aside {
    display: flex;
    flex: 0 0 283px;
    flex-direction: column;
    justify-content: space-between;
    padding-left: 16px;
    border-left: 1px solid var(--k-site-border);
}

.ksite-booking-card__status {
    align-self: flex-start;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    border-radius: var(--k-site-radius-sm);
}

.ksite-booking-card__status.is-upcoming {
    color: var(--k-site-success-ink);
    background: rgb(34 174 85 / 15%);
}

.ksite-booking-card__status.is-completed {
    color: var(--k-site-primary);
    background: var(--k-site-primary-soft);
}

.ksite-booking-card__status.is-processing {
    color: var(--k-site-warning-ink);
    background: rgb(217 119 6 / 12%);
}

.ksite-booking-card__status.is-cancelled {
    color: var(--k-site-muted);
    background: var(--k-site-track);
}

.ksite-booking-card__totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ksite-booking-card__total-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--k-site-sub-text);
}

.ksite-booking-card__total {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--k-site-brand-navy);
}

.ksite-booking-card__payment {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--k-site-sub-text);
}

.ksite-account-empty {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    padding: 48px 24px;
    font-size: 14px;
    color: var(--k-site-sub-text);
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-lg);
}

.ksite-account-empty p {
    margin: 0;
}

.ksite-account-empty__cta {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    color: var(--k-site-surface);
    background: var(--k-site-primary);
    border-radius: var(--k-site-radius-sm);
}

/* ----- Chi tiết booking 916 = 542 + 24 + 350 ----- */

.ksite-booking-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 24px;
    align-items: start;
}

.ksite-booking-detail__main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.ksite-booking-detail__back {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--k-site-sub-text);
}

.ksite-booking-detail__main h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--k-site-heading);
}

.ksite-booking-detail__code {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--k-site-sub-text);
}

.ksite-booking-detail__code button {
    padding: 0;
    color: inherit;
    vertical-align: middle;
    cursor: pointer;
    background: none;
    border: 0;
}

.ksite-booking-card--static {
    cursor: default;
}

.ksite-booking-tabs {
    display: flex;
    flex-direction: column;
}

.ksite-booking-tabs__input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.ksite-booking-tabs__nav {
    display: flex;
    gap: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--k-site-border);
}

.ksite-booking-tabs__nav label {
    position: relative;
    padding-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--k-site-sub-text);
    cursor: pointer;
}

.ksite-booking-tabs__nav label::after {
    position: absolute;
    right: 0;
    bottom: -13px;
    left: 0;
    height: 3px;
    content: "";
    background: transparent;
    border-radius: var(--k-site-radius-full);
}

.ksite-booking-tabs__panel {
    display: none;
    padding-top: 16px;
}

#ksite-tab-overview:checked ~ .ksite-booking-tabs__nav label[for="ksite-tab-overview"],
#ksite-tab-itinerary:checked ~ .ksite-booking-tabs__nav label[for="ksite-tab-itinerary"],
#ksite-tab-terms:checked ~ .ksite-booking-tabs__nav label[for="ksite-tab-terms"] {
    color: var(--k-site-primary);
}

#ksite-tab-overview:checked ~ .ksite-booking-tabs__nav label[for="ksite-tab-overview"]::after,
#ksite-tab-itinerary:checked ~ .ksite-booking-tabs__nav label[for="ksite-tab-itinerary"]::after,
#ksite-tab-terms:checked ~ .ksite-booking-tabs__nav label[for="ksite-tab-terms"]::after {
    background: var(--k-site-primary);
}

#ksite-tab-overview:checked ~ .ksite-booking-tabs__panel[data-panel="overview"],
#ksite-tab-itinerary:checked ~ .ksite-booking-tabs__panel[data-panel="itinerary"],
#ksite-tab-terms:checked ~ .ksite-booking-tabs__panel[data-panel="terms"] {
    display: block;
}

.ksite-booking-tabs__rich {
    font-size: 14px;
    line-height: 1.6;
    color: var(--k-site-body);
}

.ksite-booking-people {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ksite-booking-people h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--k-site-heading);
}

.ksite-booking-people__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ksite-booking-person {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ksite-booking-person__avatar {
    display: flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    height: 48px;
    color: var(--k-site-sub-text);
    background: var(--k-site-surface-elevated);
    border-radius: var(--k-site-radius-full);
}

.ksite-booking-person__name {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--k-site-brand-navy);
}

.ksite-booking-person__badge {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--k-site-primary);
    background: var(--k-site-primary-soft);
    border-radius: var(--k-site-radius-sm);
}

.ksite-booking-person__line {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--k-site-muted);
}

.ksite-booking-summary-shell {
    filter: drop-shadow(0 10px 25px rgb(0 26 109 / 10%));
}

/* Mép dưới răng cưa kiểu cuống vé; viền dưới bỏ đi vì mask cắt ngang sẽ để lại vệt lởm chởm. */
.ksite-booking-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 16px 24px;
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-bottom: 0;
    border-radius: var(--k-site-radius-lg) var(--k-site-radius-lg) 0 0;
    -webkit-mask:
        linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat,
        radial-gradient(21px at 50% 21px, #0000 98%, #000) bottom / 36px 10px repeat-x;
    mask:
        linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat,
        radial-gradient(21px at 50% 21px, #0000 98%, #000) bottom / 36px 10px repeat-x;
}

.ksite-booking-summary h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--k-site-brand-navy);
}

.ksite-booking-summary__rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ksite-booking-summary__row {
    display: flex;
    gap: 16px;
    align-items: baseline;
    justify-content: space-between;
    font-size: 14px;
    line-height: 20px;
}

.ksite-booking-summary__row span {
    font-weight: 500;
    color: var(--k-site-muted);
}

.ksite-booking-summary__row strong {
    font-weight: 600;
    color: var(--k-site-brand-navy);
    text-align: right;
}

.ksite-booking-summary__row strong.is-discount {
    color: var(--k-site-success-ink);
}

.ksite-booking-summary__rule {
    height: 1px;
    background: var(--k-site-border);
}

.ksite-booking-summary__total {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.ksite-booking-summary__total .ksite-booking-summary__row {
    width: 100%;
}

.ksite-booking-summary__total span {
    font-weight: 700;
    color: var(--k-site-brand-navy);
}

.ksite-booking-summary__total strong {
    font-size: 20px;
    font-weight: 700;
    color: var(--k-site-primary);
}

.ksite-booking-summary__paid {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--k-site-success-ink);
}

.ksite-booking-summary__row--method strong {
    font-weight: 600;
    color: var(--k-site-muted);
}

.ksite-booking-policy {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 15px;
    color: var(--k-site-primary);
    background: var(--k-site-primary-soft);
    border: 1px solid var(--k-site-primary-border);
    border-radius: var(--k-site-radius-lg);
}

.ksite-booking-policy__title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--k-site-brand-navy);
}

.ksite-booking-policy__body {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--k-site-brand-navy);
}

/* ----- Form khu tài khoản và lưới yêu thích ----- */

.ksite-account-flash {
    margin: 12px 0 0;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--k-site-success-ink);
    background: rgb(34 174 85 / 10%);
    border-radius: var(--k-site-radius-md);
}

.ksite-account-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    padding: 24px;
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-lg);
}

.ksite-account-form h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--k-site-heading);
}

.ksite-account-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ksite-account-form__field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--k-site-sub-text);
}

.ksite-account-form__field input {
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--k-site-ink-form);
    background: var(--k-site-surface-input);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-sm);
}

.ksite-account-form__field input:disabled {
    color: var(--k-site-muted);
    cursor: not-allowed;
}

.ksite-account-form__hint {
    margin: 0;
    font-size: 12px;
    color: var(--k-site-muted);
}

.ksite-account-form__error {
    margin: 0;
    font-size: 12px;
    color: var(--k-site-danger);
}

.ksite-account-form__submit {
    align-self: flex-start;
    padding: 10px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--k-site-surface);
    cursor: pointer;
    background: var(--k-site-primary);
    border: 0;
    border-radius: var(--k-site-radius-sm);
}

.ksite-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.ksite-wishlist-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ksite-wishlist-item__gone {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    font-size: 13px;
    color: var(--k-site-muted);
    background: var(--k-site-surface-elevated);
    border: 1px dashed var(--k-site-border-control);
    border-radius: var(--k-site-radius-lg);
}

.ksite-wishlist-item__gone p {
    margin: 0;
}

.ksite-wishlist-item__remove {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--k-site-danger);
    cursor: pointer;
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-sm);
}

.ksite-wishlist-item__remove:hover {
    background: var(--k-site-surface-elevated);
}

/* ----- Trang đăng nhập / đăng ký ----- */

.ksite-auth {
    display: flex;
    justify-content: center;
    padding-block: 48px 64px;
}

.ksite-auth__card {
    width: 100%;
    max-width: 460px;
    padding: 32px;
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-lg);
    box-shadow: var(--k-site-shadow-filter);
}

.ksite-auth__card h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--k-site-heading);
}

.ksite-auth__subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--k-site-sub-text);
}

.ksite-account-form--flat {
    padding: 0;
    background: none;
    border: 0;
}

.ksite-account-form--flat .ksite-account-form__submit {
    align-self: stretch;
    text-align: center;
}

.ksite-auth__links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--k-site-primary);
}

/* Cột trái hẹp hơn hộp hỗ trợ ở trang tour (252 vs 302): thu nhỏ nút cho vừa. */
.ksite-account__side .ksite-support__action {
    gap: 6px;
    padding: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.ksite-account-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    padding: 24px;
    color: var(--k-site-surface);
    text-align: center;
    background: var(--k-site-brand-gradient);
    border-radius: var(--k-site-radius-lg);
}

.ksite-account-card__avatar {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    overflow: hidden;
    color: var(--k-site-surface);
    background: rgb(255 255 255 / 25%);
    border-radius: 50%;
}

.ksite-account-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ksite-account-card__name {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.ksite-account-card__phone {
    margin: 0;
    font-size: 13px;
    opacity: 0.85;
}

.ksite-profile {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 24px;
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-lg);
}

.ksite-profile__fields {
    display: flex;
    flex: 1 1 480px;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.ksite-profile__row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.ksite-profile__label {
    padding-top: 10px;
    font-size: 14px;
    color: var(--k-site-body);
}

.ksite-profile__control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 420px;
}

.ksite-profile__control input,
.ksite-profile__control select {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--k-site-ink-form);
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-sm);
}

.ksite-profile__control input:disabled {
    color: var(--k-site-muted);
    cursor: not-allowed;
    background: var(--k-site-surface-input);
}

.ksite-profile__hint {
    margin: 0;
    font-size: 12px;
    color: var(--k-site-muted);
}

.ksite-profile__error {
    margin: 0;
    font-size: 12px;
    color: var(--k-site-danger);
}

.ksite-profile__submit {
    align-self: flex-start;
    padding: 10px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--k-site-surface);
    cursor: pointer;
    background: var(--k-site-primary);
    border: 0;
    border-radius: var(--k-site-radius-sm);
}

.ksite-profile__avatar {
    display: flex;
    flex: 0 1 260px;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.ksite-profile__avatar-frame {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    overflow: hidden;
    color: var(--k-site-primary);
    background: var(--k-site-primary-soft);
    border: 1px solid var(--k-site-primary-border);
    border-radius: 50%;
}

.ksite-profile__avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ksite-profile__avatar-button {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--k-site-body);
    cursor: pointer;
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-sm);
}

/* Nút thật là <label>; input file ẩn nhưng vẫn focus được bằng bàn phím. */
.ksite-profile__avatar-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.ksite-profile__avatar-input:focus-visible + .ksite-profile__avatar-button,
.ksite-profile__avatar-button:hover {
    border-color: var(--k-site-primary);
}

.ksite-profile__avatar-hint {
    margin: 0;
    font-size: 12px;
    color: var(--k-site-muted);
}

.ksite-account-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.ksite-account-status-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ksite-account-status-filter__pill {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--k-site-sub-text);
    white-space: nowrap;
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-full);
}

.ksite-account-status-filter__pill.is-active {
    color: var(--k-site-primary);
    background: var(--k-site-primary-soft);
    border-color: var(--k-site-primary-border);
}

.ksite-account-status-filter__badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--k-site-sub-text);
    background: var(--k-site-surface-input);
    border-radius: var(--k-site-radius-full);
}

.ksite-account-status-filter__pill.is-active .ksite-account-status-filter__badge {
    color: var(--k-site-surface);
    background: var(--k-site-primary);
}

.ksite-account-sort-select {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.ksite-account-sort-select__label {
    font-size: 13px;
    color: var(--k-site-muted);
    white-space: nowrap;
}

.ksite-account-sort-select__control {
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--k-site-body);
    background: var(--k-site-surface);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-sm);
}

.ksite-account-sort-select__submit {
    padding: 8px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--k-site-body);
    cursor: pointer;
    background: var(--k-site-surface-input);
    border: 1px solid var(--k-site-border);
    border-radius: var(--k-site-radius-sm);
}

/* Khu tài khoản vốn dựng cho desktop; riêng form hồ sơ phải xếp chồng để input ngày không bị cắt. */
@media (max-width: 640px) {
    .ksite-profile__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .ksite-profile__label {
        padding-top: 0;
    }
}

/* ----- Dưới khổ desktop: khu tài khoản một cột -----
   Không có frame Figma cho khu này; áp cùng hệ thống với storefront (cùng breakpoint, cùng cách
   dùng `display: contents` để đổi vai trò mà không đụng DOM). */

@media (max-width: 1239.98px) {
    .ksite-account {
        padding-block: 12px 24px;
    }

    /* Bỏ hộp của aside để hộp hỗ trợ tụt xuống dưới nội dung, menu vẫn nằm trên. */
    /* align-items phải trả về stretch: `start` của desktop khiến con tự phình theo max-content. */
    .ksite-account__body {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        margin-top: 8px;
    }

    .ksite-account__side {
        display: contents;
    }

    .ksite-account-card {
        order: 1;
    }

    /* min-width: 0 để hàng chip cuộn được; thiếu nó flex item giãn tới max-content và đẩy trang tràn. */
    .ksite-account-menu {
        order: 2;
        gap: 12px;
        min-width: 0;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
    }

    .ksite-account__main {
        order: 3;
    }

    .ksite-support {
        order: 4;
    }

    /* Menu dọc 300px thành hàng chip cuộn ngang. */
    .ksite-account-menu__title {
        display: none;
    }

    .ksite-account-menu__list {
        flex-direction: row;
        gap: 8px;
        min-width: 0;
        padding: 0;
        overflow-x: auto;
        border-top: 0;
        scrollbar-width: none;
    }

    .ksite-account-menu__list > li {
        flex-shrink: 0;
    }

    .ksite-account-menu__list::-webkit-scrollbar {
        display: none;
    }

    .ksite-account-menu__link {
        white-space: nowrap;
        background: var(--k-site-surface);
        border: 1px solid var(--k-site-border);
    }

    /* Hàng tab và hàng lọc trạng thái cuộn ngang thay vì đẩy trang tràn. */
    .ksite-account-tabs {
        gap: 16px;
        padding: 12px 12px 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .ksite-account-tabs::-webkit-scrollbar {
        display: none;
    }

    .ksite-account-tabs__tab {
        flex-shrink: 0;
    }

    .ksite-account-status-filter {
        flex-wrap: nowrap;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .ksite-account-status-filter::-webkit-scrollbar {
        display: none;
    }

    .ksite-account-status-filter__pill {
        flex-shrink: 0;
    }

    /* Thẻ booking: ảnh 180 + cột phải 283 không đủ chỗ ở màn hẹp, xếp dọc lại. */
    .ksite-booking-card {
        flex-direction: column;
    }

    .ksite-booking-card__media {
        flex: 0 0 160px;
    }

    .ksite-booking-card__body {
        flex-direction: column;
        gap: 12px;
    }

    .ksite-booking-card__aside {
        flex: 0 0 auto;
        padding-top: 12px;
        padding-left: 0;
        border-top: 1px solid var(--k-site-border);
        border-left: 0;
    }

    /* Các lưới cứng của khu tài khoản. */
    .ksite-booking-detail,
    .ksite-booking-people__grid,
    .ksite-profile__row {
        grid-template-columns: minmax(0, 1fr);
    }

    .ksite-profile__label {
        padding-top: 0;
    }

    .ksite-profile {
        gap: 20px;
        padding: 16px;
    }

    /* Ảnh đại diện lên đầu và chiếm trọn hàng để nội dung bên trong tự căn giữa. */
    .ksite-profile__avatar {
        order: -1;
        flex-basis: 100%;
    }

    .ksite-wishlist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tablet và laptop hẹp: vẫn một cột như trên, nhưng còn đủ bề ngang cho các lưới con của nội dung. */
@media (min-width: 768px) and (max-width: 1239.98px) {
    .ksite-wishlist-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ksite-booking-people__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ksite-profile__row {
        grid-template-columns: 140px minmax(0, 1fr);
    }

    .ksite-profile__label {
        padding-top: 10px;
    }
}
