:root {
    --bg: #f3f6fb;
    --panel: #ffffff;
    --line: #d9e1ec;
    --text: #1f2a37;
    --muted: #6b7280;
    --brand-a: #0f4c81;
    --brand-b: #1f7a8c;
    --brand-c: #3ba9c9;
    --accent: #f5a524;
}

* {
    box-sizing: border-box;
}

/* Fallback UI classes when Bootstrap CDN is unavailable */
.container,
.container-fluid {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

[class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
    width: 100%;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.align-items-end {
    align-items: flex-end;
}

.justify-content-between {
    justify-content: space-between;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-2 {
    margin-top: .5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
}

.border-0 {
    border: 0 !important;
}

.badge-pill {
    border-radius: 10rem;
}

.justify-content-center {
    justify-content: center;
}

.w-100 {
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-4 {
        width: 33.3333%;
    }
    .col-md-6 {
        width: 50%;
    }
    .col-md-8 {
        width: 66.6667%;
    }
    .col-md-12 {
        width: 100%;
    }
}

@media (min-width: 992px) {
    .col-lg-4 {
        width: 33.3333%;
    }
}

.form-group {
    margin-bottom: 14px;
}

.form-control {
    display: block;
    width: 100%;
    height: 40px;
    padding: 8px 11px;
    border: 1px solid #cdd7e3;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    border-color: #7ab3e6;
    box-shadow: 0 0 0 3px rgba(59, 169, 201, 0.15);
}

.form-control-sm {
    height: 34px;
    padding: 6px 10px;
    font-size: .86rem;
}

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

textarea.form-control {
    height: auto;
    min-height: 110px;
    line-height: 1.45;
}

.btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.3;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(140deg, #1363a4, #1f7a8c);
    border-color: #1363a4;
}

.btn-primary:hover {
    color: #fff;
    filter: brightness(0.95);
}

.btn-outline-primary {
    color: #1363a4;
    border-color: #1363a4;
    background: #fff;
}

.btn-outline-secondary {
    color: #56657a;
    border-color: #b9c4d2;
    background: #fff;
}

.btn-outline-danger {
    color: #c0392b;
    border-color: #e3b7b2;
    background: #fff;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.82rem;
}

.btn.disabled,
.btn[disabled] {
    pointer-events: none;
    opacity: .55;
}

.btn-link {
    background: transparent;
    border: 0;
    color: #1363a4;
    padding: 0;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    margin-bottom: 14px;
}

.alert-danger {
    color: #7b1f1f;
    background: #fdeeee;
    border-color: #f3c4c4;
}

.alert-success {
    color: #1f5f3a;
    background: #eaf8ef;
    border-color: #bfe7ca;
}

.alert-info {
    color: #134d69;
    background: #e8f4fb;
    border-color: #c7e3f4;
}

.badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-primary {
    background: #1f7a8c;
    color: #fff;
}

.badge-info {
    background: #d8eef6;
    color: #114c63;
}

.badge-light {
    background: #eef3f8;
    color: #3e4c5f;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid #e6edf5;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 10% 10%, #eaf4ff, var(--bg) 45%);
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.app-sidebar {
    width: 265px;
    flex-shrink: 0;
    background: linear-gradient(165deg, var(--brand-a), var(--brand-b) 48%, var(--brand-c));
    color: #eaf5ff;
    padding: 22px 18px;
    box-shadow: 5px 0 30px rgba(15, 76, 129, 0.2);
    transition: width .22s ease, padding .22s ease, transform .22s ease;
}

.app-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    margin-bottom: 30px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 10px;
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text {
    font-weight: 600;
    letter-spacing: .2px;
}

.app-menu-title {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    opacity: .85;
    margin-bottom: 8px;
}

.app-nav .nav-link {
    display: block;
    color: #e7f3ff;
    border-radius: 10px;
    padding: 9px 12px;
    margin-bottom: 6px;
    text-decoration: none;
    line-height: 1.25;
    white-space: normal;
    transition: background .2s ease, transform .2s ease;
}

.app-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 700;
}

.nav-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    margin-right: 9px;
    vertical-align: -2px;
}

.nav-icon svg,
.topbar-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.app-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(2px);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-topbar {
    height: 72px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.topbar-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sidebar-toggle {
    border: 1px solid #cdd9e8;
    background: #ffffff;
    color: #2d4a67;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.sidebar-toggle:hover {
    background: #f0f6ff;
}

.topbar-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: .2px;
}

.topbar-icon {
    width: 18px;
    height: 18px;
    color: #1f7a8c;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.text-muted {
    color: var(--muted);
}

.user-name {
    font-size: .94rem;
    color: var(--muted);
}

.app-content {
    padding: 24px;
}

.app-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    padding: 10px 24px;
    text-align: center;
}

.guest-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .5), transparent 33%),
        radial-gradient(circle at 88% 82%, rgba(255, 255, 255, .35), transparent 28%),
        linear-gradient(140deg, #0b4f83 0%, #13689a 45%, #2c8db3 100%);
}

.anbk-login-shell {
    width: 100%;
}

.anbk-login-card {
    max-width: 980px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #d1dced;
    box-shadow: 0 20px 45px rgba(10, 45, 74, .28);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
}

.anbk-side-info {
    padding: 34px 32px;
    color: #f3f9ff;
    background:
        linear-gradient(165deg, rgba(5, 42, 73, .88), rgba(14, 84, 131, .82)),
        linear-gradient(180deg, #0c4774, #166394);
}

.anbk-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .17);
    border: 1px solid rgba(255, 255, 255, .28);
    font-weight: 700;
    letter-spacing: .08em;
    font-size: .82rem;
    margin-bottom: 16px;
}

.anbk-logo-mark img {
    max-width: 110px;
    max-height: 40px;
    object-fit: contain;
}

.anbk-side-info h1 {
    margin: 0 0 10px;
    font-size: 1.66rem;
    line-height: 1.22;
}

.anbk-side-info p {
    margin: 0 0 16px;
    color: rgba(240, 247, 255, .9);
}

.anbk-tagline-content p {
    margin: 0 0 12px;
    color: rgba(240, 247, 255, .95);
}

.anbk-tagline-content ul,
.anbk-tagline-content ol {
    margin: 0;
    padding-left: 18px;
}

.anbk-tagline-content li {
    margin-bottom: 7px;
    color: rgba(236, 246, 255, .98);
}

.anbk-side-info ul {
    margin: 0;
    padding-left: 18px;
}

.anbk-side-info li {
    margin-bottom: 7px;
    color: rgba(236, 246, 255, .95);
}

.anbk-form-panel {
    padding: 34px 28px 24px;
    background: #f7fbff;
}

.anbk-form-head h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.anbk-form-head p {
    margin: 0 0 18px;
    color: var(--muted);
}

.anbk-form-panel .form-control {
    height: 44px;
    border-radius: 9px;
}

.input-icon-group {
    position: relative;
}

.input-icon-group .input-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #6d7f95;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.input-icon-group .input-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.input-icon-group .form-control {
    padding-left: 38px;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #6d7f95;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.password-toggle-btn:hover {
    background: rgba(19, 99, 164, 0.08);
    color: #1f5f9a;
}

.password-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.input-icon-group .password-toggle-btn + .form-control {
    padding-right: 40px;
}

.input-icon-group input.form-control[type='password'],
.input-icon-group input.form-control[type='text'] {
    padding-right: 40px;
}

.anbk-form-panel .btn-primary {
    height: 44px;
    border-radius: 9px;
    font-weight: 700;
}

.anbk-form-panel .btn-primary.btn-with-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
}

.anbk-note {
    display: block;
    margin-top: 12px;
    text-align: center;
    color: #68788b;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.page-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.page-subtitle {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: .92rem;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.page-head > .quick-actions {
    padding: 6px 8px;
    border: 1px solid #d6e7fa;
    border-radius: 12px;
    background: linear-gradient(180deg, #fafdff, #edf6ff);
}

.page-head > .quick-actions .btn {
    min-height: 34px;
}

.page-head > .quick-actions form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.generate-pass-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border: 1px solid #c9dff7;
    border-radius: 12px;
    background: #f4f9ff;
}

.generate-pass-select {
    min-width: 280px;
    height: 34px;
    border: 1px solid #b8d5f2;
    border-radius: 10px;
    background: #fff;
    color: #1f2d3d;
    font-size: .83rem;
}

.generate-pass-select:focus {
    border-color: #3f8ad2;
    box-shadow: 0 0 0 2px rgba(63, 138, 210, 0.15);
}

.btn-soft {
    border: 1px solid #c9dff7;
    background: #eef6ff;
    color: #0f4c81;
}

.btn-soft:hover {
    background: #ddeeff;
    color: #083357;
}

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-with-svg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-with-svg svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex: 0 0 auto;
}

.mini-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 76, 129, 0.1);
    font-size: .68rem;
    font-weight: 700;
}

.content-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
    padding: 1rem;
}

.content-card + .content-card {
    margin-top: 14px;
}

.table-wrap {
    overflow: auto;
}

.table-modern {
    margin-bottom: 0;
    border-radius: 12px;
    overflow: hidden;
}

.table-modern thead th {
    border-top: 0;
    border-bottom: 1px solid var(--line);
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}

.table-modern td {
    vertical-align: middle;
    border-color: #edf2f7;
    font-size: .93rem;
}

.activity-table thead th {
    background: #f6faff;
}

.activity-table .col-no {
    width: 64px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #5b6f85;
}

.activity-table tbody tr:nth-child(even) {
    background: #fcfeff;
}

.activity-table tbody tr:hover {
    background: #f2f8ff;
}

.chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.45;
    border: 1px solid transparent;
    white-space: nowrap;
}

.chip-user {
    color: #0f4f8a;
    background: #e7f2ff;
    border-color: #cbe2ff;
}

.chip-action {
    color: #0f766e;
    background: #e7faf5;
    border-color: #c9eee3;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-dashboard-card {
    background: linear-gradient(160deg, #ffffff, #f3f9ff);
    border: 1px solid #d5e4f4;
}

.student-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #d9e7f6;
    background: linear-gradient(140deg, #f9fcff, #eef6ff);
}

.student-hero-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f6fae;
    background: linear-gradient(145deg, #e7f2ff, #d8eaff);
    border: 1px solid #c9ddf4;
}

.student-hero-badge svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.student-hero-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #143a61;
}

.student-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.student-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .8rem;
    font-weight: 600;
    color: #1f4d78;
    background: #eaf4ff;
    border: 1px solid #cde1f7;
}

.student-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 12px;
}

.student-stat {
    border: 1px solid #d6e5f4;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

.student-stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #236da6;
    background: #e9f3ff;
    border: 1px solid #cfe2f7;
    margin-bottom: 8px;
}

.student-stat-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.student-stat-label {
    font-size: .8rem;
    color: #597089;
    margin-bottom: 4px;
}

.student-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #12375b;
    line-height: 1.2;
}

.student-note {
    border: 1px dashed #bfd6ee;
    border-radius: 10px;
    background: #f6fbff;
    color: #2f4e6d;
    padding: 10px 12px;
    font-size: .9rem;
}

.rules-print-sheet {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #d7e3f0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 35, 58, .08);
    padding: 20px 24px;
}

.rules-print-head {
    text-align: center;
    border-bottom: 2px solid #d7e4f3;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.rules-print-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .06em;
    color: #163a5d;
}

.rules-print-subtitle {
    margin-top: 4px;
    font-size: .94rem;
    font-weight: 700;
    color: #245780;
}

.rules-print-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    color: #4b6179;
    font-size: .86rem;
    margin-bottom: 10px;
}

.rules-print-list {
    margin: 0;
    padding-left: 24px;
}

.rules-print-list li {
    margin-bottom: 8px;
    color: #21374d;
    line-height: 1.45;
}

.rules-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    color: #21374d;
    line-height: 1.35;
}

.rules-marker {
    flex: 0 0 28px;
    text-align: right;
    white-space: nowrap;
}

.rules-text {
    min-width: 0;
    flex: 1 1 auto;
}

.rules-line.indent-1 {
    padding-left: 26px;
}

.rules-line.indent-2 {
    padding-left: 52px;
}

.rules-line.indent-3 {
    padding-left: 78px;
}

.rules-lines-print .rules-line {
    margin-bottom: 8px;
}

/* Tata tertib preview: mimic CKEditor content spacing without importing full editor CSS. */
.rules-preview {
    color: #21374d;
    line-height: 1.35;
}

.rules-preview p,
.rules-preview div {
    margin: 0;
}

.rules-preview li p,
.rules-preview li div {
    margin: 0;
}

.rules-preview ol,
.rules-preview ul {
    margin: 0;
    padding-left: 24px;
}

.rules-preview li {
    margin: 0 0 6px;
}

.rules-preview ol ol {
    list-style-type: lower-alpha;
    margin-top: 6px;
}

.rules-preview ol ol ol {
    list-style-type: lower-roman;
}

.rules-print-foot {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #c9d9ea;
    color: #5b6f85;
    font-size: .82rem;
    text-align: center;
}

/* CKEditor 5: default styling for nested ordered lists, without blocking toolbar changes. */
.ck-content ol[type="a"],
.ck-editor__editable ol[type="a"] {
    list-style-type: lower-alpha !important;
}

.ck-content ol[type="A"],
.ck-editor__editable ol[type="A"] {
    list-style-type: upper-alpha !important;
}

.ck-content ol[type="i"],
.ck-editor__editable ol[type="i"] {
    list-style-type: lower-roman !important;
}

.ck-content ol[type="I"],
.ck-editor__editable ol[type="I"] {
    list-style-type: upper-roman !important;
}

.ck-editor__editable ol ol,
.ck-editor__editable ol li ol {
    list-style-type: lower-alpha !important;
}

.ck-editor__editable ol ol ol,
.ck-editor__editable ol li ol li ol {
    list-style-type: lower-roman !important;
}

.ck-editor__editable ol ol ol ol,
.ck-editor__editable ol li ol li ol li ol {
    list-style-type: decimal !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    position: relative;
    background: linear-gradient(150deg, #ffffff, #f3f9ff);
    border: 1px solid #d8e6f5;
    border-radius: 14px;
    padding: 14px 16px;
}

.stat-icon {
    position: absolute;
    right: 10px;
    top: 8px;
    width: 20px;
    height: 20px;
    color: #4f7fae;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ecf5ff, #d7eaff);
    box-shadow: inset 0 0 0 1px rgba(79, 127, 174, 0.15);
    pointer-events: none;
}

.stat-icon svg {
    width: 11px !important;
    height: 11px !important;
    fill: currentColor;
}

.stat-icon-students {
    color: #1570ef;
    background: linear-gradient(145deg, #e9f3ff, #d7e9ff);
}

.stat-icon-classes {
    color: #2563eb;
    background: linear-gradient(145deg, #eaf1ff, #d8e5ff);
}

.stat-icon-rooms {
    color: #0f766e;
    background: linear-gradient(145deg, #e9fbf8, #d4f5ef);
}

.stat-icon-users {
    color: #7c3aed;
    background: linear-gradient(145deg, #f2ebff, #e6dcff);
}

.stat-icon-report {
    color: #dc2626;
    background: linear-gradient(145deg, #ffefef, #ffdcdc);
}

.stat-icon-attendance-students {
    color: #ea580c;
    background: linear-gradient(145deg, #fff3e8, #ffe3cc);
}

.stat-icon-attendance-supervisors {
    color: #0284c7;
    background: linear-gradient(145deg, #e8f7ff, #d2eefe);
}

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

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 6px;
}

.form-card {
    max-width: 760px;
    border-color: #d7e4f3;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.form-label {
    font-weight: 600;
    margin-bottom: 5px;
}

.action-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.action-inline form {
    margin: 0;
}

.students-table-card {
    overflow: hidden;
    padding: 0;
}

.students-table thead th {
    text-align: left;
    background: #f7fafc;
    font-size: 0.78rem;
    color: #5d6b80;
    border-bottom: 1px solid #dbe5f1;
}

.students-table tbody tr:nth-child(even) {
    background: #fbfdff;
}

.students-table tbody tr:hover {
    background: #f2f8ff;
}

.students-table td {
    padding-top: 12px;
    padding-bottom: 12px;
    vertical-align: middle;
}

.students-table {
    width: 100%;
    table-layout: fixed;
}

.students-table th,
.students-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.students-table .col-no {
    width: 58px;
    text-align: center;
    color: #5d6b80;
    font-variant-numeric: tabular-nums;
}

.students-table .col-check {
    width: 44px;
    text-align: center;
}

.students-table .col-actions {
    width: 220px;
    text-align: center;
}

.students-table .col-role,
.students-table .col-level,
.students-table .col-capacity,
.students-table .col-layout,
.students-table .col-session,
.students-table .col-room,
.students-table .col-nisn,
.students-table .col-pass {
    font-variant-numeric: tabular-nums;
}

.table-users .col-role {
    width: 120px;
    text-align: center;
}

.table-users .col-username {
    width: 220px;
    white-space: nowrap;
}

.table-classes .col-level {
    width: 110px;
    text-align: center;
}

.table-classes .col-class-name {
    width: 240px;
    white-space: nowrap;
}

.table-rooms .col-room-name {
    width: 180px;
    white-space: nowrap;
}

.table-rooms .col-capacity {
    width: 120px;
    text-align: center;
    white-space: nowrap;
}

.table-rooms .col-layout {
    width: 120px;
    text-align: center;
    white-space: nowrap;
}

.table-rooms .col-status {
    width: 150px;
    text-align: center;
    white-space: nowrap;
}

.table-students .col-nisn {
    width: 130px;
    text-align: center;
    white-space: nowrap;
}

.table-students .col-pass {
    width: 170px;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.93rem;
}

.table-students .col-name {
    width: 250px;
    white-space: normal;
    line-height: 1.28;
}

.table-students .col-class {
    width: 130px;
    white-space: nowrap;
}

.table-students .col-session {
    width: 78px;
    text-align: center;
    white-space: nowrap;
}

.table-students .col-room {
    width: 95px;
    text-align: center;
    white-space: nowrap;
}

.allocation-head {
    border-bottom: 1px solid #dbe5f1;
    background: linear-gradient(180deg, #fcfeff, #f6faff);
}

.allocation-summary {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.allocation-table {
    width: 100%;
    table-layout: fixed;
}

.allocation-table .col-class {
    width: 220px;
}

.allocation-table .col-level {
    width: 100px;
    text-align: center;
}

.allocation-table .col-session {
    width: 95px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.allocation-table .col-total {
    width: 90px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.allocation-total-row th,
.allocation-total-row td {
    background: #f1f7ff;
    color: #1f3f5f;
    border-top: 1px solid #d6e4f4;
}

.allocation-target-row th,
.allocation-target-row td {
    background: #f8fbff;
    color: #34506b;
}

.allocation-deviation-row th,
.allocation-deviation-row td {
    background: #fff8ef;
    color: #5c3b18;
}

.action-inline-compact {
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-inline-compact .btn {
    min-width: 48px;
    text-align: center;
    border-radius: 10px;
}

.table-students .action-inline-compact {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
}

.table-students .action-inline-compact .btn {
    min-width: 64px;
    white-space: nowrap;
    padding-left: 10px;
    padding-right: 10px;
}

.table-students .action-inline-compact form {
    display: inline-flex;
    margin: 0;
}

.table-users .action-inline-compact,
.table-classes .action-inline-compact,
.table-rooms .action-inline-compact {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
}

.table-users .action-inline-compact .btn,
.table-classes .action-inline-compact .btn,
.table-rooms .action-inline-compact .btn {
    min-width: 72px;
    white-space: nowrap;
    padding-left: 10px;
    padding-right: 10px;
}

.table-users .action-inline-compact form,
.table-classes .action-inline-compact form,
.table-rooms .action-inline-compact form {
    display: inline-flex;
    margin: 0;
}

.wysiwyg-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wysiwyg-editor {
    min-height: 140px;
    padding: 10px 12px;
    border: 1px solid #cdd7e3;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}

.wysiwyg-editor:focus {
    outline: none;
    border-color: #7ab3e6;
    box-shadow: 0 0 0 3px rgba(59, 169, 201, 0.15);
}

.settings-preview-logo {
    height: 54px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    border: 1px solid #d5e2f0;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
}

.settings-preview-header {
    width: 100%;
    max-width: 640px;
    max-height: 140px;
    object-fit: contain;
    border: 1px solid #d5e2f0;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
}

.doc-kop {
    background: #fff;
    border: 1px solid #d9e5f3;
    border-radius: 12px;
    margin-bottom: 14px;
    padding: 10px 14px;
}

.doc-kop-image {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.doc-kop-fallback {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 16px;
    align-items: start;
}

.settings-section {
    border: 1px solid #dce7f4;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    background: linear-gradient(180deg, #fcfeff, #f7fbff);
}

.page-head + .content-card {
    border-color: #d7e4f3;
}

.quick-actions .btn {
    box-shadow: 0 3px 10px rgba(26, 61, 94, .08);
}

.settings-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #1a3957;
}

.settings-side hr {
    border: 0;
    border-top: 1px solid #dbe6f3;
    margin: 14px 0;
}

.settings-brand-preview {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid #d8e6f4;
    border-radius: 12px;
    background: linear-gradient(165deg, #f4f9ff, #eef6ff);
    padding: 10px;
}

.settings-brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 1px solid #b8d0ea;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #1f5f95;
    font-weight: 700;
}

.settings-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.settings-brand-text strong {
    display: block;
    line-height: 1.2;
}

.settings-brand-text small {
    color: #5f7287;
}

.pagination-bar {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-meta {
    color: #55657b;
    font-size: .88rem;
}

.pagination-limit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.pagination-limit label {
    margin: 0;
    color: #5a6b81;
    font-size: .85rem;
}

.pagination-limit select {
    min-width: 76px;
}

.pagination-links {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.import-progress {
    border: 1px solid #d7e4f3;
    border-radius: 10px;
    background: #f8fbff;
    padding: 10px 12px;
}

.import-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #1e3f60;
}

.import-progress-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #e7f0fb;
    border: 1px solid #d2e0f0;
}

.import-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #1672bb, #1f7a8c);
    transition: width .25s ease;
}

.exam-card-sheet {
    display: flex;
    justify-content: center;
}

.exam-card {
    width: 100%;
    max-width: 760px;
    background: #fff;
    border: 2px solid #244e79;
    border-radius: 12px;
    overflow: hidden;
}

.exam-card-head {
    display: grid;
    grid-template-columns: 56px 1fr 90px;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #c9d9ea;
    background: linear-gradient(180deg, #f4f9ff, #edf5ff);
}

.exam-card-logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 1px solid #bdd2ea;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.exam-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.exam-card-logo-fallback {
    font-weight: 700;
    color: #1f5e97;
}

.exam-card-title-wrap {
    min-width: 0;
    text-align: center;
}

.exam-card-title {
    margin: 0;
    font-size: 11px;
    letter-spacing: .04em;
    text-align: center;
}

.exam-card-subtitle {
    margin: 2px 0 0;
    color: #42566d;
    font-size: 11px;
}

.exam-card-school {
    margin: 2px 0 0;
    color: #1d3d5f;
    font-weight: 600;
    font-size: 11px;
    text-align: center;
}

.exam-card-seat {
    border: 1px solid #b5cbe4;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.exam-card-seat-label {
    background: #eaf2fc;
    color: #34516f;
    font-size: 11px;
    text-align: center;
    padding: 4px 4px;
    font-weight: 700;
}

.exam-card-seat-val {
    text-align: center;
    font-weight: 800;
    font-size: 11px;
    color: #1b3f66;
    padding: 6px 4px;
}

.exam-card-body {
    padding: 12px 14px 8px;
}

.exam-card-row {
    display: grid;
    grid-template-columns: 140px 14px 1fr;
    align-items: baseline;
    gap: 0;
    border-bottom: 1px dashed #d9e3ef;
    padding: 6px 0;
}

.exam-card-label {
    color: #45586e;
    font-weight: 600;
    font-size: 11px;
}

.exam-card-val {
    color: #10263f;
    font-size: 11px;
}

.exam-card-foot {
    padding: 10px 14px 14px;
}

.exam-sign-block {
    width: 280px;
    margin-left: auto;
    text-align: center;
}

.exam-sign-label {
    font-size: 11px;
    color: #445569;
    margin-bottom: 2px;
    line-height: 1.2;
}

.exam-sign-space {
    height: 44px;
}

.exam-sign-name {
    border-top: 0;
    border-bottom: 1px solid #34495e;
    padding-top: 0;
    padding-bottom: 3px;
    font-weight: 600;
    font-size: 11px;
    line-height: 1.15;
    margin-top: 0;
}

.exam-card-brand {
    margin-top: 8px;
    text-align: center;
    font-weight: 700;
    letter-spacing: .03em;
    color: #143d67;
    font-size: 11px;
}

@media print {
    .no-print,
    .app-sidebar,
    .app-topbar,
    .app-footer {
        display: none !important;
    }

    .app-content {
        padding: 0 !important;
    }

    .exam-card {
        max-width: 100%;
        border-color: #222;
        border-radius: 0;
        box-shadow: none;
    }

    body {
        background: #fff !important;
    }

    .content-card {
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
    }

    .rules-print-sheet {
        max-width: 100%;
        border: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }
}

body.sidebar-collapsed .app-sidebar {
    width: 86px;
    padding-left: 10px;
    padding-right: 10px;
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .app-menu-title,
body.sidebar-collapsed .app-nav .nav-link {
    font-size: 0;
}

body.sidebar-collapsed .nav-icon {
    margin-right: 0;
    width: 20px;
    height: 20px;
}

body.sidebar-collapsed .app-brand {
    justify-content: center;
}

@media (max-width: 991.98px) {
    .app-shell {
        display: flex;
        overflow-x: hidden;
    }

    .app-sidebar {
        position: fixed;
        z-index: 30;
        left: 0;
        top: 0;
        bottom: 0;
        width: 265px;
        border-radius: 0;
        transform: translateX(-100%);
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .app-main {
        width: 100%;
    }

    .app-topbar {
        height: 64px;
        padding: 0 14px;
    }

    .topbar-user {
        margin-left: auto;
    }

    .app-content {
        padding: 16px;
    }

    .p-md-4 {
        padding: 1rem !important;
    }

    .students-table td:last-child {
        min-width: 180px;
    }

    .students-table .col-actions {
        width: 260px;
    }

    .table-students .action-inline-compact {
        flex-wrap: wrap;
    }

    .page-head > .quick-actions {
        width: 100%;
        padding: 8px;
    }

    .generate-pass-inline {
        width: 100%;
    }

    .generate-pass-select {
        min-width: 0;
        width: 100%;
    }

    .allocation-table .col-class {
        width: 180px;
    }

    .allocation-table .col-session,
    .allocation-table .col-total {
        width: 80px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .pagination-bar {
        align-items: flex-start;
    }

    .student-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .student-hero-action .btn {
        width: 100%;
    }

    .student-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .p-md-4 {
        padding: 1.5rem !important;
    }
}

@media (max-width: 575.98px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .anbk-login-card {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .anbk-side-info {
        padding: 24px 22px;
    }

    .anbk-form-panel {
        padding: 22px 18px 18px;
    }
}

