/* --- Common UI Components --- */

.btn-primary-gradient {
    background: linear-gradient(90deg, var(--accent-blue) 0%, #0e6fa3 40%, var(--primary-blue) 100%);
    background-size: 200% auto;
    background-position: left center;
    border: none;
    color: var(--white);
    font-weight: 400;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    transition: background-position 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Shine sweep pseudo-element */
.btn-primary-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.28) 50%,
            transparent 100%);
    transform: skewX(-15deg);
    transition: left 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}

.btn-primary-gradient:hover {
    background-position: right center;
    color: var(--white) !important;
    box-shadow: var(--shadow-btn-primary-hover);
}

.btn-primary-gradient:hover::before {
    left: 125%;
}

.btn-primary-gradient:active {
    color: var(--white) !important;
    transform: translateY(-1px) scale(1.005);
    box-shadow: var(--shadow-btn-primary-active);
}

.btn-sm {
    padding: 0.6rem 1rem !important;
    font-size: 0.875rem;
    border-radius: var(--radius-sm) !important;
    max-height: 40px;
}

.form-control,
.form-select,
.btn-dropdown-custom {
    height: 40px;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--input-border-color) !important;
    font-size: var(--font-size-sm);
    color: var(--text-dark);
    background-color: var(--white);
    transition: var(--transition);
}

textarea.form-control {
    height: auto;
}

.form-control:focus,
.form-select:focus,
.btn-dropdown-custom:focus,
.btn-dropdown-custom:hover,
.show>.btn-dropdown-custom {
    box-shadow: 0 0 0 3px var(--focus-ring);
    border-color: var(--accent-blue) !important;
    outline: none;
    background-color: var(--white);
}

.form-control::placeholder {
    color: var(--text-placeholder);
}

label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: var(--font-size-base);
}

/* Stats Cards */
.stat-card {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-card.peach {
    background-color: var(--card-peach);
}

.stat-card.blue {
    background-color: var(--card-blue);
}

.stat-card.pink {
    background-color: var(--card-pink);
}

.stat-card.cyan {
    background-color: var(--card-cyan);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-heading);
}

.stat-label {
    color: var(--text-heading);
    font-weight: 500;
    margin-top: auto;
}

.stat-icon-wrapper {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background-color: var(--white);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper .svg-icon {
    width: 22px;
    height: 22px;
    color: #333;
}

/* Chart Section */
.chart-container {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    margin-bottom: 0;
    border: 1px solid var(--border-color);
}

.chart-header {
    margin-bottom: 0.5rem;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.chart-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    margin-bottom: 0;
}

/* --- Locations Page --- */
.table-title-header {
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.table-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.table-actions-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex: 1;
}

.search-wrapper {
    position: relative;
    min-width: 200px;
}

.search-wrapper .svg-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 18px;
    height: 18px;
    opacity: 1;
}

.search-input {
    padding-left: 40px !important;
}

/* Custom Select - Premium Look */
.custom-select-wrapper {
    position: relative;
    min-width: 140px;
}

.form-select.custom-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
    padding-right: 2.25rem;
    cursor: pointer;
}

/* Table Design */
.table-container {
    background: var(--white);
    margin-top: 0;
}

/* DataTables Scroll Fixes */
.dataTables_scrollBody {
    border-bottom: none !important;
}

.dataTables_scrollHead {
    border-bottom: 1px solid var(--border-color-alpha) !important;
}

table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

table.dataTable thead th {
    background-color: var(--white) !important;
    font-weight: 500;
    padding-right: 0.75rem !important;
}

.dataTables_wrapper .dataTables_scroll {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: none;
}

.custom-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.custom-table thead th {
    background-color: var(--white);
    border-top: none;
    border-bottom: 1px solid var(--border-color-alpha);
    color: var(--text-dark);
    font-weight: 500;
    font-size: var(--font-size-sm);
    text-transform: capitalize;
    padding: 0.65rem 0.75rem;
    white-space: nowrap;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 10;
}

.custom-table thead th:first-child {
    padding-left: 0;
}

.custom-table tbody td {
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
    color: #1A202C;
    font-weight: 400;
    font-size: var(--font-size-base);
    border-bottom: 1px solid var(--border-color-alpha);
}

.custom-table tbody td:first-child {
    padding-left: 0;
}

.location-name {
    font-weight: 500;
    display: block;
    margin-bottom: 0;
    color: var(--text-heading);
    font-size: var(--font-size-base);
}

.location-address {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 400;
}

/* Status Badges */
.badge-status {
    padding: 4px 14px;
    border-radius: var(--radius-badge);
    font-size: 0.7rem;
    color: var(--text-dark);
}

.badge-active {
    background-color: var(--badge-success-bg);
}

.badge-inactive {
    background-color: var(--badge-danger-bg);
}

/* Transaction Status Badges */
.badge-success {
    background-color: var(--badge-success-bg);
    color: var(--text-dark);
}

.badge-pending {
    background-color: var(--badge-pending-bg);
    color: var(--text-dark);
}

.badge-failed {
    background-color: var(--badge-danger-bg);
    color: var(--text-dark);
}

/* Transaction Type Badges */
.badge-type {
    padding: 4px 14px;
    border-radius: var(--radius-badge);
    font-size: 0.7rem;
    display: inline-block;
}

.badge-load {
    background-color: var(--badge-load-bg);
}

.badge-redeem {
    background-color: var(--badge-redeem-bg);
}

/* Avatar Stack */
.avatar-stack {
    display: flex;
    align-items: center;
}

.avatar-item {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.70rem;
    font-weight: 400;
    color: var(--white);
    margin-left: -6px;
}

.avatar-item:first-child {
    margin-left: 0;
}

/* Specific Avatar Colors from image */
.av-rr-blue {
    background-color: #4c8bf5;
}

.av-mm-dark {
    background-color: #3e3e3e;
}

.av-cd-purple {
    background-color: #9b51e0;
}

.av-vr-indigo {
    background-color: #6d6d6d;
}

.av-rr-peach {
    background-color: #e9a28b;
}

.av-more {
    background-color: var(--bg-subtle);
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Action Button */
.btn-action-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.btn-action-circle:hover {
    background-color: var(--accent-blue);
}

.btn-action-circle svg {
    width: 16px;
    height: 16px;
    fill: var(--white);
}

/* Table Action Dropdown */
.action-dropdown .dropdown-toggle::after {
    display: none;
}

.action-menu {
    border: none;
    box-shadow: var(--shadow-popup);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0;
    min-width: 120px;
    margin-top: 5px !important;
}

.action-menu .dropdown-item {
    padding: 0.6rem 1.25rem;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.action-menu li:not(:last-child) {
    border-bottom: 1px solid var(--border-color-alpha-xs);
}

.action-menu .dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--accent-blue);
}

.action-menu .dropdown-item.text-danger:hover {
    background-color: var(--bg-danger-light);
    color: var(--color-danger) !important;
}


/* Sorting Icons */
.sort-icon-wrap {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    opacity: 1;
}

.sort-icon-wrap svg {
    width: 14px;
    height: 14px;
    fill: var(--primary-blue);
    transition: transform 0.2s ease, fill 0.2s ease;
}

/* Color and Flip on Sort */
th.sorting_asc .sort-icon-wrap svg,
th.sorting_desc .sort-icon-wrap svg {
    fill: var(--primary-blue);
    opacity: 1;
}

th.sorting_desc .sort-icon-wrap svg {
    transform: scaleY(-1);
}

th.sorting:hover .sort-icon-wrap svg {
    fill: var(--primary-blue);
}

/* Hide DataTables default icons */
table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:before,
table.dataTable thead th.sorting_desc:after {
    display: none !important;
}

/* Empty State UI */
.empty-state-wrapper {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--white);
}

.empty-state-icon {
    background: var(--bg-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--text-placeholder);
}

.empty-state-icon svg {
    width: 84px;
    height: 84px;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    max-width: 300px;
    margin: 0 auto;
}

/* --- Offcanvas / Drawer Styles --- */
.custom-offcanvas {
    width: 450px !important;
    box-shadow: var(--shadow-offcanvas);
}

.offcanvas-header {
    padding: 1.5rem 2rem 1rem;
}

.offcanvas-title {
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 1.20rem;
}

.offcanvas-body {
    padding: 1rem 2rem;
}

.drawer-form .form-label {
    color: var(--text-secondary) !important;
    font-size: var(--font-size-base);
    font-weight: 400;
    margin-bottom: 0.35rem;
}

.btn-dropdown-custom {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
    padding-right: 2.25rem !important;
}

.custom-dropdown-wrapper.show .btn-dropdown-custom {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 15-6-6-6 6'/%3E%3C/svg%3E");
}

.custom-dropdown-wrapper .dropdown-menu {
    border: 1px solid var(--border-color-alpha);
    box-shadow: var(--shadow-dropdown);
    padding: 0.5rem 0;
    border-radius: var(--radius-lg);
    margin-top: 0 !important;
    border-top: none;
}

.custom-dropdown-wrapper .dropdown-item {
    padding: 0.7rem 1.25rem;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.custom-dropdown-wrapper .dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--accent-blue);
    padding-left: 1.5rem;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--accent-blue);
    color: var(--white);
}

.dropdown-selected-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-form textarea.form-control {
    height: auto;
}

.drawer-form .form-control::placeholder {
    color: #A0AEC0;
}

/* Status Toggle Customization */
.status-toggle-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.status-label.active {
    font-weight: 500;
}

.custom-switch-toggle .form-check-input {
    width: 42px;
    height: 22px;
    cursor: pointer;
    background-color: var(--border-color);
    border-color: transparent;
    transition: var(--transition);
}

.custom-switch-toggle .form-check-input:checked {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.custom-switch-toggle .form-check-input:focus {
    box-shadow: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='white'/%3E%3C/svg%3E");
}

/* Footer Buttons */
.btn-outline-custom {
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    font-weight: 500;
    border-radius: var(--radius-md);
    height: 45px;
    transition: var(--transition);
    padding: 0.65rem 1.5rem;
}

.btn-outline-custom:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-btn-outline-hover);
}

.btn-primary-solid {
    border: 1px solid var(--primary-blue);
    background-color: var(--primary-blue);
    color: var(--white);
    font-weight: 500;
    border-radius: var(--radius-md);
    height: 45px;
    transition: var(--transition);
    padding: 0.65rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary-solid:hover {
    opacity: 0.95;
    box-shadow: var(--shadow-btn-outline-hover);
    border: 1px solid var(--primary-blue);
    background-color: var(--primary-blue);
    color: var(--white);
}

/* Shine sweep pseudo-element */
.btn-primary-solid::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.28) 50%,
            transparent 100%);
    transform: skewX(-15deg);
    transition: left 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}

.btn-primary-solid:hover::before {
    left: 125%;
}

/* Permissions table checkboxes */
.custom-table .form-check-input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color-alpha-md);
    background-color: var(--white);
    transition: var(--transition);
    accent-color: var(--primary-blue);
}

.custom-table .form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.custom-table .form-check-input:focus {
    box-shadow: 0 0 0 3px var(--border-color-alpha-focus);
}

.custom-table .form-check-input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

/* Denomination checkbox group — same checkbox style as .custom-table */
.denom-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4px;
}

.denom-check-group .form-check {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0;
}

.denom-check-group .form-check-input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color-alpha-md);
    background-color: var(--white);
    transition: var(--transition);
    accent-color: var(--primary-blue);
    margin: 0;
    flex-shrink: 0;
}

.denom-check-group .form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.denom-check-group .form-check-input:focus {
    box-shadow: 0 0 0 3px var(--border-color-alpha-focus);
    outline: none;
}

.denom-check-group .form-check-label {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    margin: 0;
}

/* Permissions page platform tabs (Admin / Kiosk) */
.nav-pills .btn-outline-custom.active,
.nav-pills .btn-outline-custom[aria-selected="true"] {
    background: linear-gradient(90deg, var(--accent-blue) 0%, var(--primary-blue) 100%);
    border-color: transparent;
    color: var(--white);
}

.nav-pills .btn-outline-custom.active:hover,
.nav-pills .btn-outline-custom[aria-selected="true"]:hover {
    opacity: 0.9;
    color: var(--white);
}

.offcanvas-footer .btn-primary-gradient {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Custom Toast Styles --- */
.custom-toast {
    background-color: var(--white) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-popup) !important;
    overflow: hidden;
    min-width: 320px;
}

.toast-icon-wrap {
    width: 38px;
    height: 38px;
    background-color: #D1FAE5;
    color: #065f46;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.custom-toast h6 {
    font-size: 0.95rem;
    color: var(--primary-blue);
}

.custom-toast p {
    font-size: var(--font-size-xs);
    line-height: 1.4;
}

.btn-close:focus {
    box-shadow: none;
}

.action-dropdown {
    position: static;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
}

.app-footer img {
    max-width: 90px;
}

.permission-tabs {
    gap: 8px;
}

/* Connectivity Column */
.connectivity-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.signal-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.signal-icon.online path {
    fill: var(--color-success);
}

.signal-icon.offline path {
    fill: var(--color-danger);
}

.connectivity-label {
    font-size: 10px;
    color: var(--color-neutral);
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.connectivity-label.online {
    color: var(--color-success);
}

.connectivity-label.offline {
    color: var(--color-danger);
}

/* Cash Level Column */
.cash-level-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 70px;
    max-width: 150px;
}

.cash-level-info {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.cash-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    min-width: 38px;
}

.cash-amount {
    font-size: 11px;
    color: var(--color-neutral);
    white-space: nowrap;
}

.cash-progress-track {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.cash-progress-fill {
    height: 100%;
    border-radius: var(--radius-lg);
    transition: width 0.4s ease;
}

.cash-progress-fill.level-low {
    background: var(--color-success);
}

/* green  ≤ 30% */
.cash-progress-fill.level-mid {
    background: var(--color-warning);
}

/* yellow 31-60% */
.cash-progress-fill.level-high {
    background: var(--color-danger);
}

.bsk-alert {
    transition: all ease-in 0.2s;
    padding: 0.8rem 1rem;
}

.js-kiosk-config-field-edit .form-control,
.js-kiosk-config-field-edit .form-select {
    min-width: 100px;
}

/* ── Config Section Headers ── */
.config-section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color-soft);
}

/* ── Image Picker Card Wrapper ── */
.img-picker-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-card-subtle);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.img-picker-card:hover {
    border-color: var(--img-picker-hover-border);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.1);
}

/* ── Image Picker Widget ── */
.img-picker-card .img-picker,
.img-picker {
    width: 100%;
    height: 130px;
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-md);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    background: var(--bg-light);
    transition: border-color 0.2s, background 0.2s;
    display: block;
}

.img-picker-card .img-picker {
    border: none;
    border-bottom: 1px solid #e8edf3;
    border-radius: 0;
    height: 120px;
}

.img-picker:hover,
.img-picker-card:hover .img-picker {
    border-color: var(--accent-blue, #4361ee);
    background: var(--img-picker-hover-bg);
}

.img-picker-card:hover .img-picker {
    border-color: transparent;
    border-bottom-color: var(--img-picker-hover-border);
    background: var(--img-picker-hover-bg);
}

.img-picker-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 5px;
    color: var(--pagination-disabled-color);
    pointer-events: none;
}

.img-picker-placeholder i {
    font-size: 26px;
}

.img-picker-placeholder span {
    font-size: 11px;
    font-weight: 500;
}

.img-picker-filled {
    width: 100%;
    height: 100%;
    position: relative;
}

.img-picker-filled img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
    background: #eff1f5;
    padding: 5px;
}

.img-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.img-picker:hover .img-picker-overlay {
    opacity: 1;
}

/* ── Image Picker Footer ── */
.img-picker-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    min-width: 0;
    background: var(--white);
}

.img-picker-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    word-break: break-all;
}

.img-picker-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.img-picker-order {
    display: flex;
    align-items: center;
    gap: 5px;
}

.img-picker-order small {
    font-size: 11px;
    color: var(--text-placeholder);
    white-space: nowrap;
    font-weight: 500;
    line-height: 26px;
}

.img-picker-order .form-control-sm {
    width: 56px;
    height: 26px;
    padding: 0 6px;
    font-size: 12px;
    line-height: 26px;
    border-radius: 5px;
}

.img-picker-label {
    font-size: 12px;
    color: #334155;
    font-weight: 600;
}

.img-picker-key {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 2px 6px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    user-select: all;
}

.img-picker-key:hover {
    background: var(--border-color);
    color: #1e293b;
    border-color: #cbd5e1;
}

.js-img-remove {
    font-size: 14px;
    line-height: 1;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.js-img-remove:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* ── BSK Add Button (img compact row) ── */
.btn-bsk-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    flex-shrink: 0;
    font-size: var(--font-size-label);
    line-height: 1;
    border: 1.5px solid var(--accent-blue);
    color: var(--accent-blue);
    background: transparent;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn-bsk-add:hover,
.btn-bsk-add:focus-visible {
    background: var(--accent-blue);
    color: var(--white);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-accent);
    transform: scale(1.08);
    outline: none;
}

.btn-bsk-add:active {
    transform: scale(0.97);
    box-shadow: none;
}

/* ── Image Section Label ── */
.img-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    margin-top: 15px;
    font-size: var(--font-size-label);
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.img-section-label i {
    font-size: var(--font-size-label);
    color: var(--accent-blue);
    flex-shrink: 0;
}

.img-section-label::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: linear-gradient(to right, var(--border-color) 60%, transparent);
    border-radius: 2px;
}

/* ── BSK Card (reusable section card) ── */
.bsk-card {
    border: 1px solid var(--border-color-soft);
    border-radius: var(--radius-lg);
}

.bsk-card-title {
    margin: 0;
    padding: 14px 20px;
    font-size: var(--font-size-label);
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bsk-card-body {
    padding: 20px;
}

/* ── Select2 theme override ── */
.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid var(--input-border-color) !important;
    border-radius: var(--radius-sm) !important;
    font-size: var(--font-size-sm);
    color: var(--text-dark);
    min-height: 40px;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px var(--focus-ring) !important;
    outline: none;
}

/* Selected tag pills (multi-select) */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
    background-color: var(--accent-blue) !important;
    border: none !important;
    color: var(--white) !important;
    border-radius: 4px !important;
    font-size: var(--font-size-xs);
    padding: 2px 8px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice__remove {
    color: rgba(255, 255, 255, 0.8) !important;
    border-right: 0 !important;
    width: .55rem;
    height: .55rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice__remove:hover {
    color: var(--white) !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Placeholder text */
.select2-container--bootstrap-5 .select2-selection__placeholder {
    font-size: var(--font-size-sm);
    color: var(--text-placeholder);
}

/* Search field */
.select2-container--bootstrap-5 .select2-search__field {
    font-size: var(--font-size-sm) !important;
    line-height: initial !important;
    padding-top: 2px !important;
}

/* Dropdown options */
.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--accent-blue) !important;
    color: var(--white) !important;
}

.select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: rgba(34, 177, 227, 0.12) !important;
    color: var(--text-dark) !important;
}

.select2-container--bootstrap-5 .select2-results__option--selected.select2-results__option--highlighted {
    background-color: var(--accent-blue) !important;
    color: var(--white) !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid var(--input-border-color) !important;
    border-radius: var(--radius-sm) !important;
    font-size: var(--font-size-sm);
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--input-border-color) !important;
    border-radius: 4px;
    font-size: var(--font-size-sm);
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px var(--focus-ring) !important;
    outline: none;
}

/* Clear (×) button */
.select2-container--bootstrap-5 .select2-selection__clear {
    color: var(--text-muted) !important;
}

.select2-container--bootstrap-5 .select2-selection__clear:hover {
    color: var(--text-dark) !important;
}

/* Denomination checkboxes — match permissions table style */
.denom-check {
    width: 22px;
    height: 22px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color-alpha-md);
    background-color: var(--white);
    transition: var(--transition);
    accent-color: var(--primary-blue);
    flex-shrink: 0;
}

.denom-check:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.denom-check:focus {
    box-shadow: none;
}

.cmw-input {
    max-width: 100px;
}

.info-notice {
    padding: 12px;
    background: rgba(20, 46, 83, 0.04);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.info-notice-text {
    font-size: 12px;
    color: var(--text-muted);
}

.popover-icon {
    font-size: var(--font-size-sm);
    cursor: pointer;
    color: var(--text-placeholder);
}

.location-details-card .detail-item {
    padding:18px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    height: 100%;
}

.location-details-card .detail-item .detail-label{
    font-size:12px;
    color: var(--text-muted);
}

.location-details-card .detail-item .detail-value {
    font-size:15px;
    color:var(--text-dark);
    font-weight:600;
}

.location-details-card .detail-item .detail-value-small {
    font-size:14px;
    color:var(--text-dark);
    font-weight:600;
}

.location-details-card .detail-item .btn-show-key {
    height: 30px;
    width: 30px;
    padding: 2px;
}

.location-details-card .detail-item .btn-show-key i {
    font-size: var(--font-size-label);
    line-height: 1.5;
}

.credential-eye-btn {
        padding: 0.65rem 0.65rem;
}

/* ── BSK Pagination (matches #txnPageList style) ────────────────────────── */
.bsk-pagination .page-link {
    color: var(--primary-blue);
    border-color: var(--border-color);
    background-color: var(--white);
    font-size: var(--font-size-label);
    padding: 5px 11px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    box-shadow: none !important;
}
.bsk-pagination .page-item.active .page-link {
    background: linear-gradient(90deg, var(--accent-blue) 0%, var(--primary-blue) 100%);
    border-color: transparent;
    color: var(--white);
    font-weight: 600;
}
.bsk-pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}
.bsk-pagination .page-item.disabled .page-link {
    color: var(--pagination-disabled-color);
    border-color: var(--border-color);
    background-color: var(--bg-lighter);
}
.bsk-pagination .page-item:first-child .page-link,
.bsk-pagination .page-item:last-child .page-link {
    border-radius: var(--radius-sm);
}

.form-control.is-invalid {
    background-image: none !important;
    border-color: var(--color-danger) !important;
}

.form-select.is-invalid:not([multiple]) {
    background-image: none !important;
    border-color: var(--color-danger) !important;
}

.invalid-feedback {
    font-size: 13px;
}

/* ── Table first-column padding ─────────────────────────────── */
.custom-table thead th:first-child,
.custom-table tbody td:first-child,
table.dataTable thead th:first-child,
table.dataTable tbody td:first-child {
    padding-left: 1.1rem !important;
}

/* ── Fleet Health Card ──────────────────────────────────────── */
.fleet-health-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}
.fleet-health-title {
    font-size: 13px;
    font-weight: 600;
    color: #7a8099;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}
.fleet-uptime-pct {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}
.fleet-uptime-pct.high   { color: #16a34a; }
.fleet-uptime-pct.medium { color: #d97706; }
.fleet-uptime-pct.low    { color: #dc2626; }
.fleet-progress-track {
    height: 8px;
    border-radius: 99px;
    background: #f0f2f7;
    overflow: hidden;
    margin: 10px 0 14px;
}
.fleet-progress-bar {
    height: 100%;
    border-radius: 99px;
    transition: width .6s ease;
}
.fleet-status-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.fleet-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 12.5px;
    font-weight: 600;
}
.fleet-chip.online      { background: var(--green-badge-bg); color: var(--green-badge-text); }
.fleet-chip.offline     { background: var(--red-badge-bg);   color: var(--red-badge-text); }
.fleet-chip.maintenance { background: var(--amber-badge-bg); color: var(--amber-badge-text); }
.fleet-chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.fleet-chip.online .dot      { background: var(--green-dot); }
.fleet-chip.offline .dot     { background: var(--red-dot); }
.fleet-chip.maintenance .dot { background: var(--amber-dot); }

/* ── Breakdown Cards ─────────────────────────────────────────── */
.breakdown-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    border: 1px solid var(--border-color);
    height: 100%;
}
.breakdown-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}
.breakdown-card-sub {
    font-size: 12px;
    color: #7a8099;
    margin-bottom: 16px;
}
.breakdown-table { width: 100%; border-collapse: collapse; }
.breakdown-table th {
    font-size: 11px;
    font-weight: 600;
    color: #7a8099;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 0 8px 10px;
    border-bottom: 1px solid #f0f2f7;
    white-space: nowrap;
}
.breakdown-table td {
    font-size: 13px;
    color: #1a1a2e;
    padding: 9px 8px;
    border-bottom: 1px solid #f7f8fb;
    vertical-align: middle;
}
.breakdown-table tr:last-child td { border-bottom: none; }
.uptime-bar-track {
    height: 5px;
    background: #f0f2f7;
    border-radius: 99px;
    overflow: hidden;
    min-width: 60px;
}
.uptime-bar-fill {
    height: 100%;
    border-radius: 99px;
}
.badge-status-sm {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
}
.badge-status-sm.online      { background: var(--green-badge-bg); color: var(--green-badge-text); }
.badge-status-sm.offline     { background: var(--red-badge-bg);   color: var(--red-badge-text); }
.badge-status-sm.maintenance { background: var(--amber-badge-bg); color: var(--amber-badge-text); }

/* ── Dashboard stat sub-line ────────────────────────────────── */
.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-sub-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.stat-sub-dot.online      { background-color: var(--green-dot); }
.stat-sub-dot.offline     { background-color: var(--red-dot); }
.stat-sub-dot.maintenance { background-color: var(--amber-dot); }

/* ── Kiosk offline banner ───────────────────────────────────── */
.kiosk-offline-banner {
    background: var(--badge-pending-bg);
    border: 1px solid var(--color-warning);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 1.25rem;
    font-size: 13.5px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.kiosk-offline-banner a {
    color: #856404;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed #856404;
}
.kiosk-offline-banner a:hover {
    color: #533f03;
    border-bottom-color: #533f03;
}

/* ── Full-page loader ───────────────────────────────────────── */
.bsk-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.bsk-loader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.bsk-loader-progress {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.bsk-loader-ring {
    width: 52px;
    height: 52px;
    border: 3px solid rgba(20, 42, 74, 0.12);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: bsk-spin 0.75s linear infinite;
}

@keyframes bsk-spin {
    to { transform: rotate(360deg); }
}

.bsk-loader-label {
    color: rgba(20, 42, 74, 0.35);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
    font-family: inherit;
}

/* ── Audit log table ────────────────────────────────────────── */
.audit-table            { font-size: 0.85rem; }
.audit-col-ts           { width: 140px; }
.audit-col-actor        { width: 160px; }
.audit-col-event        { width: 160px; }
.audit-col-location     { width: 130px; }
.audit-col-kiosk        { width: 90px; }
.audit-col-ip           { width: 90px; }
.audit-col-action       { width: 60px; }
.audit-ts               { font-size: 0.78rem; }
.audit-actor-name       { font-size: 0.82rem; }
.audit-actor-role       { font-size: 0.75rem; }
.audit-meta             { font-size: 0.8rem; }
.audit-ip               { font-size: 0.75rem; }
.audit-details-btn      { font-size: 0.75rem; }
.audit-count            { font-size: 0.85rem; }
.audit-details-desc     { font-size: 0.9rem; }

/* ── Audit JSON diff block ──────────────────────────────────── */
.audit-json-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    line-height: 1.65;
    overflow: auto;
    max-height: 440px;
    margin: 0;
    white-space: pre;
}
.jk { color: #9cdcfe; }
.js { color: #ce9178; }
.jn { color: #b5cea8; }
.jb { color: #569cd6; }
.jz { color: #808080; }
.jc {
    background: rgba(255,213,79,.15);
    display: block;
    border-left: 3px solid #ffd54f;
    padding-left: 6px;
    margin-left: -6px;
}

/* ── Audit event badges ─────────────────────────────────────── */
.audit-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.6;
}
.audit-badge.audit-ev-created   { background: var(--green-badge-bg);  color: var(--green-badge-text); }
.audit-badge.audit-ev-deleted   { background: var(--red-badge-bg);    color: var(--red-badge-text); }
.audit-badge.audit-ev-warning   { background: var(--amber-badge-bg);  color: var(--amber-badge-text); }
.audit-badge.audit-ev-sensitive { background: var(--purple-badge-bg); color: var(--purple-badge-text); }
.audit-badge.audit-ev-muted     { background: var(--bg-subtle);       color: var(--text-muted); }
.audit-badge.audit-ev-info      { background: var(--cyan-badge-bg);   color: var(--cyan-badge-text); }
.audit-badge.audit-ev-default   { background: var(--blue-badge-bg);   color: var(--blue-badge-text); }