/* Shared responsive rules for authenticated operational panels. */
/* Native upload controls: keep the selector filled to the full control height
   and consistent across Chromium, Firefox and WebKit. */
input.form-control[type="file"] {
    min-height: 48px;
    padding: 0;
    overflow: hidden;
    line-height: 46px;
    color: #334155;
    background-color: #fff;
    border-color: #cbd5e1;
    text-align: center;
}

input.form-control[type="file"]::file-selector-button,
input.form-control[type="file"]::-webkit-file-upload-button {
    height: 46px;
    margin: 0 0.85rem 0 0;
    padding: 0 1rem;
    border: 0;
    border-right: 1px solid #bfd2ee;
    border-radius: 0;
    color: #07347e;
    background: #eaf2ff;
    font-weight: 700;
    vertical-align: top;
    transition: background-color 0.2s ease, color 0.2s ease;
}

input.form-control[type="file"]:hover::file-selector-button,
input.form-control[type="file"]:hover::-webkit-file-upload-button {
    color: #fff;
    background: #0d6efd;
}

input.form-control[type="file"]:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.18);
}

input.form-control-sm[type="file"] {
    min-height: 42px;
    line-height: 40px;
}

input.form-control-sm[type="file"]::file-selector-button,
input.form-control-sm[type="file"]::-webkit-file-upload-button {
    height: 40px;
}

.gallery-replace-control {
    min-height: 48px;
    display: flex;
    align-items: center;
}

.gallery-replace-control .form-check-input {
    flex: 0 0 auto;
}

.document-status-line {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #64748b;
    background: #f8fafc;
    line-height: 1.35;
    text-align: center;
}

.document-status-line strong {
    color: #334155;
    font-weight: 700;
}

.vk-file-picker {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 48px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vk-file-picker:focus-within {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.18);
}

.vk-file-picker-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin: 0;
    padding: 0 1rem;
    border-right: 1px solid #bfd2ee;
    color: #07347e;
    background: #eaf2ff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.vk-file-picker-button:hover {
    color: #fff;
    background: #0d6efd;
}

.vk-file-picker-name {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0.55rem 0.8rem;
    overflow: hidden;
    color: #334155;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vk-pagination {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5ebf1;
    background: #fff;
}

@media (max-width: 575.98px) {
    input.form-control[type="file"] {
        font-size: 0.82rem;
    }

    input.form-control[type="file"]::file-selector-button,
    input.form-control[type="file"]::-webkit-file-upload-button {
        margin-right: 0.55rem;
        padding-inline: 0.75rem;
    }
}

.vk-pagination-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    grid-column: 1;
    justify-self: start;
    min-width: 0;
}

.vk-pagination-page-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

.vk-pagination-page-size label,
.vk-pagination-summary {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0;
}

.vk-pagination-page-size .form-select {
    flex: 0 0 76px;
    width: 76px !important;
    min-width: 76px;
    min-height: 40px;
    border-color: #d7e0e9;
    border-radius: 11px;
}

.vk-pagination-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    grid-column: 2;
    justify-self: center;
}

.vk-page-btn {
    min-width: 40px;
    min-height: 40px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.vk-page-btn:hover,
.vk-page-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.vk-page-btn.disabled {
    pointer-events: none;
    opacity: 0.45;
}

.admin-main-content,
.host-main-content,
.traveler-bookings-shell,
.traveler-profile-shell,
.verification-shell,
.checkout-container,
.checkout-api-shell {
    min-width: 0;
}

.admin-main-content h1,
.admin-main-content h2,
.admin-main-content h3,
.host-main-content h1,
.host-main-content h2,
.host-main-content h3,
.traveler-bookings-shell h1,
.traveler-bookings-shell h2,
.traveler-profile-shell h1,
.traveler-profile-shell h2,
.verification-shell h1,
.verification-shell h2 {
    overflow-wrap: anywhere;
}

.admin-main-content .card,
.host-main-content .card,
.traveler-bookings-shell .card,
.traveler-profile-shell .card,
.verification-shell .card {
    max-width: 100%;
}

.admin-main-content .table-responsive,
.host-main-content .table-responsive {
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
}

.admin-main-content .btn,
.host-main-content .btn,
.traveler-bookings-shell .btn,
.traveler-profile-shell .btn,
.verification-shell .btn,
.checkout-page .btn,
.checkout-api-page .btn {
    min-height: 40px;
}

@media (max-width: 991px) {
    .admin-main-content,
    .host-main-content {
        width: 100%;
        padding: 1.25rem 1rem 2rem !important;
    }

    .admin-mobile-menu-toggle,
    .host-mobile-menu-toggle {
        min-height: 46px;
    }

    .admin-nav-mobile,
    .host-nav-mobile {
        max-height: min(68vh, 560px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .admin-nav-mobile .nav-link,
    .host-nav-mobile .nav-link {
        min-height: 44px;
    }

    .checkout-page,
    .checkout-api-page {
        margin-top: 1.25rem !important;
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 767px) {
    .vk-pagination {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.85rem;
        padding: 0.9rem;
    }

    .vk-pagination-meta {
        grid-column: 1;
        width: 100%;
        justify-content: space-between;
        justify-self: stretch;
    }

    .vk-pagination-pages {
        grid-column: 1;
        justify-self: center;
        flex-wrap: wrap;
    }

    .admin-main-content,
    .host-main-content {
        padding: 1rem 0.75rem 1.5rem !important;
    }

    .admin-main-content > .d-flex.justify-content-between,
    .host-main-content > .d-flex.justify-content-between,
    .traveler-bookings-header,
    .traveler-profile-card > .card-header,
    .verification-panel-header {
        align-items: stretch !important;
        flex-direction: column;
        gap: 0.85rem;
    }

    .admin-main-content > .d-flex.justify-content-between > .btn,
    .admin-main-content > .d-flex.justify-content-between > a.btn,
    .host-main-content > .d-flex.justify-content-between > .btn,
    .host-main-content > .d-flex.justify-content-between > a.btn,
    .traveler-bookings-header > .btn,
    .traveler-bookings-header > a.btn,
    .verification-panel-header > .btn,
    .verification-panel-header > a.btn {
        width: 100%;
    }

    .admin-main-content .card,
    .host-main-content .card,
    .traveler-booking-card,
    .traveler-profile-card,
    .verification-step,
    .checkout-main-card,
    .checkout-side-card,
    .checkout-api-payment-card,
    .checkout-api-summary-card {
        border-radius: 18px !important;
    }

    .admin-main-content .card-header,
    .host-main-content .card-header {
        padding: 1rem !important;
    }

    .admin-main-content .btn,
    .host-main-content .btn,
    .traveler-bookings-shell .btn,
    .traveler-profile-shell .btn,
    .verification-shell .btn,
    .checkout-page .btn,
    .checkout-api-page .btn {
        min-height: 44px;
    }

    .pub-action-btn,
    .admin-properties-actions .btn,
    .admin-dashboard-actions-inline .btn,
    .admin-users-action-btn {
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
    }

    .host-dashboard-table {
        overflow: visible !important;
    }

    .host-dashboard-table .vk-publications-table,
    .host-dashboard-table .vk-publications-table tbody {
        display: block;
        width: 100%;
    }

    .host-dashboard-table .vk-publications-table thead {
        display: none;
    }

    .host-dashboard-table .vk-publications-table tr {
        display: block;
        margin: 0.75rem;
        padding: 0.25rem 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    }

    .host-dashboard-table .vk-publications-table td {
        display: grid;
        grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.2fr);
        gap: 0.75rem;
        align-items: center;
        width: 100%;
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid #eef2f7;
        text-align: left !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .host-dashboard-table .vk-publications-table td::before {
        color: #64748b;
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .host-dashboard-table .vk-publications-table td:nth-child(1)::before { content: "Publicacion"; }
    .host-dashboard-table .vk-publications-table td:nth-child(2)::before { content: "Ubicacion"; }
    .host-dashboard-table .vk-publications-table td:nth-child(3)::before { content: "Verificacion"; }
    .host-dashboard-table .vk-publications-table td:nth-child(4)::before { content: "Precio"; }
    .host-dashboard-table .vk-publications-table td:nth-child(5)::before { content: "Revenue / riesgo"; }
    .host-dashboard-table .vk-publications-table td:nth-child(6)::before { content: "Estado"; }
    .host-dashboard-table .vk-publications-table td:nth-child(7)::before { content: "Acciones"; }

    .host-dashboard-table .vk-publications-table td:last-child {
        border-bottom: 0;
    }

    .host-dashboard-table .vk-publications-table td[colspan] {
        display: block;
        text-align: center !important;
    }

    .host-dashboard-table .vk-publications-table td[colspan]::before {
        content: none;
    }

    .host-dashboard-table .vk-publications-table td > .d-flex.justify-content-end {
        justify-content: flex-start !important;
        flex-wrap: wrap;
    }

    .host-reservations-card {
        overflow: visible !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .host-reservations-card .host-table-header {
        margin-bottom: 0.75rem;
        padding: 1rem !important;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        background: #fff;
    }

    .host-reservations-card .table-responsive {
        overflow: visible !important;
    }

    .host-reservations-card .vk-table,
    .host-reservations-card .vk-table tbody {
        display: block;
        width: 100%;
    }

    .host-reservations-card .vk-table thead {
        display: none;
    }

    .host-reservations-card .vk-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        margin-bottom: 0.75rem;
        padding: 0.5rem 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    }

    .host-reservations-card .vk-table td {
        display: block;
        min-width: 0;
        padding: 0.65rem 0.5rem !important;
        border-bottom: 1px solid #eef2f7;
        text-align: left !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .host-reservations-card .vk-table td::before {
        display: block;
        margin-bottom: 0.25rem;
        color: #64748b;
        font-size: 0.66rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .host-reservations-card .vk-table td:nth-child(1)::before { content: "Reserva"; }
    .host-reservations-card .vk-table td:nth-child(2)::before { content: "Propiedad"; }
    .host-reservations-card .vk-table td:nth-child(3)::before { content: "Viajero"; }
    .host-reservations-card .vk-table td:nth-child(4)::before { content: "Estadia"; }
    .host-reservations-card .vk-table td:nth-child(5)::before { content: "Total"; }
    .host-reservations-card .vk-table td:nth-child(6)::before { content: "Comision"; }
    .host-reservations-card .vk-table td:nth-child(7)::before { content: "Pago host"; }
    .host-reservations-card .vk-table td:nth-child(8)::before { content: "Tributario"; }
    .host-reservations-card .vk-table td:nth-child(9)::before { content: "Estado"; }
    .host-reservations-card .vk-table td:nth-child(10)::before { content: "Acciones"; }

    .host-reservations-card .vk-table td:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .host-reservations-card .vk-table td[colspan] {
        grid-column: 1 / -1;
    }

    .host-reservations-card .vk-table td[colspan]::before {
        content: none;
    }

    .traveler-bookings-shell,
    .traveler-profile-shell,
    .verification-shell {
        width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .traveler-booking-card .d-flex.justify-content-between,
    .traveler-profile-card .d-flex.justify-content-between {
        gap: 0.65rem;
    }

    .traveler-booking-card .badge,
    .traveler-profile-card .badge,
    .verification-shell .badge {
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }

    .checkout-page,
    .checkout-api-page {
        width: calc(100% - 1rem);
        padding: 0.75rem !important;
        border-radius: 18px !important;
    }

    .checkout-api-header > .d-flex {
        align-items: stretch !important;
        flex-direction: column;
    }

    .checkout-api-back-btn {
        width: 100%;
        margin-left: 0 !important;
        transform: none !important;
    }

    .checkout-main-card .card-body,
    .checkout-side-card .card-body,
    .checkout-api-payment-card .card-body,
    .checkout-api-summary-card .card-body {
        padding: 1rem !important;
    }

    .checkout-total-box,
    .checkout-api-total-box {
        border-radius: 16px;
    }
}

@media (max-width: 520px) {
    .vk-pagination-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.55rem;
    }

    .vk-pagination-pages {
        width: 100%;
        gap: 0.25rem;
    }

    .vk-page-btn {
        min-width: 38px;
        min-height: 38px;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 359px) {
    .host-dashboard-table .vk-publications-table td {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .admin-main-content,
    .host-main-content {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .host-reservations-card .vk-table tr {
        grid-template-columns: 1fr;
    }

    .host-reservations-card .vk-table td:nth-last-child(2) {
        border-bottom: 1px solid #eef2f7;
    }
}

/* Shared density, pagination and traveler shell contract. */
body .vk-pagination { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.65rem 1.25rem; padding:.8rem 1rem; }
body .vk-pagination .vk-pagination-meta { flex-direction:row; display:flex; align-items:center; flex-wrap:nowrap; gap:.75rem; width:auto; justify-content:flex-start; }
body .vk-pagination .vk-pagination-summary { white-space:nowrap; font-size:.75rem; }
body .vk-pagination .vk-pagination-pages { display:flex; flex-wrap:wrap; margin:0; justify-content:center; }
body .vk-pagination .vk-page-btn { min-height:34px; min-width:34px; font-size:.75rem; }
body .vk-pagination .vk-pagination-page-size .form-select { min-width:60px; width:60px!important; flex-basis:60px; min-height:34px; }
body :is(div,main):has(>.traveler-section-nav) { width:min(100%,1440px); max-width:1440px!important; margin:1.5rem auto 2.5rem!important; padding:0 clamp(1rem,3vw,2.5rem)!important; }
body .traveler-section-nav { margin:0 auto 1.25rem; }
body .traveler-bookings-shell .vk-pagination { border-top:0; }
body input.form-control[type="file"] { height:44px; min-height:44px; padding:0!important; line-height:42px!important; text-align:left; }
body input.form-control[type="file"]::file-selector-button { height:42px; line-height:42px; padding:0 .85rem; vertical-align:top; }
body .host-nav-container,body .admin-sidebar { overflow-anchor:none; overscroll-behavior:contain; scrollbar-gutter:stable; }
body .host-sidebar,body .admin-sidebar { transition:none; }
@media (max-width:575.98px) {
    body .vk-pagination { justify-content:center; padding:.75rem .5rem; }
    body .vk-pagination .vk-pagination-meta { gap:.5rem; }
    body .vk-pagination .vk-pagination-page-size label { font-size:.7rem; }
    body .vk-pagination .vk-pagination-summary { font-size:.7rem; }
    body .vk-pagination .vk-pagination-pages { width:100%; }
    body :is(div,main):has(>.traveler-section-nav) { margin-top:1rem!important; }
}
@media (pointer:coarse) { body .btn:not(.rounded-circle):not(.btn-close),body .vk-page-btn { min-height:44px!important; } }

.vk-page-size-short { display:none; }
@media(max-width:575.98px) { .vk-page-size-long { display:none; } .vk-page-size-short { display:inline; } }
