﻿:root {
    --admin-blue: #2f65bb;
    --admin-blue-dark: #234d91;
    --admin-blue-soft: #edf4ff;
    --admin-border: #e5ebf4;
    --admin-text: #1d2939;
    --admin-muted: #667085;
    --sidebar-width: 280px;
}

* {
    letter-spacing: 0;
}

body {
    min-height: 100vh;
    background: #f8f9fc;
    color: var(--admin-text);
    font-family: "Kanit", "Segoe UI", Tahoma, Arial, sans-serif;
}

a {
    text-decoration: none;
}

.admin-shell {
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

.admin-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: #fff;
    color: #3a3b45;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    overflow-y: auto;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .12);
}

.admin-sidebar-backdrop {
    display: none;
}

.brand {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    padding: 0 1rem;
    color: #fff;
    background: var(--admin-blue);
    border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.brand:hover {
    color: #fff;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}

.brand-mark img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.brand-text {
    font-weight: 700;
    font-size: 1rem;
}

.sidebar-nav {
    padding: .8rem 0 2rem;
}

.sidebar-divider {
    border-top: 1px solid #eaecf4;
    margin: 0 1rem;
}

.sidebar-heading {
    color: #b7b9cc;
    font-size: .68rem;
    font-weight: 500;
    text-transform: uppercase;
    padding: .75rem 1rem .35rem;
}

.nav-link {
    position: relative;
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    color: #858796;
    background: transparent;
    font-weight: 600;
    text-align: left;
}

.nav-link span,
.submenu-link {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.nav-link:hover {
    color: var(--admin-blue);
    background: #f8f9fc;
}

.nav-link.active {
    background: transparent;
    color: var(--admin-blue-dark);
    font-weight: 700;
}

.nav-link.active > span > .bi {
    color: var(--admin-blue);
}

.nav-parent .bi-chevron-down {
    transition: transform .2s ease;
}

.nav-parent[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.submenu {
    margin: .2rem 1rem .7rem;
    padding: .5rem 0;
    background: #fff;
    border: 1px solid #eaecf4;
    border-radius: 6px;
}

.submenu-link {
    position: relative;
    min-height: 36px;
    color: #6e707e;
    padding: .45rem 1rem;
    border-radius: 0;
    font-size: .86rem;
}

.submenu-link:hover {
    background: #f8f9fc;
    color: var(--admin-blue);
}

.submenu-link.active {
    background: transparent;
    color: var(--admin-blue-dark);
    font-weight: 700;
}

.admin-main {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-width: 0;
    transition: margin-left .2s ease;
}

.admin-shell.sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
}

.admin-shell.sidebar-collapsed .admin-main {
    margin-left: 0;
    width: 100%;
}

.admin-topbar {
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
    background: #527dc3;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .15);
}

.sidebar-toggle {
    display: inline-flex;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #fff;
    font-size: 1.5rem;
    align-items: center;
    justify-content: center;
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 500;
    color: #fff;
}

.topbar-user:hover,
.topbar-icon:hover {
    color: #fff;
}

.topbar-nav {
    list-style: none;
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0;
    padding: 0;
}

.topbar-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .85);
    position: relative;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e74a3b;
    position: absolute;
    top: 10px;
    right: 10px;
}

.topbar-divider {
    width: 0;
    height: 2.25rem;
    border-right: 1px solid rgba(255, 255, 255, .35);
}

.img-profile {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .55);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-blue-soft);
}

.page-heading {
    margin-bottom: 1.35rem;
}

.page-heading h1 {
    font-size: 1.55rem;
    font-weight: 500;
    margin: 0;
}

.page-heading p {
    color: var(--admin-muted);
    margin: .35rem 0 0;
}

.panel,
.stat-card,
.process-card {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .04);
}

.stat-card {
    padding: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-blue);
    color: #fff;
    font-size: 1.4rem;
    flex: 0 0 52px;
}

.stat-label {
    color: var(--admin-muted);
    font-size: .9rem;
}

.stat-value {
    font-size: 1.75rem;
    line-height: 1.1;
    font-weight: 500;
}

.panel {
    padding: 1.25rem;
    min-width: 0;
}

.panel-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.process-card {
    height: 100%;
    overflow: hidden;
}

.process-card .process-head {
    background: var(--admin-blue);
    color: #fff;
    padding: 1rem;
}

.box-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.box-status-card {
    display: block;
    min-width: 0;
    height: 100%;
    color: #fff;
    background: #36b9cc;
    border: 1px solid rgba(0, 0, 0, .04);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 .15rem 1.2rem rgba(58, 59, 69, .12);
}

.box-status-card:hover {
    color: #fff;
    background: #2fa6b8;
}

.box-status-count {
    padding: .8rem 1rem;
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, .28);
}

.box-status-body {
    padding: 1rem;
}

.box-status-body h3 {
    min-height: 54px;
    margin: 0 0 .7rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(255, 255, 255, .35);
    font-size: 1.08rem;
    font-weight: 500;
    line-height: 1.35;
}

.box-status-body p {
    margin: 0;
    opacity: .94;
}

.process-count {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
}

.process-body {
    padding: 1rem;
}

.process-name {
    min-height: 48px;
    font-weight: 500;
    color: var(--admin-text);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .45rem 0;
    border-top: 1px solid var(--admin-border);
    color: var(--admin-muted);
    font-size: .92rem;
}

.metric-row strong {
    color: var(--admin-blue);
}

.report-card {
    height: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .06);
}

.report-card-primary {
    background: #2f65bb;
}

.report-card-info {
    background: #25839a;
}

.report-card-success {
    background: #2f855a;
}

.report-card-warning {
    background: #b7791f;
}

.report-card-purple {
    background: #6b46c1;
}

.report-card-danger {
    background: #c2410c;
}

.report-card-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 8px;
    font-size: 1.35rem;
}

.report-card-label {
    color: rgba(255, 255, 255, .86);
    font-size: .9rem;
}

.report-card-value {
    font-size: 1.65rem;
    line-height: 1.1;
    font-weight: 500;
}

.report-chart-wrap {
    height: 340px;
    min-height: 260px;
}

.report-export-list {
    display: grid;
    gap: .7rem;
}

.report-export-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: .75rem;
    padding: .8rem;
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fbfcff;
}

.report-export-item:hover {
    color: var(--admin-blue);
    border-color: #cfe0fb;
    background: var(--admin-blue-soft);
}

.report-export-item span {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-blue);
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
}

.report-export-item strong,
.report-export-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-export-item strong {
    font-weight: 500;
}

.report-export-item small {
    color: var(--admin-muted);
}

.btn-primary {
    --bs-btn-bg: var(--admin-blue);
    --bs-btn-border-color: var(--admin-blue);
    --bs-btn-hover-bg: var(--admin-blue-dark);
    --bs-btn-hover-border-color: var(--admin-blue-dark);
}

.text-primary {
    color: var(--admin-blue) !important;
}

.table thead th {
    color: var(--admin-muted);
    font-size: .84rem;
    font-weight: 500;
    border-bottom-color: var(--admin-border);
}

.badge-soft-primary {
    background: var(--admin-blue-soft);
    color: var(--admin-blue);
}

.badge-register-type {
    min-width: 88px;
    padding: .45rem .65rem;
    font-weight: 500;
}

.badge-register-industry {
    background: #fff0df;
    color: #b45309;
}

.badge-register-care {
    background: #e5f3ff;
    color: #1d64ad;
}

.customer-table {
    font-size: .92rem;
    white-space: nowrap;
}

.table-responsive,
.dt-container,
.dt-scroll,
.dt-scroll-body {
    max-width: 100%;
}

.customer-table tbody td {
    vertical-align: middle;
}

.customer-photo {
    width: 57px;
    height: 76px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    background: #f2f4f7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-muted);
}

.badge-age-green,
.badge-age-yellow,
.badge-age-red,
.badge-muted {
    border-radius: 999px;
    padding: .45rem .65rem;
    font-weight: 700;
}

.badge-age-green {
    background: #e8f7ef;
    color: #157347;
}

.badge-age-yellow {
    background: #fff4db;
    color: #946200;
}

.badge-age-red {
    background: #fde8e8;
    color: #b42318;
}

.badge-muted {
    background: #eef2f6;
    color: var(--admin-muted);
}

@media (max-width: 991.98px) {
    body.admin-sidebar-open {
        overflow: hidden;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .admin-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1030;
        display: block;
        padding: 0;
        border: 0;
        background: rgba(16, 24, 40, .38);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .admin-sidebar-backdrop.is-active {
        opacity: 1;
        pointer-events: auto;
    }
}

.login-page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--admin-blue) 0%, #5b86d6 100%);
}

.container-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    width: min(100%, 520px);
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .25);
    padding: 2.5rem;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    color: var(--admin-blue);
    font-weight: 500;
    margin-bottom: 1.4rem;
}

.login-brand img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.login-card h1 {
    font-size: 1.35rem;
    text-align: center;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #3a3b45;
}

.permission-panel {
    height: 100%;
}

.master-permission-group {
    height: 100%;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    overflow: hidden;
}

.master-permission-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem .85rem;
    background: #f8f9fc;
    border-bottom: 1px solid var(--admin-border);
}

.master-permission-group-head h3 {
    margin: 0;
    font-size: .98rem;
    font-weight: 700;
}

.master-permission-table-wrap {
    overflow-x: auto;
}

.master-permission-table {
    min-width: 560px;
}

.master-permission-table th {
    color: var(--admin-muted);
    font-size: .78rem;
    font-weight: 700;
}

.master-permission-table td:first-child {
    width: 62%;
}

.master-permission-table strong,
.master-permission-table small {
    display: block;
}

.master-permission-table small {
    color: var(--admin-muted);
}

.permission-row {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .65rem 0;
    border-top: 1px solid var(--admin-border);
    cursor: pointer;
}

.permission-row small {
    display: block;
    color: var(--admin-muted);
    margin-top: .1rem;
    font-size: .78rem;
}

.permission-row .form-check-input {
    margin-top: .2rem;
    flex: 0 0 auto;
}

.sticky-savebar {
    position: sticky;
    bottom: 0;
    z-index: 1010;
    display: flex;
    justify-content: flex-end;
    padding: 1rem 0 0;
    margin-top: 1rem;
    background: linear-gradient(180deg, rgba(248, 249, 252, 0), #f8f9fc 35%);
}

.filter-panel {
    padding: 1rem 1.25rem;
}

.filter-panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: .85rem;
    align-items: end;
}

.filter-grid .form-label {
    margin-bottom: .3rem;
    color: var(--admin-muted);
    font-size: .86rem;
}

.filter-wide {
    grid-column: span 2;
}

.filter-actions-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    justify-self: end;
    width: min(260px, 100%);
}

.profile-hero {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .04);
}

.profile-photo-wrap {
    display: flex;
    justify-content: center;
}

.profile-photo {
    width: 190px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: #f2f4f7;
}

.profile-hero-main {
    min-width: 0;
    padding: .35rem .25rem;
}

.profile-hero h2 {
    font-size: 1.45rem;
    font-weight: 500;
    margin: .1rem 0 .65rem;
}

.profile-meta,
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.profile-summary-grid,
.profile-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.profile-field-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-field {
    min-width: 0;
    padding: .75rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fbfcff;
}

.profile-field span {
    display: block;
    color: var(--admin-muted);
    font-size: .82rem;
    margin-bottom: .25rem;
}

.profile-field strong {
    display: block;
    color: var(--admin-text);
    font-weight: 400;
    overflow-wrap: anywhere;
}

.profile-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
}

.profile-tabs .nav-link {
    width: auto;
    min-height: 42px;
    white-space: nowrap;
    color: var(--admin-muted);
    font-weight: 400;
}

.profile-tabs .nav-link.active {
    color: var(--admin-blue);
    background: #fff;
}

.profile-school-card {
    max-width: 100%;
}

.profile-school-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 1rem;
}

.profile-school-table {
    table-layout: fixed;
    width: 100% !important;
    margin-bottom: 0;
    font-size: .82rem;
}

.profile-school-table-wrap .dt-container,
.profile-school-table-wrap .dt-layout-row,
.profile-school-table-wrap .dt-layout-cell,
.profile-school-table-wrap .dt-layout-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.profile-school-table-wrap .dt-layout-table {
    overflow: hidden;
}

.profile-school-table th,
.profile-school-table td {
    box-sizing: border-box;
    padding: .45rem .42rem;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.profile-school-table thead th {
    font-size: .74rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: normal;
}

.profile-school-table th:nth-child(1),
.profile-school-table td:nth-child(1) {
    width: 9%;
}

.profile-school-table th:nth-child(2),
.profile-school-table td:nth-child(2),
.profile-school-table th:nth-child(3),
.profile-school-table td:nth-child(3) {
    width: 15%;
}

.profile-school-table th:nth-child(4),
.profile-school-table td:nth-child(4) {
    width: 11%;
}

.profile-school-table th:nth-child(5),
.profile-school-table td:nth-child(5) {
    width: 8%;
}

.profile-school-table th:nth-child(6),
.profile-school-table td:nth-child(6) {
    width: 13%;
}

.profile-school-table th:nth-child(7),
.profile-school-table td:nth-child(7) {
    width: 7%;
}

.profile-school-table th:nth-child(8),
.profile-school-table td:nth-child(8) {
    width: 10%;
}

.profile-school-table th:nth-child(9),
.profile-school-table td:nth-child(9) {
    width: 12%;
}

.profile-school-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    min-height: 28px;
    line-height: 1.2;
    white-space: nowrap;
}

.legacy-profile-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legacy-profile-heading .breadcrumb {
    font-size: .9rem;
}

.legacy-card {
    background: #fff;
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .10);
    overflow: hidden;
}

.legacy-card-header {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid #e3e6f0;
    background: #fff;
}

.legacy-card-header h2 {
    margin: 0;
    color: var(--admin-blue);
    font-size: 1rem;
    font-weight: 500;
}

.legacy-card-body {
    padding: 1.25rem;
}

.legacy-profile-photo {
    width: 268px;
    height: 350px;
    max-width: 100%;
    object-fit: cover;
    border: 1px solid #dddfeb;
    border-radius: 4px;
    padding: .25rem;
    background: #fff;
}

.legacy-section {
    margin: 1.15rem 0 .85rem;
    border-bottom: 1px solid #e3e6f0;
}

.legacy-section h3 {
    display: inline-block;
    margin: 0 0 .65rem;
    color: #5a5c69;
    font-size: 1.32rem;
    font-weight: 400;
}

.legacy-label {
    display: block;
    color: #5a5c69;
    font-size: .92rem;
    font-weight: 400;
    margin-bottom: .35rem;
}

.legacy-control.form-control:disabled {
    background-color: #eaecf4;
    border-color: #d1d3e2;
    color: #4e535f;
    opacity: 1;
}

.profile-value-link {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .375rem .75rem;
    border: 1px solid #d1d3e2;
    border-radius: .375rem;
    background: #fff;
    color: var(--admin-blue);
    font-size: 1.15rem;
    font-weight: 400;
    text-align: center;
}

.profile-value-link:hover {
    border-color: var(--admin-blue);
    background: var(--admin-blue-soft);
    color: var(--admin-blue-dark);
    text-decoration: none;
}

.profile-value-link-control {
    min-height: auto;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    font-size: 1rem;
}

.input-group .legacy-inline-action {
    white-space: nowrap;
}

.legacy-form-row + .legacy-section {
    margin-top: 1.45rem;
}

.legacy-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .55rem;
    margin-top: 1.6rem;
}

.process-checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: .75rem;
}

.process-checklist-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    min-height: 78px;
    margin: 0;
    padding: .9rem 1rem;
    border: 1px solid #dfe3ec;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.process-checklist-item:hover {
    border-color: #aab7dd;
    box-shadow: 0 .15rem .5rem rgba(58, 59, 69, .08);
}

.process-checklist-item.is-checked {
    border-color: #b7c7f1;
    background: #f5f8ff;
}

.process-checklist-item.is-current {
    border-color: #f0b429;
    background: #fff8df;
    box-shadow: inset 4px 0 0 #f0b429, 0 .15rem .5rem rgba(240, 180, 41, .16);
}

.process-checklist-item.is-current:hover {
    border-color: #dda20f;
    background: #fff4c5;
}

.process-checklist-item .form-check-input {
    flex: 0 0 auto;
    width: 1.2rem;
    height: 1.2rem;
    margin: .12rem 0 0;
}

.process-checklist-item .form-check-input:disabled {
    opacity: 1;
    cursor: not-allowed;
}

.process-checklist-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .25rem;
}

.process-checklist-title {
    color: #3f4553;
    line-height: 1.35;
}

.process-checklist-status {
    font-size: .82rem;
}

.process-checklist-status.text-current {
    color: #8a6400;
}

.app-confirm-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 1rem 3rem rgba(36, 42, 62, .22);
}

.app-confirm-icon {
    display: inline-flex;
    width: 68px;
    height: 68px;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    border-radius: 50%;
    font-size: 2rem;
}

.app-confirm-icon-primary,
.app-confirm-icon-info {
    background: #e8efff;
    color: var(--admin-blue);
}

.app-confirm-icon-warning {
    background: #fff3cd;
    color: #b27a00;
}

.app-confirm-icon-danger {
    background: #fde8eb;
    color: #dc3545;
}

.app-confirm-icon-success {
    background: #e5f6ed;
    color: #198754;
}

.app-confirm-title {
    margin: 0 0 .65rem;
    color: #343947;
    font-size: 1.35rem;
    font-weight: 600;
}

.app-confirm-message {
    margin: 0;
    color: #6c7280;
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-line;
}

.app-confirm-modal .modal-footer .btn {
    min-width: 120px;
}

.legacy-card .table thead th {
    background: #f8f9fc;
}

.legacy-page-title .breadcrumb {
    margin-bottom: 0;
    font-size: .9rem;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.btn-block {
    display: block;
}

.legacy-datatables-card {
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .10);
}

.legacy-datatables-card .card-header {
    background: #fff;
    border-bottom: 1px solid #e3e6f0;
}

.table-flush {
    margin-bottom: 0;
}

.table-flush thead.thead-light th {
    background-color: #f8f9fc;
    border-color: #e3e6f0;
    color: #6e707e;
}

.table-flush td,
.table-flush th {
    vertical-align: middle;
}

.transaction-detail-cell {
    min-width: 420px;
    max-width: 720px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.legacy-badge {
    border-radius: .25rem;
    padding: .35em .55em;
    font-size: .78rem;
    font-weight: 500;
}

.legacy-badge-primary {
    background: var(--admin-blue);
    color: #fff;
}

.legacy-badge-info {
    background: #36b9cc;
    color: #fff;
}

.legacy-badge-success {
    background: #1cc88a;
    color: #fff;
}

.legacy-badge-warning {
    background: #f6c23e;
    color: #212529;
}

.legacy-badge-danger {
    background: #e74a3b;
    color: #fff;
}

.legacy-badge-secondary {
    background: #858796;
    color: #fff;
}

.transaction-process-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    min-height: 28px;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
}

.transaction-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    min-height: 28px;
    text-align: center;
}

.block-order-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.block-order-filters {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
}

.block-order-filter-field {
    display: grid;
    gap: .35rem;
    min-width: 0;
    margin: 0;
}

.block-order-filter-field > span {
    color: var(--admin-muted);
    font-size: .8rem;
    font-weight: 500;
}

.block-order-filter-field .form-select,
.block-order-filter-field .select2-container {
    width: 100% !important;
    max-width: 100%;
}

.block-order-filter-field .form-select {
    min-height: 36px;
}

.block-order-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}

.block-order-filter-actions .btn {
    min-width: 132px;
    min-height: 36px;
}

.block-order-line-table {
    min-width: 1320px;
    white-space: nowrap;
}

.block-order-line-table th:first-child,
.block-order-line-table td:first-child {
    width: 90px;
    min-width: 90px;
    text-align: center;
}

.block-order-line-table td:first-child .form-control {
    min-width: 64px;
    padding-left: .35rem;
    padding-right: .35rem;
    color: var(--admin-text);
}

.block-order-line-table .select2-container {
    min-width: 240px;
}

.block-order-line-table .btn-group {
    white-space: nowrap;
}

.school-branch-summary-card {
    display: grid;
    grid-template-columns: minmax(190px, .9fr) minmax(260px, 1.1fr);
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .04);
}

.school-branch-summary-head {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}

.school-branch-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--admin-blue);
    color: #fff;
    font-size: 1.35rem;
}

.school-branch-code {
    display: block;
    margin-bottom: .1rem;
    color: var(--admin-blue);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
}

.school-branch-summary-head h3 {
    margin: 0;
    color: var(--admin-text);
    font-size: 1rem;
    font-weight: 600;
}

.school-branch-summary-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    overflow: hidden;
}

.school-branch-summary-metric {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-width: 0;
    padding: .75rem;
}

.school-branch-summary-metric + .school-branch-summary-metric {
    border-left: 1px solid var(--admin-border);
}

.school-branch-metric-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--admin-blue-soft);
    color: var(--admin-blue);
    font-size: 1.05rem;
}

.school-branch-summary-metric span {
    color: var(--admin-muted);
    font-size: .78rem;
}

.school-branch-summary-metric strong {
    display: block;
    color: var(--admin-text);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.school-branch-summary-metric small {
    color: var(--admin-muted);
    font-size: .75rem;
    font-weight: 400;
}

@media (max-width: 1399.98px) {
    .school-branch-summary-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 575.98px) {
    .school-branch-summary-card {
        padding: .85rem;
    }

    .school-branch-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        font-size: 1.2rem;
    }

    .school-branch-summary-metric {
        align-items: flex-start;
        flex-direction: column;
        gap: .4rem;
        padding: .65rem;
    }

    .school-branch-metric-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: .95rem;
    }

    .school-branch-summary-metric strong {
        font-size: 1.15rem;
    }
}

.school-level-panel {
    overflow: hidden;
}

.school-level-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.school-level-card:hover {
    border-color: #b9cbed;
    box-shadow: 0 10px 22px rgba(47, 101, 187, .08);
    transform: translateY(-2px);
}

.school-level-card-head {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.school-level-number {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--admin-blue-soft);
    color: var(--admin-blue-dark);
    font-size: 1.35rem;
    font-weight: 700;
}

.school-level-card h3 {
    margin: 0 0 .3rem;
    color: var(--admin-text);
    font-size: 1.05rem;
    font-weight: 600;
}

.school-level-branches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.school-level-branch {
    min-width: 0;
    padding: .75rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
}

.school-level-branch h4 {
    margin: 0 0 .65rem;
    color: var(--admin-blue-dark);
    font-size: .86rem;
    font-weight: 600;
}

.school-level-branch dl {
    display: grid;
    gap: .4rem;
    margin: 0;
}

.school-level-branch dl > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
}

.school-level-branch dt {
    color: var(--admin-muted);
    font-size: .76rem;
    font-weight: 400;
}

.school-level-branch dd {
    margin: 0;
    color: var(--admin-text);
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
}

.school-level-card .btn {
    margin-top: auto;
}

.school-ajls-edit-card {
    overflow: visible;
}

.school-ajls-edit-body {
    min-width: 0;
}

.school-ajls-line-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.school-ajls-table-toolbar,
.school-ajls-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
}

.school-ajls-table-toolbar {
    margin-bottom: .5rem;
}

.school-ajls-table-footer {
    margin-top: .75rem;
}

.school-ajls-page-size,
.school-ajls-search {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    font-weight: 600;
    white-space: nowrap;
}

.school-ajls-page-size .form-select {
    width: 72px;
}

.school-ajls-search .form-control {
    width: 190px;
}

#schoolLineInfo {
    font-weight: 600;
}

#schoolLinePagination .page-link {
    min-width: 34px;
    text-align: center;
}

.school-ajls-line-wrap .dt-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
}

.school-ajls-line-wrap .dt-layout-row {
    max-width: 100%;
    min-width: 0;
}

.school-ajls-line-wrap .dt-layout-table {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden !important;
}

.school-ajls-line-wrap table.school-ajls-line-table {
    table-layout: fixed;
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
    font-size: .8rem;
}

.school-ajls-line-table th,
.school-ajls-line-table td {
    box-sizing: border-box;
    vertical-align: middle;
    text-align: left;
    padding: .32rem .36rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.school-ajls-line-table thead th {
    height: 48px;
    padding: .65rem .4rem;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
}

.school-ajls-line-table .school-col-no,
.school-ajls-line-table th:nth-child(1),
.school-ajls-line-table td:nth-child(1) {
    width: 5% !important;
}

.school-ajls-line-table .school-col-id,
.school-ajls-line-table th:nth-child(2),
.school-ajls-line-table td:nth-child(2) {
    width: 9% !important;
}

.school-ajls-line-table .school-col-first-name,
.school-ajls-line-table th:nth-child(3),
.school-ajls-line-table td:nth-child(3) {
    width: 9% !important;
}

.school-ajls-line-table .school-col-last-name,
.school-ajls-line-table th:nth-child(4),
.school-ajls-line-table td:nth-child(4) {
    width: 10% !important;
}

.school-ajls-line-table td:nth-child(3),
.school-ajls-line-table td:nth-child(4) {
    text-align: center;
}

.school-ajls-line-table .school-col-lv,
.school-ajls-line-table th:nth-child(5),
.school-ajls-line-table td:nth-child(5) {
    width: 5% !important;
}

.school-ajls-line-table .school-col-company,
.school-ajls-line-table th:nth-child(6),
.school-ajls-line-table td:nth-child(6) {
    width: 15% !important;
}

.school-ajls-line-table .school-col-coop,
.school-ajls-line-table th:nth-child(7),
.school-ajls-line-table td:nth-child(7) {
    width: 14% !important;
}

.school-ajls-line-table .school-col-date,
.school-ajls-line-table th:nth-child(8),
.school-ajls-line-table td:nth-child(8) {
    width: 13% !important;
}

.school-ajls-line-table .school-col-score,
.school-ajls-line-table th:nth-child(9),
.school-ajls-line-table td:nth-child(9) {
    width: 8% !important;
}

.school-ajls-line-table .school-col-result,
.school-ajls-line-table th:nth-child(10),
.school-ajls-line-table td:nth-child(10) {
    width: 8% !important;
}

.school-ajls-line-table .school-col-action,
.school-ajls-line-table th:nth-child(11),
.school-ajls-line-table td:nth-child(11) {
    width: 4% !important;
    text-align: center;
}

.school-ajls-line-table .school-ajls-no-cell,
.school-ajls-line-table .school-ajls-id-cell,
.school-ajls-line-table .school-ajls-lv-cell,
.school-ajls-line-table .school-ajls-action-cell {
    text-align: center;
}

.school-ajls-line-table input[type="date"],
.school-ajls-line-table input[type="number"],
.school-ajls-line-table .form-select {
    width: 100%;
    min-width: 0;
}

.school-ajls-line-table .form-control-sm,
.school-ajls-line-table .form-select-sm,
.school-ajls-line-table .btn-sm {
    min-height: 30px;
    font-size: .78rem;
}

.school-ajls-line-table .form-control-sm,
.school-ajls-line-table .form-select-sm {
    padding-left: .25rem;
    padding-right: .25rem;
}

.school-ajls-line-table .form-select-sm {
    background-position: right .25rem center;
    background-size: 12px 9px;
}

.school-ajls-line-table .school-ajls-no-cell .form-control-sm,
.school-ajls-line-table .school-ajls-action-cell .btn-sm {
    padding-left: .2rem;
    padding-right: .2rem;
}

.school-heading-back {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
    color: var(--admin-text);
}

.school-heading-back:hover,
.school-heading-back:focus-visible {
    border-color: var(--admin-blue);
    color: var(--admin-blue);
}

.school-level-switcher {
    display: flex;
    gap: .5rem;
    max-width: 100%;
    padding-bottom: .2rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.school-level-switch {
    min-width: 92px;
    padding: .55rem .8rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
    color: var(--admin-muted);
    font-size: .88rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.school-level-switch:hover,
.school-level-switch:focus-visible {
    border-color: #b9cbed;
    color: var(--admin-blue);
}

.school-level-switch.active {
    border-color: var(--admin-blue);
    background: var(--admin-blue);
    color: #fff;
}

.school-room-panel {
    overflow: hidden;
}

.school-room-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.school-room-filters {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
}

.school-room-filter-field {
    display: grid;
    gap: .35rem;
    min-width: 0;
    margin: 0;
}

.school-room-filter-field > span {
    color: var(--admin-muted);
    font-size: .8rem;
    font-weight: 500;
}

.school-room-filter-field .form-select {
    width: 100%;
    min-height: 36px;
}

.school-room-filter-reset {
    min-height: 36px;
    white-space: nowrap;
}

.school-room-table-wrap,
.school-room-table-wrap .dt-container,
.school-room-table-wrap .dt-layout-row,
.school-room-table-wrap .dt-layout-cell {
    max-width: 100%;
    min-width: 0;
}

.school-ajls-room-table {
    min-width: 1180px;
}

.school-ajls-room-table th,
.school-ajls-room-table td {
    text-align: left !important;
    vertical-align: middle;
}

.school-ajls-room-table th:nth-child(7),
.school-ajls-room-table td:nth-child(7),
.school-ajls-room-table th:nth-child(9),
.school-ajls-room-table td:nth-child(9) {
    text-align: right !important;
}

.school-room-name {
    color: var(--admin-blue-dark);
    font-weight: 600;
}

.school-room-name:hover,
.school-room-name:focus-visible {
    color: var(--admin-blue);
    text-decoration: underline;
}

.school-room-date {
    white-space: nowrap;
}

.school-room-open {
    white-space: nowrap;
}

.school-room-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 2rem 1rem;
    text-align: center;
}

.school-room-empty-icon {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--admin-blue-soft);
    color: var(--admin-blue);
    font-size: 1.65rem;
}

.school-room-empty h3 {
    margin-bottom: .35rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.school-room-empty p {
    margin-bottom: 1rem;
    color: var(--admin-muted);
}

.school-room-form-section {
    overflow: visible;
}

.school-room-form-heading {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--admin-border);
}

.school-room-form-heading h2 {
    margin: 0 0 .25rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.school-room-form-heading p {
    margin: 0;
    color: var(--admin-muted);
    font-size: .88rem;
}

.school-room-form-step {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--admin-blue);
    color: #fff;
    font-weight: 600;
}

.school-room-form-section .form-label {
    margin-bottom: .4rem;
    color: var(--admin-text);
    font-size: .9rem;
    font-weight: 500;
}

.school-room-form-section .form-text {
    color: var(--admin-muted);
}

.school-room-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .04);
}

.school-room-section-actions,
.school-score-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--admin-border);
}

.school-score-actions {
    justify-content: center;
}

.school-student-score-panel {
    overflow: hidden;
}

.school-candidate-panel {
    overflow: hidden;
}

.school-candidate-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.school-candidate-selected {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding: .55rem .8rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-muted);
    font-size: .82rem;
    white-space: nowrap;
}

.school-candidate-selected strong {
    color: var(--admin-blue-dark);
    font-size: 1.05rem;
    font-weight: 600;
}

.school-candidate-table-wrap,
.school-candidate-table-wrap .dt-container,
.school-candidate-table-wrap .dt-layout-row,
.school-candidate-table-wrap .dt-layout-cell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.school-candidate-table {
    min-width: 1180px;
}

.school-candidate-table th,
.school-candidate-table td {
    vertical-align: middle;
}

.school-candidate-check-col {
    width: 52px;
    min-width: 52px;
}

.school-candidate-row-selected > td {
    background-color: var(--admin-blue-soft) !important;
}

.school-candidate-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 2rem 1rem;
    text-align: center;
}

.school-candidate-empty > span {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--admin-blue-soft);
    color: var(--admin-blue);
    font-size: 1.5rem;
}

.school-candidate-empty h3 {
    margin-bottom: .35rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.school-candidate-empty p {
    margin: 0;
    color: var(--admin-muted);
}

.school-candidate-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .04);
}

.school-candidate-action-summary {
    margin-left: auto;
    color: var(--admin-muted);
    font-size: .88rem;
}

.school-candidate-action-summary strong {
    color: var(--admin-text);
}

.school-ajls-room-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    min-height: 28px;
    text-align: center;
}

.school-ajls-teacher-select + .select2-container {
    width: 100% !important;
}

.school-ajls-course-select + .select2-container {
    width: 100% !important;
}

.school-ajls-teacher-select + .select2-container .select2-selection--single {
    min-height: 38px;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    display: flex;
    align-items: center;
}

.school-ajls-teacher-select + .select2-container .select2-selection__rendered {
    line-height: 1.5;
    padding-left: .75rem;
    padding-right: 2rem;
}

.school-ajls-teacher-select + .select2-container .select2-selection__arrow {
    height: 36px;
    right: .35rem;
}

.school-ajls-course-select + .select2-container .select2-selection--single {
    min-height: 42px;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    display: flex;
    align-items: center;
}

.school-ajls-course-select + .select2-container .select2-selection__rendered {
    width: 100%;
    line-height: 1.5;
    padding-left: .75rem;
    padding-right: 2rem;
}

.school-ajls-course-select + .select2-container .select2-selection__arrow {
    height: 40px;
    right: .35rem;
}

#schoolLineTable_wrapper,
#schoolLineTable_wrapper .dt-layout-row,
#schoolLineTable_wrapper .dt-layout-cell,
#schoolLineTable_wrapper .dt-layout-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

#schoolLineTable_wrapper .dt-layout-table {
    overflow: hidden !important;
}

#schoolLineTable {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

#schoolLineTable col:nth-child(1),
#schoolLineTable th:nth-child(1),
#schoolLineTable td:nth-child(1) {
    width: 5% !important;
}

#schoolLineTable col:nth-child(2),
#schoolLineTable th:nth-child(2),
#schoolLineTable td:nth-child(2) {
    width: 9% !important;
}

#schoolLineTable col:nth-child(3),
#schoolLineTable th:nth-child(3),
#schoolLineTable td:nth-child(3) {
    width: 9% !important;
}

#schoolLineTable col:nth-child(4),
#schoolLineTable th:nth-child(4),
#schoolLineTable td:nth-child(4) {
    width: 10% !important;
}

#schoolLineTable col:nth-child(5),
#schoolLineTable th:nth-child(5),
#schoolLineTable td:nth-child(5) {
    width: 5% !important;
}

#schoolLineTable col:nth-child(6),
#schoolLineTable th:nth-child(6),
#schoolLineTable td:nth-child(6) {
    width: 15% !important;
}

#schoolLineTable col:nth-child(7),
#schoolLineTable th:nth-child(7),
#schoolLineTable td:nth-child(7) {
    width: 14% !important;
}

#schoolLineTable col:nth-child(8),
#schoolLineTable th:nth-child(8),
#schoolLineTable td:nth-child(8) {
    width: 13% !important;
}

#schoolLineTable col:nth-child(9),
#schoolLineTable th:nth-child(9),
#schoolLineTable td:nth-child(9) {
    width: 8% !important;
}

#schoolLineTable col:nth-child(10),
#schoolLineTable th:nth-child(10),
#schoolLineTable td:nth-child(10) {
    width: 8% !important;
}

#schoolLineTable col:nth-child(11),
#schoolLineTable th:nth-child(11),
#schoolLineTable td:nth-child(11) {
    width: 4% !important;
    text-align: center;
}

#schoolLineTable th,
#schoolLineTable td {
    max-width: 0;
    overflow: hidden !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#schoolLineTable thead th {
    white-space: normal;
}

#schoolLineTable .form-control,
#schoolLineTable .form-select,
#schoolLineTable .btn {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767.98px) {
    .school-ajls-table-toolbar,
    .school-ajls-table-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .school-ajls-search,
    .school-ajls-search .form-control {
        width: 100%;
    }
}

@media (max-width: 1199.98px) {
    .filter-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

    .box-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .profile-field-grid,
    .profile-field-grid-4,
    .profile-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .filter-panel-header {
        display: block;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-wide {
        grid-column: auto;
    }

    .filter-actions-row {
        justify-self: stretch;
        width: 100%;
    }

    .box-card-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-field-grid,
    .profile-field-grid-4,
    .profile-summary-grid {
        grid-template-columns: 1fr;
    }

    .profile-actions .btn {
        width: 100%;
    }

    .profile-school-table-wrap {
        overflow-x: auto;
    }

    .profile-school-table {
        min-width: 980px;
    }

    .legacy-profile-heading {
        display: block;
    }

    .legacy-action-row .btn,
    .legacy-action-row .btn-group {
        width: 100%;
    }

    .legacy-action-row .btn-group .btn {
        width: 100%;
    }
}

.master-data-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.master-data-menu {
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 110px);
    overflow: auto;
}

.master-data-menu-title {
    margin-bottom: .75rem;
    color: var(--admin-muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.master-data-search,
.master-data-table-search {
    position: relative;
}

.master-data-search {
    margin-bottom: .85rem;
}

.master-data-search .bi,
.master-data-table-search .bi {
    position: absolute;
    top: 50%;
    left: .75rem;
    color: var(--admin-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.master-data-search .form-control,
.master-data-table-search .form-control {
    padding-left: 2.2rem;
}

.master-data-group + .master-data-group {
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid var(--admin-border);
}

.master-data-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .45rem;
    color: var(--admin-muted);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.master-data-group-title em {
    min-width: 24px;
    color: var(--admin-muted);
    font-size: .72rem;
    font-style: normal;
    text-align: right;
}

.master-data-menu-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .7rem .75rem;
    color: var(--admin-text);
    border: 1px solid transparent;
    border-radius: 8px;
}

.master-data-menu-item:hover,
.master-data-menu-item.active {
    color: var(--admin-blue);
    background: var(--admin-blue-soft);
    border-color: #d7e6ff;
}

.master-data-menu-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-blue);
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
}

.master-data-menu-item strong,
.master-data-menu-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.master-data-menu-item strong {
    font-weight: 700;
}

.master-data-menu-item small {
    color: var(--admin-muted);
}

.master-data-menu-item em {
    min-width: 30px;
    padding: .15rem .45rem;
    color: var(--admin-muted);
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    font-size: .75rem;
    font-style: normal;
    text-align: center;
}

.master-data-content {
    min-width: 0;
}

.master-data-empty {
    padding: .85rem .75rem;
    color: var(--admin-muted);
    text-align: center;
}

.master-data-form .form-label {
    font-weight: 600;
}

.master-data-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.master-data-table-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.master-data-table-search {
    width: min(320px, 42vw);
}

.master-data-table td {
    max-width: 320px;
    vertical-align: middle;
}

@media (max-width: 991.98px) {
    .master-data-layout {
        grid-template-columns: 1fr;
    }

    .master-data-menu {
        position: static;
        max-height: none;
    }

    .master-data-list-toolbar,
    .master-data-table-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .master-data-table-search {
        width: 100%;
    }
}

/* Responsive polish for tablet and phone layouts. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.form-control,
.form-select,
.btn {
    min-height: 42px;
}

.btn-sm,
.form-control-sm,
.form-select-sm {
    min-height: 34px;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.dt-container {
    min-width: 0;
}

.dt-container .dt-layout-row {
    gap: .75rem;
}

.dt-container .dt-length,
.dt-container .dt-search,
.dt-container .dt-info,
.dt-container .dt-paging {
    min-width: 0;
}

.dt-container .dt-search input {
    max-width: 100%;
}

.pagination {
    flex-wrap: wrap;
    gap: .25rem;
}

.page-link {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1199.98px) {
    :root {
        --sidebar-width: 250px;
    }

    .container-fluid {
        max-width: 100%;
    }

    .box-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-card {
        align-items: flex-start;
    }

    .master-data-table td {
        max-width: 240px;
    }
}

@media (max-width: 991.98px) {
    :root {
        --sidebar-width: min(84vw, 300px);
    }

    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        width: var(--sidebar-width);
        max-width: 100vw;
    }

    .admin-sidebar.is-open {
        box-shadow: 0 .15rem 1.75rem rgba(58, 59, 69, .18);
    }

    .admin-topbar {
        height: 62px;
        padding: 0 .75rem;
    }

    .sidebar-toggle,
    .topbar-icon {
        width: 44px;
        height: 44px;
    }

    .topbar-nav {
        gap: .25rem;
    }

    .page-heading {
        margin-bottom: 1rem;
    }

    .page-heading h1 {
        font-size: 1.35rem;
        line-height: 1.35;
    }

    .panel,
    .legacy-card-body {
        padding: 1rem;
    }

    .legacy-card-header {
        align-items: flex-start;
        flex-direction: column;
        gap: .65rem;
        padding: .85rem 1rem;
    }

    .legacy-card-header .btn,
    .legacy-card-header .btn-group {
        width: 100%;
    }

    .profile-hero {
        grid-template-columns: 170px minmax(0, 1fr);
    }

    .profile-photo {
        width: 160px;
    }

    .profile-hero h2 {
        font-size: 1.25rem;
    }

    .school-ajls-line-wrap .dt-layout-table,
    #schoolLineTable_wrapper .dt-layout-table {
        overflow-x: auto !important;
    }

    .school-ajls-line-wrap table.school-ajls-line-table,
    #schoolLineTable {
        min-width: 920px !important;
    }
}

@media (max-width: 767.98px) {
    .school-room-edit-heading-main,
    .school-room-edit-heading-main > div {
        min-width: 0;
        width: 100%;
    }

    .school-room-edit-heading h1 {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .school-room-edit-heading > div > .btn {
        width: 100%;
    }

    #schoolRoomForm,
    .school-room-form-section,
    .school-student-score-panel {
        min-width: 0;
    }

    .school-room-form-section,
    .school-student-score-panel {
        padding: .75rem;
    }

    .school-room-form-heading {
        gap: .65rem;
        margin-bottom: 1rem;
        padding-bottom: .75rem;
    }

    .school-room-form-step {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }

    .school-room-form-section .form-control,
    .school-room-form-section .form-select,
    .school-room-form-section .select2-selection__rendered {
        font-size: 1rem;
    }

    .school-room-form-section .form-control,
    .school-room-form-section .form-select {
        min-height: 44px;
    }

    .school-room-form-section .select2-container {
        width: 100% !important;
        max-width: 100%;
    }

    .school-student-score-panel,
    .school-ajls-line-wrap {
        overflow: visible;
    }

    #schoolLineTable {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        border: 0;
        background: transparent;
    }

    #schoolLineTable colgroup,
    #schoolLineTable thead {
        display: none;
    }

    #schoolLineTable tbody {
        display: grid;
        gap: .75rem;
        width: 100%;
    }

    #schoolLineTable tbody tr {
        display: block;
        width: 100%;
        border: 1px solid var(--admin-border);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 4px 12px rgba(16, 24, 40, .05);
        overflow: hidden;
    }

    .school-student-score-panel #schoolLineTable tbody td {
        display: grid;
        grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
        align-items: center;
        gap: .65rem;
        width: 100% !important;
        max-width: none;
        min-height: 44px;
        padding: .55rem .65rem;
        border-width: 0 0 1px;
        overflow: visible !important;
        white-space: normal;
        text-align: left;
        text-overflow: clip;
    }

    #schoolLineTable tbody td:last-child {
        border-bottom: 0;
    }

    #schoolLineTable tbody td::before {
        content: attr(data-label);
        color: var(--admin-muted);
        font-size: .78rem;
        font-weight: 600;
        line-height: 1.3;
    }

    #schoolLineTable tbody td:nth-child(3),
    #schoolLineTable tbody td:nth-child(4),
    #schoolLineTable .school-ajls-no-cell,
    #schoolLineTable .school-ajls-id-cell,
    #schoolLineTable .school-ajls-lv-cell,
    #schoolLineTable .school-ajls-action-cell {
        text-align: left;
    }

    #schoolLineTable .form-control-sm,
    #schoolLineTable .form-select-sm {
        min-height: 40px;
        font-size: 1rem;
    }

    #schoolLineTable .school-ajls-id-cell a {
        overflow-wrap: anywhere;
    }

    #schoolLineTable .school-ajls-action-cell .btn-sm {
        width: 44px;
        min-height: 40px;
        justify-self: end;
    }

    body {
        font-size: .94rem;
    }

    .admin-topbar {
        height: 58px;
        gap: .5rem;
    }

    .topbar-divider {
        display: none;
    }

    .container-fluid {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
        padding-top: 1rem !important;
        padding-bottom: 1.25rem !important;
    }

    .page-heading h1 {
        font-size: 1.22rem;
    }

    .page-heading p {
        font-size: .9rem;
        line-height: 1.45;
    }

    .panel,
    .stat-card,
    .process-card,
    .profile-hero,
    .legacy-card {
        border-radius: 6px;
    }

    .panel,
    .filter-panel,
    .legacy-card-body,
    .profile-school-table-wrap {
        padding: .85rem;
    }

    .row {
        --bs-gutter-x: .75rem;
        --bs-gutter-y: .75rem;
    }

    .process-checklist-grid {
        grid-template-columns: 1fr;
    }

    .filter-panel-header {
        margin-bottom: .75rem;
    }

    .filter-panel-header .text-muted {
        display: block;
        margin-top: .15rem;
    }

    .filter-actions-row {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: .9rem;
    }

    .stat-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        font-size: 1.2rem;
    }

    .stat-value,
    .process-count,
    .box-status-count {
        font-size: 1.5rem;
    }

    .report-card-value {
        font-size: 1.42rem;
    }

    .report-chart-wrap {
        height: 280px;
    }

    .box-status-body h3 {
        min-height: 0;
        font-size: 1rem;
    }

    .table {
        font-size: .86rem;
    }

    .customer-table {
        font-size: .84rem;
    }

    .customer-photo {
        width: 48px;
        height: 64px;
    }

    .dt-container .dt-layout-row,
    .dt-container .dt-layout-cell {
        display: block;
        width: 100%;
        text-align: left !important;
    }

    .dt-container .dt-layout-cell + .dt-layout-cell {
        margin-top: .6rem;
    }

    .dt-container .dt-length,
    .dt-container .dt-search {
        width: 100%;
    }

    .dt-container .dt-length label,
    .dt-container .dt-search label {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: .35rem;
    }

    .dt-container .dt-length select,
    .dt-container .dt-search input {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .dt-container .dt-info {
        font-size: .84rem;
    }

    .dt-container .dt-paging nav,
    .dt-container .pagination {
        justify-content: flex-start !important;
    }

    .profile-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-photo {
        width: min(180px, 70vw);
    }

    .profile-meta,
    .profile-actions {
        justify-content: center;
    }

    .profile-tabs {
        gap: .35rem;
        padding-bottom: .2rem;
    }

    .profile-tabs .nav-link {
        min-height: 38px;
        padding: .5rem .75rem;
    }

    .profile-field {
        padding: .65rem;
    }

    .profile-value-link {
        justify-content: flex-start;
        min-height: 42px;
        font-size: 1rem;
        text-align: left;
    }

    .legacy-section h3 {
        font-size: 1.05rem;
    }

    .transaction-detail-cell {
        min-width: 260px;
        max-width: 80vw;
    }

    .block-order-list-head {
        align-items: stretch;
        flex-direction: column;
    }

    .block-order-list-head .btn {
        width: 100%;
    }

    .block-order-filters {
        padding: .75rem;
    }

    .block-order-filter-actions {
        flex-direction: column;
        width: 100%;
    }

    .block-order-filter-actions .btn {
        width: 100%;
    }

    .block-order-filter-field .form-select,
    .block-order-filter-field .select2-selection__rendered {
        font-size: 1rem;
    }

    .block-order-filter-field .form-select,
    .block-order-filter-field .select2-selection--single {
        min-height: 44px;
    }

    .block-order-filter-field .select2-selection__arrow {
        height: 42px !important;
    }

    .block-order-line-table .select2-container {
        min-width: 180px;
    }

    .block-order-line-table th:first-child,
    .block-order-line-table td:first-child {
        width: 76px;
        min-width: 76px;
    }

    .block-order-line-table td:first-child .form-control {
        min-width: 54px;
    }

    .school-ajls-table-toolbar,
    .school-ajls-table-footer,
    .master-data-list-toolbar,
    .master-data-table-actions {
        gap: .65rem;
    }

    .school-ajls-page-size,
    .school-ajls-search {
        align-items: stretch;
        flex-direction: column;
        gap: .3rem;
        white-space: normal;
    }

    .school-ajls-page-size .form-select {
        width: 100%;
    }

    .school-level-card:hover {
        transform: none;
    }

    .school-room-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .school-room-empty {
        min-height: 240px;
    }

    .school-room-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .school-room-form-actions .btn {
        width: 100%;
    }

    .school-room-section-actions,
    .school-score-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .school-room-section-actions .btn,
    .school-score-actions .btn {
        width: 100%;
    }

    .school-candidate-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .school-candidate-selected {
        justify-content: space-between;
    }

    .school-candidate-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .school-candidate-actions .btn {
        width: 100%;
    }

    .school-candidate-action-summary {
        margin-left: 0;
        text-align: center;
    }

    .school-candidate-empty {
        min-height: 230px;
    }

    .master-data-menu-item {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: .6rem;
        padding: .6rem;
    }

    .master-data-menu-icon {
        width: 34px;
        height: 34px;
    }

    .modal-dialog {
        margin: .75rem;
    }

    .modal-body,
    .modal-header,
    .modal-footer {
        padding-left: .9rem;
        padding-right: .9rem;
    }
}

@media (max-width: 575.98px) {
    .brand {
        height: 62px;
        justify-content: flex-start;
        padding: 0 .85rem;
    }

    .brand-text {
        font-size: .95rem;
    }

    .sidebar-nav {
        padding-bottom: 1rem;
    }

    .nav-link {
        min-height: 46px;
        padding: .7rem .85rem;
    }

    .submenu {
        margin-left: .75rem;
        margin-right: .75rem;
    }

    .panel-title {
        font-size: .96rem;
    }

    .school-level-branches {
        grid-template-columns: 1fr;
    }

    .school-level-branch {
        padding: .7rem;
    }

    .d-flex.flex-wrap.align-items-center.justify-content-between {
        align-items: stretch !important;
    }

    .d-flex.flex-wrap.align-items-center.justify-content-between > .btn,
    .d-flex.flex-wrap.align-items-center.justify-content-between > .btn-group,
    .d-flex.flex-wrap.align-items-center.justify-content-between > form,
    .d-flex.flex-wrap.align-items-center.justify-content-between > div {
        max-width: 100%;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    .btn-group > .btn {
        flex: 1 1 auto;
    }

    .login-card {
        padding: 1.4rem;
    }

    .login-card h1 {
        font-size: 1.15rem;
    }

    .legacy-profile-photo {
        width: min(268px, 100%);
        height: auto;
        aspect-ratio: 268 / 350;
    }

    .transaction-process-badge,
    .transaction-status-badge,
    .profile-school-result-badge,
    .school-ajls-room-status {
        width: auto;
        min-width: 74px;
        max-width: 100%;
        white-space: normal;
    }

    .sticky-savebar {
        padding-top: .75rem;
    }

    .sticky-savebar .btn {
        width: 100%;
    }
}
