/**
 * ==========================================================================
 * CollegeMan - Modern Design System & Theme Engine (theme-modern.css)
 * ==========================================================================
 * Provides modern design tokens, cohesive flat button architecture, fixes for
 * button text color cascading bugs, standard input metrics, viewport-centered
 * modals, and clean table headers. Backward-compatible with Bootstrap 2.3.2.
 */

:root {
    /* Brand Palette */
    --cm-primary: #2563eb;
    --cm-primary-hover: #1d4ed8;
    --cm-primary-active: #1e40af;
    --cm-primary-light: #eff6ff;

    --cm-success: #16a34a;
    --cm-success-hover: #15803d;
    --cm-success-active: #166534;
    --cm-success-light: #f0fdf4;

    --cm-danger: #dc2626;
    --cm-danger-hover: #b91c1c;
    --cm-danger-active: #991b1b;
    --cm-danger-light: #fef2f2;

    --cm-warning: #d97706;
    --cm-warning-hover: #b45309;
    --cm-warning-active: #92400e;
    --cm-warning-light: #fffbeb;

    --cm-info: #0284c7;
    --cm-info-hover: #0369a1;
    --cm-info-active: #075985;
    --cm-info-light: #f0f9ff;

    /* Slate Neutral Grayscale */
    --cm-slate-50: #f8fafc;
    --cm-slate-100: #f1f5f9;
    --cm-slate-200: #e2e8f0;
    --cm-slate-300: #cbd5e1;
    --cm-slate-400: #94a3b8;
    --cm-slate-500: #64748b;
    --cm-slate-600: #475569;
    --cm-slate-700: #334155;
    --cm-slate-800: #1e293b;
    --cm-slate-900: #0f172a;

    /* Surface & Borders */
    --cm-bg-body: #f8fafc;
    --cm-bg-card: #ffffff;
    --cm-border-color: #e2e8f0;
    --cm-border-focus: #3b82f6;

    /* Typography */
    --cm-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --cm-radius-sm: 4px;
    --cm-radius-md: 6px;
    --cm-radius-lg: 10px;

    /* Elevation */
    --cm-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --cm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --cm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   1. BUTTON SYSTEM & RED-TEXT CASCADING BUG FIXES
   ========================================================================== */

/* Base Button Styling: Modern, crisp, flat design (no 2012 glossy bevels) - Compact 24px Default */
.btn,
button.btn,
input[type="button"].btn,
input[type="submit"].btn,
input[type="reset"].btn,
a.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    font-family: var(--cm-font-family) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 20px !important;
    padding: 1px 10px !important;
    border-radius: var(--cm-radius-sm) !important;
    border: 1px solid transparent !important;
    text-shadow: none !important;
    box-shadow: var(--cm-shadow-sm) !important;
    transition: all 0.15s ease-in-out !important;
    cursor: pointer !important;
    text-decoration: none !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

/* Specific Sizes */
.btn-large,
.btn.btn-large,
a.btn.btn-large,
button.btn.btn-large,
input[type="submit"].btn.btn-large {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    line-height: 20px !important;
    padding: 6px 16px !important;
    font-size: 14px !important;
    border-radius: var(--cm-radius-md) !important;
}

.btn-small,
.btn.btn-small,
a.btn.btn-small,
button.btn.btn-small {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    line-height: 18px !important;
    padding: 1px 8px !important;
    font-size: 11.5px !important;
    border-radius: var(--cm-radius-sm) !important;
}

.btn-mini,
.btn.btn-mini,
a.btn.btn-mini,
button.btn.btn-mini {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    line-height: 18px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    border-radius: var(--cm-radius-sm) !important;
}

/* --------------------------------------------------------------------------
   CRITICAL FIX: Prevent .control-group.error, .errmsgdiv, or parent link
   selectors from overriding button text color with red.
   -------------------------------------------------------------------------- */

/* PRIMARY BUTTON */
.btn-primary,
.btn.btn-primary,
button.btn.btn-primary,
input[type="submit"].btn.btn-primary,
input[type="button"].btn.btn-primary,
a.btn.btn-primary,
.control-group.error input[type="submit"].btn.btn-primary,
.control-group.error input[type="button"].btn.btn-primary,
.control-group.error button.btn.btn-primary,
.errmsgdiv .btn.btn-primary,
.errmsgdiv a.btn.btn-primary {
    background: var(--cm-primary) !important;
    background-image: none !important;
    border-color: var(--cm-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn.btn-primary:hover,
input[type="submit"].btn.btn-primary:hover {
    background: var(--cm-primary-hover) !important;
    border-color: var(--cm-primary-hover) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25) !important;
}

.btn-primary:active,
.btn.btn-primary:active,
.btn-primary.active {
    background: var(--cm-primary-active) !important;
    color: #ffffff !important;
}

/* SUCCESS BUTTON */
.btn-success,
.btn.btn-success,
button.btn.btn-success,
input[type="submit"].btn.btn-success,
input[type="button"].btn.btn-success,
a.btn.btn-success,
.control-group.error input[type="submit"].btn.btn-success,
.control-group.error input[type="button"].btn.btn-success,
.control-group.error button.btn.btn-success,
.errmsgdiv .btn.btn-success,
.errmsgdiv a.btn.btn-success {
    background: var(--cm-success) !important;
    background-image: none !important;
    border-color: var(--cm-success) !important;
    color: #ffffff !important;
}

.btn-success:hover,
.btn.btn-success:hover,
a.btn.btn-success:hover,
button.btn.btn-success:hover,
input[type="submit"].btn.btn-success:hover {
    background: var(--cm-success-hover) !important;
    border-color: var(--cm-success-hover) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.25) !important;
}

.btn-success:active,
.btn.btn-success:active,
.btn-success.active {
    background: var(--cm-success-active) !important;
    color: #ffffff !important;
}

/* DANGER BUTTON */
.btn-danger,
.btn.btn-danger,
button.btn.btn-danger,
input[type="submit"].btn.btn-danger,
input[type="button"].btn.btn-danger,
a.btn.btn-danger,
.control-group.error input[type="submit"].btn.btn-danger,
.control-group.error input[type="button"].btn.btn-danger,
.control-group.error button.btn.btn-danger {
    background: var(--cm-danger) !important;
    background-image: none !important;
    border-color: var(--cm-danger) !important;
    color: #ffffff !important;
}

.btn-danger:hover,
.btn.btn-danger:hover,
a.btn.btn-danger:hover,
button.btn.btn-danger:hover,
input[type="submit"].btn.btn-danger:hover {
    background: var(--cm-danger-hover) !important;
    border-color: var(--cm-danger-hover) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.25) !important;
}

/* INFO BUTTON */
.btn-info,
.btn.btn-info,
button.btn.btn-info,
input[type="submit"].btn.btn-info,
input[type="button"].btn.btn-info,
a.btn.btn-info,
.control-group.error input[type="submit"].btn.btn-info,
.control-group.error input[type="button"].btn.btn-info,
.control-group.error button.btn.btn-info {
    background: var(--cm-info) !important;
    background-image: none !important;
    border-color: var(--cm-info) !important;
    color: #ffffff !important;
}

.btn-info:hover,
.btn.btn-info:hover,
a.btn.btn-info:hover,
button.btn.btn-info:hover,
input[type="submit"].btn.btn-info:hover {
    background: var(--cm-info-hover) !important;
    border-color: var(--cm-info-hover) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25) !important;
}

/* WARNING BUTTON */
.btn-warning,
.btn.btn-warning,
button.btn.btn-warning,
input[type="submit"].btn.btn-warning,
input[type="button"].btn.btn-warning,
a.btn.btn-warning,
.control-group.error input[type="submit"].btn.btn-warning,
.control-group.error input[type="button"].btn.btn-warning,
.control-group.error button.btn.btn-warning {
    background: var(--cm-warning) !important;
    background-image: none !important;
    border-color: var(--cm-warning) !important;
    color: #ffffff !important;
}

.btn-warning:hover,
.btn.btn-warning:hover,
a.btn.btn-warning:hover,
button.btn.btn-warning:hover,
input[type="submit"].btn.btn-warning:hover {
    background: var(--cm-warning-hover) !important;
    border-color: var(--cm-warning-hover) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25) !important;
}

/* DEFAULT / SECONDARY / CANCEL BUTTON */
.btn-default,
.btn-secondary,
.btn:not([class*="btn-"]),
a.btn:not([class*="btn-"]),
button.btn:not([class*="btn-"]) {
    background: #ffffff !important;
    background-image: none !important;
    color: var(--cm-slate-700) !important;
    border: 1px solid var(--cm-slate-300) !important;
}

.btn-default:hover,
.btn-secondary:hover,
.btn:not([class*="btn-"]):hover,
a.btn:not([class*="btn-"]):hover,
button.btn:not([class*="btn-"]):hover {
    background: var(--cm-slate-50) !important;
    color: var(--cm-slate-900) !important;
    border-color: var(--cm-slate-400) !important;
    box-shadow: var(--cm-shadow-sm) !important;
}

/* DISABLED STATE */
.btn.disabled,
.btn[disabled],
button[disabled].btn,
input[type="submit"][disabled].btn {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

/* ==========================================================================
   2. FORM CONTROLS & COMPACT INPUT STANDARDIZATION (24px Height)
   ========================================================================== */

/* Standard text/date/select fields - Compact 24px */
input[type="text"]:not(.select2-input),
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="search"]:not(.select2-search__field),
select.input-block-level,
.row-form input[type="text"],
.row-form input[type="password"],
.row-form select,
.sOrders input[type="text"],
.sOrders input[type="password"],
.sOrders select {
    font-family: var(--cm-font-family) !important;
    font-size: 14px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 20px !important;
    color: var(--cm-slate-800) !important;
    border: 1px solid var(--cm-slate-300) !important;
    border-radius: var(--cm-radius-sm) !important;
    padding: 1px 6px !important;
    background-color: #ffffff !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    box-sizing: border-box !important;
}

/* Explicitly preserve multi-line textarea dimensions */
textarea,
textarea.input-block-level,
.row-form textarea,
.sOrders textarea {
    font-family: var(--cm-font-family) !important;
    font-size: 14px !important;
    height: auto !important;
    min-height: 75px !important;
    line-height: 1.4 !important;
    color: var(--cm-slate-800) !important;
    border: 1px solid var(--cm-slate-300) !important;
    border-radius: var(--cm-radius-sm) !important;
    padding: 4px 8px !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
}

/* Compact Selectize Dropdown (Matches 24px inputs) */
.selectize-input {
    min-height: 24px !important;
    height: 24px !important;
    padding: 1px 6px !important;
    font-size: 14px !important;
    line-height: 20px !important;
    box-sizing: border-box !important;
    border-radius: var(--cm-radius-sm) !important;
}

.selectize-control.single .selectize-input:after {
    top: 50% !important;
    margin-top: -3px !important;
}

.selectize-dropdown {
    font-size: 14px !important;
}

/* Compact Select2 Single & Multiple Select Dropdowns */
.select2-container .select2-choice {
    height: 24px !important;
    line-height: 22px !important;
    font-size: 14px !important;
    padding: 0 6px !important;
    border-radius: var(--cm-radius-sm) !important;
}

.select2-container .select2-selection--single {
    height: 24px !important;
    min-height: 24px !important;
    border: 1px solid var(--cm-slate-300) !important;
    border-radius: var(--cm-radius-sm) !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 22px !important;
    font-size: 14px !important;
    padding-left: 6px !important;
    padding-right: 20px !important;
}

.select2-container .select2-selection--multiple {
    min-height: 26px !important;
    border: 1px solid var(--cm-slate-300) !important;
    border-radius: var(--cm-radius-sm) !important;
    background-color: #ffffff !important;
    padding: 1px 4px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    gap: 3px !important;
}

.select2-container .select2-selection--multiple .select2-search--inline {
    flex: 1 1 auto !important;
    display: inline-flex !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 150px !important;
    max-width: 100% !important;
    float: none !important;
}

.select2-container .select2-selection--multiple .select2-search--inline .select2-search__field {
    width: 100% !important;
    min-width: 100% !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 4px !important;
    margin: 0 !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    line-height: 20px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
}

.select2-container .select2-selection--multiple .select2-selection__choice {
    margin: 1px 2px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
    line-height: 18px !important;
    background-color: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 3px !important;
    color: #1e293b !important;
    float: none !important;
}

.select2-container .select2-selection--multiple .select2-selection__choice__remove {
    margin-right: 4px !important;
    color: #64748b !important;
    font-weight: bold !important;
    cursor: pointer !important;
}

/* Fix: Neutralize hidden <select> border/outline artifacts (specificity 0-2-1 beats both sources) */
select.input-block-level.select2-hidden-accessible,
select.select2-hidden-accessible {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* Fix: Modern focus ring for Select2 single-select (was missing from select2.css default theme) */
.select2-container .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--cm-primary) !important;
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Focus Ring */
input[type="text"]:focus:not(.select2-input),
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus,
.selectize-input.focus {
    border-color: var(--cm-primary) !important;
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* DATE PICKER FIX: Compact 24px date picker */
input[type="date"] {
    min-width: 135px !important;
    max-width: 165px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 1px 4px !important;
    border: 1px solid var(--cm-slate-300) !important;
    border-radius: var(--cm-radius-sm) !important;
    font-size: 14px !important;
    font-family: var(--cm-font-family) !important;
    color: var(--cm-slate-800) !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
}

/* Readonly & Disabled Inputs */
input[readonly],
textarea[readonly],
input[disabled],
select[disabled] {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
    cursor: default !important;
}

/* FORM ERROR BADGE STYLING */
.FormErrorMessage {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--cm-danger) !important;
    background-color: var(--cm-danger-light) !important;
    border: 1px solid #fecaca !important;
    border-radius: var(--cm-radius-sm) !important;
    padding: 3px 8px !important;
    margin-top: 4px !important;
    display: inline-block !important;
}

.FormErrorMessage:empty {
    display: none !important;
}

/* Required Indicator */
.required-star {
    color: var(--cm-danger) !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   3. UNIVERSAL VIEWPORT-CENTERED MODALS
   ========================================================================== */

/* Modern Centering for all Bootstrap modals */
.modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    max-width: 92vw !important;
    background-color: #ffffff !important;
    border: 1px solid var(--cm-slate-200) !important;
    border-radius: var(--cm-radius-lg) !important;
    box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.3), 0 10px 15px -5px rgba(15, 23, 42, 0.15) !important;
    z-index: 1050 !important;
    overflow: hidden !important;
}

.modal.fade {
    top: -50% !important;
    transition: opacity 0.2s linear, top 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.modal.fade.in {
    top: 50% !important;
}

.modal-header {
    background: var(--cm-slate-50) !important;
    border-bottom: 1px solid var(--cm-slate-200) !important;
    padding: 12px 20px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.modal-header h3,
.modal-header h4 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--cm-slate-800) !important;
    line-height: 1.3 !important;
}

.modal-body {
    padding: 20px !important;
    max-height: calc(85vh - 120px) !important;
    overflow-y: auto !important;
    background-color: #ffffff !important;
}

.modal-footer {
    background: var(--cm-slate-50) !important;
    border-top: 1px solid var(--cm-slate-200) !important;
    padding: 12px 20px !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
}

/* ==========================================================================
   4. TABLE & DATATABLES HEADER STYLING
   ========================================================================== */

.table thead th,
table.dataTable thead th,
.table thead tr th {
    background-color: var(--cm-slate-100) !important;
    color: var(--cm-slate-700) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-bottom: 2px solid var(--cm-slate-300) !important;
    padding: 9px 12px !important;
    text-shadow: none !important;
    vertical-align: middle !important;
}

.table tbody td {
    padding: 8px 12px !important;
    font-size: 13px !important;
    color: var(--cm-slate-800) !important;
    border-top: 1px solid var(--cm-slate-100) !important;
    vertical-align: middle !important;
}

.table-striped tbody tr:nth-child(odd) td {
    background-color: var(--cm-slate-50) !important;
}

.table-hover tbody tr:hover td {
    background-color: #f1f5f9 !important;
}

/* ==========================================================================
   5. WORKPLACE CARDS & CONTAINERS
   ========================================================================== */

.content .workplace {
    padding: 15px 20px 40px 20px !important;
}

.block-fluid,
.block {
    background-color: #ffffff !important;
    border: 1px solid var(--cm-slate-200) !important;
    border-radius: var(--cm-radius-md) !important;
    box-shadow: var(--cm-shadow-sm) !important;
}

.content .workplace .head {
    border-radius: var(--cm-radius-md) var(--cm-radius-md) 0 0 !important;
}

/* Clean Badge / Caption in Menus */
.caption.red {
    background-color: var(--cm-danger) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    padding: 2px 7px !important;
}

/* ==========================================================================
   6. SIDEBAR & NAVIGATION MENU (13px Font Size)
   ========================================================================== */

.menu,
.menu .navigation,
.menu .navigation li > a,
.menu .navigation li > a span.text,
.menu .navigation li > ul > li > a,
.menu .navigation li > ul > li > a span.text,
.navigation,
.navigation li,
.navigation li > a,
.navigation li > a span.text,
.navigation li > ul > li,
.navigation li > ul > li > a,
.navigation li > ul > li > a span.text,
.menu .user a {
    font-size: 13px !important;
}

/* ==========================================================================
   8. MODERN TABS & TAB PANES (Consolidated from StudentMaster.php)
   ========================================================================== */

#tabs.ui-tabs {
    background: transparent;
    border: none;
    padding: 0;
}

#tabs > ul,
#tabs .ui-tabs-nav {
    background: #ffffff;
    border: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-md);
    padding: 4px;
    margin: 0 0 20px 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 4px !important;
    list-style: none !important;
}

#tabs > ul > li,
#tabs .ui-tabs-nav li {
    background: #f8fafc;
    border: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-sm);
    margin: 0 !important;
    flex: 1 1 0 !important;
    text-align: center;
    list-style: none !important;
    overflow: hidden;
    float: none !important;
    display: block !important;
}

#tabs > ul > li > a,
#tabs .ui-tabs-nav li a {
    color: var(--cm-slate-600);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 4px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    text-align: center;
    outline: none;
}

#tabs > ul > li.ui-tabs-selected,
#tabs > ul > li.ui-tabs-active,
#tabs > ul > li.ui-state-active,
#tabs .ui-tabs-nav li.ui-tabs-selected,
#tabs .ui-tabs-nav li.ui-tabs-active,
#tabs .ui-tabs-nav li.ui-state-active {
    background: var(--cm-primary) !important;
    border-color: var(--cm-primary) !important;
}

#tabs > ul > li.ui-tabs-selected a,
#tabs > ul > li.ui-tabs-active a,
#tabs > ul > li.ui-state-active a,
#tabs .ui-tabs-nav li.ui-tabs-selected a,
#tabs .ui-tabs-nav li.ui-tabs-active a,
#tabs .ui-tabs-nav li.ui-state-active a {
    color: #ffffff !important;
}

#tabs > ul > li.disabled,
#tabs .ui-tabs-nav li.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9 !important;
}

#tabs > ul > li.disabled a,
#tabs .ui-tabs-nav li.disabled a {
    cursor: not-allowed;
    color: #94a3b8 !important;
}

.card-section {
    background: #ffffff;
    border: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-md);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.card-section h4 {
    margin: 0 0 16px 0;
    color: var(--cm-slate-800);
    font-size: 15px;
    font-weight: 700;
    border-bottom: 2px solid var(--cm-primary);
    padding-bottom: 8px;
}

.field-label {
    font-weight: 600;
    color: var(--cm-slate-600);
    font-size: 13px;
    margin-bottom: 4px;
    display: block;
}

.field-label .req {
    color: var(--cm-danger);
    font-weight: bold;
}

.tab-actions {
    text-align: center;
    padding: 15px 0 5px 0;
}

.tab-actions .btn-save-tab {
    font-size: 14px;
    font-weight: 700;
    padding: 10px 26px;
    border-radius: var(--cm-radius-sm);
}

/* ==========================================================================
   9. APPLICATION & REGISTRATION REVIEW CARDS (Consolidated from ApproveApplication / ApproveRegistration)
   ========================================================================== */

.app-ribbon {
    background: #f0f4f8;
    border: 1px solid #d5e1eb;
    border-radius: var(--cm-radius-sm);
    padding: 8px 15px;
    margin-bottom: 15px;
    font-size: 13px;
}

.app-card {
    background: #ffffff;
    border: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-md);
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.app-card-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--cm-slate-200);
    padding: 10px 16px;
    font-weight: 700;
    font-size: 14px;
    color: var(--cm-slate-800);
    border-radius: var(--cm-radius-md) var(--cm-radius-md) 0 0;
}

.app-card-body {
    padding: 16px;
}

.info-table {
    width: 100%;
    margin-bottom: 0;
}

.info-table td {
    padding: 6px 8px;
    vertical-align: middle;
    font-size: 13px;
    border-top: 1px solid #f1f5f9;
}

.info-table tr:first-child td {
    border-top: none;
}

.info-label {
    color: var(--cm-slate-500);
    font-weight: 600;
    width: 30%;
}

.info-val {
    color: var(--cm-slate-800);
    font-weight: 600;
}

.subject-pill {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 3px 8px;
    border-radius: var(--cm-radius-sm);
    margin: 2px 4px 2px 0;
    font-size: 12px;
    font-weight: 600;
}

/* Centered Modal Overlay & Document Viewer */
.modal-centered,
#documentviewerdiv {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    display: none;
    z-index: 1050;
    background-color: #ffffff;
    border: 1px solid var(--cm-slate-400);
    border-radius: var(--cm-radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    outline: none;
}

.modal-centered .modal-header,
#documentviewerdiv .modal-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--cm-slate-200);
    padding: 12px 18px;
    border-radius: var(--cm-radius-md) var(--cm-radius-md) 0 0;
}

.modal-centered .modal-body,
#documentviewerdiv .modal-body {
    padding: 16px 20px;
    max-height: calc(85vh - 120px) !important;
    overflow-y: auto;
}

.modal-centered .modal-footer,
#documentviewerdiv .modal-footer {
    background: #f8fafc;
    border-top: 1px solid var(--cm-slate-200);
    padding: 10px 18px;
    border-radius: 0 0 var(--cm-radius-md) var(--cm-radius-md);
    margin-bottom: 0;
}

#docview {
    width: 100%;
    height: 500px;
    border: 1px solid var(--cm-slate-300);
    background: #f9f9f9;
    display: block;
}

/* ==========================================================================
   10. ADMINISTRATIVE & HIERARCHY HELPERS (From UserManage / LogViewer)
   ========================================================================== */

.chkparent {
    margin-left: 5px !important;
    margin-right: 15px !important;
    margin-bottom: 5px !important;
}

.chkchild1 {
    margin-left: 60px !important;
    margin-right: 15px !important;
    margin-bottom: 5px !important;
}

.chkchild2 {
    margin-left: 120px !important;
    margin-right: 15px !important;
    margin-bottom: 5px !important;
}

.isb-right {
    margin-top: 10px !important;
}

.banned {
    background-color: #ffe6e6 !important;
    color: #a30000 !important;
}

.expired {
    background-color: #f0f0f0 !important;
    color: #666666 !important;
}

/* ==========================================================================
   11. TOP APPLICATION & STUDENT PORTAL HEADER BARS (From partials/header & Student/header)
   ========================================================================== */

.header-main-bar,
.header-student-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    box-sizing: border-box;
    background: #1e293b url('../img/backgrounds/header.jpg') left top repeat-x;
}

.header-main-brand,
.header-student-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
}

.header-main-brand .app-title,
.header-student-brand .app-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    line-height: 1;
}

.header-main-brand .year-pill,
.header-student-brand .year-pill {
    display: inline-flex;
    align-items: center;
    background-color: #0284c7;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.header-main-college,
.header-student-college {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 15px;
}

.header-main-college span,
.header-student-college span {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    line-height: 1;
}

.header-main-actions,
.header-student-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    gap: 6px;
}

.header-student-actions .portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1;
}

.header-main-actions .btn-header,
.header-main-brand .btn-header,
.header-student-actions .btn-header,
.header-student-brand .btn-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    line-height: 1.2;
    transition: all 0.15s ease;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn-header-default {
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-header-default:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-header-primary {
    background: #0284c7;
    color: #ffffff !important;
    border: 1px solid #0369a1;
}
.btn-header-primary:hover {
    background: #0369a1;
    color: #ffffff !important;
}

.btn-header-danger {
    background: #dc2626;
    color: #ffffff !important;
    border: 1px solid #b91c1c;
}
.btn-header-danger:hover {
    background: #b91c1c;
    color: #ffffff !important;
}

/* ==========================================================================
   12. STUDENT HUB DASHBOARD & TIMELINE WIDGETS (From studentdashboard.php)
   ========================================================================== */

.hub-container {
    padding: 15px 0 30px 0;
}
.hub-header-card {
    background: #ffffff;
    border: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-md);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.hub-student-meta h2 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: var(--cm-slate-900);
    font-weight: 700;
}
.hub-student-meta p {
    margin: 0;
    color: var(--cm-slate-500);
    font-size: 13px;
}
.hub-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.hub-badge-info { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.hub-badge-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.hub-badge-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.hub-badge-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

.progress-steps-card {
    background: #ffffff;
    border: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.steps-wrapper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 10px 0;
}
.steps-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    height: 4px;
    background: var(--cm-slate-200);
    z-index: 1;
}
.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}
.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 8px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    background: #ffffff;
    border: 3px solid var(--cm-slate-300);
    color: var(--cm-slate-500);
    transition: all 0.3s ease;
}
.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cm-slate-500);
    line-height: 1.3;
}
.step-item.step-done .step-circle {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}
.step-item.step-done .step-label {
    color: #15803d;
    font-weight: 700;
}
.step-item.step-active .step-circle {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
    animation: pulse 2s infinite;
}
.step-item.step-active .step-label {
    color: #0369a1;
    font-weight: 700;
}
.step-item.step-rejected .step-circle {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2);
}
.step-item.step-rejected .step-label {
    color: #b91c1c;
    font-weight: 700;
}
.step-item.step-pending .step-circle {
    background: #f8fafc;
    border-color: var(--cm-slate-300);
    color: #94a3b8;
}

.status-banner {
    border-radius: var(--cm-radius-md);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    border: 1px solid transparent;
}
.status-box-info { background: #f0f9ff; border-color: #bae6fd; color: #0369a1; }
.status-box-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.status-box-warning { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.status-box-danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

.status-banner-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.status-banner-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}
.status-box-info .status-banner-header h3 { color: #0284c7; }
.status-box-success .status-banner-header h3 { color: #16a34a; }
.status-box-warning .status-banner-header h3 { color: #d97706; }
.status-box-danger .status-banner-header h3 { color: #dc2626; }

.status-banner p {
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0 0 15px 0;
    color: #334155;
}

.remarks-container {
    background: #ffffff;
    border-left: 5px solid #dc2626;
    padding: 14px 18px;
    margin: 15px 0 20px 0;
    border-radius: var(--cm-radius-sm);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.remarks-container strong {
    color: #b91c1c;
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}
.remarks-container .remarks-text {
    color: #1e293b;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.details-grid-card {
    background: #ffffff;
    border: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.details-grid-card h4 {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #1e293b;
    font-weight: 700;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}
.details-table {
    width: 100%;
    border-collapse: collapse;
}
.details-table td {
    padding: 8px 12px;
    font-size: 13.5px;
    border-bottom: 1px solid #f1f5f9;
}
.details-table td.label-col {
    font-weight: 600;
    color: #64748b;
    width: 35%;
}
.details-table td.value-col {
    font-weight: 700;
    color: #1e293b;
}

.status-actions-bar {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.status-actions-bar .btn {
    font-weight: 600;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: var(--cm-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dash-card {
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: var(--cm-radius-md);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    margin-bottom: 20px;
    overflow: hidden;
}
.dash-card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e3e8ee;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
}
.dash-card-body {
    padding: 20px;
}
.step-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: var(--cm-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
}
.summary-preview-box {
    display: none;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--cm-radius-sm);
    padding: 16px 20px;
    margin-top: 15px;
    margin-bottom: 15px;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #dcfce7;
    font-size: 14px;
}
.summary-item:last-child {
    border-bottom: none;
}
.summary-label {
    font-weight: 600;
    color: #166534;
}
.summary-value {
    color: #14532d;
    font-weight: 700;
}
.instruction-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
}
.inst-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--cm-primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}
.inst-step-badge.check {
    background-color: #16a34a;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.3);
    font-size: 13px;
}
#confirmationModal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 550px;
    background: #fff;
    border-radius: var(--cm-radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--cm-slate-300);
}
#modalBackdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1040;
    backdrop-filter: blur(2px);
}
.modal-header-custom {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-md) var(--cm-radius-md) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-body-custom {
    padding: 20px;
}
.modal-footer-custom {
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--cm-slate-200);
    border-radius: 0 0 var(--cm-radius-md) var(--cm-radius-md);
    text-align: right;
}

/* ==========================================================================
   13. FORM VALIDATION & ERROR UTILITIES (From registrationform.php)
   ========================================================================== */

.input-error {
    border-color: #b94a48 !important;
    box-shadow: 0 0 4px rgba(185, 74, 72, 0.4) !important;
}
.has-error label {
    color: #b94a48;
}

/* ==========================================================================
   14. RESPONSIVE REPORT CONTAINERS & TABLE OVERFLOW HANDLING
   ========================================================================== */

.content,
.content .workplace {
    max-width: calc(100vw - 230px);
    box-sizing: border-box;
}

.block,
.block-fluid {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#areaToPrint,
.report-table-container,
.table-responsive,
.table-responsive-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100vh - 160px) !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
    display: block !important;
    clear: both;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-sm);
    background: #ffffff;
}

/* Ensure wide report tables maintain readable column structure */
#areaToPrint > table,
#areaToPrint > .sOrders,
#TableToPrint,
#DetTable,
table.sOrders {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    border-collapse: separate !important;
}

/* Explicit minimum width for wide multi-column registers */
.wide-table,
.sOrders.wide-table,
#TableToPrint.wide-table {
    min-width: 1800px !important;
}

/* Sticky headers when scrolling vertically inside report container */
.sOrders th,
#TableToPrint th,
#DetTable th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background-color: #f8fafc !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* Prominent, easily grabbable scrollbars */
#areaToPrint::-webkit-scrollbar,
.report-table-container::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 10px !important;
    height: 12px !important;
    display: block !important;
}

#areaToPrint::-webkit-scrollbar-track,
.report-table-container::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: #e2e8f0 !important;
    border-radius: 6px !important;
}

#areaToPrint::-webkit-scrollbar-thumb,
.report-table-container::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: #64748b !important;
    border-radius: 6px !important;
    border: 2px solid #e2e8f0 !important;
}

#areaToPrint::-webkit-scrollbar-thumb:hover,
.report-table-container::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #334155 !important;
}

/* Print mode overrides: never clip or scroll when printing or generating PDF */
@media print {
    .content,
    .content .workplace,
    .block,
    .block-fluid,
    #areaToPrint,
    .report-table-container,
    .table-responsive,
    .table-responsive-wrapper {
        overflow: visible !important;
        max-height: none !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        border: none !important;
    }

    #TableToPrint,
    #DetTable,
    table.sOrders,
    .wide-table,
    .sOrders.wide-table {
        width: 100% !important;
        min-width: 0 !important;
    }

    .sOrders th,
    #TableToPrint th,
    #DetTable th {
        position: static !important;
        box-shadow: none !important;
    }
}

/* ==========================================================================
   15. CHECKBOX & RADIO BUTTON VERTICAL CENTERING
   ========================================================================== */

/* Label Wrappers (Inline & Block) */
.radio,
.checkbox,
.radio.inline,
.checkbox.inline,
label.radio,
label.checkbox {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 24px !important;
    padding-left: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    gap: 6px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
}

/* Reset Bootstrap float, negative margin, and offset */
.radio input[type="radio"],
.checkbox input[type="checkbox"],
.radio.inline input[type="radio"],
.checkbox.inline input[type="checkbox"],
label.radio input[type="radio"],
label.checkbox input[type="checkbox"] {
    float: none !important;
    margin: 0 !important;
    position: static !important;
    vertical-align: middle !important;
    cursor: pointer !important;
}

/* Standalone & Table Checkboxes / Radios */
input[type="radio"],
input[type="checkbox"] {
    margin: 0 !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    position: relative;
    top: -1px;
    accent-color: var(--cm-primary);
}

/* Maintain horizontal spacing between adjacent inline radios / checkboxes */
.radio.inline + .radio.inline,
.checkbox.inline + .checkbox.inline,
label.radio.inline + label.radio.inline,
label.checkbox.inline + label.checkbox.inline {
    margin-left: 15px !important;
}

/* ==========================================================================
   16. MODERN ADMITTED STUDENT DASHBOARD SUITE
   ========================================================================== */

.student-hero-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: var(--cm-radius-lg);
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.student-hero-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.student-avatar-frame {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.85);
    overflow: hidden;
    background: #334155;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

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

.student-hero-info h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.student-hero-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.student-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
}
.student-pill.highlight {
    background: rgba(14, 165, 233, 0.25);
    border-color: rgba(14, 165, 233, 0.4);
    color: #38bdf8;
}
.student-pill.success {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.student-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* 4-Column KPI Metric Cards */
.kpi-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-md);
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.kpi-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.kpi-blue { background: #e0f2fe; color: #0284c7; }
.kpi-green { background: #dcfce7; color: #16a34a; }
.kpi-purple { background: #f3e8ff; color: #9333ea; }
.kpi-amber { background: #fef3c7; color: #d97706; }

.kpi-content {
    flex-grow: 1;
}
.kpi-label {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cm-slate-500);
    margin-bottom: 3px;
}
.kpi-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--cm-slate-900);
    line-height: 1.2;
}
.kpi-sub {
    font-size: 11px;
    color: var(--cm-slate-400);
    margin-top: 2px;
}

/* Dashboard Tab Navigation */
.dash-tabs-container {
    background: #ffffff;
    border: 1px solid var(--cm-slate-200);
    border-radius: var(--cm-radius-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    overflow: hidden;
    margin-bottom: 25px;
}

.dash-nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--cm-slate-200);
    margin: 0;
    list-style: none;
}

.dash-nav-pills > li > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--cm-radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--cm-slate-600);
    text-decoration: none;
    transition: all 0.2s;
    background: transparent;
}
.dash-nav-pills > li > a:hover {
    background: #e2e8f0;
    color: var(--cm-slate-900);
}
.dash-nav-pills > li.active > a,
.dash-nav-pills > li.active > a:hover,
.dash-nav-pills > li.active > a:focus {
    background: var(--cm-primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.dash-tab-body {
    padding: 20px;
}

/* Student Grid Tables */
.table-dash-student {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}
.table-dash-student th {
    background: #f8fafc;
    border-bottom: 2px solid var(--cm-slate-200);
    color: var(--cm-slate-700);
    font-weight: 700;
    font-size: 12.5px;
    padding: 10px 14px;
    text-align: left;
}
.table-dash-student td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--cm-slate-100);
    font-size: 13px;
    color: var(--cm-slate-800);
    vertical-align: middle;
}
.table-dash-student tr:hover td {
    background: #f1f5f9;
}

.subject-badge-compulsory {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}
.subject-badge-elective {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}
.subject-badge-grade {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* Quick Action Tiles */
.quick-action-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--cm-radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.2s ease;
}
.quick-action-card:hover {
    background: #ffffff;
    border-color: var(--cm-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}
.quick-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--cm-primary);
    flex-shrink: 0;
}
.quick-action-text strong {
    display: block;
    font-size: 13.5px;
    color: #0f172a;
    margin-bottom: 2px;
}
.quick-action-text span {
    font-size: 11.5px;
    color: #64748b;
}


