html, body {
    font-family: Kanit, Tahoma, sans-serif;
}

body.app-shell {
    background: #eef2f7;
    padding-top: 5.25rem;
}

body.app-shell .container div[style*="height: 150px"],
body.app-shell .container div[style*="height: 65px"] {
    height: 1.25rem !important;
}

body.app-shell .container {
    max-width: 1120px;
    padding-bottom: 2rem;
}

body.app-shell .container > form {
    margin-bottom: 1.5rem;
}

body.app-shell .form-group::after {
    content: "";
    display: table;
    clear: both;
}

body.app-shell .form-group > .input-group + .input-group {
    margin-top: 10px;
}

body.app-shell .container > .table,
body.app-shell .container > form > .table,
body.app-shell .container > form + .table,
body.app-shell .container > p + .table {
    margin-top: 1rem;
}

body.app-shell .clearfix + .table {
    margin-top: 0;
}

body.app-shell .table td .form-group > .radio-inline {
    margin-bottom: 8px;
}

body.app-shell .table td .form-group > .form-control,
body.app-shell .table td .form-group > .input-group,
body.app-shell .table td .form-group > .btn {
    margin-top: 10px;
}

body.app-shell .panel {
    border: 0;
    border-radius: 16px;
    margin-top: 1.25rem;
    box-shadow: 0 10px 30px rgba(15, 59, 109, 0.06);
    overflow: hidden;
}

.student-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid #e8eef5;
}

.student-filter-bar .form-control {
    max-width: 28rem;
}

.student-filter-meta {
    font-size: 13px;
    color: #64748b;
}

body.app-shell .table {
    background: #fff;
}

body.app-shell .table > thead > tr > th {
    background: #0f3b6d;
    color: #fff;
    border: 0;
    font-weight: 500;
}

body.app-shell .form-control,
body.app-shell .btn {
    border-radius: 10px;
}

.ui-mark {
    display: inline-flex;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 6px 10px rgba(201, 162, 39, 0.28));
}

.ui-mark svg {
    width: 100%;
    height: 100%;
}

.ui-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1050;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(245, 211, 106, 0.95) 0 4px, transparent 4px),
        linear-gradient(180deg, #123f73 0%, #0b2e56 55%, #081f3b 100%);
    box-shadow: 0 12px 32px rgba(8, 31, 59, 0.22);
    backdrop-filter: blur(10px);
}

.ui-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 18px;
}

.ui-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    color: #fff !important;
    text-decoration: none !important;
}

.ui-brand-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.ui-brand-sub {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
}

.ui-topbar a,
.ui-topbar summary {
    color: #fff;
    text-decoration: none;
}

.ui-link,
.ui-menu > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.ui-link:hover,
.ui-menu > summary:hover,
.ui-link.is-active,
.ui-menu[open] > summary {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ui-caret {
    width: 8px;
    height: 8px;
    margin-top: 1px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.8;
}

.ui-menu[open] .ui-caret {
    margin-top: 4px;
    transform: rotate(225deg);
}

details.ui-menu {
    position: relative;
    flex: 0 0 auto;
    z-index: 1;
}

details.ui-menu[open] {
    z-index: 40;
}

details.ui-menu > summary {
    list-style: none;
}

details.ui-menu > summary::-webkit-details-marker {
    display: none;
}

.ui-topbar .ui-menu-panel {
    position: absolute;
    left: 0;
    right: auto;
    top: calc(100% + 10px);
    min-width: 22rem;
    padding: 10px;
    background: #fff;
    color: #334155;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(15, 59, 109, 0.08);
}

.ui-topbar .ui-menu-panel::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 22px;
    right: auto;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-left: 1px solid rgba(15, 59, 109, 0.08);
    border-top: 1px solid rgba(15, 59, 109, 0.08);
}

.ui-nav-mobile .ui-menu-panel {
    left: auto;
    right: 0;
}

.ui-nav-mobile .ui-menu-panel::before {
    left: auto;
    right: 22px;
}

.ui-menu-label {
    padding: 8px 10px 6px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ui-topbar .ui-menu-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    color: #1e293b !important;
    font-size: 13px;
    text-decoration: none !important;
}

.ui-topbar .ui-menu-panel a:hover,
.ui-topbar .ui-menu-panel a.is-active {
    background: #f1f7fd;
    color: #0f3b6d !important;
}

.ui-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: #c9a227;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.12);
    flex-shrink: 0;
}

.ui-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.ui-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f5d36a, #c9a227);
    color: #0b2e56;
    font-size: 12px;
    font-weight: 700;
}

.ui-user-name {
    max-width: 10.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.86);
}

.ui-logout {
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ui-logout:hover {
    background: #be123c !important;
}

.ui-nav-desktop {
    display: none !important;
    align-items: center;
    gap: 4px;
}

.ui-nav-mobile {
    display: block !important;
    position: relative;
}

.ui-nav-mobile > summary {
    background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 992px) {
    .ui-nav-desktop {
        display: flex !important;
    }
    .ui-nav-mobile {
        display: none !important;
    }
}

.ui-menu-mobile {
    min-width: 18rem;
    max-height: 70vh;
    overflow: auto;
}
