.grid-export-toolbar {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .65rem;
    padding: .75rem .9rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(244, 247, 255, .96));
    box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

.grid-export-toolbar--inline {
    margin-inline-start: auto;
}

.grid-export-toolbar__label {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 .8rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
    color: #1d4ed8;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.grid-export-toolbar .btn,
.dt-action-buttons .btn {
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 40px;
    padding: 0 .95rem;
    border-color: rgba(37, 99, 235, .14);
    background: #ffffff;
    color: #1f3b8f;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}

.grid-export-toolbar .btn:hover,
.dt-action-buttons .btn:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, .32);
    color: #17337e;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .14);
}

.bx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    line-height: 1;
}

.bx-sm {
    font-size: 1rem;
}

.bx-printer::before { content: "🖨"; }
.bx-file::before { content: "📄"; }
.bx-spreadsheet::before { content: "📊"; }

.programs-datatable-card {
    border: 0;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(21, 31, 57, .08);
    overflow: hidden;
}

.dt-action-buttons {
    gap: .85rem !important;
}

.dataTables_filter .form-control-sm {
    min-height: 42px;
    min-width: 220px;
    border-radius: 12px;
    border-color: rgba(15, 23, 42, .1);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.programs-datatable th {
    white-space: nowrap;
    font-weight: 700;
}

.program-status-badge {
    width: fit-content;
    border-radius: 999px;
    font-size: .75rem;
    line-height: 1;
}

.avatar.avatar-sm {
    width: 42px;
    height: 42px;
    background: #f6f7fb;
    border: 1px solid rgba(0, 0, 0, .08);
}

.avatar.avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 4px;
    background: #fff;
}

.program-info-lines {
    display: grid;
    gap: .25rem;
    min-width: 230px;
}

.program-info-lines span {
    display: block;
    font-size: .875rem;
}

.program-info-lines .cash-fee {
    background: rgba(46, 184, 114, .12);
    border: 1px solid rgba(46, 184, 114, .25);
    border-radius: 10px;
    color: #176b3b;
    padding: .3rem .45rem;
    margin-top: .15rem;
}

.advanced-program-search .select2,
.advanced-program-search select[multiple] {
    min-height: 108px;
}

.advanced-program-search .form-label {
    font-weight: 700;
    color: #18233f;
}

.mailbox-status-card {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 18px;
    padding: 16px;
    min-height: 120px;
    background: #fff;
    display: grid;
    gap: 6px;
}

.mailbox-status-card strong {
    color: #18233f;
    font-size: 1rem;
}

.mailbox-status-card span {
    font-weight: 700;
}

.mailbox-status-card small {
    color: #6c757d;
    word-break: break-word;
}

.mailbox-status-card--ok {
    border-color: rgba(46, 184, 114, .28);
    background: rgba(46, 184, 114, .07);
}

.mailbox-status-card--warning {
    border-color: rgba(255, 193, 7, .35);
    background: rgba(255, 193, 7, .08);
}

.programs-table-shell--loading {
    opacity: .55;
    pointer-events: none;
    transition: opacity .2s ease;
}

/* Slim page headers: keeps the theme look but removes the large empty vertical space. */
.page-header {
    padding: 28px 0 !important;
    min-height: auto !important;
    background: radial-gradient(circle at top right, rgba(123, 77, 255, .10), transparent 35%), linear-gradient(180deg, rgba(255,255,255,.86), rgba(246,241,255,.74));
}

.page-header .section-heading {
    padding-top: 22px !important;
    padding-bottom: 18px !important;
    margin-bottom: 0 !important;
}

.page-header .section-heading .sub-heading {
    margin-bottom: 8px;
}

.page-header .section-heading h2,
.page-header .section-heading .section-title {
    margin-bottom: 8px;
    font-size: clamp(24px, 3vw, 34px);
}

.page-header .section-heading p {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.8;
}

@media (max-width: 767.98px) {
    .grid-export-toolbar,
    .grid-export-toolbar--inline {
        width: 100%;
        justify-content: center;
    }

    .grid-export-toolbar .btn {
        flex: 1 1 120px;
        justify-content: center;
    }

    .dataTables_filter {
        width: 100%;
    }

    .dataTables_filter .form-control-sm {
        min-width: 0;
        width: 100%;
    }

    .page-header {
        padding: 20px 0 !important;
    }

    .page-header .section-heading {
        padding-top: 14px !important;
        padding-bottom: 12px !important;
    }
}

/* Polished admin navigation shared by all admin pages. */
.admin-nav-section {
    padding: 20px 0 12px;
}

.admin-nav-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(123, 77, 255, .16);
    border-radius: 24px;
    padding: 18px;
    background: radial-gradient(circle at top right, rgba(123, 77, 255, .18), transparent 34%), linear-gradient(135deg, #ffffff 0%, #f8f4ff 100%);
    box-shadow: 0 18px 50px rgba(49, 26, 96, .10);
}

.admin-nav-card::before {
    content: "";
    position: absolute;
    inset-inline-start: -90px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: rgba(123, 77, 255, .10);
    pointer-events: none;
}

.admin-nav-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.admin-nav-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(123, 77, 255, .10);
    color: var(--ed-color-theme-primary);
    font-weight: 800;
    letter-spacing: .02em;
}

.admin-nav-header h2 {
    margin: 6px 0 0;
    font-size: 22px;
    line-height: 1.35;
}

.admin-nav-links {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.admin-nav-link,
.admin-nav-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(123, 77, 255, .14);
    background: rgba(255, 255, 255, .78);
    color: var(--ed-color-heading-primary);
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(49, 26, 96, .06);
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.admin-nav-link:hover,
.admin-nav-link.is-active {
    transform: translateY(-1px);
    border-color: rgba(123, 77, 255, .36);
    background: linear-gradient(135deg, var(--ed-color-theme-primary), #5f32db);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(123, 77, 255, .22);
}

.admin-nav-link i,
.admin-nav-logout i {
    font-size: 15px;
    line-height: 1;
}

.admin-nav-logout-form {
    margin: 0;
}

.admin-nav-logout {
    min-width: 112px;
    cursor: pointer;
    color: #b42318;
    border-color: rgba(180, 35, 24, .16);
    background: rgba(255, 255, 255, .88);
}

.admin-nav-logout:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #dc3545, #b42318);
    border-color: rgba(180, 35, 24, .36);
}

.ed-primary-btn--ghost {
    background: rgba(123, 77, 255, .09) !important;
    border-color: rgba(123, 77, 255, .18) !important;
    color: var(--ed-color-theme-primary) !important;
    box-shadow: none !important;
}

.university-search-panel .form-label,
.university-search-panel label {
    font-weight: 800;
    color: #18233f;
}

.universities-datatable-card .btn-sm {
    border-radius: 10px;
}

.university-title-cell {
    min-width: 220px;
}

.university-info-lines {
    min-width: 260px;
}

.universities-grid-section {
    padding-top: 36px;
}

@media (max-width: 767.98px) {
    .admin-nav-header {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-nav-logout {
        width: 100%;
    }

    .admin-nav-links {
        grid-template-columns: 1fr;
    }
}
