.admin-list-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #e0e8ee; background: #f8fafc; }
.admin-list-toolbar > span { font-size: 13px; color: #345169; }
.admin-list-toolbar .form-select { width: auto; min-width: 200px; max-width: 100%; }
.admin-list-toolbar > small { color: #718096; font-size: 12px; }
.admin-list-result { margin: 12px 14px; font-size: 13px; }
.admin-list-result ul { margin: 8px 0 0; }
.admin-list-checkbox { cursor: pointer; width: 17px; height: 17px; margin: 0; vertical-align: middle; }
.admin-list-pager { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 14px; border-top: 1px solid #e0e8ee; font-size: 13px; color: #526779; background: #fff; }
.admin-list-page-buttons { display: flex; align-items: center; gap: 8px; }
.admin-list-page-buttons .btn { min-width: 32px; }
.admin-list-batch-area { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Shared admin lists: compact white panels, grey headings and horizontal rules.
   Scope to the admin shell because this stylesheet also loads on public pages. */
.admin-portal .admin-page-shell {
    --admin-list-ink: #174f7c;
    --admin-list-muted: #7b8fa5;
    --admin-list-line: #e0e8ee;
    --admin-list-heading: #d9dada;
}

.admin-portal .admin-page-shell :is(.admin-standard-card, .contact-admin-card, .testimonial-admin-card, .booking-admin-card, .template-list-card) {
    background: #fff;
    border: 1px solid #bfc6ca;
    border-radius: 0;
    box-shadow: none;
}

/* The legacy full-width layout places filters and rows in separate wrappers. */
.admin-portal .admin-page-shell .layout-fullwidth > .container-fluid > .pt-1 {
    padding-top: 0 !important;
    border: 1px solid #bfc6ca;
    background: #fff;
}
.admin-portal .admin-page-shell .layout-fullwidth .box-item_wrapper {
    padding: 14px;
    border: 0;
    border-bottom: 1px solid var(--admin-list-line);
    border-radius: 0;
    background: #fff;
}
.admin-portal .admin-page-shell .layout-fullwidth-table,
.admin-portal .admin-page-shell .layout-fullwidth-table > .section-table {
    margin-top: 0 !important;
}

.admin-portal .admin-page-shell :is(.admin-list-toolbar, .contact-admin-filters, .testimonial-admin-filters, .booking-admin-filters, .template-toolbar, .document-filters) {
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--admin-list-line);
    border-radius: 0;
    gap: 8px;
    margin: 0;
    padding: 14px;
}
.admin-portal .admin-page-shell :is(.contact-search-field, .testimonial-search-field) > i {
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-list-muted);
}
.admin-portal .admin-page-shell :is(.contact-search-field, .testimonial-search-field) input {
    padding-left: 36px;
}
.admin-portal .admin-page-shell :is(.admin-list-toolbar, .template-toolbar, .document-filters) :is(input:not([type="checkbox"]), select) {
    min-height: 32px;
    height: 32px;
    font-size: 14px;
    border: 1px solid #9f9f9f;
    border-radius: 4px;
}
.admin-portal .admin-page-shell .template-toolbar .search-box {
    height: 32px;
    border: 1px solid #9f9f9f;
    border-radius: 4px;
    background: #fff;
}
.admin-portal .admin-page-shell .template-toolbar .search-box input {
    height: 30px !important;
    min-height: 30px !important;
    border: 0 !important;
    box-shadow: none;
}
.admin-portal .admin-page-shell .template-toolbar .search-box:focus-within {
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .15);
}
.admin-portal .admin-page-shell .template-toolbar .icon-button {
    width: 32px;
    height: 32px;
    border: 1px solid #9f9f9f;
    border-radius: 4px;
}
.admin-portal .admin-page-shell :is(.admin-list-toolbar, .document-filters, .template-toolbar) :is(small, label),
.admin-portal .admin-page-shell :is(.contact-table-summary, .testimonial-table-summary, .booking-table-summary) {
    color: var(--admin-list-muted);
    font-size: 12px;
}

/* Include modules with their own table markup as well as Bootstrap tables. */
.admin-portal .admin-page-shell :is(table.table, table.template-table, .employee-table > table) {
    --bs-table-color: var(--admin-list-ink);
    --bs-table-bg: #fff;
    --bs-table-border-color: var(--admin-list-line);
    --bs-table-striped-bg: #fff;
    --bs-table-striped-color: var(--admin-list-ink);
    --bs-table-hover-bg: #f3f8fc;
    --bs-table-hover-color: var(--admin-list-ink);
    --bs-table-active-bg: #e8f3f7;
    --bs-table-active-color: var(--admin-list-ink);
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    border: 0;
    color: var(--admin-list-ink);
    font-size: 13px;
    line-height: 20px;
}
.admin-portal .admin-page-shell :is(table.table, table.template-table, .employee-table > table) > :is(thead, tbody, tfoot) > tr {
    border-width: 0;
}
.admin-portal .admin-page-shell :is(table.table, table.template-table, .employee-table > table) > thead > tr > th {
    background: var(--admin-list-heading);
    color: #000;
    border: 0;
    border-bottom: 1px solid var(--admin-list-line);
    padding: 4px 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: normal;
    text-transform: none;
    vertical-align: middle;
    white-space: nowrap;
}
.admin-portal .admin-page-shell :is(table.table, table.template-table, .employee-table > table) > tbody > tr > :is(td, th) {
    border: 0;
    border-bottom: 1px solid var(--admin-list-line);
    padding: 8px 6px;
    color: var(--admin-list-ink);
    font-size: 13px;
    line-height: 20px;
    vertical-align: middle;
}
.admin-portal .admin-page-shell :is(table.template-table, .employee-table > table) > tbody > tr:hover {
    background: #f3f8fc;
}
.admin-portal .admin-page-shell table > tbody > tr.active > :is(td, th) {
    background: var(--primary-color);
    color: #fff;
}
.admin-portal .admin-page-shell table :is(.text-muted, .document-model, .catalog-tag) {
    color: var(--admin-list-muted) !important;
}
.admin-portal .admin-page-shell table :is(.badge, .access-badge, .status-pill, .contact-status-badge, .testimonial-status-badge, .admin-list-status) {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    border: 0;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    white-space: nowrap;
}
.admin-portal .admin-page-shell table :is(.badge.bg-success, .badge.text-bg-success, .status-badge--success, .access-badge--active, .status-pill.is-active, .testimonial-status-badge.is-active, .contact-status-badge.is-responded, .admin-list-status--completed) {
    background: #e6f7ef !important;
    color: #009b69 !important;
}
.admin-portal .admin-page-shell table :is(.access-badge--inactive, .status-pill.is-inactive, .testimonial-status-badge.is-hidden, .admin-list-status--queued) {
    background: #eef2f5;
    color: #718096;
}
.admin-portal .admin-page-shell .admin-list-status {
    background: #e8f5f9;
    color: #0085a3;
}
.admin-portal .admin-page-shell :is(.admin-list-status--failed, .admin-list-status--rejected) {
    background: #fff0f3;
    color: #d92d4c;
}
.admin-portal .admin-page-shell :is(.admin-list-status--waiting_quota, .admin-list-status--waiting_provider) {
    background: #fff5df;
    color: #946200;
}

.admin-portal .admin-page-shell table :is(.btn, .button-theme, .row-actions > a, .row-actions > button, .testimonial-row-actions > button),
.admin-portal .admin-page-shell .ai-documents-page .document-actions .btn {
    height: 28px !important;
    min-height: 28px !important;
    border-radius: 4px;
    padding: 3px 8px !important;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px !important;
    white-space: nowrap;
}
.admin-portal .admin-page-shell table :is(.btn-light, .btn-outline-secondary, .button-theme_light, .row-actions > a, .row-actions > button, .testimonial-row-actions > button) {
    background: #fff;
    border: 1px solid #8292a1;
    color: #637b90 !important;
}
.admin-portal .admin-page-shell table :is(.btn-primary, .btn-outline-primary, .button-theme_primary) {
    background: #fff;
    border: 1px solid #0085a3;
    color: #0085a3 !important;
}
.admin-portal .admin-page-shell table :is(.btn-success, .btn-outline-success) {
    background: #fff;
    border: 1px solid #009b69;
    color: #009b69 !important;
}
.admin-portal .admin-page-shell table :is(.btn-danger, .btn-outline-danger, .button-theme_danger, .row-actions > .is-danger, .testimonial-row-actions > .is-delete) {
    background: #fff !important;
    border: 1px solid #ff3555;
    color: #ff3555 !important;
}
.admin-portal .admin-page-shell table .button-theme img {
    /* Legacy edit/delete assets are white PNGs intended for filled buttons. */
    filter: brightness(0) saturate(100%);
    opacity: .55;
}
.admin-portal .admin-page-shell table :is(.btn, .button-theme, .row-actions > a, .row-actions > button, .testimonial-row-actions > button):hover:not(:disabled) {
    background: #edf6f8 !important;
}
.admin-portal .admin-page-shell :is(.admin-list-pager, .document-pagination) {
    background: #fff;
    border-top: 1px solid var(--admin-list-line);
    color: var(--admin-list-muted);
    padding: 12px 14px;
    font-size: 12px;
}

/* AI document filters share the same edge-to-edge panel as the other lists. */
.admin-portal .admin-page-shell .ai-document-admin {
    padding: 0;
}
.admin-portal .admin-page-shell .ai-document-admin > h2,
.admin-portal .admin-page-shell .ai-document-admin > .alert {
    margin: 14px;
}
.admin-portal .admin-page-shell .document-filters label {
    gap: 4px;
}
@media (max-width: 600px) {
    .admin-portal .admin-page-shell .document-filters {
        align-items: stretch;
    }
    .admin-portal .admin-page-shell .document-filters label {
        width: 100%;
        min-width: 0;
    }
}
