/* Professional Admin UI
 * Scoped to the authenticated admin/teacher master layout.
 * No print templates or public pages are affected.
 */
.admin-shell {
    --admin-navy-950: #071c2f;
    --admin-navy-900: #0a2945;
    --admin-navy-800: #103b61;
    --admin-blue-600: #1672ad;
    --admin-blue-500: #2498d1;
    --admin-gold-500: #d4ad5c;
    --admin-green-500: #12a47b;
    --admin-red-500: #dc5a64;
    --admin-amber-500: #d99b36;
    --admin-ink: #16283b;
    --admin-muted: #6f8091;
    --admin-line: #dce5ed;
    --admin-surface: #ffffff;
    --admin-canvas: #f3f6fa;
    --admin-shadow-sm: 0 5px 18px rgba(20, 45, 70, .07);
    --admin-shadow-md: 0 14px 36px rgba(20, 45, 70, .12);
    --admin-header-height: 70px;
    min-height: 100vh;
    color: var(--admin-ink);
    background: var(--admin-canvas);
    font-family: "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

.admin-shell a { transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease; }

/* Sidebar */
.admin-shell .pcoded-navbar,
.admin-shell .pcoded-navbar.navbar-lightblue,
.admin-shell .pcoded-navbar.navbar-image-4 {
    color: #dce8f2;
    background: linear-gradient(180deg, var(--admin-navy-950) 0%, #081f34 55%, #061827 100%);
    box-shadow: 8px 0 28px rgba(7, 28, 47, .14);
}

.admin-shell .pcoded-navbar .header-logo,
.admin-shell .pcoded-navbar.brand-lightblue .header-logo {
    width: 240px;
    height: var(--admin-header-height);
    min-height: var(--admin-header-height);
    padding: 6px 16px;
    box-sizing: border-box;
    background: #071b2d;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.admin-shell .pcoded-navbar .header-logo .b-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 100%;
}

.admin-shell .pcoded-navbar .header-logo .b-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .22));
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar {
    padding: 13px 9px 28px;
    scrollbar-color: rgba(142, 178, 205, .28) transparent;
    scrollbar-width: thin;
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar::-webkit-scrollbar { width: 5px; }
.admin-shell .pcoded-navbar .pcoded-inner-navbar::-webkit-scrollbar-track { background: transparent; }
.admin-shell .pcoded-navbar .pcoded-inner-navbar::-webkit-scrollbar-thumb {
    background: rgba(142, 178, 205, .28);
    border-radius: 10px;
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar > li { margin: 3px 0; }

.admin-shell .pcoded-navbar .pcoded-inner-navbar li > a {
    min-height: 42px;
    padding: 9px 13px;
    color: #c9d8e5;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar li > a .pcoded-micon {
    width: 28px;
    color: #8eb2cd;
    font-size: 16px;
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar li > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
    border-color: rgba(142, 178, 205, .1);
    transform: translateX(2px);
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar > li.active > a,
.admin-shell .pcoded-navbar .pcoded-inner-navbar > li.pcoded-trigger > a {
    color: #fff;
    background: #0c304d;
    border: 1px solid rgba(142, 178, 205, .12);
    border-left: 3px solid var(--admin-gold-500);
    box-shadow: 0 5px 13px rgba(0, 0, 0, .09);
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar > li.active > a .pcoded-micon,
.admin-shell .pcoded-navbar .pcoded-inner-navbar > li.pcoded-trigger > a .pcoded-micon { color: #f1cc79; }

.admin-shell .pcoded-navbar .pcoded-inner-navbar > li.active::after,
.admin-shell .pcoded-navbar .pcoded-inner-navbar > li.pcoded-trigger::after { display: none; }

.admin-shell .pcoded-navbar .pcoded-submenu {
    margin: 4px 0 8px;
    padding: 5px 8px 7px 18px;
    background: transparent;
    border: 0;
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li > a {
    min-height: 35px;
    margin: 1px 0;
    padding: 7px 30px 7px 42px;
    color: #aebfce;
    background: transparent;
    border: 0;
    font-size: 13px;
}

.admin-shell .pcoded-navbar.menu-item-icon-style2 .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li > a::before {
    top: 8px;
    left: 18px;
    color: #6f8da4;
    font-size: 12px;
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li.active > a {
    color: #fff;
    padding-left: 39px;
    background: rgba(36, 152, 209, .2);
    border-left: 3px solid var(--admin-gold-500);
    font-weight: 650;
    box-shadow: none;
}

.admin-shell .pcoded-navbar.menu-item-icon-style2 .pcoded-inner-navbar li.pcoded-hasmenu .pcoded-submenu li.active > a::before {
    left: 15px;
    color: var(--admin-gold-500);
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu > a {
    padding-right: 38px;
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu > a::after {
    top: 0 !important;
    right: 13px !important;
    bottom: 0;
    display: inline-flex;
    height: auto;
    margin: 0;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: none;
}

.admin-shell .pcoded-navbar .pcoded-inner-navbar li.pcoded-hasmenu.pcoded-trigger > a::after {
    transform: rotate(90deg);
}

/* Top bar */
.admin-shell .pcoded-header,
.admin-shell .pcoded-header.header-lightblue {
    min-height: var(--admin-header-height);
    height: var(--admin-header-height);
    padding-top: 0;
    padding-bottom: 0;
    align-items: center;
    color: var(--admin-ink);
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--admin-line);
    box-shadow: 0 4px 18px rgba(20, 45, 70, .06);
    backdrop-filter: blur(10px);
}

.admin-shell .pcoded-header a,
.admin-shell .pcoded-header .dropdown-toggle { color: #38536b; }
.admin-shell .pcoded-header a:hover,
.admin-shell .pcoded-header .dropdown-toggle:hover { color: var(--admin-blue-600); }

.admin-shell .pcoded-header .navbar-collapse { align-items: center; }

.admin-shell .pcoded-header .navbar-nav {
    height: var(--admin-header-height);
    align-items: center;
}

.admin-shell .pcoded-header .navbar-nav > li {
    display: inline-flex;
    height: var(--admin-header-height);
    padding: 0 10px;
    align-items: center;
    line-height: 1.3;
    vertical-align: top;
}

.admin-shell .pcoded-header .navbar-nav > li > .dropdown {
    display: flex;
    height: 100%;
    align-items: center;
}

.admin-shell .pcoded-header .dropdown > .dropdown-toggle {
    display: inline-flex !important;
    width: auto;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    line-height: 1.2;
    white-space: nowrap;
}

.admin-shell .pcoded-header .dropdown > .dropdown-toggle::after {
    position: static !important;
    top: auto !important;
    right: auto !important;
    display: inline-flex;
    margin: 0 0 0 2px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: none !important;
    vertical-align: middle;
}

.admin-shell .pcoded-header .ms-auto > li > .dropdown > .dropdown-toggle {
    height: 40px;
    min-height: 40px;
}

.admin-shell .pcoded-header .full-screen,
.admin-shell .pcoded-header .ms-auto > li > .dropdown > .dropdown-toggle,
.admin-shell .pcoded-header .ms-auto > li > .dropdown > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
}

.admin-shell .pcoded-header .full-screen:hover,
.admin-shell .pcoded-header .ms-auto > li > .dropdown > .dropdown-toggle:hover {
    background: #eef5fa;
    border-color: #dce8f1;
}

.admin-shell .topbar-title {
    margin: 0;
    color: var(--admin-navy-900);
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -.01em;
}

.admin-shell .pcoded-header .dropdown-menu {
    overflow: hidden;
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    box-shadow: var(--admin-shadow-md);
}

.admin-shell .pcoded-header .dropdown .profile-notification .pro-head {
    background: linear-gradient(120deg, var(--admin-navy-900), var(--admin-blue-600));
}

/* Main content */
.admin-shell .pcoded-main-container { background: var(--admin-canvas); }
.admin-shell .pcoded-content { padding: 20px 24px 24px; }
.admin-shell .page-wrapper { padding: 0; }

.admin-shell .main-body > .page-wrapper > .row {
    align-items: flex-start;
    row-gap: 20px;
}

.admin-shell .main-body > .page-wrapper > .row > [class*="col-"] { min-width: 0; }

.admin-shell .card {
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    box-shadow: var(--admin-shadow-sm);
    margin-bottom: 20px;
}

.admin-shell .card .card-header {
    display: flex;
    min-height: 58px;
    padding: 15px 20px;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e5ebf1;
    border-radius: 12px 12px 0 0;
}

.admin-shell .card .card-header::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--admin-blue-500);
}

.admin-shell .card .card-header h5 {
    margin: 0;
    color: var(--admin-navy-900);
    font-size: 17px;
    font-weight: 650;
    line-height: 1.35;
}

.admin-shell .card .card-header h5::after { display: none; }

.admin-shell .card .card-block,
.admin-shell .card .card-body { padding: 20px; }

.admin-shell .card .card-footer {
    padding: 14px 20px;
    background: #fbfcfe;
    border-top: 1px solid #e5ebf1;
    border-radius: 0 0 12px 12px;
}

/* Forms */
.admin-shell .form-group label,
.admin-shell .form-label {
    margin-bottom: 7px;
    color: #506477;
    font-size: 13px;
    font-weight: 600;
}

.admin-shell .form-group { margin-bottom: 17px; }
.admin-shell .form-group:last-child { margin-bottom: 0; }

.admin-shell .form-control,
.admin-shell .form-select,
.admin-shell select.form-control {
    min-height: 44px;
    height: 44px;
    padding: 9px 12px;
    color: var(--admin-ink);
    background-color: #fff;
    border: 1px solid #cfdbe5;
    border-radius: 8px;
    box-shadow: none;
}

.admin-shell textarea.form-control {
    height: auto;
    min-height: 92px;
    resize: vertical;
}

.admin-shell select.form-control[multiple],
.admin-shell select.form-control[size],
.admin-shell input.form-control[type="file"] { height: auto; }

.admin-shell .form-control:focus,
.admin-shell .form-select:focus,
.admin-shell select.form-control:focus {
    background: #fff;
    border-color: var(--admin-blue-500);
    box-shadow: 0 0 0 3px rgba(36, 152, 209, .13);
}

.admin-shell .select2-container .select2-selection--single,
.admin-shell .select2-container .select2-selection--multiple {
    min-height: 44px;
    background: #fff;
    border: 1px solid #cfdbe5;
    border-radius: 8px;
}

.admin-shell .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px; }
.admin-shell .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }

/* Buttons */
.admin-shell .btn {
    min-height: 40px;
    padding: 9px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
}

.admin-shell .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(20, 45, 70, .13); }
.admin-shell .btn-primary,
.admin-shell .btn-info { background: var(--admin-blue-600); border-color: var(--admin-blue-600); }
.admin-shell .btn-success { background: var(--admin-green-500); border-color: var(--admin-green-500); }
.admin-shell .btn-danger { background: var(--admin-red-500); border-color: var(--admin-red-500); }
.admin-shell .btn-dark { background: var(--admin-navy-900); border-color: var(--admin-navy-900); }

.admin-shell .btn-filter {
    height: 44px;
    min-height: 44px;
    margin-top: 27px;
    align-items: center;
}

.admin-shell .form-group.filter-action {
    display: flex;
    padding-top: 27px;
    align-items: flex-start;
}

.admin-shell .form-group.filter-action .btn-filter { margin-top: 0; }

.admin-shell .student-result-filter-action {
    margin-bottom: 17px !important;
}

/* Tables and DataTables */
.admin-shell .table-responsive { border-radius: 9px; }
.admin-shell .table {
    width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    color: #42576a;
}
.admin-shell .table thead th {
    padding: 13px 12px;
    color: #fff;
    background: var(--admin-navy-800);
    border-color: rgba(255, 255, 255, .12);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .02em;
    text-transform: none;
}

.admin-shell .table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-color: #e7edf2;
}

.admin-shell .table-striped tbody tr:nth-of-type(odd),
.admin-shell table.dataTable tbody tr.odd { background: #f7fafc; }
.admin-shell .table tbody tr:hover { background: #eef6fb; }

.admin-shell .table td .btn.btn-icon {
    display: inline-flex;
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    margin: 2px;
    padding: 0;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.admin-shell .dataTables_wrapper > .row:first-child,
.admin-shell .dataTables_wrapper > .row:last-child {
    align-items: center;
}

.admin-shell .dataTables_wrapper > .row:first-child { margin-bottom: 14px; }
.admin-shell .dataTables_wrapper > .row:last-child { margin-top: 14px; }

.admin-shell div.dataTables_wrapper div.dataTables_length,
.admin-shell div.dataTables_wrapper div.dataTables_filter,
.admin-shell div.dataTables_wrapper div.dataTables_info,
.admin-shell div.dataTables_wrapper div.dataTables_paginate { margin: 0; }

.admin-shell div.dataTables_wrapper div.dataTables_length label,
.admin-shell div.dataTables_wrapper div.dataTables_filter label {
    display: inline-flex;
    margin: 0;
    align-items: center;
    gap: 8px;
    color: #506477;
    font-weight: 500;
    white-space: nowrap;
}

.admin-shell div.dataTables_wrapper div.dataTables_filter {
    display: flex;
    justify-content: flex-end;
}

.admin-shell .dataTables_wrapper .dataTables_filter input,
.admin-shell .dataTables_wrapper .dataTables_length select {
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid #cfdbe5;
    border-radius: 7px;
}

.admin-shell .dataTables_wrapper .dataTables_filter input { width: 185px; }
.admin-shell .dataTables_wrapper .dataTables_length select { width: 58px; }

.admin-shell div.dataTables_wrapper div.dataTables_info { padding-top: 0; }
.admin-shell div.dataTables_wrapper div.dataTables_paginate ul.pagination { margin: 0; }

.admin-shell .page-item .page-link { color: var(--admin-navy-800); border-color: #d7e1e9; }
.admin-shell .page-item.active .page-link { color: #fff; background: var(--admin-blue-600); border-color: var(--admin-blue-600); }

.admin-shell .badge,
.admin-shell .badge-pill { padding: 5px 8px; border-radius: 20px; font-weight: 600; }

/* Modal and notifications */
.admin-shell .modal-content { border: 0; border-radius: 14px; box-shadow: 0 22px 55px rgba(7, 28, 47, .22); }
.admin-shell .modal-header { background: var(--admin-navy-900); color: #fff; border-radius: 14px 14px 0 0; }
.admin-shell .alert { border: 0; border-radius: 9px; }

@media (max-width: 991.98px) {
    .admin-shell .pcoded-content { padding: 18px; }
    .admin-shell .topbar-title { max-width: 48vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .admin-shell .pcoded-header .m-header {
        height: var(--admin-header-height);
        align-items: center;
    }

    .admin-shell .pcoded-header .navbar-nav,
    .admin-shell .pcoded-header .navbar-nav > li { height: auto; }
}

@media (max-width: 575.98px) {
    .admin-shell .pcoded-content { padding: 12px; }
    .admin-shell .card .card-header,
    .admin-shell .card .card-block { padding: 16px; }
    .admin-shell .topbar-title { font-size: 15px; }
    .admin-shell .pcoded-header .navbar-nav > li { padding: 0 4px; }

    .admin-shell .form-group.filter-action { padding-top: 0; }

    .admin-shell .dataTables_wrapper > .row:first-child,
    .admin-shell .dataTables_wrapper > .row:last-child { row-gap: 12px; }

    .admin-shell div.dataTables_wrapper div.dataTables_length,
    .admin-shell div.dataTables_wrapper div.dataTables_filter,
    .admin-shell div.dataTables_wrapper div.dataTables_info,
    .admin-shell div.dataTables_wrapper div.dataTables_paginate {
        display: flex;
        justify-content: center;
        text-align: center;
    }
}
