/* College SPO ranking — restored star-era look (not the 20260819 gray restyle). */
.spo-range {
    --spo-ink: #1C1B3B;
    --spo-muted: #5a5f78;
    --spo-panel: #f8f9fa;
    --spo-card: #eef1ff;
    --spo-card-hover: #f5f7ff;
    --spo-card-active: #e4e9ff;
    --spo-hairline: #c5cbe8;
    --spo-highlight: #ffff99;
    --spo-note: #fff8e1;
    --spo-note-edge: #e6d48a;
    --spo-star: #c9a227;
    --spo-danger: #c0392b;
    --spo-control-h: 42px;
    color: var(--spo-ink);
}

.spo-range .page-heading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 20px;
    margin: 0.75rem 0 1rem;
}

.spo-range .page-heading-row h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--spo-ink);
}

.spo-range .paid-range-banner,
.spo-range .budget-range-banner {
    display: inline;
    padding: 0;
    background: none;
    border: 0;
    color: var(--spo-ink);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.spo-range .paid-range-banner:hover,
.spo-range .budget-range-banner:hover {
    color: var(--spo-ink);
}

.spo-range .filter-panel {
    background: var(--spo-panel);
    padding: 20px;
    margin: 0 0 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.spo-range .filter-panel .form-group {
    margin-bottom: 0;
}

.spo-range .filter-panel label {
    font-weight: 600;
    color: var(--spo-ink);
    margin-bottom: 5px;
    display: block;
}

.spo-range .form-control,
.spo-range select.form-control,
.spo-range input.form-control {
    height: var(--spo-control-h);
    box-sizing: border-box;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    color: var(--spo-ink);
    font-size: 15px;
    padding: 0 12px;
}

.spo-range .form-control:focus {
    border-color: var(--spo-ink);
    outline: 2px solid var(--spo-ink);
    outline-offset: 2px;
}

.spo-range select.program-select {
    width: 100%;
    max-width: 100%;
    text-overflow: ellipsis;
}

.spo-range .btn,
.spo-range input.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--spo-control-h);
    min-height: var(--spo-control-h);
    box-sizing: border-box;
    padding: 0 16px;
    margin: 0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.spo-range .btn-primary,
.spo-range input.btn-primary {
    background: var(--spo-ink);
    border: 1px solid var(--spo-ink);
    color: #fff;
}

.spo-range .btn-primary:hover,
.spo-range input.btn-primary:hover {
    background: #2a2954;
    border-color: #2a2954;
    color: #fff;
}

.spo-range .btn-danger,
.spo-range input.btn-danger,
.spo-range .btn-spo-reset,
.spo-range input.btn-spo-reset {
    background: var(--spo-danger);
    border: 1px solid var(--spo-danger);
    color: #fff;
}

.spo-range .btn-danger:hover,
.spo-range input.btn-danger:hover,
.spo-range .btn-spo-reset:hover,
.spo-range input.btn-spo-reset:hover {
    background: #a93226;
    border-color: #a93226;
    color: #fff;
}

.spo-range .spo-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 10px 12px;
}

.spo-range .spo-search-field {
    flex: 1 1 auto;
    min-width: 0;
}

.spo-range .spo-toolbar-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    flex: 0 0 auto;
}

.spo-range .search-hint {
    margin: 12px 0 0;
    padding: 0;
    background: none;
    border: 0;
}

.spo-range .hint-browse,
.spo-range .hint-search {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 600;
    color: var(--spo-ink);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(28, 27, 59, 0.08);
}

.spo-range .hint-browse {
    background: linear-gradient(135deg, #eef1ff 0%, #f5f7ff 45%, #ffffff 100%);
    border: 1px solid var(--spo-hairline);
    border-left: 5px solid var(--spo-ink);
}

.spo-range .hint-search {
    display: none;
    background: var(--spo-note);
    border: 1px solid var(--spo-note-edge);
    border-left: 5px solid var(--spo-star);
}

.spo-range .hint-body {
    flex: 1;
    min-width: 0;
}

.spo-range .hint-title {
    display: inline;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--spo-ink);
}

.spo-range .hint-mark {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 50%;
    background: #fff8e1;
    border: 2px solid var(--spo-star);
    color: var(--spo-star);
    font-size: 1.05rem;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(201, 162, 39, 0.35);
}

.spo-range .hint-browse p,
.spo-range .hint-search p {
    margin: 0 0 6px;
}

.spo-range .hint-browse p:last-child,
.spo-range .hint-search p:last-child {
    margin-bottom: 0;
}

.spo-range .hl-swatch {
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin: 0 0.25em 0 0.15em;
    vertical-align: -0.1em;
    background: var(--spo-highlight);
    border: 1px solid #8a7a2a;
}

.spo-range .search-results-dropdown {
    display: none;
    position: relative;
    z-index: 2;
    background: transparent;
    border: 0;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    margin: 12px 0 0;
    padding: 0;
}

.spo-range .search-results-dropdown .result-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    margin: 0 0 10px;
    cursor: pointer;
    background: var(--spo-card);
    border: 1px solid var(--spo-hairline);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(28, 27, 59, 0.08);
}

.spo-range .search-results-dropdown .result-item:last-child {
    margin-bottom: 0;
}

.spo-range .search-results-dropdown .result-item:hover {
    background: var(--spo-card-hover);
    box-shadow: 0 4px 10px rgba(28, 27, 59, 0.08);
}

.spo-range .search-results-dropdown .result-item.is-active {
    background: var(--spo-card-active);
    border-color: var(--spo-ink);
    box-shadow: inset 5px 0 0 var(--spo-ink);
}

.spo-range .search-results-dropdown .result-item:focus,
.spo-range .search-results-dropdown .result-item:focus-visible {
    outline: 2px solid var(--spo-ink);
    outline-offset: 2px;
}

.spo-range .search-results-dropdown .main-info {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--spo-ink);
}

.spo-range .search-results-dropdown .detail-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.85rem;
    line-height: 1.3;
    color: var(--spo-muted);
    font-weight: 500;
}

.spo-range .search-results-dropdown .detail-info:empty {
    display: none;
}

.spo-range .result-badge {
    display: inline-block;
    padding: 3px 10px;
    border: 0;
    background: #d5dcf0;
    color: var(--spo-ink);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
}

.spo-range .result-badge--status {
    background: var(--spo-ink);
    color: #fff;
}

.spo-range .search-results-dropdown .no-results {
    padding: 10px 0;
    color: var(--spo-muted);
}

.spo-range .filter-actions {
    margin-top: 14px;
}

.spo-range .spo-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
    margin-top: 14px;
}

.spo-range .spo-filter-field {
    flex: 1 1 160px;
    min-width: 0;
}

.spo-range .spo-filter-action {
    flex: 0 0 auto;
}

.spo-range .spo-filter-row .btn-group-bottom {
    margin-top: 0;
    padding-top: 0;
    min-height: 0;
    height: auto;
    justify-content: flex-start;
}

.spo-range .filter-panel .btn-group-bottom {
    margin-top: 0;
    text-align: right;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 8px;
    height: 100%;
}

.spo-range .filter-panel .btn-group-bottom .btn {
    margin: 0 !important;
}

.spo-range .filter-panel.is-search-mode .browse-filters,
.spo-range .filter-panel.is-search-mode .btn-browse-refresh,
.spo-range .filter-panel.is-search-mode .filter-actions {
    display: none !important;
}

.spo-range .filter-panel.is-search-mode .hint-browse {
    display: none;
}

.spo-range .filter-panel.is-search-mode .hint-search {
    display: flex;
}

.spo-range .error-inline {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 10px 0;
}

.spo-range .range-block {
    background: #fff;
    border: 1px solid #eef1ff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.spo-range .range-meta {
    margin: 0;
    padding: 12px 16px;
    background: #eef1ff;
    border-bottom: 1px solid var(--spo-hairline);
    color: var(--spo-ink);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.spo-range .range-meta:empty {
    display: none;
}

.spo-range .range-meta-k {
    color: var(--spo-muted);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-right: 4px;
}

.spo-range .table-container {
    zoom: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

.spo-range .table {
    margin-bottom: 0;
}

.spo-range .table th,
.spo-range .gv-applicants th {
    background-color: var(--spo-ink);
    color: #fff;
    white-space: nowrap;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
    vertical-align: middle;
}

.spo-range .table td {
    vertical-align: middle;
}

.spo-range .gv-applicants > tbody > tr.highlight-row > td {
    background-color: var(--spo-highlight) !important;
}

.spo-range .no-data {
    text-align: center;
    padding: 36px 16px;
    color: #6c757d;
    font-size: 1rem;
}

.spo-range .gv-applicants thead th.priority-header {
    width: 48px;
}

.spo-range .table-container .pagination {
    margin: 10px 12px 12px;
}

.spo-range .table-container .pagination a,
.spo-range .table-container .pagination span {
    display: inline-block;
    color: var(--spo-ink);
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    text-decoration: none;
    margin: 0 2px;
    border-radius: 4px;
    background: #fff;
}

.spo-range .table-container .pagination a:hover {
    background: #f5f7ff;
    color: var(--spo-ink);
}

.spo-range .table-container .pagination span {
    background: var(--spo-ink);
    color: #fff;
    border-color: var(--spo-ink);
}

.spo-range.spo-range--paid .gv-applicants th,
.spo-range.spo-range--paid .gv-applicants td {
    text-align: center;
}

.spo-range .loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.spo-range .loading-overlay.active {
    display: flex;
}

.spo-range .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--spo-hairline);
    border-top-color: var(--spo-ink);
    border-radius: 50%;
    animation: spo-spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spo-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 767.98px) {
    .spo-range .page-heading-row h2 {
        font-size: 1.2rem;
    }

    .spo-range .form-control,
    .spo-range select.form-control,
    .spo-range input.form-control,
    .spo-range .spo-toolbar-actions .btn,
    .spo-range .spo-toolbar-actions input.btn,
    .spo-range .spo-filter-row .btn,
    .spo-range .spo-filter-row input.btn {
        height: 44px;
        min-height: 44px;
        font-size: 16px;
    }

    .spo-range .filter-actions:not(.spo-filter-row) .btn-group-bottom {
        margin-top: 8px;
        justify-content: stretch;
        flex-direction: column;
    }

    .spo-range .filter-actions:not(.spo-filter-row) .btn-group-bottom .btn {
        width: 100%;
    }
}

@media (max-width: 479.98px) {
    .spo-range .spo-toolbar {
        flex-wrap: wrap;
    }

    .spo-range .spo-search-field {
        flex: 1 1 100%;
    }

    .spo-range .spo-toolbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .spo-range .spo-toolbar-actions .btn,
    .spo-range .spo-toolbar-actions input.btn {
        flex: 1 1 auto;
    }

    .spo-range .spo-filter-field,
    .spo-range .spo-filter-action,
    .spo-range .spo-filter-action .btn,
    .spo-range .spo-filter-action input.btn {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (min-width: 768px) {
    .spo-range .filter-actions:not(.spo-filter-row) .btn-group-bottom {
        min-height: var(--spo-control-h);
        padding-top: 1.7rem;
    }
}
