/* Dataveli Cart — admin.css
 * Admin-only bundle loaded after base.css in layouts/admin.php.
 * Owns admin shell/header, admin DataTable filter bars, product/category
 * management modals, image manager, timeline widgets, and admin-only badges.
 * Shared catalog primitives used by admin tables stay in base.css.
 *
 * TABLE OF CONTENTS
 * -----------------
 *  §18  Admin Header
 *  §24  Admin Avatar Thumbnails
 *  §23  Admin Status Badges
 *  §21  Admin Manual
 *  §22  Admin Filter Bars
 *  §51  Main Image Badge
 *  §49  Admin Image Manager
 *  §49b Upload Timeline Widget
 *  §50  Admin Product Edit Modal
 *  §50b Variant List
 *  §25  Admin Page Transitions
 *  §53  Customer Journey Timeline
 *  §54  Admin Category Tree Tab
 *  §55  Admin Live Monitor View
 *  Admin product modal polish / product view modal dark-glass overrides
 */

/* ======================================================================= */
/*  * admin-form-modal base layout (mirrors shop.css; admin pages don't    */
/*  * load shop.css so the flex structure/padding must live here too)       */
/* ======================================================================= */
.admin-form-modal-panel {
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 100%);
    width: 50vw;
    padding: 0;
    overflow: hidden;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.admin-form-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}
.admin-form-modal-header,
.admin-form-modal-footer {
    flex: 0 0 auto;
    padding: 1.25rem 1.5rem;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    max-height: 80px;
    height: 80px;
}
.admin-form-modal-header {
    border-bottom: 1px solid var(--line-soft);
}
.admin-form-modal-footer {
    border-top: 1px solid var(--line-soft);
}
.admin-form-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.5rem 2rem 2.5rem;
    min-height: 0;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 130, 180, 0.40) transparent;
    -ms-overflow-style: auto;
}
.admin-form-modal-body::-webkit-scrollbar { display: block; width: 6px; }
.admin-form-modal-body::-webkit-scrollbar-thumb { background: rgba(100, 130, 180, 0.40); border-radius: 3px; }
.admin-form-modal-body::-webkit-scrollbar-track { background: transparent; }

/* ── News modal media library picker ────────────────────────────────────── */
.news-media-picker {
    border: 1px solid rgba(142, 174, 226, 0.28);
    border-radius: 6px;
    margin-top: .5rem;
    overflow: hidden;
}
.news-media-picker__toolbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    background: rgba(8, 24, 52, 0.40);
    border-bottom: 1px solid rgba(142, 174, 226, 0.18);
    flex-wrap: wrap;
}
.news-media-picker__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 6px;
    padding: .75rem;
    max-height: 240px;
    overflow-y: auto;
    background: rgba(7, 18, 42, 0.30);
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 130, 180, 0.35) transparent;
}
.news-media-picker__grid::-webkit-scrollbar { width: 5px; }
.news-media-picker__grid::-webkit-scrollbar-thumb { background: rgba(100, 130, 180, 0.35); border-radius: 3px; }
.news-media-picker__item {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color .15s;
    position: relative;
}
.news-media-picker__item:hover { border-color: rgba(142, 174, 226, 0.70); }
.news-media-picker__item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    background: rgba(8, 24, 52, 0.55);
}
.news-media-picker__item span {
    display: block;
    font-size: .6rem;
    line-height: 1.2;
    padding: 2px 3px;
    color: rgba(226, 232, 240, 0.80);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(7, 18, 42, 0.70);
}
.news-media-picker__type-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: .5rem;
    padding: 1px 3px;
    border-radius: 2px;
    background: rgba(0,0,0,.55);
    color: rgba(226,232,240,.80);
    pointer-events: none;
}
.news-media-picker__empty {
    grid-column: 1 / -1;
    padding: 1.5rem;
    text-align: center;
    color: rgba(226, 232, 240, 0.50);
    font-size: .85rem;
}

/* ======================================================================= */
/*  * ▶ Start of §18  Admin Header                                         */
/* ======================================================================= */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.25rem;          /* 20px horizontal */
    height: 3.25rem;             /* fixed height — crisp single band */
    min-height: 3.25rem;
    margin-bottom: 0.618rem;
}

/* ======================================================================= */
/*  * ◀ End of   §18  Admin Header                                         */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §24  Admin Avatar Thumbnails                              */
/* ======================================================================= */

/* ---- Admin customer/subscriber avatar thumbnails ---- */
.admin-customer-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.12);
    cursor: zoom-in;
}
.admin-customer-avatar--empty {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    flex-shrink: 0;
    display: inline-block;
}
.admin-customer-view-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.12);
    cursor: zoom-in;
    display: block;
    margin-bottom: 0.35rem;
}
.admin-customer-modal-heading {
    min-width: 0;
}
.admin-customer-modal-heading .text-xl.font-bold.text-flag-blue {
    line-height: 1.1;
}
.admin-customer-modal-subtitle {
    margin: 0.125rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.2;
    color: rgba(255,255,255,0.82);
    overflow-wrap: anywhere;
    word-break: break-word;
}
body.theme-light .admin-customer-modal-subtitle,
body.theme-mixed .admin-customer-modal-subtitle {
    color: rgba(17,24,39,0.78);
}

table.dataTable tbody .admin-table-action-btn {
    width: 6rem;
    min-width: 6rem;
    flex: 0 0 6rem;
}
/* 2×2 action button grid for rows with many buttons */
.dt-row-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 12.5rem;
}
.dt-row-actions-grid .btn {
    width: 100% !important;
    min-width: 0 !important;
    flex: unset !important;
}

/* ======================================================================= */
/*  * ◀ End of   §24  Admin Avatar Thumbnails                              */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §23  Admin Status Badges                                  */
/* ======================================================================= */

/* ---- Admin status badges (Aktiivinen / Piilossa) ---- */
.admin-badge-active {
    display: inline-block;
    padding: .125rem .5rem;
    border-radius: .25rem;
    font-size: .75rem;
    font-weight: 700;
    color: rgb(0, 113, 49);
    letter-spacing: .01em;
}
.admin-badge-inactive {
    display: inline-block;
    padding: .125rem .5rem;
    border-radius: .25rem;
    font-size: .75rem;
    font-weight: 500;
    color: rgb(226, 65, 1);
    letter-spacing: .01em;
}
.order-status-filter-bar,
.order-status-filter-bar.glass {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 3.55rem;
    z-index: 8;
    background: rgba(255, 255, 255, 0.44) !important;
    -webkit-backdrop-filter: blur(28px) saturate(170%);
    backdrop-filter: blur(28px) saturate(170%);
    border-color: rgba(255, 255, 255, 0.28) !important;
    box-shadow:
        0 18px 34px rgba(0, 53, 128, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.order-status-filter-switches {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}
.order-status-filter-select-wrap {
    width: min(18rem, 100%);
    flex: 0 1 18rem;
}
.order-status-filter-select-wrap .select {
    width: 100%;
    border: 1px solid rgba(156, 163, 175, 0.34);
}
.admin-product-filter-category-wrap {
    width: 240px;
    flex: 0 0 auto;
}
.admin-product-filter-category-wrap .select2-container {
    width: 100% !important;
}
.catalog-filters-card.is-sticky .order-status-switch {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    min-width: 8.5rem;
    border: 1px solid rgba(156, 163, 175, 0.32);
    background: rgba(255, 255, 255, 0.56);
    color: var(--ink);
    padding: .45rem .7rem;
    border-radius: .55rem;
    font-size: .875rem;
    line-height: 1.2;
    max-height: 38px;
    min-height: 38px;
    height: 38px;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
    box-sizing: border-box;
}
.catalog-filters-card:not(.is-sticky) .order-status-switch {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    min-width: 8.5rem;
    border: 1px solid rgba(156, 163, 175, 0.32);
    background: rgba(255, 255, 255, 0.56);
    color: var(--ink);
    padding: .45rem .7rem;
    border-radius: .55rem;
    font-size: .875rem;
    line-height: 1.2;
    max-height: 38px;
    min-height: 38px;
    height: 38px;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
    box-sizing: border-box;
}


.order-status-switch:hover,
.order-status-switch:focus-visible {
    border-color: rgba(0, 53, 128, 0.28);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.order-status-switch__label {
    font-weight: 600;
}
.order-status-switch__ui {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 2.4rem;
    height: 1.4rem;
    padding: .14rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.46);
    transition: background .18s ease;
    flex: 0 0 auto;
}
.order-status-switch__thumb {
    width: 1.12rem;
    height: 1.12rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
    transform: translateX(0);
    transition: transform .18s ease;
}
.order-status-switch.is-active {
    border-width: 2px;
    border-color: #777;
}
.order-status-switch.is-active .order-status-switch__ui {
    background: rgba(0, 53, 128, 0.84);
}
.order-status-switch.is-active .order-status-switch__thumb {
    transform: translateX(1rem);
}
/* base.css applies border-radius:0!important globally — restore pill shape in admin */
.order-status-switch__ui {
    border-radius: 999px !important;
}
.order-status-switch__thumb {
    border-radius: 999px !important;
    transition: transform .22s cubic-bezier(.4,0,.2,1) !important;
}

/* ── Admin news filter bar collapse animation ─────────────────────────── */
.admin-news-filters-card .admin-news-toolbar-body {
    overflow: hidden;
    max-width: 640px;
    opacity: 1;
    transition: max-width .28s ease, opacity .22s ease;
}
.admin-news-filters-card.is-collapsed .admin-news-toolbar-body {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
}
.admin-news-spotlight-section {
    flex-shrink: 0;
}

/* ── News create/edit modal — product-modal colour treatment ──────────────── */
#news-edit-modal .modal-panel,
#news-edit-modal .admin-form-modal-header,
#news-edit-modal .admin-form-modal-body,
#news-edit-modal .admin-form-modal-footer {
    background: rgba(11, 29, 58, 0.22) !important;
    color: #ffffff !important;
}
#news-edit-modal .modal-panel {
    -webkit-backdrop-filter: blur(22px) saturate(165%) !important;
    backdrop-filter: blur(22px) saturate(165%) !important;
    border-color: rgba(142, 174, 226, 0.28) !important;
}
#news-edit-modal .admin-form-modal-header {
    border-bottom-color: rgba(142, 174, 226, 0.24) !important;
}
#news-edit-modal .admin-form-modal-footer {
    border-top-color: rgba(142, 174, 226, 0.24) !important;
}
#news-edit-modal label,
#news-edit-modal .text-gray-500,
#news-edit-modal .text-gray-600,
#news-edit-modal .text-gray-700,
#news-edit-modal .text-flag-blue {
    color: #e2e8f0 !important;
}
#news-edit-modal h3 {
    color: #e2e8f0 !important;
    text-shadow: none !important;
}
#news-edit-modal .input,
#news-edit-modal .select,
#news-edit-modal textarea {
    background: rgba(8, 24, 52, 0.55) !important;
    border-color: rgba(142, 174, 226, 0.32) !important;
    color: #f8fafc !important;
}
#news-edit-modal .input::placeholder,
#news-edit-modal textarea::placeholder {
    color: rgba(226, 232, 240, 0.48) !important;
}
#news-edit-modal .modal-close {
    color: rgba(226, 232, 240, 0.86) !important;
}
#news-edit-modal .modal-close:hover {
    color: #ffffff !important;
}

.dt-container .dt-paging .paginate_button.current,
.dt-container .dt-paging .paginate_button.current:hover,
.dt-container .dt-paging a.paginate_button.current,
.dt-container .dt-paging a.paginate_button.current:hover {
    background: var(--finland-blue, #003580) !important;
    color: #ffffff !important;
    border-color: var(--finland-blue, #003580) !important;
    font-weight: 700 !important;
}
.dt-container .datatable-toolbar,
.dt-container .datatable-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    flex-wrap: wrap;
}
.dt-container .datatable-toolbar {
    margin-bottom: .9rem;
}
.dt-container .datatable-footer {
    margin-top: .9rem;
}
/* ── Paged comment/review list controls ──────────────────────────────────── */
.js-paged-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 0 .15rem;
    margin-top: .25rem;
}
.paged-list-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    background: var(--glass-bg, rgba(255,255,255,0.5));
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink, #1f2937);
    transition: background .13s, border-color .13s, box-shadow .13s;
    flex-shrink: 0;
}
.paged-list-btn:hover {
    background: rgba(0,48,135,0.08);
    border-color: rgba(0,48,135,0.3);
    box-shadow: 0 0 0 2px rgba(0,48,135,0.08);
}
.paged-list-count {
    font-size: .72rem;
    color: var(--muted-1, #6b7280);
    min-width: 3rem;
    text-align: center;
    white-space: nowrap;
}
.paged-list-btn--thread {
    font-size: .75rem;
    opacity: .7;
    margin-left: .2rem;
}
.paged-list-btn--thread:hover {
    opacity: 1;
    background: rgba(0,48,135,0.12);
    border-color: rgba(0,48,135,0.35);
}
/* ── DataTable shimmer skeleton ─────────────────────────────────────────── */
@keyframes dtShimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}
.dt-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* height set by JS: calc(100vh - offsetTop) */
    z-index: 10;
    border-radius: .5rem;
    overflow: hidden;
    pointer-events: none;
    /* Inherit the glass card background so it blends in */
    background: var(--surface-soft, rgba(255,255,255,0.72));
    opacity: 1;
    transition: opacity 0.35s ease;
    display: flex;
    flex-direction: column;
    padding: .5rem 0;
}
.dt-skeleton--done {
    opacity: 0;
    transition: opacity 320ms ease-out;
}
.dt-skeleton__head {
    display: flex;
    gap: .75rem;
    padding: .55rem 1rem .55rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
    margin-bottom: .25rem;
}
.dt-skeleton__row {
    display: flex;
    gap: .75rem;
    padding: .52rem 1rem;
}
.dt-skeleton__row:nth-child(odd) {
    background: rgba(0,0,0,.018);
}
.dt-skeleton__cell {
    flex: 1;
    display: flex;
    align-items: center;
}
.dt-skeleton__cell--head .dt-skeleton__bar {
    height: .7rem;
    border-radius: .2rem;
    opacity: .55;
}
.dt-skeleton__bar {
    display: block;
    height: .65rem;
    border-radius: .25rem;
    background: linear-gradient(
        90deg,
        rgba(0,0,0,.06) 25%,
        rgba(0,0,0,.13) 50%,
        rgba(0,0,0,.06) 75%
    );
    background-size: 600px 100%;
    animation: dtShimmer 1.4s ease-in-out infinite;
}
/* Stretch variant: fills parent container without a fixed height */
.dt-skeleton--stretch {
    bottom: 0;
    height: auto !important;
}
/* ─────────────────────────────────────────────────────────────────────────── */
.dt-container .datatable-toolbar {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.dt-container .datatable-toolbar__left,
.dt-container .datatable-toolbar__right {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
/* Center slot: takes remaining space, centres its chips */
.dt-container .datatable-toolbar__center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem;
    min-width: 0;
}

/* ======================================================================= */
/*  * ◀ End of   §23  Admin Status Badges                                  */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §21  Admin Manual                                         */
/* ======================================================================= */

/* ---------- Admin manual ---------- */
.manual-copy-body {
    color: #334155;
}
.manual-copy-soft {
    color: #64748b;
}
.manual-subheading {
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--finland-blue, #003580);
    margin-top: 1.25rem;
    margin-bottom: .35rem;
}
.manual-list {
    list-style: disc;
    padding-left: 1.35rem;
    margin-top: .25rem;
    margin-bottom: .5rem;
}
.manual-list li {
    font-size: .875rem;
    line-height: 1.75;
    color: #334155;
    padding-left: .15rem;
}
.manual-list li + li {
    margin-top: .15rem;
}
.manual-nav-link {
    position: relative;
    color: var(--ink);
    text-decoration: none;
    transition: background .22s ease, color .22s ease, transform .22s ease;
}
.manual-nav-link::after {
    content: "";
    position: absolute;
    left: .75rem;
    right: .75rem;
    bottom: .42rem;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .42s cubic-bezier(.65, 0, .35, 1), opacity .22s ease;
    opacity: .92;
    pointer-events: none;
}

/* ======================================================================= */
/*  * ◀ End of   §21  Admin Manual                                         */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §22  Admin Filter Bars                                    */
/* ======================================================================= */

/* Reset button: consistent min-width across all admin filter bars */
.admin-product-filters-card .catalog-reset-wrap,
.admin-order-filters-card .catalog-reset-wrap,
.admin-category-filters-card .catalog-reset-wrap,
.admin-subscriber-filters-card .catalog-reset-wrap,
.admin-customer-filters-card .catalog-reset-wrap {
    min-width: 5.5rem;
}
/* Admin filterbar reset: always visible in row 1 (not hidden when collapsed) */
.admin-product-filters-card .catalog-toolbar > .catalog-reset-wrap,
.admin-order-filters-card .catalog-toolbar > .catalog-reset-wrap,
.admin-category-filters-card .catalog-toolbar > .catalog-reset-wrap,
.admin-subscriber-filters-card .catalog-toolbar > .catalog-reset-wrap,
.admin-customer-filters-card .catalog-toolbar > .catalog-reset-wrap {
    display: inline-flex !important;
}
/* Primary filters row */
.catalog-toolbar .admin-product-primary-switch {
    height: 38px !important;
    min-height: 38px !important;
}
/* Secondary filters row */
.admin-product-secondary-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .5rem;
    padding-top: .25rem;
}
/* All secondary toggle switches: flex to fill row space equally */
.admin-product-secondary-filters .admin-product-secondary-switch {
    flex: 1 1 8.5rem;
    min-width: 8.5rem;
    max-width: none;
    height: 38px;
    min-height: 38px;
    padding: .45rem .6rem;
    gap: .4rem;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}
.admin-product-secondary-filters .admin-product-secondary-switch .order-status-switch__label {
    font-size: .875rem !important;
    font-weight: 600 !important;
    line-height: 1.15;
    white-space: normal;
    text-wrap: balance;
}


/* ======================================================================= */
/*  * ◀ End of   §22  Admin Filter Bars                                    */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §51  Main Image Badge                                     */
/* ======================================================================= */

/* --- Main image badge ------------------------------------------------- */
.pf-main-image-preview-wrap {
    display: inline-flex;
    flex: 0 0 80px;
    width: 80px;
    min-width: 80px;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.pf-main-image-preview-frame {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(255,255,255,0.45);
}
.pf-main-image-preview-img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: cover;
}
.pf-main-image-badge {
    display: block;
    max-width: 80px;
    background: rgba(0,0,0,0.62);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
    padding: 0.12rem 0.35rem;
    border-radius: 0.3rem;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pf-main-image-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    border: 1px solid rgba(142, 174, 226, 0.28);
    border-radius: 0.5rem;
    background: rgba(8, 24, 52, 0.38);
}
.pf-main-image-card__body {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.55rem;
}
.pf-main-image-card__title {
    color: rgba(248, 250, 252, 0.94) !important;
    font-size: 0.86rem;
    font-weight: 700;
}
.pf-main-image-card__actions,
.pf-media-action-row,
.pf-gallery-actions,
.pf-video-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.pf-media-edit-panel {
    padding: 0.75rem;
    border: 1px solid rgba(142, 174, 226, 0.24);
    border-radius: 0.5rem;
    background: rgba(8, 24, 52, 0.28);
}
.pf-media-text-btn {
    min-height: 2rem;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.78rem !important;
    line-height: 1.1 !important;
    white-space: nowrap;
}
.pf-primary-image-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
}
.pf-primary-image-meta-grid__wide {
    grid-column: 1 / -1;
}
.pf-gallery-thumb {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.4rem 0.5rem;
}
.pf-gallery-thumb > .relative {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(255,255,255,0.45);
}
.pf-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pf-gallery-actions {
    width: 100%;
    justify-content: stretch;
}
.pf-gallery-actions .btn {
    flex: 1 1 auto;
}


/* ======================================================================= */
/*  * ◀ End of   §51  Main Image Badge                                     */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §49  Admin Image Manager                                  */
/* ======================================================================= */

/* --- Admin image manager --------------------------------------------- */
.admin-images-page .admin-image-url-cell {
    max-width: min(44rem, 48vw);
    white-space: normal;
    overflow-wrap: anywhere;
}
.admin-images-page .admin-image-url-cell code {
    font-size: 0.76rem;
    line-height: 1.35;
}
.admin-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: flex-end;
}
.admin-images-page .admin-img-action-btn {
    width: auto;
    min-width: 6rem;
    height: auto;
    object-fit: initial;
    padding: 0.25rem 0.55rem !important;
    font-size: 0.74rem !important;
    line-height: 1.2;
}
.admin-image-actions .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.admin-product-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 8rem;
    align-items: stretch;
}
.admin-product-actions-row {
    display: grid;
    gap: 0;
}
.admin-product-actions-row--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-product-actions-row--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-product-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: auto;
    flex: unset !important;
    padding: 0.2rem 0.25rem !important;
    font-size: 0.7rem !important;
    line-height: 1.2;
    white-space: nowrap;
}
.admin-product-action-btn--icon {
    padding: 0.25rem 0.4rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
table.dataTable tbody .admin-product-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    flex: unset !important;
    padding: 0.2rem 0.25rem !important;
    font-size: 0.7rem !important;
    line-height: 1.2;
}
.admin-image-status {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted-700);
    padding: 0.15rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}
.admin-image-status--convertible {
    border-color: rgba(37, 99, 235, 0.28);
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}
.admin-image-status--webp {
    border-color: rgba(5, 150, 105, 0.28);
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
}
.admin-image-status--missing {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}
.admin-image-status--gif {
    border-color: rgba(217, 119, 6, 0.28);
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}
.admin-image-status--svg {
    border-color: rgba(124, 58, 237, 0.28);
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
}

/* ======================================================================= */
/*  * ◀ End of   §49  Admin Image Manager                                  */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §49b  Upload Timeline Widget                              */
/* ======================================================================= */

/* --- Upload timeline widget ------------------------------------------ */
.pf-upload-timeline {
    margin-top: 0.4rem;
    padding: 0.5rem 0.6rem 0.55rem;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.45);
    border: 1px solid rgba(0,53,128,0.12);
    box-shadow: 0 1px 4px rgba(0,53,128,0.06);
}
.pf-upload-timeline__bar {
    height: 5px;
    border-radius: 3px;
    background: rgba(0,53,128,0.10);
    overflow: hidden;
    margin-bottom: 0.45rem;
}
.pf-upload-timeline__fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #003580 0%, #2563eb 100%);
    width: 0%;
    transition: width 0.35s cubic-bezier(.4,0,.2,1);
}
.pf-upload-timeline__fill.is-error {
    background: #dc2626;
    transition: width 0.15s ease;
}
.pf-upload-timeline__fill.is-done {
    background: #16a34a;
}
.pf-upload-timeline__steps {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 0.7rem;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}
.pf-upload-step {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    color: #9ca3af;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}
.pf-upload-step.is-active { color: #003580; font-weight: 700; }
.pf-upload-step.is-done   { color: #16a34a; font-weight: 600; }
.pf-upload-step.is-error  { color: #dc2626; font-weight: 700; }
.pf-upload-step__icon {
    width: 1.1rem; height: 1.1rem;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}
.pf-upload-step.is-active .pf-upload-step__icon {
    background: #003580; border-color: #003580; color: #fff;
    animation: pf-step-pulse 1s ease-in-out infinite;
}
.pf-upload-step.is-done .pf-upload-step__icon   { background: #16a34a; border-color: #16a34a; color: #fff; }
.pf-upload-step.is-error .pf-upload-step__icon  { background: #dc2626; border-color: #dc2626; color: #fff; }
@keyframes pf-step-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}
.pf-upload-step-sep {
    flex: 1;
    min-width: 0.4rem;
    height: 1.5px;
    background: #e5e7eb;
    margin: 0 0.18rem;
    transition: background 0.3s;
}
.pf-upload-step-sep.is-done { background: #16a34a; }
.pf-upload-timeline__status {
    font-size: 0.7rem;
    color: #6b7280;
    min-height: 0.85rem;
    transition: color 0.2s;
}
.pf-upload-timeline__status.is-error { color: #dc2626; }
.pf-upload-timeline__status.is-done  { color: #16a34a; }
.profile-pic-upload-panel {
    width: min(95vw, 35rem);
    max-width: 35rem;
    padding: 1.618rem !important;
}
.profile-pic-upload-panel .pf-upload-timeline {
    width: 100%;
    margin-top: 0.75rem;
    padding: 1.618rem !important;
}
.profile-pic-preview-wrap {
    width: 100%;
    min-height: 10rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.45);
    border: 1px solid rgba(0,53,128,0.12);
    box-shadow: 0 1px 4px rgba(0,53,128,0.06);
}
.profile-pic-preview-img {
    display: block;
    max-width: 100%;
    max-height: 16rem;
    object-fit: contain;
    border-radius: 0.375rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

/* ======================================================================= */
/*  * ◀ End of   §49b  Upload Timeline Widget                              */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §50  Admin Product Edit Modal                             */
/* ======================================================================= */

/* --- Product edit modal section layout -------------------------------- */
.pf-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.13);
}
.pf-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.pf-section-hd {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.68rem;
    color: black;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.09);
}
.pf-section-icon {
    font-size: 0.9rem;
    line-height: 1;
    opacity: 0.85;
}
/* Light theme overrides */
.pf-section { border-top-color: rgba(0,53,128,0.10); }
.pf-section-hd {
    color: rgba(0,53,128,0.55);
    border-bottom-color: rgba(0,53,128,0.07);
}
/* Footer nav scroll buttons */
.pf-footer-nav {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.pf-footer-nav-btn {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.pf-footer-nav-btn:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}
.pf-footer-nav-btn {
    border-color: rgba(0,53,128,0.5);
    background: rgba(0,53,128,0.05);
    color: rgba(0,53,128,0.618);
}
.pf-footer-nav-btn:hover {
    background: rgba(0,53,128,0.12);
    color: #003580;
}
/* ── Redesigned product-modal tabbed layout ──────────────────────────── */
.pf-redesigned .modal-panel,
.modal-panel.pf-redesigned { max-width: 900px; }

.pf-tab-layout {
    display: flex;
    min-height: 480px;
    border-top: 1px solid rgba(255,255,255,.1);
}

/* Left tab rail */
.pf-tab-rail {
    display: flex;
    flex-direction: column;
    width: 156px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,.1);
    padding: .5rem .375rem;
    gap: .25rem;
    background: rgba(0,0,0,.08);
}
.pf-tab-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .6rem;
    border-radius: .6rem;
    border: none;
    background: transparent;
    color: var(--ink, #1e293b);
    cursor: pointer;
    font-size: .78rem;
    font-weight: 500;
    text-align: left;
    transition: background .12s, color .12s;
    position: relative;
}
.pf-tab-btn:hover { background: rgba(255,255,255,.12); }
.pf-tab-btn.is-active {
    background: rgba(0,91,187,.18);
    color: var(--flag-blue, #003580);
    font-weight: 700;
}
.pf-tab-icon { font-size: 1rem; flex-shrink: 0; }
.pf-tab-label { flex: 1; min-width: 0; }
.pf-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--flag-blue,.003580);
    color: #fff;
    border-radius: 99px;
    font-size: .65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
}

/* Right tab body */
.pf-tab-body {
    flex: 1;
    min-width: 0;
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    max-height: 66vh;
}
.pf-tab-pane { display: none; }
.pf-tab-pane.is-active { display: block; }

.pf-pane-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--flag-blue, #003580);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

/* Subsection within a pane */
.pf-subsection {
    border: 1px solid rgba(255,255,255,.12);
    border-radius: .75rem;
    padding: .875rem 1rem;
    background: rgba(255,255,255,.035);
}
.pf-subsection-hd {
    font-size: .8rem;
    font-weight: 700;
    color: var(--flag-blue, #003580);
    margin-bottom: .75rem;
}

/* Short label */
.pf-label {
    display: block;
    font-size: .72rem;
    color: #64748b;
    margin-bottom: .2rem;
}

.pf-tz-badge {
    font-size: .65rem;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: .01em;
}
/* Stats row in basics tab */
.pf-stat-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}
.pf-stat-card {
    flex: 1;
    min-width: 80px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: .65rem;
    padding: .5rem .75rem;
    background: rgba(255,255,255,.04);
    text-align: center;
}
.pf-stat-val { font-size: 1.15rem; font-weight: 700; color: var(--flag-blue,.003580); }
.pf-stat-key { font-size: .65rem; color: #94a3b8; margin-top: .1rem; }

/* Info rows in settings tab */
.pf-info-row {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: .35rem 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.pf-info-key { font-size: .72rem; color: #94a3b8; width: 7rem; flex-shrink: 0; }
.pf-info-val { font-size: .8rem; color: var(--ink, #1e293b); word-break: break-all; }

/* Footer nav buttons now jump to tabs */
.pf-footer-nav-btn[data-pf-tab] { cursor: pointer; }

/* Gallery still uses the same grid */
.pf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 9.5rem));
    gap: 0.625rem;
}
.pf-gallery-item {
    min-width: 0;
    overflow: hidden;
}
.pf-gallery-item.pf-gallery-item--full {
    grid-column: 1 / -1;
}
.pf-video-item {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0.75rem;
    border: 1px solid rgba(100, 160, 255, 0.28);
    border-radius: 0.5rem;
    background: rgba(0, 60, 180, 0.12);
}
.pf-video-main-row {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr) minmax(9rem, auto);
    gap: 0.75rem;
    align-items: start;
}
.pf-video-preview {
    width: 9rem;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
    border-radius: 0.45rem;
}
.pf-video-actions {
    justify-content: flex-end;
    max-width: 14rem;
}
.pf-video-actions .btn {
    flex: 1 1 100%;
}
.pf-add-gallery-sticky {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 0.5rem 0 0;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* ======================================================================= */
/*  * ◀ End of   §50  Admin Product Edit Modal                             */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §50b  Variant List                                        */
/* ======================================================================= */

/* --- Variant list: sticky add-button, collapsible bodies ------------- */
.pf-add-variant-sticky {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 0.5rem 0 0;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pf-variant-item {
    border-radius: 3px !important;
}
.pf-variant-header {
    user-select: none;
    border-radius: 3px;
    transition: background 0.15s;
}
.pf-variant-item:not([data-collapsed]) > .pf-variant-header {
    border-radius: 3px 3px 0 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.pf-variant-header:hover {
    background: rgba(255,255,255,0.08);
}
.pf-variant-chevron {
    color: rgba(255,255,255,0.5);
    transition: transform 0.18s;
}
.pf-variant-item:not([data-collapsed]) > .pf-variant-header .pf-variant-chevron {
    transform: rotate(90deg);
}
.pf-variant-body {
    display: none;
    padding: 0.75rem;
}
.pf-variant-item:not([data-collapsed]) > .pf-variant-body {
    display: block;
}
.pv-variant-summary {
    opacity: 0.6;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16rem;
}

.admin-view-modal-panel {
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 900px);
    overflow: hidden;
    background: var(--glass-bg);
    /* Suppress the base .modal-panel scroll — inner body handles it */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    padding-left: 32px;
    padding-right: 32px;
    padding-bottom: 1.5rem;
}
.admin-view-modal-header,
.admin-view-modal-footer {
    flex: 0 0 auto;
    max-height: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(0,0,0,0) !important;
    background-color: rgba(0,0,0,0) !important;
    padding: 0.35rem 1.618rem;
}
.admin-view-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.5rem;
    padding-left: 2rem;
    padding-bottom: 2.5rem;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    /* Custom scrollbar rail — hide native */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.admin-view-modal-body::-webkit-scrollbar { display: none; width: 0; }
.admin-view-modal-footer {
    border-top: 1px solid var(--line-soft);
    flex: 0 0 auto;
    background: rgba(0,0,0,0) !important;
    background-color: rgba(0,0,0,0) !important;
}
.admin-view-modal-footer .btn {
    width: 120px;
    height: 38px;
}

/* ── Admin confirm modal — structured header / body / footer ────────────── */
/* Panel: inherit admin-form-modal-panel flex layout; fix width + frame     */
.admin-confirm-modal-panel {
    width: min(90vw, 460px);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(142, 174, 226, 0.30) !important;
    box-shadow:
        0 28px 64px rgba(2, 8, 28, 0.62),
        inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}
/* Override height:80px on header/footer — compact confirm dialog needs auto */
#admin-confirm-modal .admin-form-modal-header,
#admin-confirm-modal .admin-form-modal-footer {
    height: auto;
    max-height: none;
    background: rgba(8, 22, 52, 0.72);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    backdrop-filter: blur(22px) saturate(170%);
}
#admin-confirm-modal .admin-form-modal-header {
    border-bottom: 1px solid rgba(142, 174, 226, 0.22);
}
#admin-confirm-modal .admin-form-modal-footer {
    border-top: 1px solid rgba(142, 174, 226, 0.22);
}
/* Body */
#admin-confirm-modal .admin-form-modal-body {
    background: rgba(8, 22, 52, 0.62);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    backdrop-filter: blur(22px) saturate(170%);
    padding: 1.25rem 1.5rem;
}
/* Title — !important beats base.css h1-h6 { color: var(--finland-blue) !important } */
#admin-confirm-modal #acm-title {
    color: #f0f6ff !important;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}
/* Message */
#admin-confirm-modal #acm-message {
    color: rgba(191, 214, 255, 0.80);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}
/* Close button */
#admin-confirm-modal .acm-close {
    color: rgba(255, 255, 255, 0.55);
    background: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.1s;
}
#admin-confirm-modal .acm-close:hover { color: #fff; }
/* Ghost cancel button — override default ghost for dark glass context */
#admin-confirm-modal .acm-cancel-ghost {
    border-color: rgba(142, 174, 226, 0.40);
    color: rgba(191, 214, 255, 0.85);
    background: transparent;
}
#admin-confirm-modal .acm-cancel-ghost:hover {
    border-color: rgba(191, 214, 255, 0.65);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* ── Order status update modal (Päivitä tila) ───────────────────────────── */
.admin-order-tila-panel {
    width: min(90vw, 400px);
    overflow: hidden;
    border: 1px solid rgba(142, 174, 226, 0.30) !important;
    box-shadow: 0 28px 64px rgba(2, 8, 28, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    background: rgba(8, 18, 44, 0.78) !important;
    -webkit-backdrop-filter: blur(22px) saturate(170%) !important;
    backdrop-filter: blur(22px) saturate(170%) !important;
    color: #ffffff !important;
}
#order-tila-modal .admin-form-modal-header,
#order-tila-modal .admin-form-modal-footer {
    height: auto;
    max-height: none;
    background: rgba(6, 14, 36, 0.70);
    border-color: rgba(142, 174, 226, 0.22);
}
#order-tila-modal .admin-form-modal-body {
    background: rgba(8, 18, 44, 0.58);
}
#order-tila-modal #otm-title {
    color: #f0f6ff !important;
}
#order-tila-modal .admin-form-modal-header .modal-close {
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.1s;
}
#order-tila-modal .admin-form-modal-header .modal-close:hover { color: #fff; }
#order-tila-modal label {
    color: rgba(191, 214, 255, 0.80) !important;
}
#order-tila-modal .select {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(142, 174, 226, 0.35) !important;
    color: #ffffff !important;
}

/* ── Communication view modals — auto-height zones + consistent padding ─── */
#msg-customer-detail-modal .admin-form-modal-header,
#msg-customer-detail-modal .admin-form-modal-footer,
#msg-new-modal .admin-form-modal-header,
#msg-new-modal .admin-form-modal-footer,
#msg-thread-modal .admin-form-modal-header,
#msg-thread-modal .admin-form-modal-footer,
#msg-delete-confirm-modal .admin-form-modal-header,
#msg-delete-confirm-modal .admin-form-modal-footer {
    height: auto;
    max-height: none;
    padding: 1.25rem 1.5rem;
}
#msg-customer-detail-modal .admin-form-modal-body,
#msg-new-modal .admin-form-modal-body,
#msg-delete-confirm-modal .admin-form-modal-body {
    padding: 1.25rem 1.5rem;
}

/* ── Campaign modals (cron help + logs) — dark glass + header/body/footer ── */
.admin-campaign-modal-panel {
    overflow: hidden;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(2, 8, 28, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    background: rgba(8, 18, 46, 0.82) !important;
    -webkit-backdrop-filter: blur(22px) saturate(170%) !important;
    backdrop-filter: blur(22px) saturate(170%) !important;
    color: #ffffff !important;
}
#cron-help-modal .admin-form-modal-header,
#cron-help-modal .admin-form-modal-footer,
#campaign-logs-modal .admin-form-modal-header,
#campaign-logs-modal .admin-form-modal-footer {
    height: auto;
    max-height: none;
    background: rgba(6, 13, 34, 0.70);
    border-color: rgba(142, 174, 226, 0.22);
}
#cron-help-modal .admin-form-modal-body,
#campaign-logs-modal .admin-form-modal-body {
    background: rgba(8, 18, 46, 0.58);
}
#cron-help-modal h3,
#campaign-logs-modal h3 {
    color: #f0f6ff !important;
}
#cron-help-modal .modal-close,
#campaign-logs-modal .modal-close {
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.1s;
}
#cron-help-modal .modal-close:hover,
#campaign-logs-modal .modal-close:hover { color: #fff; }

.admin-view-modal-panel--customer {
    width: min(96vw, 1180px);
    max-width: min(96vw, 1180px);
    padding-top: 1.5rem;
    padding-left: 2.75rem;
    padding-right: 2.75rem;
    /* blue glass — same family as --product */
    background: rgba(11, 29, 58, 0.78) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(4, 12, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}
.admin-view-modal-panel--customer .admin-view-modal-header,
.admin-view-modal-panel--customer .admin-view-modal-body,
.admin-view-modal-panel--customer .admin-view-modal-footer {
    background: rgba(0, 0, 0, 0) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #ffffff !important;
}
.admin-view-modal-panel--customer .admin-view-modal-header,
.admin-view-modal-panel--customer .admin-view-modal-footer {
    border-color: rgba(142, 174, 226, 0.22) !important;
}
.admin-view-modal-panel--customer .text-flag-blue,
.admin-view-modal-panel--customer .text-gray-500,
.admin-view-modal-panel--customer .text-gray-600,
.admin-view-modal-panel--customer .text-gray-700,
.admin-view-modal-panel--customer label,
.admin-view-modal-panel--customer dt,
.admin-view-modal-panel--customer dd {
    color: rgba(226, 232, 240, 0.88) !important;
}
.admin-view-modal-panel--customer .admin-view-modal-header {
    min-height: 44px;
    max-height: none;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}
.admin-view-modal-panel--customer #avm-header-extra {
    line-height: 0;
}
.admin-view-modal-panel--customer #avm-title {
    line-height: 1.1;
}
#admin-view-modal .admin-view-modal-panel--customer .admin-view-modal-body {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#admin-view-modal .admin-view-modal-panel--customer #avm-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admin-view-modal-panel--customer .admin-customer-tab-layout {
    --customer-tab-text: #ffffff;
    --customer-tab-muted: rgba(255, 255, 255, 0.78);
    --customer-tab-strong: #ffffff;
    --customer-tab-accent: var(--finland-blue-400);
    flex: 1;
    min-height: 500px;
    border-top-color: rgba(142, 174, 226, 0.18);
    color: var(--customer-tab-text) !important;
}
.admin-view-modal-panel--customer .pf-tab-rail {
    background: rgba(5, 14, 34, 0.72) !important;
    border-right: 1px solid rgba(142, 174, 226, 0.18) !important;
    padding-bottom: 2rem;
}
.admin-view-modal-panel--customer .pf-tab-btn {
    color: var(--customer-tab-text) !important;
}
.admin-view-modal-panel--customer .pf-tab-btn:hover {
    color: var(--customer-tab-text) !important;
}
.admin-view-modal-panel--customer .pf-tab-btn.is-active {
    background: rgba(0, 91, 187, 0.28) !important;
    color: var(--customer-tab-text) !important;
}
.admin-view-modal-panel--customer .pf-tab-body {
    background: rgba(7, 18, 42, 0.68);
    color: var(--customer-tab-text) !important;
    max-height: none;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.admin-view-modal-panel--customer .pf-tab-body::-webkit-scrollbar {
    display: none;
}
.admin-customer-detail-grid {
    align-content: start;
}
.admin-view-modal-panel--customer .admin-customer-tab-layout dt,
.admin-view-modal-panel--customer .admin-customer-tab-layout dd,
.admin-view-modal-panel--customer .admin-customer-tab-layout p,
.admin-view-modal-panel--customer .admin-customer-tab-layout span,
.admin-view-modal-panel--customer .admin-customer-tab-layout label,
.admin-view-modal-panel--customer .admin-customer-tab-layout .text-gray-400,
.admin-view-modal-panel--customer .admin-customer-tab-layout .text-gray-500,
.admin-view-modal-panel--customer .admin-customer-tab-layout .text-gray-600,
.admin-view-modal-panel--customer .admin-customer-tab-layout .text-gray-700,
.admin-view-modal-panel--customer .admin-customer-tab-layout .text-flag-blue,
.admin-view-modal-panel--customer .admin-customer-tab-layout .text-finland-blue {
    color: var(--customer-tab-text) !important;
}
.admin-view-modal-panel--customer .admin-customer-tab-layout .admin-customer-profile-note,
.admin-view-modal-panel--customer .admin-customer-tab-layout .admin-customer-product-sku,
.admin-view-modal-panel--customer .admin-customer-tab-layout .text-gray-400 {
    color: var(--customer-tab-muted) !important;
}
.admin-view-modal-panel--customer .admin-customer-tab-layout strong,
.admin-view-modal-panel--customer .admin-customer-tab-layout .font-semibold,
.admin-view-modal-panel--customer .admin-customer-tab-layout .font-bold,
.admin-view-modal-panel--customer .admin-customer-tab-layout .avm-bool-yes {
    color: var(--customer-tab-strong) !important;
}
.admin-customer-profile-pane {
    display: grid;
    justify-items: start;
    gap: .75rem;
}
.admin-customer-profile-presentation {
    width: 350px;
    height: 280px;
    max-width: 100%;
    object-fit: cover;
    border-radius: .75rem;
    border: 1px solid rgba(142, 174, 226, 0.3);
    background: rgba(255, 255, 255, 0.08);
}
.admin-customer-profile-empty {
    display: grid;
    place-items: center;
    width: 350px;
    height: 280px;
    max-width: 100%;
    border-radius: .75rem;
    border: 1px dashed color-mix(in srgb, var(--customer-tab-accent) 50%, transparent);
    color: var(--customer-tab-muted);
    background: rgba(255, 255, 255, 0.05);
}
.admin-customer-profile-note {
    max-width: 350px;
    font-size: .78rem;
    color: var(--customer-tab-muted);
}
.admin-customer-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: .75rem;
}
.admin-customer-stat-card {
    display: grid;
    gap: .2rem;
    min-width: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    padding: .8rem .9rem;
    border-radius: .65rem;
    border: 1px solid rgba(142, 174, 226, 0.24);
    background: rgba(255, 255, 255, 0.07);
    appearance: none;
    font: inherit;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.admin-customer-stat-card:hover,
.admin-customer-stat-card:focus-visible {
    border-color: color-mix(in srgb, var(--customer-tab-accent) 64%, transparent);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}
.admin-customer-stat-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--customer-tab-text);
}
.admin-customer-stat-value {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 1.2rem;
    line-height: 1.1;
    color: var(--customer-tab-strong);
}
.admin-customer-stat-note {
    font-size: .72rem;
    color: var(--customer-tab-muted);
}
.admin-customer-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.admin-customer-analytics-grid section {
    min-width: 0;
    padding: .9rem;
    border-radius: .65rem;
    border: 1px solid rgba(142, 174, 226, 0.22);
    background: rgba(255, 255, 255, 0.05);
}
.admin-customer-analytics-grid h3 {
    margin: 0 0 .7rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--customer-tab-strong) !important;
}
.admin-customer-status-mix {
    display: grid;
    gap: .5rem;
}
.admin-customer-status-row {
    display: grid;
    grid-template-columns: minmax(5rem, .85fr) minmax(0, 1fr) 2.5rem;
    align-items: center;
    gap: .55rem;
    width: 100%;
    padding: .12rem .2rem;
    border: 0;
    border-radius: .35rem;
    background: transparent;
    color: var(--customer-tab-text);
    cursor: pointer;
    font-size: .78rem;
    font: inherit;
    text-align: left;
    appearance: none;
    transition: background .15s ease;
}
.admin-customer-status-row:hover,
.admin-customer-status-row:focus-visible {
    background: rgba(255, 255, 255, 0.1);
}
.admin-customer-status-name,
.admin-customer-product-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-customer-status-track {
    height: .45rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
}
.admin-customer-status-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #60a5fa 0%, #34d399 100%);
}
.admin-customer-status-count {
    text-align: right;
    color: var(--customer-tab-text);
}
.admin-customer-top-products {
    display: grid;
    gap: .55rem;
}
.admin-customer-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    padding: .55rem .65rem;
    border: 1px solid transparent;
    border-radius: .5rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--customer-tab-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
    appearance: none;
    transition: background .15s ease, border-color .15s ease;
}
.admin-customer-product-row:hover,
.admin-customer-product-row:focus-visible {
    border-color: color-mix(in srgb, var(--customer-tab-accent) 54%, transparent);
    background: rgba(255, 255, 255, 0.12);
}
.admin-customer-product-row strong {
    display: block;
    color: var(--customer-tab-strong);
}
.admin-customer-product-sku {
    display: block;
    margin-top: .1rem;
    font-size: .68rem;
    color: var(--customer-tab-muted);
}
.admin-customer-product-metrics {
    display: grid;
    justify-items: end;
    gap: .1rem;
    flex: 0 0 auto;
    font-size: .78rem;
    color: var(--customer-tab-text);
}
.admin-view-modal-panel--customer .customer-view-orders-host {
    border-radius: .65rem;
    border: 1px solid rgba(142, 174, 226, 0.22);
    background: rgba(7, 18, 42, 0.55);
    overflow: hidden;
}
.admin-view-modal-panel--customer .customer-view-orders-host .dt-container,
.admin-view-modal-panel--customer .customer-view-orders-host .dt-scroll,
.admin-view-modal-panel--customer .customer-view-orders-host .dt-scroll-body {
    background: transparent !important;
}
.admin-view-modal-panel--customer .admin-customer-orders-filter-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem .75rem;
    border-bottom: 1px solid rgba(142, 174, 226, 0.2);
    color: #ffffff !important;
    background: rgba(7, 18, 42, 0.72);
    font-size: .78rem;
    font-weight: 700;
}
.admin-view-modal-panel--customer .admin-customer-orders-filter-reset {
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--customer-tab-accent) 54%, transparent);
    border-radius: .35rem;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    padding: .18rem .5rem;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
}
.admin-view-modal-panel--customer .admin-customer-orders-filter-reset:hover,
.admin-view-modal-panel--customer .admin-customer-orders-filter-reset:focus-visible {
    background: rgba(255, 255, 255, 0.16);
}
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent !important;
}
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable thead th {
    background: rgba(7, 18, 42, 0.78) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(142, 174, 226, 0.26) !important;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable tbody tr,
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable tbody td {
    background: rgba(11, 29, 58, 0.44) !important;
    color: #ffffff !important;
    border-color: rgba(142, 174, 226, 0.14) !important;
}
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable tbody tr:hover > td {
    background: rgba(30, 58, 100, 0.76) !important;
    color: #ffffff !important;
}
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable tbody td .font-mono,
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable tbody td .font-semibold {
    color: #ffffff !important;
}
.admin-view-modal-panel--customer .customer-view-orders-host .dt-empty {
    color: var(--customer-tab-muted) !important;
}
/* Favourites modal subtitle (email) — always dark so it's legible in light/mixed */
#customer-favourites-modal .admin-customer-modal-subtitle {
    color: rgba(17, 24, 39, 0.78);
}
/* Edit-customer modal body — wider side padding */
#customer-edit-modal .admin-form-modal-body {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
}
/* Blue glass — customer edit, orders, reviews, bulk-email modals */
#customer-edit-modal .modal-panel,
#customer-orders-modal .modal-panel,
#customer-reviews-modal .modal-panel,
#customer-bulk-email-modal .modal-panel {
    background: rgba(11, 29, 58, 0.82) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(4, 12, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}
#customer-edit-modal .admin-form-modal-header,
#customer-edit-modal .admin-form-modal-body,
#customer-edit-modal .admin-form-modal-footer,
#customer-orders-modal .admin-view-modal-header,
#customer-orders-modal .admin-view-modal-body,
#customer-orders-modal .admin-view-modal-footer,
#customer-reviews-modal .admin-view-modal-header,
#customer-reviews-modal .admin-view-modal-body,
#customer-reviews-modal .admin-view-modal-footer,
#customer-bulk-email-modal .admin-form-modal-header,
#customer-bulk-email-modal .admin-form-modal-body,
#customer-bulk-email-modal .admin-form-modal-footer {
    background: rgba(0, 0, 0, 0) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
#customer-edit-modal .admin-form-modal-header,
#customer-edit-modal .admin-form-modal-footer,
#customer-orders-modal .admin-view-modal-header,
#customer-orders-modal .admin-view-modal-footer,
#customer-reviews-modal .admin-view-modal-header,
#customer-reviews-modal .admin-view-modal-footer,
#customer-bulk-email-modal .admin-form-modal-header,
#customer-bulk-email-modal .admin-form-modal-footer {
    border-color: rgba(142, 174, 226, 0.22) !important;
}
/* Label and muted text inside these blue-glass modals */
#customer-edit-modal .text-gray-500,
#customer-edit-modal .text-gray-600,
#customer-edit-modal label,
#customer-edit-modal .text-flag-blue,
#customer-orders-modal .text-gray-500,
#customer-orders-modal .text-gray-600,
#customer-reviews-modal .text-gray-500,
#customer-reviews-modal .text-gray-600,
#customer-bulk-email-modal .text-gray-500,
#customer-bulk-email-modal .text-gray-600,
#customer-bulk-email-modal label {
    color: rgba(226, 232, 240, 0.88) !important;
}
/* Inputs inside blue-glass customer modals */
#customer-edit-modal .input,
#customer-bulk-email-modal .input {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(148, 191, 255, 0.28) !important;
    color: #ffffff !important;
}
#customer-edit-modal .input::placeholder,
#customer-bulk-email-modal .input::placeholder {
    color: rgba(148, 191, 255, 0.5) !important;
}

/* Unified blue glass theme for customer view drill-down modals */
#customer-edit-modal .modal-panel,
#customer-orders-modal .modal-panel,
#customer-comments-modal .modal-panel,
#customer-reviews-modal .modal-panel,
#customer-comment-detail-modal .modal-panel,
#customer-favourites-modal .modal-panel,
#customer-bulk-email-modal .modal-panel,
#customer-order-view-modal .order-modal-panel,
#customer-order-edit-modal .order-modal-panel {
    background: linear-gradient(145deg, rgba(15, 41, 82, 0.9), rgba(8, 24, 52, 0.84)) !important;
    -webkit-backdrop-filter: blur(20px) saturate(165%) !important;
    backdrop-filter: blur(20px) saturate(165%) !important;
    border: 1px solid rgba(142, 174, 226, 0.32) !important;
    box-shadow: 0 28px 66px rgba(4, 12, 32, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}
#customer-edit-modal .admin-form-modal-header,
#customer-edit-modal .admin-form-modal-body,
#customer-edit-modal .admin-form-modal-footer,
#customer-orders-modal .admin-view-modal-header,
#customer-orders-modal .admin-view-modal-body,
#customer-orders-modal .admin-view-modal-footer,
#customer-comments-modal .admin-view-modal-header,
#customer-comments-modal .admin-view-modal-body,
#customer-comments-modal .admin-view-modal-footer,
#customer-reviews-modal .admin-view-modal-header,
#customer-reviews-modal .admin-view-modal-body,
#customer-reviews-modal .admin-view-modal-footer,
#customer-comment-detail-modal .admin-view-modal-header,
#customer-comment-detail-modal .admin-view-modal-body,
#customer-comment-detail-modal .admin-view-modal-footer,
#customer-favourites-modal .admin-view-modal-header,
#customer-favourites-modal .admin-view-modal-body,
#customer-favourites-modal .admin-view-modal-footer,
#customer-bulk-email-modal .admin-form-modal-header,
#customer-bulk-email-modal .admin-form-modal-body,
#customer-bulk-email-modal .admin-form-modal-footer,
#customer-order-view-modal .order-modal-header,
#customer-order-view-modal .order-modal-body,
#customer-order-view-modal .order-modal-footer,
#customer-order-edit-modal .order-modal-header,
#customer-order-edit-modal .order-modal-body,
#customer-order-edit-modal .order-modal-footer {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #ffffff !important;
}
#customer-edit-modal .admin-form-modal-header,
#customer-edit-modal .admin-form-modal-footer,
#customer-orders-modal .admin-view-modal-header,
#customer-orders-modal .admin-view-modal-footer,
#customer-comments-modal .admin-view-modal-header,
#customer-comments-modal .admin-view-modal-footer,
#customer-reviews-modal .admin-view-modal-header,
#customer-reviews-modal .admin-view-modal-footer,
#customer-comment-detail-modal .admin-view-modal-header,
#customer-comment-detail-modal .admin-view-modal-footer,
#customer-favourites-modal .admin-view-modal-header,
#customer-favourites-modal .admin-view-modal-footer,
#customer-bulk-email-modal .admin-form-modal-header,
#customer-bulk-email-modal .admin-form-modal-footer,
#customer-order-view-modal .order-modal-header,
#customer-order-view-modal .order-modal-footer,
#customer-order-edit-modal .order-modal-header,
#customer-order-edit-modal .order-modal-footer {
    border-color: rgba(142, 174, 226, 0.24) !important;
}
#customer-edit-modal :is(h1, h2, h3, h4, p, span, label, dt, dd, th, td, small, strong, em, div),
#customer-orders-modal :is(h1, h2, h3, h4, p, span, label, dt, dd, th, td, small, strong, em, div),
#customer-comments-modal :is(h1, h2, h3, h4, p, span, label, dt, dd, th, td, small, strong, em, div),
#customer-reviews-modal :is(h1, h2, h3, h4, p, span, label, dt, dd, th, td, small, strong, em, div),
#customer-comment-detail-modal :is(h1, h2, h3, h4, p, span, label, dt, dd, th, td, small, strong, em, div),
#customer-favourites-modal :is(h1, h2, h3, h4, p, span, label, dt, dd, th, td, small, strong, em, div),
#customer-bulk-email-modal :is(h1, h2, h3, h4, p, span, label, dt, dd, th, td, small, strong, em, div),
#customer-order-view-modal :is(h1, h2, h3, h4, p, span, label, dt, dd, th, td, small, strong, em, div),
#customer-order-edit-modal :is(h1, h2, h3, h4, p, span, label, dt, dd, th, td, small, strong, em, div) {
    color: #ffffff !important;
}
#customer-edit-modal :is(.text-gray-400, .text-gray-500, .text-gray-600, .text-gray-700, .text-flag-blue, .text-ink, .admin-customer-modal-subtitle),
#customer-orders-modal :is(.text-gray-400, .text-gray-500, .text-gray-600, .text-gray-700, .text-flag-blue, .text-ink, .admin-customer-modal-subtitle),
#customer-comments-modal :is(.text-gray-400, .text-gray-500, .text-gray-600, .text-gray-700, .text-flag-blue, .text-ink, .admin-customer-modal-subtitle),
#customer-reviews-modal :is(.text-gray-400, .text-gray-500, .text-gray-600, .text-gray-700, .text-flag-blue, .text-ink, .admin-customer-modal-subtitle),
#customer-comment-detail-modal :is(.text-gray-400, .text-gray-500, .text-gray-600, .text-gray-700, .text-flag-blue, .text-ink, .admin-customer-modal-subtitle),
#customer-favourites-modal :is(.text-gray-400, .text-gray-500, .text-gray-600, .text-gray-700, .text-flag-blue, .text-ink, .admin-customer-modal-subtitle),
#customer-bulk-email-modal :is(.text-gray-400, .text-gray-500, .text-gray-600, .text-gray-700, .text-flag-blue, .text-ink, .admin-customer-modal-subtitle),
#customer-order-view-modal :is(.text-gray-400, .text-gray-500, .text-gray-600, .text-gray-700, .text-flag-blue, .text-ink, .admin-customer-modal-subtitle),
#customer-order-edit-modal :is(.text-gray-400, .text-gray-500, .text-gray-600, .text-gray-700, .text-flag-blue, .text-ink, .admin-customer-modal-subtitle) {
    color: #ffffff !important;
}
#customer-edit-modal a,
#customer-orders-modal a,
#customer-comments-modal a,
#customer-reviews-modal a,
#customer-comment-detail-modal a,
#customer-favourites-modal a,
#customer-bulk-email-modal a,
#customer-order-view-modal a,
#customer-order-edit-modal a {
    color: #ffffff !important;
}
#customer-edit-modal :is(.btn, button, .modal-close),
#customer-orders-modal :is(.btn, button, .modal-close),
#customer-comments-modal :is(.btn, button, .modal-close),
#customer-reviews-modal :is(.btn, button, .modal-close),
#customer-comment-detail-modal :is(.btn, button, .modal-close),
#customer-favourites-modal :is(.btn, button, .modal-close),
#customer-bulk-email-modal :is(.btn, button, .modal-close),
#customer-order-view-modal :is(.btn, button, .modal-close),
#customer-order-edit-modal :is(.btn, button, .modal-close) {
    color: #ffffff !important;
}
#customer-edit-modal :is(.input, input:not([type="checkbox"]):not([type="radio"]), select, textarea),
#customer-bulk-email-modal :is(.input, input:not([type="checkbox"]):not([type="radio"]), select, textarea),
#customer-order-edit-modal :is(.input, input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(148, 191, 255, 0.32) !important;
    color: #ffffff !important;
}
#customer-edit-modal :is(.input, input:not([type="checkbox"]):not([type="radio"]), select, textarea)::placeholder,
#customer-bulk-email-modal :is(.input, input:not([type="checkbox"]):not([type="radio"]), select, textarea)::placeholder,
#customer-order-edit-modal :is(.input, input:not([type="checkbox"]):not([type="radio"]), select, textarea)::placeholder {
    color: rgba(255, 255, 255, 0.64) !important;
}
#customer-orders-modal :is(table, table.dataTable),
#customer-comments-modal :is(table, table.dataTable),
#customer-reviews-modal :is(table, table.dataTable),
#customer-favourites-modal :is(table, table.dataTable),
#customer-order-view-modal table,
#customer-order-edit-modal table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(142, 174, 226, 0.24) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}
#customer-orders-modal :is(table, table.dataTable) thead th,
#customer-comments-modal :is(table, table.dataTable) thead th,
#customer-reviews-modal :is(table, table.dataTable) thead th,
#customer-favourites-modal :is(table, table.dataTable) thead th,
#customer-order-view-modal table thead th,
#customer-order-edit-modal table thead th {
    background: rgba(45, 94, 164, 0.36) !important;
    border-color: rgba(142, 174, 226, 0.22) !important;
    color: #ffffff !important;
}
#customer-orders-modal :is(table, table.dataTable) tbody tr,
#customer-comments-modal :is(table, table.dataTable) tbody tr,
#customer-reviews-modal :is(table, table.dataTable) tbody tr,
#customer-favourites-modal :is(table, table.dataTable) tbody tr,
#customer-order-view-modal table tbody tr,
#customer-order-edit-modal table tbody tr {
    background: rgba(255, 255, 255, 0.045) !important;
    color: #ffffff !important;
}
#customer-orders-modal :is(table, table.dataTable) tbody td,
#customer-comments-modal :is(table, table.dataTable) tbody td,
#customer-reviews-modal :is(table, table.dataTable) tbody td,
#customer-favourites-modal :is(table, table.dataTable) tbody td,
#customer-order-view-modal table tbody td,
#customer-order-edit-modal table tbody td {
    border-color: rgba(142, 174, 226, 0.16) !important;
    color: #ffffff !important;
}
#customer-orders-modal :is(table, table.dataTable) tbody tr:hover > td,
#customer-comments-modal :is(table, table.dataTable) tbody tr:hover > td,
#customer-reviews-modal :is(table, table.dataTable) tbody tr:hover > td,
#customer-favourites-modal :is(table, table.dataTable) tbody tr:hover > td,
#customer-order-view-modal table tbody tr:hover > td,
#customer-order-edit-modal table tbody tr:hover > td {
    background: rgba(65, 124, 207, 0.34) !important;
    color: #ffffff !important;
}
#customer-orders-modal table.dataTable > tbody > tr > *,
#customer-comments-modal table.dataTable > tbody > tr > *,
#customer-reviews-modal table.dataTable > tbody > tr > *,
#customer-favourites-modal table.dataTable > tbody > tr > *,
#customer-order-view-modal table.dataTable > tbody > tr > *,
#customer-order-edit-modal table.dataTable > tbody > tr > *,
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable > tbody > tr > * {
    background: rgba(8, 24, 52, 0.48) !important;
    background-color: rgba(8, 24, 52, 0.48) !important;
    box-shadow: none !important;
    color: #ffffff !important;
}
#customer-orders-modal table.dataTable > tbody > tr.odd > *,
#customer-comments-modal table.dataTable > tbody > tr.odd > *,
#customer-reviews-modal table.dataTable > tbody > tr.odd > *,
#customer-favourites-modal table.dataTable > tbody > tr.odd > *,
#customer-order-view-modal table.dataTable > tbody > tr.odd > *,
#customer-order-edit-modal table.dataTable > tbody > tr.odd > *,
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable > tbody > tr.odd > * {
    background: rgba(12, 35, 72, 0.58) !important;
    background-color: rgba(12, 35, 72, 0.58) !important;
    box-shadow: none !important;
    color: #ffffff !important;
}
#customer-orders-modal table.dataTable > tbody > tr.even > *,
#customer-comments-modal table.dataTable > tbody > tr.even > *,
#customer-reviews-modal table.dataTable > tbody > tr.even > *,
#customer-favourites-modal table.dataTable > tbody > tr.even > *,
#customer-order-view-modal table.dataTable > tbody > tr.even > *,
#customer-order-edit-modal table.dataTable > tbody > tr.even > *,
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable > tbody > tr.even > * {
    background: rgba(8, 24, 52, 0.5) !important;
    background-color: rgba(8, 24, 52, 0.5) !important;
    box-shadow: none !important;
    color: #ffffff !important;
}
#customer-orders-modal table.dataTable > tbody > tr:hover > *,
#customer-comments-modal table.dataTable > tbody > tr:hover > *,
#customer-reviews-modal table.dataTable > tbody > tr:hover > *,
#customer-favourites-modal table.dataTable > tbody > tr:hover > *,
#customer-order-view-modal table.dataTable > tbody > tr:hover > *,
#customer-order-edit-modal table.dataTable > tbody > tr:hover > *,
.admin-view-modal-panel--customer .customer-view-orders-host table.dataTable > tbody > tr:hover > * {
    background: rgba(65, 124, 207, 0.34) !important;
    background-color: rgba(65, 124, 207, 0.34) !important;
    box-shadow: none !important;
    color: #ffffff !important;
}
#customer-orders-modal :is(.dt-container, .dt-info, .dt-length, .dt-search, .dt-paging, .dt-empty, .dt-processing),
#customer-comments-modal :is(.dt-container, .dt-info, .dt-length, .dt-search, .dt-paging, .dt-empty, .dt-processing),
#customer-reviews-modal :is(.dt-container, .dt-info, .dt-length, .dt-search, .dt-paging, .dt-empty, .dt-processing),
#customer-favourites-modal :is(.dt-container, .dt-info, .dt-length, .dt-search, .dt-paging, .dt-empty, .dt-processing) {
    color: #ffffff !important;
}
#customer-orders-modal .dt-container :is(input, select),
#customer-comments-modal .dt-container :is(input, select),
#customer-reviews-modal .dt-container :is(input, select),
#customer-favourites-modal .dt-container :is(input, select) {
    background: rgba(8, 24, 52, 0.74) !important;
    border: 1px solid rgba(148, 191, 255, 0.3) !important;
    color: #ffffff !important;
}
#customer-orders-modal .dt-container .dt-buttons,
#customer-comments-modal .dt-container .dt-buttons,
#customer-reviews-modal .dt-container .dt-buttons,
#customer-favourites-modal .dt-container .dt-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
}
#customer-orders-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button),
#customer-comments-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button),
#customer-reviews-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button),
#customer-favourites-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button) {
    background: rgba(8, 24, 52, 0.74) !important;
    border: 1px solid rgba(148, 191, 255, 0.32) !important;
    border-radius: 999px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(4, 12, 32, 0.2) !important;
    color: #ffffff !important;
    line-height: 1.15 !important;
    padding: .45rem .8rem !important;
}
#customer-orders-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button):hover,
#customer-comments-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button):hover,
#customer-reviews-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button):hover,
#customer-favourites-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button):hover,
#customer-orders-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button):focus-visible,
#customer-comments-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button):focus-visible,
#customer-reviews-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button):focus-visible,
#customer-favourites-modal .dt-container :is(.dt-button, button.dt-button, div.dt-button, a.dt-button):focus-visible {
    background: rgba(65, 124, 207, 0.42) !important;
    border-color: rgba(176, 206, 255, 0.52) !important;
    color: #ffffff !important;
}
#customer-orders-modal .dt-container .paginate_button,
#customer-comments-modal .dt-container .paginate_button,
#customer-reviews-modal .dt-container .paginate_button,
#customer-favourites-modal .dt-container .paginate_button {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(148, 191, 255, 0.26) !important;
    color: #ffffff !important;
}
#customer-orders-modal .dt-container .paginate_button.current,
#customer-comments-modal .dt-container .paginate_button.current,
#customer-reviews-modal .dt-container .paginate_button.current,
#customer-favourites-modal .dt-container .paginate_button.current,
#customer-orders-modal .dt-container .paginate_button:hover,
#customer-comments-modal .dt-container .paginate_button:hover,
#customer-reviews-modal .dt-container .paginate_button:hover,
#customer-favourites-modal .dt-container .paginate_button:hover {
    background: rgba(65, 124, 207, 0.42) !important;
    border-color: rgba(176, 206, 255, 0.48) !important;
    color: #ffffff !important;
}
#customer-orders-modal .dt-container :is(.datatable-toolbar, .datatable-footer),
#customer-comments-modal .dt-container :is(.datatable-toolbar, .datatable-footer),
#customer-reviews-modal .dt-container :is(.datatable-toolbar, .datatable-footer),
#customer-favourites-modal .dt-container :is(.datatable-toolbar, .datatable-footer) {
    background: transparent !important;
    border-color: rgba(142, 174, 226, 0.16) !important;
    color: #ffffff !important;
}
.dt-button-collection {
    background: linear-gradient(145deg, rgba(15, 41, 82, 0.96), rgba(8, 24, 52, 0.94)) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(142, 174, 226, 0.34) !important;
    border-radius: 14px !important;
    box-shadow: 0 22px 52px rgba(4, 12, 32, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
    color: #ffffff !important;
    padding: .5rem !important;
}
.dt-button-collection :is(.dt-button, button.dt-button, div.dt-button, a.dt-button, .buttons-columnVisibility) {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(148, 191, 255, 0.2) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: #ffffff !important;
}
.dt-button-collection :is(.dt-button, button.dt-button, div.dt-button, a.dt-button, .buttons-columnVisibility):hover,
.dt-button-collection :is(.dt-button, button.dt-button, div.dt-button, a.dt-button, .buttons-columnVisibility):focus-visible {
    background: rgba(65, 124, 207, 0.38) !important;
    border-color: rgba(176, 206, 255, 0.42) !important;
    color: #ffffff !important;
}
.dt-button-collection :is(.dt-button-active, .active, .buttons-columnVisibility.active) {
    background: rgba(65, 124, 207, 0.5) !important;
    border-color: rgba(176, 206, 255, 0.56) !important;
    color: #ffffff !important;
}
.dt-button-collection .colvis-restore-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(176, 206, 255, 0.34) !important;
    color: #ffffff !important;
}
#customer-favourites-modal :is(.customer-fav-note, .customer-fav-thumb--empty),
#customer-comment-detail-modal :is(.rounded, .rounded-lg, .bg-gray-50) {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(148, 191, 255, 0.24) !important;
    color: #ffffff !important;
}
/* Product view panel — blue glass in all themes */
/* ── Category view modal (admin-view-modal--category) ─────────────── */
.admin-view-modal-panel--category {
    --ink:    #ffffff;
    --muted-2: rgba(148, 163, 184, 0.82);
    width: min(96vw, 960px);
    max-width: min(96vw, 960px);
    background: rgba(11, 29, 58, 0.78) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(4, 12, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}
.admin-view-modal-panel--category .admin-view-modal-header,
.admin-view-modal-panel--category .admin-view-modal-body,
.admin-view-modal-panel--category .admin-view-modal-footer {
    background: rgba(0, 0, 0, 0) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #ffffff !important;
}
.admin-view-modal-panel--category .admin-view-modal-header,
.admin-view-modal-panel--category .admin-view-modal-footer {
    border-color: rgba(142, 174, 226, 0.22) !important;
}
.admin-view-modal-panel--category .text-flag-blue,
.admin-view-modal-panel--category [class*="text-gray"],
.admin-view-modal-panel--category p,
.admin-view-modal-panel--category small,
.admin-view-modal-panel--category .text-sm,
.admin-view-modal-panel--category .text-xs,
.admin-view-modal-panel--category dt,
.admin-view-modal-panel--category dd {
    color: rgba(226, 232, 240, 0.88) !important;
}
#admin-view-modal .admin-view-modal-panel--category .admin-view-modal-body {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#admin-view-modal .admin-view-modal-panel--category #avm-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admin-view-modal-panel--category .admin-category-tab-layout {
    flex: 1;
    min-height: 460px;
    border-top-color: rgba(142, 174, 226, 0.18);
}
.admin-view-modal-panel--category .pf-tab-rail {
    background: rgba(5, 14, 34, 0.72) !important;
    border-right: 1px solid rgba(142, 174, 226, 0.18) !important;
}
.admin-view-modal-panel--category .pf-tab-btn {
    color: rgba(226, 232, 240, 0.88) !important;
}
.admin-view-modal-panel--category .pf-tab-btn.is-active {
    background: rgba(0, 91, 187, 0.28) !important;
    color: #ffffff !important;
}
.admin-view-modal-panel--category .pf-tab-body {
    background: rgba(7, 18, 42, 0.68);
    color: #ffffff !important;
    max-height: none;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.admin-view-modal-panel--category .pf-tab-body::-webkit-scrollbar { display: none; }
.admin-view-modal-panel--category .admin-view-grid dt,
.admin-view-modal-panel--category .admin-view-grid dd,
.admin-view-modal-panel--category .pf-pane-title { color: rgba(226, 232, 240, 0.88) !important; }
.admin-view-modal-panel--category .avm-bool-yes { color: #6ee7b7 !important; }
/* ── Product view modal ────────────────────────────────────────────── */
.admin-view-modal-panel--product {
    background: rgba(11, 29, 58, 0.72) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(4, 12, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}
.admin-view-modal-panel--product .admin-view-modal-header,
.admin-view-modal-panel--product .admin-view-modal-body,
.admin-view-modal-panel--product .admin-view-modal-footer {
    background: rgba(0, 0, 0, 0) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #ffffff !important;
}
.admin-view-modal-panel--product .admin-view-modal-header,
.admin-view-modal-panel--product .admin-view-modal-footer {
    border-color: rgba(142, 174, 226, 0.22) !important;
}
.admin-view-modal-panel--product .text-flag-blue,
.admin-view-modal-panel--product .admin-view-modal-body .text-gray-500,
.admin-view-modal-panel--product .admin-view-modal-body .text-gray-600,
.admin-view-modal-panel--product .admin-view-modal-body .text-gray-700,
.admin-view-modal-panel--product .admin-view-modal-header .text-gray-500,
.admin-view-modal-panel--product .admin-view-modal-header .text-gray-600,
.admin-view-modal-panel--product .admin-view-modal-header .text-gray-700,
.admin-view-modal-panel--product .admin-view-grid dt,
.admin-view-modal-panel--product .admin-view-audit-label,
.admin-view-modal-panel--product .admin-view-audit-value,
.admin-view-modal-panel--product .admin-view-grid dd {
    color: rgba(226, 232, 240, 0.88) !important;
}
.admin-product-review-summary {
    display: grid;
    gap: .9rem;
}
.admin-product-review-summary__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .85rem;
}
.admin-product-review-summary__metric {
    display: grid;
    gap: .2rem;
}
.admin-product-review-summary__score {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--finland-blue);
}
.admin-product-review-summary__stars,
.admin-product-review-comment__stars {
    display: inline-flex;
    gap: .08rem;
}
.admin-product-review-summary__star,
.admin-product-review-comment__stars .admin-product-review-summary__star {
    color: #d1d5db;
    font-size: 1rem;
    line-height: 1;
}
.admin-product-review-summary__star.is-active,
.admin-product-review-comment__stars .admin-product-review-summary__star.is-active {
    color: #f59e0b;
}
.admin-product-review-summary__caption {
    font-size: .78rem;
    color: var(--muted-600);
}
.admin-product-review-summary__distribution {
    display: grid;
    gap: .32rem;
}
.admin-product-review-summary__dist-row {
    display: grid;
    grid-template-columns: 1rem .9rem minmax(0, 1fr) 1.75rem;
    align-items: center;
    gap: .45rem;
    font-size: .78rem;
}
.admin-product-review-summary__dist-score {
    text-align: right;
}
.admin-product-review-summary__dist-star {
    color: #f59e0b;
}
.admin-product-review-summary__dist-track {
    position: relative;
    height: .45rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(209, 213, 219, 0.7);
}
.admin-product-review-summary__dist-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}
.admin-product-review-summary__dist-count {
    color: var(--muted-600);
}
.admin-product-review-comments-list {
    display: grid;
    gap: .85rem;
}
.admin-product-review-comment {
    padding: .95rem 1rem;
    border-radius: .8rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.72);
}
.admin-product-review-comment__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .85rem;
}
.admin-product-review-comment__title {
    font-weight: 700;
    color: var(--finland-blue);
}
.admin-product-review-comment__meta {
    margin-top: .18rem;
    font-size: .74rem;
    color: var(--muted-600);
}
.admin-product-review-comment__body {
    margin-top: .7rem;
    font-size: .86rem;
    line-height: 1.45;
    white-space: pre-line;
    color: #111827;
}
.admin-view-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .55rem 1.25rem;
    align-items: start;
}
.admin-view-grid dt {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted-600);
    font-weight: 600;
    padding-top: .15rem;
}
.admin-view-grid dt[data-tooltip] {
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}
.admin-form-modal-body label[data-tooltip] {
    cursor: help;
}
.admin-view-grid dd {
    color: var(--ink);
    word-break: break-word;
    margin: 0;
}
/* Customer orders table — span both grid columns for full width */
.admin-view-grid dd:has(.customer-view-orders-host) {
    grid-column: 1 / -1;
}
.customer-view-orders-host {
    width: 100%;
}
.admin-view-audit {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem 1.25rem;
    font-size: .7rem;
    color: var(--muted-600);
}
.admin-view-audit-item {
    display: flex;
    flex-direction: column;
    gap: .18rem;
    min-width: 0;
}
.admin-view-audit-label {
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted-600);
}
.admin-view-audit-value { color: var(--ink); font-weight: 500; }
/* Boolean yes/no pills in the admin view modal */
.avm-bool-yes { color: #1f956a; }
.avm-bool-no  { color: var(--muted-600); }
.text-ink
{
    color: var(--ink) !important;
}

/* DataTables rows become clickable when a page opts into double-click view. */
.admin-dblclickable tr { cursor: pointer; }
.admin-dblclickable tr:hover { background: var(--datatable-row-hover-bg) !important; }

/* Customer orders modal table */
#customer-orders-body table {
    border-collapse: separate;
    border-spacing: 0;
}
#customer-orders-body th,
#customer-orders-body td {
    padding: .65rem .9rem .65rem 1rem;
    vertical-align: middle;
}
#customer-orders-body thead th {
    white-space: nowrap;
}
#customer-orders-body tbody tr {
    transition: background .18s ease;
}
#customer-orders-body tbody tr:hover {
    background: var(--datatable-row-hover-bg);
}


/* ======================================================================= */
/*  * ◀ End of   §50b  Variant List                                        */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §25  Admin Page Transitions                               */
/* ======================================================================= */

/* ---------- Admin page transitions ---------- */
@keyframes adminPageFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.admin-page-shell {
    position: relative; /* contains the absolute-positioned page-transition overlay */
    transition: opacity 0.2s ease, transform 0.2s ease;
}
/* Arriving: new page fades + rises in */
body.admin-shell.admin-page-arriving .admin-page-shell {
    animation: adminPageFadeIn 0.28s ease both;
}
/* Leaving: shell fades + sinks slightly */
body.admin-shell.admin-page-leaving .admin-page-shell {
    opacity: 0;
    transform: translateY(5px);
    pointer-events: none;
}

/* Customer account — order rows are double-clickable. */
.account-orders .js-order-row { cursor: pointer; transition: background .2s ease; }
.account-orders .js-order-row:hover { background: var(--surface-soft); }
.account-purchased-products .js-account-purchased-product-row.is-openable { cursor: pointer; transition: background .2s ease; }
.account-purchased-products .js-account-purchased-product-row.is-openable:hover { background: var(--surface-soft); }
/* ── Product star ratings in purchased products table ───────────────── */
.account-product-stars { display:flex; align-items:center; gap:1px; margin-top:.15rem; line-height:1; }
.account-product-star { font-size:.78rem; }
.account-product-star--full  { color:#f59e0b; }
.account-product-star--half  { color:#f59e0b; opacity:.6; }
.account-product-star--empty { color:#d1d5db; }
.account-product-stars__count { font-size:.68rem; color:var(--muted-600); margin-left:.2rem; }
/* ── Stock badges in purchased products table ───────────────────────── */
.account-stock-badge { display:inline-block; padding:.1rem .5rem; border-radius:999px; font-size:.7rem; font-weight:700; line-height:1.5; white-space:nowrap; }
.account-stock-badge--in  { background:rgba(22,163,74,.12); color:#15803d; border:1px solid rgba(22,163,74,.3); }
.account-stock-badge--low { background:rgba(234,179,8,.12);  color:#a16207; border:1px solid rgba(234,179,8,.35); }
.account-stock-badge--out { background:rgba(220,38,38,.1);   color:#b91c1c; border:1px solid rgba(220,38,38,.25); }
.account-purchased-product-cell {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-width: 15rem;
}
.account-purchased-product-cell__image,
.account-purchased-product-cell__placeholder {
    width: 3rem;
    height: 3rem;
    border-radius: .75rem;
    flex: 0 0 3rem;
}
.account-purchased-product-cell__image {
    object-fit: cover;
    display: block;
}
.account-purchased-product-cell__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.32);
    font-size: 1.3rem;
}
.account-purchased-product-cell__meta {
    display: grid;
    gap: .2rem;
    min-width: 0;
}
.account-purchased-product-actions {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem;
}
.account-purchased-link {
    width: 8rem;
    min-width: 8rem;
    max-width: 8rem;
    padding-top: .375rem;
    padding-bottom: .375rem;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-purchased-product-actions .btn {
    width: 8rem !important;
    min-width: 8rem !important;
    max-width: 8rem;
    padding-top: .375rem;
    padding-bottom: .375rem;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-purchased-products-toolbar-filters {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .45rem;
    margin-left: 0;
    margin-right: .45rem;
}
.account-purchased-products-toolbar-filter {
    max-width: 12rem;
    padding: .42rem .58rem;
    font-size: .78rem;
    font-weight: 600;
}
.account-order-actions {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    justify-items: stretch;
}

.account-order-actions .btn:not(.account-order-actions__wide) {
    min-width: 8rem !important;
    min-height: 2.25rem;
    height: 2.25rem;
    padding-top: 0;
    padding-bottom: 0;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-order-actions__wide {
    grid-column: 1 / -1;
}
.account-order-actions__row {
    display: contents;
}
.account-orders thead tr.account-orders__filters th {
    padding: .35rem .35rem .55rem;
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
}
.account-orders__filter-select {
    width: 100%;
    min-width: 7.5rem;
    padding: .4rem .55rem;
    font-size: .75rem;
}
.account-ordered-products-cell {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 12rem;
}
.account-ordered-products-cell__line,
.account-ordered-products-cell__more {
    line-height: 1.35;
}
.account-ordered-products-cell__more {
    color: var(--muted-600);
    font-size: .75rem;
    font-weight: 600;
}
#account-order-items-table tbody tr.js-account-order-product-row { cursor: pointer; transition: background .2s ease; }
#account-order-items-table tbody tr.js-account-order-product-row:hover { background: rgba(59, 130, 246, 0.13) !important; }
#account-order-items-table tbody tr.js-account-order-product-row:hover td { color: inherit !important; }
#account-order-items-table tbody tr.js-account-order-product-row:hover .text-gray-500,
#account-order-items-table tbody tr.js-account-order-product-row:hover .text-gray-600,
#account-order-items-table tbody tr.js-account-order-product-row:hover .text-gray-700 { color: rgba(148, 191, 255, 0.85) !important; }

.account-page-header {
    align-items: flex-start;
}
.account-page-back-btn {
    flex-shrink: 0;
}
.account-page-grid,
.account-page-grid > .grid {
    align-items: start;
}
.account-card {
    min-width: 0;
}
.account-collapsible-card {
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.account-collapsible-card.is-collapsed {
    padding-bottom: 1.1rem;
}
.account-collapsible-card.is-expanded {
    box-shadow: 0 16px 42px rgba(0, 53, 128, 0.16);
}
.account-collapsible-header {
    margin-bottom: 0 !important;
}
.account-collapsible-card.is-expanded .account-collapsible-header {
    margin-bottom: 1rem !important;
}
.account-collapsible-title {
    min-width: 0;
}
.account-collapsible-title p,
.account-collapsible-header p {
    color: var(--muted-600);
    line-height: 1.35;
}
.account-collapsible-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}
.account-card-toggle {
    width: 2.35rem;
    min-width: 2.35rem;
    height: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
    justify-content: center;
    border-radius: 999px;
    position: relative;
}
.account-card-toggle__icon {
    display: block;
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.14s ease, transform 0.18s ease;
}
.account-card-toggle__icon::before,
.account-card-toggle__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.95rem;
    height: 0.14rem;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
}
.account-card-toggle__icon--plus::after {
    transform: translate(-50%, -50%) rotate(90deg);
}
.account-card-toggle__icon--minus::after {
    display: none;
}
.account-card-toggle[aria-expanded="false"] .account-card-toggle__icon--plus,
.account-card-toggle[aria-expanded="true"] .account-card-toggle__icon--minus {
    opacity: 1;
}
.account-card-toggle[aria-expanded="true"] .account-card-toggle__icon--minus {
    transform: rotate(180deg);
}
#activity-period-bar .account-card-toggle {
    width: 1.55rem;
    min-width: 1.55rem;
    height: 1.55rem;
    min-height: 1.55rem;
}
#activity-period-bar .account-card-toggle__icon::before,
#activity-period-bar .account-card-toggle__icon::after {
    width: 0.72rem;
    height: 0.11rem;
}
.account-card-body[hidden] {
    display: none !important;
}
.account-card-body {
    min-width: 0;
}
.account-card-header,
.account-subcard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.account-inline-form {
    flex-shrink: 0;
}
.account-autosave-form {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.account-autosave-form__label {
    max-width: 15rem;
    color: var(--muted-600);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: right;
}
.account-autosave-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    padding: 0 0.55rem;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.account-autosave-switch:hover,
.account-autosave-switch:focus-visible {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 53, 128, 0.44);
    box-shadow: 0 6px 16px rgba(0, 53, 128, 0.12);
}
.account-autosave-switch__state {
    min-width: 2.1rem;
    text-align: center;
    color: #b91c1c;
}
.account-autosave-switch__ui {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 2.35rem;
    height: 1.35rem;
    padding: 0.125rem;
    background: rgba(148, 163, 184, 0.32);
    border: 1px solid rgba(148, 163, 184, 0.5);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.account-autosave-switch__thumb {
    width: 0.9rem;
    height: 0.9rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.account-autosave-switch.is-active {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 53, 128, 0.5);
    color: var(--finland-blue);
}
.account-autosave-switch.is-active .account-autosave-switch__state {
    color: #15803d;
}
.account-autosave-switch.is-active .account-autosave-switch__ui {
    background: rgba(0, 53, 128, 0.16);
    border-color: rgba(0, 53, 128, 0.44);
}
.account-autosave-switch.is-active .account-autosave-switch__thumb {
    transform: translateX(1rem);
    background: var(--finland-blue);
}
.account-table-shell {
    min-width: 0;
    -webkit-overflow-scrolling: touch;
}
.account-table-shell--saved-carts table {
    min-width: 42rem;
}
.account-table-shell--purchased table {
    min-width: 58rem;
}
.account-table-shell--orders table {
    min-width: 76rem;
}
/* ── Account page DataTables chrome ────────────────────────────────────── */
.account-card .account-dt-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .6rem;
}
.account-card .account-dt-top .dt-length,
.account-card .account-dt-top .dt-search {
    float: none;
    margin: 0;
}
.account-card .account-dt-top .dt-search input {
    padding: .35rem .6rem;
    font-size: .78rem;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.6);
    min-width: 12rem;
}
.account-card .account-dt-top .dt-length select {
    padding: .3rem .5rem;
    font-size: .78rem;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.6);
}
.account-card .account-dt-bot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .6rem;
    font-size: .75rem;
    color: var(--muted-600);
}
.account-card .account-dt-bot .dt-info,
.account-card .account-dt-bot .dt-paging {
    float: none;
    margin: 0;
}
.account-card .dt-paging .paginate_button {
    padding: .2rem .5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: .78rem;
    transition: background .12s;
}
.account-card .dt-paging .paginate_button:hover {
    background: rgba(0,83,200,.1);
}
.account-card .dt-paging .paginate_button.current,
.account-card .dt-paging a.paginate_button.current {
    background: var(--finland-blue, #003580) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
.account-card .dt-paging .paginate_button.disabled {
    opacity: .4;
    pointer-events: none;
}
/* ── DataTable Buttons toolbar in account cards ─────────────────────── */
.account-card .dt-buttons {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
}
.account-card .dt-buttons .dt-button {
    border: 1px solid rgba(0,0,0,.13);
    border-radius: 6px;
    padding: .25rem .65rem;
    font-size: .7rem;
    cursor: pointer;
    background: rgba(255,255,255,.55);
    color: var(--ink);
    transition: background .15s, border-color .15s;
    line-height: 1.4;
}
.account-card .dt-buttons .dt-button:hover {
    background: rgba(0,83,200,.08);
    border-color: rgba(0,83,200,.35);
}

.cookie-consent-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 0.5rem;
    background: rgba(9, 24, 48, 0.92);
    color: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.cookie-consent-banner[hidden] {
    display: none;
}

.cookie-consent-banner__copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 58rem;
    font-size: 0.9rem;
}

.cookie-consent-banner__copy strong {
    font-size: 1rem;
}

.cookie-consent-banner__actions,
.cookie-consent-modal__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}

.cookie-consent-modal__panel {
    width: min(48rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 1.25rem;
}

.cookie-consent-modal__lead,
.cookie-consent-policy,
.cookie-consent-status {
    color: var(--muted-600);
    font-size: 0.9rem;
}

.cookie-consent-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.cookie-consent-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-height: 8.25rem;
    padding: 0.85rem;
    border: 1px solid rgba(0, 53, 128, 0.18);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.62);
    cursor: pointer;
}

.cookie-consent-option input {
    margin-top: 0.18rem;
}

.cookie-consent-option span {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cookie-consent-option small {
    color: var(--muted-600);
    line-height: 1.35;
}

.cookie-consent-policy {
    margin: 0.75rem 0 1rem;
}

.cookie-consent-policy h3,
.cookie-consent-policy h4 {
    color: var(--flag-blue);
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.cookie-consent-current {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    padding: 0.35rem 0.55rem;
    border: 1px solid rgba(0, 53, 128, 0.16);
    border-radius: 0.5rem;
    color: var(--flag-blue);
    background: rgba(255, 255, 255, 0.58);
    font-size: 0.82rem;
}

@media (max-width: 760px) {
    .cookie-consent-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-banner__actions,
    .cookie-consent-modal__footer {
        justify-content: stretch;
    }

    .cookie-consent-banner__actions .btn,
    .cookie-consent-modal__footer .btn {
        flex: 1 1 auto;
    }

    .cookie-consent-options {
        grid-template-columns: 1fr;
    }
}
/* ── Profile info two-column grid ───────────────────────────────────────── */
.account-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 1.25rem;
    margin-bottom: 0.25rem;
}
.account-info-grid > div {
    min-width: 0;
}
.account-info-grid dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.05rem;
    opacity: 0.7;
}
.account-info-grid dd {
    font-size: 0.82rem;
    font-weight: 500;
    word-break: break-word;
    margin: 0;
}
/* ── Profile action button groups ───────────────────────────────────────── */
.account-profile-actions__primary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0.5rem;
}
.account-profile-actions__secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.account-profile-actions__more-row {
    display: flex;
    justify-content: center;
    margin-bottom: 0.4rem;
}
.account-profile-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}
.account-profile-exit-btn:hover {
    background: red !important;
}
.account-modal-equal-btn {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    justify-content: center;
}
/* Subtle expand trigger — NOT a full btn */
.account-profile-more-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid rgba(0, 53, 128, 0.5);
    background: rgba(0, 53, 128, 0.08);
    color: var(--muted-ink, #6b7280);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 53, 128, 0.22), 0 0 0 1px rgba(0, 53, 128, 0.08);
    transition: background 0.15s, color 0.15s, transform 0.2s, box-shadow 0.15s;
}
.account-profile-more-icon:hover {
    background: rgba(0, 53, 128, 0.16);
    color: var(--ink, #111827);
    box-shadow: 0 4px 10px rgba(0, 53, 128, 0.3), 0 0 0 1px rgba(0, 53, 128, 0.14);
}
.account-profile-more-icon[aria-expanded="true"] {
    transform: rotate(45deg);
}
.account-profile-actions__extra {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    margin-top: 0;
    transition: max-height 0.28s ease, opacity 0.22s ease, margin-top 0.28s ease;
}
.account-profile-actions__extra.is-open {
    max-height: 24rem;
    opacity: 1;
    pointer-events: auto;
    margin-top: 0.55rem;
}
.account-profile-actions__extra-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}
.account-profile-actions__extra-grid .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-profile-actions__extra-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.account-profile-actions__danger {
    border-top: 1px solid rgba(254, 202, 202, 0.5);
    padding-top: 0.5rem;
    margin-top: 0.15rem;
}
/* ── /Profile action button groups ──────────────────────────────────────── */

.account-profile-image-actions {
    display: grid;
    grid-template-columns: 5rem 2.5rem 2.35rem;
    grid-template-rows: 2.5rem 2.5rem;
    gap: 0.35rem;
    flex-shrink: 0;
    align-items: start;
}
.account-profile-image-actions .account-profile-thumb {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 5rem !important;
    height: 5rem !important;
    align-self: stretch;
}
.account-profile-image-actions .btn-upload-profile-pic {
    grid-column: 2;
    grid-row: 1;
}
.account-profile-image-actions .btn-delete-profile-pic {
    grid-column: 2;
    grid-row: 2;
}
.account-profile-image-actions .account-card-toggle {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: end;
}
.account-profile-image-actions .btn-upload-profile-pic,
.account-profile-image-actions .btn-delete-profile-pic {
    width: 2.5rem;
    height: 2.5rem;
    min-height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.account-profile-thumb {
    width: 5rem;
    height: 5rem;
    border-radius: 0;
    object-fit: cover;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(0,53,128,0.18);
    box-shadow: 0 2px 8px rgba(0,0,0,0.14);
    cursor: zoom-in;
}
.account-profile-thumb:focus-visible {
    outline: 2px solid rgba(0,53,128,0.72);
    outline-offset: 2px;
}


/* ======================================================================= */
/*  * ◀ End of   §25  Admin Page Transitions                               */
/* ======================================================================= */

.admin-image-log-line {
    color: white !important;
}

.js-customer-view-order-row {
    color: black !important;
}

/* ======================================================================= */
/*  * ▶ Start of §53  Customer Journey Timeline                             */
/* ======================================================================= */

.journey-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 1.5rem;
}
.journey-timeline::before {
    content: '';
    position: absolute;
    left: .45rem;
    top: .5rem;
    bottom: .5rem;
    width: 2px;
    background: var(--glass-border);
}
.journey-step {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    position: relative;
    padding: .35rem 0;
}
.journey-step__dot {
    width: .75rem;
    height: .75rem;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: -1.35rem;
    margin-top: .35rem;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
}
.journey-dot--page    { background: #3b82f6; border-color: #3b82f6; }
.journey-dot--modal   { background: #8b5cf6; border-color: #8b5cf6; }
.journey-dot--cart    { background: #22c55e; border-color: #22c55e; }
.journey-dot--filter  { background: #eab308; border-color: #eab308; }
.journey-dot--catalog { background: #eab308; border-color: #eab308; }
.journey-dot--sea     { background: #14b8a6; border-color: #14b8a6; }
.journey-dot--navigation { background: #ef4444; border-color: #ef4444; }
.journey-dot--other   { background: #94a3b8; border-color: #94a3b8; }
.journey-step__body { flex: 1; min-width: 0; }
.journey-step__header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
}
.journey-event-label {
    font-weight: 700;
    color: var(--flag-blue);
}
.journey-step__summary {
    margin-top: .2rem;
    color: var(--text-color);
    font-size: .92rem;
    line-height: 1.35;
}
.journey-step__detail {
    margin-top: .15rem;
    color: var(--muted-text);
    font-size: .76rem;
    line-height: 1.35;
    word-break: break-word;
}
.journey-time {
    font-size: .72rem;
    color: var(--muted-text);
    font-variant-numeric: tabular-nums;
}
.journey-latency {
    font-size: .7rem;
    color: var(--muted-text);
    opacity: .7;
}
.journey-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .6rem;
    margin-top: .2rem;
}
.journey-meta-item {
    font-size: .72rem;
    color: var(--muted-text);
}
.journey-meta-key {
    font-weight: 600;
    opacity: .8;
}
.journey-gap {
    text-align: center;
    font-size: .68rem;
    color: var(--muted-text);
    padding: .1rem 0;
    opacity: .6;
}

/* Badge variants used in journey */
.badge--blue   { background: rgba(59,130,246,.15); color: #3b82f6; }
.badge--purple { background: rgba(139,92,246,.15); color: #8b5cf6; }
.badge--green  { background: rgba(34,197,94,.15);  color: #22c55e; }
.badge--yellow { background: rgba(234,179,8,.18);  color: #a37c00; }
.badge--teal   { background: rgba(20,184,166,.15); color: #14b8a6; }
.badge--red    { background: rgba(239,68,68,.14); color: #dc2626; }
.badge--gray   { background: rgba(156,163,175,.15); color: #6b7280; }

.journey-toggle {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .18rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius, .5rem);
    background: rgba(255,255,255,.5);
}
.journey-toggle__btn {
    border: 0;
    border-radius: calc(var(--radius, .5rem) - .15rem);
    padding: .32rem .65rem;
    color: var(--flag-blue);
    background: transparent;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
}
.journey-toggle__btn.is-active {
    color: #fff;
    background: var(--flag-blue);
}
.journey-flow-list.hidden,
.journey-timeline.hidden,
.journey-expand-btn.hidden,
#jrn-timeline-parsed.hidden,
#jrn-flow-raw.hidden {
    display: none !important;
}
.journey-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 2rem;
    padding: .3rem .65rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius, .5rem);
    background: rgba(255,255,255,.56);
    color: var(--flag-blue);
    font-size: .75rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}
.journey-expand-btn:hover,
.journey-expand-btn:focus-visible {
    background: rgba(255,255,255,.78);
    outline: 2px solid rgba(0,47,108,.2);
    outline-offset: 2px;
}
.journey-expand-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    color: #fff;
    background: var(--flag-blue);
    font-size: .85rem;
    font-weight: 900;
}
.journey-filter-btn {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: .3rem .7rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius, .5rem);
    background: rgba(255,255,255,.56);
    color: var(--flag-blue, #003580);
    font-size: .75rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}
.journey-filter-btn.is-active {
    color: #fff;
    background: var(--flag-blue, #003580);
    border-color: rgba(0,47,108,.42);
}
.journey-filter-btn .jfb-check {
    display: none;
}
.journey-filter-btn.is-active .jfb-check {
    display: inline;
}
.journey-filter-btn:hover,
.journey-filter-btn:focus-visible {
    outline: 2px solid rgba(0,47,108,.2);
    outline-offset: 2px;
}

.journey-category-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: .16rem .48rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
    background: rgba(148,163,184,.16);
    border: 1px solid rgba(148,163,184,.24);
}
.journey-category-pill--page { color: #1d4ed8; background: rgba(59,130,246,.14); border-color: rgba(59,130,246,.28); }
.journey-category-pill--modal { color: #6d28d9; background: rgba(139,92,246,.14); border-color: rgba(139,92,246,.28); }
.journey-category-pill--catalog,
.journey-category-pill--filter { color: #8a6700; background: rgba(234,179,8,.16); border-color: rgba(234,179,8,.3); }
.journey-category-pill--cart { color: #15803d; background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.28); }
.journey-category-pill--sea { color: #0f766e; background: rgba(20,184,166,.14); border-color: rgba(20,184,166,.28); }
.journey-category-pill--navigation { color: #b91c1c; background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.24); }

.journey-flow-list {
    display: grid;
    gap: .55rem;
}
.journey-flow-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(8rem, 11rem);
    align-items: center;
    gap: .85rem;
    padding: .75rem .85rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius, .5rem);
    background: rgba(255,255,255,.45);
}
.journey-flow-card__sentence {
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.35;
}
.journey-flow-card__route {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .35rem;
    color: var(--muted-text);
    font-size: .78rem;
}
.journey-flow-card__arrow {
    color: var(--flag-blue);
    font-weight: 800;
}
.journey-flow-card__label {
    font-weight: 600;
}
.journey-flow-card__metric {
    text-align: right;
    color: var(--flag-blue);
}
.journey-flow-card__metric strong {
    font-size: 1.1rem;
}
.journey-flow-card__bar {
    height: .45rem;
    margin-top: .3rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--glass-border);
}
.journey-flow-card__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--flag-blue);
}

.journey-graph-panel {
    padding: .85rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius, .5rem);
    background: rgba(255,255,255,.42);
}
.journey-graph-title {
    color: var(--flag-blue);
    font-size: .78rem;
    font-weight: 800;
    margin-bottom: .65rem;
}
.journey-graph {
    display: grid;
    gap: .55rem;
}
.journey-graph-row {
    display: grid;
    grid-template-columns: 7rem minmax(10rem, 1fr);
    align-items: center;
    gap: .75rem;
}
.journey-graph-row__label {
    color: var(--muted-text);
    font-size: .72rem;
    font-weight: 700;
}
.journey-graph-row__track {
    position: relative;
    height: 1.65rem;
    border-radius: 999px;
    background: rgba(255,255,255,.55);
    border: 1px solid var(--glass-border);
}
.journey-graph-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    color: #fff;
    font-size: .58rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(15,23,42,.15);
}
.journey-graph-dot--page { background: #3b82f6; }
.journey-graph-dot--modal { background: #8b5cf6; }
.journey-graph-dot--catalog,
.journey-graph-dot--filter { background: #d9a400; }
.journey-graph-dot--cart { background: #22c55e; }
.journey-graph-dot--sea { background: #14b8a6; }
.journey-graph-dot--navigation { background: #ef4444; }
.journey-graph-dot--other { background: #94a3b8; }

.journey-story-report {
    padding: 1rem;
    border: 1px solid rgba(0,47,108,.18);
    border-radius: var(--radius, .5rem);
    background:
        linear-gradient(135deg, rgba(0,47,108,.1), rgba(255,255,255,.72) 36%, rgba(20,184,166,.08)),
        rgba(255,255,255,.58);
    box-shadow: 0 14px 34px rgba(15,23,42,.08);
}
.journey-briefing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 14rem);
    gap: .85rem;
    align-items: stretch;
    padding: .95rem;
    margin-bottom: .75rem;
    border: 1px solid rgba(0,47,108,.2);
    border-radius: var(--radius, .5rem);
    background:
        linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.58)),
        rgba(255,255,255,.64);
    color: var(--ink);
}
.journey-briefing-eyebrow {
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
    opacity: .72;
}
.journey-briefing-title {
    margin-top: .15rem;
    font-size: 1.25rem;
    font-weight: 950;
    line-height: 1.05;
}
.journey-briefing-context {
    display: grid;
    gap: .18rem;
    margin-top: .55rem;
    font-size: .75rem;
    line-height: 1.35;
    opacity: .88;
}
.journey-briefing-rank {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: .8rem;
    border: 1px solid rgba(0,47,108,.16);
    border-radius: var(--radius, .5rem);
    background: rgba(255,255,255,.46);
}
.journey-briefing-rank span {
    font-size: .66rem;
    font-weight: 900;
    text-transform: uppercase;
    opacity: .76;
}
.journey-briefing-rank strong {
    margin-top: .18rem;
    font-size: 1.05rem;
    line-height: 1.12;
}
.journey-briefing-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: .55rem;
    margin-bottom: .8rem;
}
.journey-briefing-score,
.journey-briefing-panel {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius, .5rem);
    background: rgba(255,255,255,.55);
}
.journey-briefing-score {
    padding: .65rem;
}
.journey-briefing-score__top,
.journey-signal-row__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    color: var(--flag-blue);
    font-size: .72rem;
    font-weight: 900;
}
.journey-briefing-meter,
.journey-signal-row__bar {
    height: .45rem;
    margin-top: .4rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0,47,108,.12);
}
.journey-briefing-meter span,
.journey-signal-row__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--flag-blue), #14b8a6);
}
.journey-briefing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    margin-bottom: .8rem;
}
.journey-briefing-panel {
    padding: .75rem;
    min-width: 0;
}
.journey-briefing-panel__title {
    margin-bottom: .55rem;
    color: var(--flag-blue);
    font-size: .72rem;
    font-weight: 950;
    text-transform: uppercase;
}
.journey-phase-map {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .35rem;
}
.journey-phase-tile {
    min-width: 0;
    padding: .45rem;
    border-radius: var(--radius, .5rem);
    background: rgba(0,47,108,.06);
}
.journey-phase-tile span {
    color: var(--muted-text);
    font-size: .6rem;
    font-weight: 900;
}
.journey-phase-tile strong {
    display: block;
    margin-top: .12rem;
    color: var(--flag-blue);
    font-size: .68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.journey-signal-bars {
    display: grid;
    gap: .45rem;
}
.journey-signal-row__label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.journey-result-arc {
    display: flex;
    align-items: flex-end;
    gap: .14rem;
    height: 8.2rem;
    padding: .45rem;
    border-radius: var(--radius, .5rem);
    background: rgba(0,47,108,.06);
}
.journey-result-arc span {
    flex: 1;
    min-width: .18rem;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, #14b8a6, var(--flag-blue));
}
.journey-story-beats {
    display: grid;
    gap: .42rem;
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-color);
    font-size: .78rem;
    line-height: 1.35;
}
.journey-briefing-empty {
    color: var(--muted-text);
    font-size: .76rem;
}
.journey-story-report__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}
.journey-story-report__title {
    color: var(--flag-blue);
    font-size: .85rem;
    font-weight: 900;
}
.journey-story-report__intro,
.journey-story-report__empty {
    color: var(--muted-text);
    font-size: .76rem;
    line-height: 1.35;
}
.journey-story-report__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: .55rem;
    margin-bottom: .75rem;
}
.journey-story-card {
    min-width: 0;
    padding: .65rem .7rem;
    border: 1px solid rgba(0,47,108,.13);
    border-radius: var(--radius, .5rem);
    background: rgba(255,255,255,.62);
}
.journey-story-card__label {
    color: var(--muted-text);
    font-size: .66rem;
    font-weight: 900;
    text-transform: uppercase;
}
.journey-story-card__value {
    margin-top: .15rem;
    color: var(--flag-blue);
    font-size: 1rem;
    font-weight: 900;
}
.journey-story-card__meta {
    margin-top: .15rem;
    color: var(--text-color);
    font-size: .72rem;
    line-height: 1.3;
    word-break: break-word;
}
.journey-story-report__story {
    display: grid;
    gap: .45rem;
    padding: .8rem;
    border: 1px solid rgba(0,47,108,.1);
    border-radius: var(--radius, .5rem);
    background: rgba(255,255,255,.48);
}
.journey-story-report__story p {
    margin: 0;
    color: var(--text-color);
    font-size: .85rem;
    line-height: 1.45;
}

/* Sessions stat chips reused in journey */
.sessions-stat { white-space: nowrap; }

/* ── Journey 2.0 — hero, DNA, rings, chart panels, beats, narrative ─────── */

.jrn-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    margin-bottom: .75rem;
    border-radius: var(--radius, .5rem);
    background: linear-gradient(135deg, #001f5c 0%, #003580 55%, #0050c8 100%);
    color: #fff;
    flex-wrap: wrap;
}
.jrn-hero__left { flex: 1 1 0; min-width: 0; }
.jrn-hero__eyebrow {
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .6;
    margin-bottom: .28rem;
}
.jrn-hero__identity {
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: .1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jrn-hero__device {
    font-size: .72rem;
    font-weight: 400;
    opacity: .7;
    margin-bottom: .5rem;
}
.jrn-hero__vitals {
    display: flex;
    gap: 1.3rem;
    flex-wrap: wrap;
    margin-bottom: .45rem;
}
.jrn-hero__vital-val {
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
}
.jrn-hero__vital-key {
    font-size: .57rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    opacity: .58;
}
.jrn-hero__context {
    font-size: .7rem;
    opacity: .68;
    line-height: 1.5;
    word-break: break-all;
}
.jrn-rank-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 6rem;
    padding: .65rem .9rem;
    border-radius: var(--radius, .5rem);
    text-align: center;
    color: #fff;
}
.jrn-rank-badge__eyebrow {
    font-size: .52rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .65;
    margin-bottom: .18rem;
}
.jrn-rank-badge__rank {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1.1;
}
.jrn-rank-badge__tagline {
    font-size: .58rem;
    opacity: .62;
    margin-top: .18rem;
    line-height: 1.3;
    max-width: 8rem;
}
.jrn-rank-badge--quiet   { background: rgba(148,163,184,.2); border: 1px solid rgba(148,163,184,.4); }
.jrn-rank-badge--active  { background: rgba(20,184,166,.25); border: 1px solid rgba(20,184,166,.55); }
.jrn-rank-badge--deep    { background: rgba(139,92,246,.3);  border: 1px solid rgba(139,92,246,.55); }
.jrn-rank-badge--legend  { background: linear-gradient(135deg,rgba(251,191,36,.35),rgba(251,146,60,.35)); border: 1px solid rgba(251,191,36,.65); }

/* DNA fingerprint */
.jrn-dna-section { margin-bottom: .75rem; }
.jrn-dna-sectionlabel {
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--flag-blue);
    margin-bottom: .3rem;
}
.jrn-dna {
    display: flex;
    gap: 1.5px;
    height: 28px;
    padding: 0 2px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(0,47,108,.05);
}
.jrn-dna__tile {
    flex: 1;
    min-width: 3px;
    border-radius: 2px;
    cursor: default;
    transition: transform .08s, opacity .08s;
}
.jrn-dna__tile:hover { transform: scaleY(1.25); }
.jrn-dna__tile--page       { background: #3b82f6; }
.jrn-dna__tile--catalog,
.jrn-dna__tile--filter     { background: #d97706; }
.jrn-dna__tile--modal      { background: #8b5cf6; }
.jrn-dna__tile--cart       { background: #22c55e; }
.jrn-dna__tile--sea        { background: #14b8a6; }
.jrn-dna__tile--navigation { background: #ef4444; }
.jrn-dna__tile--other      { background: #94a3b8; }
.jrn-dna-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .8rem;
    margin-top: .3rem;
}
.jrn-dna-legend-dot {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .63rem;
    color: var(--muted-text);
}
.jrn-dna-legend-dot::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Score rings */
.jrn-rings {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: .55rem;
    margin-bottom: .75rem;
}
.jrn-ring-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: .7rem .5rem .6rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius,.5rem);
    background: rgba(255,255,255,.55);
}
.jrn-ring-svg { width: 60px; height: 60px; overflow: visible; }
.jrn-ring-track {
    stroke: rgba(0,47,108,.1);
    fill: none;
    stroke-width: 5.5;
}
.jrn-ring-fill {
    fill: none;
    stroke-width: 5.5;
    stroke-linecap: round;
    transform-origin: 30px 30px;
    transform: rotate(-90deg);
}
.jrn-ring-num {
    font-size: 10.5px;
    font-weight: 900;
    fill: var(--flag-blue, #003580);
}
.jrn-ring-label {
    font-size: .62rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--flag-blue);
    text-align: center;
    line-height: 1.25;
}

/* Chart panels */
.jrn-charts-row {
    display: grid;
    grid-template-columns: 5fr 8fr;
    gap: .65rem;
    margin-bottom: .65rem;
}
.jrn-chart-panel {
    padding: .75rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius,.5rem);
    background: rgba(255,255,255,.55);
    min-width: 0;
}
.jrn-chart-full-row { margin-bottom: .65rem; }
.jrn-chart-title {
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--flag-blue);
    margin-bottom: .5rem;
}

/* Beat / milestone cards */
.jrn-section-label {
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--flag-blue);
    margin-bottom: .4rem;
}
.jrn-beats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: .5rem;
    margin-bottom: .75rem;
}
.jrn-beat-card {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .6rem .65rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius,.5rem);
    background: rgba(255,255,255,.55);
    transition: background .12s, border-color .12s;
}
.jrn-beat-card:hover { background: rgba(255,255,255,.8); border-color: rgba(0,53,128,.22); }
.jrn-beat-card__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: .05rem;
}
.jrn-beat-card__title {
    font-size: .8rem;
    font-weight: 900;
    color: var(--flag-blue);
    line-height: 1.2;
}
.jrn-beat-card__detail {
    font-size: .69rem;
    color: var(--muted-text);
    line-height: 1.35;
    margin-top: .1rem;
    word-break: break-word;
}

/* Narrative block */
.jrn-narrative {
    display: grid;
    gap: .42rem;
    padding: .85rem 1rem;
    border-left: 3px solid var(--flag-blue, #003580);
    border-top: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    border-radius: var(--radius,.5rem);
    background: rgba(255,255,255,.48);
}
.jrn-narrative p {
    margin: 0;
    color: var(--text-color);
    font-size: .84rem;
    line-height: 1.5;
}
.jrn-narrative p:first-child {
    font-size: .9rem;
    font-weight: 600;
    color: var(--flag-blue);
}

/* ── Session Inspector ───────────────────────────────────────────────────── */

.si-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 1rem;
    margin-bottom: .8rem;
    border-radius: .6rem;
    background: linear-gradient(135deg, rgba(0,35,100,.82) 0%, rgba(0,55,160,.7) 100%);
    color: #fff;
}
.si-hero__left { flex: 1; min-width: 0; }
.si-hero__eyebrow {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .55;
    margin-bottom: .25rem;
}
.si-hero__identity {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: .15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.si-hero__sub {
    font-size: .75rem;
    opacity: .7;
    margin-bottom: .35rem;
}
.si-hero__badges { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .3rem; }
.si-hero__badge {
    display: inline-block;
    padding: .1rem .45rem;
    border-radius: .3rem;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.si-hero__badge--active  { background: rgba(34,197,94,.25); color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.si-hero__badge--expired { background: rgba(156,163,175,.2); color: #d1d5db; border: 1px solid rgba(156,163,175,.25); }
.si-hero__badge--file    { background: rgba(59,130,246,.25); color: #93c5fd; border: 1px solid rgba(59,130,246,.3); }
.si-hero__badge--db      { background: rgba(156,163,175,.2); color: #d1d5db; border: 1px solid rgba(156,163,175,.25); }
.si-hero__vitals {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    text-align: right;
    flex-shrink: 0;
}
.si-hero__vital { line-height: 1.1; }
.si-hero__vval { font-size: .78rem; font-weight: 700; font-family: ui-monospace, monospace; }
.si-hero__vkey { font-size: .6rem; text-transform: uppercase; letter-spacing: .07em; opacity: .5; }

.si-id-pill {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .8rem;
    padding: .3rem .6rem;
    border-radius: .35rem;
    background: rgba(var(--ink-rgb,0,0,0),.04);
    border: 1px solid rgba(var(--ink-rgb,0,0,0),.07);
    overflow: hidden;
}
.si-id-pill__label {
    flex-shrink: 0;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted-fg, #6b7280);
}
.si-id-pill__val {
    font-family: ui-monospace, monospace;
    font-size: .7rem;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Session Inspector cards ─────────────────────────────────────────────── */

.si-card {
    border: 1px solid rgba(var(--ink-rgb, 0,0,0),.08);
    border-radius: .6rem;
    overflow: hidden;
    background: rgba(var(--ink-rgb, 0,0,0),.025);
}
.si-card-header {
    padding: .55rem .8rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    background: rgba(var(--ink-rgb, 0,0,0),.05);
    border-bottom: 1px solid rgba(var(--ink-rgb, 0,0,0),.07);
    color: var(--ink);
}
.si-card summary.si-card-header { list-style: none; }
.si-card summary.si-card-header::-webkit-details-marker { display: none; }
.si-card-row {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding: .3rem .8rem;
    font-size: .78rem;
    border-bottom: 1px solid rgba(var(--ink-rgb, 0,0,0),.04);
}
.si-card-row:last-child { border-bottom: none; }
.si-card-key {
    flex: 0 0 120px;
    color: var(--muted-fg, #6b7280);
    font-size: .74rem;
}
.si-card-val {
    flex: 1;
    color: var(--ink);
    word-break: break-all;
}
.si-table {
    border-collapse: collapse;
    font-size: .75rem;
}
.si-table th, .si-table td {
    padding: .25rem .5rem;
    border-bottom: 1px solid rgba(var(--ink-rgb, 0,0,0),.06);
    text-align: left;
}
.si-table th {
    font-weight: 600;
    color: var(--muted-fg, #6b7280);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.si-card-row--total {
    background: rgba(var(--ink-rgb,0,0,0),.04);
    font-weight: 600;
}
.si-identity-card .si-card-header {
    font-size: .88rem;
    text-transform: none;
    letter-spacing: 0;
}

/* ======================================================================= */
/*  * ◀ End of   §53  Customer Journey Timeline                             */
/* ======================================================================= */

/* ======================================================================= */
/*  * ▶ Start of §54  Admin Category Tree Tab                               */
/* ======================================================================= */

/* ── Tab navigation ─────────────────────────────────────────────────────── */
.cat-admin-tab-nav {
    display: flex;
    gap: .5rem;
    padding: .5rem .75rem;
    margin-bottom: .75rem;
    background: var(--glass-bg, rgba(255,255,255,.12));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: .75rem;
    border: 1px solid rgba(255,255,255,.18);
}
.cat-admin-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .85rem;
    border-radius: .5rem;
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--muted-2, #6b7280);
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.cat-admin-tab-btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
.cat-admin-tab-btn:hover {
    background: rgba(0,53,128,.06);
    color: var(--ink, #1e293b);
}
.cat-admin-tab-btn.is-active {
    background: rgba(0,53,128,.12);
    border-color: rgba(0,53,128,.28);
    color: var(--finland-blue, #003580);
    font-weight: 600;
}

/* ── Tree layout ─────────────────────────────────────────────────────────── */
.cat-tree-layout {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 1rem;
    height: calc(100vh - 8rem);
    min-height: 500px;
}
.cat-tree-pane,
.cat-tree-viewer {
    border-radius: .75rem;
    border: 1px solid rgba(255,255,255,.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ── Tree pane ───────────────────────────────────────────────────────────── */
.cat-tree-pane__header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    padding: .6rem .75rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
    flex-shrink: 0;
}
.cat-tree-pane__header .input {
    flex: 0 0 auto;
}

/* ── Product-of-the-day chip ─────────────────────────────────────────────── */
.ct-potd-chip {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .5rem;
    border-radius: 7px;
    background: rgba(251, 191, 36, 0.10);
    border: 1px solid rgba(251, 191, 36, 0.28);
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.ct-potd-chip:hover,
.ct-potd-chip:focus-visible,
.ct-potd-chip.is-active {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.48);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.12);
    outline: none;
}
.ct-potd-chip--empty {
    opacity: .82;
}

.ct-potd-chip__star {
    color: #f59e0b;
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
}

.ct-potd-chip__body {
    display: flex;
    flex-direction: column;
    gap: .05rem;
    flex: 1;
    min-width: 0;
}

.ct-potd-chip__label {
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted-1, #9ca3af);
    line-height: 1;
}

.ct-potd-chip__name {
    font-size: .78rem;
    font-weight: 600;
    color: var(--ink, #f8fafc);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ct-potd-edit-btn {
    flex-shrink: 0;
}

.potd-modal-panel {
    width: min(520px, calc(100vw - 2rem));
    max-width: 520px;
    padding: 0 !important;
}

.potd-current-wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .9rem;
    padding: .65rem;
    border: 1px solid rgba(142, 174, 226, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.potd-current-wrap img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(0, 53, 128, 0.07);
    flex-shrink: 0;
}

.cat-tree-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: auto;
    padding: .35rem .25rem;
}

/* ── Tree list (ul/li/etc) ───────────────────────────────────────────────── */
.ct-tree-list,
.ct-subtree {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ct-subtree {
    padding-left: 1.35rem;
    border-left: 1.5px solid rgba(255,255,255,.1);
    margin-left: .55rem;
    margin-top: .1rem;
}
.ct-node {
    position: relative;
}
.ct-node-row {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .4rem;
    border-radius: .45rem;
    cursor: pointer;
    transition: background .13s;
    position: relative;
    user-select: none;
}
.ct-node-row:hover {
    background: rgba(0,53,128,.06);
}
.ct-node-row.is-selected {
    background: rgba(0,53,128,.14);
    box-shadow: inset 2px 0 0 var(--finland-blue, #003580);
}
.ct-node-row.ct-drop-over {
    background: rgba(0,53,128,.22);
    outline: 2px dashed var(--finland-blue, #003580);
    outline-offset: -2px;
}

.ct-node-toggle {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--muted-2, #6b7280);
    border-radius: .25rem;
    transition: transform .18s ease, color .13s;
}
.ct-node-toggle.is-open svg {
    transform: rotate(0deg);
}
.ct-node-toggle:not(.is-open) svg {
    transform: rotate(-90deg);
}
.ct-node-toggle svg {
    width: .85rem;
    height: .85rem;
}

.ct-node-thumb {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: .25rem;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ct-node-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ct-node-thumb-placeholder {
    font-size: .75rem;
    opacity: .4;
}

.ct-node-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .82rem;
    color: var(--ink, #1e293b);
}
.ct-node-label mark {
    background: rgba(251,191,36,.35);
    border-radius: .2rem;
    color: inherit;
}
.ct-node-count {
    font-size: .7rem;
    color: var(--muted-2, #6b7280);
    flex-shrink: 0;
}
.ct-node-actions {
    display: none;
    align-items: center;
    gap: .25rem;
    flex-shrink: 0;
}
.ct-node-row:hover .ct-node-actions,
.ct-node-row.is-selected .ct-node-actions {
    display: flex;
}
.ct-node-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: .3rem;
    border: none;
    background: rgba(255,255,255,.08);
    color: var(--muted-2, #6b7280);
    font-size: .65rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: background .13s, color .13s;
    line-height: 1;
}
.ct-node-btn:hover {
    background: rgba(0,53,128,.14);
    color: var(--finland-blue, #003580);
}
.ct-node-btn--danger:hover {
    background: rgba(220,38,38,.12);
    color: #dc2626;
}
.ct-node-btn svg {
    width: .75rem;
    height: .75rem;
}

/* Virtual root node (uncategorized) */
.ct-node--virtual > .ct-node-row {
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: .2rem;
    padding-bottom: .15rem;
}
.ct-node--virtual > .ct-node-row .ct-node-label {
    font-style: italic;
    opacity: .75;
}
.ct-node--virtual > .ct-node-row .ct-node-count {
    opacity: .6;
}

/* Passive (inactive) category node — dimmed but still drag-droppable */
.ct-node--passive > .ct-node-row .ct-node-label {
    opacity: .45;
    font-style: italic;
}
.ct-node--passive > .ct-node-row .ct-node-count {
    opacity: .35;
}
.ct-node--passive > .ct-node-row .ct-node-thumb img {
    opacity: .4;
    filter: grayscale(60%);
}

/* Inline create form */
.ct-inline-form {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .5rem .3rem 2.4rem;
}
.ct-inline-input {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .8rem !important;
    padding: .25rem .4rem !important;
}

.ct-tree-loading,
.ct-tree-empty {
    padding: 1rem;
    color: var(--muted-2, #6b7280);
    font-size: .85rem;
}

/* ── Viewer pane ─────────────────────────────────────────────────────────── */
.ct-viewer-empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--muted-2, #6b7280);
    padding: 2rem;
}
.ct-viewer-empty svg {
    width: 3.5rem;
    height: 3.5rem;
    opacity: .3;
}
.ct-viewer-empty p {
    font-size: .9rem;
    text-align: center;
}

#ct-viewer-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.ct-viewer-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .85rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
    flex-shrink: 0;
}
.ct-viewer-breadcrumb {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink, #1e293b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ct-breadcrumb-sep {
    opacity: .4;
    margin: 0 .2rem;
}
.ct-breadcrumb-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    color: var(--finland-blue, #003580);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 2px;
    transition: text-decoration-color .13s, opacity .13s;
}
.ct-breadcrumb-link:hover {
    text-decoration-color: var(--finland-blue, #003580);
    opacity: .8;
}
.ct-breadcrumb-current {
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink, #1e293b);
}
.ct-product-add-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .85rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
}
/* ── Viewer category image banner ───────────────────────────────────────── */
.ct-viewer-header-thumb {
    display: block;
    width: 140px;
    height: 112px;
    object-fit: cover;
    object-position: center;
    border-radius: .4rem;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.06);
}
.ct-viewer-cat-banner {
    flex-shrink: 0;
    overflow: hidden;
    max-height: 160px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.ct-viewer-cat-thumb {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: center;
}
/* ── Viewer subcategory chips ───────────────────────────────────────────── */
.ct-viewer-subcats {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .85rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.ct-viewer-subcats__label {
    font-size: .72rem;
    color: var(--muted-2, #6b7280);
    flex-shrink: 0;
    font-weight: 600;
}
.ct-viewer-subcats__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    min-width: 0;
}
.ct-viewer-subcat-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .6rem .3rem .35rem;
    border-radius: .45rem;
    background: rgba(0,53,128,.07);
    border: 1px solid rgba(0,53,128,.18);
    font-size: .78rem;
    color: var(--finland-blue, #003580);
    cursor: pointer;
    transition: background .13s, border-color .13s;
    white-space: nowrap;
    user-select: none;
}
.ct-viewer-subcat-chip:hover {
    background: rgba(0,53,128,.16);
    border-color: rgba(0,53,128,.38);
}
.ct-viewer-subcat-chip__count {
    font-size: .65rem;
    opacity: .6;
}
.ct-subcat-chip-thumb {
    width: 40px;
    height: 40px;
    border-radius: .3rem;
    object-fit: cover;
    flex-shrink: 0;
}

.ct-products-meta {
    padding: .35rem .85rem;
    font-size: .75rem;
    color: var(--muted-2, #6b7280);
    flex-shrink: 0;
}
.ct-products-grid {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: .5rem .75rem;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: .6rem;
}
.ct-products-empty {
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    color: var(--muted-2, #6b7280);
    font-size: .85rem;
}

/* ── Product cards ───────────────────────────────────────────────────────── */
.ct-prod-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    width: 8rem;
    padding: .5rem .4rem .4rem;
    border-radius: .6rem;
    border: 1.5px solid rgba(255,255,255,.16);
    background: var(--glass-bg, rgba(255,255,255,.07));
    cursor: grab;
    transition: border-color .15s, box-shadow .15s, opacity .15s;
    user-select: none;
    text-align: center;
}
.ct-prod-card:hover {
    border-color: rgba(0,53,128,.35);
    box-shadow: 0 3px 12px rgba(0,53,128,.12);
}
.ct-prod-card.ct-dragging {
    opacity: .4;
    cursor: grabbing;
}
.ct-prod-thumb {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    border-radius: .35rem;
    background: rgba(255,255,255,.07);
    display: block;
    flex-shrink: 0;
}
.ct-prod-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: .4;
}
.ct-prod-card__name {
    font-size: .7rem;
    font-weight: 500;
    color: var(--ink, #1e293b);
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}
.ct-prod-card__sku {
    font-size: .62rem;
    color: var(--muted-2, #6b7280);
}
.ct-prod-card__price {
    font-size: .7rem;
    font-weight: 600;
    color: var(--finland-blue, #003580);
}
.ct-prod-card__stock {
    font-size: .62rem;
    font-weight: 500;
}
.ct-prod-card__actions {
    display: none;
    position: absolute;
    top: .25rem;
    right: .25rem;
    gap: .2rem;
}
.ct-prod-card:hover .ct-prod-card__actions {
    display: flex;
}
.ct-prod-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: .3rem;
    border: none;
    background: rgba(255,255,255,.85);
    color: var(--muted-2, #6b7280);
    cursor: pointer;
    padding: 0;
    transition: background .12s, color .12s;
}
.ct-prod-btn:hover {
    background: rgba(0,53,128,.18);
    color: var(--finland-blue, #003580);
}
.ct-prod-btn--danger:hover {
    background: rgba(239,68,68,.15);
    color: #ef4444;
}
.ct-prod-btn--free:hover {
    background: rgba(234,179,8,.15);
    color: #ca8a04;
}
.ct-prod-btn svg {
    width: .7rem;
    height: .7rem;
}

/* Multi-selected product card */
.ct-prod-card.ct-selected {
    border-color: var(--finland-blue, #003580);
    box-shadow: 0 0 0 2px rgba(0,53,128,.3);
    background: rgba(0,53,128,.08);
}
.ct-prod-card.ct-selected .ct-prod-card__actions {
    display: flex;
}

/* Additional-category product card */
.ct-prod-card--additional {
    border-style: dashed;
    border-color: rgba(0,53,128,.3);
    opacity: .85;
}
.ct-prod-card--additional:hover {
    border-style: dashed;
    opacity: 1;
}
.ct-prod-card__badge {
    position: absolute;
    top: .2rem;
    left: .2rem;
    font-size: .55rem;
    font-weight: 700;
    line-height: 1;
    padding: .1rem .3rem;
    border-radius: .25rem;
    background: rgba(0,53,128,.18);
    color: var(--finland-blue, #003580);
    pointer-events: none;
}

/* Rubber-band selection rectangle */
.ct-rubber-box {
    position: absolute;
    pointer-events: none;
    border: 1.5px dashed var(--finland-blue, #003580);
    background: rgba(0,53,128,.07);
    border-radius: 3px;
    z-index: 20;
}

/* Category node drag states */
.ct-node-row[draggable="true"] {
    cursor: grab;
}
.ct-node-row.ct-cat-dragging {
    opacity: .45;
    cursor: grabbing;
}
.ct-node-row.ct-cat-drop-over {
    background: rgba(16,185,129,.13);
    outline: 1.5px dashed #10b981;
    border-radius: 5px;
}

/* Product add row — constrain Select2 width */
.ct-product-add-row .select2-container {
    min-width: 160px;
    max-width: 320px;
    flex: 1 1 200px;
}
#ct-product-search {
    width: 260px;
}

/* ── Blue-glass overrides for all three category admin modals ──────────── */

/* Override CSS variables — covers DataTables rows, filter input, Select2,
   and any inline style="color:var(--ink/--muted-2)" throughout the modal */
#category-modal,
#category-products-modal,
#cat-conflict-modal {
    --ink:                   #ffffff;
    --muted-2:               rgba(148, 163, 184, 0.82);
    --muted-600:             rgba(148, 163, 184, 0.82);
    --surface-soft:          rgba(255, 255, 255, 0.09);
    --glass-bg:              rgba(5, 14, 34, 0.72);
    --datatable-row-bg:      rgba(255, 255, 255, 0.04);
    --datatable-row-hover-bg:rgba(255, 255, 255, 0.09);
    --datatable-row-border:  rgba(142, 174, 226, 0.14);
    /* Select2 global rules use these variables */
    --line-soft:             rgba(142, 174, 226, 0.35);
}

/* Shared dark-blue glass panel */
#category-modal .admin-form-modal-panel,
#category-products-modal .admin-form-modal-panel,
#cat-conflict-modal .admin-form-modal-panel {
    background: rgba(11, 29, 58, 0.82) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(4, 12, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}
/* Header / footer */
#category-modal .admin-form-modal-header,
#category-modal .admin-form-modal-footer,
#category-products-modal .admin-form-modal-header,
#category-products-modal .admin-form-modal-footer,
#cat-conflict-modal .admin-form-modal-header,
#cat-conflict-modal .admin-form-modal-footer {
    background: rgba(7, 18, 42, 0.72) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border-color: rgba(142, 174, 226, 0.22) !important;
    color: #ffffff !important;
}
/* Body */
#category-modal .admin-form-modal-body,
#category-products-modal .admin-form-modal-body,
#cat-conflict-modal .admin-form-modal-body {
    background: rgba(7, 18, 42, 0.58) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #ffffff !important;
}
/* ── All text: labels, headings, utility classes, table cells ── */
#category-modal label,
#category-modal .pf-label,
#category-modal .pf-pane-title,
#category-modal h3, #category-modal h4,
#category-modal dt, #category-modal dd,
#category-modal p, #category-modal small,
#category-modal .text-sm, #category-modal .text-xs,
#category-modal [class*="text-gray"],
#category-modal [class*="text-flag"],
#category-modal [class*="text-muted"],
#category-products-modal label,
#category-products-modal h3, #category-products-modal h4,
#category-products-modal p, #category-products-modal small,
#category-products-modal .text-sm, #category-products-modal .text-xs,
#category-products-modal [class*="text-gray"],
#category-products-modal [class*="text-flag"],
#category-products-modal th, #category-products-modal td,
#cat-conflict-modal label,
#cat-conflict-modal h3, #cat-conflict-modal h4,
#cat-conflict-modal strong, #cat-conflict-modal p, #cat-conflict-modal small,
#cat-conflict-modal .text-sm, #cat-conflict-modal .text-xs,
#cat-conflict-modal [class*="text-gray"],
#cat-conflict-modal [class*="text-flag"],
#cat-conflict-modal th, #cat-conflict-modal td {
    color: rgba(226, 232, 240, 0.92) !important;
}
/* Keep required asterisk red */
#category-modal .text-red-400 { color: #f87171 !important; }

/* ── pf-tab-rail ── */
#category-modal .pf-tab-rail {
    background: rgba(5, 14, 34, 0.72) !important;
    border-right-color: rgba(142, 174, 226, 0.18) !important;
}
#category-modal .pf-tab-btn { color: rgba(226, 232, 240, 0.85) !important; }
#category-modal .pf-tab-btn:hover {
    background: rgba(255, 255, 255, .1) !important;
    color: #ffffff !important;
}
#category-modal .pf-tab-btn.is-active {
    background: rgba(0, 91, 187, 0.32) !important;
    color: #ffffff !important;
}

/* ── Inputs / selects / textareas (including DataTables filter + length) ── */
#category-modal .input,
#category-modal .select,
#category-modal .textarea,
#category-modal input,
#category-modal textarea,
#category-modal select,
#category-products-modal .input,
#category-products-modal .select,
#category-products-modal .textarea,
#category-products-modal input,
#category-products-modal textarea,
#category-products-modal select,
#cat-conflict-modal .input,
#cat-conflict-modal input,
#cat-conflict-modal select {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(142, 174, 226, 0.35) !important;
    color: #ffffff !important;
}
/* Checkboxes and radio buttons should stay as native controls */
#category-modal input[type="checkbox"],
#category-modal input[type="radio"],
#category-products-modal input[type="checkbox"],
#category-products-modal input[type="radio"],
#cat-conflict-modal input[type="checkbox"],
#cat-conflict-modal input[type="radio"] {
    background: revert !important;
    border-color: revert !important;
}
#category-modal .input:focus,
#category-modal textarea:focus,
#category-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
#category-modal select:focus,
#category-products-modal .input:focus,
#category-products-modal input:not([type="checkbox"]):not([type="radio"]):focus,
#category-products-modal select:focus,
#cat-conflict-modal input:not([type="checkbox"]):not([type="radio"]):focus,
#cat-conflict-modal select:focus {
    border-color: rgba(96, 165, 250, 0.72) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.22) !important;
}
/* Native select option dropdown */
#category-modal select option,
#category-products-modal select option,
#cat-conflict-modal select option {
    background: #0c1e3d;
    color: #e2e8f0;
}
/* Placeholder */
#category-modal .input::placeholder,
#category-modal .textarea::placeholder,
#category-modal input::placeholder,
#category-modal textarea::placeholder,
#category-products-modal .input::placeholder,
#category-products-modal input::placeholder {
    color: rgba(148, 163, 184, 0.6) !important;
}

/* ── Select2 inside blue-glass modals ── */
#category-modal .select2-container--default .select2-selection--single,
#category-modal .select2-container--default .select2-selection--multiple,
#category-products-modal .select2-container--default .select2-selection--single,
#category-products-modal .select2-container--default .select2-selection--multiple {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(142, 174, 226, 0.35) !important;
}
#category-modal .select2-container--default .select2-selection--single .select2-selection__rendered,
#category-products-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
}
#category-modal .select2-container--default .select2-selection--single .select2-selection__placeholder,
#category-products-modal .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: rgba(148, 163, 184, 0.65) !important;
}
#category-modal .select2-container--default .select2-selection--single .select2-selection__arrow b,
#category-products-modal .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-top-color: rgba(226, 232, 240, 0.65) !important;
}
/* Multi-select tags */
#category-modal .select2-container--default .select2-selection--multiple .select2-selection__choice,
#category-products-modal .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: rgba(0, 91, 187, 0.42) !important;
    border-color: rgba(96, 165, 250, 0.38) !important;
    color: #e2e8f0 !important;
}
#category-modal .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
#category-products-modal .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(148, 163, 184, 0.8) !important;
    border-right-color: rgba(96, 165, 250, 0.3) !important;
}
/* Inner search input in multi-select */
#category-modal .select2-container--default .select2-selection--multiple .select2-search__field,
#category-products-modal .select2-container--default .select2-selection--multiple .select2-search__field {
    color: #ffffff !important;
}
/* Focus ring */
#category-modal .select2-container--default.select2-container--focus .select2-selection--single,
#category-modal .select2-container--default.select2-container--focus .select2-selection--multiple,
#category-products-modal .select2-container--default.select2-container--focus .select2-selection--single,
#category-products-modal .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: rgba(96, 165, 250, 0.72) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.22) !important;
}

/* ── DataTables inside blue-glass modals ── */
/* Toolbar / filter label text */
#category-products-modal .dt-container,
#cat-conflict-modal .dt-container {
    color: rgba(226, 232, 240, 0.9) !important;
}
/* DataTables filter input + length select — override var(--surface-soft) baseline */
#category-products-modal .dt-search input,
#category-products-modal .dt-length select,
#cat-conflict-modal .dt-search input,
#cat-conflict-modal .dt-length select {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(142, 174, 226, 0.35) !important;
    color: #ffffff !important;
}
/* DataTables thead — kill the blur so it doesn't lighten against the dark body */
#category-products-modal table.dataTable thead th,
#cat-conflict-modal table.dataTable thead th {
    background: rgba(5, 14, 34, 0.82) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: rgba(226, 232, 240, 0.88) !important;
    border-bottom-color: rgba(142, 174, 226, 0.2) !important;
}
/* DataTables tbody rows and cells */
#category-products-modal table.dataTable tbody td,
#cat-conflict-modal table.dataTable tbody td {
    color: rgba(226, 232, 240, 0.9) !important;
}
#category-products-modal table.dataTable tbody tr:hover > td,
#cat-conflict-modal table.dataTable tbody tr:hover > td {
    filter: none !important;
    opacity: 1 !important;
}
/* DataTables info + pagination text */
#category-products-modal .dt-info,
#cat-conflict-modal .dt-info {
    color: rgba(148, 163, 184, 0.8) !important;
}

/* ── Conflict option cards ── */
#cat-conflict-modal #ccm-option-cards label {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(142, 174, 226, 0.22) !important;
}

/* ── Table separators ── */
#category-products-modal thead tr,
#category-products-modal tbody tr:not(:last-child) {
    border-bottom-color: rgba(142, 174, 226, 0.18) !important;
}
#cat-conflict-modal thead tr {
    border-bottom-color: rgba(142, 174, 226, 0.2) !important;
}

/* ── Category create/edit modal size ── */
#category-modal .admin-form-modal-panel {
    width: min(860px, 95vw);
    max-width: min(860px, 95vw);
    min-height: min(72vh, 640px);
}

/* ======================================================================= */
/*  * ◀ End of   §54  Admin Category Tree Tab                               */
/* ======================================================================= */

/* ======================================================================= */
/* Admin product modal polish moved out of shop.css. */
/* ======================================================================= */

/* =====================================================================
 * Admin products page — blue glass for base-panel + form modals
 * ===================================================================== */

/* Admin sales history modal — matches shop product-sales-modal-panel style */
#admin-product-sales-modal .product-sales-modal-panel {
    background: rgba(11, 29, 58, 0.72) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
    backdrop-filter: blur(24px) saturate(160%) !important;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(4, 12, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    padding: 1rem 1rem 1.618rem 1.618rem;
}
#admin-product-sales-modal .text-flag-blue,
#admin-product-sales-modal h3 { color: #e2e8f0 !important; }
#admin-product-sales-modal #apsm-stats { color: rgba(226, 232, 240, 0.86); }
#admin-product-sales-modal #apsm-no-data { color: rgba(226, 232, 240, 0.82) !important; }

/* Order-detail sub-modal and comment-detail modal (use base admin-view-modal-panel) */
#aprom-order-detail-modal .admin-view-modal-panel,
#admin-product-comment-detail-modal .admin-view-modal-panel {
    background: rgba(11, 29, 58, 0.72) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(4, 12, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}
#aprom-order-detail-modal .admin-view-modal-header,
#aprom-order-detail-modal .admin-view-modal-body,
#aprom-order-detail-modal .admin-view-modal-footer,
#admin-product-comment-detail-modal .admin-view-modal-header,
#admin-product-comment-detail-modal .admin-view-modal-body,
#admin-product-comment-detail-modal .admin-view-modal-footer {
    background: rgba(0, 0, 0, 0) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #ffffff !important;
}
#aprom-order-detail-modal .admin-view-modal-header,
#aprom-order-detail-modal .admin-view-modal-footer,
#admin-product-comment-detail-modal .admin-view-modal-header,
#admin-product-comment-detail-modal .admin-view-modal-footer {
    border-color: rgba(142, 174, 226, 0.22) !important;
}
#aprom-order-detail-modal .text-flag-blue,
#aprom-order-detail-modal .text-gray-500,
#aprom-order-detail-modal .text-gray-600,
#aprom-order-detail-modal .text-gray-700,
#admin-product-comment-detail-modal .text-flag-blue,
#admin-product-comment-detail-modal .text-gray-500,
#admin-product-comment-detail-modal .text-gray-600,
#admin-product-comment-detail-modal .text-gray-700 {
    color: rgba(226, 232, 240, 0.88) !important;
}

/* Price-note modal — blue glass (simple textarea modal) */
#product-price-note-modal .admin-form-modal-panel {
    background: rgba(11, 29, 58, 0.72) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(4, 12, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    padding-bottom: 1.5rem;
}
#product-price-note-modal .admin-form-modal-header,
#product-price-note-modal .admin-form-modal-body,
#product-price-note-modal .admin-form-modal-footer {
    background: rgba(0, 0, 0, 0) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #ffffff !important;
}
#product-price-note-modal .admin-form-modal-header {
    border-bottom-color: rgba(142, 174, 226, 0.22) !important;
}
#product-price-note-modal .admin-form-modal-footer {
    border-top-color: rgba(142, 174, 226, 0.22) !important;
}
#product-price-note-modal .text-flag-blue,
#product-price-note-modal .text-gray-500,
#product-price-note-modal .text-gray-600,
#product-price-note-modal .text-gray-700,
#product-price-note-modal label {
    color: rgba(226, 232, 240, 0.88) !important;
}
#product-price-note-modal .textarea {
    background: rgba(11, 29, 58, 0.55) !important;
    border-color: rgba(142, 174, 226, 0.3) !important;
    color: #ffffff !important;
}
#product-price-note-modal .textarea::placeholder {
    color: rgba(226, 232, 240, 0.45) !important;
}

/* Favourite remove confirm modal — blue glass */
#fav-remove-confirm-modal .admin-form-modal-panel {
    background: rgba(11, 29, 58, 0.72) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(4, 12, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    padding-bottom: 1.5rem;
}
#fav-remove-confirm-modal .admin-form-modal-header,
#fav-remove-confirm-modal .admin-form-modal-body,
#fav-remove-confirm-modal .admin-form-modal-footer {
    background: rgba(0, 0, 0, 0) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #ffffff !important;
}
#fav-remove-confirm-modal .admin-form-modal-header {
    border-bottom-color: rgba(142, 174, 226, 0.22) !important;
}
#fav-remove-confirm-modal .admin-form-modal-footer {
    border-top-color: rgba(142, 174, 226, 0.22) !important;
}
#fav-remove-confirm-modal .text-flag-blue,
#fav-remove-confirm-modal .text-gray-700 {
    color: rgba(226, 232, 240, 0.88) !important;
}
#fav-remove-confirm-modal .admin-form-modal-footer .btn {
    height: 38px;
    min-height: 38px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 38px;
}

/* Product edit modal — blue glass header/footer; body keeps readable form bg */
div#product-modal.modal-backdrop .admin-form-modal-panel {
    background: rgba(11, 29, 58, 0.72) !important;
    border: 1px solid rgba(142, 174, 226, 0.28) !important;
    box-shadow: 0 24px 56px rgba(4, 12, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}
#product-modal .admin-form-modal-header,
#product-modal .admin-form-modal-footer {
    background: rgba(0, 0, 0, 0) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border-color: rgba(142, 174, 226, 0.22) !important;
}
#product-modal .admin-form-modal-header .text-flag-blue,
#product-modal .admin-form-modal-header .text-gray-500,
#product-modal .admin-form-modal-header .text-gray-600 {
    color: rgba(226, 232, 240, 0.88) !important;
}
#product-modal .pf-tab-body.admin-form-modal-body {
    background: rgba(7, 18, 42, 0.68) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    padding-left: 2rem;
    padding-bottom: 2.5rem;
}
#product-modal .pf-tab-rail {
    background: rgba(5, 14, 34, 0.72) !important;
    border-right: 1px solid rgba(142, 174, 226, 0.18) !important;
    padding-bottom: 2rem;
}
#product-modal .pf-tab-btn {
    color: rgba(203, 213, 225, 0.88) !important;
}
#product-modal .pf-tab-btn.is-active {
    background: rgba(0, 91, 187, 0.28) !important;
    color: #e2e8f0 !important;
}
#product-modal .pf-pane-title {
    color: #e2e8f0 !important;
}
#product-modal .admin-form-modal-body label,
#product-modal .admin-form-modal-body .text-gray-500,
#product-modal .admin-form-modal-body .text-gray-600,
#product-modal .admin-form-modal-body .text-gray-700,
#product-modal .admin-form-modal-body .text-xs,
#product-modal .admin-form-modal-body .pf-section-label {
    color: rgba(203, 213, 225, 0.88) !important;
}
#product-modal .admin-form-modal-body .text-flag-blue {
    color: #e2e8f0 !important;
}
#product-modal .pf-subsection-hd {
    color: #e2e8f0 !important;
}
#product-modal .pf-label {
    color: rgba(203, 213, 225, 0.82) !important;
}
#product-modal .pf-stat-val {
    color: #e2e8f0 !important;
}
#product-modal .pf-stat-key {
    color: rgba(148, 163, 184, 0.88) !important;
}
/* Catch any remaining ink-colored or default-colored text inside the form body */
#product-modal .admin-form-modal-body {
    color: rgba(226, 232, 240, 0.9);
}
#product-modal .admin-form-modal-body div,
#product-modal .admin-form-modal-body p,
#product-modal .admin-form-modal-body span:not(.pf-tab-badge):not(.catalog-flag-badge),
#product-modal .admin-form-modal-body small,
#product-modal .admin-form-modal-body li {
    color: inherit;
}
/* Header title */
#product-modal #product-modal-title {
    color: #e2e8f0 !important;
    text-shadow: none !important;
}
/* Also cover text-flag-blue anywhere in the view modals (title headers) */
.admin-view-modal-panel--product .text-flag-blue,
.admin-view-modal-panel--product h3,
.admin-view-modal-panel--product h4 {
    color: #e2e8f0 !important;
}
#aprom-order-detail-modal h3,
#admin-product-comment-detail-modal h3 {
    color: #e2e8f0 !important;
}
#product-price-note-modal h3 {
    color: #e2e8f0 !important;
}

/* Review comment items inside the --product panel */
.admin-view-modal-panel--product .admin-product-review-comment__title {
    color: #e2e8f0 !important;
}
.admin-view-modal-panel--product .admin-product-review-comment__meta {
    color: rgba(203, 213, 225, 0.75) !important;
}
.admin-view-modal-panel--product .admin-product-review-comment__body {
    color: rgba(226, 232, 240, 0.9) !important;
}

/* DataTable and generic table text inside products-page modals */
.admin-view-modal-panel--product th,
.admin-view-modal-panel--product td,
.admin-view-modal-panel--product tr {
    color: rgba(226, 232, 240, 0.9) !important;
}
#aprom-order-detail-modal th,
#aprom-order-detail-modal td,
#aprom-order-detail-modal tr,
#admin-product-comment-detail-modal th,
#admin-product-comment-detail-modal td {
    color: rgba(226, 232, 240, 0.9) !important;
}

/* admin-view-grid dd (uses var(--ink)) inside products-page modals */
.admin-view-modal-panel--product .admin-view-grid dd {
    color: rgba(226, 232, 240, 0.9) !important;
}
#aprom-order-detail-modal .admin-view-grid dd,
#admin-product-comment-detail-modal .admin-view-grid dd {
    color: rgba(226, 232, 240, 0.9) !important;
}

/* Catch any default ink/dark text that inherits from body in all products-page modals */
.admin-view-modal-panel--product .admin-view-modal-body *:not(button):not(.btn):not(.catalog-flag-badge):not(.admin-mod-badge--pending):not(.admin-mod-badge--approved):not(.admin-mod-badge--declined) {
    color: inherit;
}

/* ── pf-section-hd (blue in light/mixed themes) ──────────────────────── */
#product-modal .pf-section-hd,
.admin-view-modal-panel--product .pf-section-hd {
    color: rgba(148, 163, 184, 0.75) !important;
    border-bottom-color: rgba(142, 174, 226, 0.14) !important;
}

/* ── review-comment cards: swap white bg → dark glass, blue/black text → light ── */
.admin-view-modal-panel--product .admin-product-review-comment {
    background: rgba(11, 29, 58, 0.55) !important;
    border-color: rgba(142, 174, 226, 0.22) !important;
}
.admin-view-modal-panel--product .admin-product-review-comment__title {
    color: #e2e8f0 !important;
}
.admin-view-modal-panel--product .admin-product-review-comment__meta {
    color: rgba(148, 163, 184, 0.82) !important;
}
.admin-view-modal-panel--product .admin-product-review-comment__body {
    color: rgba(226, 232, 240, 0.88) !important;
}

/* ── review-summary score + caption ─────────────────────────────────── */
.admin-view-modal-panel--product .admin-product-review-summary__score {
    color: #e2e8f0 !important;
}
.admin-view-modal-panel--product .admin-product-review-summary__caption,
.admin-view-modal-panel--product .admin-product-review-summary__dist-count,
.admin-view-modal-panel--product .admin-product-review-summary__dist-score {
    color: rgba(148, 163, 184, 0.82) !important;
}
.admin-view-modal-panel--product .admin-product-review-summary__dist-track {
    background: rgba(255, 255, 255, 0.12) !important;
}

/* ── DataTable rows inside the products-page modals → dark glass rows ── */
.admin-view-modal-panel--product table.dataTable tbody tr,
.admin-view-modal-panel--product table.dataTable tbody td,
#aprom-order-detail-modal table.dataTable tbody tr,
#aprom-order-detail-modal table.dataTable tbody td,
#admin-product-comment-detail-modal table.dataTable tbody tr,
#admin-product-comment-detail-modal table.dataTable tbody td {
    background: rgba(11, 29, 58, 0.42) !important;
    color: rgba(226, 232, 240, 0.9) !important;
}
.admin-view-modal-panel--product table.dataTable tbody tr:hover > td,
#aprom-order-detail-modal table.dataTable tbody tr:hover > td,
#admin-product-comment-detail-modal table.dataTable tbody tr:hover > td {
    background: rgba(30, 58, 100, 0.72) !important;
}
/* DataTable header row */
.admin-view-modal-panel--product table.dataTable thead th,
#aprom-order-detail-modal table.dataTable thead th,
#admin-product-comment-detail-modal table.dataTable thead th {
    color: rgba(148, 163, 184, 0.88) !important;
}
/* Plain (non-DataTable) tables in order detail */
#aprom-order-detail-modal table:not(.dataTable) tbody tr,
#aprom-order-detail-modal table:not(.dataTable) tbody td,
#aprom-order-detail-modal table:not(.dataTable) thead th {
    background: rgba(11, 29, 58, 0.38) !important;
    color: rgba(226, 232, 240, 0.9) !important;
}

/* ── status badge bg-white/60 (recent-orders table) → dark glass ────── */
.admin-view-modal-panel--product td span.rounded,
#aprom-order-detail-modal td span.rounded {
    background: rgba(30, 58, 100, 0.72) !important;
    color: rgba(226, 232, 240, 0.88) !important;
}

/* ── variant card bg-white/30 (product view helpers) → dark glass ────── */
.admin-view-modal-panel--product .rounded-lg.border {
    background: rgba(11, 29, 58, 0.45) !important;
    border-color: rgba(142, 174, 226, 0.28) !important;
    color: rgba(226, 232, 240, 0.9) !important;
}

/* =====================================================================
 * Admin products modals — DataTable + order-detail restyle
 * ===================================================================== */

/* ── Padding-top for both modals ──────────────────────────────────── */
#admin-product-recent-orders-modal .admin-view-modal-panel,
#aprom-order-detail-modal .admin-view-modal-panel {
    padding-top: 1.25rem;
}

/* ── DataTable search input inside the products-page modals ──────── */
#admin-product-recent-orders-modal .dt-search input,
#aprom-order-detail-modal .dt-search input,
.admin-view-modal-panel--product .dt-search input {
    background: rgba(11, 29, 58, 0.55) !important;
    border: 1px solid rgba(142, 174, 226, 0.3) !important;
    color: #e2e8f0 !important;
    border-radius: 4px !important;
    padding: .3rem .6rem !important;
}
#admin-product-recent-orders-modal .dt-search input::placeholder,
#aprom-order-detail-modal .dt-search input::placeholder,
.admin-view-modal-panel--product .dt-search input::placeholder {
    color: rgba(148, 163, 184, 0.55) !important;
}
#admin-product-recent-orders-modal .dt-search,
#aprom-order-detail-modal .dt-search,
.admin-view-modal-panel--product .dt-search {
    color: rgba(148, 163, 184, 0.75) !important;
}
/* DataTable toolbar wrapper background */
#admin-product-recent-orders-modal .datatable-toolbar,
#aprom-order-detail-modal .datatable-toolbar,
.admin-view-modal-panel--product .datatable-toolbar {
    background: transparent !important;
}

/* ── DataTable thead — blue glass header row ──────────────────────── */
#admin-product-recent-orders-modal table.dataTable thead th,
#aprom-order-detail-modal table.dataTable thead th,
.admin-view-modal-panel--product table.dataTable thead th {
    background: rgba(7, 18, 42, 0.72) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: rgba(148, 163, 184, 0.88) !important;
    border-bottom: 1px solid rgba(142, 174, 226, 0.22) !important;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
/* Sort icons */
#admin-product-recent-orders-modal table.dataTable thead .sorting::before,
#admin-product-recent-orders-modal table.dataTable thead .sorting::after,
#admin-product-recent-orders-modal table.dataTable thead .sorting_asc::before,
#admin-product-recent-orders-modal table.dataTable thead .sorting_asc::after,
#admin-product-recent-orders-modal table.dataTable thead .sorting_desc::before,
#admin-product-recent-orders-modal table.dataTable thead .sorting_desc::after,
#aprom-order-detail-modal table.dataTable thead .sorting::before,
#aprom-order-detail-modal table.dataTable thead .sorting::after,
#aprom-order-detail-modal table.dataTable thead .sorting_asc::before,
#aprom-order-detail-modal table.dataTable thead .sorting_asc::after,
#aprom-order-detail-modal table.dataTable thead .sorting_desc::before,
#aprom-order-detail-modal table.dataTable thead .sorting_desc::after,
.admin-view-modal-panel--product table.dataTable thead .sorting::before,
.admin-view-modal-panel--product table.dataTable thead .sorting::after,
.admin-view-modal-panel--product table.dataTable thead .sorting_asc::after,
.admin-view-modal-panel--product table.dataTable thead .sorting_desc::after {
    color: rgba(148, 163, 184, 0.55) !important;
    opacity: 1 !important;
}

/* ── Order detail modal: info grid labels & values ────────────────── */
#aprom-order-detail-modal .admin-view-modal-body .text-xs,
#aprom-order-detail-modal .admin-view-modal-body .text-gray-500,
#aprom-order-detail-modal .admin-view-modal-body .text-gray-400 {
    color: rgba(148, 163, 184, 0.82) !important;
}
#aprom-order-detail-modal .admin-view-modal-body .font-mono,
#aprom-order-detail-modal .admin-view-modal-body .font-semibold,
#aprom-order-detail-modal .admin-view-modal-body .font-bold,
#aprom-order-detail-modal .admin-view-modal-body .leading-snug {
    color: #e2e8f0 !important;
}
/* Plain text divs in the info grid */
#aprom-order-detail-modal .admin-view-modal-body div {
    color: inherit;
}

/* ── Order detail items table (non-DataTable fallback + DT version) ── */
#aprom-order-detail-modal #aprod-items-dt thead tr {
    color: rgba(148, 163, 184, 0.88) !important;
    background: rgba(7, 18, 42, 0.72) !important;
}
#aprom-order-detail-modal #aprod-items-dt thead th {
    color: rgba(148, 163, 184, 0.88) !important;
    background: rgba(7, 18, 42, 0.72) !important;
    border-bottom: 1px solid rgba(142, 174, 226, 0.22) !important;
    padding-bottom: .4rem !important;
}
/* Summary dl labels (subtotal / VAT / shipping / total) */
#aprom-order-detail-modal dl dt.text-gray-500,
#aprom-order-detail-modal dl dt {
    color: rgba(148, 163, 184, 0.82) !important;
}
#aprom-order-detail-modal dl dd {
    color: #e2e8f0 !important;
}
/* Total row (text-flag-blue override) */
#aprom-order-detail-modal .text-flag-blue {
    color: #e2e8f0 !important;
}
/* Customer link button */
#aprom-order-detail-modal .js-aprod-open-customer {
    color: #93c5fd !important;
}

/* ── Recent orders table: status badge + overall row text ─────────── */
#admin-product-recent-orders-modal .admin-view-modal-body .text-xs,
#admin-product-recent-orders-modal .admin-view-modal-body .text-gray-400 {
    color: rgba(148, 163, 184, 0.75) !important;
}

/* ── Padding-top for product comments modal and product details view modal ── */
#admin-product-comments-modal .admin-view-modal-panel,
#admin-view-modal .admin-view-modal-panel--product {
    padding-top: 1.25rem;
}

/* ── Comments preview cards inside the product details view modal ──────── */
.admin-view-modal-panel--product .admin-product-comment-preview {
    background: rgba(11, 29, 58, 0.5) !important;
    border: 1px solid rgba(142, 174, 226, 0.22) !important;
    border-radius: .5rem;
    padding: .625rem .875rem;
    margin-bottom: .5rem;
}
.admin-view-modal-panel--product .admin-product-comment-preview__meta {
    color: rgba(148, 163, 184, 0.75) !important;
    font-size: .75rem;
}
.admin-view-modal-panel--product .admin-product-comment-preview__body {
    color: rgba(226, 232, 240, 0.9) !important;
    font-size: .875rem;
    margin-top: .25rem;
}
.admin-view-modal-panel--product .admin-product-comment-preview__status-approved {
    color: #6ee7b7 !important;
    font-size: .7rem;
    font-weight: 600;
}
.admin-view-modal-panel--product .admin-product-comment-preview__status-pending {
    color: #fcd34d !important;
    font-size: .7rem;
    font-weight: 600;
}
.admin-view-modal-panel--product .admin-product-comment-preview__status-declined {
    color: #f87171 !important;
    font-size: .7rem;
    font-weight: 600;
}

/* ── Moderation tab cards in product edit modal ─────────────────────────── */
#product-modal .pf-mod-item {
    background: rgba(11, 29, 58, 0.5) !important;
    border: 1px solid rgba(142, 174, 226, 0.22) !important;
    border-radius: .5rem;
    padding: .75rem 1rem;
    margin-bottom: .625rem;
}
#product-modal .pf-mod-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
    margin-bottom: .375rem;
}
#product-modal .pf-mod-item__meta {
    color: rgba(148, 163, 184, 0.8) !important;
    font-size: .72rem;
}
#product-modal .pf-mod-item__body {
    color: rgba(226, 232, 240, 0.9) !important;
    font-size: .8rem;
    margin-top: .25rem;
    line-height: 1.5;
}
#product-modal .pf-mod-item__actions {
    display: flex;
    gap: .375rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}
#product-modal .pf-mod-status-approved  { color: #6ee7b7 !important; font-size: .7rem; font-weight: 600; }
#product-modal .pf-mod-status-pending   { color: #fcd34d !important; font-size: .7rem; font-weight: 600; }
#product-modal .pf-mod-status-declined  { color: #f87171 !important; font-size: .7rem; font-weight: 600; }
#product-modal .pf-mod-rating { color: #fbbf24 !important; font-size: .85rem; }
#product-modal #pf-moderation-body .pf-pane-title { font-size: .85rem; margin-top: .875rem; margin-bottom: .5rem; }
#product-modal #pf-moderation-body .pf-pane-title:first-child { margin-top: 0; }

/* ── Product view modal — tab layout ─────────────────────────────── */
#admin-view-modal .admin-view-modal-panel--product {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
    width: min(880px, 95vw) !important;
    max-width: min(880px, 95vw) !important;
    min-width: min(880px, 95vw) !important;
}
#admin-view-modal .admin-view-modal-panel--product .admin-view-modal-header,
#admin-view-modal .admin-view-modal-panel--product .admin-view-modal-footer {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
}
#admin-view-modal .admin-view-modal-panel--product .admin-view-modal-body {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#admin-view-modal .admin-view-modal-panel--product #avm-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#admin-view-modal .admin-view-modal-panel--product .avt-tab-layout {
    flex: 1;
    min-height: 400px;
}
#admin-view-modal .admin-view-modal-panel--product .pf-tab-layout {
    border-top-color: rgba(142, 174, 226, 0.18);
}
#admin-view-modal .admin-view-modal-panel--product .pf-tab-rail {
    background: rgba(5, 14, 34, 0.72) !important;
    border-right: 1px solid rgba(142, 174, 226, 0.18) !important;
    padding-bottom: 2rem;
}
#admin-view-modal .admin-view-modal-panel--product .pf-tab-btn {
    color: rgba(203, 213, 225, 0.88) !important;
}
#admin-view-modal .admin-view-modal-panel--product .pf-tab-btn:hover {
    color: #e2e8f0 !important;
}
#admin-view-modal .admin-view-modal-panel--product .pf-tab-btn.is-active {
    background: rgba(0, 91, 187, 0.28) !important;
    color: #e2e8f0 !important;
}
#admin-view-modal .admin-view-modal-panel--product .pf-tab-body {
    background: rgba(7, 18, 42, 0.68);
    max-height: none;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#admin-view-modal .admin-view-modal-panel--product .pf-tab-body::-webkit-scrollbar { display: none; }
#admin-view-modal .admin-view-modal-panel--product .avt-audit-dl {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(142, 174, 226, 0.18);
    opacity: 0.72;
}

/* ── Image zoom overlay — must sit above all admin modals ─────────────── */
.admin-product-image-zoom-overlay {
    z-index: 99990 !important;
}

/* ── Footer nav buttons inside product edit modal — white text ─────────── */
#product-modal .pf-footer-nav-btn {
    color: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    background: rgba(255, 255, 255, 0.07) !important;
}
#product-modal .pf-footer-nav-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

/* ── Product review comments modal — padding top + star colors ─────────── */
#admin-product-review-comments-modal .admin-view-modal-panel {
    padding-top: 1.25rem;
}
#admin-product-review-comments-modal .admin-product-review-summary__star:not(.is-active),
#admin-view-modal .admin-product-review-summary__star:not(.is-active) {
    color: rgba(255, 255, 255, 0.22) !important;
}
#admin-product-review-comments-modal .admin-product-review-summary__star.is-active,
#admin-product-review-comments-modal .admin-product-review-comment__stars .admin-product-review-summary__star.is-active,
#admin-view-modal .admin-product-review-summary__star.is-active,
#admin-view-modal .admin-product-review-comment__stars .admin-product-review-summary__star.is-active,
#product-modal .admin-product-review-summary__star.is-active {
    color: #f59e0b !important;
}

/* ── Order detail modal — blue-glass select fields ─────────────────────── */
#aprom-order-detail-modal #aprod-status-sel,
#aprom-order-detail-modal #aprod-pay-status-sel {
    background: rgba(75, 140, 240, 0.12) !important;
    border: 1px solid rgba(142, 174, 226, 0.38) !important;
    color: #e2e8f0 !important;
    border-radius: 0 !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
#aprom-order-detail-modal #aprod-status-sel option,
#aprom-order-detail-modal #aprod-pay-status-sel option {
    background: #0d1e40;
    color: #e2e8f0;
}
#aprom-order-detail-modal #aprod-status-sel:focus,
#aprom-order-detail-modal #aprod-pay-status-sel:focus {
    border-color: rgba(75, 140, 240, 0.65) !important;
    box-shadow: 0 0 0 2px rgba(75, 140, 240, 0.2) !important;
    outline: none;
}

/* ── Product edit modal — glass inputs, textareas, selects ─────────────── */
#product-modal .admin-form-modal-body .input,
#product-modal .admin-form-modal-body .select,
#product-modal .admin-form-modal-body .textarea,
#product-modal .admin-form-modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
#product-modal .admin-form-modal-body select:not(.select2-hidden-accessible),
#product-modal .admin-form-modal-body textarea {
    background: rgba(75, 140, 240, 0.09) !important;
    border-color: rgba(142, 174, 226, 0.28) !important;
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0;
}
#product-modal .admin-form-modal-body .input::placeholder,
#product-modal .admin-form-modal-body .textarea::placeholder,
#product-modal .admin-form-modal-body input::placeholder,
#product-modal .admin-form-modal-body textarea::placeholder {
    color: rgba(148, 163, 184, 0.55) !important;
    -webkit-text-fill-color: rgba(148, 163, 184, 0.55) !important;
}
#product-modal .admin-form-modal-body .input:focus,
#product-modal .admin-form-modal-body .select:focus,
#product-modal .admin-form-modal-body .textarea:focus,
#product-modal .admin-form-modal-body input:focus,
#product-modal .admin-form-modal-body select:focus,
#product-modal .admin-form-modal-body textarea:focus {
    background: rgba(75, 140, 240, 0.14) !important;
    border-color: rgba(142, 174, 226, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(75, 140, 240, 0.14) !important;
}
#product-modal .admin-form-modal-body .select2-container--default .select2-selection--single {
    background: rgba(75, 140, 240, 0.09) !important;
    border-color: rgba(142, 174, 226, 0.28) !important;
}
#product-modal .admin-form-modal-body .select2-container--default.select2-container--focus .select2-selection--single,
#product-modal .admin-form-modal-body .select2-container--default.select2-container--open .select2-selection--single {
    border-color: rgba(142, 174, 226, 0.55) !important;
    background: rgba(75, 140, 240, 0.14) !important;
}
#product-modal .admin-form-modal-body .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e2e8f0 !important;
}
#product-modal .admin-form-modal-body .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: rgba(148, 163, 184, 0.6) !important;
}

#product-modal .btn-primary,
#product-modal .btn-ghost,
#admin-view-modal .btn-primary,
#admin-view-modal .btn-ghost {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45) !important;
}
/* ── Product modal: scheduled price form — blue glass (not gray) ─────────── */
#product-modal .admin-scheduled-price-form {
    background: rgba(75, 140, 240, 0.07) !important;
    border-color: rgba(142, 174, 226, 0.28) !important;
}

/* ── Product modal: Select2 dropdown panel (dropdownParent: #product-modal) ─ */
#product-modal .select2-dropdown {
    background: rgba(11, 29, 58, 0.96) !important;
    border: 1px solid rgba(142, 174, 226, 0.38) !important;
    color: #e2e8f0 !important;
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
}
#product-modal .select2-dropdown .select2-search--dropdown {
    padding: .375rem .5rem;
    border-bottom: 1px solid rgba(142, 174, 226, 0.2);
}
#product-modal .select2-dropdown .select2-search__field {
    background: rgba(75, 140, 240, 0.1) !important;
    border: 1px solid rgba(142, 174, 226, 0.3) !important;
    color: #e2e8f0 !important;
    border-radius: .25rem;
}
#product-modal .select2-dropdown .select2-search__field::placeholder {
    color: rgba(148, 163, 184, 0.55);
}
#product-modal .select2-dropdown .select2-results__option {
    color: #cbd5e1;
    padding: .35rem .6rem;
}
#product-modal .select2-dropdown .select2-results__option--highlighted.select2-results__option--selectable {
    background: rgba(75, 140, 240, 0.28) !important;
    color: #ffffff !important;
}
#product-modal .select2-dropdown .select2-results__option[aria-selected="true"] {
    background: rgba(75, 140, 240, 0.18) !important;
    color: #93c5fd !important;
}
/* Multi-select: chosen tag chips inside the modal */
#product-modal .admin-form-modal-body .select2-container--default .select2-selection--multiple {
    background: rgba(75, 140, 240, 0.09) !important;
    border-color: rgba(142, 174, 226, 0.28) !important;
}
#product-modal .admin-form-modal-body .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: rgba(75, 140, 240, 0.3) !important;
    border-color: rgba(142, 174, 226, 0.4) !important;
    color: #e2e8f0 !important;
}
#product-modal .admin-form-modal-body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(148, 163, 184, 0.7) !important;
}
#product-modal .admin-form-modal-body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ffffff !important;
    background: rgba(239, 68, 68, 0.4) !important;
}

/* ── Category admin: virtual rail settings ───────────────────────────────── */
.virtual-rail-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 0.9rem;
}
.virtual-rail-admin-card {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.9rem;
    border: 1px solid rgba(0, 53, 128, 0.16);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.5);
}
.virtual-rail-admin-card__preview {
    width: 4rem;
    height: 4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(0, 53, 128, 0.18);
    border-radius: 4px;
    background: rgba(0, 53, 128, 0.08);
    color: var(--finland-blue, #003580);
    font-weight: 800;
}
.virtual-rail-admin-card__fallback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--finland-blue, #003580);
}
.virtual-rail-admin-card__fallback-icon svg {
    width: 2.45rem;
    height: 2.45rem;
}
.virtual-rail-admin-card__fallback-symbol {
    font-size: 2.65rem;
    font-weight: 900;
    line-height: 1;
}
.virtual-rail-admin-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.virtual-rail-admin-card__body {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}
.virtual-rail-admin-card__body h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
}
.virtual-rail-admin-card__body label {
    display: grid;
    gap: 0.22rem;
}
.virtual-rail-admin-card__body label span {
    color: var(--muted-2, #6b7280);
    font-size: 0.75rem;
    font-weight: 700;
}
.virtual-rail-admin-card__upload {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: fit-content;
    padding: 0.28rem 0.7rem !important;
    font-size: 0.78rem;
    cursor: pointer;
    color: #fff !important;
}
.virtual-rail-admin-card__upload svg {
    width: 0.9rem;
    height: 0.9rem;
}
#virtual-rail-form .btn-primary,
#virtual-rail-form .btn-primary span,
#virtual-rail-form .btn-primary svg,
.virtual-rail-admin-card__upload,
.virtual-rail-admin-card__upload span,
.virtual-rail-admin-card__upload svg,
.virtual-rail-admin-card__upload:hover {
    color: #fff !important;
}
.virtual-rail-admin-card__upload span {
    font-size: inherit;
}
.virtual-rail-admin-card__status {
    min-height: 1rem;
}

/* =======================================================================
   Interaction Reports (admin/reports/interactions)
   These styles live here because admin layout does not load shop.css.
   ======================================================================= */
.report-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.report-card-header {
    flex-wrap: wrap;
}
.report-card-header > div:first-child {
    min-width: 0;
    flex: 1 1 15rem;
}
.report-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}
.report-card-actions .btn {
    min-width: 4.4rem;
}
.report-chart-shell {
    position: relative;
    width: 100%;
    min-height: 0;
}
.report-chart-shell--md {
    height: 18rem;
}
.report-chart-shell--lg {
    height: 20rem;
}
.report-chart-shell--xl {
    height: 24rem;
}
.report-zoom-modal-panel {
    width: min(96vw, 1600px);
    max-width: none;
    height: min(92vh, 1040px);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.report-zoom-stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
}
.interaction-report-status {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.interaction-report-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--ink);
    font-size: .78rem;
    font-weight: 700;
}
.interaction-report-pill--ok {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.22);
    color: #047857;
}
.interaction-report-pill--muted {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.22);
    color: var(--muted-2);
}
.interaction-report-range {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}
.interaction-report-range__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: .55rem .95rem;
    border-radius: .85rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.52);
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.interaction-report-range__link:hover,
.interaction-report-range__link:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(0, 53, 128, 0.28);
    box-shadow: 0 14px 30px rgba(0, 53, 128, 0.10);
}
.interaction-report-range__link.is-active {
    background: rgba(0, 53, 128, 0.12);
    border-color: rgba(0, 53, 128, 0.22);
    color: var(--finland-blue);
}
.interaction-summary-card__meta {
    margin-top: .4rem;
    color: var(--muted-2);
    font-size: .8rem;
    font-weight: 600;
}
.interaction-report-note,
.interaction-report-empty,
.interaction-chart-empty {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.58);
    color: var(--ink);
}
.interaction-report-note {
    font-weight: 600;
}
.interaction-report-note--muted {
    color: var(--muted-2);
}
.interaction-report-empty,
.interaction-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 11rem;
    padding: 1rem 1.25rem;
    text-align: center;
    color: var(--muted-2);
    font-weight: 600;
}
.interaction-heatmap-legend {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: var(--muted-2);
    font-size: .82rem;
    font-weight: 700;
}
.interaction-heatmap-legend__scale {
    width: 7.5rem;
    height: .65rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 53, 128, 0.08), rgba(0, 53, 128, 0.88));
}
.interaction-heatmap-shell {
    overflow-x: auto;
    padding-bottom: .25rem;
}
.interaction-heatmap {
    display: grid;
    grid-template-columns: minmax(3rem, auto) repeat(24, minmax(1.35rem, 1fr)) minmax(3rem, auto);
    gap: .35rem;
    min-width: 880px;
    align-items: center;
}
.interaction-heatmap__corner,
.interaction-heatmap__hour,
.interaction-heatmap__day,
.interaction-heatmap__total-label,
.interaction-heatmap__row-total {
    font-size: .75rem;
    font-weight: 700;
    color: var(--muted-2);
}
.interaction-heatmap__hour,
.interaction-heatmap__total-label {
    text-align: center;
}
.interaction-heatmap__day {
    padding-right: .35rem;
}
.interaction-heatmap__row-total {
    text-align: center;
    color: var(--ink);
}
.interaction-heatmap__cell {
    height: 1.6rem;
    border-radius: .45rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(0, 53, 128, calc(0.04 + (var(--heat, 0) * 0.84)));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, calc(0.18 + (var(--heat, 0) * 0.10)));
}

/* ══════════════════════════════════════════
   CAMPAIGNS VIEW — redesign styles
══════════════════════════════════════════ */

/* Stat cards */
.camp-stat-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-top: 2px solid var(--accent, #3b82f6);
  border-radius: 1px;
  padding: .75rem .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.camp-stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.camp-stat-icon { font-size: 1.2rem; line-height: 1; }
.camp-stat-val  { font-size: 1.5rem; font-weight: 800; color: var(--accent, #e2e8f0); line-height: 1.1; }
.camp-stat-label { font-size: .6rem; text-transform: uppercase; letter-spacing: .07em; color: #94a3b8; line-height: 1.3; }

/* Status filter tabs */
.camp-tab {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .8rem;
  border-radius: .6rem;
  font-size: .75rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s;
  background: transparent;
}
.camp-tab:hover { background: rgba(0,53,128,.07); color: var(--ink, #111); }
.camp-tab.is-active { background: rgba(0,53,128,.12); color: var(--finland-blue, #003580); border-color: rgba(0,53,128,.22); }
.camp-tab-count { font-size: .65rem; padding: .1rem .4rem; border-radius: 99px; background: rgba(0,53,128,.1); font-weight: 700; min-width: 1.4em; text-align: center; }
.camp-tab.is-active .camp-tab-count { background: rgba(0,53,128,.2); }
.camp-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; flex-shrink: 0; }
.camp-dot.anim-pulse { animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }

/* Campaign cards */
.camp-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 1px;
  padding: .9rem 1rem;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  position: relative;
}
.camp-card:hover { background: rgba(255,255,255,.09); box-shadow: 0 2px 12px rgba(0,0,0,.2); }
.camp-card-subject { font-weight: 700; font-size: .92rem; line-height: 1.3; }
.camp-card-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; }
.camp-card-meta-item { font-size: .7rem; color: #94a3b8; display: flex; align-items: center; gap: .25rem; }
.camp-card-prog { margin-top: .5rem; }
.camp-card-prog-bar { height: 3px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.camp-card-prog-fill { height: 100%; border-radius: 99px; background: #10b981; transition: width .5s ease; }

/* Status badges */
.camp-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .15rem .6rem;
  border-radius: 99px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.camp-badge-draft     { background: rgba(107,114,128,.2); color: #9ca3af; }
.camp-badge-queued    { background: rgba(245,158,11,.2);  color: #fcd34d; }
.camp-badge-sending   { background: rgba(96,165,250,.2);  color: #93c5fd; }
.camp-badge-sent      { background: rgba(16,185,129,.2);  color: #6ee7b7; }
.camp-badge-failed    { background: rgba(248,113,113,.2); color: #fca5a5; }
.camp-badge-paused    { background: rgba(252,211,77,.2);  color: #fde68a; }
.camp-badge-cancelled { background: rgba(75,85,99,.25);   color: #9ca3af; }

/* KPI cards inside detail modal */
.camp-kpi-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: .75rem; padding: .75rem; text-align: center; }

/* Account logout / exit button — light reddish-pink, distinct from btn-danger */
#account-logout-btn {
    background: rgba(220, 38, 38, 0.32);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.55);
}
#account-logout-btn:hover {
    background: rgba(220, 38, 38, 0.50);
    color: #fff;
    border-color: rgba(220, 38, 38, 0.75);
}

/* Extra left + bottom padding for campaign modals that use plain modal-panel layout */
#campaign-recipients-modal .modal-panel > *:not(.modal-close),
#cron-help-modal .modal-panel > *:not(.modal-close),
#campaign-logs-modal .modal-panel > *:not(.modal-close) {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
#campaign-recipients-modal .modal-panel,
#cron-help-modal .modal-panel,
#campaign-logs-modal .modal-panel {
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 2rem;
}
.camp-kpi-val  { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.camp-kpi-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .07em; color: #94a3b8; margin-top: .25rem; }

/* ⋯ action dropdown menu */
.camp-action-btn {
  width: 2rem; height: 2rem;
  border-radius: .5rem;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #94a3b8;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.camp-action-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.camp-action-menu {
  position: fixed;
  z-index: 9999;
  min-width: 180px;
  background: rgba(15,20,40,.97);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: .75rem;
  padding: .35rem 0;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  list-style: none;
  margin: 0;
}
.camp-menu-item {
  padding: .5rem 1rem;
  font-size: .8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #e2e8f0;
  transition: background .1s;
}
.camp-menu-item:hover { background: rgba(255,255,255,.1); }
.camp-menu-sep { height: 1px; background: rgba(255,255,255,.1); margin: .3rem 0; }

/* Compose editor tabs */
.camp-editor-tab { color: #94a3b8; cursor: pointer; transition: background .15s, color .15s; }
.camp-editor-tab:hover { color: #e2e8f0; }
.camp-editor-tab.is-active { background: rgba(255,255,255,.12); color: #fff; }

/* Template var chips */
.camp-var-chip {
  padding: .15rem .55rem;
  border-radius: .4rem;
  border: 1px solid rgba(96,165,250,.4);
  background: rgba(96,165,250,.1);
  color: #93c5fd;
  font-size: .72rem;
  font-family: monospace;
  cursor: pointer;
  transition: background .15s;
}
.camp-var-chip:hover { background: rgba(96,165,250,.25); }

/* Preview size toggle */
.camp-preview-size { color: #94a3b8; cursor: pointer; transition: background .15s; }
.camp-preview-size.is-active { background: rgba(255,255,255,.12); color: #fff; }

/* Recipients modal add tabs */
.crm-add-tab { color: #94a3b8; cursor: pointer; transition: background .15s, color .15s; padding: .5rem 1rem; }
.crm-add-tab:hover { color: #e2e8f0; }
.crm-add-tab.is-active { background: rgba(255,255,255,.12); color: #fff; }

/* ══════════════════════════════════════════════════════════════════════════
   § 55 ADMIN LIVE MONITOR  — dark game-like skin, Sea-of-Products energy
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Page root ─────────────────────────────────────────────────────────── */
#monitor-root {
    --mon-bg:          #070d1a;
    --mon-surface:     rgba(10, 20, 42, 0.88);
    --mon-border:      rgba(99, 144, 226, 0.22);
    --mon-border-glow: rgba(99, 144, 226, 0.55);
    --mon-ink:         #e2e8f0;
    --mon-muted:       rgba(148, 163, 184, 0.65);
    --mon-green:       #22d36b;
    --mon-yellow:      #facc15;
    --mon-red:         #f87171;
    --mon-blue:        #60a5fa;
    --mon-purple:      #a78bfa;
    --mon-cyan:        #22d3ee;
    background: var(--mon-bg);
    color: var(--mon-ink);
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1.1rem 1.25rem 2rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    position: relative;
    overflow-x: hidden;
}

/* ── Scanline overlay ──────────────────────────────────────────────────── */
#monitor-root::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.045) 2px,
        rgba(0, 0, 0, 0.045) 4px
    );
    pointer-events: none;
    z-index: 0;
}

/* ── Animated background nebula ────────────────────────────────────────── */
#mon-nebula {
    position: fixed;
    inset: -20%;
    background:
        radial-gradient(ellipse 60% 40% at 20% 30%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 80% 70%, rgba(124, 58, 237, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 50% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: mon-nebula-drift 30s ease-in-out infinite alternate;
}
@keyframes mon-nebula-drift {
    from { transform: scale(1) rotate(0deg); }
    to   { transform: scale(1.08) rotate(2deg); }
}

/* ── Particle canvas ───────────────────────────────────────────────────── */
#mon-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* ── Content layers above background ───────────────────────────────────── */
/* Raise all direct children above the fixed canvas/nebula background. */
#monitor-root > * { position: relative; z-index: 1; }
/* These four elements are position:fixed overlays — !important beats the rule above. */
#mon-nebula    { position: fixed !important; z-index: 0     !important; }
#mon-particles { position: fixed !important; z-index: 0     !important; }
#mon-tooltip   { position: fixed !important; z-index: 9999  !important; }
#mon-stat-modal{ position: fixed !important; z-index: 9999  !important; }

/* Override base.css  h1-h6 { color: var(--finland-blue) !important }
   All headings inside the monitor should inherit from their parent element. */
#monitor-root h1,
#monitor-root h2,
#monitor-root h3,
#monitor-root h4 {
    color: inherit !important;
}

/* ── Header row ─────────────────────────────────────────────────────────── */
#mon-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--mon-border);
}
#mon-title {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mon-cyan) !important;
    text-shadow: 0 0 18px rgba(34, 211, 238, 0.6);
}
#mon-title svg { color: var(--mon-cyan); filter: drop-shadow(0 0 6px rgba(34,211,238,.7)); }
.mon-live-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.55);
    border-radius: 4px;
    color: #fca5a5;
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .1em;
    padding: .15rem .5rem;
    text-transform: uppercase;
}
.mon-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: mon-live-pulse 1.2s ease-in-out infinite;
}
@keyframes mon-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ── Refresh ring ───────────────────────────────────────────────────────── */
#mon-refresh-ring {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    cursor: pointer;
}
#mon-refresh-ring svg {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
}
#mon-refresh-arc {
    stroke-dasharray: 100 100;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset .2s linear;
    stroke: var(--mon-cyan);
    stroke-linecap: round;
}
#mon-refresh-ring:hover #mon-refresh-arc { stroke: #fff; }
.mon-refresh-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mon-muted);
    font-size: .95rem;
}
#mon-refresh-ring:hover .mon-refresh-icon { color: #fff; }

/* ── Top KPI bar ─────────────────────────────────────────────────────────── */
#mon-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: .6rem;
    margin-bottom: 1.1rem;
}
.mon-kpi {
    background: var(--mon-surface);
    border: 1px solid var(--mon-border);
    border-radius: 6px;
    padding: .65rem .8rem .55rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.mon-kpi:hover {
    border-color: var(--mon-border-glow);
    box-shadow: 0 0 14px rgba(99, 144, 226, 0.18);
}
.mon-kpi::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--kpi-accent, var(--mon-blue));
    opacity: 0.5;
}
.mon-kpi--green  { --kpi-accent: var(--mon-green);  }
.mon-kpi--yellow { --kpi-accent: var(--mon-yellow); }
.mon-kpi--red    { --kpi-accent: var(--mon-red);    }
.mon-kpi--cyan   { --kpi-accent: var(--mon-cyan);   }
.mon-kpi--purple { --kpi-accent: var(--mon-purple); }
.mon-kpi__num {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -.02em;
    transition: color .3s;
}
.mon-kpi__lbl {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--mon-muted);
}
.mon-kpi__icon {
    position: absolute;
    top: .5rem;
    right: .6rem;
    font-size: 1.4rem;
    opacity: 0.15;
    user-select: none;
}
.mon-kpi__num.is-changed {
    animation: mon-num-pop .4s cubic-bezier(.36,1.56,.64,1);
}
@keyframes mon-num-pop {
    0%  { transform: scale(1); }
    40% { transform: scale(1.18); color: #fff; }
    100%{ transform: scale(1); }
}

/* ── Main layout: zones grid + feed sidebar ─────────────────────────────── */
#mon-body {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: .9rem;
    flex: 1 1 auto;
    align-items: start;
}
@media (max-width: 1100px) {
    #mon-body { grid-template-columns: 1fr; }
    #mon-feed-col { display: none; }
}

/* ── Zone grid ───────────────────────────────────────────────────────────── */
#mon-zones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .75rem;
}

/* ── Zone card ───────────────────────────────────────────────────────────── */
.mon-zone {
    background: var(--mon-surface);
    border: 1px solid var(--mon-border);
    border-radius: 8px;
    padding: .75rem .9rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    position: relative;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    min-height: 110px;
}
.mon-zone:hover {
    transform: translateY(-2px);
    border-color: var(--mon-border-glow);
    box-shadow: 0 0 20px rgba(99, 144, 226, 0.15);
}
.mon-zone.is-hot {
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.12), inset 0 0 24px rgba(34, 211, 238, 0.04);
}
.mon-zone__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
}
.mon-zone__title {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(203, 213, 225, 0.85);
}
.mon-zone__icon { font-size: 1rem; }
.mon-zone__total {
    font-size: 1.45rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    transition: color .25s;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.5);
}
.mon-zone__total.is-zero { color: var(--mon-muted); text-shadow: none; }

/* ── Dot swarm ───────────────────────────────────────────────────────────── */
.mon-zone__dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 18px;
    align-content: flex-start;
}
.mon-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    cursor: default;
    transition: transform .15s;
}
.mon-dot:hover { transform: scale(1.5); z-index: 10; }
.mon-dot--active {
    background: var(--mon-green);
    box-shadow: 0 0 6px var(--mon-green);
    animation: mon-dot-active 2s ease-in-out infinite;
}
@keyframes mon-dot-active {
    0%, 100% { box-shadow: 0 0 4px var(--mon-green); }
    50%       { box-shadow: 0 0 10px var(--mon-green), 0 0 18px rgba(34, 211, 107, 0.4); }
}
.mon-dot--idle {
    background: var(--mon-yellow);
    box-shadow: 0 0 4px rgba(250, 204, 21, 0.6);
    animation: mon-dot-idle 3.5s ease-in-out infinite;
}
@keyframes mon-dot-idle {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}
.mon-dot--cold {
    background: var(--mon-red);
    box-shadow: 0 0 3px rgba(248, 113, 113, 0.5);
    opacity: 0.6;
}
.mon-dot--device-mobile::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 1.5px solid rgba(255,255,255,0.45);
    border-radius: 50%;
}
.mon-dot--customer::before {
    content: '★';
    position: absolute;
    top: -1px;
    left: -1px;
    font-size: 7px;
    color: #fef08a;
    line-height: 1;
}

/* ── Zone bar: counts row ─────────────────────────────────────────────────── */
.mon-zone__counts {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .04em;
}
.mon-count--active { color: var(--mon-green); }
.mon-count--idle   { color: var(--mon-yellow); }
.mon-count--cold   { color: var(--mon-red); opacity: .75; }
.mon-count-lbl     { color: var(--mon-muted); font-weight: 500; }

/* ── Zone heat-bar (visual progress bar) ─────────────────────────────────── */
.mon-zone__heat {
    height: 3px;
    border-radius: 2px;
    background: rgba(99, 144, 226, 0.15);
    overflow: hidden;
    margin-top: auto;
}
.mon-zone__heat-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--mon-cyan) 0%, var(--mon-purple) 100%);
    transition: width .6s ease;
    width: 0%;
}

/* ── Empty zone dim ──────────────────────────────────────────────────────── */
.mon-zone.is-empty {
    opacity: .72;
}

/* ── Feed sidebar ────────────────────────────────────────────────────────── */
#mon-feed-col {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
#mon-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mon-muted);
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--mon-border);
}
#mon-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: calc(100vh - 18rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(99,144,226,.3) transparent;
}
#mon-feed-list::-webkit-scrollbar { width: 4px; }
#mon-feed-list::-webkit-scrollbar-thumb {
    background: rgba(99,144,226,.3);
    border-radius: 999px;
}

.mon-feed-item {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    padding: .4rem .35rem;
    border-bottom: 1px solid rgba(99,144,226,.08);
    font-size: .68rem;
    transition: background .15s;
    animation: mon-feed-appear .3s ease;
}
.mon-feed-item:hover { background: rgba(99,144,226,.07); }
@keyframes mon-feed-appear {
    from { opacity: 0; transform: translateX(8px); }
    to   { opacity: 1; transform: translateX(0); }
}
.mon-feed-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: .2rem;
}
.mon-feed-dot--active { background: var(--mon-green); box-shadow: 0 0 4px var(--mon-green); }
.mon-feed-dot--idle   { background: var(--mon-yellow); }
.mon-feed-dot--cold   { background: var(--mon-red); opacity: .7; }
.mon-feed-item__body  { flex: 1; min-width: 0; }
.mon-feed-item__evt   { color: #e2e8f0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-feed-item__meta  { color: var(--mon-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-feed-item__time  { color: var(--mon-muted); font-size: .58rem; flex-shrink: 0; white-space: nowrap; }
.mon-feed-item__customer { color: var(--mon-yellow); font-size: .6rem; }
.mon-feed-device-icon { font-size: .72rem; opacity: .55; flex-shrink: 0; }

/* ── Session tooltip ─────────────────────────────────────────────────────── */
#mon-tooltip {
    position: fixed;
    z-index: 9999;
    background: rgba(7, 13, 26, 0.96);
    border: 1px solid var(--mon-border-glow);
    border-radius: 6px;
    padding: .55rem .75rem;
    font-size: .7rem;
    color: var(--mon-ink);
    pointer-events: none;
    max-width: 220px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    opacity: 0;
    transition: opacity .15s;
    line-height: 1.5;
}
#mon-tooltip.is-visible { opacity: 1; }
#mon-tooltip strong { color: var(--mon-cyan); }

/* ── Disabled overlay ────────────────────────────────────────────────────── */
#mon-disabled {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 22rem;
    text-align: center;
    color: var(--mon-muted);
}
#mon-disabled svg { opacity: .35; }
#mon-disabled h3 { font-size: 1rem; font-weight: 800; color: rgba(148,163,184,.7); }
#mon-disabled p  { font-size: .8rem; max-width: 28rem; }

/* ── Ticker: last-updated ────────────────────────────────────────────────── */
#mon-last-updated {
    font-size: .62rem;
    color: var(--mon-muted);
    letter-spacing: .04em;
}

/* ── "No sessions" empty state ───────────────────────────────────────────── */
#mon-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    min-height: 18rem;
    text-align: center;
    color: var(--mon-muted);
    font-size: .82rem;
}

/* ── Footer status bar ────────────────────────────────────────────────────── */
#mon-statusbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: .65rem;
    border-top: 1px solid var(--mon-border);
    font-size: .62rem;
    letter-spacing: .04em;
    color: var(--mon-muted);
}
.mon-sb-item { display: flex; align-items: center; gap: .3rem; }
.mon-sb-val  { color: rgba(203,213,225,.8); font-weight: 700; }
.mon-sb-sep  { opacity: .3; }

/* ── Stat detail modal ─────────────────────────────────────────────────── */
#mon-stat-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(7, 13, 26, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s;
}
#mon-stat-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
#mon-stat-modal-panel {
    background: rgba(9, 17, 36, 0.97);
    border: 1px solid rgba(34,211,238,.25);
    border-radius: 10px;
    width: min(740px, 96vw);
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 28px 72px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05);
    animation: mon-modal-pop .2s cubic-bezier(.36,1.2,.64,1);
}
@keyframes mon-modal-pop {
    from { transform: scale(.94) translateY(10px); opacity: 0; }
    to   { transform: scale(1)   translateY(0);    opacity: 1; }
}
#mon-stat-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.3rem .75rem;
    border-bottom: 1px solid var(--mon-border);
    flex-shrink: 0;
    background: rgba(7,13,26,.65);
}
#mon-stat-modal-title {
    font-size: .88rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--mon-cyan) !important;
    text-shadow: 0 0 12px rgba(34,211,238,.4);
    margin: 0;
}
#mon-stat-modal-close {
    background: none;
    border: none;
    color: var(--mon-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: .2rem .5rem;
    border-radius: 4px;
    line-height: 1;
    transition: color .15s, background .15s;
    font-family: inherit;
}
#mon-stat-modal-close:hover { color: #fff; background: rgba(255,255,255,.1); }
#mon-stat-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.3rem 1.4rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(34,211,238,.2) transparent;
}
/* Session list */
.mon-modal-empty {
    color: var(--mon-muted);
    font-size: .78rem;
    text-align: center;
    padding: 2.5rem 0;
}
.mon-modal-sessions { display: flex; flex-direction: column; gap: .3rem; }
.mon-modal-session-row {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .38rem .55rem;
    background: rgba(99,144,226,.06);
    border: 1px solid rgba(99,144,226,.12);
    border-radius: 5px;
    font-size: .68rem;
    flex-wrap: wrap;
}
.mon-modal-dev { flex-shrink: 0; line-height: 1; }
.mon-modal-page-badge {
    background: rgba(34,211,238,.1);
    border: 1px solid rgba(34,211,238,.22);
    border-radius: 3px;
    padding: .08rem .38rem;
    font-size: .62rem;
    font-weight: 700;
    color: var(--mon-cyan);
    white-space: nowrap;
    flex-shrink: 0;
}
.mon-modal-action {
    color: rgba(203,213,225,.75);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mon-modal-idle-badge {
    font-size: .6rem;
    font-weight: 800;
    padding: .1rem .35rem;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.mon-modal-idle-badge--active { background: rgba(34,211,107,.14); color: var(--mon-green); }
.mon-modal-idle-badge--idle   { background: rgba(250,204,21,.12);  color: var(--mon-yellow); }
.mon-modal-idle-badge--cold   { background: rgba(248,113,113,.12); color: var(--mon-red); }
.mon-modal-ev-count { color: var(--mon-muted); font-size: .6rem; white-space: nowrap; flex-shrink: 0; }
.mon-modal-customer { color: var(--mon-yellow); font-weight: 700; font-size: .65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 10rem; }
.mon-modal-guest    { color: var(--mon-muted); font-size: .62rem; font-family: ui-monospace, monospace; white-space: nowrap; }
/* Bar chart */
.mon-modal-bars { display: flex; flex-direction: column; gap: .42rem; }
.mon-modal-bar-row {
    display: grid;
    grid-template-columns: 11rem 1fr 3rem;
    align-items: center;
    gap: .55rem;
    font-size: .68rem;
}
.mon-modal-bar-label { color: rgba(203,213,225,.8); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-modal-bar-wrap  { background: rgba(99,144,226,.1); border-radius: 2px; height: 7px; overflow: hidden; }
.mon-modal-bar-fill  {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--mon-cyan) 0%, var(--mon-purple) 100%);
    transition: width .35s ease;
}
.mon-modal-bar-fill--blue   { background: var(--mon-blue); }
.mon-modal-bar-fill--purple { background: var(--mon-purple); }
.mon-modal-bar-count { color: var(--mon-cyan); font-weight: 800; text-align: right; }
/* Hourly bar chart */
.mon-modal-hchart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 96px;
    margin-bottom: 1.8rem;
    position: relative;
}
.mon-modal-hbar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    height: 100%;
    position: relative;
    min-width: 0;
}
.mon-modal-hbar-val  { font-size: .5rem; color: var(--mon-muted); line-height: 1; min-height: .65rem; }
.mon-modal-hbar {
    width: 100%;
    min-height: 3px;
    background: var(--mon-cyan);
    border-radius: 2px 2px 0 0;
    opacity: .75;
    transition: height .35s ease;
}
.mon-modal-hbar-lbl {
    font-size: .48rem;
    color: var(--mon-muted);
    position: absolute;
    bottom: -1.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.mon-modal-chart-note {
    font-size: .68rem;
    color: var(--mon-muted);
    margin-bottom: .75rem;
}
.mon-modal-chart-note strong { color: var(--mon-cyan); }
/* Event / cart list */
.mon-modal-evlist { display: flex; flex-direction: column; gap: .28rem; }
.mon-modal-evrow {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .55rem;
    background: rgba(99,144,226,.06);
    border: 1px solid rgba(99,144,226,.1);
    border-radius: 4px;
    font-size: .68rem;
}
.mon-modal-evrow__time { color: var(--mon-muted); font-size: .6rem; white-space: nowrap; flex-shrink: 0; }
.mon-modal-evrow__label { font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.mon-modal-evrow__meta { color: rgba(203,213,225,.6); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-modal-evrow__cust { color: var(--mon-yellow); font-size: .62rem; white-space: nowrap; }
