﻿/* Mature B2B Workbench Theme */

:root {
    /* Color Palette - Premium Light */
    --primary-color: #2457a6;
    --primary-hover: #1c478b;
    --secondary-color: #64748b;
    --success-color: #14805e;
    --warning-color: #b7791f;
    --danger-color: #c24141;

    /* Backgrounds */
    --bg-body: #f5f7fa;
    --bg-surface: #ffffff;
    --bg-sidebar: #ffffff;

    /* Text */
    --text-main: #172033;
    --text-secondary: #526074;
    --text-light: #8a95a6;

    /* Borders */
    --border-color: #dce3ec;
    --border-glow: rgba(36, 87, 166, 0.18);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 24px rgba(23, 32, 51, 0.07);
    --shadow-lg: 0 24px 60px rgba(23, 32, 51, 0.12);
    --shadow-glow: 0 0 0 3px var(--border-glow);

    /* Workbench Design Tokens */
    --wb-bg: #f5f7fa;
    --wb-panel: #ffffff;
    --wb-panel-soft: #f9fbfd;
    --wb-ink: #172033;
    --wb-muted: #526074;
    --wb-faint: #8a95a6;
    --wb-line: #dce3ec;
    --wb-line-strong: #c9d4e2;
    --wb-brand: #2457a6;
    --wb-brand-soft: #eaf1fb;
    --wb-green: #14805e;
    --wb-green-soft: #e8f6f0;
    --wb-amber: #b7791f;
    --wb-amber-soft: #fff6df;
    --wb-red: #c24141;
    --wb-red-soft: #fdecec;
    --wb-radius-sm: 8px;
    --wb-radius-md: 12px;
    --wb-radius-lg: 16px;
    --wb-radius-xl: 20px;
    --wb-shadow: 0 18px 44px rgba(23, 32, 51, 0.08);
    --wb-shadow-soft: 0 10px 28px rgba(23, 32, 51, 0.06);

    /* Spacing */
    --header-height: 64px;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 84px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Public Layout (No Sidebar) */
body.public-mode .sidebar {
    display: none;
}

body.public-mode .main-content {
    margin-left: 0;
    width: 100%;
}

body.public-mode .top-nav {
    left: 0;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    padding: 2rem 1.5rem;
    z-index: 50;
    transition: all 0.3s ease;
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    padding: 1.5rem 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 3rem;
    min-height: 44px;
}

.logo-public {
    display: flex;
    align-items: center;
    min-height: 44px;
}

.brand-logo-full {
    display: block;
    width: 170px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

body.sidebar-collapsed .logo {
    justify-content: center;
    margin-bottom: 2rem;
}

body.sidebar-collapsed .brand-logo-full {
    width: 48px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link span {
    white-space: nowrap;
}

body.sidebar-collapsed .nav-link {
    justify-content: center;
    gap: 0;
    padding: 0.8rem 0.75rem;
}

body.sidebar-collapsed .nav-link span {
    display: none;
}

.nav-link:hover {
    background: #f1f5f9;
    
}

.nav-link.active {
    background: #e0e7ff;
    color: var(--primary-color);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

body.sidebar-collapsed .nav-link i {
    width: auto;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    padding-top: calc(var(--header-height) + 2rem);
    transition: margin 0.3s ease;
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Nav */
.top-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 2rem;
    z-index: 40;
    transition: left 0.3s ease;
}

body.sidebar-collapsed .top-nav {
    left: var(--sidebar-collapsed-width);
}

.page-title {
    font-size: 1.125rem;
    font-weight: 600;
    
}

#desktopSidebarToggle {
    margin-right: 12px;
    padding: 0.5rem 0.7rem;
    min-width: 42px;
    min-height: 42px;
    flex: 0 0 auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.875rem;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 1px 2px 0 rgba(36, 87, 166, 0.24);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(36, 87, 166, 0.28);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    background: var(--wb-brand-soft);
    color: var(--primary-color);
}

.btn-text {
    background: transparent;
    color: var(--text-secondary);
}

.btn-text:hover {
    background: rgba(82, 96, 116, 0.08);
}

.btn-sm {
    min-height: 34px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
}

/* Cards & Surface */
.card {
    background: var(--bg-surface);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}


.card:hover {
    box-shadow: var(--shadow-glow);
    border-color: rgba(36, 87, 166, 0.28);
}

.workbench-panel.card:hover {
    box-shadow: var(--wb-shadow-soft);
    border-color: var(--wb-line);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Workbench */
.workbench-page {
    display: grid;
    gap: 16px;
}

.workbench-intro,
.workbench-panel {
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-xl);
    background: var(--wb-panel);
    box-shadow: var(--wb-shadow-soft);
}

.workbench-intro {
    min-height: 112px;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background:
        linear-gradient(135deg, rgba(36, 87, 166, 0.06), transparent 44%),
        #ffffff;
}

.workbench-intro h2,
.workbench-results-head h3,
.workbench-panel-head h3 {
    margin: 0;
    color: var(--wb-ink);
}

.workbench-intro h2 {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    letter-spacing: 0;
}

.workbench-intro p:not(.workbench-eyebrow) {
    margin: 8px 0 0;
    color: var(--wb-muted);
}

.workbench-eyebrow {
    margin: 0 0 7px;
    color: var(--wb-brand);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workbench-intro-steps {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.state-chip {
    min-height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--wb-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--wb-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.state-chip.is-current {
    border-color: rgba(36, 87, 166, 0.24);
    background: var(--wb-brand-soft);
    color: var(--wb-brand);
}

.workbench-plan-host {
    min-width: 0;
}

.workbench-plan-bar {
    display: grid;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-xl);
    background: var(--wb-panel);
    box-shadow: var(--wb-shadow-soft);
}

.workbench-plan-empty {
    background:
        linear-gradient(135deg, rgba(36, 87, 166, 0.08), transparent 52%),
        #ffffff;
}

.workbench-grid {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    height: auto;
    min-height: 0;
    overflow: visible;
}

#page-workbench .workbench-grid {
    align-items: stretch;
    height: calc(100vh - var(--header-height) - 4rem);
    min-height: 520px;
    overflow: hidden;
}

#page-workbench .workbench-profile-panel,
#page-workbench .workbench-results {
    height: 100%;
}

#page-workbench .result-col {
    height: 100%;
}

#page-workbench #resultsTiered {
    overflow-y: auto;
}

#page-profile .workbench-grid {
    align-items: stretch;
    height: calc(100vh - var(--header-height) - 4rem);
    min-height: 520px;
    overflow: hidden;
}

#page-profile .input-panel {
    display: grid;
    gap: 30px;
    align-content: start;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

#page-profile .results-container {
    display: flex;
    min-height: 0;
    height: 100% !important;
    overflow: hidden !important;
}

#page-profile .results-container > .card {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#page-profile #reports-list {
    flex: 1;
    min-height: 0;
    max-height: none !important;
    overflow: hidden;
}

#page-profile .profile-report-list {
    display: grid;
    align-content: start;
    gap: 8px;
    padding-right: 0;
}

#page-profile .profile-report-item {
    margin-bottom: 0;
    padding: 12px 14px;
    border-radius: 8px;
}

#page-profile .profile-report-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

#page-profile .profile-report-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#page-profile .profile-report-date {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

#page-profile .profile-report-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

#page-profile .profile-report-actions .btn {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
}

#page-profile .profile-report-pagination {
    min-height: 44px;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--wb-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

#page-profile .profile-report-page-info {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

#page-profile .profile-report-page-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#page-profile .profile-report-page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

#page-profile .profile-report-page-input {
    width: 58px;
    height: 32px;
    border: 1px solid var(--wb-line);
    border-radius: 8px;
    padding: 0 8px;
    color: #0f172a;
    font-size: 12px;
}

#page-profile .profile-report-page-actions .btn {
    min-height: 32px;
    padding-inline: 10px;
}

.workbench-profile-panel,
.workbench-results {
    height: 100%;
    min-height: 0;
}

.workbench-profile-panel {
    padding: 18px;
    overflow-y: auto;
    margin-bottom: 0;
}

.workbench-profile-panel::-webkit-scrollbar,
#resultsTiered::-webkit-scrollbar {
    width: 7px;
}

.workbench-profile-panel::-webkit-scrollbar-thumb,
#resultsTiered::-webkit-scrollbar-thumb {
    background: #ccd6e3;
    border-radius: 999px;
}

.workbench-panel-head,
.workbench-results-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.workbench-panel-head {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--wb-line);
}

.workbench-results-head {
    flex-shrink: 0;
}

.workbench-segment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--wb-line);
    border-radius: 999px;
    background: var(--wb-panel-soft);
}

.workbench-segment.is-full {
    width: 100%;
}

.workbench-segment.is-full .btn {
    flex: 1;
}

.workbench-segment .btn {
    min-height: 32px;
    border-radius: 999px;
    box-shadow: none;
}

.workbench-profile-form {
    display: grid;
    gap: 14px;
}

.workbench-profile-form .form-group {
    margin-bottom: 0;
}

.workbench-form-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-lg);
    background: var(--wb-panel-soft);
}

.workbench-section-title {
    color: var(--wb-ink);
    font-size: 13px;
    font-weight: 800;
}

.workbench-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.conditional-fields,
#fields-postgrad,
#mode-smart-fields {
    display: none;
}

.workbench-checkbox {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--wb-muted);
    font-size: 13px;
    cursor: pointer;
}

.workbench-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--wb-brand);
}

.workbench-submit-block,
.workbench-smart-panel,
.workbench-form-footer,
.workbench-actions {
    border-top: 1px solid var(--wb-line);
    padding-top: 14px;
}

.workbench-submit-block {
    display: grid;
    gap: 10px;
}

.workbench-submit-block p,
.workbench-note-row,
.workbench-form-footer {
    color: var(--wb-muted);
    font-size: 12px;
    line-height: 1.6;
}

.workbench-main-action,
.workbench-actions .btn,
.login-submit {
    width: 100%;
}

.workbench-smart-panel {
    gap: 12px;
}

.workbench-ai-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.workbench-note-row {
    display: grid;
    gap: 6px;
}

.workbench-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.workbench-form-footer .btn {
    padding: 0;
    min-height: auto;
}

.action-bar {
    display: grid;
    gap: 8px;
}

.workbench-actions {
    display: none;
}

.workbench-results {
    padding: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.workbench-secondary-filter {
    flex-shrink: 0;
    margin: 14px 0 12px;
}

.workbench-secondary-filter .form-control {
    min-height: 44px;
    border-radius: 12px;
    background: #ffffff;
}

.workbench-summary-host,
.workbench-tier-switch {
    flex-shrink: 0;
}

.workbench-context-hint:empty {
    display: none;
}

.workbench-tier-switch {
    margin-bottom: 12px;
}

.workbench-tier-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.workbench-tier-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.workbench-immersive-toggle {
    flex: 0 0 auto;
    white-space: nowrap;
}

body.match-immersive-active {
    overflow: hidden;
}

body.match-immersive-active #page-workbench .workbench-results {
    position: fixed;
    inset: 14px;
    z-index: 1042;
    width: auto;
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 20px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
}

body.match-immersive-active #page-workbench .workbench-results-section,
body.match-immersive-active #page-workbench .result-col {
    min-height: 0;
}

body.match-immersive-active #page-workbench #resultsTiered {
    padding-right: 10px;
}

.results-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.workbench-results-section {
    display: block;
}

.result-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    min-height: 0;
}

#resultsTiered {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 8px;
}

.result-column-title {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--wb-line);
    border-radius: var(--wb-radius-md);
    background: var(--wb-panel-soft);
    color: var(--wb-ink);
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.workbench-match-summary {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: var(--wb-radius-lg);
    border: 1px solid rgba(36, 87, 166, 0.16);
    background: var(--wb-brand-soft);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.workbench-match-summary-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--wb-ink);
}

.workbench-match-summary-note {
    margin-top: 3px;
    color: var(--wb-muted);
    font-size: 12px;
    line-height: 1.55;
}

.workbench-match-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.workbench-match-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(36, 87, 166, 0.16);
    background: #ffffff;
    color: var(--wb-muted);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.workbench-match-summary-chip strong {
    color: var(--wb-ink);
    font-weight: 800;
}

.workbench-summary-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.2s;
    background: #fff; 
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(36, 87, 166, 0.14);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
}

.custom-table th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    background: rgba(36, 87, 166, 0.07);
}

.custom-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    
}

.custom-table tr:hover td {
    background: rgba(36, 87, 166, 0.08);
}

.project-admin-table {
    table-layout: fixed;
}

.project-admin-table th,
.project-admin-table td {
    padding: 0.8rem 1rem;
    vertical-align: middle;
}

.project-admin-table th:nth-child(1),
.project-admin-table td:nth-child(1) {
    width: 180px;
}

.project-admin-table th:nth-child(2),
.project-admin-table td:nth-child(2) {
    width: 92px;
    white-space: nowrap;
}

.project-admin-table th:nth-child(4),
.project-admin-table td:nth-child(4) {
    width: 96px;
    white-space: nowrap;
}

.project-admin-table th:nth-child(5),
.project-admin-table td:nth-child(5) {
    width: 96px;
    white-space: nowrap;
}

.project-admin-table th:nth-child(6),
.project-admin-table td:nth-child(6) {
    width: 148px;
}

.project-admin-table td:last-child {
    white-space: nowrap;
}

.project-admin-cell {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-admin-school,
.project-admin-name {
    color: var(--text-main);
}

.project-admin-school {
    font-weight: 600;
}

.project-admin-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.project-admin-actions .btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.8125rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.project-admin-table td:last-child .btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.project-admin-table td:last-child .btn + .btn {
    margin-left: 0.25rem;
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    word-break: keep-all;
    flex-shrink: 0;
}

.tag-primary {
    background: #e0e7ff;
    color: var(--primary-color);
}

.tag-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.tag-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.tag-outline,
.tag-light {
    border: 1px solid var(--wb-line);
    background: #ffffff;
    color: var(--wb-muted);
}

.tag-light {
    background: var(--wb-panel-soft);
}

/* Result Items */
.result-item {
    background: #ffffff;
    padding: 16px;
    border: 1px solid var(--wb-line);
    border-radius: 14px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.result-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--wb-shadow-soft);
    transform: translateY(-1px);
}

.match-card-pro {
    padding-right: 16px;
}

.match-card-pro .tag {
    min-height: 22px;
}

.match-card-actions {
    margin-top: 12px;
}

.match-school-list {
    display: grid;
    gap: 12px;
}

.match-school-card {
    border: 1px solid var(--wb-line);
    border-radius: 14px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(23, 32, 51, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.match-school-card:hover,
.match-school-card.expanded {
    border-color: rgba(36, 87, 166, 0.32);
    box-shadow: var(--wb-shadow-soft);
}

.match-school-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.match-school-title-block {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.match-school-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.match-school-title-row h4 {
    margin: 0;
    color: var(--wb-ink);
    font-size: 1rem;
    line-height: 1.35;
}

.match-school-summary-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 12px;
    color: var(--wb-muted);
    font-size: 12px;
    line-height: 1.45;
}

.match-school-summary-row span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.match-school-summary-faculty {
    max-width: min(100%, 520px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-school-summary-faculty i {
    flex: 0 0 auto;
}

.match-school-toggle {
    flex: 0 0 auto;
    white-space: nowrap;
}

.match-school-programs {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--wb-line);
    display: grid;
    gap: 12px;
}

.match-school-faculty-list {
    display: grid;
    gap: 10px;
}

.match-school-faculty-group {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: #f8fafc;
    padding: 10px;
    display: grid;
    gap: 10px;
}

.match-school-faculty-group.missing-faculty {
    border-style: dashed;
    background: #ffffff;
}

.match-school-faculty-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px 12px;
    flex-wrap: wrap;
}

.match-school-faculty-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wb-ink);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
}

.match-school-faculty-title i {
    color: var(--wb-brand);
    flex: 0 0 auto;
}

.match-school-faculty-title span {
    overflow-wrap: anywhere;
}

.match-school-faculty-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--wb-muted);
    font-size: 11px;
    font-weight: 700;
}

.match-school-faculty-meta span {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: #ffffff;
    padding: 3px 7px;
    line-height: 1.2;
}

.match-school-program-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.match-school-program-option {
    position: relative;
    max-width: min(100%, 260px);
    flex: 1 1 180px;
    display: flex;
}

.match-school-program-chip {
    appearance: none;
    border: 1px solid var(--wb-line);
    background: var(--wb-panel-soft);
    color: var(--wb-ink);
    border-radius: 8px;
    padding: 8px 40px 8px 10px;
    min-height: 40px;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.match-school-program-option.active .match-school-program-chip,
.match-school-program-chip:hover {
    border-color: rgba(36, 87, 166, 0.4);
    background: #ffffff;
}

.match-school-program-option.active .match-school-program-chip {
    border-color: var(--wb-brand);
    background: var(--wb-brand-soft);
    box-shadow: 0 0 0 2px rgba(36, 87, 166, 0.14) inset;
}

.match-school-program-option.selected .match-school-program-chip {
    border-color: rgba(20, 128, 94, 0.55);
}

.match-school-program-info-btn {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--wb-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.match-school-program-info-btn:hover {
    border-color: rgba(36, 87, 166, 0.42);
    background: #ffffff;
    color: var(--wb-brand);
}

.match-school-program-option.selected .match-school-program-info-btn {
    border-color: rgba(20, 128, 94, 0.42);
    background: rgba(240, 253, 244, 0.96);
    color: var(--success-color);
}

.match-school-program-chip > .match-school-program-name {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.match-school-program-status {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    max-width: 72px;
    overflow: hidden;
}

.match-school-program-status .tag {
    white-space: nowrap;
    max-width: 100%;
}

.match-school-program-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.match-school-program-tags em {
    font-style: normal;
    color: var(--wb-muted);
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 6px;
    padding: 2px 5px;
    font-size: 10px;
    line-height: 1.2;
}

.match-school-expand-programs {
    justify-self: start;
    border: 0;
    background: transparent;
    color: var(--wb-brand);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
}

.match-school-project-detail {
    border: 1px solid rgba(36, 87, 166, 0.16);
    border-radius: 12px;
    background: #f8fbff;
    padding: 13px;
}

.match-program-floating-panel {
    position: fixed;
    inset: 0;
    z-index: 1044;
    display: none;
    pointer-events: none;
}

.match-program-floating-panel.show {
    display: block;
}

.match-program-floating-window {
    position: absolute;
    top: 86px;
    right: 24px;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 112px);
    overflow: hidden;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(36, 87, 166, 0.18);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.match-program-floating-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #fbfdff 0%, #f8fbff 100%);
}

.match-program-floating-head span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.match-program-floating-head strong {
    display: block;
    margin-top: 4px;
    color: var(--wb-ink);
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.match-program-floating-close {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.match-program-floating-close:hover {
    color: var(--wb-brand);
    border-color: rgba(36, 87, 166, 0.42);
}

.match-program-floating-body {
    overflow-y: auto;
    padding: 14px;
}

.match-program-floating-body .match-school-project-detail {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.match-school-project-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.match-school-project-title-block {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.match-school-project-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.match-school-project-name {
    color: var(--wb-ink);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.match-school-project-faculty {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2457a6;
    background: #eef5ff;
    border: 1px solid rgba(36, 87, 166, 0.18);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.match-school-project-fit {
    margin-top: 10px;
    color: var(--wb-muted);
    font-size: 13px;
    line-height: 1.7;
}

.match-decision-reasons {
    margin: 10px 0;
    display: grid;
    gap: 8px;
}

.match-decision-reasons.compact {
    margin: 10px 0 0;
}

.match-decision-reason-group {
    border: 1px solid rgba(234, 179, 8, 0.36);
    border-radius: 8px;
    background: #fffbeb;
    padding: 10px 12px;
}

.match-decision-reason-group.hard {
    border-color: rgba(239, 68, 68, 0.28);
    background: #fff5f5;
}

.match-decision-reason-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #92400e;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
}

.match-decision-reason-group.hard .match-decision-reason-title {
    color: #b91c1c;
}

.match-decision-reason-group ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #78350f;
    font-size: 12px;
    line-height: 1.65;
}

.match-decision-reason-group.hard ul {
    color: #991b1b;
}

.match-school-project-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--wb-muted);
    font-size: 12px;
    line-height: 1.6;
}

.empty-state {
    min-height: 260px;
    padding: 32px 24px;
    border: 1px dashed var(--wb-line-strong);
    border-radius: var(--wb-radius-lg);
    background:
        linear-gradient(135deg, rgba(36, 87, 166, 0.04), transparent 60%),
        var(--wb-panel-soft);
    color: var(--wb-muted);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    text-align: center;
}

.empty-state i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--wb-brand-soft);
    color: var(--wb-brand);
    font-size: 1.25rem;
}

.empty-state strong {
    color: var(--wb-ink);
    font-size: 1rem;
}

.empty-state span {
    max-width: 34rem;
    font-size: 13px;
    line-height: 1.7;
}

/* Match Score */
.match-score {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-bottom-left-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.match-score.high {
    background: var(--success-color);
}

.match-score.med {
    background: var(--warning-color);
}

.match-score.low {
    background: var(--danger-color);
}

/* Scrollable Reports List */
#reports-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

#reports-list::-webkit-scrollbar {
    width: 6px;
}

#reports-list::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* Login Page */
.login-container {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background:
        radial-gradient(circle at 12% 18%, rgba(36, 87, 166, 0.08), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f6f8fb 48%, #eef3f8 100%);
    backdrop-filter: blur(8px);
}

.login-container::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(46vh, 420px);
    background:
        linear-gradient(to bottom, rgba(246, 248, 251, 0), rgba(246, 248, 251, 0.28) 42%, rgba(246, 248, 251, 0.72)),
        url("/static/brand/login-school-crest-layer.png") center bottom / cover no-repeat;
    opacity: 0.42;
    pointer-events: none;
    z-index: 0;
}

.login-layout {
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    gap: clamp(48px, 8vw, 96px);
    align-items: center;
    position: relative;
    z-index: 1;
}

.login-card {
    position: relative;
    background: #ffffff;
    padding: 42px;
    border: 1px solid #e4eaf2;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(23, 32, 51, 0.10);
    width: 100%;
    text-align: left;
    justify-self: end;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 520px;
    backdrop-filter: blur(10px);
}

.login-showcase {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 520px;
    color: var(--wb-ink);
}

.login-brand-row {
    display: flex;
    align-items: center;
    gap: 22px;
}

.login-brand-logo {
    width: 188px;
    max-width: 44%;
    height: auto;
    object-fit: contain;
    padding: 14px 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(203, 213, 225, 0.75);
    box-shadow: 0 22px 48px rgba(23, 32, 51, 0.08);
}

.login-product-name,
.login-product-sub {
    display: block;
}

.login-product-name {
    color: #0f172a;
    font-size: clamp(2.05rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
}

.login-product-sub {
    margin-top: 16px;
    color: #475569;
    font-size: 18px;
    line-height: 1.7;
}

.login-showcase-badge {
    display: none;
}

.login-showcase .hero-title {
    display: none;
}

.login-showcase .hero-subtitle {
    display: none;
}

.login-showcase-points {
    display: none;
}

.login-showcase-point {
    display: none;
}

.login-showcase-point strong {
    display: none;
}

.login-showcase-point span {
    display: none;
}

.login-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: 1px solid #d9e2ec;
    border-radius: 999px;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
}

.login-card-head {
    margin-bottom: 30px;
}

.login-eyebrow {
    margin: 0 0 6px;
    color: var(--wb-brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-card-head h2 {
    margin: 0;
    color: #111827;
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: 0;
}

.login-card-head p {
    margin: 8px 0 0;
    color: var(--wb-muted);
}

.login-form {
    display: grid;
    gap: 18px;
}

.input-with-leading-icon {
    position: relative;
}

.input-with-leading-icon i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wb-faint);
    pointer-events: none;
}

.input-with-leading-icon .form-control {
    min-height: 56px;
    padding-left: 40px;
    border-radius: 14px;
    background: #ffffff;
}

.login-error {
    min-height: 18px;
    color: var(--wb-red);
    font-size: 13px;
    line-height: 1.5;
}

.login-helper-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 2px;
    color: #64748b;
    font-size: 12px;
}

.login-helper-card strong {
    color: #111827;
    font-weight: 700;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-surface);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Landing / Public */
.public-nav-links {
    display: none;
    align-items: center;
    gap: 34px;
    margin-left: 56px;
    min-width: 0;
}

.public-nav-links a {
    position: relative;
    color: #172033;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
}

.public-nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -22px;
    height: 3px;
    background: #7f1738;
    opacity: 0;
    transform: translateY(3px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.public-nav-links a:hover::after {
    opacity: 1;
    transform: translateY(0);
}

body.public-mode {
    background: #ffffff;
    color: #172033;
}

body.public-mode .top-nav {
    height: 72px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 0 rgba(127, 23, 56, 0.08);
}

body.public-mode .brand-logo-full {
    width: 138px;
    height: 54px;
    object-fit: contain;
}

body.public-mode .main-content {
    padding: 0;
    padding-top: 72px;
    background: #ffffff;
}

body.public-mode .page-view {
    display: none !important;
}

body.public-mode #publicAuth {
    display: flex !important;
    align-items: center;
    gap: 12px;
}

body.public-mode #publicNavLinks {
    display: flex;
}

body:not(.public-mode) #publicHome,
body:not(.public-mode) #publicNavLinks {
    display: none !important;
}

.public-system-btn,
.public-login-btn {
    min-height: 42px;
    padding: 0.65rem 1.1rem;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.public-system-btn {
    background: #7f1738;
    border-color: #7f1738;
    color: #ffffff;
}

.public-system-btn:hover {
    background: #69112d;
    border-color: #69112d;
}

.public-login-btn {
    color: #7f1738;
    border-color: rgba(127, 23, 56, 0.38);
}

.login-submit {
    background: #7f1738;
    border-color: #7f1738;
}

.login-submit:hover {
    background: #69112d;
    border-color: #69112d;
}

.official-home {
    background: #ffffff;
    color: #172033;
    overflow: hidden;
}

.official-home a {
    color: inherit;
}

.official-home .btn,
body.public-mode .top-nav .btn {
    text-decoration: none;
}

.official-home .btn-primary,
body.public-mode .top-nav .btn-primary {
    color: #ffffff;
}

.official-hero {
    position: relative;
    min-height: calc(100vh - 72px);
    padding: 48px 48px 30px;
    display: flex;
    align-items: stretch;
    background:
        linear-gradient(180deg, rgba(255,255,255,0) 62%, #ffffff 100%),
        url("/static/brand/login-school-crest-layer.png") center bottom / cover no-repeat,
        #ffffff;
}

.official-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.9) 44%, rgba(255,255,255,0.68) 100%);
    pointer-events: none;
}

.official-hero-content {
    position: relative;
    z-index: 1;
    width: min(1480px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(620px, 1.1fr);
    gap: 54px;
    align-items: center;
}

.official-hero-copy {
    min-width: 0;
    padding-bottom: 42px;
}

.official-hero-title {
    margin: 0;
    color: #7f1738;
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    font-size: 64px;
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: 0;
}

.official-hero-subtitle {
    margin: 22px 0 0;
    max-width: 760px;
    color: #293449;
    font-size: 21px;
    line-height: 1.85;
    font-weight: 500;
}

.official-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 44px;
}

.official-primary-action,
.official-secondary-action {
    min-height: 58px;
    min-width: 210px;
    border-radius: 6px;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
}

.official-primary-action {
    background: #7f1738;
    border-color: #7f1738;
}

.official-primary-action:hover {
    background: #69112d;
    border-color: #69112d;
}

.official-secondary-action {
    color: #7f1738;
    border-color: rgba(127, 23, 56, 0.4);
    background: rgba(255, 255, 255, 0.82);
}

.official-proof-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-top: 44px;
}

.official-proof-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
}

.official-proof-item i,
.official-flow-step i,
.official-capability-strip i {
    color: #7f1738;
    font-size: 25px;
    line-height: 1;
}

.official-proof-item strong,
.official-proof-item span {
    display: block;
}

.official-proof-item strong {
    color: #7f1738;
    font-size: 15px;
    line-height: 1.35;
}

.official-proof-item span {
    margin-top: 4px;
    color: #526074;
    font-size: 13px;
    line-height: 1.55;
}

.official-product-preview {
    min-width: 0;
}

.official-system-entry {
    display: flex;
    align-items: center;
}

.official-entry-panel {
    width: 100%;
    padding: 34px;
    border: 1px solid rgba(127, 23, 56, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 32px 72px rgba(23, 32, 51, 0.14);
}

.official-entry-head {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.official-entry-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    background: #7f1738;
    color: #ffffff;
    font-size: 25px;
}

.official-entry-head strong,
.official-entry-head span {
    display: block;
}

.official-entry-head strong {
    color: #172033;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 900;
}

.official-entry-head span {
    margin-top: 8px;
    color: #526074;
    font-size: 14px;
    line-height: 1.7;
}

.official-entry-action {
    width: 100%;
    min-height: 54px;
    margin-top: 26px;
    justify-content: center;
    border-radius: 6px;
    background: #7f1738;
    border-color: #7f1738;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 900;
}

.official-entry-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 26px;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 8px;
    overflow: hidden;
}

.official-entry-stats div {
    min-height: 104px;
    padding: 20px 18px;
    border-right: 1px solid rgba(203, 213, 225, 0.82);
    background: #fbfcfd;
}

.official-entry-stats div:last-child {
    border-right: 0;
}

.official-entry-stats strong,
.official-entry-stats span {
    display: block;
}

.official-entry-stats strong {
    color: #7f1738;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 900;
}

.official-entry-stats span {
    margin-top: 8px;
    color: #526074;
    font-size: 13px;
    font-weight: 800;
}

.official-entry-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.official-entry-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(127, 23, 56, 0.24);
    border-radius: 6px;
    color: #7f1738 !important;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.official-entry-panel p {
    margin: 20px 0 0;
    color: #526074;
    font-size: 13px;
    line-height: 1.75;
}

.official-preview-shell {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: 510px;
    border: 1px solid rgba(127, 23, 56, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 32px 72px rgba(23, 32, 51, 0.14);
    overflow: hidden;
}

.official-preview-sidebar {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 18px 14px;
    color: #d7dee9;
    background: linear-gradient(180deg, #1b2a3d 0%, #0f1d2f 100%);
}

.official-preview-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.official-preview-brand img {
    width: 24px;
    height: 24px;
}

.official-preview-sidebar span {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.official-preview-sidebar span.active {
    background: #7f1738;
    color: #ffffff;
}

.official-preview-main {
    min-width: 0;
    padding: 20px;
    background: #f8fafc;
}

.official-preview-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    color: #172033;
}

.official-preview-top strong {
    font-size: 17px;
}

.official-preview-top span {
    color: #64748b;
    font-size: 13px;
}

.official-preview-grid {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 14px;
}

.official-student-card,
.official-result-card,
.official-preview-bottom span,
.official-flow-step,
.official-case-grid article {
    border: 1px solid rgba(203, 213, 225, 0.82);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(23, 32, 51, 0.06);
}

.official-student-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.official-mini-label,
.official-result-card span,
.official-case-grid span {
    color: #7f1738;
    font-size: 12px;
    font-weight: 900;
}

.official-student-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.official-student-card dl div {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
}

.official-student-card dt,
.official-student-card dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

.official-student-card dt {
    color: #64748b;
}

.official-student-card dd {
    color: #172033;
    font-weight: 800;
}

.official-result-list {
    display: grid;
    gap: 12px;
}

.official-result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 102px;
    padding: 16px 18px;
    border-left-width: 4px;
}

.official-result-card.rush {
    border-left-color: #7f1738;
}

.official-result-card.match {
    border-left-color: #9f7d35;
}

.official-result-card.stable {
    border-left-color: #6d8f82;
}

.official-result-card strong,
.official-result-card em {
    display: block;
}

.official-result-card strong {
    margin-top: 6px;
    color: #172033;
    font-size: 18px;
    line-height: 1.25;
}

.official-result-card em {
    margin-top: 6px;
    color: #14805e;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.official-preview-bottom {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.official-preview-bottom span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 58px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.official-preview-bottom i {
    color: #7f1738;
    font-size: 18px;
}

.official-capability-strip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    max-width: 1380px;
    margin: -2px auto 0;
    padding: 22px 28px;
    border-top: 1px solid rgba(127, 23, 56, 0.12);
    border-bottom: 1px solid rgba(127, 23, 56, 0.12);
    background: rgba(255, 255, 255, 0.96);
}

.official-capability-strip div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 12px;
    padding: 0 18px;
    border-right: 1px solid rgba(127, 23, 56, 0.12);
}

.official-capability-strip div:last-child {
    border-right: 0;
}

.official-capability-strip strong,
.official-capability-strip span {
    display: block;
    min-width: 0;
}

.official-capability-strip strong {
    color: #172033;
    font-size: 14px;
    line-height: 1.35;
}

.official-capability-strip span {
    grid-column: 2;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
    margin-top: 3px;
}

.official-section {
    max-width: 1380px;
    margin: 0 auto;
    padding: 54px 48px;
    scroll-margin-top: 86px;
}

.official-section-heading {
    max-width: 720px;
    margin: 0 auto 30px;
    text-align: center;
}

.official-section h2,
.official-section-heading h2 {
    margin: 0;
    color: #172033;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: 0;
}

.official-section p,
.official-section-heading p {
    margin: 12px 0 0;
    color: #526074;
    font-size: 16px;
    line-height: 1.75;
}

.official-flow {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
}

.official-flow-step {
    position: relative;
    min-height: 156px;
    padding: 22px;
    text-align: left;
}

.official-flow-step strong,
.official-flow-step span {
    display: block;
}

.official-flow-step strong {
    margin-top: 18px;
    color: #172033;
    font-size: 16px;
}

.official-flow-step span {
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.official-data-section {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(520px, 1.2fr);
    gap: 48px;
    align-items: center;
    border-top: 1px solid rgba(127, 23, 56, 0.1);
}

.official-data-copy h2 {
    max-width: 460px;
}

.official-data-copy .btn {
    margin-top: 24px;
    color: #7f1738;
    border-color: rgba(127, 23, 56, 0.38);
}

.official-data-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.official-data-metrics div {
    min-height: 138px;
    padding: 24px 20px;
    border-left: 1px solid rgba(127, 23, 56, 0.14);
}

.official-data-metrics strong {
    display: block;
    color: #7f1738;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 900;
}

.official-data-metrics span {
    display: block;
    margin-top: 10px;
    color: #526074;
    font-size: 14px;
    line-height: 1.55;
}

.official-case-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.official-case-grid article {
    min-height: 150px;
    padding: 24px;
}

.official-case-grid strong {
    display: block;
    margin-top: 12px;
    color: #172033;
    font-size: 18px;
    line-height: 1.55;
}

.official-case-grid em {
    display: block;
    margin-top: 18px;
    color: #7f1738;
    font-size: 28px;
    font-style: normal;
    font-weight: 900;
}

.official-library-section {
    border-top: 1px solid rgba(127, 23, 56, 0.1);
}

.official-library-panel {
    border: 1px solid rgba(203, 213, 225, 0.84);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(23, 32, 51, 0.07);
    overflow: hidden;
}

.official-library-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid rgba(203, 213, 225, 0.72);
    background: #fbfcfd;
}

.official-library-summary span {
    min-height: 84px;
    padding: 20px 24px;
    color: #526074;
    font-size: 14px;
    font-weight: 800;
    border-right: 1px solid rgba(203, 213, 225, 0.72);
}

.official-library-summary span:last-child {
    border-right: 0;
}

.official-library-summary strong {
    display: block;
    color: #7f1738;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 900;
}

.official-library-tabs {
    display: flex;
    gap: 10px;
    padding: 18px 24px 0;
}

.official-library-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(127, 23, 56, 0.22);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #ffffff;
    color: #526074;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.official-library-tabs button.active {
    background: #7f1738;
    border-color: #7f1738;
    color: #ffffff;
}

.official-library-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 190px 190px;
    gap: 14px;
    padding: 18px 24px;
    border-top: 1px solid rgba(127, 23, 56, 0.12);
    border-bottom: 1px solid rgba(203, 213, 225, 0.72);
    background: #ffffff;
}

.official-library-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 6px;
    background: #ffffff;
    color: #7f1738;
}

.official-library-search input,
.official-library-toolbar select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #172033;
    font-size: 14px;
    font-weight: 700;
}

.official-library-toolbar select {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
}

.official-library-status {
    padding: 16px 24px 0;
    color: #526074;
    font-size: 14px;
    line-height: 1.6;
}

.official-library-status strong {
    color: #7f1738;
}

.official-program-breadcrumb {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 8px;
    background: #fbfcfd;
}

.official-program-breadcrumb button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(127, 23, 56, 0.28);
    border-radius: 6px;
    background: #ffffff;
    color: #7f1738;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.official-program-breadcrumb div {
    min-width: 0;
    text-align: right;
}

.official-program-breadcrumb span,
.official-program-breadcrumb strong,
.official-program-breadcrumb em {
    display: block;
}

.official-program-breadcrumb span {
    color: #7f1738;
    font-size: 12px;
    font-weight: 900;
}

.official-program-breadcrumb strong {
    margin-top: 3px;
    color: #172033;
    font-size: 18px;
    line-height: 1.35;
}

.official-program-breadcrumb em {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.official-library-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 18px 24px 24px;
}

.official-library-card {
    display: flex;
    min-width: 0;
    min-height: 310px;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(23, 32, 51, 0.05);
}

.official-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.official-card-topline span,
.official-card-topline em,
.official-card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.official-card-topline span {
    color: #7f1738;
}

.official-card-topline em {
    padding: 0 9px;
    background: rgba(127, 23, 56, 0.08);
    color: #7f1738;
    font-style: normal;
    white-space: nowrap;
}

.official-library-card strong {
    color: #172033;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 900;
}

.official-library-card p {
    margin: 0;
    color: #526074;
    font-size: 13px;
    line-height: 1.7;
}

.official-card-en {
    min-height: 22px;
    color: #7a8597 !important;
}

.official-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.official-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 999px;
    color: #526074;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.official-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.official-card-tags span {
    padding: 0 9px;
    background: #f4f7fb;
    color: #526074;
}

.official-card-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.official-card-list li {
    position: relative;
    padding-left: 14px;
    color: #526074;
    font-size: 13px;
    line-height: 1.5;
}

.official-card-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #7f1738;
}

.official-card-foot {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.official-card-foot > span {
    display: -webkit-box;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.official-card-foot i {
    margin-right: 5px;
    color: #7f1738;
}

.official-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: fit-content;
    min-height: 36px;
    margin-top: auto;
    padding: 0 12px;
    border: 1px solid rgba(127, 23, 56, 0.32);
    border-radius: 6px;
    background: #ffffff;
    color: #7f1738 !important;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.official-card-link:hover {
    border-color: #7f1738;
    background: rgba(127, 23, 56, 0.06);
}

.official-outcome.success {
    color: #0f7a4c;
}

.official-outcome.failed {
    color: #a33a28;
}

.official-library-empty,
.official-library-loading {
    grid-column: 1 / -1;
    min-height: 180px;
    justify-content: center;
}

.official-library-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 24px 24px;
}

.official-pagination-nav,
.official-pagination-pages,
.official-pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
}

.official-library-pagination button,
.official-pagination-jump input {
    min-height: 36px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 6px;
    background: #ffffff;
    color: #172033;
    font-size: 13px;
    font-weight: 900;
}

.official-library-pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 38px;
    padding: 0 11px;
    cursor: pointer;
}

.official-library-pagination button.active {
    border-color: #7f1738;
    background: #7f1738;
    color: #ffffff;
}

.official-library-pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.official-pagination-gap {
    min-width: 18px;
    color: #64748b;
    text-align: center;
}

.official-pagination-jump {
    color: #526074;
    font-size: 13px;
    font-weight: 800;
}

.official-pagination-jump input {
    width: 72px;
    padding: 0 8px;
    text-align: center;
}

.official-pagination-jump button {
    border-color: rgba(127, 23, 56, 0.32);
    color: #7f1738;
}

.official-footer {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) repeat(3, minmax(160px, 1fr));
    gap: 42px;
    padding: 42px 48px;
    border-top: 1px solid rgba(127, 23, 56, 0.12);
    background: #fbfcfd;
}

.official-footer img {
    width: 148px;
    max-width: 100%;
    height: auto;
}

.official-footer p {
    margin: 14px 0 0;
    color: #526074;
    font-size: 14px;
    line-height: 1.8;
}

.official-footer strong,
.official-footer a,
.official-footer span {
    display: block;
}

.official-footer strong {
    margin-bottom: 12px;
    color: #172033;
    font-size: 15px;
}

.official-footer a,
.official-footer span {
    margin-top: 8px;
    color: #526074;
    font-size: 13px;
    line-height: 1.55;
    text-decoration: none;
}

.official-footer a:hover {
    color: #7f1738;
}

.official-footer::after {
    content: "© 2026 毓华留学选校系统 版权所有";
    grid-column: 1 / -1;
    margin: 10px -48px -42px;
    padding: 20px 48px;
    background: linear-gradient(90deg, #6a122e 0%, #8a1c3e 52%, #63122c 100%);
    color: #ffffff;
    font-size: 13px;
    text-align: center;
}

.hero-section {
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* QS Ranking & Selection */
.result-item {
    position: relative;
    padding-right: 90px;
}

/* Space for badge/button */
.qs-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-bottom-left-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-select {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-select:hover {
    background: #eef2ff;
    transform: translateY(-2px);
}

.btn-select.selected {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.result-item.selected {
    border: 2px solid var(--primary-color);
    background: rgba(36, 87, 166, 0.08);
}

.selection-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 999;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Secondary Filter */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 36px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.input-with-icon input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(36, 87, 166, 0.14);
}

/* Consultant Selection Mode */
.selected-card {
    border: 2px solid var(--success-color) !important;
    background-color: rgba(16, 185, 129, 0.1) !important;
    /* light green */
}

.selection-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    /* Beside score? Score is top right. */
    right: 80px;
    /* offset from score */
    z-index: 5;
    cursor: pointer;
    transition: transform 0.2s;
}

button.selection-indicator {
    border: 0;
    background: transparent;
    padding: 0;
    line-height: 1;
}

.selection-indicator:hover {
    transform: scale(1.1);
}

.result-item {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.workbench-result-col .result-item {
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.workbench-result-col .result-item:hover {
    border-color: rgba(36, 87, 166, 0.36);
    box-shadow: 0 14px 28px rgba(36, 87, 166, 0.12);
    transform: translateY(-2px);
}

.selected-card {
    border-color: var(--primary-color) !important;
    background: rgba(36, 87, 166, 0.08) !important;
    box-shadow: 0 0 0 2px var(--primary-color) inset !important;
}

.workbench-results .result-item {
    padding: 16px;
    padding-right: 16px;
    border-color: var(--wb-line);
    box-shadow: 0 8px 20px rgba(23, 32, 51, 0.04);
}

.workbench-results .result-item:hover {
    border-color: rgba(36, 87, 166, 0.36);
    box-shadow: var(--wb-shadow-soft);
}

.workbench-results .selected-card {
    border-color: var(--wb-brand) !important;
    background: #f2f7ff !important;
    box-shadow: 0 0 0 2px rgba(36, 87, 166, 0.18) inset !important;
}

.workbench-results .selection-indicator {
    top: 14px;
    right: 14px;
}

/* --- Toast Notifications (Premium) --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* Allow clicks through container */
}

.toast-message {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--primary-color);
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    font-size: 0.95rem;
    
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.toast-message.success {
    border-left-color: var(--success-color);
}

.toast-message.error {
    border-left-color: var(--danger-color);
}

.toast-message.warning {
    border-left-color: var(--warning-color);
}

.toast-message.info {
    border-left-color: var(--primary-color);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-message.success .toast-icon {
    color: var(--success-color);
}

.toast-message.error .toast-icon {
    color: var(--danger-color);
}

.toast-message.warning .toast-icon {
    color: var(--warning-color);
}

.toast-message.info .toast-icon {
    color: var(--primary-color);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}


/* --- Mobile Responsive (Pillar 4) --- */

#mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    margin-right: 15px;
}

@media (max-width: 1024px) {
    .workbench-grid {
        grid-template-columns: 1fr !important;
        height: auto;
        min-height: 0;
        overflow: visible;
    }
    .workbench-profile-panel,
    .workbench-results {
        height: auto;
        max-height: none;
    }
    #page-workbench .workbench-grid {
        height: auto;
        min-height: 0;
        overflow: visible;
    }
    #page-workbench .workbench-profile-panel,
    #page-workbench .workbench-results {
        height: auto;
        max-height: none;
    }
    #page-workbench .result-col {
        height: auto;
    }
    #resultsTiered {
        max-height: 62vh;
    }
    #page-workbench #resultsTiered {
        overflow-y: auto;
    }
    .match-school-program-option {
        flex-basis: 210px;
    }
    #adminDashboardGrid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .results-section {
        grid-template-columns: 1fr !important;
    }
    .results-section > .result-col {
        max-height: min(56vh, 460px);
        min-height: 320px;
    }
    #resultsOfficial,
    #resultsInternal {
        flex: 1 1 auto;
        max-height: none;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }
    .app-container {
        overflow-x: hidden;
    }
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
        padding: 1rem !important;
        padding-top: calc(var(--header-height) + 1rem) !important;
    }
    .top-nav {
        left: 0 !important;
        padding: 0 1rem;
    }
    
    body:not(.public-mode) #mobile-menu-btn {
        display: inline-block;
    }

    #desktopSidebarToggle {
        display: none !important;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .custom-table {
        min-width: 700px;
    }
    
    #adminDashboardGrid {
        grid-template-columns: 1fr !important;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch !important;
    }
    .filter-bar input, .filter-bar select {
        width: 100% !important;
    }
    
    .card {
        padding: 1rem;
    }

    .login-container {
        padding: 24px;
    }

    .login-layout {
        width: min(520px, 100%);
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .login-showcase {
        order: 1;
        min-height: auto;
        padding: 0 8px;
        align-items: center;
        text-align: center;
    }

    .login-brand-row {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 14px;
    }

    .login-brand-logo {
        width: 120px;
        max-width: none;
        border-radius: 18px;
    }

    .login-product-name {
        font-size: 1.65rem;
    }

    .login-product-sub {
        margin-top: 8px;
        font-size: 14px;
    }

    .login-showcase-points {
        display: none;
    }

    .login-card {
        order: 2;
        justify-self: stretch;
        min-height: auto;
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .workbench-intro,
    .workbench-panel-head,
    .workbench-results-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .workbench-intro-steps {
        justify-content: flex-start;
    }

    .workbench-two-col,
    .workbench-ai-actions {
        grid-template-columns: 1fr;
    }

    .match-school-card-head,
    .match-school-project-detail-head {
        align-items: stretch;
        flex-direction: column;
    }

    .match-school-toggle,
    .match-school-project-detail-head .btn {
        width: 100%;
        justify-content: center;
    }

    .match-school-program-option {
        max-width: none;
        flex-basis: 100%;
    }

    .hero-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 520px) {
    .workbench-intro,
    .workbench-profile-panel,
    .workbench-results,
    .workbench-plan-bar {
        border-radius: 14px;
        padding: 14px;
    }

    .workbench-segment {
        width: 100%;
    }

    .workbench-segment .btn {
        flex: 1;
    }

    .match-school-card {
        padding: 12px;
        border-radius: 12px;
    }

    .match-school-summary-row {
        gap: 6px 10px;
    }

    .match-school-faculty-head {
        display: grid;
        justify-content: stretch;
    }

    .match-school-program-list {
        gap: 7px;
    }

    .match-school-program-chip {
        min-height: 44px;
        padding: 8px;
        padding-right: 38px;
    }

    .match-school-project-detail {
        padding: 11px;
    }

    .match-program-floating-window {
        left: 12px;
        right: 12px;
        top: auto;
        bottom: 12px;
        width: auto;
        max-height: min(78vh, 640px);
    }

    .match-school-project-badges .tag {
        white-space: normal;
        line-height: 1.25;
    }

    .login-showcase {
        display: flex;
    }

    .login-layout {
        width: 100%;
        gap: 18px;
    }

    .login-container {
        padding: 16px;
    }

    .login-brand-logo {
        width: 96px;
        padding: 9px 10px;
    }

    .login-product-name {
        font-size: 1.35rem;
    }

    .login-product-sub {
        font-size: 13px;
    }

    .login-card {
        padding: 1.6rem 1.15rem;
        border-radius: 20px;
    }

    .login-card-head h2 {
        font-size: 1.65rem;
    }
}

@media (max-width: 1180px) {
    body.public-mode #publicNavLinks {
        display: none;
    }

    .official-hero {
        min-height: auto;
        padding: 42px 28px 26px;
    }

    .official-hero-content,
    .official-data-section {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .official-hero-title {
        font-size: 52px;
    }

    .official-product-preview {
        max-width: 900px;
    }

    .official-system-entry {
        width: 100%;
    }

    .official-capability-strip,
    .official-flow,
    .official-data-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .official-library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .official-library-toolbar {
        grid-template-columns: minmax(0, 1fr) 180px 180px;
    }

    .official-capability-strip div {
        border-right: 0;
        border-bottom: 1px solid rgba(127, 23, 56, 0.12);
        padding: 16px 18px;
    }

    .official-capability-strip div:nth-last-child(-n+2) {
        border-bottom: 0;
    }
}

@media (max-width: 768px) {
    body.public-mode .main-content {
        padding: 0 !important;
        padding-top: 72px !important;
    }

    body.public-mode .top-nav {
        min-width: 0;
        gap: 10px;
        padding: 0 14px;
    }

    body.public-mode .brand-logo-full {
        width: 126px;
    }

    body.public-mode #publicAuth {
        gap: 8px;
        margin-left: auto;
    }

    .public-system-btn,
    .public-login-btn {
        min-height: 38px;
        padding: 0.52rem 0.68rem;
        font-size: 12px;
    }

    .public-login-btn {
        display: none;
    }

    .official-hero {
        padding: 34px 18px 22px;
    }

    .official-hero-content {
        gap: 26px;
    }

    .official-hero-copy {
        padding-bottom: 10px;
    }

    .official-hero-title {
        font-size: 40px;
        line-height: 1.16;
    }

    .official-hero-subtitle {
        font-size: 17px;
        line-height: 1.75;
    }

    .official-hero-actions {
        margin-top: 28px;
    }

    .official-primary-action,
    .official-secondary-action {
        width: 100%;
        min-width: 0;
        min-height: 50px;
    }

    .official-proof-row,
    .official-entry-stats,
    .official-entry-links,
    .official-preview-grid,
    .official-preview-bottom,
    .official-capability-strip,
    .official-flow,
    .official-data-metrics,
    .official-library-summary,
    .official-library-toolbar,
    .official-library-grid,
    .official-case-grid,
    .official-footer {
        grid-template-columns: 1fr;
    }

    .official-preview-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .official-preview-sidebar {
        display: none;
    }

    .official-preview-main {
        padding: 14px;
    }

    .official-entry-panel {
        padding: 22px;
    }

    .official-entry-head {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .official-entry-icon {
        width: 44px;
        height: 44px;
        font-size: 21px;
    }

    .official-entry-head strong {
        font-size: 20px;
    }

    .official-entry-stats div {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(203, 213, 225, 0.82);
    }

    .official-entry-stats div:last-child {
        border-bottom: 0;
    }

    .official-result-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .official-result-card .btn,
    .official-student-card .btn {
        width: 100%;
        justify-content: center;
    }

    .official-capability-strip {
        margin-top: 0;
        padding: 8px 18px;
    }

    .official-capability-strip div,
    .official-capability-strip div:nth-last-child(-n+2) {
        border-right: 0;
        border-bottom: 1px solid rgba(127, 23, 56, 0.12);
        padding: 16px 0;
    }

    .official-capability-strip div:last-child {
        border-bottom: 0;
    }

    .official-section {
        padding: 42px 18px;
    }

    .official-section h2,
    .official-section-heading h2 {
        font-size: 26px;
    }

    .official-data-section {
        gap: 22px;
    }

    .official-data-metrics div {
        min-height: 0;
        padding: 20px 0;
        border-left: 0;
        border-top: 1px solid rgba(127, 23, 56, 0.12);
    }

    .official-library-summary span {
        min-height: 0;
        padding: 18px;
        border-right: 0;
        border-bottom: 1px solid rgba(203, 213, 225, 0.72);
    }

    .official-library-summary span:last-child {
        border-bottom: 0;
    }

    .official-library-tabs {
        overflow-x: auto;
        padding: 14px 14px 0;
    }

    .official-library-tabs button {
        flex: 0 0 auto;
    }

    .official-library-toolbar,
    .official-library-grid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .official-library-card {
        min-height: 0;
        padding: 18px;
    }

    .official-program-breadcrumb {
        align-items: flex-start;
        flex-direction: column;
    }

    .official-program-breadcrumb div {
        text-align: left;
    }

    .official-card-link {
        width: 100%;
    }

    .official-library-pagination {
        align-items: stretch;
        flex-direction: column;
        padding: 0 14px 22px;
    }

    .official-pagination-nav {
        justify-content: space-between;
        width: 100%;
    }

    .official-pagination-pages {
        justify-content: center;
        flex: 1;
        min-width: 0;
    }

    .official-pagination-pages button:nth-of-type(n+4):not(.active) {
        display: none;
    }

    .official-pagination-jump {
        justify-content: space-between;
        width: 100%;
    }

    .official-pagination-jump input {
        flex: 1;
        width: auto;
    }

    .official-footer {
        padding: 34px 18px;
    }

    .official-footer::after {
        margin: 0 -18px -34px;
        padding: 18px;
    }
}

/* Backdrop for mobile sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 45;
    display: none;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.show {
    display: block;
}
