/* =====================================================================================================
   BE THEME  -  the "B&E Expert System - UI Mock" look for the whole application.
   Loaded right after ui-kit.css in Site.Master.  tokens live in /Content/lt/tokens.css, ui-kit.css owns the control styles;
   this file owns:
     0  (no tokens here - every value lives in /Content/lt/tokens.css)
     1-5  app shell (frame, sidebar, top bar, mode buttons, page canvas, footer) -> MOVED to /Content/lt/components.css s.13
          (only page-content heading / table-header rules remain under that heading here)
     6  shared components                     (be-hero, be-kpi, be-stat, be-pill ... used by dashboards)
     7  sign-in pages -> MOVED to /Content/lt/components.css s.14 (lt-auth)
     8  dark mode for legacy markup           (Bootstrap 3 / Gentelella / plugins with hard-coded white)
     9  small screens
   Styling only: no menu, permission or data behaviour lives here.
   ===================================================================================================== */

/* =====================================================================================================
   0. TOKENS  -  none here. Every colour / size / dark-mode value lives in /Content/lt/tokens.css.
   ===================================================================================================== */
::selection { background: var(--color-primary); color: #fff; }

/* =====================================================================================================
   1-5. FRAME, SIDEBAR, TOP BAR, MODE BUTTONS, PAGE CANVAS  -  moved to /Content/lt/components.css section 13 (lt- classes).
   Only the page-content rules below stay here.
   ===================================================================================================== */
body .x_panel, body .x_panel .x_panel { border-color: var(--color-card-border); }
body .right_col .x_panel .x_title h2, body .right_col h1, body .right_col h2, body .right_col h3 { color: var(--color-text); }
/* tables: uppercase small headers like the mock */
body .table > thead > tr > th, body .table thead th { text-transform: uppercase; font-size: 11px !important; letter-spacing: .06em !important; }

/* =====================================================================================================
   6. SHARED COMPONENTS  (opt-in classes; used by the dashboards)
   ===================================================================================================== */
.be-hero {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px;
    padding: 26px 28px; border-radius: 20px; color: #fff;
    background: radial-gradient(circle at 78% 130%, var(--color-glass-16) 0 140px, transparent 141px),
                radial-gradient(circle at 96% -20%, var(--color-glass-12) 0 110px, transparent 111px), var(--color-primary);
}
.be-hero small { opacity: .85; }
.be-hero h1, body .right_col .be-hero h1 { margin: 2px 0 4px; font-size: 28px; line-height: 1.2; color: #fff; font-weight: 600; }
.be-hero p { margin: 0; opacity: .85; }
.be-hero-big { padding: 12px 26px; border-radius: 18px; background: var(--color-glass-16); text-align: center; font-size: 12px; }
.be-hero-big b { display: block; font-size: 32px; line-height: 1.15; }
.be-hero .form-control, .be-hero select { background-color: var(--color-glass-95); color: #1c2340; border-color: transparent; }

.be-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--c, var(--color-primary)); background: color-mix(in srgb, var(--c, var(--color-primary)) 14%, transparent); }

/* =====================================================================================================
   7. SIGN-IN PAGES  -  moved to /Content/lt/components.css section 14 (lt-auth classes)
   ===================================================================================================== */

/* =====================================================================================================
   8. DARK MODE FOR LEGACY MARKUP
   Bootstrap 3, the Gentelella theme and the jQuery plugins paint many surfaces white or text grey.
   ===================================================================================================== */
[data-theme="dark"] body { color: var(--color-text); }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
[data-theme="dark"] label, [data-theme="dark"] legend, [data-theme="dark"] .control-label { color: var(--color-text); }
[data-theme="dark"] .text-muted, [data-theme="dark"] .help-block { color: var(--color-muted); }
[data-theme="dark"] hr { border-color: var(--color-card-border); }
[data-theme="dark"] small{color:#ffffff;}
[data-theme="dark"] #cdxPage .cdx-table tbody td {
    background-color: var(--color-surface) !important;
}
[data-theme="dark"] .x_panel, [data-theme="dark"] .panel, [data-theme="dark"] .panel-body, [data-theme="dark"] .well,
[data-theme="dark"] .modal-content, [data-theme="dark"] .dropdown-menu, [data-theme="dark"] .popover, [data-theme="dark"] .list-group-item,
[data-theme="dark"] .tile-stats, [data-theme="dark"] .thumbnail, [data-theme="dark"] .tab-content, [data-theme="dark"] .jumbotron,
[data-theme="dark"] .bg-white, [data-theme="dark"] .table, [data-theme="dark"] .table-responsive, [data-theme="dark"] .profile_details .profile_view {
    background-color: var(--color-surface) !important;
    color: var(--color-text);
    border-color: var(--color-card-border);
}
[data-theme="dark"] .lt-main .right_col > .x_panel .x_panel { background-color: var(--color-surface-soft) !important; }
[data-theme="dark"] body.be-dash .lt-main .right_col > .x_panel { background: transparent !important; }
[data-theme="dark"] .x_title, [data-theme="dark"] .modal-header, [data-theme="dark"] .modal-footer, [data-theme="dark"] .panel-heading, [data-theme="dark"] .panel-footer { border-color: var(--color-card-border) !important; }
[data-theme="dark"] .x_title h2, [data-theme="dark"] .x_title h2 small, [data-theme="dark"] .modal-title { color: var(--color-text) !important; }
[data-theme="dark"] .dropdown-menu > li > a, [data-theme="dark"] .dropdown-menu > li > label { color: var(--color-text); }
[data-theme="dark"] .dropdown-menu > li > a:hover, [data-theme="dark"] .dropdown-menu > li > a:focus { background: var(--color-primary-soft); color: var(--color-text); }
[data-theme="dark"] .dropdown-menu .divider { background-color: var(--color-card-border); }
[data-theme="dark"] .close { color: var(--color-text); text-shadow: none; }

[data-theme="dark"] .table > tbody > tr > td, [data-theme="dark"] .table > tbody > tr > th, [data-theme="dark"] .table > tfoot > tr > td { color: var(--color-text); }
[data-theme="dark"] .table > tbody > tr { background: transparent; }
[data-theme="dark"] .table > tbody > tr.danger > td, [data-theme="dark"] .table > tbody > tr > td.danger { background: var(--color-row-danger-dark); }
[data-theme="dark"] .table > tbody > tr.warning > td, [data-theme="dark"] .table > tbody > tr > td.warning { background: var(--color-row-warning-dark); }
[data-theme="dark"] .table > tbody > tr.info > td, [data-theme="dark"] .table > tbody > tr > td.info { background: var(--color-row-selected); }

[data-theme="dark"] .form-control, [data-theme="dark"] .input-group-addon, [data-theme="dark"] .select2-container .select2-selection,
[data-theme="dark"] .select2-dropdown, [data-theme="dark"] .multiselect-container, [data-theme="dark"] textarea, [data-theme="dark"] select, [data-theme="dark"] .msd-btn, [data-theme="dark"] .chkBoxWrapper {
    background-color: var(--color-surface-soft);
    color: var(--color-text);
    border-color: var(--color-border);
}
[data-theme="dark"] .form-control[disabled], [data-theme="dark"] .form-control[readonly], [data-theme="dark"] fieldset[disabled] .form-control { background-color: var(--color-surface-disabled); color: var(--color-muted); }
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
[data-theme="dark"] .select2-results__option { color: var(--color-text); }
[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true] { background: var(--color-primary-soft); }
[data-theme="dark"] .btn-default { background: var(--color-surface-soft); color: var(--color-text); border-color: var(--color-border); }
[data-theme="dark"] .btn-default:hover, [data-theme="dark"] .btn-default:focus { background: var(--color-primary-soft); color: var(--color-text); }
[data-theme="dark"] .nav-tabs > li.active > a, [data-theme="dark"] .nav-tabs > li.active > a:hover { background: transparent; }

/* date pickers, calendar, autocomplete */
[data-theme="dark"] .ui-widget-content, [data-theme="dark"] .ui-datepicker, [data-theme="dark"] .ui-autocomplete, [data-theme="dark"] .ui-menu,
[data-theme="dark"] .daterangepicker, [data-theme="dark"] .daterangepicker .calendar-table, [data-theme="dark"] .ui-timepicker-wrapper,
[data-theme="dark"] .bootstrap-datetimepicker-widget, [data-theme="dark"] .datepicker {
    background: var(--color-surface) !important; color: var(--color-text) !important; border-color: var(--color-card-border) !important;
}
[data-theme="dark"] .ui-widget-header { background: var(--color-surface-soft); color: var(--color-text); border-color: var(--color-card-border); }
[data-theme="dark"] .ui-state-default, [data-theme="dark"] .ui-widget-content .ui-state-default { background: var(--color-surface-soft); color: var(--color-text); border-color: var(--color-card-border); }
[data-theme="dark"] .ui-menu-item a, [data-theme="dark"] .ui-menu .ui-menu-item-wrapper { color: var(--color-text); }
[data-theme="dark"] .daterangepicker td.off { background: transparent; color: var(--color-placeholder); }
[data-theme="dark"] .daterangepicker td.available:hover { background: var(--color-primary-soft); }
[data-theme="dark"] .fc-unthemed th, [data-theme="dark"] .fc-unthemed td, [data-theme="dark"] .fc-unthemed thead, [data-theme="dark"] .fc-unthemed .fc-row,
[data-theme="dark"] .fc-unthemed .fc-content, [data-theme="dark"] .fc-unthemed .fc-popover { border-color: var(--color-card-border); }
[data-theme="dark"] .fc-unthemed .fc-today { background: var(--color-calendar-today-dark); }
[data-theme="dark"] .fc-state-default { background: var(--color-surface-soft); color: var(--color-text); text-shadow: none; border-color: var(--color-border); }

/* dashboards (dashboard-modern.css hard-codes light colours) */
[data-theme="dark"] .dash-modern { background: transparent; }   /* --dash-modern-* dark values: tokens.css */
[data-theme="dark"] .dash-modern .x_panel, [data-theme="dark"] .dash-modern .tile-stats { background: var(--color-surface) !important; }
[data-theme="dark"] .dash-modern .x_title { border-color: var(--color-card-border); }
[data-theme="dark"] .dash-modern .table > thead > tr > th { background: var(--color-table-head); }

/* pages that paint white inline */
[data-theme="dark"] .right_col [style*="background-color: white"], [data-theme="dark"] .right_col [style*="background-color:white"],
[data-theme="dark"] .right_col [style*="background: white"], [data-theme="dark"] .right_col [style*="background:white"],
[data-theme="dark"] .right_col [style*="background-color: #fff"], [data-theme="dark"] .right_col [style*="background-color:#fff"],
[data-theme="dark"] .right_col [style*="background: #fff"], [data-theme="dark"] .right_col [style*="background:#fff"] { background: var(--color-surface) !important; }
[data-theme="dark"] .right_col [style*="color: black"], [data-theme="dark"] .right_col [style*="color:black"],
[data-theme="dark"] .right_col [style*="color: #000"], [data-theme="dark"] .right_col [style*="color:#000"] { color: var(--color-text) !important; }

/* reports and printable documents stay light: they are paper */
[data-theme="dark"] .right_col iframe, [data-theme="dark"] .stiJsViewerMainPanel, [data-theme="dark"] [id*="ReportViewer"], [data-theme="dark"] .dxrd-preview { color-scheme: light; }

/* scrollbars */
[data-theme="dark"] * { scrollbar-color: #3a405a transparent; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--color-scrollbar); background-clip: content-box; }

/* =====================================================================================================
   9. SMALL SCREENS
   ===================================================================================================== */
@media (max-width: 700px) {
    .be-hero { padding: 20px; }
    .be-hero h1, body .right_col .be-hero h1 { font-size: 22px; }
}
/* side menu, top bar, main panel: small screens + print are in /Content/lt/components.css section 13.8 */

/* =====================================================================================================
   10. LIST PAGES  (the ~230 grid screens: search + Add New / Print / Excel / status, table, pager)
   CSS only, matched on the markup every list screen already shares. No element is moved, so page scripts that
   walk the DOM (for example $('.ddlstatus').parent().parent()) keep working.
   ===================================================================================================== */
/* page title ("Transporter", "Enquiry" ...) */
body .right_col > .x_panel h1:not(.be-hero h1) { font-size: 19px; font-weight: 600; margin: 0 0 12px; letter-spacing: 0; }
body .right_col > .x_panel .x_title { border-bottom: 0; padding: 0; margin-bottom: 8px; }
body .right_col > .x_panel .x_title h2 { font-size: 19px; font-weight: 600; }

/* search box: rounded field with the icon inside (mock .gs) */
body .input-group:has(> .input-group-addon .fa-search):has(> .txtfilter) {
    display: flex !important; align-items: center; gap: 8px; min-width: 240px; max-width: 360px; margin-bottom: 12px; padding: 0 12px;
    border: 1px solid var(--color-card-border); border-radius: var(--radius-xs); background: var(--color-page); color: var(--color-muted);
}
body .input-group:has(> .input-group-addon .fa-search):has(> .txtfilter) > .input-group-addon {
    width: auto; padding: 0; border: 0 !important; background: transparent !important; color: var(--color-muted);
}
body .input-group:has(> .input-group-addon .fa-search):has(> .txtfilter) > .txtfilter {
    flex: 1; min-width: 0; height: 40px; padding: 10px 0; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
}
body .input-group:has(> .input-group-addon .fa-search):has(> .txtfilter):focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-ring); }

/* action buttons: separate rounded buttons with a gap (mock .gr) */
body .btn-group.floatright:has(.ddlstatus, .btnExportExcel, .fa-print) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-btn-between); margin-bottom: 12px; }
body .btn-group.floatright:has(.ddlstatus, .btnExportExcel, .fa-print) > .btn,
body .btn-group.floatright:has(.ddlstatus, .btnExportExcel, .fa-print) > select {
    float: none; margin: 0 !important; border-radius: var(--radius-btn) !important; height: 36px; display: inline-flex; align-items: center; justify-content: center;
}
body .btn-group.floatright:has(.ddlstatus, .btnExportExcel, .fa-print) > .btn-primary { padding: 8px 16px; font-weight: 600; }
body .btn-group.floatright:has(.ddlstatus, .btnExportExcel, .fa-print) > .btn-primary ~ .btn-primary { background: var(--btn-primary-bg); border-color: var(--btn-primary-border); }
[data-theme="dark"] body .btn-group.floatright:has(.ddlstatus, .btnExportExcel, .fa-print) > .btn-primary ~ .btn-primary { background: var(--btn-primary-bg); border-color: var(--btn-primary-border); }
body .btn-group.floatright:has(.ddlstatus, .btnExportExcel, .fa-print) > .btn-primary:is(:hover, :focus) { background: var(--btn-primary-hover-bg); border-color: var(--btn-primary-border); color: var(--btn-primary-hover-text); }
/* square icon buttons: Print / Excel (mock .tb.sq) */
body .btn-group.floatright > .btn:has(> .fa-print), body .btn-group.floatright > .btn:has(> .fa-file-excel-o) {
    width: 38px; padding: 0 !important; background: var(--color-surface) !important; border: 1px solid var(--color-card-border) !important; color: var(--color-text) !important; box-shadow: none !important;
}
body .btn-group.floatright > .btn:has(> .fa-print):hover, body .btn-group.floatright > .btn:has(> .fa-file-excel-o):hover { background: var(--color-primary-soft) !important; color: var(--color-primary) !important; }
body .btn-group.floatright > .btn .fa-lg { font-size: 15px; }
/* status filter */
body .btn-group.floatright > select.ddlstatus {
    height: 36px !important; padding: 0 30px 0 12px; border: 1px solid var(--color-card-border) !important; background-color: var(--color-surface) !important; color: var(--color-text);
    font-weight: 500; box-shadow: none !important;
}

/* row actions: plain icons, no box (same tokens as lt-row-actions: edit = link colour, delete = red trash, activate = green) */
body .table td .btn-group:has(> i.btn.fa), body .table td.col-actions .btn-group {
    display: inline-flex !important; width: auto !important; border-radius: 0; overflow: visible; vertical-align: middle; gap: 0;
}
body .table td .btn-group > i.btn.fa, body .table td .btn-group > a.btn:has(> .fa) {
    display: inline-grid !important; place-items: center; width: 32px !important; height: 30px; padding: 0 !important; margin: 0 !important;
    border: 0 !important; border-radius: 0 !important; font-size: 14px; line-height: 30px; box-shadow: none !important; float: none;
}
body .table td .btn-group > .btn.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
/*body .table td .btn-group > .btn.btn-primary:is(:hover, :focus) { background: var(--btn-primary-hover-bg); color: var(--btn-primary-hover-text); filter: none; }*/
body .table td .btn-group > .btn.btn-danger { background: var(--color-row-delete); color: #fff; }
body .table td .btn-group > .btn.btn-success { background: var(--color-success); color: #fff; }
body .table td .btn-group > .btn.btn-default { background: var(--color-primary-soft); color: var(--color-primary); }
body .table td .btn-group > .btn:hover { filter: brightness(1.1); }
/* icon elements only (text buttons in a cell keep the rules above) */
body .table td .btn-group > i.btn.fa, body .table td .btn-group > a.btn:has(> .fa) { background: transparent; color: var(--row-action-edit); }
body .table td .btn-group > i.btn.fa.btn-danger, body .table td .btn-group > a.btn.btn-danger:has(> .fa) { background: transparent; color: var(--row-action-delete); }
body .table td .btn-group > i.btn.fa.btn-success, body .table td .btn-group > a.btn.btn-success:has(> .fa) { background: transparent; color: var(--row-action-active); }
body .table td .btn-group > i.btn.fa.btndelete::before { content: var(--icon-row-delete); }
body .table td .btn-group > i.btn.fa:hover, body .table td .btn-group > a.btn:has(> .fa):hover { color: var(--row-action-edit-hover); filter: none; }
body .table td .btn-group > i.btn.fa.btn-danger:hover { color: var(--row-action-delete); filter: var(--row-action-hover-filter); }
body .table td .btn-group > i.btn.fa.btn-success:hover { color: var(--row-action-active); filter: var(--row-action-hover-filter); }

/* "No records found" note uses the shared alert look (ui-kit.css .alert-info) */
body .right_col .alert.alert-info.divError { margin-bottom: 12px; }

/* pager bar (mock .pg): pages left, "Showing ..." pill + rows/page right */
body .tfootdiv, body .tfootdiv.shared-list-footer, body .tfootdiv.admission-list-footer {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    margin: 14px 0 0 !important; padding: 12px !important; border: 0 !important; border-radius: 14px !important;
    background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface)) !important;
}
body .tfootdiv .pagging { float: none; padding: 0; margin: 0; width: auto; }
body .tfootdiv > [class*="col-md"] { float: none; width: auto; padding: 0; }
body .tfootdiv .pagination { display: flex; flex-wrap: wrap; gap: var(--space-btn-between); margin: 0; }
body .tfootdiv .pagination > li > a, body .tfootdiv .pagination > li > span {
    min-width: 32px; height: 32px; margin: 0 !important; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--color-card-border) !important; border-radius: 9px !important; background: var(--color-surface); color: var(--color-primary); font-weight: 600; float: none;
}
body .tfootdiv .pagination > .active > a, body .tfootdiv .pagination > .active > span { background: var(--color-primary) !important; border-color: var(--color-primary) !important; color: #fff !important; box-shadow: none; }
body .tfootdiv .pagination > .disabled > a, body .tfootdiv .pagination > .disabled > span { background: transparent; color: var(--color-muted); border-color: transparent !important; }
body .tfootdiv .input-group { display: flex !important; align-items: center; gap: 8px; width: auto !important; float: none; margin: 0 !important; }
body .tfootdiv .input-group > .input-group-addon { width: auto; border: 0 !important; background: transparent !important; color: var(--color-muted); padding: 0 !important; }
/* the "Showing from x to y out of z items" label becomes a pill */
body .tfootdiv .input-group > .input-group-addon:has(> span:not([class])) {
    padding: 4px 12px !important; border-radius: 99px !important; background: color-mix(in srgb, var(--color-primary) 14%, transparent) !important;
    color: var(--color-primary); font-size: 12px; font-weight: 600; white-space: normal;
}
body .tfootdiv .input-group > select.ddlRowsPerPage {
    width: auto !important; min-width: 74px; height: 34px; border: 1px solid var(--color-card-border) !important; border-radius: 10px !important; background-color: var(--color-surface);
}
body .tfootdiv .input-group > .input-group.pull-right { display: none !important; }   /* old "scroll to top" link */
body hr:has(+ .row > .tfootdiv) { display: none; }
@media print { body .tfootdiv { display: none !important; } }

/* =====================================================================================================
   11. ROLE AUTHORIZATION  (Views/Admin/Configuration/SystemConfig/RoleAuthorization.ascx, #raAuthorizationPage)
   Look only. Markup, permissions model (page access + Add / Edit / Delete) and script are unchanged.
   ===================================================================================================== */
html body #raAuthorizationPage { color: var(--color-text); }
html body #raAuthorizationPage h1 { font-size: 19px; font-weight: 600; color: var(--color-text); margin: 0 0 14px; }
html body #raAuthorizationPage input[type=checkbox] { accent-color: var(--color-primary); }
html body #raAuthorizationPage .ra-toolbar { gap: 10px; margin-bottom: 16px; }
html body #raAuthorizationPage .ra-field > label { font-size: 12px; font-weight: 600; margin-bottom: 5px; color: var(--color-text); }
html body #raAuthorizationPage .ra-check-all { font-weight: 500; }
html body #raAuthorizationPage .btn { border-radius: var(--radius-btn); font-weight: 600; }
html body #raAuthorizationPage .btn-primary { background: var(--btn-primary-bg); border-color: var(--btn-primary-border); color: var(--btn-primary-text); }
html body #raAuthorizationPage .btn-primary:hover, html body #raAuthorizationPage .btn-primary:focus { background: var(--btn-primary-hover-bg); border-color: var(--btn-primary-border); color: var(--btn-primary-hover-text); }
html body #raAuthorizationPage .ra-outline { background: var(--color-page); color: var(--color-text); border: 1px solid var(--color-card-border); }
html body #raAuthorizationPage .ra-outline:hover, html body #raAuthorizationPage .ra-outline:focus { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-primary); }

/* summary: gradient cards (mock .gc) - blue / purple / green */
html body #raAuthorizationPage .ra-summary { gap: 14px; margin-bottom: 16px; }
html body #raAuthorizationPage .ra-metric {
    --c: var(--color-module-blue); position: relative; overflow: hidden; padding: 18px 20px; border-radius: 18px; box-shadow: none;
    background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, var(--color-gradient-shade)));
}
html body #raAuthorizationPage .ra-metric:nth-child(2) { --c: var(--color-module-purple); }
html body #raAuthorizationPage .ra-metric:nth-child(3) { --c: var(--color-module-green); }
html body #raAuthorizationPage .ra-metric::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--color-glass-12); }
html body #raAuthorizationPage .ra-metric-label { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
html body #raAuthorizationPage .ra-metric-value { font-size: 24px; font-weight: 700; }
html body #raAuthorizationPage .ra-metric-note { font-size: 12px; opacity: .8; }

/* search + apply-to-all */
html body #raAuthorizationPage .ra-search input { height: 40px; padding-left: 36px; border-radius: var(--radius-xs); border: 1px solid var(--color-card-border); background: var(--color-page); }
html body #raAuthorizationPage .ra-search > i { top: 13px; color: var(--color-muted); }
html body #raAuthorizationPage .ra-quick-label { color: var(--color-muted); }
html body #raAuthorizationPage .ra-quick-apply .btn { padding: 7px 14px; font-weight: 500; font-size: 12.5px; }
html body #raAuthorizationPage .ra-quick-apply .ra-outline { background: var(--color-surface); border-color: transparent; box-shadow: 0 2px 8px rgba(0, 0, 0, .05); }
html body #raAuthorizationPage .ra-status { color: var(--color-muted); }
html body #raAuthorizationPage .ra-status.ra-error { color: var(--color-danger); }

/* module cards (mock .pm): coloured gradient header, light body */
html body #raAuthorizationPage .ra-grid { gap: 14px; }
html body #raAuthorizationPage .ra-module { --c: var(--color-module-blue); background: var(--color-surface); border: 1px solid var(--color-card-border); border-radius: 16px; box-shadow: none; }
html body #raAuthorizationPage .ra-module:nth-child(10n+2) { --c: var(--color-module-purple); }
html body #raAuthorizationPage .ra-module:nth-child(10n+3) { --c: var(--color-module-green); }
html body #raAuthorizationPage .ra-module:nth-child(10n+4) { --c: var(--color-module-blue); }
html body #raAuthorizationPage .ra-module:nth-child(10n+5) { --c: var(--color-module-pink); }
html body #raAuthorizationPage .ra-module:nth-child(10n+6) { --c: var(--color-module-amber); }
html body #raAuthorizationPage .ra-module:nth-child(10n+7) { --c: var(--color-module-teal); }
html body #raAuthorizationPage .ra-module:nth-child(10n+8) { --c: var(--color-module-red); }
html body #raAuthorizationPage .ra-module:nth-child(10n+9) { --c: var(--color-module-blue); }
html body #raAuthorizationPage .ra-module:nth-child(10n+10) { --c: var(--color-module-purple); }
html body #raAuthorizationPage .ra-module-heading { padding: 12px 14px; font-weight: 600; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, var(--color-gradient-shade))); }
html body #raAuthorizationPage .ra-module-title { font-size: 14px; font-weight: 600; }
html body #raAuthorizationPage .ra-module-count { background: var(--color-glass-22); border-radius: 99px; font-weight: 600; }
html body #raAuthorizationPage .ra-module-tools { background: transparent; border-bottom: 1px solid var(--color-card-border); padding: 10px 12px; }
html body #raAuthorizationPage .ra-module-presets { gap: 6px; }
html body #raAuthorizationPage .ra-module-presets button { padding: 3px 10px; border-radius: var(--radius-btn); font-size: 11.5px; font-weight: 500; background: var(--color-page); color: var(--color-muted); border: 1px solid var(--color-card-border); }
html body #raAuthorizationPage .ra-module-presets button:hover { color: var(--color-primary); border-color: var(--color-primary); }
html body #raAuthorizationPage .ra-resource-list { padding: 0 14px; scrollbar-color: var(--color-card-border) transparent; }
html body #raAuthorizationPage .ra-resource { border-bottom-color: var(--color-card-border); padding: 10px 0; }
html body #raAuthorizationPage .ra-page-label { font-size: 12.5px; color: var(--color-text); }
html body #raAuthorizationPage .ra-badge { border-radius: 999px; padding: 3px 9px; font-size: 11px; border-color: var(--color-card-border); background: var(--color-page); color: var(--color-muted); }
html body #raAuthorizationPage .ra-badge-full { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
html body #raAuthorizationPage .ra-badge-custom { background: var(--color-primary-soft); border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-card-border)); color: var(--color-primary); }
html body #raAuthorizationPage .ra-badge-read { background: var(--color-surface-soft); color: var(--color-text); }
html body #raAuthorizationPage .ra-action-label { border-radius: 8px; border-color: var(--color-card-border); background: var(--color-page); color: var(--color-text); }
html body #raAuthorizationPage .ra-action-label.ra-selected { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
html body #raAuthorizationPage .ra-empty { color: var(--color-muted); }
html body #raAuthorizationPage .ra-no-results { background: var(--color-page); border-color: var(--color-card-border); border-radius: 14px; color: var(--color-muted); }
html body #raAuthorizationPage .ra-scroll-top { color: var(--color-primary); }

/* =====================================================================================================
   12. ADMISSION TEST SLIPS  (Views/Admin/MyCenter/AdmissionTestSlips.ascx)
   The page lays its form out with tables; these rules turn them into the mock's search bar and slip card.
   ===================================================================================================== */
html body .AdmissionTestSlipsUserControl .x_title h2 { font-size: 19px; font-weight: 600; }
html body .AdmissionTestSlipsUserControl .x_content > hr { display: none; }
/* label-above-field groups */
html body .AdmissionTestSlipsUserControl .input-group { display: flex !important; flex-direction: column; width: 100%; }
html body .AdmissionTestSlipsUserControl .input-group > label { display: block; margin: 0 0 5px; font-size: 12px; font-weight: 600; color: var(--color-text); }
html body .AdmissionTestSlipsUserControl .input-group > .form-control { width: 100% !important; border-radius: var(--radius-xs) !important; float: none; }
/* search bar: Class / Students / Search in one row, bottom-aligned (mock .sbar) */
html body table.form-table.AdmissionTestSlips, html body table.form-table.AdmissionTestSlips > tbody { display: block; width: 100%; }
html body table.form-table.AdmissionTestSlips > tbody > tr { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 12px 0; }
html body table.form-table.AdmissionTestSlips > tbody > tr > td { display: block; width: auto !important; padding: 0 !important; flex: 1 1 220px; max-width: 300px; }
html body table.form-table.AdmissionTestSlips > tbody > tr > td:has(.btnSearch) { flex: 0 0 auto; }
html body table.form-table.AdmissionTestSlips > tbody > tr > td:empty { display: none; }
html body table.form-table.AdmissionTestSlips .m-t-19 { margin-top: 0; }
html body table.form-table.AdmissionTestSlips .btnSearch { height: 40px; padding: 0 26px; border-radius: 4px; font-weight: 600; }
/* slip card: shown once a search returns something */
html body .AdmissionTestSlipsDetailsDiv:has(tr) { margin-top: 16px; padding: 16px; border: 1px solid var(--color-card-border); border-radius: 18px; background: var(--color-surface); }
html body .AdmissionTestSlipsDetailsDiv:not(:has(tr)) { border: 0 !important; background: transparent !important; }
html body table.form-table.AdmissionTestSlipsDetails, html body table.form-table.AdmissionTestSlipsDetails > tbody { display: block; width: 100%; }
/* first row: Test date / Room / Venue / Block / Subject as a responsive field grid (mock .fl) */
html body table.form-table.AdmissionTestSlipsDetails > tbody > tr:first-child:has(input) { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
html body table.form-table.AdmissionTestSlipsDetails > tbody > tr:first-child:has(input) > td { display: block; width: auto !important; padding: 0 !important; }
html body table.form-table.AdmissionTestSlipsDetails > tbody > tr + tr { display: block; margin-top: 14px; }
html body table.form-table.AdmissionTestSlipsDetails > tbody > tr + tr > td { display: block; padding: 0 !important; }
html body table.form-table.AdmissionTestSlipsDetails .table { margin: 0; border-radius: 12px; overflow: hidden; }
html body table.form-table.AdmissionTestSlipsDetails .table label { font-weight: 400; margin: 0; }
html body table.form-table.AdmissionTestSlipsDetails .table .chkSelect { accent-color: var(--color-primary); width: 16px; height: 16px; }
html body table.form-table.AdmissionTestSlipsDetails tr.danger td { background: transparent; }
html body table.form-table.AdmissionTestSlipsDetails tr.danger h4 { margin: 0; padding: 18px 0; font-size: 13.5px; font-weight: 500; color: var(--color-muted); }
html body .AdmissionTestSlipsDetailsDiv .button-footer { display: flex; justify-content: flex-end; }
html body .AdmissionTestSlipsDetailsDiv .button-footer:not(:empty) { margin-top: 14px; }
html body .AdmissionTestSlipsDetailsDiv .btnSave_print { float: none; padding: 10px 22px; border-radius: 12px; font-weight: 600; }

/* =====================================================================================================
   13. ALIGNMENT FIXES (system-wide)
   ===================================================================================================== */
/* a) Field + icon box groups (<div class="input-group"><span class="input-group-addon">..</span><select/input>).
      Bootstrap lays these out as a table, and ui-kit shrinks fields inside tables to 30px while the icon box stays
      38px, so icon and field ended up different heights and misaligned. Lay them out as one flex row of equal height.
      Groups that hold a <label> (label-above-field forms) are left alone. */
body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)) {
    display: flex !important; flex-wrap: nowrap; align-items: stretch; border-collapse: separate;
}
body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)) > .form-control,
body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)) > select,
body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)) > input:not([type=checkbox]):not([type=radio]):not([type=hidden]) {
    display: block; flex: 1 1 auto; width: 1%; min-width: 0; float: none; margin: 0;
    height: var(--size-control) !important; padding-top: 6px; padding-bottom: 6px; font-size: var(--font-size-md); line-height: 1.5;
}
body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)) > .input-group-addon {
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: auto; height: auto; min-height: var(--size-control);
    padding-top: 0; padding-bottom: 0; line-height: 1;
}
body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)) > .input-group-btn { display: flex; flex: 0 0 auto; width: auto; }
body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)) > .input-group-btn > .btn { height: 100%; }
body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)) > .hidden { display: none !important; }
/* a field inside a group keeps the group's corner rounding */
body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)) > :not(:first-child):not(.hidden) { margin-left: -1px; }

/* b) Rows of label + field + button laid out with tables (form-table): centre everything on one line */
/*    (layout tables = tables without Bootstrap's .table class; data grids are not touched) */
body .right_col table:not(.table):not(.lt-table) > tbody > tr > td, body .right_col table:not(.table):not(.lt-table) > tr > td { vertical-align: middle; }
body .right_col table:not(.table):not(.lt-table) > tbody > tr > td > label { margin-top: 0; margin-bottom: 0; padding-right: 6px; white-space: nowrap; }
body .right_col table:not(.table):not(.lt-table) > tbody > tr > td > .btn,
body .right_col table:not(.table):not(.lt-table) > tbody > tr > td > input.btn {
    height: var(--size-control); margin-top: 0; margin-bottom: 0; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-btn); font-weight: 600;
}
body .right_col table:not(.table):not(.lt-table) > tbody > tr.well { background: var(--color-page); }
body .right_col table:not(.table):not(.lt-table) > tbody > tr.well > td { padding: 10px 8px; }

/* c) Pager bar: centre the pill, the "Rows/page" text and the drop-down on one line */
body .tfootdiv .input-group:has(> .input-group-addon) { align-items: center !important; }
body .tfootdiv .input-group:has(> .input-group-addon) > .input-group-addon { min-height: 0; height: auto; line-height: 1.4; }
body .tfootdiv .input-group:has(> .input-group-addon) > select.ddlRowsPerPage { flex: 0 0 auto; width: auto !important; min-width: 74px; height: 34px !important; border-radius: var(--radius-xs) !important; margin: 0; }
body .tfootdiv .pagination > .disabled > a, body .tfootdiv .pagination > .disabled > span { border-color: var(--color-card-border) !important; background: var(--color-surface); opacity: .5; }

/* d) List toolbar: the drag-to-scroll button that appears when a grid overflows matches the square buttons */
body .btn-group.floatright .list-grid-tools { display: inline-flex; margin: 0; }
body .btn-group.floatright .list-grid-tools .btn {
    width: 38px; min-width: 38px; height: 36px; padding: 0; border-radius: var(--radius-btn) !important; margin: 0;
    background: var(--color-surface); border: 1px solid var(--color-card-border); color: var(--color-text); box-shadow: none;
}
body .btn-group.floatright .list-grid-tools .btn[aria-pressed="true"] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
/* search box on list pages: icon and text on the same line */
body .input-group:has(> .input-group-addon .fa-search):has(> .txtfilter) > .input-group-addon { min-height: 0; align-self: center; }
body .input-group:has(> .input-group-addon .fa-search):has(> .txtfilter) > .txtfilter { height: 40px !important; }

/* e), f) side menu + menu search: moved to /Content/lt/components.css section 13 */

/* =====================================================================================================
   14. STUDENT ADVANCE SEARCH  (Views/Admin/AdvancedSearch.aspx + StudentDetail.ascx, #studentRecord)
   ===================================================================================================== */
/* "Move to Dashboard" sits above the card, right-aligned */
body .right_col .btnDashboard { width: auto; padding: 10px 20px; border-radius: 14px; font-weight: 600; margin-bottom: 14px; box-shadow: 0 10px 22px color-mix(in srgb, var(--color-primary) 25%, transparent); }
/* the card */
html body #studentRecord.x_panel { margin-top: 0; padding: 18px 20px; background: var(--color-surface) !important; border: 1px solid var(--color-card-border); border-radius: 18px; box-shadow: none; }
html body #studentRecord > .x_title { border: 0; padding: 0; margin: 0 0 12px; min-height: 0; }
html body #studentRecord > .x_title h2 { float: none; display: inline-block; margin: 0; font-size: 15px; font-weight: 600; color: var(--color-text); }
html body #studentRecord > .x_title h2 small { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--color-muted); }
html body #studentRecord > .x_title .panel_toolbox { display: none; }
html body #studentRecord > .x_content { padding: 0; margin: 0; }
html body #studentRecord > .x_content > [class*="col-"] { padding: 0; }
/* search bar (mock .sbar): field and button side by side with a gap */
html body #studentRecord .input-group:has(> .stdNum) { display: flex !important; gap: 10px; flex-wrap: wrap; }
html body #studentRecord .input-group > .stdNum { flex: 1 1 200px; min-width: 200px; height: 44px !important; padding: 12px 14px; border-radius: var(--radius-xs) !important; border: 1px solid var(--color-card-border); background: var(--color-page); margin: 0 !important; }
html body #studentRecord .input-group > .input-group-btn { display: flex; width: auto; }
html body #studentRecord .input-group > .input-group-btn > .btnSearchData { height: 44px; padding: 0 28px; border-radius: 12px !important; font-weight: 600; margin: 0 !important; }
/* tabs (mock .tabs): pill group */
html body #studentRecord #myTab.nav-tabs {
    display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 16px 0 12px; padding: 4px; border: 0 !important; border-radius: 12px; background: var(--color-page) !important; box-shadow: none;
}
html body #studentRecord #myTab.nav-tabs::before, html body #studentRecord #myTab.nav-tabs::after { display: none; }
html body #studentRecord #myTab.nav-tabs > li { float: none; margin: 0 !important; border: 0; }
html body #studentRecord #myTab.nav-tabs > li > a {
    margin: 0 !important; padding: 6px 12px; border: 0 !important; border-radius: 9px !important; background: transparent !important;
    color: var(--color-muted) !important; font-size: 12.5px; font-weight: 500; line-height: 1.5;
}
html body #studentRecord #myTab.nav-tabs > li > a:hover { color: var(--color-text) !important; }
html body #studentRecord #myTab.nav-tabs > li.active > a,
html body #studentRecord #myTab.nav-tabs > li.active > a:hover,
html body #studentRecord #myTab.nav-tabs > li.active > a:focus { background: var(--color-surface) !important; color: var(--color-text) !important; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
html body #studentRecord .tab-content { background: transparent !important; padding: 0; border: 0; }

/* Old admin theme "bar_tabs" (used here and on other screens): white box per tab, corner marks on the active tab and a
   full-width tinted bar. Turn every bar_tabs strip in the app into the mock's pill group. */
html body ul.nav-tabs.bar_tabs {
    display: inline-flex !important; flex-wrap: wrap; gap: 4px; width: auto !important; max-width: 100%; height: auto !important;
    margin: 16px 0 12px !important; padding: 4px !important; overflow: visible; border: 0 !important; border-radius: 12px;
    background: var(--color-page) !important; box-shadow: none;
}
html body ul.nav-tabs.bar_tabs::before, html body ul.nav-tabs.bar_tabs::after { display: none !important; }
html body ul.nav-tabs.bar_tabs > li,
html body ul.nav-tabs.bar_tabs > li.active {
    float: none; margin: 0 !important; border: 0 !important; border-radius: 9px; background: transparent !important; box-shadow: none !important;
}
html body ul.nav-tabs.bar_tabs > li > a {
    margin: 0 !important; padding: 6px 12px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important;
    color: var(--color-muted) !important; font-size: 12.5px; font-weight: 500; line-height: 1.5;
}
html body ul.nav-tabs.bar_tabs > li > a:hover { color: var(--color-text) !important; border: 0 !important; }
html body ul.nav-tabs.bar_tabs > li.active > a,
html body ul.nav-tabs.bar_tabs > li.active > a:hover,
html body ul.nav-tabs.bar_tabs > li.active > a:focus { background: var(--color-surface) !important; color: var(--color-text) !important; box-shadow: 0 2px 8px rgba(0, 0, 0, .08) !important; }
html[data-theme="dark"] body ul.nav-tabs.bar_tabs > li.active > a { box-shadow: 0 2px 8px rgba(0, 0, 0, .35) !important; }
html body ul.nav-tabs.bar_tabs + .tab-content { border: 0; background: transparent; }
/* empty / info notes (mock .note) */
html body #studentRecord .be-sr-empty { margin: 0; padding: 36px 10px; text-align: center; font-size: 12.5px; color: var(--color-muted); }
html body #studentRecord .be-sr-note { margin: 0 0 10px; font-size: 12px; color: var(--color-muted); }
/* ID cards (mock .idc) */
html body #studentRecord .be-idc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
html body #studentRecord .be-idc {
    display: flex; gap: 16px; align-items: center; min-width: 0; padding: 20px; border-radius: 18px; color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-module-purple));
}
html body #studentRecord .be-idc-av {
    width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 50%;
    background: var(--color-on-primary); color: var(--color-primary); font-size: 20px; font-weight: 600;
}
html body #studentRecord .be-idc-main { flex: 1; min-width: 0; }
html body #studentRecord .be-idc-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html body #studentRecord .be-idc-name b { font-size: 17px; font-weight: 600; color: #fff; }
html body #studentRecord .be-idc small { display: block; margin-top: 2px; font-size: 12px; color: #fff; opacity: .85; }
html body #studentRecord .be-idc small a { color: #fff; text-decoration: underline; font-weight: 600; }
html body #studentRecord .be-idc-state { padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--color-glass-20); color: #fff; }
html body #studentRecord .be-idc-state.be-st-success { background: var(--color-id-card-status-success); }
html body #studentRecord .be-idc-state.be-st-danger { background: var(--color-id-card-status-danger); }
html body #studentRecord .be-idc-open { flex: none; align-self: flex-end; padding: 7px 16px; border: 0; border-radius: 12px; background: var(--color-on-primary) !important; color: var(--color-primary) !important; font-weight: 600; }
html body #studentRecord .be-idc-open:hover { background: var(--color-glass-88) !important; }
/* Basic Info: label / value rows (mock .kv), section headings as light tinted bars */
html body #studentRecord #tab_content1 h3 { font-size: 17px; font-weight: 600; color: var(--color-text); }
html body #studentRecord #tab_content1 .table { background: transparent !important; }
html body #studentRecord #tab_content1 .table > tbody > tr > td { padding: 10px 8px; border: 0; border-top: 1px solid var(--color-card-border); color: var(--color-muted); text-align: left; }
html body #studentRecord #tab_content1 .table > tbody > tr > td strong { color: var(--color-text); font-weight: 600; margin-left: 4px; }
html body #studentRecord #tab_content1 .table > tbody > tr > td.bg-primary {
    background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface)) !important; color: var(--color-primary) !important; border-top: 0;
    font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border-radius: 10px;
}
html body #studentRecord #tab_content1 .table > tbody > tr > td.bg-primary strong { color: var(--color-primary); margin: 0; }
html body #studentRecord #tab_content1 .table > tbody > tr:has(> td.bg-primary) + tr > td { border-top: 0; }
html body #studentRecord #tab_content1 .profile_img img { border-radius: 18px; }
html body #studentRecord #feesList > li { padding: 10px 0; border-top: 1px solid var(--color-card-border); }
html body #studentRecord .tab-pane > h4, html body #studentRecord #tab_content1 h4 { font-size: 15px; font-weight: 600; color: var(--color-text); }
html body #studentRecord #challanFrame { border: 1px solid var(--color-card-border); border-radius: 14px; }
@media (max-width: 700px) { html body #studentRecord .be-idc-grid { grid-template-columns: 1fr; } }

/* =====================================================================================================
   15. FIELD CORNERS  -  every text box, drop-down, text area and searchable drop-down: 4px (--radius-xs)
   Kept last and !important so page-level <style> blocks (dashboards, older screens) cannot override it.
   ===================================================================================================== */
html body .form-control,
html body :is(.right_col, .modal, .ui-dialog, .lt-auth) :is(
    input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url],
    input[type=search], input[type=date], input[type=time], input[type=datetime-local], input[type=month], select, textarea),
html body .select2-container .select2-selection,
html body .input-group-addon {
    border-radius: var(--radius-xs) !important;
}
/* groups that read as one field (icon box + field, field + button): square the corners where the parts touch */
html body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)):not(:has(> .stdNum)):not(:has(> .ddlRowsPerPage)) > :not(:last-child):is(.form-control, select, input, .input-group-addon, .select2-container) {
    border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important;
}
html body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)):not(:has(> .stdNum)):not(:has(> .ddlRowsPerPage)) > :not(:first-child):is(.form-control, select, input, .input-group-addon, .select2-container) {
    border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important;
}
html body .input-group:has(> .input-group-addon, > .input-group-btn):not(:has(> label)):not(:has(> .stdNum)):not(:has(> .ddlRowsPerPage)) > .input-group-btn:last-child > .btn {
    border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important;
    border-top-right-radius: var(--radius-xs) !important; border-bottom-right-radius: var(--radius-xs) !important;
}
/* boxed search groups (list pages): the outer box is the field, the inner input has no corners of its own */
html body .input-group:has(> .input-group-addon .fa-search):has(> .txtfilter) > :is(.txtfilter, .input-group-addon) { border-radius: 0 !important; }
html body .input-group:has(> .input-group-addon .fa-search):has(> .txtfilter) { border-radius: var(--radius-xs) !important; }

/* =====================================================================================================
   16. FIELD HEIGHTS  -  every single-line text box and drop-down is one height (--size-control, 38px),
   and the buttons / toolbar items that sit next to fields match it. Pages that set their own heights
   (inline Height="34", page <style> blocks) are overridden. Not touched: compact fields inside data grids
   (table.table), text areas, multi-line selects, .input-sm / .input-lg, and the sign-in pages.
   ===================================================================================================== */
html body :is(.right_col, .modal, .ui-dialog) :is(
    input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url],
    input[type=search], input[type=date], input[type=time], input[type=datetime-local], input[type=month],
    select:not([multiple]):not([size])
):not(.input-sm):not(.input-lg):not(.table *):not(.lt-table *):not(.lt-auth *):not(.txtfilter) {
    height: var(--size-control) !important; min-height: 0; padding-top: 6px !important; padding-bottom: 6px !important; line-height: 1.5;
}
html body .select2-container--default .select2-selection--single { height: var(--size-control) !important; }
/* list-page search box: the outer box is the field */
html body .input-group:has(> .input-group-addon .fa-search):has(> .txtfilter) { height: var(--size-control); }
html body .input-group:has(> .input-group-addon .fa-search):has(> .txtfilter) > .txtfilter { height: calc(var(--size-control) - 2px) !important; padding-top: 0 !important; padding-bottom: 0 !important; }
/* buttons beside fields: list toolbar, search buttons, buttons in form rows */
html body .btn-group.floatright:has(.ddlstatus, .btnExportExcel, .fa-print) > :is(.btn, select),
html body .btn-group.floatright .list-grid-tools .btn { height: var(--size-control) !important; }
html body .btn-group.floatright > select.ddlstatus { height: var(--size-control) !important; }
html body table.form-table.AdmissionTestSlips .btnSearch,
html body #studentRecord .input-group > .input-group-btn > .btnSearchData,
html body .right_col table:not(.table):not(.lt-table) > tbody > tr > td > :is(button.btn, input.btn),
html body .right_col :is(.row, .form-group, .input-group-btn, .m-t-19) > :is(button.btn, input.btn):not(.btn-sm):not(.btn-xs):not(.btn-lg) {
    height: var(--size-control) !important; padding-top: 0 !important; padding-bottom: 0 !important;
}
html body #studentRecord .input-group > .stdNum { padding-left: 14px; padding-right: 14px; }
/* pager drop-down matches too */
html body .tfootdiv .input-group > select.ddlRowsPerPage { height: var(--size-control) !important; }

/* =====================================================================================================
   17. GRID SCROLL BOXES  -  a grid's scroll box is only as tall as its rows, so the horizontal scrollbar sits
   right under the last row (not at the bottom of an empty area). A fixed height on the box (u-h-NNNpx) or a
   minimum height (u-minh-*, the 180px admission-list minimum) becomes a maximum: long lists still scroll inside.
   ===================================================================================================== */
html body :is(.table-responsive, .shared-list-grid, .admission-grid-scroll, .AdmissionDeskDetailsDiv, .ProspectusReceivedDetailsDiv, .AdmissionTestSlipsDetailsDiv):has(table) {
    min-height: 0 !important;
}
html body :is(.table-responsive, .shared-list-grid, .admission-grid-scroll):has(table):is([class*="u-h-"], [class*="u-minh-"]) { height: auto !important; min-height: 0 !important; }
html body :is(.table-responsive, .shared-list-grid, .admission-grid-scroll):has(table).u-h-250px { max-height: 250px; }
html body :is(.table-responsive, .shared-list-grid, .admission-grid-scroll):has(table):is(.u-h-350px, .u-minh-300px) { max-height: 350px; }
html body :is(.table-responsive, .shared-list-grid, .admission-grid-scroll):has(table):is(.u-h-500px, .u-minh-500px, .u-minh-550px) { max-height: 550px; }
html body :is(.table-responsive, .shared-list-grid, .admission-grid-scroll):has(table):is([class*="u-ovy-scroll"], [class*="u-ov-scroll"]) { overflow-y: auto !important; overflow-x: auto !important; }

/* =====================================================================================================
   18. SELECT2 DROP-DOWNS + BUTTONS BESIDE LABELLED FIELDS
   ===================================================================================================== */
/* a) select2 (searchable drop-downs): text vertically centred, same chevron as normal drop-downs, field height.
      Content/select2.min.css (customised) and the admin theme place the text/arrow with fixed offsets; reset them. */
html body .select2-container--default .select2-selection--single {
    position: relative; display: flex !important; align-items: center; height: var(--size-control) !important; min-height: 0 !important; padding: 0 !important;
    border: 1px solid var(--color-border); background-color: var(--color-surface);
}
html body .select2-container--default .select2-selection--single .select2-selection__rendered {
    flex: 1; min-width: 0; display: block; margin: 0 !important; padding: 0 34px 0 var(--space-control-x) !important;
    line-height: 1.5 !important; height: auto !important; color: var(--color-text); font-size: var(--font-size-md);
}
html body .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--color-placeholder); }
html body .select2-container--default .select2-selection--single .select2-selection__clear { margin-right: 4px; line-height: 1; }
html body .select2-container--default .select2-selection--single .select2-selection__arrow {
    position: absolute !important; top: 0 !important; right: 0 !important; bottom: 0 !important; height: auto !important; width: 34px !important;
    display: flex; align-items: center; justify-content: center;
}
html body .select2-container--default .select2-selection--single .select2-selection__arrow b {
    position: static !important; margin: 0 !important; width: 12px !important; height: 8px !important; border: 0 !important;
    background: var(--icon-select-arrow) no-repeat center / 12px 8px;
}
html body .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { transform: rotate(180deg); }
html body .select2-container--default .select2-selection--multiple { min-height: var(--size-control) !important; padding: 2px 6px; }

/* b) Form columns with the label above the field: one label height, so fields in a row line up */
html body .right_col [class*="col-"] > label:first-child { display: block; min-height: 20px; line-height: 20px; margin: 0 0 5px; }

/* c) Filter rows: columns with label + field next to a column that holds only button(s) (report / search screens).
      The row becomes a flex row aligned on the bottom edge, so the button always lines up with the fields whatever the
      label height; the old fixed top margins (u-mt-5px / u-mt-18px / <br> ...) are dropped. Other children of the row
      (heading, alerts, hidden fields) keep their own full-width line. */
html body .right_col :has(> [class*="col-"] > label:first-child):has(> [class*="col-"] > :is(button.btn, input.btn, a.btn):first-child) {
    display: flex !important; flex-wrap: wrap; align-items: flex-end;
}
html body .right_col :has(> [class*="col-"] > label:first-child):has(> [class*="col-"] > :is(button.btn, input.btn, a.btn):first-child) > :not([class*="col-"]) {
    flex: 0 0 100%; max-width: 100%;
}
html body .right_col :has(> [class*="col-"] > label:first-child):has(> [class*="col-"] > :is(button.btn, input.btn, a.btn):first-child) > [class*="col-"] {
    float: none; margin-bottom: 12px;
}
html body .right_col :has(> [class*="col-"] > label:first-child) > [class*="col-"]:not(:has(> label)):has(> :is(button.btn, input.btn, a.btn)):not(:has(> :not(.btn, script, br))) {
    margin-top: 0 !important; padding-top: 0 !important;
}
html body .right_col :has(> [class*="col-"] > label:first-child) > [class*="col-"]:not(:has(> label)):not(:has(> :not(.btn, script, br))) > :is(button.btn, input.btn, a.btn) {
    height: var(--size-control) !important; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important;
    vertical-align: bottom; display: inline-flex; align-items: center; justify-content: center;
}
html body .right_col :has(> [class*="col-"] > label:first-child) > [class*="col-"]:not(:has(> label)):not(:has(> :not(.btn, script, br))) > br { display: none; }
/* the fields in those rows have no stray bottom margin, so their bottoms line up with the button */
html body .right_col :has(> [class*="col-"] > label:first-child) > [class*="col-"] > label:first-child ~ :is(.form-control, select, input, .select2-container, .input-group) { margin-bottom: 0 !important; }

/* =====================================================================================================
   19. PAGE HEADINGS + REPORT VIEWER (all screens)
   ===================================================================================================== */
/* a) Page titles are left-aligned and the same size/weight everywhere (88 report screens used centred <h2>) */
html body .right_col :is(h1, h2).text-center:not(.modal-title):not(.be-hero *),
html body .right_col [class*="col-"] > h2:first-child:not(.modal-title),
html body .right_col .x_panel > h2:first-child {
    text-align: left !important; font-size: 19px !important; font-weight: 600 !important; color: var(--color-text) !important;
    line-height: 1.3; letter-spacing: 0; margin: 0 0 14px !important; padding: 0;
}
/* b) SSRS ReportViewer: ONE clean frame (no dotted / field border) - the viewer's own inner divs
      (ids like ReportViewer1_ctl09) are not framed again. The frame, toolbar and empty area follow the theme;
      only the rendered report page (oReportDiv) is white "paper" in both themes. */
html body .right_col :is(div.form-control, div[id$="_rpt"], div[id$="ReportViewer1"], div[id*="ReportViewer"]):has(table, iframe, div):not(div[id*="ReportViewer"] div) {
    height: auto; min-height: 0; padding: 0 !important; margin-top: 4px;
    border: 1px solid var(--color-card-border) !important; border-style: solid !important; border-radius: 12px !important;
    background: var(--color-surface) !important; color: var(--color-text); box-shadow: none !important; overflow: auto;
}
html body .right_col div[id*="ReportViewer"] [id$="oReportDiv"] { background: var(--color-print); color: var(--color-print-text); }
/* dark mode: viewer chrome (toolbar, parameters, menus, wait box, doc map) on dark surfaces */
html[data-theme="dark"] body .right_col .MSRS-RVC :is(.ToolBarBackground, .ParametersFrame, .MenuBarBkGnd div, .WaitControlBackground, .DocMapFrame, .DocMapTitle, .DocMapBar) {
    background-color: var(--color-surface-soft) !important; border-color: var(--color-card-border) !important; color: var(--color-text) !important;
}
[data-theme="dark"] .coa-tree a.coa-name{
    background:transparent !important; 
}

html[data-theme="dark"] body .right_col .MSRS-RVC .ToolBarButtonsCell {
    border-color: var(--color-card-border) !important;
}
html[data-theme="dark"] body .right_col .MSRS-RVC .HoverButton { background-color: var(--color-primary-soft) !important; }
html[data-theme="dark"] body .right_col .MSRS-RVC :is(span.glyphui, .ActiveLink, .WaitText, .CancelLinkText, .ParametersFrame :is(td, span, label)) { color: var(--color-text) !important; }
html[data-theme="dark"] body .right_col .MSRS-RVC :is(.DisabledLink, span.glyphui.disabled, .aspNetDisabled span.glyphui) { color: var(--color-muted) !important; }
html[data-theme="dark"] body .right_col .MSRS-RVC :is(.SplitterNormal, .SplitterHover) { background-color: var(--color-card-border) !important; }
html body .right_col :is(div.form-control, div[id$="_rpt"], div[id*="ReportViewer"]) [style*="dotted"] { border-color: transparent !important; outline: 0 !important; }
html body .right_col :is(div.form-control, div[id$="_rpt"], div[id*="ReportViewer"]) :focus { outline: 0; }
html body .right_col :is(div.form-control, div[id$="_rpt"], div[id*="ReportViewer"]) { outline: 0 !important; }
/* c) Viewer toolbar fields (page number, zoom, find) are compact toolbar controls, not full-size form fields:
      one height, centred on the toolbar icons, same look as every other field (ui-kit gave them --size-control). */
html body .right_col .MSRS-RVC :is(.ToolBarBackground, .ToolBarButtonsCell) :is(input[type=text], input:not([type]), select) {
    height: var(--size-control-sm) !important; margin: 0 var(--space-xs); padding: 0 var(--space-sm);
    font-size: var(--font-size-sm); line-height: 1; vertical-align: middle; box-shadow: none;
    color: var(--color-text); background-color: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xs);
}
html body .right_col .MSRS-RVC :is(.ToolBarBackground, .ToolBarButtonsCell) select { padding-right: var(--space-2xl); background-position: right var(--space-sm) center; }
html body .right_col .MSRS-RVC :is(.ToolBarBackground, .ToolBarButtonsCell) :is(input[type=text], input:not([type]), select):focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-ring); }
/* toolbar text ("of 1", page count) is readable in dark mode; links (Find | Next) keep their enabled / disabled colours */
html[data-theme="dark"] body .right_col .MSRS-RVC :is(.ToolBarBackground, .ToolBarButtonsCell) span:not(.glyphui):not(a span) { color: var(--color-text) !important; }
/* d) A dialog that shows a report is wide enough for the report page (Bootstrap's 600px dialog cut the page off and
      the report overflowed its white paper). Applies to every modal that holds a ReportViewer. */
@media (min-width: 768px) {
    .modal-dialog:not(.modal-lg):has(.MSRS-RVC, div[id*="ReportViewer"], div[id$="_rpt"]) {
        width: min(var(--size-modal-report), calc(100vw - 2 * var(--space-xl)));
    }
}
html[data-theme="dark"] .lt-shell .lt-bar-chip {
    background: var(--color-page) !important;
}

/* =====================================================================================================
   20. CARD PADDING + ALERTS
   ===================================================================================================== */
/* a) A .table-responsive used as a page wrapper (holds a heading / toolbar / search / pager, not just a grid) is
      not a frame: the page card already gives the padding, so its heading and search box no longer touch a border.
      The data grid inside keeps its own frame. */
html body .right_col .table-responsive:has(h1, h2, .btn-group.floatright, .txtfilter, .tfootdiv) {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}
html body .right_col .table-responsive:has(h1, h2, .btn-group.floatright, .txtfilter, .tfootdiv) > [class*="col-"] { padding-left: 0; padding-right: 0; }
/* b) Cards inside the page card (nested panels, wells, bordered blocks) get the same inner padding as the page card */
html body .right_col > .x_panel :is(.x_panel, .well, .panel-body):not(.dash-modern *):not(#studentRecord) { padding: 16px 18px; }
html body .right_col > .x_panel .x_panel:not(.dash-modern *) > .x_title { padding: 0 0 8px; margin-bottom: 10px; }
/* c) pager: hide the "Showing ..." pill until it has text */
html body .tfootdiv .input-group > .input-group-addon:has(> span:not([class]):empty) { display: none !important; }

/* d) Alerts in dark mode: same soft tinted boxes, no side stripe */
html[data-theme="dark"] body .alert-success { background: var(--alert-success-bg); border-color: var(--alert-success-border); color: #9be0bb; }
html[data-theme="dark"] body .alert-info { background: var(--alert-info-bg); border-color: var(--alert-info-border); color: #9fd3f2; }
html[data-theme="dark"] body .alert-warning { background: var(--alert-warning-bg); border-color: var(--alert-warning-border); color: #f0cc8e; }
html[data-theme="dark"] body .alert-danger { background: var(--alert-danger-bg); border-color: var(--alert-danger-border); color: #f3aeb0; }
html[data-theme="dark"] body .alert .fa { color: inherit; }

/* =====================================================================================================
   21. OLD NAVY SUMMARY BOXES + SEARCH / ACTION ROWS  (billing screens: Bill Contract Charges, GL Bill,
       Other School Bill, Pick & Drop Bill - and any screen using the same markup)
   ===================================================================================================== */
/* a) "Total Students / Total Amount" boxes (u-bg-2a3f54 navy + teal stripe) -> mock gradient cards, white text */
html body .right_col .row:has(> .u-bg-2a3f54) { display: flex; flex-wrap: wrap; gap: 14px; margin-left: 0; margin-right: 0; }
html body .right_col .row:has(> .u-bg-2a3f54)::before, html body .right_col .row:has(> .u-bg-2a3f54)::after { display: none; }
html body .right_col .row:has(> .u-bg-2a3f54) > .u-bg-2a3f54 { flex: 1 1 160px; width: auto; float: none; }
html body .right_col .u-bg-2a3f54 {
    --c: var(--color-module-blue); position: relative; overflow: hidden; padding: 16px 20px !important; text-align: left !important;
    border: 0 !important; border-radius: 18px; color: #fff !important;
    background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, var(--color-gradient-shade))) !important;
}
html body .right_col .row:has(> .u-bg-2a3f54) > .u-bg-2a3f54 + .u-bg-2a3f54 { --c: var(--color-module-green); }
html body .right_col .u-bg-2a3f54::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--color-glass-12); pointer-events: none; }
html body .right_col .u-bg-2a3f54 :is(h1, h2, h3, h4, h5, span, b, strong, label) { color: #fff !important; text-align: left !important; }
html body .right_col .u-bg-2a3f54 > h3 { margin: 0 !important; font-size: 13.5px !important; font-weight: 600 !important; opacity: .9; }
html body .right_col .u-bg-2a3f54 > h2 { margin: 6px 0 0 !important; font-size: 24px !important; font-weight: 700 !important; line-height: 1.2; }
/* the summary strip under the grid only shows once it has text */
html body .right_col .u-bg-2a3f54.mainSummary { margin-top: 14px; }
html body .right_col .u-bg-2a3f54.mainSummary > h2 { font-size: 16px !important; margin: 0 !important; }
html body .right_col .u-bg-2a3f54.mainSummary:not(:has(:is(h1, h2, h3, h4, span, b, strong):not(:empty))) { display: none !important; }

/* b) Row = search box column + a column of several buttons (and maybe a check box): one aligned line,
      search takes the free space, the buttons stay together on the right */
html body .right_col .row:has(> [class*="col-"] .txtfilter):has(> [class*="col-"] > .btn ~ .btn) {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px;
}
html body .right_col .row:has(> [class*="col-"] .txtfilter):has(> [class*="col-"] > .btn ~ .btn)::before,
html body .right_col .row:has(> [class*="col-"] .txtfilter):has(> [class*="col-"] > .btn ~ .btn)::after { display: none; }
html body .right_col .row:has(> [class*="col-"] .txtfilter):has(> [class*="col-"] > .btn ~ .btn) > [class*="col-"]:has(.txtfilter) { flex: 1 1 260px; width: auto; float: none; }
html body .right_col .row:has(> [class*="col-"] .txtfilter):has(> [class*="col-"] > .btn ~ .btn) > [class*="col-"]:has(.txtfilter) .input-group { margin-bottom: 0; }
html body .right_col .row:has(> [class*="col-"] .txtfilter):has(> [class*="col-"] > .btn ~ .btn) > [class*="col-"]:not(:has(.txtfilter)) {
    flex: 0 1 auto; width: auto; float: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px;
}
html body .right_col .row:has(> [class*="col-"] .txtfilter):has(> [class*="col-"] > .btn ~ .btn) > [class*="col-"]:not(:has(.txtfilter)) > .btn {
    height: var(--size-control) !important; margin: 0 !important; padding: 0 18px !important; border-radius: var(--radius-btn); font-weight: 600;
}
html body .right_col .row:has(> [class*="col-"] .txtfilter):has(> [class*="col-"] > .btn ~ .btn) > [class*="col-"]:not(:has(.txtfilter)) > label {
    display: inline-flex !important; align-items: center; gap: 8px; min-height: 0 !important; height: var(--size-control); margin: 0 6px 0 0 !important;
    padding: 0 12px; border: 1px solid var(--color-card-border); border-radius: var(--radius-xs); background: var(--color-page);
    font-weight: 500; color: var(--color-text); white-space: nowrap; cursor: pointer; line-height: 1;
}

/* c) Check boxes / radios next to their text (all screens): 16px, brand colour, centred on the text line */
html body .right_col label > input:is([type=checkbox], [type=radio]),
html body .modal label > input:is([type=checkbox], [type=radio]) {
    width: 16px;
    height: 16px;
   /* margin: 1px -13px !important;*/
    vertical-align: -3px;
    accent-color: var(--color-primary);
    cursor: pointer;
    flex: none;
}
html body .right_col .row:has(> [class*="col-"] .txtfilter):has(> [class*="col-"] > .btn ~ .btn) > [class*="col-"]:not(:has(.txtfilter)) > label > input:is([type=checkbox], [type=radio]) { margin: 0 !important; vertical-align: middle; }

.m-0{margin:0px !important;}
.mb-0{margin-bottom:0px !important;}
.p-0{padding:0px !important}

hr{margin-top:10px !important; margin-bottom:10px !important;}