.staff-login-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: #1a0907;
}

.staff-login-shell {
    width: min(100%, 1360px);
    margin: 0 auto;
}

.staff-login-page:not(.is-admin) .application-header {
    display: none;
}

.staff-login-card {
    display: grid;
    min-height: min(680px, calc(100vh - 36px));
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 0;
    padding: 14px;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
}

.staff-login-photo {
    min-height: 560px;
    overflow: hidden;
    border-radius: 10px;
    background: #e8edf2;
}

.staff-login-photo img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 560px;
    object-fit: cover;
    object-position: center;
}

.staff-login-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 42px clamp(28px, 7vw, 100px);
    color: #172b45;
    text-align: center;
}

.staff-login-logo {
    width: 112px;
    height: 112px;
    margin-bottom: 12px;
    object-fit: contain;
}

.staff-login-panel .eyebrow {
    margin-bottom: 8px;
    color: #e87939;
}

.staff-login-panel h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
}

.staff-login-panel .auth-intro {
    max-width: 420px;
    margin: 10px 0 22px;
}

#admin-login-form {
    width: min(100%, 480px);
    text-align: left;
}

#admin-login-form input {
    margin-bottom: 14px;
}

.staff-forgot-password {
    margin: -4px 0 8px;
    font-size: 13px;
    text-align: right;
}

.staff-forgot-password a {
    color: #e87939;
    text-decoration: none;
}

.staff-forgot-password a:hover,
.staff-forgot-password a:focus-visible {
    text-decoration: underline;
}

#admin-login-button {
    width: 100%;
    margin-top: 8px;
    background: #f47f39;
}

#admin-login-button:hover,
#admin-login-button:focus {
    background: #dc692b;
}

.staff-login-page:not(.is-admin) #admin-status {
    max-width: 680px;
    margin: 10px auto 0;
    color: #ffffff;
    text-align: center;
}

.staff-login-page:not(.is-admin) #admin-status.is-error {
    color: #ffd3c2;
}

.staff-login-page.is-admin {
    display: block;
    padding: 36px 20px 56px;
    background: #f3f6fa;
}

.staff-login-page.is-admin .staff-login-shell {
    max-width: 1200px;
}

.staff-login-page.is-admin #admin-status {
    color: #315b83;
}

.admin-dashboard-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 28px;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 16px;
    border-right: 1px solid #e1e8f0;
}

.admin-nav-button {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #315b83;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    text-align: left;
}

.admin-nav-button:hover,
.admin-nav-button:focus-visible {
    background: #f3f6fa;
}

.admin-nav-button.is-active {
    background: #084d96;
    color: #ffffff;
}

.admin-nav-badge {
    display: inline-flex;
    min-width: 21px;
    height: 21px;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #d93025;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.admin-nav-badge[hidden] {
    display: none;
}

.admin-dashboard-content {
    min-width: 0;
}

.admin-dashboard-content [hidden] {
    display: none;
}

.admin-dashboard-content h2 {
    margin-top: 0;
}

.admin-notes-members-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-notes-members-header h2 {
    margin-bottom: 7px;
}

.admin-notes-members-header .field-help {
    margin: 0;
}

.admin-notes-members-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 14px;
}

.admin-notes-members-tools label {
    color: #315b83;
    font-size: 13px;
    font-weight: 600;
}

#notes-members-search {
    width: min(100%, 360px);
    min-height: 40px;
    margin: 0;
}

#notes-members-count {
    margin-left: auto;
    color: #62758a;
    font-size: 13px;
}

.notes-member-list {
    display: grid;
    gap: 12px;
}

.admin-contact-messages-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-contact-messages-header h2 {
    margin-bottom: 7px;
}

.admin-contact-messages-header .field-help {
    max-width: 620px;
    margin: 0;
}

.admin-contact-messages-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 14px;
}

.admin-contact-messages-tools label {
    color: #315b83;
    font-size: 13px;
    font-weight: 600;
}

#contact-messages-search {
    width: min(100%, 360px);
    min-height: 40px;
    margin: 0;
}

#contact-messages-count {
    margin-left: auto;
    color: #62758a;
    font-size: 13px;
}

.contact-message-list {
    display: grid;
    gap: 12px;
}

.contact-message-card {
    padding: 18px;
    border: 1px solid #e1e8f0;
    border-radius: 7px;
    background: #ffffff;
}

.contact-message-card-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    margin-bottom: 14px;
}

.contact-message-card-heading h3 {
    margin: 0;
    color: #172b45;
    font-size: 16px;
}

.contact-message-service {
    padding: 5px 9px;
    border-radius: 4px;
    background: #edf4f8;
    color: #315b83;
    font-size: 12px;
    font-weight: 600;
}

.contact-message-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8edf2;
}

.contact-message-details > div {
    min-width: 0;
}

.contact-message-details dt {
    margin-bottom: 4px;
    color: #718093;
    font-size: 11px;
    font-weight: 700;
}

.contact-message-details dd {
    margin: 0;
    color: #29425d;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.contact-message-card h4 {
    margin: 0 0 6px;
    color: #315b83;
    font-size: 12px;
}

.contact-message-body {
    margin: 0;
    color: #43586d;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.notes-member-card {
    padding: 17px;
    border: 1px solid #e1e8f0;
    border-radius: 7px;
    background: #ffffff;
}

.notes-member-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.notes-member-heading h3 {
    margin: 0;
    color: #172b45;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.member-course-badge {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 4px;
    background: #eaf5ee;
    color: #246746;
    font-size: 11px;
    font-weight: 700;
}

.member-course-badge.is-unselected {
    background: #f1f3f5;
    color: #637386;
}

.admin-notes-control-header,
.admin-notes-units-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.admin-notes-control-header {
    margin-bottom: 16px;
}

.admin-notes-control-header h2,
.admin-notes-units-heading h3 {
    margin: 0 0 7px;
}

.admin-course-picker {
    display: grid;
    max-width: 560px;
    gap: 7px;
    margin-bottom: 22px;
    color: #315b83;
    font-size: 13px;
    font-weight: 600;
}

#admin-notes-course-select {
    width: 100%;
    min-height: 42px;
    margin: 0;
}

.admin-note-upload-form {
    display: grid;
    max-width: 680px;
    gap: 9px;
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid #e1e8f0;
    border-radius: 7px;
    background: #f8fafc;
}

.admin-note-upload-form h3 {
    margin: 0 0 4px;
    color: #172b45;
    font-size: 16px;
}

.admin-note-upload-form label {
    color: #315b83;
    font-size: 12px;
    font-weight: 600;
}

.admin-note-upload-form label span {
    color: #718093;
    font-weight: 400;
}

.admin-note-upload-form input,
.admin-note-upload-form select {
    min-height: 40px;
    margin: 0 0 5px;
}

.admin-note-upload-form input[type="file"] {
    height: auto;
    padding: 9px;
}

.admin-note-upload-form .admin-action-button {
    justify-self: start;
    margin-top: 5px;
}

.admin-notes-units-heading {
    align-items: center;
    margin-bottom: 12px;
}

.admin-notes-units-heading h3 {
    margin: 0;
    color: #172b45;
    font-size: 16px;
}

#admin-notes-unit-count {
    color: #62758a;
    font-size: 12px;
}

.admin-notes-unit-list {
    display: grid;
    gap: 10px;
}

.admin-note-unit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid #e1e8f0;
    border-radius: 6px;
    background: #ffffff;
}

.admin-note-unit h4 {
    margin: 0 0 5px;
    color: #172b45;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.admin-note-unit-meta,
.admin-note-file-path {
    margin: 0;
    color: #62758a;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.admin-note-file-path {
    color: #8793a0;
    font-size: 11px;
}

.notes-member-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
    margin: 0;
}

.notes-member-details > div {
    min-width: 0;
}

.notes-member-details dt {
    margin-bottom: 4px;
    color: #718093;
    font-size: 11px;
    font-weight: 700;
}

.notes-member-details dd {
    margin: 0;
    color: #29425d;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.admin-analytics-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.admin-analytics-header .field-help {
    max-width: 640px;
}

.admin-analytics-header label {
    display: grid;
    gap: 6px;
    color: #315b83;
    font-size: 13px;
    font-weight: 600;
}

#admin-analytics-period {
    min-width: 150px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    background: #ffffff;
    color: #172b45;
    font: inherit;
}

.admin-analytics-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.analytics-metric {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.analytics-metric span {
    color: #5c6e82;
    font-size: 13px;
}

.analytics-metric strong {
    color: #172b45;
    font-size: 28px;
}

.admin-analytics-chart-wrap {
    overflow-x: auto;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    background: #ffffff;
}

#admin-analytics-chart {
    display: block;
    width: 100%;
    min-width: 680px;
    height: auto;
}

.analytics-grid-line {
    stroke: #e7edf3;
    stroke-width: 1;
}

.analytics-axis-label {
    fill: #62758a;
    font-family: inherit;
    font-size: 11px;
}

.analytics-submission-bar {
    fill: #084d96;
}

.analytics-deletion-bar {
    fill: #e98218;
}

.analytics-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 12px;
    color: #52657a;
    font-size: 13px;
}

.analytics-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.analytics-legend i {
    width: 11px;
    height: 11px;
    border-radius: 2px;
}

.analytics-legend-submissions {
    background: #084d96;
}

.analytics-legend-deletions {
    background: #e98218;
}

.admin-delete-button {
    min-height: 38px;
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: #b42318;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.admin-delete-button:hover,
.admin-delete-button:focus {
    background: #8f1b13;
}

.admin-delete-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.incomplete-document-form {
    display: grid;
    flex-basis: 100%;
    gap: 8px;
    padding: 14px;
    border: 1px solid #e1e8f0;
    border-radius: 6px;
    background: #f8fafc;
}

.incomplete-document-form h4 {
    margin: 0;
    color: #172b45;
    font-size: 14px;
}

.incomplete-document-form label {
    color: #315b83;
    font-size: 13px;
    font-weight: 600;
}

.incomplete-document-form textarea {
    width: 100%;
    min-height: 86px;
    padding: 10px 12px;
    border: 1px solid #cbd6e2;
    border-radius: 5px;
    background: #ffffff;
    color: #172b45;
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.incomplete-document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.placement-confirmation-form {
    display: grid;
    flex-basis: 100%;
    gap: 8px;
    padding: 14px;
    border: 1px solid #a7dfbd;
    border-radius: 6px;
    background: #f0fbf4;
}

.placement-confirmation-form h4 {
    margin: 0;
    color: #176b3a;
    font-size: 14px;
}

.placement-confirmation-form label {
    color: #286744;
    font-size: 13px;
    font-weight: 600;
}

.placement-confirmation-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px 12px;
    border: 1px solid #b8d9c3;
    border-radius: 5px;
    background: #ffffff;
    color: #172b45;
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.placement-confirmation-form .admin-action-button {
    justify-self: start;
    background: #16834a;
}

.placement-confirmation-form .admin-action-button:hover,
.placement-confirmation-form .admin-action-button:focus {
    background: #116c3c;
}

.admin-clear-notice-button {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    background: #ffffff;
    color: #315b83;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.admin-clear-notice-button:hover,
.admin-clear-notice-button:focus {
    background: #edf2f7;
}

.admin-clear-notice-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

@media (max-width: 760px) {
    .staff-login-page {
        padding: 12px;
    }

    .admin-contact-messages-header {
        flex-direction: column;
    }

    .contact-message-details {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .staff-login-card {
        min-height: 0;
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .staff-login-photo,
    .staff-login-photo img {
        min-height: 250px;
        max-height: 38vh;
    }

    .staff-login-panel {
        padding: 30px 18px;
    }

    .staff-login-logo {
        width: 88px;
        height: 88px;
    }

    .admin-dashboard-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .admin-sidebar {
        flex-direction: row;
        padding: 0 0 12px;
        border-right: 0;
        border-bottom: 1px solid #e1e8f0;
    }

    .admin-nav-button {
        flex: 1;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        text-align: center;
        padding-right: 8px;
        padding-left: 8px;
        font-size: 12px;
    }

    .admin-notes-members-header {
        flex-direction: column;
    }

    .admin-notes-control-header {
        flex-direction: column;
    }

    .admin-note-unit {
        align-items: flex-start;
        flex-direction: column;
    }

    .notes-member-details {
        grid-template-columns: 1fr;
    }

    .admin-analytics-header {
        flex-direction: column;
    }

    .admin-analytics-summary {
        grid-template-columns: 1fr;
    }
}

.staff-login-page.is-admin {
    min-height: 100vh;
    padding: 0;
    background: #f2f4f9;
}

.staff-login-page.is-admin .staff-login-shell {
    width: 100%;
    max-width: none;
    margin: 0;
}

.staff-login-page.is-admin .application-header {
    position: relative;
    z-index: 1;
    min-height: 68px;
    padding: 10px clamp(18px, 3vw, 40px);
    border: 0;
    background: #138bd0;
    box-shadow: 0 2px 8px rgba(16, 54, 84, 0.16);
    color: #fff;
}

.staff-login-page.is-admin .admin-header-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.staff-login-page.is-admin .admin-header-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 3px;
    border-radius: 3px;
    background: #fff;
    object-fit: contain;
}

.staff-login-page.is-admin .admin-header-brand > div {
    min-width: 0;
}

.staff-login-page.is-admin .application-header .eyebrow,
.staff-login-page.is-admin .application-header h1,
.staff-login-page.is-admin .application-header .auth-intro,
.staff-login-page.is-admin .account-panel {
    color: #fff;
}

.staff-login-page.is-admin .application-header .eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
}

.staff-login-page.is-admin .application-header h1 {
    font-size: 21px;
}

.staff-login-page.is-admin .application-header .auth-intro {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 12px;
}

.staff-login-page.is-admin #admin-signout {
    min-height: 36px;
    border-color: rgba(255, 255, 255, 0.7);
    background: transparent;
    color: #fff;
}

.staff-login-page.is-admin #admin-signout:hover,
.staff-login-page.is-admin #admin-signout:focus-visible {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.staff-login-page.is-admin #admin-status {
    max-width: 1440px;
    margin: 16px auto 0;
    padding: 0 clamp(20px, 3vw, 40px);
}

.staff-login-page.is-admin #admin-status:empty {
    display: none;
}

.staff-login-page.is-admin .admin-panel {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.staff-login-page.is-admin .admin-dashboard-layout {
    min-height: calc(100vh - 68px);
    grid-template-columns: 224px minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
}

.staff-login-page.is-admin .admin-sidebar {
    min-height: 100%;
    gap: 5px;
    padding: 24px 12px;
    border: 0;
    background: #087c43;
}

.staff-login-page.is-admin .admin-nav-button {
    position: relative;
    min-height: 46px;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: 3px;
    color: #f4fff8;
    font-size: 13px;
    font-weight: 600;
}

.staff-login-page.is-admin .admin-nav-button:hover,
.staff-login-page.is-admin .admin-nav-button:focus-visible {
    background: rgba(255, 255, 255, 0.12);
}

.staff-login-page.is-admin .admin-nav-button.is-active {
    background: #ffbf19;
    color: #193322;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.staff-login-page.is-admin .admin-dashboard-content {
    min-width: 0;
    padding: 30px clamp(22px, 3vw, 42px) 52px;
}

.staff-login-page.is-admin .admin-dashboard-content > section:not([hidden]) {
    padding: 24px;
    border: 1px solid #d9e7df;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(30, 55, 74, 0.06);
}

.staff-login-page.is-admin .admin-dashboard-content h2 {
    color: #344c63;
}

.staff-login-page.is-admin .admin-nav-badge {
    background: #d93025;
    color: #fff;
}

@media (max-width: 760px) {
    .staff-login-page.is-admin {
        padding: 0;
    }

    .staff-login-page.is-admin .admin-dashboard-layout {
        min-height: calc(100vh - 68px);
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        align-content: start;
    }

    .staff-login-page.is-admin .admin-sidebar {
        min-height: 0;
        align-content: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 12px;
    }

    .staff-login-page.is-admin .admin-nav-button {
        flex: 1 1 145px;
        justify-content: center;
        gap: 7px;
        text-align: center;
    }

    .staff-login-page.is-admin .admin-dashboard-content {
        padding: 24px 16px 38px;
    }

    .staff-login-page.is-admin .admin-dashboard-content > section:not([hidden]) {
        padding: 20px 16px;
    }

    .staff-login-page.is-admin #admin-status {
        padding: 0 16px;
    }
}

@media (max-width: 580px) {
    .staff-login-page.is-admin .application-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 14px;
    }

    .staff-login-page.is-admin .application-header > div:first-child {
        min-width: 0;
    }

    .staff-login-page.is-admin .account-panel {
        gap: 9px;
        margin-left: auto;
        font-size: 11px;
    }

    .staff-login-page.is-admin #admin-signout {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 11px;
    }
}
