:root {
    --erp-bg: #f4f7f6;
    --primary-color: #032da1;
    --primary-gradient: linear-gradient(135deg, #032da1 0%, #001d6b 100%);
    --erp-white: #ffffff;
    --erp-border: #e2e8f0;
    --erp-header-bg: #f8fafc;
    --erp-text-main: #1a202c;
    --erp-text-muted: #64748b;
    --primary-gradient: linear-gradient(135deg, #032da1 0%, #004e92 100%);
    --secondary-gradient: linear-gradient(135deg, #e51429 0%, #ff5252 100%);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.05);
    --premium-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 8px rgba(0, 0, 0, 0.02);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 1px 10px rgba(0, 0, 0, 0.03);
}

/* Font Size Helpers */
.fs-11 { font-size: 11px !important; }
.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; }
.fs-14 { font-size: 14px !important; }
.fs-15 { font-size: 15px !important; }
.fs-16 { font-size: 16px !important; }
.fs-17 { font-size: 17px !important; }
.fs-18 { font-size: 18px !important; }

.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

.text-danger { color: #dc3545 !important; }
.text-success { color: #28a745 !important; }



.btn-primary { background-color: #032da1 !important; border-color: #032da1 !important; color: #fff !important; }
.btn-primary:hover { background-color: #001d6b !important; border-color: #001d6b !important; }

.badge-primary { background-color: #032da1 !important; color: #fff !important; }
.bg-light-primary { background-color: rgba(3, 45, 161, 0.08) !important; }
/* Master Layout Structure */
.erp-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 110px);
    background: var(--erp-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: auto;
    max-width: 100%;
    margin-top: 10px;
}

.erp-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--erp-white);
    border-radius: 15px;
    width: 100%;
}

.erp-header {
    padding: 20px 30px;
    border-bottom: 1px solid #edf2f7;
    background: var(--erp-white);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.erp-body {
    flex: 1;
    padding: 0 30px 20px 30px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    position: relative;
}

/* Title & Navigation */
.interface-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.interface-title h2 {
    margin: 0;
    font-weight: 800;
    color: var(--erp-text-main);
    font-size: 22px;
    letter-spacing: -0.5px;
}

.back-btn-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #475569;
    transition: all 0.2s;
    border: 1px solid var(--erp-border);
    cursor: pointer;
    text-decoration: none !important;
}

.back-btn-circle:hover {
    background: #e2e8f0;
    color: var(--primary-color);
    transform: translateX(-2px);
}

/* Filters & Controls */
.erp-filter-row-top {
    background: var(--erp-header-bg);
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #eef0f2;
    margin-bottom: 0;
}

.filter-item-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-select-wrapper {
    min-width: 180px;
}

.has-float-label {
    display: block;
    position: relative;
    margin-bottom: 0;
}

.has-float-label span {
    position: absolute;
    top: -8px;
    left: 10px;
    background: var(--erp-header-bg);
    padding: 0 5px;
    font-size: 10px;
    color: var(--erp-text-muted);
    font-weight: 600;
    z-index: 1;
}

/* Modern Data Table */
.data-table-container {
    flex: 1;
    border-radius: 12px;
    overflow: auto;
    border: 1px solid var(--erp-border);
    margin-top: 15px;
    background: var(--erp-white);
    max-height: 650px; /* Default fixed height for large reports */
    position: relative;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table th {
    background: var(--erp-header-bg);
    padding: 12px 15px;
    font-size: 11px;
    font-weight: 700;
    color: var(--erp-text-muted);
    text-transform: uppercase;
    border-bottom: 2px solid var(--erp-border);
    position: sticky;
    top: 0;
    z-index: 10;
    text-align: left;
}

.modern-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #edf2f7;
    font-size: 13px;
    vertical-align: middle;
}

.modern-table tr:hover td {
    background: var(--erp-header-bg);
}

.modern-table tfoot th,
.modern-table tfoot td {
    position: sticky;
    bottom: -1px; /* Align precisely with bottom of container */
    z-index: 10;
    background: var(--erp-header-bg);
    border-top: 2px solid var(--erp-border);
}

/* Premium Buttons & Badges */
.btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
}

.btn-header {
    background: #059669;
    color: #fff;
}

.btn-header:hover {
    background: #047857;
    color: #fff;
    transform: translateY(-1px);
}

.btn-no-header {
    background: #3b82f6;
    color: #fff;
}

.btn-no-header:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-1px);
}

.status-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.status-marks-entered {
    background: #dcfce7;
    color: #166534;
}

.status-marks-pending {
    background: #fee2e2;
    color: #991b1b;
}

/* Custom Scrollbar */
.data-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.data-table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.data-table-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Premium UI CSS */
.dashboard-container {
    padding: 0px;
    background: #fff;
    min-height: 100vh;
}

/* Welcome Header */
.welcome-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.welcome-header.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: #fff;
    margin-top: -10px;
    padding: 15px 10px;
    border-bottom: 1px solid transparent;
}

.welcome-header.sticky-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-bottom: 1px solid #edf2f7;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Search Type Header */
.search-type-header {
    background: #f8fafc;
    padding: 8px 15px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f1f5f9;
}
.search-type-header i { margin-right: 5px; }

.welcome-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.welcome-text p {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Active Batch Badge */
.batch-badge {
    background: rgba(3, 45, 161, 0.1);
    color: #032da1;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid rgba(3, 45, 161, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.batch-badge i { font-size: 10px; }

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--premium-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.kpi-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.kpi-header > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

.icon-students { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.icon-teachers { background: linear-gradient(135deg, #2af598 0%, #009efd 100%); }
.icon-exams { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.icon-finance { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.icon-biometric { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); }
.icon-biometric-alt { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }

.kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.kpi-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

/* Financial Quick Actions */
.financial-quick-row {
    gap: 15px;
    display: flex;
    flex-wrap: wrap;
}
.finance-btn {
    flex: 1;
    min-width: 200px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1e293b;
    box-shadow: var(--premium-shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}
.finance-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #032da1;
}
.finance-btn i {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
    color: #fff;
}
.btn-instant { background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%); }
.btn-assign { background: linear-gradient(135deg, #2dd4bf 0%, #0d9488 100%); }
.btn-planner { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); }

/* Quick Actions Row */
.quick-actions-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.premium-card {
    background: #fff;
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: var(--premium-shadow);
    border: none;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #244c94;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title i {
    margin-right: 10px;
}

/* Action Badges Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.action-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.action-item:hover {
    background: #fff;
    border-color: #032da1;
    color: #032da1;
    transform: translateX(5px);
    text-decoration: none;
}

.action-item i {
    width: 32px;
    height: 32px;
    background: #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.action-item:hover i {
    background: #032da1;
    color: #fff;
}

/* Student Search */
.search-wrapper {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.premium-search {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.premium-search:focus {
    border-color: #032da1;
    box-shadow: 0 0 0 4px rgba(3, 45, 161, 0.1);
    outline: none;
}

.search-icon-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* Search Results Dropdown */
.search-results-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-top: 10px;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    border: 1px solid #e2e8f0;
}

.result-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}

.result-item:hover {
    background: #f8fafc;
}

.result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    background: #e2e8f0;
}

.result-info h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.result-info p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

/* Section Loading Spinner */
.section-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.spinner-premium {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #032da1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
/* Birthday Spotlight */
.birthday-tabs {
    display: flex;
    gap: 10px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
}
.birthday-tab {
    padding: 6px 15px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    font-weight: 500;
}
.birthday-tab.active {
    background: #fff;
    color: #032da1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.birthday-flex-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    min-height: 100px;
}
.birthday-user-card {
    min-width: 180px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 14px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--premium-shadow);
}
.birthday-user-card:hover {
    border-color: #032da1;
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}
.b-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    object-fit: cover;
    background: #f1f5f9;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.b-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 5px;
}
.b-avatar-wrapper::after {
    content: '\f1fd';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    bottom: 5px;
    right: 0;
    background: #ef4444;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.b-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 2px;
}
.b-date {
    font-size: 12px;
    color: #ef4444;
    font-weight: 500;
}

/* Nepali Calendar Card */
.nepali-calendar-card {
    background: linear-gradient(135deg, #244c94 0%, #1e3a8a 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.nepcal-month {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.nepcal-date {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 10px 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.nepcal-day {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}
.nepcal-year {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.8rem;
    opacity: 0.6;
    font-weight: 700;
}
.nepcal-bg-icon {
    position: absolute;
    bottom: -20px;
    left: -20px;
    font-size: 8rem;
    opacity: 0.05;
    transform: rotate(-15deg);
}
.attendance-body {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 10px 0;
}
.att-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.att-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.att-stat-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.present { background: #10b981; box-shadow: 0 0 10px rgba(16,185,129,0.3); }
.dot.absent { background: #ef4444; box-shadow: 0 0 10px rgba(239,68,68,0.3); }

/* Action Hub Cards */
.action-hub-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 20px;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05);
}
.action-hub-card:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 45px rgba(3, 45, 161, 0.15);
}
.action-hub-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    z-index: 2;
}
.academic-hub .action-hub-icon { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); }
.exam-hub .action-hub-icon { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.finance-hub .action-hub-icon { background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%); }
.biometric-hub .action-hub-icon { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.payment-hub .action-hub-icon { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.assignment-hub .action-hub-icon { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }

.action-hub-content { z-index: 2; flex: 1; }
.action-hub-content h3 { font-size: 20px; font-weight: 700; margin-bottom: 5px; color: #1e293b; }
.action-hub-content p { font-size: 13px; color: #64748b; margin: 0; }
.hub-footer { margin-top: 10px; font-size: 12px; font-weight: 600; color: #4338ca; }

.hub-decoration {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: currentColor;
    opacity: 0.03;
    border-radius: 50%;
    z-index: 1;
}

/* Premium Modal */
.premium-modal .modal-content {
    border-radius: 24px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.premium-modal .modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 20px 30px;
    background: #f8fafc;
    border-radius: 24px 24px 0 0;
}

/* Modal Form Professionalization */
.hub-content .wraper,
.hub-content main,
.hub-content .admin_tempblock,
.hub-content .admin_tempsec,
.hub-content .admin_sec,
.hub-content .subsec_sec,
.hub-content .subject_l,
.hub-content .subject_lhead {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
}

.hub-content .subject_lhead {
    display: none !important; 
}

.hub-content .subject_addbtn {
    display: none !important; 
}

.hub-content .form-group label {
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    margin-bottom: 8px;
    display: block;
}

.hub-content .form-control {
    border-radius: 10px;
    border: 1px solid #e2e8f0 !important; 
    padding: 10px 15px;
    height: auto !important;
    font-size: 14px;
    transition: all 0.2s;
}

.hub-content .form-control:focus {
    border-color: #032da1;
    box-shadow: 0 0 0 4px rgba(3, 45, 161, 0.1);
}

.hub-content .error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    font-weight: 500;
}
.premium-list .list-group-item {
    border: none;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 5px;
    transition: all 0.2s;
}
.premium-list .list-group-item:hover {
    background-color: #f1f5f9;
    transform: translateX(8px);
}

@media (max-width: 1200px) {
    .quick-actions-row {
        grid-template-columns: 1fr;
    }
}
/* Hub Modal Styles */
.hub-modal .modal-dialog {
    max-width: 95vw;
    width: 95vw;
    height: 90vh;
    margin: 10px auto;
}
.hub-modal .modal-content {
    height: 100%;
    border: none;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal-footer-premium {
    padding: 20px 30px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #fff;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.modal-footer {
    border-radius: 0 0 24px 24px !important;
}

.btn-save-modal {
    background: linear-gradient(135deg, #0346a1 0%, #003366 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-save-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.3);
    background: linear-gradient(135deg, #0450b5 0%, #004080 100%);
    color: white;
}
.btn-cancel-modal {
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-cancel-modal:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
    transform: translateY(-1px);
}
.hub-modal .modal-body {
    display: flex;
    flex-direction: column;
    height: calc(90vh - 50px); /* Total modal height minus header */
}
.hub-container {
    flex: 1;
    display: flex;
    overflow: hidden;
    height: 100%;
}
.hub-sidebar {
    width: 250px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 15px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.hub-menu-category {
    padding: 10px 20px 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.hub-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}
.hub-menu-item i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.7;
}
.hub-menu-item:hover {
    background: #f1f5f9;
    color: #032da1;
    text-decoration: none;
}
.hub-menu-item.active {
    background: #e0e7ff;
    color: #032da1;
    border-right: 3px solid #032da1;
}
.hub-content {
    flex: 1;
    padding: 0px;
    overflow-y: auto;
    background: #fff;
}

/* Premium Form UI */
.premium-form-container {
    padding: 25px;
}
.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.premium-form-group {
    position: relative;
    margin-bottom: 12px;
}

.premium-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 13px;
    transition: all 0.2s;
}

.premium-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.premium-input-wrapper i.input-icon {
    position: absolute;
    left: 15px;
    color: #94a3b8;
    font-size: 16px;
    transition: all 0.2s;
    pointer-events: none;
}

.premium-form-control {
    width: 100%;
    padding: 12px 15px 12px 45px !important;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.3s ease;
}

.premium-form-control:focus {
    background: #fff;
    border-color: #032da1;
    box-shadow: 0 0 0 4px rgba(3, 45, 161, 0.1);
    outline: none;
}

.premium-form-control:focus + i.input-icon {
    color: #032da1;
}

.premium-form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Specific for Select */
select.premium-form-control {
    appearance: none;
    cursor: pointer;
}

/* Error States */
.premium-form-group.has-error .premium-form-control {
    border-color: #ef4444;
}
.premium-form-group.has-error i.input-icon {
    color: #ef4444;
}
.premium-error-text {
    font-size: 11px;
    color: #ef4444;
    font-weight: 600;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Nepali Date Picker Z-Index Fix for Modals */
.ndp-container {
    z-index: 9999 !important;
}
.ndp-corner-all {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    border: 1px solid #e2e8f0 !important;
}

/* Global Overrides for Third-Party Components */
.swal2-container {
    z-index: 20000 !important;
}

/* ERP Toast Notifications */
#erp-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 21000;
}

.erp-toast {
    display: flex;
    align-items: center;
    background: #fff;
    min-width: 320px;
    padding: 15px 20px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border-left: 6px solid #ccc;
    animation: erpSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #ffffff;
    pointer-events: auto;
}

.erp-toast.success { border-left-color: #10b981; }
.erp-toast.error, .erp-toast.danger { border-left-color: #e11d48; }
.erp-toast.warning { border-left-color: #f59e0b; }
.erp-toast.info { border-left-color: #3b82f6; }

.erp-toast i {
    font-size: 24px;
    margin-right: 18px;
    flex-shrink: 0;
}
.erp-toast.success i { color: #10b981; }
.erp-toast.error i, .erp-toast.danger i { color: #e11d48; }
.erp-toast.warning i { color: #f59e0b; }
.erp-toast.info i { color: #3b82f6; }

.erp-toast-content {
    flex-grow: 1;
}

.erp-toast-title {
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 2px;
}

.erp-toast span {
    font-size: 14px;
    color: #64748b;
}

@keyframes erpSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modal Footer Override if needed */
.modal-footer-premium {
    justify-content: space-between !important;
}

/* Premium Status Selection Card & Switch */
.status-selection-card {
    background: #f8fafc;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    margin-top: 10px;
}
.status-selection-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}
.status-flex-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.status-info .status-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: block;
    margin-bottom: 2px;
}
.status-desc {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.4;
}

.custom-switch-premium {
    position: relative;
    width: 64px;
    height: 34px;
    flex-shrink: 0;
}
.custom-switch-premium input {
    opacity: 0;
    width: 0;
    height: 0;
}
.custom-switch-premium label {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e2e8f0;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    margin-bottom: 0;
    border: 1px solid #cbd5e1;
}
.custom-switch-premium label:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.custom-switch-premium input:checked + label {
    background-color: #10b981;
    border-color: #059669;
}
.custom-switch-premium input:checked + label:before {
    transform: translateX(30px);
}

/* Premium Buttons */
.btn-premium {
    background: linear-gradient(135deg, #032da1 0%, #004e92 100%);
    color: #fff !important;
    border: none;
    padding: 10px 22px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
}
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(3, 45, 161, 0.3);
    opacity: 0.95;
    color: #fff;
}
.btn-premium:active {
    transform: translateY(0);
}

.btn-outline-premium {
    background: #fff;
    color: #0346a1 !important;
    border: 1.5px solid #0346a1;
    padding: 10px 22px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}
.btn-outline-premium:hover {
    background: #0346a1;
    color: #f0f7ff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(3, 70, 161, 0.1);
}

/* Search Styling - Consolidated */
.premium-search-wrapper {
    position: relative;
    min-width: 250px;
}
.premium-search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    color: #1e293b;
}
.premium-search-input:focus {
    border-color: #0346a1;
    box-shadow: 0 0 0 3px rgba(3, 70, 161, 0.1);
    outline: none;
    background: #fff;
}
.premium-search-wrapper .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 14px;
}
.search-results-count {
    position: absolute;
    right: 4px;
    bottom: -22px;
    font-size: 10px;
    font-weight: 700;
    color: #1e40af;
    background: #eff6ff;
    padding: 1px 10px;
    border-radius: 6px;
    pointer-events: none;
    display: none;
    border: 1px solid #dbeafe;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Search Highlight Utility */
.erp-highlight {
    background: #fef08a !important; /* Soft yellow highlight */
    color: #854d0e !important;    /* Darker yellow text for contrast */
    padding: 2px 4px;
    margin: 0 -2px;
    border-radius: 4px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.gap-3 { gap: 1rem !important; }

/* Standardized Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}
.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.status-badge.inactive {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
}

/* Premium Course Badges (Level Associations) */
.course-badge-premium {
    background: rgba(3, 70, 161, 0.05);
    color: #0346a1;
    border: 1px solid rgba(3, 70, 161, 0.1);
    text-transform: none;
    padding: 2px 8px;
    font-weight: 600;
    font-size: 11px;
    border-radius: 20px;
    display: inline-block;
}

/* Premium Dropdown Menus */
.dropdown-menu-premium {
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12), 0 5px 15px rgba(0,0,0,0.05) !important;
    padding: 8px;
    min-width: 160px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}
.dropdown-menu-premium .dropdown-item {
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}
.dropdown-menu-premium .dropdown-item:hover {
    background-color: rgba(3, 70, 161, 0.05);
    color: #0346a1;
    transform: translateX(5px);
}
.dropdown-menu-premium .dropdown-divider {
    border-top: 1px solid rgba(0,0,0,0.05);
    margin: 5px 0;
}

/* Premium Hub Cards */
.hub-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 8px rgba(0, 0, 0, 0.02);
}
.hub-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 1px 10px rgba(0, 0, 0, 0.03);
    border-color: #0346a1;
}
.border-primary-left { border-left: 4px solid #0346a1 !important; }

/* Premium Button Standard */
.btn-premium {
    background: linear-gradient(135deg, #0346a1 0%, #004e92 100%);
    color: #fff !important;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(3, 70, 161, 0.3);
    opacity: 0.9;
}

.btn-premium-danger {
    background: #fff;
    color: #ef4444 !important;
    border: 1px solid #fee2e2;
    transition: all 0.2s ease;
}

.btn-premium-danger:hover {
    background: #ef4444;
    color: #fff !important;
    border-color: #ef4444;
    box-shadow: 0 4px 10px rgba(239, 68, 110, 0.2);
}

/* Premium Form Selectable Chips */
.selectable-chips-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px 0;
}
.selectable-chip {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    user-select: none;
}
.selectable-chip:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.selectable-chip.active {
    background: rgba(3, 70, 161, 0.1);
    color: #0346a1;
    border-color: #0346a1;
}
.selectable-chip.active .chip-icon {
    color: #0346a1;
}
.chip-icon {
    font-size: 14px;
    transition: all 0.2s ease;
}
.cursor-pointer { cursor: pointer; }

/* Global Form Container Scoped Fix */
.premium-form-container { max-width: 100%; }


/* Modal Width Optimization */
@media (min-width: 1200px) {
    .modal-xl {
        max-width: 1140px;
    }
}

.modal-xl .modal-content {
    border-radius: 16px;
    height: 85vh; /* Boxy fixed height */
    display: flex;
    flex-direction: column;
}

/* 95% Viewport Modal for Complex Forms */
.modal-95 {
    max-width: 95vw !important;
    width: 95vw !important;
    height: 95vh !important;
    margin: 2.5vh auto !important;
}
.modal-95 .modal-content {
    height: 100% !important;
    border-radius: 16px !important;
}

.modal-dialog-scrollable .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px !important; /* Standardized internal padding */
}

/* Side-by-Side Assignment Layout */
.side-by-side-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.side-by-side-col-left {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
    padding-right: 10px;
    padding-left: 10px;
    border-right: 1px solid #edf2f7;
}

.side-by-side-col-right {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
    padding-right: 10px;
    padding-left: 10px;
}

/* Search UI Alignment Polish */
.premium-search-field-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.premium-search-field-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 5;
    font-size: 13px;
}

.premium-search-field-wrapper .form-control-premium {
    padding-left: 35px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    height: 40px !important;
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    transition: all 0.25s ease !important;
}

.premium-search-field-wrapper .form-control-premium:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(3, 45, 161, 0.1) !important;
}

/* Chip Aesthetics Polish */
.subject-option-chip-premium {
    padding: 7px 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    margin-right: 6px;
    font-weight: 500;
}

.subject-option-chip-premium:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(3, 45, 161, 0.2);
    border-color: var(--primary-color);
}

.subject-option-chip-premium.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.remove-icon-premium {
    color: #ef4444; /* Soft Red */
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.remove-icon-premium:hover {
    color: #dc2626; /* Darker Red */
    opacity: 1;
    transform: scale(1.2);
}

.table-premium td, .table-premium th {
    vertical-align: middle !important;
}

.table-premium {
    width: 100%;
    margin-bottom: 0;
    color: #334155;
}
.table-premium thead th {
    background: #f8fafc;
    border-bottom: 2px solid #edf2f7;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 8px 8px;
}

.table-premium tbody td {
    padding: 8px 0px;
    vertical-align: middle;
    border-top: 1px solid #f1f5f9;
    font-size: 14px;
    transition: all 0.2s ease;
}
.table-premium tbody tr:hover td {
    background-color: #f8fafc;
}

/* Classroom Hub Styles */
.ml-5-custom { margin-left: 62px; }
.bg-primary-soft { background: rgba(3, 45, 161, 0.08); }
.rounded-16 { border-radius: 16px; }

.classroom-avatar {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.student-count-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 20px;
    font-weight: 600;
    font-size: 11px;
    border: 1px solid #dbeafe;
}

.assignment-group {
    margin-bottom: 0px;
}
.assignment-group:last-child {
    margin-bottom: 0;
}
.group-label {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 1px;
    font-family: inherit;
}

.assignment-pill-premium {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    margin-right: 4px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.assignment-pill-premium .sub-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 6px;
    border-right: 1px solid #e2e8f0;
    padding-right: 6px;
}

.assignment-pill-premium .teacher-name {
    color: #64748b;
}

.assignment-pill-premium.compulsory { border-color: #bee3f8; background: #ebf8ff; }
.assignment-pill-premium.optional { border-color: #feebc8; background: #fffaf0; }
.assignment-pill-premium.additional { border-color: #e9d8fd; background: #faf5ff; }

.assignment-pill-premium.class-teacher-pill {
    /* background: #fff; */
    border-color: #fbd38d !important;
    box-shadow: 0 2px 4px rgba(235, 150, 4, 0.1);
}

.assignment-pill-premium:hover {
    transform: translateY(-1px);
    border-color: var(--primary-color) !important;
    background: #fff !important;
    box-shadow: 0 4px 6px rgba(3, 45, 161, 0.1);
}

.subject-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.subject-chip {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.subject-chip.compulsory { background: #ebf8ff; color: #2b6cb0; border-color: #bee3f8; }
.subject-chip.optional { background: #fffaf0; color: #dd6b20; border-color: #feebc8; }
.subject-chip.additional { background: #faf5ff; color: #805ad5; border-color: #e9d8fd; }

.subject-chip:hover {
    background: #fff;
    transform: scale(1.05);
}

.btn-action-premium {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    transition: all 0.2s;
}

.btn-action-premium:hover {
    background: #fff;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(3, 45, 161, 0.1);
}

/* Tighter Dashboard/Form Utilities */
.fs-12 { font-size: 12px !important; }
.fs-10 { font-size: 10px !important; }
.fw-600 { font-weight: 600 !important; }

.form-control-premium-sm {
    height: 36px !important;
    font-size: 12px !important;
    padding: 2px 10px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
}

.premium-label-sm {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #64748b !important;
    margin-bottom: 6px !important;
    display: inline-block !important;
}

/* Bootstrap Select Picker Refined Premium Theme */
.bootstrap-select.premium-select-sm .dropdown-toggle {
    height: 38px !important;
    background-color: #f8fafc !important;
    border: 1px solid #d1d5db !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    padding: 0 14px !important;
    display: flex !important;
    align-items: center !important;
    color: #334155 !important;
    font-weight: 500 !important;
}

.bootstrap-select.premium-select-sm .dropdown-toggle:hover {
    border-color: #94a3b8 !important;
}

.bootstrap-select.premium-select-sm.show .dropdown-toggle {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(3, 70, 161, 0.08) !important;
    background: #fff !important;
}

/* Premium Record Status Toggle (Course Form Style) */
.status-selection-card {
    background: #f8fafc !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    margin-bottom: 4px !important;
}

.status-flex-layout {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.status-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #475569 !important;
    display: block !important;
    margin-bottom: 2px !important;
}

.status-desc {
    font-size: 12px !important;
    color: #64748b !important;
}

.custom-switch-premium {
    position: relative !important;
    display: inline-block !important;
    width: 48px !important;
    height: 24px !important;
}

.custom-switch-premium input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.custom-switch-premium label {
    position: absolute !important;
    cursor: pointer !important;
    top: 0; left: 0; right: 0; bottom: 0 !important;
    background-color: #cbd5e1 !important;
    transition: .3s !important;
    border-radius: 24px !important;
    margin-bottom: 0 !important;
}

.custom-switch-premium label:before {
    position: absolute !important;
    content: "" !important;
    height: 18px !important;
    width: 18px !important;
    left: 3px !important;
    bottom: 3px !important;
    background-color: white !important;
    transition: .3s !important;
    border-radius: 50% !important;
}

.custom-switch-premium input:checked + label {
    background-color: #10b981 !important;
}

.custom-switch-premium input:checked + label:before {
    transform: translateX(24px) !important;
}

/* Standardized Hub Action Button (Three Dots) */
.btn-action-premium {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    border: none !important;
    background: transparent !important;
    color: #64748b !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.btn-action-premium:hover, 
.btn-action-premium:focus,
.show > .btn-action-premium {
    background-color: #f1f5f9 !important;
    color: var(--primary-color) !important;
    outline: none !important;
}

.dropdown-premium-wrapper .dropdown-menu {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    padding: 8px !important;
    min-width: 160px !important;
}

.bootstrap-select.premium-select-sm .dropdown-toggle:hover,
.bootstrap-select.premium-select-sm .dropdown-toggle:focus {
    background-color: #fff !important;
    border-color: var(--primary-color) !important;
}

.bootstrap-select.premium-select-sm .dropdown-menu {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    /* box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    padding: 8px !important; */
    margin-top: 4px !important;
}

.bootstrap-select.premium-select-sm .dropdown-menu li a {
    border-radius: 6px !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
    color: #475569 !important;
}

.bootstrap-select.premium-select-sm .dropdown-menu li a:hover {
    background: #f1f5f9 !important;
    color: var(--primary-color) !important;
}

.bootstrap-select.premium-select-sm .dropdown-menu li.selected a {
    background: var(--primary-color) !important;
    color: #fff !important;
}

/* Highlighting */
.erp-highlight {
    background: #ffeb3b !important;
    color: #000 !important;
    padding: 0 2px !important;
    border-radius: 2px !important;
    font-weight: 700 !important;
}

/* Spacing Utilities */
.gap-4 { gap: 1.5rem !important; }
.premium-form-row-spaced { margin-bottom: 1.5rem !important; }

.premium-table-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

 /* Autocomplete Suggestions */
.autocomplete-wrapper {
    position: relative;
}
.autocomplete-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    max-height: 200px;
    overflow-y: auto;
    margin-top: -2px;
}
.autocomplete-suggestions.show {
    display: block;
    animation: acFadeIn 0.15s ease;
}
@keyframes acFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.autocomplete-item {
    padding: 10px 16px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f8fafc;
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:hover {
    background: #f0f4ff;
    color: #1e40af;
}
.autocomplete-item.selected,
.autocomplete-item:active {
    background: #e0e7ff;
    color: #1e40af;
    font-weight: 600;
}
.autocomplete-empty,
.autocomplete-no-match {
    padding: 14px 16px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    font-style: italic;
}
.autocomplete-suggestions::-webkit-scrollbar {
    width: 5px;
}
.autocomplete-suggestions::-webkit-scrollbar-track {
    background: transparent;
}
.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.premium-form-control-sm {
    width: 100%;
    padding: 8px 15px 8px 45px !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.3s ease;
}
/* Premium Hub & Subject Card Styles */
.hub-card {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hub-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    opacity: 0.8;
    z-index: 1;
}

.card-compulsory::before { background: linear-gradient(90deg, #0ea5e9, #6366f1); }
.card-optional::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.card-additional::before { background: linear-gradient(90deg, #8b5cf6, #d946ef); }
.card-extra::before { background: linear-gradient(90deg, #f43f5e, #fb7185); }

.hub-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.9);
}

.subject-icon-bg {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.hub-card:hover .subject-icon-bg {
    transform: rotate(10deg) scale(1.1);
}

.card-compulsory { background-color: #ebf8ff !important; border-color: #bee3f8; color: #2b6cb0; }
.card-optional { background-color: #fffaf0 !important; border-color: #feebc8; color: #dd6b20; }
.card-additional { background-color: #faf5ff !important; border-color: #e9d8fd; color: #805ad5; }
.card-extra { background-color: #fff1f2 !important; border-color: #ffe4e6; color: #e11d48; }

.card-compulsory .subject-icon-bg { background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(2, 132, 199, 0.1) 100%); }
.card-optional .subject-icon-bg { background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%); }
.card-additional .subject-icon-bg { background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%); }
.card-extra .subject-icon-bg { background: linear-gradient(135deg, rgba(244, 63, 94, 0.1) 0%, rgba(225, 29, 72, 0.1) 100%); }

.subject-icon-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    z-index: 2;
}

.subject-name-text {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.2;
    font-weight: 800;
    transition: color 0.3s ease;
}

.hub-card:hover .subject-name-text {
    color: #032da1;
}

.subject-code-badge {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(0,0,0,0.06);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.badge-premium {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.badge-practical { background: rgba(3, 105, 161, 0.08); color: #0369a1; border-color: rgba(3, 105, 161, 0.1); }
.badge-optional { background-color: #fffaf0 !important; color: #dd6b20; border-color: #feebc8; }
.badge-compulsory { background-color: #ebf8ff !important; color: #2b6cb0; border-color: #bee3f8; }
.badge-additional { background-color: #faf5ff !important; color: #805ad5; border-color: #e9d8fd; }
.badge-extra { background-color: #fff1f2 !important; color: #e11d48; border-color: #ffe4e6; }

.btn-action-premium {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    color: #64748b;
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.03);
}

.btn-action-premium:hover {
    background: #ffffff;
    color: #032da1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.erp-highlight {
    background: #fef08a;
    padding: 0 2px;
    border-radius: 4px;
    color: #854d0e;
    font-weight: 900;
}

.hub-group-title {
    color: #1e293b;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 28px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.8;
}

.hub-group-title::after {
    content: "";
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #e2e8f0 0%, transparent 100%);
}

.subject-group-section {
    margin-bottom: 50px;
}

.hub-card .card-body{
    padding: 1.25rem !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hub-container-inner::-webkit-scrollbar { width: 6px; }
.hub-container-inner::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* Hub Table & Component Styles */
.course-table-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}
.premium-table {
    width: 100%;
    margin-bottom: 0;
    color: #334155;
}
.premium-table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #edf2f7;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 8px 12px;
}
.premium-table tbody td {
    padding: 8px 12px;
    vertical-align: middle;
    border-top: 1px solid #f1f5f9;
    font-size: 14px;
    transition: all 0.2s ease;
}
.premium-table tbody tr:hover td {
    background-color: #f8fafc;
}
.course-name-cell {
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
    text-align: left;
}
.subject-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.subject-chip {
    background: #e2e8f0;
    color: #1e293b;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
}
.subject-chip i {
    font-size: 9px;
    margin-right: 4px;
    opacity: 0.6;
}
.subject-chip .marks-info {
    color: #94a3b8;
    margin-left: 4px;
    font-weight: 400;
}

.bg-soft-primary { background: #eff6ff !important; }
.border-primary-subtle { border-color: #dbeafe !important; }
.text-primary { color: #032da1 !important; }

/* Classroom Pill Styles */
.font-weight-500 { font-weight: 500; }
.assignment-pill-premium {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    color: #475569;
    display: inline-flex;
    align-items: center;
}
.assignment-pill-premium .sub-name {
    font-weight: 700;
    margin-right: 4px;
}
.assignment-pill-premium .teacher-name {
    opacity: 0.8;
    text-align: left;
}
.assignment-pill-premium.class-teacher-pill {
    background: #f0f7ff;
    border-color: #bee3f8;
    color: #0346a1;
}

/* Helper Utilities */
.opacity-5 { opacity: 0.5; }
.rounded-16 { border-radius: 16px !important; }


.avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
    border: 1px solid var(--primary-color);
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.avatar-circle-sm {
    width: 35px !important;
    height: 35px !important;
}

.hidden-column {
    display: none !important;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.filter-row {
    background: #f8fafc;
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #eef2f7;
}

.ac-status-badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ac-active {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #22c55e !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
}
.ac-active i {
    color: #22c55e;
}
.ac-inactive {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}
.ac-inactive i {
    color: #ef4444;
}
/* Premium Header and Filters (Added for consistency across modules) */
.premium-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-icon {
    width: 45px;
    height: 45px;
    background: #1e40af;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.header-info h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
}
.header-info p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}
.header-actions {
    display: flex;
    gap: 10px;
}
.invoice-search-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.filter-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
}
.form-control-premium {
    height: 45px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 15px;
    font-size: 14px;
    background: #f1f5f9; /* Light grey/blue background from screenshot */
    color: #334155;
    font-weight: 600;
    transition: all 0.2s;
    appearance: none; /* For custom select arrows if needed */
}
.form-control-premium:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.btn-load {
    background: #1e40af; /* Deeper blue from screenshot */
    color: #fff;
    height: 45px;
    padding: 0 30px;
    border-radius: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    transition: all 0.3s;
    cursor: pointer;
    text-transform: capitalize;
}
.btn-load:hover {
    background: #1e3a8a;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
    transform: translateY(-1px);
}

/* Sticky Columns Support */
.sticky-col-left {
    position: sticky !important;
    z-index: 25 !important;
    background: inherit;
}
.modern-table thead th.sticky-col-left {
    z-index: 30 !important;
}

/* Offsets for specific columns */
.col-sno   { left: 0; width: 50px; }
.col-date  { left: 50px; width: 100px; }
.col-inv   { left: 150px; width: 80px; }
.col-name  { left: 230px; width: 200px; }
.col-class { left: 430px; width: 120px; }

.sticky-col-right {
    position: sticky !important;
    right: 0;
    z-index: 25 !important;
    background: inherit;
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
}
.modern-table thead th.sticky-col-right {
    z-index: 30 !important;
}

/* Ensure sticky columns have solid background on hover/alternating rows */
.modern-table tr:nth-child(even) .sticky-col-left,
.modern-table tr:nth-child(even) .sticky-col-right {
    background: #fdfdfd !important;
}
.modern-table tr:hover .sticky-col-left,
.modern-table tr:hover .sticky-col-right {
    background: var(--erp-header-bg) !important;
}
.modern-table tfoot .sticky-col-left,
.modern-table tfoot .sticky-col-right {
    background: var(--erp-header-bg) !important;
    z-index: 35 !important;
}

/* Bootstrap Select Premium Fix */
.filter-group .bootstrap-select {
    width: 100% !important;
}
.filter-group .bootstrap-select > .dropdown-toggle {
    height: 45px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    padding: 0 15px !important;
    font-size: 14px !important;
    color: #1e293b !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.filter-group .bootstrap-select > .dropdown-toggle:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
}
.filter-group .bootstrap-select .filter-option {
    padding: 0 !important;
}
