/* 
   Style: Custom Styles for Blue Steel Kiosk Admin
   Version: 1.0
   Author: Antigravity
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --white: #FFFFFF;
    --primary-blue: #142a4a;
    --accent-blue: #22b1e3;
    --sidebar-bg: #142a4a;
    --sidebar-hover: #1b355a;
    --card-peach: #fff3ea;
    --card-blue: #e7f1ff;
    --card-pink: #fef0f7;
    --card-cyan: #e7fafc;
    --text-dark: #0A1D38;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --input-border-color: #142E53;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: white;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #dfe4ea;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #dfe4ea #f1f5f9;
}


.svg-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
    transition: var(--transition);
}

/* --- 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: white;
    font-weight: 400;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    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: white !important;
    box-shadow:
        0 6px 20px rgba(34, 177, 227, 0.45),
        0 2px 8px rgba(20, 42, 74, 0.35);
}

.btn-primary-gradient:hover::before {
    left: 125%;
}

.btn-primary-gradient:active {
    color: white !important;
    transform: translateY(-1px) scale(1.005);
    box-shadow:
        0 3px 10px rgba(34, 177, 227, 0.35),
        0 1px 4px rgba(20, 42, 74, 0.25);
}

.btn-sm {
    padding: 0.6rem 1rem !important;
    font-size: 0.875rem;
    border-radius: 6px !important;
    max-height: 40px;
}

.form-control,
.form-select,
.btn-dropdown-custom {
    height: 40px;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--input-border-color) !important;
    font-size: 0.85rem;
    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 rgba(42, 178, 228, 0.2);
    border-color: var(--accent-blue) !important;
    outline: none;
    background-color: var(--white);
}

.form-control::placeholder {
    color: #94A3B8;
}

label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* --- Login Page --- */

.login-wrapper {
    min-height: 100vh;
    display: flex;
}

.login-hero {
    flex: 1;
    background: url('../img/kiosk_hero.jpg') center center no-repeat;
    background-size: cover;
    position: relative;
    max-width: 40%;
}

.login-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-color: white;
}

.login-card .form-control {
    height: 45px;
}

.login-logo {
    max-width: 250px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    margin-top: 10vh;
}

.login-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.powered-by-footer {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    text-align: right;
}

.powered-by-logo {
    height: 40px;
}

.powered-by-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* --- Dashboard --- */

.main-container {
    min-height: 100vh;
    padding: 20px;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem 1rem;
    transition: var(--transition);
    position: fixed;
    height: calc(100vh - 40px);
    z-index: 1000;
    border-radius: 10px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    width: 120px;
    margin-bottom: 2.5rem;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.nav-link {
    color: rgba(255, 255, 255, 0.95);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: var(--transition);
    font-weight: normal;
    text-decoration: none;
}

.nav-link:hover {
    color: white;
    background-color: var(--sidebar-hover);
}

.nav-link.active {
    color: var(--primary-blue);
    color: white;
    font-weight: 600;
}

.icon-box {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: var(--transition);
}

.nav-link.active .icon-box {
    background-color: white;
    color: var(--accent-blue);
}

.nav-link.active .svg-icon {
    color: var(--accent-blue);
}

.nav-link .svg-icon {
    width: 20px;
    height: 20px;
    color: white;
}

.sidebar-footer {
    margin-top: auto;
}

.sidebar-footer form {
    margin-bottom: 0;
}

.logout-link {
    color: white;
    padding: 0.8rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.logout-link .icon-box {
    margin-right: 0;
    background-color: white;
    color: var(--primary-blue);
}

.logout-link:hover {
    opacity: 0.8;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 0;
    transition: var(--transition);
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
}

.top-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

.mobile-logo {
    height: 30px;
    width: auto;
}

.sidebar-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 6px;
    background: var(--primary-blue);
}

.sidebar-toggle:hover {
    background-color: var(--primary-blue);
    opacity: 0.8;
}

.sidebar-toggle .svg-icon {
    width: 20px;
    height: 20px;
    fill: white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background-color: #2ab2e4;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    font-size: 1.1rem;
}

/* Stats Cards */
.stat-card {
    border: none;
    border-radius: 10px;
    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: #fff3e6;
}

.stat-card.blue {
    background-color: #e5f1ff;
}

.stat-card.pink {
    background-color: #fdf0f7;
}

.stat-card.cyan {
    background-color: #e6f9fa;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

.stat-label {
    color: #1a1a1a;
    font-weight: 500;
    margin-top: auto;
}

.stat-icon-wrapper {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 6px;
    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: white;
    border-radius: 10px;
    padding: 1.6rem 1.6rem 0 1.6rem;
    margin-top: 1.6rem;
    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: 0.9rem;
    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: #4A5568;
    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: white;
    margin-top: 0;
}

/* DataTables Scroll Fixes */
.dataTables_scrollBody {
    border-bottom: none !important;
}

.dataTables_scrollHead {
    border-bottom: 1px solid rgba(20, 46, 83, 0.1) !important;
}

table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

table.dataTable thead th {
    background-color: white !important;
    font-weight: 500;
}

.dataTables_wrapper .dataTables_scroll {
    border-radius: 8px;
    overflow: hidden;
    border: none;
}

/* Prevent table from overflowing wrapper on search/filter redraw */
/* .dataTables_scrollBody {
    overflow-x: hidden !important;
} */

.custom-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.custom-table thead th {
    background-color: #fff;
    border-top: none;
    border-bottom: 1px solid rgba(20, 46, 83, 0.1);
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.85rem;
    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 thead th:last-child {
    padding-right: 0 !important;
}

.custom-table tbody td {
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
    color: #1A202C;
    font-weight: 400;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(20, 46, 83, 0.1);
}

.custom-table tbody td:first-child {
    padding-left: 0;
}

.custom-table tbody td:last-child {
    padding-right: 0;
}

.location-name {
    font-weight: 500;
    display: block;
    margin-bottom: 0;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.location-address {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 400;
}

/* Status Badges */
.badge-status {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: var(--text-dark);
}

.badge-active {
    background-color: #D9FFEA;
}

.badge-inactive {
    background-color: #FFD7CA;
}

/* Transaction Status Badges */
.badge-success {
    background-color: #D9FFEA;
    color: var(--text-dark);
}

.badge-pending {
    background-color: #FFF3CD;
    color: var(--text-dark);
}

.badge-failed {
    background-color: #FFD7CA;
    color: var(--text-dark);
}

/* Transaction Type Badges */
.badge-type {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    display: inline-block;
}

.badge-load {
    background-color: #E8E0FF;
}

.badge-redeem {
    background-color: #D6EFFF;
}

/* Avatar Stack */
.avatar-stack {
    display: flex;
    align-items: center;
}

.avatar-item {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.70rem;
    font-weight: 400;
    color: 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: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

/* Action Button */
.btn-action-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--primary-blue);
    color: 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: white;
}

/* Table Action Dropdown */
.action-dropdown .dropdown-toggle::after {
    display: none;
}

.action-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 120px;
    margin-top: 5px !important;
}

.action-menu .dropdown-item {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    color: #4A5568;
    transition: all 0.2s ease;
}

.action-menu li:not(:last-child) {
    border-bottom: 1px solid rgba(20, 46, 83, 0.05);
}

.action-menu .dropdown-item:hover {
    background-color: #F8FAFC;
    color: var(--accent-blue);
}

.action-menu .dropdown-item.text-danger:hover {
    background-color: #FFF5F5;
    color: #E53E3E !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;
}

table.dataTable thead th {
    padding-right: 0.75rem !important;
    /* Reset DataTables default padding */
}

/* Empty State UI */
.empty-state-wrapper {
    padding: 4rem 2rem;
    text-align: center;
    background: white;
}

.empty-state-icon {
    background: #F8FAFC;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #94A3B8;
}

.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: 0.9rem;
    color: #64748B;
    max-width: 300px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .sidebar {
        width: 250px;
        left: -270px;
        height: 100vh;
        border-radius: 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
        top: 0;
        position: fixed;
    }

    .sidebar.mobile-show {
        left: 0;
    }

    .sidebar-logo {
        width: 100px;
        margin-bottom: 2rem;
    }

    .nav-link span,
    .logout-link span {
        display: block;
    }

    .login-hero {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .main-container {
        padding: 15px;
    }

    .top-header {
        margin-bottom: 1rem;
        padding: 5px 0;
        position: sticky;
        top: 0;
        z-index: 10;
        background: white;
    }

    .table-header-actions {
        width: 100%;
        margin-top: 0;
    }

    .search-wrapper {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .img-picker-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .stat-value {
        font-size: 1.5rem;
    }

    .table-title-header {
        margin-bottom: 0.5rem;
    }

    .page-title {
        margin-bottom: 0.25rem;
        font-size: 1.4rem;
    }

    .table-header-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 1rem;
    }

    .table-actions-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        width: 100%;
        margin-bottom: 0;
    }

    .search-wrapper {
        width: 100%;
        min-width: 100%;
        flex: 0 0 100%;
    }

    .custom-select-wrapper {
        width: calc(50% - 0.375rem);
        min-width: 0;
        flex: 1;
    }

    .table-actions-group .btn-primary-gradient {
        width: 100%;
        margin-top: 0.25rem;
    }

    .table-actions-group .btn-outline-custom {
        width: 100%;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .user-name {
        font-size: 0.85rem;
    }

    .user-role {
        font-size: 0.75rem;
    }

    .user-profile {
        gap: 0.75rem;
    }

    /* Permission Page Specific Mobile Adjustments */
    .permission-tabs {
        margin-top: 0.5rem;
        padding-bottom: 5px;
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .permission-tabs::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar for Chrome, Safari and Opera */
    }

    .permission-tabs .nav-item {
        flex: 0 0 auto;
    }

    .permission-tabs .btn-sm {
        white-space: nowrap;
        padding: 0.5rem 1rem;
    }

    /* .custom-table min-width removed — handled by table-responsive overflow */

    .location-name {
        font-size: 0.85rem;
    }

    .location-address {
        font-size: 0.75rem;
    }

    .table-responsive {
        border-radius: 8px;
        overflow-x: auto !important;
    }
}

/* --- Offcanvas / Drawer Styles --- */
.custom-offcanvas {
    width: 450px !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}

.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: #4A5568 !important;
    font-size: 0.9rem;
    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 rgba(20, 46, 83, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    border-radius: 10px;
    margin-top: 0 !important;
    border-top: none;
}

.custom-dropdown-wrapper .dropdown-item {
    padding: 0.7rem 1.25rem;
    font-size: 0.85rem;
    color: #4A5568;
    transition: all 0.2s ease;
}

.custom-dropdown-wrapper .dropdown-item:hover {
    background-color: #F8FAFC;
    color: var(--accent-blue);
    padding-left: 1.5rem;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--accent-blue);
    color: 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: 0.85rem;
    color: #4A5568;
}

.status-label.active {
    font-weight: 500;
}

.custom-switch-toggle .form-check-input {
    width: 42px;
    height: 22px;
    cursor: pointer;
    background-color: #E2E8F0;
    border-color: transparent;
    transition: all 0.3s ease;
}

.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: 8px;
    height: 45px;
    transition: var(--transition);
    padding: 0.65rem 1.5rem;
}

.btn-outline-custom:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow:
        0 6px 10px rgba(34, 177, 227, 0.25),
        0 2px 8px rgba(20, 42, 74, 0.15);
}

/* Permissions table checkboxes */
.custom-table .form-check-input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid rgba(20, 46, 83, 0.25);
    background-color: #fff;
    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 rgba(20, 46, 83, 0.15);
}

.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: 6px;
    border: 1px solid rgba(20, 46, 83, 0.25);
    background-color: #fff;
    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 rgba(20, 46, 83, 0.15);
    outline: none;
}

.denom-check-group .form-check-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    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: white;
}

.nav-pills .btn-outline-custom.active:hover,
.nav-pills .btn-outline-custom[aria-selected="true"]:hover {
    opacity: 0.9;
    color: white;
}

.offcanvas-footer .btn-primary-gradient {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Custom Toast Styles --- */
.custom-toast {
    background-color: white !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden;
    min-width: 320px;
}

.toast-icon-wrap {
    width: 38px;
    height: 38px;
    background-color: #D1FAE5;
    /* Soft success green */
    color: #10B981;
    /* Success green */
    border-radius: 10px;
    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: 0.8rem;
    line-height: 1.4;
}

.btn-close:focus {
    box-shadow: none;
}

@media (min-width: 992px) {
    .table-container .table-responsive {
        overflow: visible;
    }
}

/* .table-container {
    position: relative;
} */

.action-dropdown {
    position: static;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding: 1.5rem 0 0 0;
    border-radius: 12px;
    font-size: 0.85rem;
}

.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: #4CAF50;
}

.signal-icon.offline path {
    fill: #9E9E9E;
}

.connectivity-label {
    font-size: 10px;
    color: #9e9e9e;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* 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-primary, #1a1a2e);
    min-width: 38px;
}

.cash-amount {
    font-size: 11px;
    color: #9e9e9e;
    white-space: nowrap;
}

.cash-progress-track {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.cash-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease;
}

.cash-progress-fill.level-low {
    background: #4CAF50;
}

/* green  ≤ 30% */
.cash-progress-fill.level-mid {
    background: #FFC107;
}

/* yellow 31-60% */
.cash-progress-fill.level-high {
    background: #F44336;
}

.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: #7a8099;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8eaf0;
}

/* ── Image Picker Card Wrapper ── */
.img-picker-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.img-picker-card:hover {
    border-color: #c7d2e8;
    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: 8px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
    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: #f0f4ff;
}

.img-picker-card:hover .img-picker {
    border-color: transparent;
    border-bottom-color: #c7d2e8;
    background: #f0f4ff;
}

.img-picker-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 5px;
    color: #b0b8c9;
    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: #fff;
    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: #fff;
}

.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: #94a3b8;
    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: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    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: #e2e8f0;
    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: 13px;
    line-height: 1;
    border: 1.5px solid var(--accent-blue);
    color: var(--accent-blue);
    background: transparent;
    border-radius: 6px;
    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: #fff;
    border-color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(34, 177, 227, 0.35);
    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: 13px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.img-section-label i {
    font-size: 13px;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.img-section-label::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: linear-gradient(to right, #e2e8f0 60%, transparent);
    border-radius: 2px;
}

/* ── BSK Card (reusable section card) ── */
.bsk-card {
    border: 1px solid #e8eaf0;
    border-radius: 10px;
}

.bsk-card-title {
    margin: 0;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark, #1a1a2e);
    background: #f8fafc;
    border-bottom: 1px solid #e8eaf0;
    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: 6px !important;
    font-size: 0.85rem;
    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 rgba(42, 178, 228, 0.2) !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: #fff !important;
    border-radius: 4px !important;
    font-size: 0.8rem;
    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: #fff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Placeholder text */
.select2-container--bootstrap-5 .select2-selection__placeholder {
    font-size: 0.85rem;
    color: #94A3B8;
}

/* Search field */
.select2-container--bootstrap-5 .select2-search__field {
    font-size: 0.85rem !important;
    line-height: initial !important;
}

/* Dropdown options */
.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--accent-blue) !important;
    color: #fff !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: #fff !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid var(--input-border-color) !important;
    border-radius: 6px !important;
    font-size: 0.85rem;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--input-border-color) !important;
    border-radius: 4px;
    font-size: 0.85rem;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(42, 178, 228, 0.2) !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: 6px;
    border: 1px solid rgba(20, 46, 83, 0.25);
    background-color: #fff;
    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: 8px;
    border: 1px dashed var(--border-color);
}

.info-notice-text {
    font-size: 12px;
    color: #7a8099;
}

.popover-icon {
    font-size: 0.85rem;
    cursor: pointer;
    color: #94a3b8;
}

.location-details-card .detail-item {
    padding:18px;
    background:#F8FAFC;
    border-radius:10px;
    border:1px solid var(--border-color);
    height: 100%;
}

.location-details-card .detail-item .detail-label{
    font-size:12px;
    color:#7a8099;
}

.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: 13px;
    line-height: 1.5;
}