/* A shared presentation layer for the existing administration modules. */
body.admin-shell, body.admin-login { background: #f7f6f3; color: #2d2925; font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.65; }
.admin-shell a, .admin-login a { color: #7c2028; }
.admin-shell a:hover, .admin-login a:hover { color: #59151c; }
.admin-shell a:focus-visible, .admin-shell button:focus-visible, .admin-shell [tabindex]:focus-visible,
.admin-login a:focus-visible, .admin-login button:focus-visible, .admin-login input:focus-visible { outline: 3px solid #9a5f16; outline-offset: 3px; }
.admin-skip-link { position: absolute; top: -100px; left: 16px; z-index: 1200; padding: 10px 16px; background: white; }
.admin-skip-link:focus { top: 10px; }
.admin-shell .admin-topbar { position: sticky; top: 0; z-index: 1000; margin: 0; border: 0; border-top: 4px solid #7c2028; border-bottom: 1px solid #ded9d2; border-radius: 0; background: #fff; box-shadow: none; }
.admin-topbar .navbar-inner { display: flex; align-items: center; gap: 14px; max-width: 1480px; min-height: 78px; margin: 0 auto; padding: 12px 28px; background: transparent; box-shadow: none; }
.admin-topbar .navbar-inner::before, .admin-topbar .navbar-inner::after { display: none; }
.admin-shell .admin-topbar .navbar-brand { display: flex; align-items: center; gap: 11px; flex: 1; float: none; width: auto; height: auto; margin: 0; padding: 0; color: #30251e; font-family: inherit; font-size: 20px; font-weight: 600; letter-spacing: 0; text-shadow: none; }
.admin-shell .admin-topbar .navbar-brand img { flex-shrink: 0; width: 40px; height: 40px; margin: 0; float: none; }
.admin-shell .admin-topbar .navbar-brand span { float: none; }
.admin-topbar .navbar-brand small { display: block; margin-top: 5px; color: #655e58; font-size: 11px; font-weight: 400; }
.admin-account { display: flex; align-items: center; gap: 18px; }
.admin-username { max-width: 240px; color: #655e58; overflow-wrap: anywhere; }
.admin-shell .admin-topbar .navbar-toggle { float: none; flex-shrink: 0; margin: 0; min-width: 44px; min-height: 44px; border-color: #92867a; border-radius: 4px; }
.admin-shell .admin-topbar .navbar-toggle .icon-bar { background: #7c2028; }
.admin-shell > .ch-container { max-width: 1480px; margin: 0 auto; padding: 32px 28px 0; }
.admin-shell > .ch-container > .row { display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: 30px; margin: 0; }
.admin-shell > .ch-container > .row::before, .admin-shell > .ch-container > .row::after { display: none; }
.admin-shell .admin-sidebar-column, .admin-shell #content { float: none; width: 100%; min-width: 0; padding: 0; }
.admin-shell .sidebar-nav { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.admin-shell .sidebar-nav .nav-canvas { position: static; width: 100%; margin: 0 !important; padding: 0; background: transparent; border: 0; border-radius: 0; }
.admin-shell .main-menu > li { margin: 0; transition: none; }
.admin-shell .main-menu > li:hover, .admin-shell .main-menu > li.active { margin-left: 0; }
.admin-shell .sidebar-nav .nav-header { margin: 0; padding: 6px 12px 14px; color: #655e58; font-size: 12px; font-weight: 600; text-shadow: none; }
.admin-shell .main-menu > li > a { min-height: 46px; padding: 12px 15px; border: 0; border-left: 3px solid transparent; border-radius: 0; color: #514942; font-weight: 400; text-shadow: none; }
.admin-shell .main-menu > li > a:hover { background: #eee8df; color: #7c2028; }
.admin-shell .main-menu > li.active > a { border-left-color: #7c2028; background: #eee3dd; color: #59151c; font-weight: 600; }
.admin-public-link { display: block; margin-top: 22px; padding: 16px 12px; border-top: 1px solid #ded9d2; font-size: 12px; }
.admin-page-heading { margin-bottom: 27px; }
.admin-section-tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 24px; border-bottom: 1px solid #bcb0a2; }
.admin-section-tabs a { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 3px; border-bottom: 3px solid transparent; color: #514942; }
.admin-section-tabs a.active { color: #7c2028; border-bottom-color: #7c2028; font-weight: 600; }
.admin-shell .modal { padding: 16px; }
.admin-shell .modal-dialog { width: 100%; max-width: 800px; margin: 24px auto; }
.admin-shell .modal-content { border: 1px solid #a99d90; border-radius: 5px; box-shadow: 0 14px 50px rgba(48,37,30,.22); }
.admin-shell .modal-header, .admin-shell .modal-footer { padding: 20px 24px; border-color: #ded9d2; }
.admin-shell .modal-title { margin: 0; font-size: 23px; font-weight: 600; }
.admin-shell .modal-header .close { width: 44px; height: 44px; margin: -9px -10px 0 8px; opacity: 1; color: #514942; font-size: 27px; }
.admin-shell .modal-body { max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); padding: 24px; overflow-y: auto; }
.admin-shell .modal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.admin-shell .modal-footer .btn { margin: 0; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 22px; }
.admin-form-grid > div { min-width: 0; }
.admin-field-wide { grid-column: 1 / -1; }
.admin-form-hint, .admin-shell .help-block { color: #655e58; font-size: 13px; }
.admin-form-errors:empty { display: none; }
.admin-form-errors p:last-child { margin-bottom: 0; }
.admin-standalone-form { width: calc(100% - 32px); max-width: 800px; margin: 32px auto; background: #fff; border: 1px solid #ded9d2; }
.admin-standalone-form > .admin-modal-form > .modal-body { max-height: none; }
.admin-standalone-form .close { display: none; }
.admin-shell #content > .admin-modal-form .close { display: none; }
.admin-shell #content > .admin-modal-form .modal-body { max-height: none; }
.admin-shell select[multiple] { min-height: 180px; }
.admin-shell .chosen-container { font-size: 14px; }
.admin-shell .chosen-container-multi .chosen-choices { min-height: 44px; padding: 5px; border: 1px solid #92867a; background: #fff; }
.admin-shell .chosen-container-multi .chosen-choices li.search-choice { padding: 9px 26px 9px 10px; border-color: #bcb0a2; background: #f4f0e9; color: #30251e; box-shadow: none; line-height: 1.4; }
.admin-shell .chosen-container-multi .chosen-choices li.search-choice .search-choice-close { top: 12px; }
.admin-shell .chosen-container .chosen-drop { color: #30251e; }
.admin-overdue { display: block; margin-top: 5px; color: #a52d35; font-weight: 600; }
.admin-report-totals { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-bottom: 20px; padding: 16px 0; border-top: 1px solid #ded9d2; border-bottom: 1px solid #ded9d2; }
.admin-report-totals strong { margin-right: 5px; font-size: 23px; }
.admin-monthly-chart { display: grid; grid-template-columns: 90px minmax(0,1fr) 45px; gap: 10px 16px; align-items: center; }
.admin-month-bar { height: 14px; background: #eee8df; }
.admin-month-bar span { display: block; height: 100%; background: #7c2028; }
.admin-loan-dates { padding: 14px; background: #f4f0e9; }
.admin-attention-list { padding: 0; margin: 0; list-style: none; }
.admin-attention-list li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; padding: 14px 0; border-bottom: 1px solid #ded9d2; }
.admin-attention-list li:last-child { border-bottom: 0; }
.admin-attention-list span { color: #655e58; }
@media (max-width: 600px) {
    .admin-form-grid { grid-template-columns: minmax(0,1fr); }
    .admin-shell .modal { padding: 8px; }
    .admin-shell .modal-dialog { margin: 8px auto; }
    .admin-shell .modal-header, .admin-shell .modal-footer, .admin-shell .modal-body { padding: 18px; }
    .admin-shell .modal-body { max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); }
    .admin-shell .modal-title { font-size: 21px; }
    .admin-shell .modal-footer > .btn { flex: 1; }
    .admin-section-tabs { gap: 3px 14px; }
}
@media print {
    .admin-topbar, .admin-sidebar-column, .admin-panel-actions, .admin-section-tabs, .admin-report-filters, .admin-table-controls, .admin-table-footer, .admin-shell footer, .admin-shell .modal { display: none !important; }
    .admin-shell > .ch-container > .row { display: block; }
    .admin-shell .admin-table-scroll { overflow: visible; }
    .admin-shell .box-inner { border: 0; }
}
.admin-page-context { margin: 0 0 9px; color: #655e58; font-size: 12px; }
.admin-page-heading h1 { margin: 0 0 12px; font-size: 32px; font-weight: 600; letter-spacing: -.025em; }
.admin-page-heading > p:last-child { margin: 0; color: #655e58; }
.admin-statistics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.admin-statistic { display: flex; flex-direction: column; padding: 22px; border: 1px solid #ded9d2; border-radius: 5px; background: #fff; color: #655e58 !important; text-decoration: none !important; }
.admin-statistic:hover { border-color: #a98a7f; }
.admin-statistic > strong { margin: 12px 0 15px; color: #30251e; font-size: 34px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.statistic-link { color: #7c2028; font-size: 12px; }
.statistic-link > span { margin-left: 12px; }
.admin-start-section { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: 25px; padding: 27px; border: 1px solid #ded9d2; border-radius: 5px; background: #fff; }
.admin-start-section h2 { margin: 0 0 12px; font-size: 21px; font-weight: 600; }
.admin-start-section p { max-width: 560px; margin: 0; color: #655e58; }
.admin-start-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-institution { display: flex; align-items: center; gap: 15px; margin-top: 32px; color: #655e58; }
.admin-institution p { margin: 0; }
.admin-institution span { display: block; margin-top: 3px; font-size: 12px; }
.admin-shell .btn, .admin-login .btn { min-height: 42px; padding: 10px 15px; border-radius: 4px; font-size: 13px; font-weight: 600; background-image: none; box-shadow: none; text-shadow: none; }
.admin-shell .btn-primary, .admin-shell .btn-success, .admin-login .btn-primary { border-color: #7c2028; background: #7c2028; color: #fff; }
.admin-shell .btn-primary:hover, .admin-shell .btn-success:hover, .admin-login .btn-primary:hover,
.admin-shell .btn-primary:focus, .admin-shell .btn-success:focus, .admin-login .btn-primary:focus { border-color: #59151c; background: #59151c; color: #fff; }
.admin-shell .btn-default, .admin-shell .btn-info { border-color: #a99d90; background: #fff; color: #514942; }
.admin-shell .btn-danger { background: #a52d35; border-color: #a52d35; color: #fff; }
.admin-shell .form-control, .admin-login .form-control { min-height: 44px; height: auto; border-color: #92867a; border-radius: 4px; color: #2d2925; background: #fff; font-size: 14px; box-shadow: none; }
.admin-shell .form-control:focus, .admin-login .form-control:focus { border-color: #7c2028; box-shadow: 0 0 0 2px #e5ccc8; }
.admin-shell label, .admin-login label { margin-bottom: 8px; font-weight: 600; color: #514942; }
.admin-shell .form-group { margin-bottom: 21px; }
.admin-report-panel { margin-bottom: 24px; padding: 24px; border: 1px solid #ded9d2; border-radius: 5px; background: #fff; }
.admin-report-panel > h2 { margin: 0 0 22px; font-size: 20px; font-weight: 600; }
.admin-report-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 20px; }
.admin-report-filters > div { min-width: 0; }
.admin-report-filters label { display: block; }
.admin-report-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.admin-report-filters .chosen-container { width: 100% !important; }
.admin-report-filters .chosen-container-single .chosen-single { height: 44px; padding-top: 0; border-color: #92867a; background: #fff; color: #2d2925; line-height: 42px; box-shadow: none; }
.admin-report-filters .chosen-single div b { background-position-y: 12px; }
.report-student-id { display: block; margin-top: 4px; color: #655e58; font-size: 12px; }
.report-summary { margin: 16px 0 0; color: #655e58; font-size: 12px; }
.admin-shell .box { margin-top: 0; margin-bottom: 25px; }
.admin-shell .box-inner { height: auto; border: 1px solid #ded9d2; border-radius: 5px; background: #fff; box-shadow: none; }
.admin-shell .box-header { min-height: 55px; height: auto; margin: 0; padding: 16px 22px; border: 0; border-bottom: 1px solid #ded9d2; border-radius: 0; background: #fff; box-shadow: none; }
.admin-shell .box-header h2 { float: none; margin: 0; color: #30251e; font-size: 17px; font-weight: 600; line-height: 1.5; }
.admin-shell .box-header.admin-header-with-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; }
.admin-shell .admin-header-with-actions h2 { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.admin-panel-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.admin-panel-actions .btn { margin: 0; }
.admin-shell .box-icon { display: none; }
.admin-shell .box-content { padding: 22px; }
.admin-shell .breadcrumb { margin-bottom: 22px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 13px; }
.admin-shell .alert { border-radius: 4px; box-shadow: none; }
.admin-shell .alert-info { color: #514942; border-color: #ded9d2; background: #f4f0e9; }
.admin-shell .dataTables_wrapper { max-width: 100%; }
.admin-table-controls { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.admin-shell .admin-table-controls .dataTables_filter { flex: 1; float: none; max-width: 380px; text-align: left; }
.admin-shell .admin-table-controls .dataTables_filter label { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.admin-shell .admin-table-controls .dataTables_filter input { width: 100%; margin: 0; }
.admin-table-scroll { width: 100%; overflow-x: auto; }
.admin-table-controls input, .admin-table-controls select { min-height: 44px; padding: 9px 12px; border: 1px solid #92867a; border-radius: 4px; color: #2d2925; background: #fff; }
.admin-table-controls select { margin: 0 6px; }
.admin-shell .admin-table-controls .dataTables_length { float: none; }
.admin-shell .admin-table-controls .dataTables_length label { margin: 0; }
.admin-table-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding-top: 18px; }
.admin-shell .admin-table-footer .dataTables_info, .admin-shell .admin-table-footer .dataTables_paginate { float: none; width: auto; text-align: left; }
.admin-table-footer .pagination { margin: 0; }
.admin-table-footer .pagination > .active > a { border-color: #7c2028; background: #7c2028; color: #fff; }
.admin-shell .dataTables_wrapper label { font-size: 12px; font-weight: 400; }
.admin-shell table.table { background: #fff; font-size: 13px; }
.admin-shell .table > thead > tr > th { padding: 13px 12px; border: 0; border-bottom: 1px solid #bcb0a2; background: #f4f0e9; color: #514942; font-weight: 600; }
.admin-shell .table > tbody > tr > td { padding: 14px 12px; border: 0; border-bottom: 1px solid #ded9d2; vertical-align: middle; }
.admin-shell .table-bordered { border: 0; }
.admin-shell .table-striped > tbody > tr:nth-of-type(odd) { background: #fcfbf9; }
.admin-shell .table .btn { min-width: 40px; min-height: 40px; margin: 2px; padding: 9px 10px; }
.admin-shell table .btn.admin-table-action { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; margin: 2px; padding: 0; font-size: 15px; line-height: 1; vertical-align: middle; }
.admin-shell .admin-table-action .glyphicon { top: 0; line-height: 1; }
.admin-shell .admin-actions, .admin-shell .admin-actions-heading { white-space: nowrap; text-align: center; }
.admin-shell .animated { animation: none; }
.admin-shell > .ch-container > hr { margin: 36px 0 20px; border-color: #ded9d2; }
.admin-shell footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin: 0; padding-bottom: 20px; color: #655e58; font-size: 12px; }
.admin-shell footer::before, .admin-shell footer::after { display: none; }
.admin-shell footer p { float: none; width: auto; margin: 0; padding: 0; }
.admin-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 36px 20px; border-top: 4px solid #7c2028; }
.admin-login-layout { width: 100%; max-width: 430px; }
.admin-login-identity { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 25px; }
.admin-login-identity p { margin: 0; font-size: 20px; line-height: 1.4; }
.admin-login-identity strong { display: block; color: #655e58; font-size: 13px; font-weight: 400; }
.admin-login-panel { padding: 33px; border: 1px solid #ded9d2; border-radius: 6px; background: #fff; }
.admin-login-panel h1 { margin: 0 0 12px; font-size: 25px; font-weight: 600; letter-spacing: -.02em; }
.admin-login-panel > p { margin: 0 0 28px; color: #655e58; }
.admin-login-panel .form-group { margin-bottom: 21px; }
.admin-login-panel .btn-block { min-height: 46px; margin-top: 7px; }
.admin-back-link { display: block; margin-top: 24px; text-align: center; font-size: 13px; }
.admin-login-copyright { margin: 22px 0 0; color: #655e58; font-size: 11px; text-align: center; }
@media (max-width: 1199px) {
    .admin-shell > .ch-container > .row { grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
    .admin-statistics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .admin-topbar .navbar-inner { gap: 8px; min-height: 74px; padding: 10px 12px; }
    .admin-shell .admin-topbar .navbar-brand { gap: 8px; font-size: 17px; }
    .admin-shell .admin-topbar .navbar-brand img { width: 34px; height: 34px; }
    .admin-topbar .navbar-brand small { font-size: 10px; }
    .admin-username { display: none; }
    .admin-account .btn { min-height: 44px; padding: 10px; }
    .admin-shell > .ch-container { padding: 24px 15px 0; }
    .admin-shell > .ch-container > .row { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .admin-shell .admin-sidebar-column { display: none; }
    .admin-shell.admin-menu-open .admin-sidebar-column { display: block; }
    .admin-shell .sidebar-nav .nav-canvas { border-bottom: 1px solid #ded9d2; padding-bottom: 8px; transition: none; }
    .admin-shell .main-menu > li > a { min-height: 46px; color: #514942; }
    .admin-shell .main-menu > li.active > a { border-left: 3px solid #7c2028 !important; color: #59151c; }
    .admin-page-heading h1 { font-size: 28px; }
    .admin-statistics { gap: 12px; }
    .admin-statistic { padding: 17px; font-size: 12px; }
    .admin-statistic > strong { font-size: 30px; }
    .admin-start-section { padding: 22px; }
    .admin-shell .box-header { padding: 16px; }
    .admin-shell .box-content { padding: 16px; }
    .admin-report-panel { padding: 20px 16px; }
    .admin-report-filters { grid-template-columns: minmax(0, 1fr); gap: 17px; }
    .admin-shell .table { min-width: 600px; }
    .admin-shell .btn { min-height: 44px; }
    .admin-shell .table .btn { min-width: 44px; min-height: 44px; }
    .admin-table-controls { align-items: stretch; flex-direction: column; }
    .admin-shell .admin-table-controls .dataTables_filter { max-width: none; }
    .admin-shell .admin-table-controls .dataTables_length { text-align: right; }
    .admin-table-footer .pagination > li:not(.prev):not(.next):not(.previous) { display: none; }
    .admin-login { padding: 28px 15px; }
    .admin-login-panel { padding: 27px 23px; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-shell *, .admin-login * { animation: none !important; transition: none !important; }
}
