/* =============================================================================
   Prep Clash — Admin Design System
   Loaded LAST in every layout. Overrides the Frest template without editing it.
   Sections:
     1. Tokens            7. Buttons & badges      13. Footer & loader
     2. Base              8. Forms & select2       14. Dashboard components
     3. Header            9. Tables & DataTables   15. Login page
     4. Sidebar          10. Modals & alerts       16. Responsive
     5. Page header      11. Toastr / SweetAlert
     6. Cards            12. Misc utilities
============================================================================= */

@import url('../../fonts/inter.css');

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    --pc-primary: #4f6bed;
    --pc-primary-600: #3f58d8;
    --pc-primary-700: #3347b8;
    --pc-primary-50: #eef1fe;
    --pc-primary-100: #dfe5fd;
    --pc-navy: #141a3c;
    --pc-navy-2: #1c2350;
    --pc-success: #16a34a;
    --pc-success-50: #e8f7ee;
    --pc-warning: #d97706;
    --pc-warning-50: #fdf3e2;
    --pc-danger: #dc2626;
    --pc-danger-50: #fdecec;
    --pc-info: #0891b2;
    --pc-info-50: #e4f6fa;
    --pc-bg: #f4f6fb;
    --pc-surface: #ffffff;
    --pc-border: #e5e8f0;
    --pc-border-strong: #d5dae6;
    --pc-text: #1b2440;
    --pc-text-2: #4a5574;
    --pc-muted: #7b85a1;
    --pc-radius: 12px;
    --pc-radius-sm: 8px;
    --pc-shadow-sm: 0 1px 2px rgba(20, 26, 60, .06);
    --pc-shadow: 0 1px 3px rgba(20, 26, 60, .06), 0 6px 16px rgba(20, 26, 60, .05);
    --pc-shadow-lg: 0 12px 40px rgba(20, 26, 60, .16);
    --pc-font: 'Inter', 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --pc-ring: 0 0 0 3px rgba(79, 107, 237, .18);
}

/* 2. Base ------------------------------------------------------------------ */
html body,
html body.pc-app {
    font-family: var(--pc-font);
    background-color: var(--pc-bg) !important;
    color: var(--pc-text-2);
    font-size: 0.9rem;
    -webkit-font-smoothing: antialiased;
}

body h1, body h2, body h3, body h4, body h5, body h6,
body .h1, body .h2, body .h3, body .h4, body .h5, body .h6 {
    font-family: var(--pc-font);
    color: var(--pc-text);
    letter-spacing: -0.01em;
}

body a { color: var(--pc-primary); }
body a:hover { color: var(--pc-primary-700); }

body ::selection { background: var(--pc-primary-100); }

body .text-primary { color: var(--pc-primary) !important; }
body .bg-primary { background-color: var(--pc-primary) !important; }
body .border-primary { border-color: var(--pc-primary) !important; }
body .text-muted { color: var(--pc-muted) !important; }

/* thin scrollbars */
body *::-webkit-scrollbar { width: 8px; height: 8px; }
body *::-webkit-scrollbar-thumb { background: #c9cfdd; border-radius: 8px; }
body *::-webkit-scrollbar-thumb:hover { background: #aab2c6; }
body *::-webkit-scrollbar-track { background: transparent; }

/* 3. Header ---------------------------------------------------------------- */
body.pc-app .header-navbar-shadow { display: none !important; }

body.pc-app .header-navbar.navbar {
    background: rgba(255, 255, 255, .92) !important;
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    box-shadow: var(--pc-shadow-sm) !important;
    min-height: 62px;
}

body.pc-app .header-navbar .navbar-container { padding-left: 1rem; padding-right: 1rem; }

body.pc-app .header-navbar .navbar-container ul.nav li a.nav-link {
    color: var(--pc-text-2);
    padding: 0.55rem 0.6rem;
}

body.pc-app .header-navbar .ficon { font-size: 1.35rem; color: var(--pc-text-2); }

body.pc-app .header-navbar .pc-icon-btn {
    width: 38px; height: 38px;
    display: inline-flex !important; align-items: center; justify-content: center;
    border-radius: 10px;
    padding: 0 !important;
    margin: 0 2px;
    transition: background .15s ease;
}
body.pc-app .header-navbar .pc-icon-btn:hover { background: var(--pc-primary-50); }
body.pc-app .header-navbar .pc-icon-btn:hover .ficon { color: var(--pc-primary); }

body.pc-app .header-navbar .badge-up {
    top: 4px; right: 2px;
    min-width: 18px; height: 18px; font-size: 10px; line-height: 18px; padding: 0 5px;
}

/* page title shown in header */
.pc-header-title {
    display: flex; flex-direction: column; justify-content: center;
    margin-left: .25rem; line-height: 1.15;
}
.pc-header-title .pc-ht-label { font-size: .72rem; color: var(--pc-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.pc-header-title .pc-ht-name { font-size: 1rem; color: var(--pc-text); font-weight: 600; }

/* session chip */
.pc-session-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 12px;
    border-radius: 799.2px;
    background: var(--pc-primary-50);
    color: var(--pc-primary-700);
    font-size: .8rem; font-weight: 600;
    white-space: nowrap;
    margin-right: .5rem;
    transition: background .2s ease, color .2s ease;
}
.pc-session-chip i { font-size: 1rem; }
.pc-session-chip.is-warning { background: var(--pc-warning-50); color: var(--pc-warning); }
.pc-session-chip.is-danger { background: var(--pc-danger-50); color: var(--pc-danger); }

/* menu search */
.pc-search { position: relative; margin-right: .5rem; }
.pc-search .pc-search-box {
    display: flex; align-items: center; gap: 8px;
    height: 38px; width: 260px; padding: 0 12px;
    border: 1px solid var(--pc-border); border-radius: 10px;
    background: var(--pc-bg);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pc-search .pc-search-box:focus-within { border-color: var(--pc-primary); box-shadow: var(--pc-ring); background: #fff; }
.pc-search .pc-search-box i { color: var(--pc-muted); font-size: 1.1rem; }
.pc-search input {
    border: 0; outline: 0; background: transparent; width: 100%;
    font-size: .875rem; color: var(--pc-text);
}
.pc-search kbd {
    background: #fff; border: 1px solid var(--pc-border); color: var(--pc-muted);
    box-shadow: none; font-size: .7rem; padding: 1px 6px; border-radius: 5px; font-family: var(--pc-font);
}
.pc-search-results {
    display: none;
    position: absolute; top: 46px; right: 0; width: 320px; max-height: 360px; overflow-y: auto;
    background: #fff; border: 1px solid var(--pc-border); border-radius: var(--pc-radius);
    box-shadow: var(--pc-shadow-lg); padding: 6px; z-index: 1050; list-style: none; margin: 0;
}
.pc-search-results.show { display: block; }
.pc-search-results li a {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 10px; border-radius: 8px; color: var(--pc-text); font-size: .875rem;
}
.pc-search-results li a small { color: var(--pc-muted); font-size: .72rem; }
.pc-search-results li a:hover, .pc-search-results li a.is-active { background: var(--pc-primary-50); color: var(--pc-primary-700); }
.pc-search-results .pc-empty { padding: 14px 10px; color: var(--pc-muted); font-size: .85rem; text-align: center; }

/* user */
body.pc-app .header-navbar .dropdown-user-link { display: flex !important; align-items: center; gap: 10px; padding: 4px 6px 4px 10px !important; border-radius: 10px; }
body.pc-app .header-navbar .dropdown-user-link:hover { background: var(--pc-bg); }
body.pc-app .header-navbar .dropdown-user-link::after { display: none; }
body.pc-app .header-navbar .user-nav { flex-direction: column; align-items: flex-end; margin-right: 0 !important; }
body.pc-app .header-navbar .user-nav .user-name { color: var(--pc-text); font-weight: 600; font-size: .875rem; margin-bottom: 0; }
body.pc-app .header-navbar .user-nav .user-status { font-size: .72rem; color: var(--pc-muted) !important; }

.pc-avatar {
    width: 38px; height: 38px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--pc-primary), #7c5cf0);
    color: #fff; font-weight: 600; font-size: .9rem; letter-spacing: .02em;
    flex-shrink: 0;
}
.pc-avatar.pc-avatar-lg { width: 48px; height: 48px; font-size: 1.05rem; border-radius: 12px; }

body.pc-app .dropdown-menu {
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    box-shadow: var(--pc-shadow-lg);
    padding: 6px;
}
body.pc-app .dropdown-menu .dropdown-item {
    border-radius: 8px; padding: 9px 12px; color: var(--pc-text-2); font-size: .875rem;
    display: flex; align-items: center; gap: 10px;
}
body.pc-app .dropdown-menu .dropdown-item i { font-size: 1.1rem; margin: 0 !important; }
body.pc-app .dropdown-menu .dropdown-item:hover { background: var(--pc-primary-50); color: var(--pc-primary-700); }
body.pc-app .dropdown-menu .dropdown-item.pc-danger:hover { background: var(--pc-danger-50); color: var(--pc-danger); }
.pc-user-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; border-bottom: 1px solid var(--pc-border); margin-bottom: 6px; min-width: 230px; }
.pc-user-card strong { display: block; color: var(--pc-text); font-size: .9rem; }
.pc-user-card span { color: var(--pc-muted); font-size: .75rem; }

body.pc-app .dropdown-notification .dropdown-menu { width: 320px; padding: 0; overflow: hidden; }
.pc-notify-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--pc-border); }
.pc-notify-head strong { color: var(--pc-text); }
.pc-notify-empty { padding: 28px 16px; text-align: center; color: var(--pc-muted); }
.pc-notify-empty i { font-size: 2rem; color: var(--pc-border-strong); display: block; margin-bottom: 6px; }

/* 4. Sidebar --------------------------------------------------------------- */
body.pc-app .main-menu,
body.pc-app.semi-dark-layout .main-menu,
body.pc-app .main-menu.menu-dark,
body.pc-app .main-menu.menu-dark .navigation {
    background: var(--pc-navy) !important;
}
body.pc-app .main-menu {
    background-image: linear-gradient(180deg, var(--pc-navy-2) 0%, var(--pc-navy) 55%) !important;
    border-right: 0 !important;
    box-shadow: 4px 0 24px rgba(20, 26, 60, .08) !important;
}
body.pc-app .main-menu .shadow-bottom { display: none !important; }

body.pc-app .main-menu .navbar-header { height: 72px; padding: 0 1rem 0 1.25rem; }
body.pc-app .main-menu .navbar-header .navbar-brand { display: flex; align-items: center; gap: 10px; margin-top: 1.1rem; }
.pc-brand-logo {
    width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .12);
}
body.pc-app .main-menu .navbar-header .navbar-brand .brand-text {
    color: #fff !important; font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; padding-left: 0;
}
body.pc-app .main-menu .navbar-header .brand-text small { display: block; font-size: .65rem; font-weight: 500; color: #8f9bc4; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
body.pc-app .main-menu .navbar-header .modern-nav-toggle { margin-top: 1.35rem; }
body.pc-app .main-menu .navbar-header .modern-nav-toggle i { color: #8f9bc4 !important; }

body.pc-app .main-menu .main-menu-content { padding-bottom: 1.5rem; }
body.pc-app .main-menu .navigation { font-family: var(--pc-font); padding-top: .5rem; }

body.pc-app .main-menu.menu-dark .navigation .navigation-header {
    color: #6b77a3 !important;
    font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    margin: 1.4rem 1.6rem .5rem;
}

body.pc-app .main-menu.menu-dark .navigation > li { margin: 2px .85rem; border: 0 !important; background: transparent !important; border-radius: 10px; }

body.pc-app .main-menu.menu-dark .navigation li a,
body.pc-app .main-menu.menu-dark .navigation > li.nav-item.open > a,
body.pc-app .main-menu.menu-dark .navigation > li.nav-item.sidebar-group-active > a,
body.pc-app .main-menu.menu-dark .navigation > li.nav-item:not(.has-sub) a,
body.pc-app .main-menu.menu-dark .navigation > li.open.sidebar-group-active > a {
    color: #b4bdd9 !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    border-radius: 10px;
    font-size: .875rem; font-weight: 500;
    transition: background .15s ease, color .15s ease !important;
}

body.pc-app .main-menu.menu-dark .navigation > li > a i,
body.pc-app.semi-dark-layout .main-menu-content .navigation-main .nav-item > a > i {
    color: #8f9bc4 !important;
    font-size: 1.3rem;
    margin-right: 12px;
    width: 22px; text-align: center; float: none;
}

body.pc-app .main-menu .navigation .menu-title,
body.pc-app.semi-dark-layout .main-menu-content .navigation-main .active .menu-title { color: inherit !important; }

body.pc-app .main-menu.menu-dark .navigation > li > a:hover { background: rgba(255, 255, 255, .06) !important; color: #fff !important; }
body.pc-app .main-menu.menu-dark .navigation > li > a:hover i { color: #fff !important; }

/* open group */
body.pc-app .main-menu.menu-dark .navigation > li.has-sub.open,
body.pc-app .main-menu.menu-dark .navigation > li.has-sub.sidebar-group-active,
body.pc-app.semi-dark-layout .main-menu-content .navigation-main .sidebar-group-active {
    background: rgba(255, 255, 255, .04) !important;
    border: 0 !important;
}
body.pc-app .main-menu.menu-dark .navigation > li.open > a,
body.pc-app .main-menu.menu-dark .navigation > li.sidebar-group-active > a { color: #fff !important; }
body.pc-app .main-menu.menu-dark .navigation > li.open > a i,
body.pc-app .main-menu.menu-dark .navigation > li.sidebar-group-active > a i { color: #8ea2ff !important; }
body.pc-app .main-menu.menu-dark .navigation > li.has-sub > a:not(.mm-next):after { color: #6b77a3 !important; right: 12px !important; }

/* active single item */
body.pc-app .main-menu.menu-dark .navigation > li.active:not(.sidebar-group-active) > a {
    background: var(--pc-primary) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(79, 107, 237, .35);
}
body.pc-app .main-menu.menu-dark .navigation > li.active:not(.sidebar-group-active) > a i { color: #fff !important; }

/* sub items */
body.pc-app .main-menu.menu-dark .navigation > li > ul { padding: 2px 0 8px !important; margin: 0 !important; }
body.pc-app .main-menu.menu-dark .navigation > li > ul > li:first-child > a { border-top: 0 !important; }
body.pc-app .main-menu.menu-dark .navigation > li ul li > a,
body.pc-app .main-menu.menu-dark .navigation > li.nav-item.open .menu-content li a,
body.pc-app .main-menu.menu-dark .navigation > li.nav-item.sidebar-group-active .menu-content li a {
    padding: 8px 12px 8px 46px !important;
    margin: 1px 6px !important;
    font-size: .84rem; font-weight: 500;
    color: #9aa5c9 !important;
    position: relative;
}
body.pc-app .main-menu.menu-dark .navigation > li ul li > a:hover { padding-left: 46px !important; background: rgba(255, 255, 255, .05) !important; color: #fff !important; }
body.pc-app .main-menu.menu-dark .navigation > li ul li > a i { display: none !important; }
body.pc-app .main-menu.menu-dark .navigation > li ul li > a::before {
    content: ''; position: absolute; left: 22px; top: 50%;
    width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
    background: #4b5583; transition: background .15s ease, box-shadow .15s ease;
}
body.pc-app .main-menu.menu-dark .navigation > li ul li > a:hover::before { background: #b4bdd9; }
body.pc-app .main-menu.menu-dark .navigation > li ul .active,
body.pc-app.semi-dark-layout .main-menu-content .navigation-main .sidebar-group-active .menu-content .active { background: transparent !important; }
body.pc-app .main-menu.menu-dark .navigation > li ul .active > a,
body.pc-app.semi-dark-layout .main-menu-content .navigation-main .nav-item .menu-content .active .menu-item {
    color: #fff !important; background: rgba(79, 107, 237, .28) !important;
}
body.pc-app .main-menu.menu-dark .navigation > li ul .active > a::before { background: #8ea2ff; box-shadow: 0 0 0 3px rgba(142, 162, 255, .25); }

/* collapsed sidebar: centre icons */
body.pc-app.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navigation > li > a { justify-content: center; }
body.pc-app.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navigation > li > a i { margin-right: 0 !important; }
body.pc-app.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navigation > li { margin: 2px .6rem; }
body.pc-app.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navigation .navigation-header { margin: 1rem 0 .3rem; text-align: center; }
body.pc-app.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navigation .navigation-header span { display: none; }
body.pc-app.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navigation .navigation-header::after {
    content: ''; display: block; width: 18px; height: 2px; margin: 0 auto; background: #2f3767; border-radius: 2px;
}
body.pc-app.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navbar-header { padding: 0 .9rem; }

/* 5. Page header (title + breadcrumb used on every page) ------------------- */
body.pc-app .content-header { margin-bottom: .25rem; }
body.pc-app .content-header .content-header-left { margin-top: .25rem !important; margin-bottom: 1.25rem !important; }
body.pc-app .content-header .breadcrumbs-top { display: flex; align-items: center; flex-wrap: wrap; min-height: 38px; }
body.pc-app .content-header-title,
body.pc-app .content-header .content-header-title {
    font-size: 1.35rem !important; font-weight: 700 !important; color: var(--pc-text) !important;
    border-right: 1px solid var(--pc-border-strong) !important;
    padding-right: 1rem !important; margin-right: .25rem !important;
    letter-spacing: -0.015em;
}
body.pc-app .breadcrumb { background: transparent; font-size: .82rem; font-weight: 500; }
body.pc-app .breadcrumb .breadcrumb-item a { color: var(--pc-muted); }
body.pc-app .breadcrumb .breadcrumb-item a:hover { color: var(--pc-primary); }
body.pc-app .breadcrumb .breadcrumb-item a i { font-size: 1.05rem; vertical-align: -2px; }
body.pc-app .breadcrumb .breadcrumb-item.active { color: var(--pc-text-2); }
body.pc-app .breadcrumb .breadcrumb-item.active:empty { display: none; }
body.pc-app .breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: '\203A'; color: var(--pc-border-strong); font-size: 1.1rem; line-height: 1; padding-right: .5rem; }

/* 6. Cards ----------------------------------------------------------------- */
body .card {
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    box-shadow: var(--pc-shadow-sm);
    margin-bottom: 1.5rem;
}
body .card .card-header { background: transparent; border-bottom: 0; padding: 1.25rem 1.5rem .5rem; }
body .card .card-header:empty { display: none; }
body .card .card-title { font-weight: 600; color: var(--pc-text); font-size: 1.05rem; }
body .card .card-body { padding: 1.5rem; }
body .card .card-footer { background: #fafbfd; border-top: 1px solid var(--pc-border); border-radius: 0 0 var(--pc-radius) var(--pc-radius); }

/* 7. Buttons & badges ------------------------------------------------------ */
body .btn {
    font-family: var(--pc-font);
    font-weight: 600; font-size: .875rem;
    border-radius: var(--pc-radius-sm);
    padding: .55rem 1.1rem;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
body .btn:active { transform: translateY(1px); }
body .btn:focus, body .btn.focus { box-shadow: var(--pc-ring) !important; }
body .btn-sm { padding: .4rem .85rem; font-size: .8rem; border-radius: 7px; }
body .btn-lg { padding: .75rem 1.4rem; font-size: 1rem; }

body .btn-primary,
body .btn-primary:not(:disabled):not(.disabled) {
    background-color: var(--pc-primary) !important; border-color: var(--pc-primary) !important; color: #fff !important;
    box-shadow: 0 1px 2px rgba(20, 26, 60, .12), inset 0 1px 0 rgba(255, 255, 255, .12);
}
body .btn-primary:hover, body .btn-primary:not(:disabled):not(.disabled):hover,
body .btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--pc-primary-600) !important; border-color: var(--pc-primary-600) !important;
    box-shadow: 0 4px 12px rgba(79, 107, 237, .3);
}
body .btn-primary.glow { box-shadow: 0 4px 12px rgba(79, 107, 237, .3) !important; }
body .btn-outline-primary { color: var(--pc-primary) !important; border-color: var(--pc-primary) !important; background: transparent !important; }
body .btn-outline-primary:hover { background: var(--pc-primary-50) !important; }
body .btn-light-primary { background: var(--pc-primary-50) !important; color: var(--pc-primary-700) !important; border-color: transparent !important; }
body .btn-success { background-color: var(--pc-success) !important; border-color: var(--pc-success) !important; }
body .btn-danger { background-color: var(--pc-danger) !important; border-color: var(--pc-danger) !important; }
body .btn-light-secondary, body .btn-secondary {
    background: #fff !important; color: var(--pc-text-2) !important; border: 1px solid var(--pc-border-strong) !important;
}
body .btn-light-secondary:hover, body .btn-secondary:hover { background: var(--pc-bg) !important; }

body .badge { font-weight: 600; font-size: .72rem; padding: .35em .7em; border-radius: 6px; letter-spacing: .01em; }
body .badge-pill { border-radius: 799.2px; }
body .badge-light-success { background: var(--pc-success-50) !important; color: var(--pc-success) !important; }
body .badge-light-danger { background: var(--pc-danger-50) !important; color: var(--pc-danger) !important; }
body .badge-light-warning { background: var(--pc-warning-50) !important; color: var(--pc-warning) !important; }
body .badge-light-info { background: var(--pc-info-50) !important; color: var(--pc-info) !important; }
body .badge-light-primary { background: var(--pc-primary-50) !important; color: var(--pc-primary-700) !important; }
body .badge-light-success::before, body .badge-light-danger::before, body .badge-light-warning::before {
    content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px;
}
body .badge-primary { background: var(--pc-primary) !important; }

/* 8. Forms ----------------------------------------------------------------- */
body label, body .form-group label {
    font-size: .8rem; font-weight: 600; color: var(--pc-text-2);
    text-transform: none; letter-spacing: 0; margin-bottom: .4rem;
}
body .form-control,
body .custom-select,
body .custom-file-label {
    font-family: var(--pc-font);
    border: 1px solid var(--pc-border-strong);
    border-radius: var(--pc-radius-sm);
    color: var(--pc-text);
    font-size: .875rem;
    min-height: 40px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body textarea.form-control { min-height: 90px; }
body .form-control::placeholder { color: #a3abc2; }
body .form-control:focus,
body .custom-select:focus,
body .custom-file-input:focus ~ .custom-file-label {
    border-color: var(--pc-primary) !important;
    box-shadow: var(--pc-ring) !important;
}
body .form-control:disabled, body .form-control[readonly] { background: #f6f7fb; }
body .custom-file-label { line-height: 1.9; }
body .custom-file-label::after { background: var(--pc-bg); color: var(--pc-text-2); font-weight: 600; border-left: 1px solid var(--pc-border-strong); height: 100%; line-height: 1.9; }
body .input-group-text { background: var(--pc-bg); border-color: var(--pc-border-strong); color: var(--pc-muted); }
body .custom-control-input:checked ~ .custom-control-label::before,
body .custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--pc-primary) !important; border-color: var(--pc-primary) !important;
}
body .error, body span.error, body label.error { color: var(--pc-danger) !important; font-size: .76rem; font-weight: 500; margin-top: 4px; }
body .form-control.error { border-color: var(--pc-danger) !important; }

/* select2 */
body .select2-container--default .select2-selection--single,
body .select2-container--default .select2-selection--multiple {
    border: 1px solid var(--pc-border-strong) !important;
    border-radius: var(--pc-radius-sm) !important;
    min-height: 40px;
}
body .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 38px; color: var(--pc-text); padding-left: 12px; }
body .select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; }
body .select2-container--default.select2-container--focus .select2-selection--multiple,
body .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--pc-primary) !important; box-shadow: var(--pc-ring); }
body .select2-dropdown { border: 1px solid var(--pc-border) !important; border-radius: var(--pc-radius-sm) !important; box-shadow: var(--pc-shadow-lg); overflow: hidden; }
body .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--pc-primary) !important; }
body .select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--pc-primary-50) !important; color: var(--pc-primary-700) !important; border: 0 !important; border-radius: 6px; }

/* 9. Tables & DataTables --------------------------------------------------- */
body .table { color: var(--pc-text-2); font-size: .86rem; }
body .table thead th,
body .table tfoot th {
    background: #f7f8fc;
    color: var(--pc-muted);
    font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    border-top: 0 !important;
    border-bottom: 1px solid var(--pc-border) !important;
    padding: .85rem 1rem;
    vertical-align: middle; white-space: nowrap;
}
body .table tfoot th { border-top: 1px solid var(--pc-border) !important; border-bottom: 0 !important; }
body .table td { padding: .8rem 1rem; border-top: 1px solid #eef0f5 !important; vertical-align: middle; }
body .table-striped tbody tr:nth-of-type(odd) { background-color: #fbfbfe; }
body .table-hover tbody tr:hover,
body .table tbody tr:hover { background-color: var(--pc-primary-50) !important; }
body .table td a i.bx, body .table td > i.bx { font-size: 1.15rem; }
body .table td a:has(> i.bx) {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px; color: var(--pc-text-2); transition: background .15s ease, color .15s ease;
}
body .table td a:has(> i.bx):hover { background: #fff; color: var(--pc-primary); box-shadow: var(--pc-shadow-sm); }
body .table td a:has(> i.bx-trash-alt):hover, body .table td a:has(> i.bx-trash):hover { color: var(--pc-danger); }
body .table-responsive { border-radius: var(--pc-radius-sm); }

body .dataTables_wrapper { font-size: .85rem; }
body .dataTables_wrapper .dataTables_filter input,
body .dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--pc-border-strong) !important;
    border-radius: var(--pc-radius-sm) !important;
    min-height: 36px; padding: 0 10px; margin-left: .5rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body .dataTables_wrapper .dataTables_filter input { min-width: 220px; }
body .dataTables_wrapper .dataTables_filter input:focus { border-color: var(--pc-primary) !important; box-shadow: var(--pc-ring); outline: 0; }
body .dataTables_wrapper .dataTables_filter label,
body .dataTables_wrapper .dataTables_length label { font-weight: 500; color: var(--pc-muted); font-size: .82rem; }
body .dataTables_wrapper .dataTables_info { color: var(--pc-muted); font-size: .8rem; padding-top: 1.1rem !important; }
body .dataTables_wrapper .dt-buttons { margin-bottom: .75rem; }
body .dataTables_wrapper .dt-buttons .btn,
body .dataTables_wrapper .dt-buttons .dt-button {
    background: #fff !important; color: var(--pc-text-2) !important;
    border: 1px solid var(--pc-border-strong) !important;
    border-radius: 7px !important; margin-right: 6px !important;
    padding: .4rem .85rem !important; font-size: .78rem; font-weight: 600;
    box-shadow: none !important;
}
body .dataTables_wrapper .dt-buttons .btn:hover,
body .dataTables_wrapper .dt-buttons .dt-button:hover { background: var(--pc-primary-50) !important; color: var(--pc-primary-700) !important; border-color: var(--pc-primary-100) !important; }
body .dataTables_wrapper .btn-group > .btn:not(:last-child), body .dataTables_wrapper .btn-group > .btn:not(:first-child) { border-radius: 7px !important; }

body .pagination { gap: 4px; }
body .pagination .page-item .page-link {
    border: 1px solid var(--pc-border) !important; border-radius: 8px !important;
    color: var(--pc-text-2); font-weight: 500; font-size: .82rem;
    min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    margin: 0 !important; background: #fff;
}
body .pagination .page-item .page-link:hover { background: var(--pc-primary-50); color: var(--pc-primary-700); }
body .pagination .page-item.active .page-link { background: var(--pc-primary) !important; border-color: var(--pc-primary) !important; color: #fff !important; box-shadow: 0 4px 10px rgba(79, 107, 237, .3); }
body .pagination .page-item.disabled .page-link { color: #b8bfd3; background: #fafbfd; }
body .pagination .page-item.previous .page-link, body .pagination .page-item.next .page-link { padding: 0 12px; }

body table.dataTable thead .sorting::before, body table.dataTable thead .sorting::after,
body table.dataTable thead .sorting_asc::before, body table.dataTable thead .sorting_asc::after,
body table.dataTable thead .sorting_desc::before, body table.dataTable thead .sorting_desc::after { opacity: .35; }
body table.dataTable thead .sorting_asc::before, body table.dataTable thead .sorting_desc::after { opacity: .9; color: var(--pc-primary); }

/* 10. Modals & alerts ------------------------------------------------------ */
body .modal-backdrop.show { opacity: .45; background: #0e1430; }
body .modal-content { border: 0; border-radius: 16px; box-shadow: var(--pc-shadow-lg); overflow: hidden; }
body .modal-header,
body .modal-header.bg-primary,
body .modal-header.bg-success,
body .modal-header.bg-danger {
    background: #fff !important;
    border-bottom: 1px solid var(--pc-border);
    padding: 1.1rem 1.5rem;
    position: relative;
    align-items: center;
}
body .modal-header::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--pc-primary); }
body .modal-header.bg-success::before { background: var(--pc-success); }
body .modal-header.bg-danger::before { background: var(--pc-danger); }
body .modal-header .modal-title,
body .modal-header .modal-title.white { color: var(--pc-text) !important; font-weight: 700; font-size: 1.05rem; }
body .modal-header .close {
    width: 34px; height: 34px; padding: 0 !important; margin: 0 !important; opacity: 1;
    border-radius: 8px; background: var(--pc-bg) !important; box-shadow: none !important; transform: none !important;
    display: inline-flex; align-items: center; justify-content: center; color: var(--pc-text-2);
}
body .modal-header .close:hover { background: var(--pc-danger-50) !important; color: var(--pc-danger); }
body .modal-header .close i { font-size: 1.3rem; }
body .modal-body { padding: 1.5rem; color: var(--pc-text-2); }
body .modal-footer { border-top: 1px solid var(--pc-border); background: #fafbfd; padding: .9rem 1.5rem; }

body .alert { border: 0; border-radius: var(--pc-radius-sm); font-weight: 500; padding: .85rem 1.1rem; }
body .alert-success { background: var(--pc-success-50) !important; color: #166534 !important; box-shadow: inset 3px 0 0 var(--pc-success); }
body .alert-danger { background: var(--pc-danger-50) !important; color: #991b1b !important; box-shadow: inset 3px 0 0 var(--pc-danger); }
body .alert-warning { background: var(--pc-warning-50) !important; color: #92400e !important; box-shadow: inset 3px 0 0 var(--pc-warning); }
body .alert-info { background: var(--pc-info-50) !important; color: #155e75 !important; box-shadow: inset 3px 0 0 var(--pc-info); }

/* 11. Toastr / SweetAlert -------------------------------------------------- */
body #toast-container > div {
    border-radius: 12px !important; box-shadow: var(--pc-shadow-lg) !important; opacity: 1 !important;
    font-family: var(--pc-font); padding: 14px 16px 14px 52px !important; background-position: 16px center !important;
}
body .swal2-popup { border-radius: 16px !important; font-family: var(--pc-font) !important; padding: 1.75rem !important; }
body .swal2-title { color: var(--pc-text) !important; font-size: 1.3rem !important; }
body .swal2-actions .btn { min-width: 110px; }

/* 12. Misc utilities ------------------------------------------------------- */
body .nav-tabs { border-bottom: 1px solid var(--pc-border); }
body .nav-tabs .nav-link { border: 0; color: var(--pc-muted); font-weight: 600; border-radius: 0; padding: .75rem 1rem; }
body .nav-tabs .nav-link.active { color: var(--pc-primary) !important; background: transparent !important; box-shadow: inset 0 -2px 0 var(--pc-primary); }
body .nav-pills .nav-link.active { background: var(--pc-primary) !important; box-shadow: 0 4px 12px rgba(79, 107, 237, .3); }
body hr { border-top-color: var(--pc-border); }
body .spinner-border { border-width: .16em; }
body .tooltip-inner { background: var(--pc-navy); border-radius: 6px; font-size: .76rem; padding: 6px 10px; }
body .scroll-top { border-radius: 10px !important; box-shadow: var(--pc-shadow-lg) !important; }

/* 13. Footer & loader ------------------------------------------------------ */
body.pc-app .footer {
    background: transparent !important; box-shadow: none !important; border-top: 0;
    color: var(--pc-muted); font-size: .8rem;
}
body.pc-app .footer a { color: var(--pc-text-2); font-weight: 600; }
body.pc-app .footer a:hover { color: var(--pc-primary); }

/* page loader (ShowLoader): styled in customizeloader/Common.css */

/* 14. Dashboard components ------------------------------------------------- */
.pc-hero {
    position: relative; overflow: hidden;
    border-radius: 18px;
    padding: 2rem 2.25rem;
    margin-bottom: 1.75rem;
    color: #fff;
    background:
        radial-gradient(600px 220px at 100% 0%, rgba(124, 92, 240, .55), transparent 60%),
        radial-gradient(500px 260px at 0% 100%, rgba(79, 107, 237, .55), transparent 60%),
        linear-gradient(135deg, #1c2350 0%, #141a3c 100%);
    box-shadow: 0 16px 40px rgba(20, 26, 60, .18);
}
.pc-hero::after {
    content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%;
    border: 36px solid rgba(255, 255, 255, .05);
}
.pc-hero .pc-hero-eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #aab6ef; }
.pc-hero h2 { color: #fff; font-size: 1.75rem; font-weight: 700; margin: .4rem 0 .5rem; }
.pc-hero p { color: #c5cdef; margin: 0; max-width: 560px; font-size: .95rem; }
.pc-hero .pc-hero-actions { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.pc-hero .btn-hero { background: #fff !important; color: var(--pc-navy) !important; border: 0 !important; }
.pc-hero .btn-hero:hover { background: #eef1fe !important; }
.pc-hero .btn-hero-ghost { background: rgba(255, 255, 255, .1) !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, .22) !important; }
.pc-hero .btn-hero-ghost:hover { background: rgba(255, 255, 255, .18) !important; }
.pc-hero-meta { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.pc-hero-stat {
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px; padding: 14px 18px; min-width: 150px;
}
.pc-hero-stat span { display: block; font-size: .72rem; color: #aab6ef; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.pc-hero-stat strong { display: block; color: #fff; font-size: 1.05rem; margin-top: 4px; font-weight: 600; }

.pc-section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 1rem; }
.pc-section-title h4 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.pc-section-title p { margin: 0; color: var(--pc-muted); font-size: .82rem; }

.pc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 2rem; }
.pc-tile {
    display: flex; align-items: flex-start; gap: 14px;
    background: #fff; border: 1px solid var(--pc-border); border-radius: 14px;
    padding: 18px; color: var(--pc-text-2) !important;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    text-decoration: none !important; position: relative;
}
.pc-tile:hover { transform: translateY(-2px); box-shadow: var(--pc-shadow); border-color: var(--pc-primary-100); }
.pc-tile .pc-tile-icon {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem;
    background: var(--pc-primary-50); color: var(--pc-primary);
}
.pc-tile .pc-tile-icon.is-violet { background: #f1ecfe; color: #7c3aed; }
.pc-tile .pc-tile-icon.is-green { background: var(--pc-success-50); color: var(--pc-success); }
.pc-tile .pc-tile-icon.is-amber { background: var(--pc-warning-50); color: var(--pc-warning); }
.pc-tile .pc-tile-icon.is-cyan { background: var(--pc-info-50); color: var(--pc-info); }
.pc-tile .pc-tile-icon.is-rose { background: #fdeef3; color: #db2777; }
.pc-tile .pc-tile-icon.is-slate { background: #eef0f5; color: #475569; }
.pc-tile h6 { margin: 2px 0 4px; font-size: .95rem; font-weight: 600; color: var(--pc-text); }
.pc-tile p { margin: 0; font-size: .8rem; color: var(--pc-muted); line-height: 1.45; }
.pc-tile .pc-tile-arrow { position: absolute; right: 14px; top: 16px; color: var(--pc-border-strong); font-size: 1.2rem; transition: color .15s ease, transform .15s ease; }
.pc-tile:hover .pc-tile-arrow { color: var(--pc-primary); transform: translateX(2px); }

.pc-empty-state { text-align: center; padding: 3rem 1rem; color: var(--pc-muted); }
.pc-empty-state i { font-size: 2.5rem; color: var(--pc-border-strong); }

/* 15. Login page ----------------------------------------------------------- */
body.pc-auth {
    min-height: 100vh; margin: 0;
    background: var(--pc-bg) !important;
    font-family: var(--pc-font);
}
.pc-auth-wrap { display: flex; min-height: 100vh; }
.pc-auth-brand {
    flex: 1 1 52%;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background:
        radial-gradient(700px 400px at 90% 10%, rgba(124, 92, 240, .55), transparent 60%),
        radial-gradient(600px 400px at 10% 90%, rgba(79, 107, 237, .6), transparent 60%),
        linear-gradient(160deg, #1c2350 0%, #0e1430 100%);
}
.pc-auth-brand::before {
    content: ''; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.pc-auth-brand > * { position: relative; z-index: 1; }
.pc-auth-logo { display: flex; align-items: center; gap: 12px; }
.pc-auth-logo img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.pc-auth-logo span { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.pc-auth-pitch { max-width: 480px; }
.pc-auth-pitch .pc-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 799.2px; font-size: .75rem; font-weight: 600;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #dfe4ff;
}
.pc-auth-pitch h1 { color: #fff; font-size: 2.4rem; line-height: 1.15; font-weight: 700; margin: 18px 0 14px; letter-spacing: -.02em; }
.pc-auth-pitch h1 em { font-style: normal; background: linear-gradient(90deg, #a5b4ff, #d6c8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pc-auth-pitch p { color: #c0c8ec; font-size: 1rem; line-height: 1.6; margin: 0; }
.pc-auth-features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.pc-auth-features li { display: flex; align-items: center; gap: 12px; color: #dfe4ff; font-size: .92rem; }
.pc-auth-features li i {
    width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .1); color: #c3cdff; font-size: 1.15rem; flex-shrink: 0;
}
.pc-auth-foot { color: #8f9bc4; font-size: .8rem; }

.pc-auth-form {
    flex: 1 1 48%;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
}
.pc-auth-card { width: 100%; max-width: 400px; }
.pc-auth-card .pc-auth-mobile-logo { display: none; }
.pc-auth-card h2 { font-size: 1.75rem; font-weight: 700; color: var(--pc-text); margin: 0 0 6px; letter-spacing: -.02em; }
.pc-auth-card .pc-sub { color: var(--pc-muted); margin: 0 0 30px; font-size: .95rem; }
.pc-field { margin-bottom: 18px; }
.pc-field label { display: block; font-size: .82rem; font-weight: 600; color: var(--pc-text-2); margin-bottom: 7px; }
.pc-input { position: relative; }
.pc-input > i.pc-lead {
    position: absolute; left: 14px; top: 23px; transform: translateY(-50%);
    color: #9aa3bd; font-size: 1.2rem; pointer-events: none; transition: color .15s ease;
}
.pc-input .form-control {
    height: 46px; padding-left: 44px; padding-right: 44px;
    border-radius: 10px; font-size: .95rem; background: #fff;
}
.pc-input:focus-within > i.pc-lead { color: var(--pc-primary); }
.pc-input .pc-toggle-pass {
    position: absolute; right: 6px; top: 23px; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; background: transparent; border-radius: 8px;
    color: #9aa3bd; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.pc-input .pc-toggle-pass:hover { background: var(--pc-bg); color: var(--pc-text-2); }
.pc-input .pc-toggle-pass i { font-size: 1.2rem; }
.pc-input label.error { display: block; margin: 6px 0 0; }
.pc-auth-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 22px; font-size: .84rem; }
.pc-auth-row a { font-weight: 600; }
.pc-caps { display: none; color: var(--pc-warning); font-size: .78rem; font-weight: 500; margin-top: 6px; }
.pc-caps.show { display: flex; align-items: center; gap: 4px; }
.pc-auth-card .btn-login {
    width: 100%; height: 48px; font-size: .95rem; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.pc-auth-card .btn-login i { font-size: 1.25rem; transition: transform .15s ease; }
.pc-auth-card .btn-login:hover i { transform: translateX(3px); }
.pc-auth-card #div_loading_login .btn { width: 100%; height: 48px; border-radius: 10px; }
.pc-auth-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 26px; color: var(--pc-muted); font-size: .8rem; }
.pc-auth-secure i { color: var(--pc-success); font-size: 1rem; }

/* 16. Responsive ----------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .pc-search .pc-search-box { width: 200px; }
}
@media (max-width: 991.98px) {
    .pc-auth-brand { display: none; }
    .pc-auth-form { flex-basis: 100%; }
    .pc-auth-card .pc-auth-mobile-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
    .pc-auth-card .pc-auth-mobile-logo img { width: 40px; height: 40px; border-radius: 11px; }
    .pc-auth-card .pc-auth-mobile-logo span { font-weight: 700; font-size: 1.2rem; color: var(--pc-text); }
}
@media (max-width: 767.98px) {
    .pc-hero { padding: 1.5rem; border-radius: 14px; }
    .pc-hero h2 { font-size: 1.4rem; }
    .pc-session-chip .pc-chip-label { display: none; }
    body.pc-app .content-header .content-header-title { font-size: 1.15rem !important; border-right: 0 !important; }
    body .dataTables_wrapper .dataTables_filter input { min-width: 0; width: 100%; }
    body .card .card-body { padding: 1rem; }
}

/* =============================================================================
   17. Pages & forms
   Applies to every existing page and pop-up form without changing their markup.
============================================================================= */

/* --- Page header: title on the left, actions on the right ---------------- */
body.pc-app .content-header-left > .row { align-items: center; }
body.pc-app .content-header-left > .row > [class*="col-"]:last-child:not(:first-child) { margin-bottom: 0 !important; gap: 8px; }
body.pc-app .content-header .btn { display: inline-flex; align-items: center; gap: 6px; padding: .55rem 1rem; font-size: .84rem; border-radius: 9px; }
body.pc-app .content-header .btn i { font-size: 1.1rem; }

/* --- Section headings inside forms --------------------------------------- */
.pc-form-section {
    display: flex; align-items: center; gap: 10px;
    margin: .5rem 0 1.1rem; padding: 0;
    font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--pc-muted);
}
.pc-form-section::after { content: ''; flex: 1; height: 1px; background: var(--pc-border); }
.pc-form-section i {
    width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--pc-primary-50); color: var(--pc-primary); font-size: 1rem; letter-spacing: 0;
}
.pc-form-hint { color: var(--pc-muted); font-size: .8rem; margin: 0 0 1rem; }
/* existing in-form headings (e.g. Question Details) get the same treatment */
body form h4.py-50, body form h5.py-50, body form h6.py-50, body .tab-pane h4.py-50 {
    font-size: .78rem !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pc-muted);
    display: flex; align-items: center; gap: 8px; padding: 0 !important; margin: .75rem 0 1rem;
}
body form h4.py-50::after, body form h5.py-50::after, body form h6.py-50::after, body .tab-pane h4.py-50::after { content: ''; flex: 1; height: 1px; background: var(--pc-border); }
body form h5.py-50 i { color: var(--pc-primary); font-size: 1.05rem; }

/* --- Labels, required marker, helper text -------------------------------- */
.pc-req::after { content: ' *'; color: var(--pc-danger); font-weight: 700; }
body .success, body span.success { display: block; margin-top: 6px; font-size: .78rem; color: var(--pc-muted); font-weight: 500; }
body small.form-text, body .form-text { color: var(--pc-muted); font-size: .76rem; }
body .form-group .form-group, body .form-group fieldset.form-group { margin-bottom: 0; }
body .form-group { margin-bottom: 1.15rem; }

/* read-only fields look like values, not inputs */
body .form-control[readonly]:not(.picker__input) { background: #f6f7fb; border-color: var(--pc-border); color: var(--pc-text); font-weight: 500; }

/* --- Inputs with a leading icon (Frest .has-icon-left) -------------------- */
body .has-icon-left .form-control { padding-left: 2.6rem; }
body .has-icon-left .form-control-position {
    top: 0; left: 0; width: 2.6rem; height: 40px; line-height: 40px; text-align: center;
    color: var(--pc-muted); pointer-events: none;
}
body .has-icon-left .form-control-position i { font-size: 1.1rem; vertical-align: middle; position: static; }
body .has-icon-left:focus-within .form-control-position i { color: var(--pc-primary); }

/* --- Input groups ------------------------------------------------------- */
body .input-group > .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
body .input-group-append .btn, body .input-group-append .input-group-text {
    border-radius: 0 var(--pc-radius-sm) var(--pc-radius-sm) 0 !important;
    background: var(--pc-bg) !important; color: var(--pc-text-2) !important; border: 1px solid var(--pc-border-strong) !important;
    font-weight: 600; box-shadow: none !important; display: flex; align-items: center;
}

/* --- Checkboxes become toggle switches ---------------------------------- */
body .checkbox { position: relative; display: inline-flex; align-items: center; min-height: 22px; }
body .checkbox label {
    margin: 0 !important; padding-left: 50px; min-height: 22px; line-height: 22px;
    font-size: .875rem; font-weight: 500; color: var(--pc-text-2); cursor: pointer; text-transform: none;
}
body .checkbox label::before {
    content: '' !important; position: absolute; left: 0; top: 0;
    width: 40px !important; height: 22px !important; border-radius: 799.2px !important;
    background: #d5dae6 !important; border: 0 !important; box-shadow: none !important;
    transition: background .2s ease;
}
body .checkbox label::after {
    content: '' !important; position: absolute; left: 3px !important; top: 3px !important;
    width: 16px !important; height: 16px !important; border-radius: 50% !important;
    background: #fff !important; border: 0 !important; transform: none !important;
    box-shadow: 0 1px 3px rgba(20, 26, 60, .3);
    transition: transform .2s ease;
}
body .checkbox input:checked ~ label::before { background: var(--pc-primary) !important; }
body .checkbox input:checked ~ label::after { transform: translateX(18px) !important; }
body .checkbox input:disabled ~ label { opacity: .6; cursor: not-allowed; }
body .form-group > fieldset > .checkbox { min-height: 40px; }

/* --- Radios become selectable chips -------------------------------------- */
body .custom-control-inline { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
body .radio { position: relative; display: inline-flex; margin: 0 !important; }
body .radio input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
body .radio label {
    position: relative; margin: 0 !important; cursor: pointer;
    padding: .5rem .95rem .5rem 2.1rem; min-height: 38px; display: inline-flex; align-items: center;
    border: 1px solid var(--pc-border-strong); border-radius: 9px; background: #fff;
    font-size: .84rem; font-weight: 500; color: var(--pc-text-2); text-transform: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
body .radio label::before {
    content: '' !important; position: absolute; left: .8rem; top: 50%; margin-top: -8px;
    width: 16px !important; height: 16px !important; border-radius: 50% !important;
    border: 2px solid #b8bfd3 !important; background: #fff !important; transform: none !important;
}
body .radio label::after {
    content: '' !important; position: absolute; left: calc(.8rem + 4px); top: 50%; margin-top: -4px;
    width: 8px !important; height: 8px !important; border-radius: 50% !important;
    background: var(--pc-primary) !important; border: 0 !important; transform: scale(0) !important; transition: transform .15s ease;
}
body .radio label:hover { border-color: var(--pc-primary); }
body .radio input:checked ~ label { border-color: var(--pc-primary); background: var(--pc-primary-50); color: var(--pc-primary-700); font-weight: 600; }
body .radio input:checked ~ label::before { border-color: var(--pc-primary) !important; }
body .radio input:checked ~ label::after { transform: scale(1) !important; }
body .radio input:focus ~ label { box-shadow: var(--pc-ring); }

/* --- File pickers --------------------------------------------------------- */
body .custom-file { height: auto; min-height: 46px; }
body .custom-file-input { height: 46px; cursor: pointer; }
body .custom-file-label {
    height: 46px; display: flex; align-items: center; padding: 0 7rem 0 2.6rem;
    border: 1.5px dashed var(--pc-border-strong); background: #fafbfe; color: var(--pc-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
body .custom-file-label::before {
    content: ''; position: absolute; left: .9rem; top: 50%; width: 18px; height: 18px; margin-top: -9px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237b85a1'%3E%3Cpath d='M13 19v-4h3l-4-5-4 5h3v4z'/%3E%3Cpath d='M7 19h2v-2H7a5 5 0 0 1-1.05-9.88l.89-.19.33-.85A6.03 6.03 0 0 1 12 3a6.2 6.2 0 0 1 6.06 4.81l.21.88.89.12A5 5 0 0 1 17.8 17H15v2h2.8a6.2 6.2 0 0 0 2.03-12.12A8.2 8.2 0 0 0 12 1a8 8 0 0 0-6.76 4.13A7 7 0 0 0 7 19z'/%3E%3C/svg%3E");
}
body .custom-file-label::after {
    content: 'Browse' !important; height: 32px !important; top: 6px !important; right: 6px !important; bottom: auto !important;
    line-height: 30px !important; padding: 0 14px !important;
    border-radius: 7px !important; border: 1px solid var(--pc-border-strong) !important; background: #fff !important;
    color: var(--pc-text-2) !important; font-weight: 600; font-size: .8rem;
}
body .custom-file:hover .custom-file-label { border-color: var(--pc-primary); background: var(--pc-primary-50); }
body .custom-file-label.pc-has-file { border-style: solid; border-color: var(--pc-primary-100); background: var(--pc-primary-50); color: var(--pc-text); font-weight: 500; }

/* --- Filter / toolbar panels (e.g. Question Bank course picker) ------------ */
body .users-list-filter { padding: 0 !important; }
body .users-list-filter .row.border {
    margin: 0 0 1.5rem !important; padding: 1.25rem .5rem !important;
    background: #fff; border: 1px solid var(--pc-border) !important; border-radius: var(--pc-radius) !important;
    box-shadow: var(--pc-shadow-sm); align-items: flex-end;
}
body .users-list-filter .row.border .form-group, body .users-list-filter .row.border fieldset.form-group { margin-bottom: 0; }

/* --- Card headers with a title ------------------------------------------- */
body .card > .card-header:has(.card-title) {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--pc-border);
}
body .card > .card-header + hr { display: none; }
body .card > .card-header .card-title { margin: 0; display: flex; align-items: center; gap: 10px; }
body .card > .card-header .card-title > i { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--pc-primary-50); color: var(--pc-primary); font-size: 1.15rem; }
.pc-card-sub { display: block; color: var(--pc-muted); font-size: .8rem; font-weight: 400; margin-top: 2px; letter-spacing: 0; text-transform: none; }
body .card-dashboard { padding-top: 1.25rem; }

/* action bar at the bottom of long forms */
.pc-form-actions {
    display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px;
    padding: 1rem 1.5rem; margin: .5rem -1.5rem -1.5rem; border-top: 1px solid var(--pc-border);
    background: #fafbfd; border-radius: 0 0 var(--pc-radius) var(--pc-radius);
}
.pc-form-actions .pc-actions-note { margin-right: auto; color: var(--pc-muted); font-size: .8rem; }
.pc-form-actions .btn { display: inline-flex; align-items: center; gap: 6px; }

/* --- Status pills (pages use "badge btn-*") ------------------------------- */
body .badge[class*="btn-"],
body .badge.btn-primary:not(:disabled):not(.disabled) {
    border: 0 !important; box-shadow: none !important; font-weight: 600; font-size: .72rem;
    padding: .38em .75em !important; border-radius: 799.2px;
}
body .badge[class*="btn-"]::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
body .badge.btn-success { background: var(--pc-success-50) !important; color: var(--pc-success) !important; }
body .badge.btn-danger { background: var(--pc-danger-50) !important; color: var(--pc-danger) !important; }
body .badge.btn-warning { background: var(--pc-warning-50) !important; color: var(--pc-warning) !important; }
body .badge.btn-info { background: var(--pc-info-50) !important; color: var(--pc-info) !important; }
body .badge.btn-primary, body .badge.btn-primary:not(:disabled):not(.disabled) { background: var(--pc-primary-50) !important; color: var(--pc-primary-700) !important; }
body .badge.btn-secondary { background: #eef0f5 !important; color: #475569 !important; }

/* --- Tables: secondary text, empty states, duplicate footers -------------- */
body .table td p { margin: 3px 0 0; font-size: .76rem; color: var(--pc-muted); }
body .table td strong { color: var(--pc-text); font-weight: 600; }
body .table td.text-right, body .table th.text-right { font-variant-numeric: tabular-nums; }
body tfoot.pc-dup-footer { display: none; }
body .table-responsive > .warning, .pc-empty { text-align: center; padding: 3rem 1rem; color: var(--pc-muted); font-weight: 500; }
body .table-responsive > .warning::before, .pc-empty::before {
    content: ''; display: block; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px;
    background: var(--pc-primary-50) center no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%234f6bed'%3E%3Cpath d='M20 3H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 2v3H4V5h16zM4 19v-9h16v9H4z'/%3E%3C/svg%3E");
}
body table.dataTable td.dataTables_empty { padding: 2.5rem 1rem; color: var(--pc-muted); font-weight: 500; }
body .dataTables_wrapper .dt-buttons .btn i { font-size: 1rem; margin-right: 4px; vertical-align: -2px; }
body .dataTables_wrapper .dataTables_filter input {
    padding-left: 34px !important;
    background: #fff 11px center no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%237b85a1'%3E%3Cpath d='M10 18a7.95 7.95 0 0 0 4.9-1.69l4.39 4.39 1.42-1.42-4.39-4.39A8 8 0 1 0 10 18zm0-14a6 6 0 1 1 0 12 6 6 0 0 1 0-12z'/%3E%3C/svg%3E");
}

/* --- Placeholder shown while a page waits for a selection ----------------- */
.pc-placeholder:empty {
    display: block; text-align: center; padding: 3.5rem 1rem; color: var(--pc-muted);
    background: #fff; border: 1.5px dashed var(--pc-border-strong); border-radius: var(--pc-radius);
}
.pc-placeholder:empty::before { content: attr(data-empty-title); display: block; font-weight: 600; color: var(--pc-text); font-size: 1rem; margin-bottom: 4px; }
.pc-placeholder:empty::after { content: attr(data-empty-text); display: block; font-size: .85rem; }

/* --- Repeaters (add / remove rows) --------------------------------------- */
body [data-repeater-item] { background: #fafbfe; border: 1px solid var(--pc-border); border-radius: 10px; padding: 1rem 1rem 0; margin-bottom: .75rem; }
body .btn-icon.rounded-circle { width: 36px; height: 36px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
body .btn-icon.btn-danger.rounded-circle { background: var(--pc-danger-50) !important; color: var(--pc-danger) !important; border-color: transparent !important; box-shadow: none; }
body .btn-icon.btn-danger.rounded-circle:hover { background: var(--pc-danger) !important; color: #fff !important; }
body .btn-light-primary { box-shadow: none !important; }
body .btn-light-primary:hover { background: var(--pc-primary-100) !important; }
body .btn-light-info { background: var(--pc-info-50) !important; color: var(--pc-info) !important; border-color: transparent !important; }
body .btn-light-danger { background: var(--pc-danger-50) !important; color: var(--pc-danger) !important; border-color: transparent !important; }

/* --- Tabs inside cards ------------------------------------------------------ */
body .card .nav-tabs { gap: 4px; margin-bottom: 1.5rem !important; }
body .card .nav-tabs .nav-link { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px 8px 0 0; }
body .card .nav-tabs .nav-link:hover { color: var(--pc-text); background: var(--pc-bg); }
body .card .nav-tabs .nav-link i { font-size: 1.1rem; }

/* --- List groups ------------------------------------------------------------ */
body .list-group-item { border-color: var(--pc-border); padding: .8rem 1rem; }
body .list-group-item-action:hover { background: var(--pc-primary-50); color: var(--pc-primary-700); }
body .list-group-item.active { background: var(--pc-primary); border-color: var(--pc-primary); }

/* --- Pop-up forms ---------------------------------------------------------- */
body .modal-footer { gap: 8px; }
body .modal-footer > * { margin: 0 !important; }
body .modal-footer .btn { min-width: 96px; justify-content: center; }
body .modal-footer .btn .d-none.d-sm-block { display: inline !important; }
body .modal-footer .btn > i.d-block.d-sm-none { display: none !important; }
body .modal-header .modal-title { display: flex; align-items: center; gap: 10px; }
.pc-modal-icon { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--pc-primary-50); color: var(--pc-primary); font-size: 1.15rem; flex-shrink: 0; }

/* --- Key/value summary used on detail pages ---------------------------------- */
.pc-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 1.5rem; }
.pc-summary > div { background: #fafbfe; border: 1px solid var(--pc-border); border-radius: 10px; padding: 12px 14px; }
.pc-summary span { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--pc-muted); }
.pc-summary strong { display: block; margin-top: 4px; color: var(--pc-text); font-size: 1rem; font-weight: 600; word-break: break-word; }

@media (max-width: 767.98px) {
    .pc-form-actions { justify-content: stretch; }
    .pc-form-actions .btn { flex: 1; justify-content: center; }
    body .custom-file-label { padding-right: 5.5rem; }
}

/* --- App slider gallery ---------------------------------------------------- */
.pc-slide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pc-slide { border: 1px solid var(--pc-border); border-radius: 12px; overflow: hidden; background: #fff; transition: box-shadow .15s ease, transform .15s ease; }
.pc-slide:hover { box-shadow: var(--pc-shadow); transform: translateY(-2px); }
.pc-slide.is-off .pc-slide-img img { filter: grayscale(1); opacity: .55; }
.pc-slide-img { position: relative; aspect-ratio: 16 / 9; background: var(--pc-bg); cursor: zoom-in; }
.pc-slide-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-slide-img .badge { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 6px rgba(20, 26, 60, .15) !important; }
.pc-slide-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.pc-slide-body strong { color: var(--pc-text); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-slide-body .btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; }

/* --- Report results load as their own card --------------------------------- */
#contentBody > .users-list-table > .card { margin-bottom: 0; }
.card .users-list-table > .card { border: 0; box-shadow: none; margin-bottom: 0; }
.card .users-list-table > .card > .card-body { padding: 0; }

/* plain light buttons (e.g. Cancel on the question form) */
body .btn-light { background: #fff !important; color: var(--pc-text-2) !important; border: 1px solid var(--pc-border-strong) !important; box-shadow: none !important; }
body .btn-light:hover { background: var(--pc-bg) !important; }

/* toggle switch: centre the track and knob on the label text */
body .checkbox label::before { top: 50% !important; margin-top: -11px !important; }
body .checkbox label::after { top: 50% !important; margin-top: -8px !important; }
body .checkbox label { display: inline-flex; align-items: center; line-height: 1.3; }

/* =============================================================================
   18. Admin dashboard (counters, charts, lists)
============================================================================= */
.pc-dash-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 1.25rem; }
.pc-dash-bar h4 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.pc-dash-bar p { margin: 2px 0 0; color: var(--pc-muted); font-size: .8rem; }
.pc-dash-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-seg { display: inline-flex; background: #fff; border: 1px solid var(--pc-border); border-radius: 10px; padding: 3px; gap: 2px; box-shadow: var(--pc-shadow-sm); }
.pc-seg button { border: 0; background: transparent; color: var(--pc-text-2); font-weight: 600; font-size: .8rem; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-family: var(--pc-font); }
.pc-seg button:hover { background: var(--pc-bg); color: var(--pc-text); }
.pc-seg button.is-active { background: var(--pc-primary); color: #fff; box-shadow: 0 2px 6px rgba(79, 107, 237, .3); }
.pc-icon-action { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--pc-border); background: #fff; border-radius: 10px; color: var(--pc-text-2); cursor: pointer; box-shadow: var(--pc-shadow-sm); }
.pc-icon-action:hover { color: var(--pc-primary); border-color: var(--pc-primary-100); }
.pc-icon-action.is-spinning i { animation: pc-spin .8s linear infinite; }
@keyframes pc-spin { to { transform: rotate(360deg); } }
.pc-updated { color: var(--pc-muted); font-size: .76rem; }

/* KPI cards */
.pc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 1.5rem; }
.pc-kpi {
    position: relative; background: #fff; border: 1px solid var(--pc-border); border-radius: 14px;
    padding: 16px 18px; box-shadow: var(--pc-shadow-sm); min-height: 128px;
    display: flex; flex-direction: column; color: var(--pc-text-2) !important; text-decoration: none !important;
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
a.pc-kpi:hover { box-shadow: var(--pc-shadow); transform: translateY(-2px); border-color: var(--pc-primary-100); }
.pc-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-kpi-label { font-size: .78rem; font-weight: 600; color: var(--pc-muted); }
.pc-kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; background: var(--pc-primary-50); color: var(--pc-primary); }
.pc-kpi-value { font-size: 1.65rem; font-weight: 700; color: var(--pc-text); letter-spacing: -.02em; line-height: 1.15; margin-top: 8px; font-variant-numeric: tabular-nums; }
.pc-kpi-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .76rem; color: var(--pc-muted); }
.pc-delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; padding: 1px 7px 1px 4px; border-radius: 799.2px; font-size: .72rem; }
.pc-delta i { font-size: .95rem; }
.pc-delta.is-up { background: var(--pc-success-50); color: #15803d; }
.pc-delta.is-down { background: var(--pc-danger-50); color: #b91c1c; }
.pc-delta.is-flat { background: #eef0f5; color: #475569; }
.pc-kpi.is-alert { border-color: #f5d29a; background: linear-gradient(180deg, #fffaf0, #fff 60%); }
.pc-kpi.is-alert .pc-kpi-icon { background: var(--pc-warning-50); color: var(--pc-warning); }

/* chart & list cards */
.pc-dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.pc-span-8 { grid-column: span 8; } .pc-span-6 { grid-column: span 6; } .pc-span-4 { grid-column: span 4; } .pc-span-12 { grid-column: span 12; }
.pc-panel { background: #fff; border: 1px solid var(--pc-border); border-radius: 14px; box-shadow: var(--pc-shadow-sm); display: flex; flex-direction: column; min-width: 0; }
.pc-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.pc-panel-head h5 { margin: 0; font-size: .95rem; font-weight: 700; color: var(--pc-text); }
.pc-panel-head p { margin: 2px 0 0; font-size: .76rem; color: var(--pc-muted); }
.pc-panel-head a, .pc-link-btn { font-size: .78rem; font-weight: 600; white-space: nowrap; background: none; border: 0; color: var(--pc-primary); padding: 0; cursor: pointer; }
.pc-panel-body { padding: 8px 18px 16px; flex: 1; min-height: 0; }
.pc-chart { min-height: 290px; }
.pc-chart.is-short { min-height: 250px; }
.pc-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--pc-text-2); font-weight: 500; margin-top: 6px; }
.pc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pc-stat-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.pc-stat-row div span { display: block; font-size: .7rem; color: var(--pc-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.pc-stat-row div strong { font-size: 1.1rem; color: var(--pc-text); font-variant-numeric: tabular-nums; }

/* horizontal value bars rendered in HTML (status breakdowns) */
.pc-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pc-hbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: .82rem; }
.pc-hbars .pc-hbar-label { display: flex; align-items: center; gap: 8px; color: var(--pc-text); font-weight: 500; min-width: 0; }
.pc-hbars .pc-hbar-label i { font-size: 1rem; color: var(--pc-muted); }
.pc-hbars .pc-hbar-value { font-weight: 700; color: var(--pc-text); font-variant-numeric: tabular-nums; }
.pc-hbars .pc-hbar-value small { color: var(--pc-muted); font-weight: 500; margin-left: 4px; }
.pc-hbars .pc-hbar-track { grid-column: 1 / -1; height: 8px; border-radius: 799.2px; background: #eef0f5; overflow: hidden; }
.pc-hbars .pc-hbar-fill { height: 100%; border-radius: 799.2px; background: var(--pc-primary); min-width: 4px; }

/* list rows */
.pc-rows { list-style: none; margin: 0; padding: 0; }
.pc-rows li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f0f2f7; }
.pc-rows li:last-child { border-bottom: 0; }
.pc-rows .pc-row-icon { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; background: var(--pc-primary-50); color: var(--pc-primary-700); line-height: 1; }
.pc-rows .pc-row-icon b { font-size: .95rem; }
.pc-rows .pc-row-icon small { font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pc-rows .pc-row-main { flex: 1; min-width: 0; }
.pc-rows .pc-row-main a, .pc-rows .pc-row-main strong { display: block; color: var(--pc-text); font-weight: 600; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-rows .pc-row-main a:hover { color: var(--pc-primary); }
.pc-rows .pc-row-main span { display: block; color: var(--pc-muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-rows .pc-row-side { text-align: right; flex-shrink: 0; font-size: .78rem; color: var(--pc-muted); }
.pc-rows .pc-row-side strong { display: block; color: var(--pc-text); font-size: .88rem; font-variant-numeric: tabular-nums; }
.pc-meter { width: 90px; height: 6px; border-radius: 799.2px; background: #eef0f5; overflow: hidden; margin-top: 4px; margin-left: auto; }
.pc-meter i { display: block; height: 100%; background: var(--pc-primary); border-radius: 799.2px; }
.pc-rank { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; background: #eef0f5; color: var(--pc-text-2); flex-shrink: 0; }
.pc-rows li:first-child .pc-rank { background: var(--pc-primary); color: #fff; }
.pc-mini-empty { text-align: center; color: var(--pc-muted); padding: 2rem 1rem; font-size: .84rem; }
.pc-mini-empty i { display: block; font-size: 1.8rem; color: var(--pc-border-strong); margin-bottom: 6px; }

/* data table view for the trend chart */
.pc-table-view { max-height: 290px; overflow: auto; }
.pc-table-view table { width: 100%; font-size: .8rem; }
.pc-table-view th { position: sticky; top: 0; background: #f7f8fc; color: var(--pc-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; text-align: right; }
.pc-table-view th:first-child, .pc-table-view td:first-child { text-align: left; }
.pc-table-view td { padding: 7px 10px; border-top: 1px solid #f0f2f7; text-align: right; font-variant-numeric: tabular-nums; color: var(--pc-text-2); }

/* loading skeletons and error state */
.pc-skel { position: relative; overflow: hidden; background: #eef0f5; border-radius: 8px; color: transparent !important; }
.pc-skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: pc-shimmer 1.2s infinite; }
@keyframes pc-shimmer { to { transform: translateX(100%); } }
.pc-kpi.is-loading .pc-kpi-value { width: 60%; height: 30px; }
.pc-kpi.is-loading .pc-kpi-foot span { width: 80%; height: 12px; display: block; }
.pc-dash-error { display: none; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 1.25rem; border-radius: 12px; background: var(--pc-danger-50); color: #991b1b; font-weight: 500; }
.pc-dash-error.show { display: flex; }
.pc-dash-error i { font-size: 1.4rem; }
.pc-dash-error button { margin-left: auto; }

/* apexcharts polish */
.pc-panel .apexcharts-tooltip { border: 1px solid var(--pc-border) !important; box-shadow: var(--pc-shadow-lg) !important; border-radius: 10px !important; font-family: var(--pc-font) !important; }
.pc-panel .apexcharts-tooltip-title { background: #f7f8fc !important; border-bottom: 1px solid var(--pc-border) !important; font-weight: 600; }
.pc-panel .apexcharts-xaxistooltip { display: none; }

@media (max-width: 1399.98px) { .pc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1199.98px) { .pc-span-8, .pc-span-6, .pc-span-4 { grid-column: span 12; } }
@media (max-width: 575.98px) { .pc-kpis { grid-template-columns: 1fr; } .pc-kpi-value { font-size: 1.4rem; } }

/* =============================================================================
   19. Fixes: flat top app bar + underline tabs (override Frest defaults)
============================================================================= */
/* The template pins the header to the top edge (fixed-top, full width), so it is styled
   as a flat app bar: no rounded corners or side borders, just a bottom hairline. */
body.pc-app .header-navbar.navbar,
body.pc-app .header-navbar.navbar.fixed-top {
    border-radius: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--pc-border) !important;
    box-shadow: 0 1px 2px rgba(20, 26, 60, .04) !important;
    background: rgba(255, 255, 255, .94) !important;
    margin: 0 !important;
    top: 0 !important;
    min-height: 64px;
}
body.pc-app .header-navbar .navbar-wrapper,
body.pc-app .header-navbar .navbar-container { background: transparent !important; }
body.pc-app .header-navbar .navbar-container { min-height: 64px; display: flex !important; align-items: center; padding-left: 1.5rem !important; padding-right: 1.25rem !important; }
body.pc-app .header-navbar #navbar-mobile { width: 100%; }

/* Tabs: one clean underline style everywhere (replaces Frest raised buttons + pointer triangles) */
body .nav.nav-tabs {
    display: flex; flex-wrap: wrap; gap: 4px;
    border-bottom: 1px solid var(--pc-border) !important;
    margin: 0 0 1.5rem !important; padding: 0 !important;
}
body .nav.nav-tabs .nav-item { margin: 0 !important; padding: 0 !important; }
body .nav.nav-tabs .nav-item .nav-link,
body .nav.nav-tabs .nav-item .nav-link:not(.active):hover,
body .nav.nav-tabs .nav-item .nav-link:not(:active):hover {
    position: relative; display: inline-flex !important; align-items: center; gap: 6px;
    padding: .75rem 1.1rem !important; margin: 0 0 -1px !important;
    background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    color: var(--pc-muted) !important; font-weight: 600; font-size: .875rem;
    transition: color .15s ease, box-shadow .15s ease;
}
body .nav.nav-tabs .nav-item .nav-link span { color: inherit !important; }
body .nav.nav-tabs .nav-item .nav-link:not(.active):hover { color: var(--pc-text) !important; box-shadow: inset 0 -2px 0 var(--pc-border-strong) !important; }
body .nav.nav-tabs .nav-item .nav-link.active,
body .nav.nav-tabs .nav-item .nav-link.active:hover {
    color: var(--pc-primary) !important; background: transparent !important;
    box-shadow: inset 0 -2px 0 var(--pc-primary) !important;
}
body .nav.nav-tabs .nav-item .nav-link.active::before,
body .nav.nav-tabs .nav-item .nav-link.active::after { content: none !important; display: none !important; }
body .nav.nav-tabs .nav-item .nav-link i { font-size: 1.1rem; margin: 0 !important; }
body .nav.nav-tabs ~ .tab-content { padding-left: 0 !important; }

/* select2: vertically centre the selected value like other inputs */
body .select2-container--default .select2-selection--single { height: 40px !important; display: flex !important; align-items: center; }
body .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 1.4 !important; padding-top: 0 !important; padding-bottom: 0 !important; width: 100%; }
body .select2-container--default .select2-selection--single .select2-selection__arrow { top: 0 !important; height: 38px !important; }

/* =============================================================================
   20. Type scale
   Base 14px with 13px body text. Sizes in rem scale with the base, so text,
   spacing, menu, buttons and tables stay in proportion.
============================================================================= */
html { font-size: 14px !important; }
html body, html body.pc-app { font-size: .93rem; line-height: 1.45; }

/* tiny uppercase labels: keep them readable after the scale-down */
body.pc-app .main-menu.menu-dark .navigation .navigation-header { font-size: .7rem; }
body .table thead th, body .table tfoot th { font-size: .7rem; }

/* page title and section headings */
body.pc-app .content-header-title, body.pc-app .content-header .content-header-title { font-size: 1.25rem !important; }
body .card .card-title { font-size: 1rem; }

/* fixed-pixel controls: match the smaller text */
body .form-control, body .custom-select { min-height: 36px; font-size: .9rem; padding-top: .35rem; padding-bottom: .35rem; }
body .select2-container--default .select2-selection--single { height: 36px !important; min-height: 36px; }
body .select2-container--default .select2-selection--single .select2-selection__arrow { height: 34px !important; }
body .select2-container--default .select2-selection--multiple { min-height: 36px; }
body .has-icon-left .form-control-position { height: 36px; line-height: 36px; }
body .custom-file, body .custom-file-input, body .custom-file-label { height: 42px; min-height: 42px; }
body .custom-file-label::after { height: 30px !important; line-height: 28px !important; top: 5px !important; }
body .btn { font-size: .86rem; padding: .5rem 1rem; }
body .btn-sm { font-size: .8rem; padding: .35rem .75rem; }
body .dataTables_wrapper .dataTables_filter input, body .dataTables_wrapper .dataTables_length select { min-height: 32px; }
body .pagination .page-item .page-link { min-width: 30px; height: 30px; }
body .table td { padding: .65rem .9rem; }
body .table thead th, body .table tfoot th { padding: .7rem .9rem; }

/* header bar */
body.pc-app .header-navbar.navbar, body.pc-app .header-navbar.navbar.fixed-top,
body.pc-app .header-navbar .navbar-container { min-height: 58px; }
.pc-search .pc-search-box { height: 34px; }
body.pc-app .header-navbar .pc-icon-btn { width: 34px; height: 34px; }
.pc-avatar { width: 34px; height: 34px; font-size: .85rem; }
.pc-session-chip { height: 30px; }

/* dashboard: four counters per row on laptop screens (960px and wider) */
.pc-kpi { min-height: 116px; padding: 14px 16px; }
.pc-kpi-value { font-size: 1.55rem; }
.pc-kpi-icon { width: 30px; height: 30px; font-size: 1.05rem; }
@media (max-width: 1399.98px) { .pc-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1199.98px) { .pc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .pc-kpis { grid-template-columns: 1fr; } }

body .input-group-text { font-size: .86rem; padding: 0 .85rem; }
body .select2-container--default .select2-selection--multiple .select2-selection__choice { font-size: .8rem; padding: 2px 8px; margin-top: 5px; }
body .select2-container--default .select2-selection--single .select2-selection__rendered, body .select2-results__option { font-size: .9rem; }

/* =============================================================================
   21. Template layout
   The Frest template sizes the sidebar in pixels: 260px expanded, 78px collapsed.
============================================================================= */
@media (min-width: 1200px) {
    .header-navbar.fixed-top { left: 260px; }
    .header-navbar.navbar-static-top .navbar-wrapper { margin-left: 260px; }
    html .content { margin-left: 260px; }
    .main-menu .navbar-header { width: 260px; }
    .vertical-layout.vertical-menu-modern.menu-expanded .main-menu { width: 260px; }
    .vertical-layout.vertical-menu-modern.menu-expanded .footer { margin-left: 260px; }
    .vertical-layout.vertical-menu-modern .footer { margin-left: 260px; }
    .vertical-layout.vertical-menu-modern.menu-collapsed .navbar.fixed-top { left: 78px; }
    .vertical-layout.vertical-menu-modern.menu-collapsed .main-menu { width: 78px; }
    .vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.expanded { width: 260px; }
    .vertical-layout.vertical-menu-modern.menu-collapsed .navbar-static-top .navbar-wrapper,
    .vertical-layout.vertical-menu-modern.menu-collapsed .app-content,
    .vertical-layout.vertical-menu-modern.menu-collapsed .footer { margin-left: 78px; }
}
@media (min-width: 992px) {
    body .content-right { width: calc(100% - 260px); }
    body .content-left { width: calc(100% - 260px); }
    body .content-detached.content-right { margin-left: -260px; }
    body .content-detached.content-right .content-body { margin-left: calc(260px + 2.2rem); }
    body .content-detached.content-left { margin-right: -260px; }
    body .content-detached.content-left .content-body { margin-right: calc(260px + 2.2rem); }
}
/* slide-in menu used on smaller screens */
.vertical-overlay-menu .navbar .navbar-header { width: 260px; }
.vertical-overlay-menu .main-menu, .vertical-overlay-menu.menu-hide .main-menu { width: 260px; left: -260px; }
.vertical-overlay-menu.menu-open .main-menu { transform: translate3d(260px, 0, 0); }

/* dropdown arrows centred (template used fixed 13px / 38px values) */
select.form-control:not([multiple]) { background-position: calc(100% - 12.5px) center, calc(100% - 22.5px) center, 100% 0 !important; background-size: 12.5px 12.5px, 10px 10px, 2.5em 2.5em !important; padding-right: 35px; }
body .select2-container--default .select2-selection--single,
body .select2-container--classic .select2-selection--single { min-height: 36px !important; height: 36px !important; padding: 0 !important; }
body .select2-container--default .select2-selection--single .select2-selection__arrow,
body .select2-container--classic .select2-selection--single .select2-selection__arrow { min-height: 0 !important; height: 100% !important; top: 0 !important; right: 7.5px !important; }
body .select2-container--default .select2-selection--single .select2-selection__rendered { padding-left: 12px !important; }
body .select2-container--default .select2-selection--multiple { min-height: 36px !important; }

/* =============================================================================
   22. Analytics reports
============================================================================= */
.pc-report-intro { color: var(--pc-muted); margin: -.5rem 0 1rem; font-size: .9rem; }
.pc-filter-card .card-body { padding: 1rem 1.25rem; }
.pc-filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 15px 20px; }
.pc-filter-field label { display: block; font-size: .75rem; font-weight: 600; color: var(--pc-text-2); margin-bottom: 6.25px; }
.pc-filter-field .pc-seg { flex-wrap: wrap; }
.pc-filter-course { min-width: 250px; flex: 1 1 250px; max-width: 400px; }
.pc-date-pair { display: flex; align-items: center; gap: 7.5px; }
.pc-date-pair .form-control { width: 175px; }
.pc-date-pair span { color: var(--pc-muted); }
.pc-filter-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pc-filter-note { margin: 12.5px 0 0; color: var(--pc-muted); font-size: .8rem; display: flex; align-items: center; gap: 7.5px; flex-wrap: wrap; }
.pc-filter-note i { color: var(--pc-primary); font-size: 1rem; }
.pc-applied { background: var(--pc-primary-50); color: var(--pc-primary-700); font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.pc-kpis.pc-kpis-auto { grid-template-columns: repeat(auto-fit, minmax(206.25px, 1fr)) !important; }
.pc-scope { display: inline-block; margin-left: 5px; padding: 0 6.25px; border-radius: 5px; background: #eef0f5; color: #475569; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: 1px; }
.pc-cell-meter { display: block; width: 90px; height: 5px; border-radius: 999px; background: #eef0f5; overflow: hidden; margin-top: 5px; }
.pc-cell-meter i { display: block; height: 100%; background: var(--pc-primary); border-radius: 999px; }
.pc-cell-title { font-weight: 600; color: var(--pc-text); }
a.pc-cell-title:hover { color: var(--pc-primary); }
.pc-report-table td { white-space: nowrap; }
.pc-report-table td:first-child { white-space: normal; min-width: 225px; }
.pc-report-tiles { grid-template-columns: repeat(auto-fill, minmax(325px, 1fr)); }
@media (max-width: 767.98px) { .pc-filter-actions { margin-left: 0; } .pc-date-pair .form-control { width: 150px; } }

/* value bars: the fill is a span, it must be a block to take its width */
.pc-hbars .pc-hbar-fill { display: block; }
.pc-hbars .pc-hbar-track { display: block; }
.pc-kpi-foot .pc-scope { margin-left: 0; margin-right: 2px; }

/* =============================================================================
   23. DataTables sort indicator: one centred icon per header (replaces the
   template font arrows that sat at the top and bottom of each cell)
============================================================================= */
body table.dataTable thead > tr > th.sorting,
body table.dataTable thead > tr > th.sorting_asc,
body table.dataTable thead > tr > th.sorting_desc { padding-right: 30px !important; position: relative; cursor: pointer; }
body table.dataTable thead .sorting::before, body table.dataTable thead .sorting_asc::before, body table.dataTable thead .sorting_desc::before,
body table.dataTable thead .sorting_asc_disabled::before, body table.dataTable thead .sorting_desc_disabled::before,
body table.dataTable thead .sorting_asc_disabled::after, body table.dataTable thead .sorting_desc_disabled::after { content: none !important; display: none !important; }
body table.dataTable thead .sorting::after,
body table.dataTable thead .sorting_asc::after,
body table.dataTable thead .sorting_desc::after {
    content: "" !important; display: block !important; position: absolute !important;
    right: 10px !important; left: auto !important; top: 50% !important; bottom: auto !important;
    width: 10px !important; height: 15px !important; margin-top: -7.5px; padding: 0 !important;
    font-size: 0 !important; opacity: 1 !important;
    background-color: #b8bfd3;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 10 14%27%3E%3Cpath d=%27M5 1.5 8.5 5.5h-7z M5 12.5 1.5 8.5h7z%27/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 10 14%27%3E%3Cpath d=%27M5 1.5 8.5 5.5h-7z M5 12.5 1.5 8.5h7z%27/%3E%3C/svg%3E") center / contain no-repeat;
}
body table.dataTable thead .sorting:hover::after { background-color: var(--pc-text-2); }
body table.dataTable thead .sorting_asc::after { background-color: var(--pc-primary); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 10 14%27%3E%3Cpath d=%27M5 3.5 8.5 8h-7z%27/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 10 14%27%3E%3Cpath d=%27M5 3.5 8.5 8h-7z%27/%3E%3C/svg%3E") center / contain no-repeat; }
body table.dataTable thead .sorting_desc::after { background-color: var(--pc-primary); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 10 14%27%3E%3Cpath d=%27M5 10.5 1.5 6h7z%27/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 10 14%27%3E%3Cpath d=%27M5 10.5 1.5 6h7z%27/%3E%3C/svg%3E") center / contain no-repeat; }
body table.dataTable thead th.sorting_asc, body table.dataTable thead th.sorting_desc { color: var(--pc-text) !important; }
/* text-right columns: keep the number aligned with the cells below */
body table.dataTable thead th.text-right.sorting, body table.dataTable thead th.text-right.sorting_asc, body table.dataTable thead th.text-right.sorting_desc { padding-right: 30px !important; }

/* dashboard counters are links */
a.pc-kpi { cursor: pointer; }
a.pc-kpi .pc-kpi-label::after { content: ""; display: inline-block; width: 7.5px; height: 7.5px; margin-left: 7.5px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); vertical-align: 1px; opacity: 0; transition: opacity .15s ease, transform .15s ease; }
a.pc-kpi:hover .pc-kpi-label { color: var(--pc-primary); }
a.pc-kpi:hover .pc-kpi-label::after { opacity: 1; transform: translateX(2px) rotate(45deg); }
a.pc-kpi:focus-visible { outline: 2px solid var(--pc-primary); outline-offset: 2px; }
