/* Form controls, record dialogs, filter drawers, command search and sign-in. */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.field {
    min-width: 0;
    margin-bottom: 18px;
}
.form-grid .field {
    margin-bottom: 0;
}
.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--school-text);
    margin-bottom: 7px;
}
.form-control,
.form-select {
    min-height: 42px;
    border: 1px solid #dce3e8;
    border-radius: 7px;
    background-color: #fff;
    font-size: 15px;
    padding: 10px 12px;
    color: var(--school-text);
    box-shadow: 0 1px 2px #16374703;
}
.form-control:focus,
.form-select:focus {
    border-color: #a9812c;
    box-shadow: 0 0 0 3px #dca9361a;
}
.form-control::placeholder {
    color: #929eab;
}
.form-control:disabled {
    background: #f3f6f8;
}
.form-control[type='file'] {
    padding: 8px;
    font-size: 15px;
}
.form-control[type='file']::file-selector-button {
    background: #edf3f6;
    border: 0;
    color: var(--school-navy);
    border-radius: 4px;
    font-size: 15px;
    margin: -2px 10px -2px -2px;
    padding: 6px 9px;
}
textarea.form-control {
    min-height: 96px;
}
.form-grid .span-2,
.form-grid .form-actions,
.form-grid .invoice-upload,
.form-grid .profile-upload,
.form-grid .alert,
.form-grid .notice,
.form-grid .form-help {
    grid-column: 1/-1;
}
.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--school-border);
    padding-top: 20px;
    margin-top: 8px;
}
.form-actions .btn {
    min-width: 106px;
}
.form-help {
    font-size: 15px;
    line-height: 1.65;
    color: var(--school-muted);
}
.invoice-upload,
.profile-upload {
    padding: 18px;
    border: 1px dashed #cbd7dd;
    border-radius: 9px;
    background: #f8fafb;
}
.invoice-upload .field,
.profile-upload .field {
    margin: 0;
}
.invoice-upload small,
.profile-upload small {
    display: block;
    margin-top: 8px;
    color: var(--school-muted);
}
.filter-bar,
.school-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
}
.canvas-filters {
    display: grid;
    gap: 20px;
}
.canvas-filters .field {
    margin: 0;
}
.canvas-filters .school-filter-actions {
    border-top: 1px solid var(--school-border);
    padding-top: 24px;
    margin-top: 4px;
    display: flex;
    gap: 8px;
}
.modal {
    --bs-modal-width: 820px;
    --bs-modal-zindex: 1060;
    z-index: 1060;
}
.modal-backdrop {
    z-index: 1055;
}
.modal-dialog {
    max-width: 820px;
    margin: 36px auto;
}
.modal-content {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 20px 80px #142c4133;
    overflow: hidden;
}
.modal-header,
.offcanvas-header {
    padding: 22px 26px;
    gap: 13px;
    border-bottom: 1px solid var(--school-border);
    background: #fff;
}
.modal-title,
.offcanvas-title {
    font-size: 18px;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: -0.5px;
}
.dialog-eyebrow {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--school-muted);
    margin: 0 0 3px;
}
.dialog-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    background: #f8f0dc;
    color: #96731e;
    border-radius: 10px;
    font-size: 21px;
    flex-shrink: 0;
}
.dialog-close {
    margin-left: auto;
}
.modal-body {
    padding: 25px 26px;
}
.modal-body .section-card {
    border: 0;
    box-shadow: none;
    margin: 0;
}
.modal-body .section-card > .card-header {
    padding: 0 0 20px;
    border: 0;
    min-height: 0;
}
.modal-body .section-card:first-of-type > .card-header h2 {
    display: none;
}
.modal-body .section-card > .card-body {
    padding: 0;
}
.modal-body .form-back {
    display: none;
}
.modal-body .form-actions {
    position: sticky;
    bottom: -25px;
    background: white;
    padding: 19px 0 0;
    z-index: 2;
}
.modal-body .table-responsive {
    margin: 0;
    max-width: 100%;
}
.offcanvas {
    --bs-offcanvas-width: 430px;
    width: 430px !important;
    max-width: 100%;
    z-index: 1060;
    border: 0 !important;
    box-shadow: -12px 0 60px #142c411c;
}
.offcanvas-backdrop {
    z-index: 1055;
}
.offcanvas-body {
    padding: 25px 26px;
}
.select2-container {
    font-size: 15px;
    max-width: 100%;
}
.select2-container--default .select2-selection--single {
    border: 1px solid #dce3e8;
    border-radius: 7px;
    height: 42px;
    min-height: 42px;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 30px 0 12px;
    box-shadow: 0 1px 2px #16374703;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding: 0;
    color: var(--school-text);
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    right: 8px;
    width: 20px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow:after {
    content: none;
}
.select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 7px;
    color: var(--school-muted);
    float: none;
    position: absolute;
    right: 25px;
}
.select2-container--open .select2-selection--single {
    border-color: #a9812c;
}
.select2-dropdown {
    border: 1px solid #dce3e8;
    border-radius: 7px;
    box-shadow: 0 8px 24px #19384a15;
    overflow: hidden;
}
.select2-container--open {
    z-index: 1075;
}
.select2-search--dropdown {
    padding: 8px;
}
.select2-search--dropdown .select2-search__field {
    border: 1px solid #dce3e8 !important;
    border-radius: 5px;
    padding: 8px;
    font-size: 15px;
    background: white;
    color: var(--school-text);
    outline-color: #c59939;
}
.select2-results__option {
    padding: 9px 12px;
    font-size: 15px;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--school-navy);
    color: white;
}
.select2-results__option[aria-selected='true'] {
    background: #eef4f6;
}
.swal2-container {
    z-index: 2100;
}
.swal2-popup {
    font-family: inherit !important;
    border-radius: 14px !important;
}
.swal2-title {
    font-size: 22px !important;
}
.swal2-html-container {
    font-size: 14px !important;
}
#page-search-modal .modal-dialog {
    max-width: 560px;
}
#page-search-modal .modal-header {
    padding: 20px 22px;
    justify-content: space-between;
}
#page-search-modal .modal-title {
    font-size: 16px;
}
#page-search-modal .modal-body {
    padding: 16px;
}
.command-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    color: var(--school-muted);
}
.command-search > i {
    font-size: 22px;
}
.command-search input {
    border: 0;
    box-shadow: none;
    font-size: 14px;
}
.page-search-results {
    max-height: 330px;
    overflow: auto;
    margin-top: 12px;
}
.page-search-results button {
    display: flex;
    align-items: center;
    width: 100%;
    border: 0;
    background: white;
    gap: 13px;
    padding: 12px;
    border-radius: 7px;
    color: var(--school-text);
    text-align: left;
    font-size: 15px;
}
.page-search-results button i {
    font-size: 20px;
    color: var(--school-muted);
}
.page-search-results button:hover,
.page-search-results button:focus {
    background: #f0f5f7;
    outline: none;
}
.page-search-results button span {
    flex: 1;
}
.page-search-results button small {
    font-size: 13px;
    color: var(--school-muted);
}
.command-footer {
    display: flex;
    gap: 18px;
    padding: 13px 22px;
    background: #f8fafb;
    border-top: 1px solid var(--school-border);
    font-size: 13px;
    color: var(--school-muted);
}
.command-footer kbd {
    background: white;
    color: #73808d;
    border: 1px solid #dce3e8;
    box-shadow: 0 1px 0 #dce3e8;
    padding: 1px 4px;
    margin-right: 3px;
}
.command-empty {
    text-align: center;
    padding: 24px;
    color: var(--school-muted);
}
.login-body {
    margin: 0;
    background: white;
}
.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.auth-story {
    background: #153747;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 58px;
    position: relative;
    overflow: hidden;
}
.auth-story:before,
.auth-story:after {
    content: '';
    position: absolute;
    border: 1px solid #ffffff0c;
    border-radius: 50%;
    width: 550px;
    height: 550px;
    right: -325px;
    bottom: -160px;
    pointer-events: none;
}
.auth-story:after {
    width: 760px;
    height: 760px;
    right: -430px;
    bottom: -265px;
}
.auth-brand {
    background: white;
    width: 225px;
    padding: 17px 20px;
    border-radius: 9px;
    position: relative;
    z-index: 1;
}
.auth-brand img {
    width: 100%;
    height: auto;
}
.auth-story-content {
    margin: auto 0;
    max-width: 445px;
    padding: 66px 0;
    position: relative;
    z-index: 1;
}
.auth-kicker {
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 2px;
    color: #dcb65f;
}
.auth-story h1 {
    font-size: 52px;
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -2px;
    margin: 21px 0;
    color: white;
}
.auth-story h1 span {
    color: #e5bd66;
}
.auth-story-content > p {
    font-size: 14px;
    color: #b7c9d3;
    line-height: 1.85;
    max-width: 340px;
}
.auth-benefits {
    display: grid;
    gap: 17px;
    margin-top: 35px;
}
.auth-benefits > div {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 15px;
    color: #dbe7ec;
}
.auth-benefits i {
    color: #e4bc65;
    font-size: 21px;
}
.auth-story-footer {
    font-size: 13px;
    color: #adc2ce;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 1;
}
.auth-form-area {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 30px;
}
.login-card {
    width: 100%;
    max-width: 355px;
}
.login-logo {
    display: none;
    width: 220px;
    height: auto;
    margin: 0 0 42px;
}
.auth-form-icon {
    display: grid;
    place-items: center;
    border: 1px solid #e5e9ed;
    border-radius: 13px;
    width: 52px;
    height: 52px;
    font-size: 26px;
    color: #a9812c;
    margin-bottom: 28px;
}
.login-card .eyebrow {
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--school-muted);
    margin-bottom: 9px;
}
.login-card h2 {
    font-size: 30px;
    letter-spacing: -1px;
    font-weight: 650;
}
.login-intro {
    font-size: 15px;
    color: var(--school-muted);
    margin: 10px 0 30px;
}
.login-form .field {
    margin-bottom: 20px;
}
.login-form .form-control {
    height: 46px;
}
.show-password {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 15px;
    color: var(--school-muted);
    margin: 2px 0 20px;
}
.show-password input {
    accent-color: var(--school-navy);
}
.login-form .form-actions {
    border: 0;
    padding: 0;
    margin: 0;
}
.login-form .form-actions .btn {
    width: 100%;
    height: 45px;
}
.login-help {
    display: flex;
    gap: 10px;
    margin: 26px 0;
    padding: 16px 0;
    border-top: 1px solid var(--school-border);
    font-size: 15px;
    line-height: 1.8;
    color: var(--school-muted);
}
.login-help i {
    font-size: 18px;
    margin-top: 2px;
}
.auth-secure-note {
    font-size: 13px;
    color: #7d8b98;
    display: flex;
    align-items: center;
    gap: 7px;
}
.setup-body .login-card {
    max-width: 520px;
}
.setup-body .auth-form-area {
    min-height: 100vh;
}
.setup-body .login-logo {
    display: block;
}
@media (max-width: 1000px) {
    .auth-story {
        padding: 35px;
    }
    .auth-story h1 {
        font-size: 43px;
    }
    .auth-story-footer {
        flex-direction: column;
    }
    .auth-story-content {
        padding: 50px 0;
    }
}
@media (max-width: 767px) {
    .auth-layout {
        display: block;
    }
    .auth-story {
        display: none;
    }
    .auth-form-area {
        min-height: 100vh;
        padding: 35px 28px;
    }
    .login-logo {
        display: block;
    }
    .auth-form-icon {
        display: none;
    }
    .modal-dialog {
        margin: 16px;
    }
    .form-grid {
        gap: 17px;
    }
}
@media (max-width: 575px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-grid .span-2,
    .form-grid .form-actions {
        grid-column: auto;
    }
    .modal-dialog.modal-fullscreen-sm-down {
        margin: 0;
        max-width: none;
    }
    .modal-fullscreen-sm-down .modal-content {
        border-radius: 0;
    }
    .modal-header,
    .offcanvas-header {
        padding: 18px 20px;
    }
    .modal-body,
    .offcanvas-body {
        padding: 20px;
    }
    .modal-title,
    .offcanvas-title {
        font-size: 17px;
    }
    .modal-body .form-actions {
        bottom: -20px;
    }
    .command-footer {
        gap: 10px;
        padding: 12px;
        font-size: 13px;
    }
}
.form-section-title {
    grid-column: 1/-1;
    border-bottom: 1px solid #eaf0f3;
    padding: 4px 0 12px;
    margin-top: 3px;
}
.form-section-title strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--school-ink);
}
.form-section-title span {
    display: block;
    font-size: 13px;
    color: var(--school-muted);
    margin-top: 4px;
}
.form-section-title:first-child {
    padding-top: 0;
    margin-top: 0;
}
.form-grid .profile-upload .field {
    margin: 0;
}
.filter-launch-actions {
    flex: none;
}
.modal-body > .muted {
    font-size: 13px;
    margin-top: 17px;
}
.form-label {
    font-size: 15px;
}
.form-control,
.form-select,
.select2-container,
.select2-results__option {
    font-size: 15px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -2px;
}
.auth-form-area {
    background: #fff;
}
/* Select2's native arrow must not inherit the template's SVG arrow transform. */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 0;
    transform: none;
    background-image: none;
}

/* Compact pop-ups and bounded document previews. */
.modal .dialog-icon,
.offcanvas .dialog-icon,
.dialog-eyebrow {
    display: none;
}
.modal-header,
.offcanvas-header {
    padding: 14px 20px;
    min-height: 54px;
}
.modal-title,
.offcanvas-title {
    font-size: 18px;
    font-weight: 550;
    letter-spacing: 0;
}
.modal-content {
    border-radius: 5px;
}
.modal-body,
.offcanvas-body {
    padding: 20px;
}
.modal-body img {
    width: auto;
    max-width: min(240px, 100%);
    max-height: 180px;
    object-fit: contain;
}
.modal-body img.invoice-preview {
    max-width: 180px;
    max-height: 130px;
}
.swal2-popup {
    border-radius: 5px !important;
}
.swal2-title {
    font-size: 20px !important;
}
.swal2-icon {
    transform: scale(0.65);
    margin: 0 auto -5px !important;
}
.swal2-popup.swal2-toast .swal2-icon {
    transform: none;
    margin: 0 8px !important;
}
.swal2-html-container {
    font-size: 15px !important;
}
.swal2-actions {
    margin-top: 16px !important;
}
.form-section-title strong {
    font-size: 15px;
}
.form-section-title span {
    font-size: 13px;
}
