﻿/* ============================================================
   BookingApp — Admin Panel  |  Light Blue Design System
   Primary: #3b9edd (light blue)  Sidebar: white
   ============================================================ */

:root {
    --primary:       #3b9edd;
    --primary-hover: #2280c4;
    --primary-light: #e8f4fd;
    --primary-mid:   #bfdbfe;
    --primary-dark:  #1d4ed8;
    --sidebar-w:     250px;
    --header-h:      60px;
    --radius:        10px;
    --shadow:        0 1px 8px rgba(0,0,0,.07);
    --shadow-md:     0 4px 16px rgba(0,0,0,.10);
    --bg:            #f0f7ff;
    --card-bg:       #ffffff;
    --text:          #1e293b;
    --text-muted:    #64748b;
    --border:        #dbeafe;
    --sidebar-bg:    #ffffff;
    --sidebar-text:  #374151;
    --sidebar-muted: #35ade9;
    --sidebar-hover: #eff8ff;
    --sidebar-active-bg: #dbeafe;
    --sidebar-active-text: #1d4ed8;
    --sidebar-active-border: #3b82f6;
}

* { box-sizing: border-box; }

body.admin-body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.admin-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform .25s ease;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0,0,0,.04);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: var(--header-h);
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 8px;
}

.sidebar-brand i { font-size: 20px; }

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #3a4843;
    padding: 12px 18px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    cursor: pointer;
    font-size: 13.5px;
    margin: 1px 8px;
    border-radius: 8px;
}

.nav-item i { font-size: 15px; flex-shrink: 0; color: var(--sidebar-muted); transition: color .15s; }

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--text);
}
.nav-item:hover i { color: var(--primary); }

.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
    border-left-color: var(--sidebar-active-border);
    border-radius: 0 8px 8px 0;
    margin-left: 0;
    padding-left: 21px;
}
.nav-item.active i { color: var(--sidebar-active-text); }

.sidebar-footer {
    padding: 10px 8px;
    border-top: 1px solid var(--border);
}

.sidebar-footer .nav-item {
    color: #ef4444;
    border-radius: 8px;
    margin: 0;
}
.sidebar-footer .nav-item i { color: #ef4444; }
.sidebar-footer .nav-item:hover { background: #fef2f2; }

/* ── Sidebar Overlay (mobile) ────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
}

/* ── Main Area ───────────────────────────────────────────── */
.admin-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .25s ease;
}

/* ── Header ──────────────────────────────────────────────── */
.admin-header {
    margin: -18px 0px 0px 0px;
    position: sticky;
    top: 0;
    height: var(--header-h);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.header-left { display: flex; align-items: center; gap: 16px; }
.header-right { display: flex; align-items: center; gap: 12px; }

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    line-height: 1;
    transition: background .15s, color .15s;
}
.sidebar-toggle:hover { background: var(--bg); color: var(--text); }

.breadcrumb { font-size: 13px; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-muted); }

.admin-user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* ── Content ─────────────────────────────────────────────── */
.admin-content {
    flex: 1;
    padding: 24px;
}

/* ── Cards ───────────────────────────────────────────────── */
.admin-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid var(--border);
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    border: 1px solid var(--border);
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 46px; height: 46px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
}

.stat-value { font-size: 1.7rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: 8px;
    font-weight: 500;
    min-height: 40px;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: 8px;
}
.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: #fff !important;
}

/* Small icon action buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 7px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    text-decoration: none;
    flex-shrink: 0;
}
.btn-action:hover { opacity: .85; transform: scale(1.08); }
.btn-action-view    { background: #e0f2fe; color: #0284c7; }
.btn-action-edit    { background: #fef3c7; color: #d97706; }
.btn-action-pay     { background: #d1fae5; color: #059669; }
.btn-action-delete  { background: #fee2e2; color: #dc2626; }
.btn-action-primary { background: var(--primary-light); color: var(--primary); }

/* ── Forms ───────────────────────────────────────────────── */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border);
    min-height: 42px;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,158,221,.12);
    outline: none;
}

.form-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; }

/* ── Toggle Switch ───────────────────────────────────────── */
.form-check-input[type="checkbox"] {
    /* width: 2.4em; height: 1.3em;
    border-radius: 1em; */
    cursor: pointer;
}
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ── Table ───────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.admin-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 13.5px;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafbfc; }

/* ── Status Badges ───────────────────────────────────────── */
.badge-active    { background: #d1fae5; color: #065f46; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-inactive  { background: #fee2e2; color: #991b1b; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; display: inline-block; }

/* Booking status badges */
.badge-pending   { background: #fef3c7; color: #92400e; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-confirmed { background: #d1fae5; color: #065f46; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-completed { background: #ede9fe; color: #5b21b6; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-cancelled { background: #fee2e2; color: #991b1b; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-scheduled { background: #fef9c3; color: #854d0e; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; display: inline-block; }

/* Payment badges */
.badge-paid      { background: #d1fae5; color: #065f46; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-unpaid    { background: #fef3c7; color: #92400e; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-failed    { background: #fee2e2; color: #991b1b; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; display: inline-block; }

/* ID pill badge */
.badge-id {
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    font-family: monospace;
    letter-spacing: .02em;
}

/* ── Page Title ──────────────────────────────────────────── */
.page-title { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.page-subtitle { font-size: 13px; color: var(--text-muted); }

/* ── Pagination (generic fallback) ───────────────────────── */
.pagination .page-link {
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: background .15s, color .15s;
}
.pagination .page-link:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-item.disabled .page-link { opacity: .45; }

/* ── Mobile Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,.15);
    }
    .sidebar-overlay.open { display: block; }
    .admin-main { margin-left: 0; }
    .admin-content { padding: 14px; }
    .admin-header { padding: 0 14px; }
    .stat-value { font-size: 1.35rem; }
    .admin-card { padding: 16px; }
    .btn-action { width: 36px; height: 36px; font-size: 15px; }
}

/* ── Settings Layout ─────────────────────────────────────── */
.settings-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: start;
}

.settings-nav {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    overflow: hidden;
}

.settings-tab-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    transition: background .15s, color .15s, border-color .15s;
    margin: 1px 0;
}
.settings-tab-link i { font-size: 15px; flex-shrink: 0; }
.settings-tab-link:hover { background: var(--bg); color: var(--text); }
.settings-tab-link.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.settings-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: 8px;
    gap: 16px;
}

.gateway-block {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

@media (max-width: 768px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav {
        position: static;
        display: flex;
        overflow-x: auto;
        flex-direction: row;
        border-radius: var(--radius);
        -webkit-overflow-scrolling: touch;
    }
    .settings-tab-link {
        flex-shrink: 0;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 0;
        padding: 10px 14px;
        white-space: nowrap;
    }
    .settings-tab-link.active {
        border-bottom-color: var(--primary);
        border-left-color: transparent;
    }
}

/* ── Sort links ──────────────────────────────────────────── */
.sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.sort-link:hover { color: var(--primary); }
.sort-arrow { font-size: 11px; opacity: .45; }
.sort-arrow.active { opacity: 1; color: var(--primary); }

/* ── Table Toolbar ───────────────────────────────────────── */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.toolbar-left  { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.toolbar-right { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.search-box { position: relative; display: flex; align-items: center; }
.search-box i { position: absolute; left: 9px; color: var(--text-muted); font-size: 13px; pointer-events: none; }
.search-box .form-control { padding-left: 28px; min-height: 34px; height: 34px; font-size: 13px; width: 200px; }

.table-toolbar .form-select,
.table-toolbar .form-control { min-height: 34px; height: 34px; font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
.table-toolbar .btn { min-height: 34px; height: 34px; padding: 0 14px; font-size: 13px; display: inline-flex; align-items: center; }

@media (max-width: 768px) {
    .table-toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-left, .toolbar-right { width: 100%; }
    .search-box .form-control { width: 100%; }
}

/* ── Report Tabs ─────────────────────────────────────────── */
.report-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: color .15s, border-color .15s, background .15s;
    flex-shrink: 0;
}
.report-tab:hover { color: var(--primary); background: var(--primary-light); }
.report-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; background: var(--primary-light); }

@media (max-width: 768px) {
    .report-tab { padding: 10px 12px; font-size: 12.5px; }
}

/* ── Print / PDF ─────────────────────────────────────────── */
@media print {
    .admin-sidebar, .admin-header, .sidebar-overlay,
    .btn, .alert, form.row, .stat-card, .btn-group,
    nav[aria-label="pagination"], .page-subtitle { display: none !important; }
    .admin-main { margin-left: 0 !important; }
    .admin-content { padding: 0 !important; }
    .admin-card { box-shadow: none !important; border: 1px solid #ddd !important; }
    body { background: #fff !important; }
    .admin-table th, .admin-table td { font-size: 11px !important; padding: 6px 8px !important; }
}

/* ── Drag & Drop builder ─────────────────────────────────── */
.sortable-ghost { opacity: 0.4; background: var(--primary-light); }
.builder-item { transition: background 0.15s; }
.drag-handle:hover { color: var(--primary) !important; }

/* ── Misc utilities ──────────────────────────────────────── */
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-primary { color: var(--primary) !important; }
.bg-primary-light { background: var(--primary-light) !important; }

/* ── Bootstrap overrides ─────────────────────────────────── */
/* Keep Bootstrap's .text-primary aligned with our teal */
.text-primary { color: var(--primary) !important; }
.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); }
.border-primary { border-color: var(--primary) !important; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

/* Neutral info/secondary badges used for labels */
.badge.bg-secondary, .badge.bg-secondary-subtle { background: #f1f5f9 !important; color: #475569 !important; }
.badge.bg-info, .badge.bg-info-subtle { background: #e0f2fe !important; color: #0369a1 !important; }

/* ── Settings Sidebar (new style matching screenshot) ────── */
.stab-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border);
    transition: background .15s, color .15s;
    position: relative;
}
.stab-link:last-child { border-bottom: none; }
.stab-icon { font-size: 15px; color: var(--text-muted); flex-shrink: 0; transition: color .15s; }
.stab-arrow { font-size: 11px; color: var(--border); transition: color .15s; }

.stab-link:hover {
    background: var(--bg);
    color: var(--primary);
}
.stab-link:hover .stab-icon,
.stab-link:hover .stab-arrow { color: var(--primary); }

.stab-active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
    padding-left: 13px;
}
.stab-active .stab-icon,
.stab-active .stab-arrow { color: var(--primary); }

/* Section header with left border accent (like screenshot) */
.settings-section-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    padding: 12px 16px;
    border-left: 4px solid var(--primary);
    background: var(--bg);
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-section-title i { color: var(--primary); font-size: 16px; }

/* Mobile settings nav */
@media (max-width: 768px) {
    .stab-link {
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid var(--border);
        padding: 10px 14px;
        white-space: nowrap;
        font-size: 13px;
    }
    .stab-link:last-child { border-right: none; }
    .stab-active {
        border-left: none;
        border-bottom: 3px solid var(--primary);
        padding-left: 14px;
    }
    .stab-arrow { display: none; }
}

/* ── Table Toolbar (new style) ───────────────────────────── */
.tbl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.tbl-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tbl-perpage {
    width: 70px !important;
    min-height: 34px !important;
    height: 34px !important;
    font-size: 13px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
}

.tbl-entries-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.tbl-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Export / action icon buttons in toolbar */
.btn-tbl-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 7px;
    border: none;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s;
    flex-shrink: 0;
}
.btn-tbl-action:hover { opacity: .8; }
.btn-tbl-excel { background: #d1fae5; color: #059669; }
.btn-tbl-csv   { background: #fef3c7; color: #d97706; }
.btn-tbl-print { background: #e0f2fe; color: #0284c7; }

/* Toolbar search */
.tbl-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.tbl-search-icon {
    position: absolute;
    left: 9px;
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}
.tbl-search-input {
    padding: 0 12px 0 30px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
    width: 180px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.tbl-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,158,221,.1);
    background: #fff;
}

@media (max-width: 768px) {
    .tbl-toolbar { flex-direction: column; align-items: stretch; }
    .tbl-toolbar-left, .tbl-toolbar-right { width: 100%; }
    .tbl-search-input { width: 100%; }
}

/* ── Pagination Bar (bottom of table) ────────────────────── */
.tbl-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
}

.tbl-pagination-info {
    font-size: 12.5px;
    color: var(--text-muted);
    white-space: nowrap;
}

.tbl-pagination-nav .pagination {
    margin: 0;
    gap: 2px;
    flex-wrap: nowrap;
}

.admin-pagination .page-link {
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px !important;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12.5px;
    padding: 0 6px;
    background: #fff;
    transition: background .15s, color .15s, border-color .15s;
    text-decoration: none;
    line-height: 1;
}
.admin-pagination .page-link:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}
.admin-pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}
.admin-pagination .page-item.disabled .page-link {
    opacity: .4;
    pointer-events: none;
}

@media (max-width: 768px) {
    .tbl-pagination-bar { flex-direction: column; align-items: flex-start; }
    .admin-pagination .page-link { min-width: 28px; height: 28px; font-size: 12px; }
}

/* ══════════════════════════════════════════════════════════════
   DATATABLE SYSTEM — toolbar, thead, pagination
   ══════════════════════════════════════════════════════════════ */

/* ── Toolbar ─────────────────────────────────────────────────── */
.dt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.dt-toolbar-left  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dt-toolbar-right { display: flex; align-items: center; gap: 6px; }

/* Show N entries */
.dt-show-wrap { display: flex; align-items: center; gap: 6px; }
.dt-show-label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.dt-show-input {
    width: 56px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    color: var(--text);
    background: #fff;
    outline: none;
    padding: 0 6px;
    transition: border-color .15s;
}
.dt-show-input:focus { border-color: var(--primary); }

/* Action icon buttons */
.dt-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 6px;
    border: none;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s, transform .1s;
    flex-shrink: 0;
    background: #f1f5f9;
    color: #64748b;
}
.dt-action-btn:hover { opacity: .8; transform: scale(1.08); color: var(--primary); background: var(--primary-light); }

.dt-col-toggle { cursor: pointer; }
.dt-btn-csv    { background: #ecfdf5; color: #059669; }
.dt-btn-csv:hover { background: #d1fae5; color: #047857; }
.dt-btn-pdf    { background: #fef2f2; color: #dc2626; }
.dt-btn-pdf:hover { background: #fee2e2; color: #b91c1c; }
.dt-btn-delete { background: #fef2f2; color: #dc2626; }
.dt-btn-delete:hover { background: #fee2e2; color: #b91c1c; }

/* Column visibility dropdown */
.dt-col-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.10);
    padding: 8px 0;
    min-width: 160px;
    z-index: 500;
}
.dt-col-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s;
}
.dt-col-item:hover { background: var(--bg); }
.dt-col-item input[type="checkbox"] {
    width: 15px; height: 15px;
    border-radius: 3px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Search */
.dt-search-wrap { position: relative; display: flex; align-items: center; }
.dt-search-input {
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    padding: 0 32px 0 12px;
    width: 200px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.dt-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,158,221,.10);
}
.dt-search-input::placeholder { color: #adb5bd; }
.dt-search-icon {
    position: absolute;
    right: 10px;
    font-size: 13px;
    color: #adb5bd;
    pointer-events: none;
}

/* ── Table Header (light blue background) ────────────────────── */
.admin-table thead tr {
    background: #dbeafe;
}
.admin-table th {
    background: transparent;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #1d4ed8;
    padding: 11px 14px;
    border-bottom: 2px solid #bfdbfe;
    white-space: nowrap;
    user-select: none;
}

/* Checkbox column */
.admin-table th:first-child,
.admin-table td:first-child {
    width: 40px;
    text-align: center;
}

/* ── Pagination Bar ───────────────────────────────────────────── */
.dt-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.dt-pagination-info {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.dt-pagination-nav .pagination { margin: 0; gap: 2px; flex-wrap: nowrap; }

.dt-pagination .page-link {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    padding: 0 8px;
    background: #fff;
    transition: background .15s, color .15s, border-color .15s;
    text-decoration: none;
    line-height: 1;
}
.dt-pagination .page-link:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}
.dt-pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}
.dt-pagination .page-item.disabled .page-link {
    opacity: .4;
    pointer-events: none;
    background: #f8fafc;
}

/* Keep old admin-pagination working too */
.admin-pagination .page-link { min-width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px !important; border: 1px solid var(--border); color: var(--text-muted); font-size: 13px; padding: 0 8px; background: #fff; transition: background .15s, color .15s, border-color .15s; text-decoration: none; line-height: 1; }
.admin-pagination .page-link:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.admin-pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.admin-pagination .page-item.disabled .page-link { opacity: .4; pointer-events: none; }

@media (max-width: 768px) {
    .dt-toolbar { flex-direction: column; align-items: stretch; }
    .dt-toolbar-left, .dt-toolbar-right { width: 100%; }
    .dt-search-input { width: 100%; }
    .dt-pagination-bar { flex-direction: column; align-items: flex-start; }
}

/* ── Sidebar Search ──────────────────────────────────────────── */
.sidebar-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin: 10px 12px 4px;
    flex-shrink: 0;
}
.sidebar-search-icon {
    position: absolute;
    left: 10px;
    font-size: 12px;
    color: var(--sidebar-muted);
    pointer-events: none;
    z-index: 1;
}
.sidebar-search-input {
    width: 100%;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12.5px;
    padding: 0 30px 0 30px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.sidebar-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,158,221,.10);
    background: #fff;
}
.sidebar-search-input::placeholder { color: #b0bec5; }
.sidebar-search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--sidebar-muted);
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color .15s;
}
.sidebar-search-clear:hover { color: var(--text); }

/* Hide nav labels when they have no visible children */
.nav-label.dt-hidden { display: none; }
.nav-item.dt-hidden  { display: none !important; }


/* ══════════════════════════════════════════════════════════════
   ADMIN PANEL — DESIGN IMPROVEMENTS
   Better spacing, typography, cards, tabs, forms, mobile
   ══════════════════════════════════════════════════════════════ */

/* ── Improved Card Shadows & Spacing ─────────────────────────── */
.admin-card {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    border: 1px solid #edf0f5;
    transition: box-shadow .2s;
}
.admin-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
}

/* ── Page Header ─────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.page-header-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
}
.page-header-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Icon-only Add/Create Buttons ────────────────────────────── */
/* Any .btn-primary.btn-sm or .btn-icon-add that contains only an icon */
.btn-icon-add,
a.btn-icon-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff !important;
    border: none;
    font-size: 17px;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59,158,221,.25);
}
.btn-icon-add:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59,158,221,.35);
    color: #fff !important;
}
.btn-icon-add:active { transform: translateY(0); }

/* ── Improved Tab Styling — Modern Pill Tabs ─────────────────── */
.nav-tabs {
    border-bottom: none !important;
    background: transparent !important;
    border-radius: 50px !important;
    padding: 3px !important;
    gap: 2px !important;
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
    margin-bottom: 20px !important;
    align-items: center !important;
}
.nav-tabs .nav-item {
    margin-bottom: 0 !important;
    flex: 0 0 auto !important;
}
.nav-tabs .nav-link {
    border: none !important;
    border-radius: 50px !important;
    padding: 6px 16px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    background: transparent !important;
    margin: 0 !important;
    width: auto !important;
    transition: color .15s, background .15s, box-shadow .15s;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}
.nav-tabs .nav-link:hover {
    color: var(--primary) !important;
    background: rgba(255,255,255,.6) !important;
}
.nav-tabs .nav-link.active {
    color: #fff !important;
    background: var(--primary) !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(59,158,221,.3) !important;
}
.nav-tabs .nav-link i { font-size: 12px !important; }
.nav-tabs .nav-item { margin-bottom: 0 !important; }
.tab-content { margin-top: 0 !important; }

/* ── Improved Form Fields ────────────────────────────────────── */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    min-height: 40px;
    font-size: 13.5px;
    background: #fff;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    padding: 8px 12px;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,158,221,.12);
    outline: none;
    background: #fff;
}
.form-control::placeholder { color: #b0bec5; font-size: 13px; }
.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    letter-spacing: .01em;
}
.form-text {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Card Section Divider ────────────────────────────────────── */
.card-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 7px;
}
.card-section-title i { color: var(--primary); font-size: 14px; }

/* ── Improved Buttons ────────────────────────────────────────── */
.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: 9px;
    font-weight: 600;
    font-size: 13.5px;
    min-height: 40px;
    color: #fff !important;
    letter-spacing: .01em;
    transition: background .15s, box-shadow .15s, transform .1s;
    box-shadow: 0 2px 6px rgba(59,158,221,.2);
}
.btn-primary:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    box-shadow: 0 4px 12px rgba(59,158,221,.3);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline-secondary {
    border-radius: 9px;
    font-size: 13.5px;
    min-height: 40px;
    font-weight: 500;
}

/* Small buttons */
.btn-sm {
    min-height: 34px;
    font-size: 13px;
    padding: 5px 5px 5px 5px;
    border-radius: 8px;
}

/* ── Section Builder Row ─────────────────────────────────────── */
.bst-section-row {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}
.bst-section-row:hover {
    border-color: #c7d9ea !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.bst-section-row .bst-section-body {
    background: #fafbfc;
}

/* ── Table Improvements ──────────────────────────────────────── */
.admin-table {
    font-size: 13.5px;
}
.admin-table th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #4a6080;
    background: #f0f5fb;
    padding: 11px 16px;
    border-bottom: 2px solid #dce8f5;
    white-space: nowrap;
}
.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f4f8;
    vertical-align: middle;
    color: var(--text);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td {
    background: #f8fbff;
}

/* ── Mobile: Table Horizontal Scroll ─────────────────────────── */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0 0 12px 12px;
    }
    .admin-table th,
    .admin-table td {
        white-space: nowrap;
        font-size: 12.5px;
        padding: 10px 12px;
    }
    .page-header {
        margin-bottom: 16px;
    }
    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 12.5px;
    }
    .admin-card {
        padding: 14px;
        border-radius: 10px;
    }
    .form-control,
    .form-select {
        font-size: 13px;
        min-height: 38px;
    }
}

/* ── Sidebar Improvements ────────────────────────────────────── */
.admin-sidebar {
    box-shadow: 2px 0 12px rgba(0,0,0,.06);
}
.nav-item {
    font-size: 13px;
    border-radius: 8px;
    padding: 9px 16px;
    margin: 1px 8px;
    transition: background .15s, color .15s;
}
.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
    border-left: 3px solid var(--sidebar-active-border);
    border-radius: 0 8px 8px 0;
    margin-left: 0;
    padding-left: 21px;
}

/* ── Header Improvements ─────────────────────────────────────── */
.admin-header {
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

/* ── Select2 Multi-select Improvements ───────────────────────── */
.select2-container--default .select2-selection--multiple {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    min-height: 42px !important;
    padding: 4px 6px 2px !important;
    background: #fff !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    cursor: text !important;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59,158,221,.12) !important;
    outline: none !important;
}
/* The inner ul that holds tags */
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    width: 100% !important;
    list-style: none !important;
}
/* Each selected tag/choice */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    vertical-align: middle !important;
    background: var(--primary-light) !important;
    border: 1px solid #c5dff0 !important;
    color: var(--primary) !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 0 8px !important;
    margin: 2px 3px !important;
    height: 24px !important;
    line-height: 24px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}
/* Tag text label */
.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    display: inline-block !important;
    vertical-align: middle !important;
    color: var(--primary) !important;
    font-size: 12px !important;
    line-height: 24px !important;
    padding-left: 3px !important;
}
/* The × remove button */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    order: -1 !important;
    color: var(--primary) !important;
    background: transparent !important;
    border: none !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    margin: 0 8px 0 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    width: auto !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #dc2626 !important;
    background: transparent !important;
}
/* Extra safety: space after × via adjacent sibling */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove + .select2-selection__choice__display {
    padding-left: 2px !important;
    margin-left: 0 !important;
}
/* The search input inside multi-select */
.select2-container--default .select2-selection--multiple .select2-search--inline {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 !important;
    min-width: 60px !important;
}
.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field,
.select2-container--default .select2-selection--multiple .select2-search__field {
    margin: 0 !important;
    padding: 2px 4px !important;
    font-size: 13px !important;
    color: var(--text) !important;
    min-width: 60px !important;
    min-height: unset !important;
    height: 24px !important;
    max-height: 24px !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-block !important;
    width: auto !important;
}

/* ── Tooltip Improvements ────────────────────────────────────── */
.tooltip .tooltip-inner {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #1e293b;
}

/* ── Badge Improvements ──────────────────────────────────────── */
.badge-active, .badge-inactive, .badge-pending,
.badge-confirmed, .badge-completed, .badge-cancelled,
.badge-scheduled, .badge-paid, .badge-unpaid, .badge-failed {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .02em;
}

/* ── Stat Cards ──────────────────────────────────────────────── */
.stat-card {
    border-radius: 12px;
    border: 1px solid #edf0f5;
    box-shadow: 0 1px 4px rgba(0,0,0,.05), 0 4px 12px rgba(0,0,0,.04);
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,.10);
}

/* ── Filters Card ────────────────────────────────────────────── */
.filter-card {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 3rem;
    opacity: .2;
    display: block;
    margin-bottom: 12px;
}
.empty-state p { font-size: 14px; margin: 0; }

/* ── Action Buttons (table row) ──────────────────────────────── */
.btn-action {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 13px;
    transition: opacity .15s, transform .1s, box-shadow .1s;
}
.btn-action:hover {
    opacity: .9;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

/* ── Scrollbar Styling ───────────────────────────────────────── */
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Fix: Select2 search field must NOT inherit .form-control styles ── */
.select2-search__field {
    min-height: unset !important;
    height: auto !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
}
.select2-selection--multiple .select2-search__field {
    min-height: unset !important;
    height: 24px !important;
    max-height: 24px !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 4px !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* ── Section Builder Toolbar ─────────────────────────────────── */
#bstSectionTypeSelect {
    border-radius: 8px !important;
    border: 1.5px solid #e2e8f0 !important;
    font-size: 13px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    background: #fff !important;
    color: var(--text) !important;
    cursor: pointer !important;
}
#bstSectionTypeSelect:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59,158,221,.12) !important;
    outline: none !important;
}

/* ── Date Range Picker ────────────────────────────────────────── */
.drp-preset-active {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
}
.drp-day:hover {
    background: #f1f5f9 !important;
}

/* ── Filter bar Select2 (compact inline) ─────────────────────── */
.filter-select + .select2-container .select2-selection--single {
    height: 34px !important;
    padding: 0.25rem 2rem 0.25rem 0.6rem !important;
    font-size: 13px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    min-width: 110px !important;
}
.filter-select + .select2-container .select2-selection--single .select2-selection__rendered {
    font-size: 13px !important;
    line-height: 34px !important;
    color: #374151 !important;
    padding: 0 !important;
}
.filter-select + .select2-container .select2-selection--single .select2-selection__arrow {
    height: 32px !important;
    right: 6px !important;
}
.filter-select + .select2-container .select2-selection--single .select2-selection__clear {
    font-size: 16px !important;
    line-height: 32px !important;
    margin-right: 16px !important;
    color: #94a3b8 !important;
}

/* ── Filter bar: uniform 34px height, vertically centered ────── */
#filterForm .form-control,
#filterForm .form-select,
#filterForm .form-control-sm,
#filterForm .form-select-sm {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    line-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    font-size: 13px !important;
}

/* Select2 containers in filter bar */
#filterForm .select2-container .select2-selection--single {
    height: 34px !important;
    min-height: 34px !important;
    line-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    font-size: 13px !important;
}
#filterForm .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
}
#filterForm .select2-container .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
    top: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Date range trigger in filter bar */
#drpTrigger {
    height: 34px !important;
    min-height: 34px !important;
    line-height: 1 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    font-size: 13px !important;
}

/* Filter action buttons */
#filterForm .btn-action {
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
}

/* ── Select2 clear button (×) vertical alignment fix ─────────── */
.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    right: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: auto !important;
    line-height: 1 !important;
    font-size: 16px !important;
    color: #94a3b8 !important;
    font-weight: 400 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #ef4444 !important;
}
/* Make room for the × button */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-right: 36px !important;
}

/* ── Global focus ring — blue everywhere, no black outline ───── */
*:focus,
*:focus-visible {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px !important;
}

/* Form controls already have custom focus — keep their style */
.form-control:focus,
.form-select:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59,158,221,.12) !important;
}

/* Buttons — blue ring, no black */
.btn:focus,
.btn:focus-visible,
.btn-action:focus,
.btn-action:focus-visible,
.btn-icon-add:focus,
.btn-icon-add:focus-visible {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

/* Select2 focused container — use box-shadow only, no outline */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59,158,221,.15) !important;
}
/* The outer container should have no outline */
.select2-container:focus,
.select2-container--default:focus,
.select2-selection:focus,
.select2-selection--single:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Nav items, links */
a:focus-visible,
.nav-item:focus-visible {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
    border-radius: 4px !important;
}

/* Remove Firefox's dotted outline */
button::-moz-focus-inner { border: 0; }

/* ── Force Select2 search box always visible ─────────────────── */
.select2-container--default .select2-search--dropdown {
    display: block !important;
    padding: 6px 8px !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    width: 100% !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 5px 10px !important;
    font-size: 13px !important;
    outline: none !important;
    box-shadow: none !important;
    min-height: unset !important;
    height: 32px !important;
    background: #f8fafc !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px rgba(59,158,221,.12) !important;
}

/* ── Filter bar: all fields uniform 34px height ──────────────── */
.admin-filter-field,
.admin-filter-field.form-control,
.admin-filter-field.form-select {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 13px !important;
    line-height: 34px !important;
}
/* Select2 containers next to .admin-filter-field */
.admin-filter-field + .select2-container .select2-selection--single {
    height: 34px !important;
    min-height: 34px !important;
    line-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
}
.admin-filter-field + .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 34px !important;
    font-size: 13px !important;
}
.admin-filter-field + .select2-container .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
}

/* ── Filter bar Select2: respect data-width, don't stretch ───── */
#filterForm .select2-container,
.admin-card form .select2-container {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    min-width: 0 !important;
}
/* Override any width:100% that Select2 sets inline */
#filterForm .select2-container[style*="width"] {
    /* keep Select2's own inline width */
}
/* Force filter selects to not grow */
#filterForm .select2-container--default {
    max-width: 200px !important;
}

