@font-face {
    font-family: 'Neuropol';
    src: url('../fonts/Neuropol.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --sidebar-width: 250px;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #2563eb;
    --primary-color: #2563eb;
    --font-brand: 'Neuropol', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8fafc;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* ── Global Custom Thin Scrollbar (Ultra-thin 4px, transparent track, no arrows) ── */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent !important;
    border: none !important;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
    border: none !important;
    min-height: 30px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

::-webkit-scrollbar-corner {
    background: transparent !important;
}

/* Sidebar scrollbar — seamlessly matching dark sidebar background with light grey thumb */
.sidebar::-webkit-scrollbar,
.sidebar-nav-wrap::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-nav-wrap::-webkit-scrollbar-track {
    background: transparent;
    border-left: none;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav-wrap::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35); /* light slate grey */
    border-radius: 9999px;
    min-height: 40px;
    transition: background-color 0.2s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(203, 213, 225, 0.65); /* lighter grey on hover */
}

.sidebar,
.sidebar-nav-wrap {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}


/* Global TechnoKraft Logo & Brand Component */
.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    user-select: none;
}

.logo-container:hover {
    text-decoration: none;
}

.logo-container .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-container .logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
    position: relative;
    top: -3px;
}

.logo-container .logo-collapsed {
    display: none;
}

.logo-container .brand-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
}

.logo-container .brand-text {
    font-family: var(--font-brand);
    font-size: 1.35rem;
    font-weight: 300;
    letter-spacing: 0.8px;
    color: #ffffff;
    text-transform: none;
    white-space: nowrap;
}

.logo-container .app-subtitle {
    font-family: var(--font-brand);
    font-size: 0.65rem;
    letter-spacing: 0.8px;
    color: #94a3b8;
    text-transform: capitalize;
    margin-top: 2px;
    white-space: nowrap;
}

/* Light Background Variant */
.logo-container.brand-dark .brand-text {
    color: #0f172a;
}

.logo-container.brand-dark .app-subtitle {
    color: #475569;
}

/* ========================================
   SIDEBAR & FLOATING TOGGLE BUTTON
   ======================================== */

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #e5e7eb;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1030;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

/* Sidebar Header */
.sidebar-header {
    padding: 1.1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sidebar .logo-container {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    text-decoration: none;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .logo-container .logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar .logo-container .logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
    position: relative;
    top: -3px;
}

.sidebar .logo-container .brand-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    visibility: visible;
}

.sidebar .logo-container .brand-text {
    font-family: var(--font-brand);
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 0.6px;
    color: #f8fafc;
    white-space: nowrap;
    line-height: 1.2;
}

.sidebar .logo-container .app-subtitle {
    font-family: var(--font-brand);
    font-size: 0.6rem;
    letter-spacing: 0.02em;
    color: #94a3b8;
    font-weight: 300;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
}

/* Sidebar Nav */
.sidebar-nav-wrap {
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar .nav-link {
    border-radius: 8px;
    padding: 10px 14px;
    margin: 2px 0;
    font-size: 0.88rem;
    transition: all 0.2s;
    color: #cbd5e1;
}

.sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff;
}

.sidebar .nav-link.active {
    background-color: var(--sidebar-active);
    color: #ffffff;
    font-weight: 600;
}

.submenu-list {
    padding-left: 0.5rem;
    margin-top: 4px;
    margin-bottom: 6px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 14px;
}

.submenu-link {
    display: block;
    padding: 6px 12px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    border-radius: 6px;
    transition: all 0.15s;
}

.submenu-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

.submenu-link.active {
    color: #60a5fa;
    font-weight: 600;
    background-color: rgba(37, 99, 235, 0.15);
}

/* ── Floating Circular Sidebar Toggle Button (Desktop & Mobile) ── */
.sidebar-toggle-btn {
    position: fixed;
    top: 20px;
    left: calc(var(--sidebar-width) - 16px);
    z-index: 1060;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #f1f5f9;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, transform 0.2s, opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    outline: none;
}

.sidebar-toggle-btn:hover {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
    transform: scale(1.1);
}

.sidebar-toggle-btn i {
    font-size: 0.92rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-is-collapsed .sidebar-toggle-btn {
    left: 56px !important;
    /* 72px - 16px */
}

body.sidebar-is-collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

/* ── Desktop Collapsed State ── */
.sidebar.collapsed {
    width: 72px !important;
}

.sidebar.collapsed .sidebar-header {
    padding: 1.1rem 0.25rem;
    justify-content: center;
}

.sidebar.collapsed .logo-container {
    justify-content: center;
    gap: 0;
}

.sidebar.collapsed .brand-info {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
    display: none !important;
}

.sidebar.collapsed .sidebar-nav-wrap {
    padding: 1rem 0.35rem !important;
}

.sidebar.collapsed .menu-label,
.sidebar.collapsed .collapse-icon {
    display: none !important;
}

.sidebar.collapsed .submenu-header {
    justify-content: center !important;
    padding: 10px 0 !important;
    text-align: center;
}

.sidebar.collapsed .submenu-header .menu-icon {
    margin-right: 0 !important;
    font-size: 1.25rem;
}

.sidebar.collapsed .collapse {
    display: none !important;
}

.sidebar.collapsed .sidebar-footer-wrap {
    display: none !important;
}

/* Toggle button shift when collapsed */
.sidebar.collapsed~.sidebar-toggle-btn,
body.sidebar-is-collapsed .sidebar-toggle-btn {
    left: 56px !important;
    /* 72px - 16px */
}

body.sidebar-is-collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.main-content {
    margin-left: var(--sidebar-width);
    min-width: 0 !important;
    width: calc(100% - var(--sidebar-width)) !important;
    max-width: 100% !important;
    min-height: 100vh;
    padding-bottom: 2rem;
    overflow-x: hidden !important;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-is-collapsed .main-content {
    margin-left: 72px !important;
    width: calc(100% - 72px) !important;
}

.table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.table-responsive::-webkit-scrollbar,
div.dataTables_scrollBody::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.table-responsive::-webkit-scrollbar-track,
div.dataTables_scrollBody::-webkit-scrollbar-track {
    background: transparent !important;
    border: none !important;
}

.table-responsive::-webkit-scrollbar-thumb,
div.dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
    border: none !important;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
div.dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.table-responsive::-webkit-scrollbar-button,
div.dataTables_scrollBody::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ========================================
   MOBILE SIDEBAR & BACKDROP OVERLAY
   ======================================== */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1045;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        width: 280px !important;
        max-width: 85vw !important;
        z-index: 1050 !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.4);
    }

    .sidebar.active {
        transform: translateX(0) !important;
    }

    .sidebar.collapsed {
        width: 280px !important;
    }

    .sidebar-toggle-btn {
        left: -50px !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .sidebar.active~.sidebar-toggle-btn,
    body.sidebar-is-open .sidebar-toggle-btn {
        left: 264px !important;
        /* 280px - 16px */
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .topbar-hamburger {
        display: flex !important;
    }
}

/* ========================================
   STANDARDIZED FILTER INPUTS & SELECT2
   ======================================== */

.filter-group .form-control,
.filter-group .form-select,
.filter-group .input-group-text,
.filter-group .btn {
    height: 38px !important;
    min-height: 38px !important;
    font-size: 0.85rem !important;
    border-color: #cbd5e1 !important;
    border-radius: 8px !important;
}

.filter-group .input-group {
    height: 38px !important;
}

.filter-group .input-group .form-control:not(:first-child),
.filter-group .input-group .btn:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.filter-group .input-group .form-control:not(:last-child),
.filter-group .input-group .input-group-text:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Select2 Standardized Height & Alignment */
.select2-container--bootstrap-5 {
    height: 38px !important;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px !important;
    height: 38px !important;
    font-size: 0.85rem !important;
    border-color: #cbd5e1 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    background-color: #ffffff !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: 12px !important;
    font-size: 0.85rem !important;
    color: #1e293b !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
    margin-right: 22px !important;
    font-size: 1.1rem !important;
}

/* ========================================
   TOPBAR NAVBAR (STICKY / FIXED TO TOP)
   ======================================== */

.topbar-navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    padding: 0.8rem 1.5rem;
    margin-bottom: 1.5rem;
}

.topbar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.topbar-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #475569;
}

.topbar-user-icon {
    color: #2563eb;
    font-size: 0.95rem;
}

.topbar-hamburger {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.topbar-hamburger:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
    color: #0f172a;
}

/* ========================================
   DATATABLES PAGINATION (PREVIOUS 1, 2, 3 ... 10 NEXT)
   ======================================== */

.dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.5rem;
}

.dataTables_paginate .pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
    list-style: none;
    padding: 0;
    flex-wrap: wrap;
}

.dataTables_paginate .page-item {
    margin: 0;
}

.dataTables_paginate .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    font-size: 0.84rem;
    font-weight: 500;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px !important;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.dataTables_paginate .page-link:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
    color: #0f172a;
}

.dataTables_paginate .page-item.active .page-link {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.dataTables_paginate .page-item.disabled .page-link {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #cbd5e1 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ========================================
   STUDENT ACTION BUTTONS (DESKTOP & MOBILE)
   ======================================== */

.staff-actions-bar,
.student-actions-bar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
}

.action-form-item {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.btn-action-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
}

.btn-action-item.action-log {
    color: #10b981;
}

.btn-action-item.action-log:hover {
    background: #10b981;
    color: #ffffff;
}

.btn-action-item.action-camera {
    color: #2563eb;
}

.btn-action-item.action-camera:hover {
    background: #2563eb;
    color: #ffffff;
}

.btn-action-item.action-edit {
    color: #0891b2;
}

.btn-action-item.action-edit:hover {
    background: #0891b2;
    color: #ffffff;
}

.btn-action-item.action-rereg {
    color: #d97706;
}

.btn-action-item.action-rereg:hover {
    background: #f59e0b;
    color: #ffffff;
}

.btn-action-item.action-delete {
    color: #d97706;
}

.btn-action-item.action-delete:hover {
    background: #d97706;
    color: #ffffff;
}

.btn-action-item.action-activate {
    color: #059669;
}

.btn-action-item.action-activate:hover {
    background: #059669;
    color: #ffffff;
}

.action-hard-delete {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}
.action-hard-delete:hover {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}

/* ========================================
   RESPONSIVE TABLE CARDS FOR MOBILE
   ======================================== */

@media (max-width: 767.98px) {

    /* Transform Table into Structured Cards */
    #studentsTable {
        border: none !important;
    }

    #studentsTable thead {
        display: none !important;
    }

    #studentsTable tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    #studentsTable tbody tr {
        display: flex;
        flex-direction: column;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 14px 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        position: relative;
    }

    #studentsTable tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none !important;
        border-bottom: 1px dashed #f1f5f9 !important;
        font-size: 0.86rem;
        text-align: right;
    }

    /* Card Field Labels */
    #studentsTable:not(.is-intern-table) tbody tr td:nth-child(1)::before {
        content: "Student ID";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    #studentsTable:not(.is-intern-table) tbody tr td:nth-child(2)::before {
        content: "Full Name";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    #studentsTable:not(.is-intern-table) tbody tr td:nth-child(3)::before {
        content: "Email";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    #studentsTable:not(.is-intern-table) tbody tr td:nth-child(4)::before {
        content: "Course";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    #studentsTable:not(.is-intern-table) tbody tr td:nth-child(5)::before {
        content: "Batch Timing";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    #studentsTable:not(.is-intern-table) tbody tr td:nth-child(6)::before {
        content: "Face Images";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    /* Intern specific labels */
    #studentsTable.is-intern-table tbody tr td:nth-child(1)::before {
        content: "Intern ID";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    #studentsTable.is-intern-table tbody tr td:nth-child(2)::before {
        content: "Full Name";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    #studentsTable.is-intern-table tbody tr td:nth-child(3)::before {
        content: "Email";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    #studentsTable.is-intern-table tbody tr td:nth-child(4)::before {
        content: "Intern Role";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    #studentsTable.is-intern-table tbody tr td:nth-child(5)::before {
        content: "Duration & Timing";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    #studentsTable.is-intern-table tbody tr td:nth-child(6)::before {
        content: "Face Images";
        font-weight: 600;
        font-size: 0.76rem;
        color: #64748b;
        text-align: left;
    }

    /* Actions row inside card */
    #studentsTable tbody tr td:nth-child(7) {
        border-bottom: none !important;
        flex-direction: column;
        align-items: stretch;
        padding-top: 10px;
        margin-top: 4px;
        text-align: center;
    }

    #studentsTable tbody tr td:nth-child(7)::before {
        display: none !important;
    }

    #studentsTable tbody tr td:nth-child(7) .staff-actions-bar,
.student-actions-bar {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 6px !important;
        width: 100% !important;
        padding: 5px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 10px !important;
    }

    #studentsTable tbody tr td:nth-child(7) .action-form-item {
        display: flex !important;
        width: 100% !important;
        margin: 0 !important;
    }

    #studentsTable tbody tr td:nth-child(7) .btn-action-item {
        width: 100% !important;
        height: 38px !important;
        border-radius: 8px !important;
        font-size: 1.05rem !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
    }

    #studentsTable tbody tr td:nth-child(7) .btn-action-item.action-log {
        color: #10b981 !important;
        border-color: #a7f3d0 !important;
    }

    #studentsTable tbody tr td:nth-child(7) .btn-action-item.action-camera {
        color: #2563eb !important;
        border-color: #bfdbfe !important;
    }

    #studentsTable tbody tr td:nth-child(7) .btn-action-item.action-edit {
        color: #0891b2 !important;
        border-color: #a5f3fc !important;
    }

    #studentsTable tbody tr td:nth-child(7) .btn-action-item.action-rereg {
        color: #d97706 !important;
        border-color: #fde68a !important;
    }

    #studentsTable tbody tr td:nth-child(7) .btn-action-item.action-delete {
        color: #d97706 !important;
        border-color: #fed7aa !important;
    }


    /* Empty state row inside card mode */
    #studentsTable tbody tr td[colspan],
    #recordsTable tbody tr td[colspan],
    #reportsTable tbody tr td[colspan],
    #batchesTable tbody tr td[colspan],
    #staffTable tbody tr td[colspan],
    #staffRecordsTable tbody tr td[colspan],
    #staffSchedulesTable tbody tr td[colspan] {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        border-bottom: none !important;
        padding: 30px 10px;
    }

    #studentsTable tbody tr td[colspan]::before,
    #recordsTable tbody tr td[colspan]::before,
    #reportsTable tbody tr td[colspan]::before,
    #batchesTable tbody tr td[colspan]::before,
    #staffTable tbody tr td[colspan]::before,
    #staffRecordsTable tbody tr td[colspan]::before,
    #staffSchedulesTable tbody tr td[colspan]::before,
    #payrollRunsTable tbody tr td[colspan]::before,
    #staffSalariesTable tbody tr td[colspan]::before,
    #missingCheckoutsTable tbody tr td[colspan]::before,
    #payrollTable tbody tr td[colspan]::before {
        display: none !important;
    }

    /* Transform Tables into Structured Cards on Mobile */
    #recordsTable,
    #reportsTable,
    #batchesTable,
    #staffTable,
    #staffRecordsTable,
    #staffSchedulesTable,
    #payrollRunsTable,
    #staffSalariesTable,
    #missingCheckoutsTable,
    #payrollTable {
        border: none !important;
    }

    #recordsTable thead,
    #reportsTable thead,
    #batchesTable thead,
    #staffTable thead,
    #staffRecordsTable thead,
    #staffSchedulesTable thead,
    #payrollRunsTable thead,
    #staffSalariesTable thead,
    #missingCheckoutsTable thead,
    #payrollTable thead {
        display: none !important;
    }

    #recordsTable tbody,
    #reportsTable tbody,
    #batchesTable tbody,
    #staffTable tbody,
    #staffRecordsTable tbody,
    #staffSchedulesTable tbody,
    #payrollRunsTable tbody,
    #staffSalariesTable tbody,
    #missingCheckoutsTable tbody,
    #payrollTable tbody {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    #recordsTable tbody tr,
    #reportsTable tbody tr,
    #batchesTable tbody tr,
    #staffTable tbody tr,
    #staffRecordsTable tbody tr,
    #staffSchedulesTable tbody tr,
    #payrollRunsTable tbody tr,
    #staffSalariesTable tbody tr,
    #missingCheckoutsTable tbody tr,
    #payrollTable tbody tr {
        display: flex;
        flex-direction: column;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px;
        padding: 16px 18px;
        box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
        position: relative;
        transition: all 0.2s ease-in-out;
    }

    #recordsTable tbody tr:hover,
    #reportsTable tbody tr:hover,
    #batchesTable tbody tr:hover,
    #staffTable tbody tr:hover,
    #staffRecordsTable tbody tr:hover,
    #staffSchedulesTable tbody tr:hover,
    #payrollRunsTable tbody tr:hover,
    #staffSalariesTable tbody tr:hover,
    #missingCheckoutsTable tbody tr:hover,
    #payrollTable tbody tr:hover {
        background: #ffffff !important;
        border-color: #cbd5e1 !important;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    }

    /* Active / Selected Card State - Clean White with Royal Blue Left Accent, NO MUDDY GREY */
    #studentsTable tbody tr.table-primary,
    #staffTable tbody tr.table-primary,
    #staffTable tbody tr.selected,
    #staffRecordsTable tbody tr.table-primary,
    #recordsTable tbody tr.table-primary,
    #payrollRunsTable tbody tr.table-primary,
    #payrollRunsTable tbody tr.selected {
        background: #ffffff !important;
        background-color: #ffffff !important;
        border: 1px solid #93c5fd !important;
        border-left: 5px solid #2563eb !important;
        box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12) !important;
    }

    /* Reset Bootstrap Table Inset Shadows and Grey Backgrounds on Mobile Cells */
    #recordsTable tbody tr td,
    #reportsTable tbody tr td,
    #batchesTable tbody tr td,
    #staffTable tbody tr td,
    #staffRecordsTable tbody tr td,
    #staffSchedulesTable tbody tr td,
    #payrollRunsTable tbody tr td,
    #staffSalariesTable tbody tr td,
    #missingCheckoutsTable tbody tr td,
    #payrollTable tbody tr td,
    #staffTable tbody tr:hover td,
    #staffTable tbody tr.table-primary td,
    #staffTable tbody tr.selected td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0 !important;
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        font-size: 0.88rem;
        text-align: right;
        background: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        gap: 12px;
    }

    #recordsTable tbody tr td:last-child,
    #reportsTable tbody tr td:last-child,
    #batchesTable tbody tr td:last-child,
    #staffTable tbody tr td:last-child,
    #staffRecordsTable tbody tr td:last-child,
    #staffSchedulesTable tbody tr td:last-child,
    #payrollRunsTable tbody tr td:last-child,
    #staffSalariesTable tbody tr td:last-child,
    #missingCheckoutsTable tbody tr td:last-child,
    #payrollTable tbody tr td:last-child {
        border-bottom: none !important;
    }

    /* Card Field Labels for Staff List (9 Columns Alignment) */
    #staffTable tbody tr td:nth-child(1)::before { content: "Select"; font-weight: 600; font-size: 0.78rem; color: #64748b; text-align: left; }
    #staffTable tbody tr td:nth-child(2)::before { content: "Staff ID"; font-weight: 600; font-size: 0.78rem; color: #64748b; text-align: left; }
    #staffTable tbody tr td:nth-child(3)::before { content: "Full Name"; font-weight: 600; font-size: 0.78rem; color: #64748b; text-align: left; }
    #staffTable tbody tr td:nth-child(4)::before { content: "Email"; font-weight: 600; font-size: 0.78rem; color: #64748b; text-align: left; }
    #staffTable tbody tr td:nth-child(5)::before { content: "Department"; font-weight: 600; font-size: 0.78rem; color: #64748b; text-align: left; }
    #staffTable tbody tr td:nth-child(6)::before { content: "Designation"; font-weight: 600; font-size: 0.78rem; color: #64748b; text-align: left; }
    #staffTable tbody tr td:nth-child(7)::before { content: "Status"; font-weight: 600; font-size: 0.78rem; color: #64748b; text-align: left; }
    #staffTable tbody tr td:nth-child(8)::before { content: "Face Images"; font-weight: 600; font-size: 0.78rem; color: #64748b; text-align: left; }
    #staffTable tbody tr td:nth-child(9)::before { display: none !important; }

    /* Card Checkbox & Content Formatting for Staff List */
    #staffTable tbody tr td:nth-child(1) .form-check {
        margin-bottom: 0 !important;
        padding-left: 0 !important;
    }
    #staffTable tbody tr td:nth-child(1) input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
        cursor: pointer;
    }
    #staffTable tbody tr td:nth-child(3) {
        font-weight: 600;
        color: #0f172a;
    }
    #staffTable tbody tr td:nth-child(4) {
        word-break: break-all;
    }

    /* Actions Bar Row Inside Card for #staffTable */
    #staffTable tbody tr td:nth-child(9) {
        border-bottom: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding-top: 14px !important;
        padding-bottom: 2px !important;
        margin-top: 4px !important;
        text-align: center !important;
        width: 100% !important;
    }

    #staffTable tbody tr td:nth-child(9) .staff-actions-bar,
.student-actions-bar {
        display: grid !important;
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 6px !important;
        width: 100% !important;
        padding: 6px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        justify-content: center !important;
    }

    #staffTable tbody tr td:nth-child(9) .action-form-item {
        display: flex !important;
        width: 100% !important;
        margin: 0 !important;
    }

    #staffTable tbody tr td:nth-child(9) .btn-action-item {
        width: 100% !important;
        height: 38px !important;
        border-radius: 8px !important;
        font-size: 1.05rem !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
    }

    #staffTable tbody tr td:nth-child(9) .btn-action-item.action-log {
        color: #10b981 !important;
        border-color: #a7f3d0 !important;
    }

    #staffTable tbody tr td:nth-child(9) .btn-action-item.action-camera {
        color: #2563eb !important;
        border-color: #bfdbfe !important;
    }

    #staffTable tbody tr td:nth-child(9) .btn-action-item.action-edit {
        color: #0891b2 !important;
        border-color: #a5f3fc !important;
    }

    #staffTable tbody tr td:nth-child(9) .btn-action-item.action-rereg {
        color: #d97706 !important;
        border-color: #fde68a !important;
    }

    #staffTable tbody tr td:nth-child(9) .btn-action-item.action-delete {
        color: #d97706 !important;
        border-color: #fed7aa !important;
    }

    #staffTable tbody tr td:nth-child(9) .btn-action-item.action-activate {
        color: #059669 !important;
        border-color: #a7f3d0 !important;
    }

    #staffTable tbody tr td:nth-child(9) .btn-action-item.action-hard-delete {
        color: #b91c1c !important;
        background: #fef2f2 !important;
        border-color: #fecaca !important;
    }

    /* Card Field Labels for Staff Records */
    #staffRecordsTable tbody tr td:nth-child(1)::before { content: "Staff ID"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffRecordsTable tbody tr td:nth-child(2)::before { content: "Name"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffRecordsTable tbody tr td:nth-child(3)::before { content: "Schedule"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffRecordsTable tbody tr td:nth-child(4)::before { content: "Check In"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffRecordsTable tbody tr td:nth-child(5)::before { content: "Check Out"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffRecordsTable tbody tr td:nth-child(6)::before { content: "Status"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffRecordsTable tbody tr td:nth-child(7)::before { content: "Departure"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffRecordsTable tbody tr td:nth-child(8)::before { content: "Confidence"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }

    /* Card Field Labels for Staff Schedules */
    #staffSchedulesTable tbody tr td:nth-child(1)::before { content: "Staff"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffSchedulesTable tbody tr td:nth-child(2)::before { content: "Title"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffSchedulesTable tbody tr td:nth-child(3)::before { content: "Date Range"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffSchedulesTable tbody tr td:nth-child(4)::before { content: "Daily Timing"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffSchedulesTable tbody tr td:nth-child(5)::before { content: "Late Threshold"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffSchedulesTable tbody tr td:nth-child(6)::before { content: "Days"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffSchedulesTable tbody tr td:nth-child(7)::before { content: "Status"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #staffSchedulesTable tbody tr td:nth-child(8)::before { content: "Actions"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }

    /* Card Field Labels for Batches */
    #batchesTable tbody tr td:nth-child(1)::before { content: "Batch Info"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #batchesTable tbody tr td:nth-child(2)::before { content: "Course"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #batchesTable tbody tr td:nth-child(3)::before { content: "Trainer"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #batchesTable tbody tr td:nth-child(4)::before { content: "Timing & Date"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #batchesTable tbody tr td:nth-child(5)::before { content: "Occupancy"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #batchesTable tbody tr td:nth-child(6)::before { content: "Days"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #batchesTable tbody tr td:nth-child(7)::before { content: "Status"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #batchesTable tbody tr td:nth-child(8)::before { content: "Actions"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }

    /* Card Field Labels for Records */
    #recordsTable:not(.is-intern-table) tbody tr td:nth-child(1)::before { content: "Student ID"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable:not(.is-intern-table) tbody tr td:nth-child(2)::before { content: "Student Name"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable:not(.is-intern-table) tbody tr td:nth-child(3)::before { content: "Batch / Course"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable:not(.is-intern-table) tbody tr td:nth-child(4)::before { content: "Check In Time"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable:not(.is-intern-table) tbody tr td:nth-child(5)::before { content: "Check Out Time"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable:not(.is-intern-table) tbody tr td:nth-child(6)::before { content: "Attendance Status"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable:not(.is-intern-table) tbody tr td:nth-child(7)::before { content: "Departure Status"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable:not(.is-intern-table) tbody tr td:nth-child(8)::before { content: "Face Match Confidence"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }

    /* Card Field Labels for Reports */
    #reportsTable:not(.is-intern-table) tbody tr td:nth-child(1)::before { content: "Student ID"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #reportsTable:not(.is-intern-table) tbody tr td:nth-child(2)::before { content: "Student Name"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #reportsTable:not(.is-intern-table) tbody tr td:nth-child(3)::before { content: "Attendance Date"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #reportsTable:not(.is-intern-table) tbody tr td:nth-child(4)::before { content: "Check In Time"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #reportsTable:not(.is-intern-table) tbody tr td:nth-child(5)::before { content: "Check Out Time"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #reportsTable:not(.is-intern-table) tbody tr td:nth-child(6)::before { content: "Attendance Status"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #reportsTable:not(.is-intern-table) tbody tr td:nth-child(7)::before { content: "Departure Status"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #reportsTable:not(.is-intern-table) tbody tr td:nth-child(8)::before { content: "Face Match Confidence"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }

    /* Intern specific labels for Records & Reports */
    #recordsTable.is-intern-table tbody tr td:nth-child(1)::before,
    #reportsTable.is-intern-table tbody tr td:nth-child(1)::before { content: "Intern ID"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable.is-intern-table tbody tr td:nth-child(2)::before,
    #reportsTable.is-intern-table tbody tr td:nth-child(2)::before { content: "Intern Name"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable.is-intern-table tbody tr td:nth-child(3)::before { content: "Intern Role"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #reportsTable.is-intern-table tbody tr td:nth-child(3)::before { content: "Attendance Date"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable.is-intern-table tbody tr td:nth-child(4)::before,
    #reportsTable.is-intern-table tbody tr td:nth-child(4)::before { content: "Check In Time"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable.is-intern-table tbody tr td:nth-child(5)::before,
    #reportsTable.is-intern-table tbody tr td:nth-child(5)::before { content: "Check Out Time"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable.is-intern-table tbody tr td:nth-child(6)::before,
    #reportsTable.is-intern-table tbody tr td:nth-child(6)::before { content: "Attendance Status"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable.is-intern-table tbody tr td:nth-child(7)::before,
    #reportsTable.is-intern-table tbody tr td:nth-child(7)::before { content: "Departure Status"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }
    #recordsTable.is-intern-table tbody tr td:nth-child(8)::before,
    #reportsTable.is-intern-table tbody tr td:nth-child(8)::before { content: "Face Match Confidence"; font-weight: 600; font-size: 0.76rem; color: #64748b; text-align: left; }

    /* Card Field Labels for Payroll Runs Table */
    #payrollRunsTable tbody tr td:nth-child(1) {
        border-bottom: 2px solid #f1f5f9 !important;
        padding-bottom: 12px !important;
        margin-bottom: 4px !important;
    }
    #payrollRunsTable tbody tr td:nth-child(1)::before {
        content: "Period";
        font-weight: 700;
        font-size: 0.8rem;
        color: #475569;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    #payrollRunsTable tbody tr td:nth-child(2)::before { content: "Run Date"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #payrollRunsTable tbody tr td:nth-child(3)::before { content: "Staff Count"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #payrollRunsTable tbody tr td:nth-child(4)::before { content: "Status"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #payrollRunsTable tbody tr td:nth-child(5)::before { content: "Checkouts"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #payrollRunsTable tbody tr td:nth-child(6)::before { display: none !important; }
    #payrollRunsTable tbody tr td:nth-child(6) {
        border-bottom: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding-top: 14px !important;
        padding-bottom: 0 !important;
        margin-top: 4px !important;
        width: 100% !important;
    }
    #payrollRunsTable tbody tr td:nth-child(6) a,
    #payrollRunsTable tbody tr td:nth-child(6) .btn {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 40px !important;
        font-size: 0.92rem !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
    }

    /* Card Field Labels for Staff Salaries Table */
    #staffSalariesTable tbody tr td:nth-child(1) {
        border-bottom: 2px solid #f1f5f9 !important;
        padding-bottom: 12px !important;
        margin-bottom: 4px !important;
    }
    #staffSalariesTable tbody tr td:nth-child(1)::before { content: "Staff Member"; font-weight: 700; font-size: 0.8rem; color: #475569; }
    #staffSalariesTable tbody tr td:nth-child(2)::before { content: "Department"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #staffSalariesTable tbody tr td:nth-child(3)::before { content: "Designation"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #staffSalariesTable tbody tr td:nth-child(4)::before { content: "Monthly Salary"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #staffSalariesTable tbody tr td:nth-child(5)::before { content: "Effective From"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #staffSalariesTable tbody tr td:nth-child(6)::before { content: "Bank Vault"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #staffSalariesTable tbody tr td:nth-child(7)::before { display: none !important; }
    #staffSalariesTable tbody tr td:nth-child(7) {
        border-bottom: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding-top: 14px !important;
        padding-bottom: 0 !important;
        width: 100% !important;
    }
    #staffSalariesTable tbody tr td:nth-child(7) .d-flex {
        width: 100% !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    #staffSalariesTable tbody tr td:nth-child(7) a,
    #staffSalariesTable tbody tr td:nth-child(7) .btn {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 38px !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
    }

    /* Card Field Labels for Missing Checkouts Table */
    #missingCheckoutsTable tbody tr td:nth-child(1)::before { content: "Date"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #missingCheckoutsTable tbody tr td:nth-child(2)::before { content: "Staff Member"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #missingCheckoutsTable tbody tr td:nth-child(3)::before { content: "Check In"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #missingCheckoutsTable tbody tr td:nth-child(4)::before { content: "Scheduled Shift"; font-weight: 600; font-size: 0.78rem; color: #64748b; }
    #missingCheckoutsTable tbody tr td:nth-child(5)::before { display: none !important; }
    #missingCheckoutsTable tbody tr td:nth-child(5) {
        border-bottom: none !important;
        width: 100% !important;
        padding-top: 12px !important;
    }
    #missingCheckoutsTable tbody tr td:nth-child(5) form {
        width: 100% !important;
    }

    /* Card Field Labels for Detailed Payroll Records Table (#payrollTable) */
    #payrollTable tbody tr td:nth-child(1) {
        border-bottom: 2px solid #f1f5f9 !important;
        padding-bottom: 12px !important;
        margin-bottom: 4px !important;
    }
    #payrollTable tbody tr td:nth-child(1)::before { content: "Staff"; font-weight: 700; font-size: 0.8rem; color: #475569; }
    #payrollTable tbody tr td:nth-child(2)::before { content: "Working Days"; font-weight: 600; font-size: 0.76rem; color: #64748b; }
    #payrollTable tbody tr td:nth-child(3)::before { content: "Present"; font-weight: 600; font-size: 0.76rem; color: #64748b; }
    #payrollTable tbody tr td:nth-child(4)::before { content: "Half Day"; font-weight: 600; font-size: 0.76rem; color: #64748b; }
    #payrollTable tbody tr td:nth-child(5)::before { content: "Absent"; font-weight: 600; font-size: 0.76rem; color: #64748b; }
    #payrollTable tbody tr td:nth-child(6)::before { content: "LOP Days"; font-weight: 600; font-size: 0.76rem; color: #64748b; }
    #payrollTable tbody tr td:nth-child(7)::before { content: "Gross Salary"; font-weight: 600; font-size: 0.76rem; color: #64748b; }
    #payrollTable tbody tr td:nth-child(8)::before { content: "Per Day Rate"; font-weight: 600; font-size: 0.76rem; color: #64748b; }
    #payrollTable tbody tr td:nth-child(9)::before { content: "LOP Deduction"; font-weight: 600; font-size: 0.76rem; color: #64748b; }
    #payrollTable tbody tr td:nth-child(10)::before { content: "Advance"; font-weight: 600; font-size: 0.76rem; color: #64748b; }
    #payrollTable tbody tr td:nth-child(11)::before { content: "Other"; font-weight: 600; font-size: 0.76rem; color: #64748b; }
    #payrollTable tbody tr td:nth-child(12)::before { content: "Net Salary"; font-weight: 700; font-size: 0.8rem; color: #10b981; }
    #payrollTable tbody tr td:nth-child(13)::before { display: none !important; }
    #payrollTable tbody tr td:nth-child(13) {
        border-bottom: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding-top: 14px !important;
        padding-bottom: 0 !important;
        width: 100% !important;
    }
    #payrollTable tbody tr td:nth-child(13) a,
    #payrollTable tbody tr td:nth-child(13) .btn {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 38px !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
    }

    /* Mobile Pagination & Info Layout */
    .dataTables_info {
        text-align: center !important;
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
    }

    .dataTables_paginate {
        justify-content: center !important;
        width: 100%;
    }

    .dataTables_paginate .pagination {
        justify-content: center !important;
        width: 100%;
        gap: 3px;
    }

    .dataTables_paginate .page-link {
        min-width: 30px;
        height: 30px;
        padding: 0 8px;
        font-size: 0.78rem;
    }
}


/* ── Topbar Action Buttons (Outline & Color change only on hover) ── */
.btn-topbar-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid transparent;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-topbar-secondary {
    border-color: #e2e8f0;
    color: #475569;
    background-color: #ffffff;
}

.btn-topbar-secondary:hover {
    border-color: #94a3b8;
    color: #0f172a;
    background-color: #f8fafc;
}

.btn-topbar-danger {
    border-color: #fecaca;
    color: #dc2626;
    background-color: #ffffff;
}

.btn-topbar-danger:hover {
    border-color: #ef4444;
    color: #ffffff;
    background-color: #ef4444;
}


.dashboard-card {
    transition: box-shadow 0.2s, border-color 0.2s;
    cursor: default;
}

.dashboard-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

.dashboard-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.bg-purple-subtle {
    background-color: rgba(111, 66, 193, 0.12);
}

.text-purple {
    color: #6f42c1;
}

.card {
    border-radius: 12px;
}

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #0f172a;
}

.recognition-log {
    height: 480px;
    overflow-y: auto;
}

.log-card {
    flex-shrink: 0;
}

.log-card-role {
    font-size: 0.58rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}

.role-student {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.role-intern {
    background: rgba(147, 51, 234, 0.12);
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.25);
}

.role-staff {
    background: rgba(234, 88, 12, 0.12);
    color: #ea580c;
    border: 1px solid rgba(234, 88, 12, 0.25);
}

.log-card-batch {
    display: inline-flex;
    align-items: center;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #475569;
    font-weight: 500;
    font-size: 0.68rem;
}

@media (max-width: 991.98px) {
    .recognition-log {
        height: 260px;
    }
}

#recognitionLog::-webkit-scrollbar {
    width: 6px;
}

#recognitionLog::-webkit-scrollbar-track {
    background: transparent;
}

#recognitionLog::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.badge {
    font-weight: 500;
}

.alert {
    border-radius: 10px;
    border: none;
}

select.form-select-sm {
    font-size: 0.85rem;
}

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        left: -100%;
        z-index: 1000;
        transition: left 0.3s;
    }

    .sidebar.show {
        left: 0;
    }

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

/* Sidebar collapsible submenu styling */
.sidebar .submenu-header {
    font-weight: 500;
    color: #f8fafc !important;
}

.sidebar .submenu-header.active {
    background-color: rgba(59, 130, 246, 0.15);
    /* Sleek translucent highlight for active headers */
    color: #fff !important;
}

.sidebar .nav-link[data-bs-toggle="collapse"] .collapse-icon {
    transition: transform 0.2s ease;
}

.sidebar .nav-link[data-bs-toggle="collapse"][aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

.sidebar .submenu-list {
    list-style: none;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.sidebar .submenu-link {
    padding: 8px 12px 8px 24px;
    font-size: 0.85rem;
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    border-radius: 6px;
    margin: 2px 0;
    transition: all 0.2s;
}

.sidebar .submenu-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
}

.sidebar .submenu-link.active {
    background-color: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}

/* Select2 Premium Theme Customizations */
.select2-container--bootstrap-5 .select2-selection--multiple {
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 3px 6px !important;
    min-height: 42px !important;
    background-color: #ffffff !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection--multiple {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: #3b82f6 !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 3px 10px 4px 22px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    position: relative !important;
    margin: 3px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #ffffff !important;
    opacity: 0.8 !important;
    border: none !important;
    background: none !important;
    position: absolute !important;
    left: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 0.9rem !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ef4444 !important;
    opacity: 1 !important;
    background: none !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    z-index: 1060 !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background-color: #3b82f6 !important;
}

.select2-container--bootstrap-5 .select2-selection--single {
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    height: 42px !important;
    padding: 6px 12px !important;
}

/* ========================================
   MOBILE APP BOTTOM NAVIGATION BAR
   ======================================== */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.07);
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-nav-items {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 0 10px;
    position: relative;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #64748b;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 3px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: #f97316;
}

.mobile-nav-item.active {
    color: #f97316;
    font-weight: 700;
}

.mobile-nav-item.active i {
    transform: scale(1.15);
    color: #f97316;
}

/* Floating Center Action Button (FAB) */
.mobile-nav-fab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    position: relative;
    top: -14px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-fab .fab-btn {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: 3.5px solid #ffffff;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.45rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-fab:hover .fab-btn,
.mobile-nav-fab:active .fab-btn {
    transform: scale(1.1);
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.6);
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.mobile-nav-fab .fab-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #ea580c;
    margin-top: 3px;
}

@media (max-width: 991.98px) {
    .main-content {
        padding-bottom: 90px !important;
    }
}

/* ── Selectable Data Table Rows (Desktop) ── */
@media (min-width: 768px) {
    #studentsTable tbody tr,
    #staffTable tbody tr {
        cursor: pointer;
        transition: background-color 0.15s ease-in-out;
    }

    #studentsTable tbody tr.table-primary,
    #staffTable tbody tr.table-primary {
        background-color: #eff6ff !important;
    }
}

#studentsTable tbody tr a,
#studentsTable tbody tr button,
#studentsTable tbody tr input,
#staffTable tbody tr a,
#staffTable tbody tr button,
#staffTable tbody tr input {
    cursor: pointer;
}