/* ==========================================================
   E-Adumenara Staff Panel - Modern Blue/White/Black Theme
   Version 2.0 | 2026
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1a56db;
    --primary-dark: #1239a0;
    --primary-light: #e8f0fe;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #1a56db;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --topbar-bg: #ffffff;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --border-radius: 10px;
    --border-radius-sm: 6px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.08);
    --shadow-md: 0 10px 25px -3px rgba(0,0,0,0.1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 240px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ========================
   SIDEBAR
   ======================== */
.main-sidebar {
    background: var(--sidebar-bg) !important;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.main-navbar {
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

.main-navbar .navbar {
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.main-navbar .navbar-brand {
    padding: 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100% !important;
    text-decoration: none;
}

.main-navbar .navbar-brand img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
    filter: brightness(1.1);
}

.sidebar-brand-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.sidebar-brand-text small {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--sidebar-text);
    letter-spacing: 0.03em;
}

/* Sidebar Search */
.main-sidebar__search {
    padding: 0.75rem 1rem !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

.main-sidebar__search .form-control {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: var(--white) !important;
    font-size: 0.8rem;
    border-radius: var(--border-radius-sm);
    padding: 0.45rem 0.75rem;
}

.main-sidebar__search .form-control::placeholder { color: var(--sidebar-text); }
.main-sidebar__search .form-control:focus {
    background: rgba(255,255,255,0.1) !important;
    border-color: var(--primary) !important;
    box-shadow: none;
}

.main-sidebar__search .input-group-text {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-right: none !important;
    color: var(--sidebar-text);
    font-size: 0.8rem;
}

/* Sidebar Nav */
.nav-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
    /* Force scroll - height must be constrained by parent */
    min-height: 0;
    max-height: calc(100vh - 130px);
    padding-bottom: 2rem;
}

.nav-wrapper::-webkit-scrollbar { width: 3px; }
.nav-wrapper::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.nav-wrapper .nav {
    padding: 0 0.75rem;
    flex-direction: column;
    gap: 2px;
}

.nav-wrapper .nav-item { width: 100%; }

.nav-wrapper .nav-link {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem !important;
    color: var(--sidebar-text) !important;
    border-radius: var(--border-radius-sm);
    font-size: 0.825rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.nav-wrapper .nav-link:hover {
    background: rgba(255,255,255,0.07) !important;
    color: var(--white) !important;
}

.nav-wrapper .nav-link.active,
.nav-wrapper .nav-item.active > .nav-link {
    background: var(--primary) !important;
    color: var(--white) !important;
    box-shadow: 0 2px 8px rgba(26,86,219,0.4);
}

.nav-wrapper .nav-link i,
.nav-wrapper .nav-link .fas,
.nav-wrapper .nav-link .far,
.nav-wrapper .nav-link .fa {
    width: 18px;
    font-size: 0.875rem;
    flex-shrink: 0;
    text-align: center;
    opacity: 0.8;
}

.nav-wrapper .nav-link.active i { opacity: 1; }

/* Sidebar section headers */
.sidebar-section-header {
    padding: 1rem 1.6rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(148,163,184,0.5);
}

/* ========================
   TOPBAR
   ======================== */
.main-content > .header-navbar {
    background: var(--topbar-bg) !important;
    border-bottom: 1px solid var(--gray-200) !important;
    padding: 0 1.5rem !important;
    height: 60px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-navbar .navbar-brand {
    display: none;
}

.header-navbar .navbar-nav .nav-link {
    color: var(--gray-600) !important;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.header-navbar .navbar-nav .nav-link:hover {
    color: var(--primary) !important;
    background: var(--primary-light);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ========================
   MAIN CONTENT AREA
   ======================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    overflow-x: hidden;
}

.main-content-container-fluid,
.main-content > .container-fluid {
    padding: 1.75rem !important;
    flex: 1;
}

/* Staff page content - flex:1 supaya footer kekal bawah */
.staff-page-content {
    padding: 1.75rem;
    flex: 1;
}

/* Page Title */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 1rem;
}

.page-header h3,
.page-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-header .btn { margin: 0; }

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
}

.breadcrumb-item { color: var(--gray-500); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--gray-300); }
.breadcrumb-item.active { color: var(--gray-700); font-weight: 500; }
.breadcrumb-item a { color: var(--gray-500); }
.breadcrumb-item a:hover { color: var(--primary); }

/* ========================
   CARDS
   ======================== */
.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    background: var(--white);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.card:hover { box-shadow: var(--shadow); }

.card-header {
    background: var(--white) !important;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.1rem 1.5rem;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body { padding: 1.5rem; }

.card-header-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: var(--white) !important;
    border-bottom: none !important;
}

/* Stats cards */
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    opacity: 0.06;
    transform: translate(20px, -20px);
}

.stat-card.blue::after { background: var(--primary); }
.stat-card.green::after { background: var(--success); }
.stat-card.orange::after { background: var(--warning); }
.stat-card.red::after { background: var(--danger); }

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

.stat-card .stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.stat-card.blue .stat-icon  { background: var(--primary-light); color: var(--primary); }
.stat-card.green .stat-icon { background: #d1fae5; color: #059669; }
.stat-card.orange .stat-icon{ background: #fef3c7; color: #d97706; }
.stat-card.red .stat-icon   { background: #fee2e2; color: #dc2626; }

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .stat-change {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }

/* ========================
   TABLE
   ======================== */
.table {
    font-size: 0.85rem;
    color: var(--gray-700);
}

.table thead th {
    background: var(--gray-50);
    border-top: none;
    border-bottom: 2px solid var(--gray-200);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gray-500);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table tbody tr:hover td { background: var(--gray-50); }
.table-hover tbody tr:hover { cursor: pointer; }

/* ========================
   BADGES / STATUS
   ======================== */
.badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 50px;
    letter-spacing: 0.03em;
}

.badge-open     { background: #dbeafe !important; color: #1d4ed8 !important; }
.badge-answered { background: #d1fae5 !important; color: #065f46 !important; }
.badge-closed   { background: #f1f5f9 !important; color: var(--gray-500) !important; }
.badge-pending  { background: #fef3c7 !important; color: #92400e !important; }
.badge-primary  { background: var(--primary) !important; color: var(--white) !important; }
.badge-success  { background: #d1fae5 !important; color: #065f46 !important; }
.badge-danger   { background: #fee2e2 !important; color: #991b1b !important; }
.badge-warning  { background: #fef3c7 !important; color: #92400e !important; }
.badge-secondary{ background: var(--gray-200) !important; color: var(--gray-600) !important; }

/* ========================
   BUTTONS
   ======================== */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.825rem;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.1rem;
    transition: var(--transition);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(26,86,219,0.3);
    color: var(--white);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
}

.btn-icon {
    width: 32px; height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
}

/* ========================
   FORMS
   ======================== */
.form-control {
    font-family: 'Inter', sans-serif;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 0.55rem 0.9rem;
    font-size: 0.875rem;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
    outline: none;
}

.form-control:disabled, .form-control[readonly] {
    background: var(--gray-50);
    color: var(--gray-500);
}

label {
    font-weight: 500;
    font-size: 0.825rem;
    color: var(--gray-700);
    margin-bottom: 0.35rem;
}

.form-group { margin-bottom: 1.25rem; }

/* ========================
   TICKET VIEW
   ======================== */
.ticket-header-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.ticket-header-card h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.ticket-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
}

.ticket-meta-item i { font-size: 0.75rem; }

/* Messages */
.ticket-message {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.ticket-message.staff-reply {
    border-left: 3px solid var(--primary);
    background: var(--gray-50);
}

.ticket-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

.ticket-sender {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.sender-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.sender-avatar.staff {
    background: var(--primary);
    color: var(--white);
}

.sender-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.sender-role {
    font-size: 0.72rem;
    color: var(--gray-500);
}

.message-time {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.message-content {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.7;
}

.message-content p { margin-bottom: 0.75rem; }
.message-content p:last-child { margin-bottom: 0; }

/* Reply box */
.reply-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
}

.reply-card h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================
   SIDEBAR INFO CARD
   ======================== */
.ticket-info-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.ticket-info-card h6 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.8rem;
}

.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: var(--gray-500); font-weight: 500; flex-shrink: 0; margin-right: 0.5rem; }
.info-row .info-value { color: var(--gray-800); font-weight: 500; text-align: right; }

/* ========================
   ALERTS
   ======================== */
.alert {
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    padding: 0.9rem 1.1rem;
}

.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.alert-danger  { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.alert-info    { background: var(--primary-light); color: #1e40af; border-left: 4px solid var(--primary); }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--warning); }

/* ========================
   SWEETALERT OVERRIDE
   ======================== */
.swal2-popup {
    border-radius: var(--border-radius-lg) !important;
    font-family: 'Inter', sans-serif !important;
}

.swal2-confirm {
    background: var(--primary) !important;
    border-radius: var(--border-radius-sm) !important;
}

/* ========================
   MISC
   ======================== */
/* ======================== SIDEBAR SUBMENU ======================== */
.nav-link-toggle {
    justify-content: flex-start !important;
}

.nav-chevron {
    font-size: 0.65rem !important;
    margin-left: auto !important;
    transition: transform 0.2s var(--ease) !important;
    opacity: 0.5;
    flex-shrink: 0;
}

.nav-link-toggle[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
}

/* Submenu */
.nav-submenu {
    padding: 0.25rem 0 0.25rem 1.5rem !important;
    margin: 0 !important;
    list-style: none;
}

.nav-submenu .nav-link {
    font-size: 0.78rem !important;
    padding: 0.45rem 0.75rem !important;
    color: rgba(148,163,184,0.7) !important;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-submenu .nav-link i {
    width: 14px !important;
    font-size: 0.75rem !important;
    opacity: 0.7;
}

.nav-submenu .nav-link:hover {
    color: rgba(255,255,255,0.85) !important;
    background: rgba(255,255,255,0.06) !important;
}

.nav-submenu .nav-link.active {
    color: #fff !important;
    background: rgba(37,99,235,0.3) !important;
    font-weight: 600;
}

/* Submenu connector line */
.nav-submenu::before {
    content: '';
    position: absolute;
    left: 2.15rem;
    top: 0; bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.07);
}

.nav-submenu {
    position: relative;
}

.text-truncate-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

a { color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); text-decoration: none; }

hr { border-color: var(--gray-200); }

.dropdown-menu {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    font-size: 0.875rem;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0.85rem;
    color: var(--gray-700);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 992px) {
    .main-sidebar {
        transform: translateX(-100%);
        z-index: 200;
    }

    .main-sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .main-content > .container-fluid { padding: 1rem !important; }
    .stat-card { padding: 1.1rem; }
    .stat-card .stat-number { font-size: 1.5rem; }
}

/* ========================
   SHARDS THEME COMPATIBILITY
   (Legacy views use these classes)
   ======================== */

/* Fix page-header col shrink - legacy uses col-sm-4 in page-header */
.page-header .col-sm-4,
.page-header .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    text-align: left !important;
}
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    padding: 0;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-header .page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-header .page-subtitle {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    display: block;
    margin-bottom: 0.2rem;
}

/* no-gutters compat */
.row.no-gutters {
    margin-right: 0;
    margin-left: 0;
}

.row.no-gutters > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

/* custom-select compat */
.custom-select {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 8px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    appearance: none;
    -webkit-appearance: none;
    transition: var(--transition);
}

.custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
    outline: 0;
}

/* custom-control compat */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
}

.custom-control-input {
    position: absolute;
    left: 0;
    z-index: -1;
    width: 1rem;
    height: 1.25rem;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
    font-size: 0.875rem;
    color: var(--gray-700);
    cursor: pointer;
}

.custom-control-label::before {
    position: absolute;
    top: 0.125rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: 1.5px solid var(--gray-300);
    border-radius: 0.25rem;
    transition: var(--transition);
}

.custom-control-label::after {
    position: absolute;
    top: 0.125rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50%/50% 50%;
}

.custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: var(--primary);
    background-color: var(--primary);
}

.custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e");
}

.custom-radio .custom-control-label::before {
    border-radius: 50%;
}

.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* input-group compat additions */
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-700);
    text-align: center;
    white-space: nowrap;
    background-color: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
}

/* text-uppercase compat */
.text-uppercase { text-transform: uppercase !important; }
.f-w-400 { font-weight: 400 !important; }

/* Tinymce editor full width */
.tox-tinymce { border-radius: var(--border-radius) !important; }

