:root {
    --portal-navy: #102f50;
    --portal-navy-dark: #0b223a;
    --portal-teal: #047b7b;
    --portal-orange: #f97316;
    --portal-orange-dark: #d95d0b;
    --portal-ink: #152133;
    --portal-muted: #667085;
    --portal-line: #e6eaf0;
    --portal-surface: #f7f9fc;
    --portal-soft-blue: #eff6ff;
    --portal-soft-orange: #fff7ed;
    --portal-radius: 18px;
    --portal-shadow: 0 14px 40px rgba(16, 47, 80, 0.08);
}

.portal-body {
    background: #fff;
    color: var(--portal-ink);
    font-family: Inter, sans-serif;
}

.portal-header-search {
    align-items: center;
    background: #f5f7fa;
    border: 1px solid #e5e9ef;
    border-radius: 10px;
    display: flex;
    max-width: 450px;
    min-width: 280px;
    overflow: hidden;
    width: 100%;
}

.portal-header-search > i {
    color: #7a8594;
    margin-left: 13px;
}

.portal-header-search input {
    background: transparent;
    border: 0;
    flex: 1;
    font-size: 0.86rem;
    min-width: 0;
    outline: 0;
    padding: 11px 10px;
}

.portal-header-search button {
    background: var(--portal-orange);
    border: 0;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 11px 16px;
}

.portal-user-button {
    align-items: center;
    background: #fff;
    border: 1px solid #dce2ea;
    border-radius: 999px;
    color: var(--portal-navy);
    display: flex;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 7px;
    padding: 4px 10px 4px 5px;
}

.portal-avatar {
    align-items: center;
    background: linear-gradient(135deg, #0e8190, #102f50);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    height: 33px;
    justify-content: center;
    width: 33px;
}

.portal-user-menu {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(16, 47, 80, 0.16);
    min-width: 230px;
    padding: 8px;
}

.portal-user-menu .dropdown-item {
    border-radius: 9px;
    display: flex;
    gap: 9px;
    padding: 10px 12px;
}

.portal-page-hero {
    background: linear-gradient(135deg, #eef6ff 0%, #fff 50%, #fff5ec 100%);
    border-bottom: 1px solid #edf0f4;
    overflow: hidden;
    padding: 60px 0 52px;
    position: relative;
}

.portal-page-hero::after {
    background: radial-gradient(circle, rgba(249, 115, 22, 0.13), transparent 67%);
    border-radius: 50%;
    content: '';
    height: 360px;
    position: absolute;
    right: -90px;
    top: -150px;
    width: 360px;
}

.portal-page-hero .container {
    position: relative;
    z-index: 2;
}

.portal-page-hero h1 {
    color: var(--portal-navy-dark);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.06;
    margin-bottom: 13px;
}

.portal-page-hero p {
    color: #5f6b7a;
    font-size: 1.03rem;
    line-height: 1.75;
    margin: 0;
    max-width: 740px;
}

.portal-page-kicker {
    color: var(--portal-orange-dark);
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.portal-page-plane {
    bottom: -12px;
    max-width: 180px;
    opacity: 0.92;
    pointer-events: none;
    position: absolute;
    right: 7%;
    transform: rotate(-3deg);
    width: 18vw;
    animation: portalPlaneFloat 4.8s ease-in-out infinite;
}

@keyframes portalPlaneFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.portal-section {
    padding: 56px 0;
}

.portal-panel {
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
}

.portal-filter-card {
    position: sticky;
    top: 116px;
}

.portal-filter-head {
    align-items: center;
    border-bottom: 1px solid var(--portal-line);
    display: flex;
    justify-content: space-between;
    padding: 17px 18px;
}

.portal-filter-head h2 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.portal-filter-group {
    border-bottom: 1px solid #eef1f5;
    padding: 17px 18px;
}

.portal-filter-group:last-child {
    border-bottom: 0;
}

.portal-filter-group label:first-child,
.portal-filter-label {
    color: #243247;
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.portal-form-control,
.portal-form-select {
    background-color: #fff;
    border: 1px solid #dce2ea;
    border-radius: 9px;
    color: var(--portal-ink);
    font-size: 0.84rem;
    min-height: 42px;
    padding: 8px 11px;
    width: 100%;
}

.portal-form-control:focus,
.portal-form-select:focus {
    border-color: #9db8d8;
    box-shadow: 0 0 0 3px rgba(16, 47, 80, 0.08);
    outline: 0;
}

.portal-results-toolbar {
    align-items: center;
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px 14px;
}

.portal-results-toolbar h2 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.portal-college-card {
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: 16px;
    box-shadow: 0 7px 24px rgba(16, 47, 80, 0.05);
    margin-bottom: 14px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.portal-college-card:hover {
    box-shadow: 0 14px 35px rgba(16, 47, 80, 0.1);
    transform: translateY(-2px);
}

.portal-college-main {
    display: grid;
    gap: 16px;
    grid-template-columns: 74px 1fr auto;
    padding: 18px;
}

.portal-college-logo {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #edf0f4;
    border-radius: 13px;
    display: flex;
    height: 68px;
    justify-content: center;
    overflow: hidden;
    width: 68px;
}

.portal-college-logo img {
    height: 100%;
    object-fit: contain;
    padding: 6px;
    width: 100%;
}

.portal-college-logo .fallback {
    color: var(--portal-navy);
    font-size: 1.2rem;
    font-weight: 800;
}

.portal-college-title {
    color: #152033;
    font-size: 1.05rem;
    font-weight: 800;
    margin: 1px 0 5px;
    text-decoration: none;
}

.portal-college-title:hover {
    color: var(--portal-orange-dark);
}

.portal-meta-row {
    align-items: center;
    color: #667085;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.77rem;
    gap: 7px 11px;
}

.portal-rating {
    align-items: center;
    background: #fff7e7;
    border-radius: 999px;
    color: #875500;
    display: inline-flex;
    font-size: 0.73rem;
    font-weight: 800;
    gap: 4px;
    padding: 4px 8px;
}

.portal-college-facts {
    border-top: 1px solid #eef1f5;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-fact {
    border-right: 1px solid #eef1f5;
    min-height: 77px;
    padding: 13px 16px;
}

.portal-fact:last-child {
    border-right: 0;
}

.portal-fact span {
    color: #8a94a3;
    display: block;
    font-size: 0.68rem;
    margin-bottom: 4px;
}

.portal-fact strong {
    color: #22314a;
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
}

.portal-college-actions {
    align-items: center;
    border-top: 1px solid #eef1f5;
    display: flex;
    gap: 9px;
    justify-content: flex-end;
    padding: 12px 16px;
}

.portal-outline-btn,
.portal-primary-btn,
.portal-soft-btn {
    align-items: center;
    border-radius: 9px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    gap: 6px;
    justify-content: center;
    min-height: 39px;
    padding: 8px 14px;
    text-decoration: none;
}

.portal-outline-btn {
    background: #fff;
    border: 1px solid #9eb0c5;
    color: var(--portal-navy);
}

.portal-primary-btn {
    background: var(--portal-orange);
    border: 1px solid var(--portal-orange);
    color: #fff;
}

.portal-primary-btn:hover {
    background: var(--portal-orange-dark);
    color: #fff;
}

.portal-soft-btn {
    background: var(--portal-soft-blue);
    border: 1px solid #dbeafe;
    color: var(--portal-navy);
}

.portal-compare-bar {
    background: #0f2945;
    border-radius: 14px 14px 0 0;
    bottom: 0;
    box-shadow: 0 -10px 35px rgba(0, 0, 0, .16);
    color: #fff;
    left: 50%;
    max-width: 820px;
    padding: 11px 16px;
    position: fixed;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    z-index: 1050;
}

.portal-empty {
    align-items: center;
    background: #fff;
    border: 1px dashed #ccd5df;
    border-radius: 16px;
    color: #687386;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.portal-empty i {
    color: var(--portal-orange);
    font-size: 2rem;
    margin-bottom: 10px;
}

.portal-detail-hero {
    background: linear-gradient(135deg, #0f2f50 0%, #174b68 100%);
    color: #fff;
    overflow: hidden;
    padding: 54px 0 46px;
    position: relative;
}

.portal-detail-hero::after {
    background: radial-gradient(circle, rgba(249,115,22,.3), transparent 65%);
    content: '';
    height: 360px;
    position: absolute;
    right: -100px;
    top: -160px;
    width: 360px;
}

.portal-detail-logo {
    background: #fff;
    border-radius: 18px;
    display: flex;
    height: 104px;
    justify-content: center;
    overflow: hidden;
    padding: 9px;
    width: 104px;
}

.portal-detail-logo img { height: 100%; object-fit: contain; width: 100%; }

.portal-detail-hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -.035em;
}

.portal-detail-tabs {
    background: #fff;
    border-bottom: 1px solid var(--portal-line);
    position: sticky;
    top: 87px;
    z-index: 20;
}

.portal-detail-tabs .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
}

.portal-detail-tabs a {
    color: #516071;
    flex: 0 0 auto;
    font-size: .8rem;
    font-weight: 700;
    padding: 14px 14px;
    text-decoration: none;
}

.portal-content-card {
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: 16px;
    margin-bottom: 18px;
    padding: 22px;
}

.portal-content-card h2 {
    color: var(--portal-navy-dark);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.portal-info-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0,1fr));
}

.portal-info-tile {
    background: #f8fafc;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    padding: 14px;
}

.portal-info-tile span { color: #7b8795; display: block; font-size: .7rem; }
.portal-info-tile strong { color: #1e2b3e; font-size: .86rem; }

.portal-table {
    margin: 0;
}

.portal-table th {
    background: #f7f9fc;
    color: #536174;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.portal-table td {
    color: #344054;
    font-size: .78rem;
    vertical-align: middle;
}

.portal-auth-shell {
    background: linear-gradient(135deg, #eff7ff, #fff7ed);
    min-height: 70vh;
    padding: 60px 0;
}

.portal-auth-card {
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: 22px;
    box-shadow: 0 25px 70px rgba(16, 47, 80, .12);
    margin: auto;
    max-width: 980px;
    overflow: hidden;
}

.portal-auth-art {
    background: linear-gradient(150deg, #0f3151, #087d83);
    color: #fff;
    min-height: 540px;
    overflow: hidden;
    padding: 44px;
    position: relative;
}

.portal-auth-art img {
    bottom: -20px;
    max-height: 310px;
    max-width: 86%;
    object-fit: contain;
    position: absolute;
    right: -10px;
}

.portal-auth-form { padding: 44px; }

.portal-google-btn {
    align-items: center;
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    color: #28364a;
    display: flex;
    font-size: .85rem;
    font-weight: 700;
    gap: 9px;
    justify-content: center;
    min-height: 45px;
    text-decoration: none;
    width: 100%;
}

.portal-dashboard-hero {
    background: linear-gradient(120deg, #0f3151, #166272);
    color: #fff;
    padding: 42px 0;
}

.portal-stat-card {
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(16, 47, 80, .06);
    height: 100%;
    padding: 18px;
}

.portal-stat-card i {
    align-items: center;
    background: #fff3e9;
    border-radius: 10px;
    color: var(--portal-orange);
    display: inline-flex;
    height: 40px;
    justify-content: center;
    margin-bottom: 12px;
    width: 40px;
}

.portal-stat-card strong { display: block; font-size: 1.5rem; }
.portal-stat-card span { color: #7a8492; font-size: .75rem; }

.portal-toast {
    background: #132b45;
    border-radius: 10px;
    bottom: 24px;
    box-shadow: 0 16px 40px rgba(0,0,0,.22);
    color: #fff;
    font-size: .8rem;
    left: 50%;
    opacity: 0;
    padding: 11px 16px;
    pointer-events: none;
    position: fixed;
    transform: translate(-50%, 20px);
    transition: .25s ease;
    z-index: 2000;
}

.portal-toast.show { opacity: 1; transform: translate(-50%, 0); }

.portal-dropzone {
    align-items: center;
    background: #f8fafc;
    border: 1.5px dashed #b8c3d0;
    border-radius: 13px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 135px;
    padding: 18px;
    text-align: center;
}

.portal-dropzone:hover { background: #f1f6fb; border-color: #7d9ab8; }
.portal-dropzone i { color: var(--portal-orange); font-size: 1.7rem; }
.portal-dropzone span { color: #4d5d70; font-size: .78rem; font-weight: 700; margin-top: 5px; }
.portal-dropzone small { color: #8b95a3; font-size: .67rem; }

.portal-predictor-card {
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: 20px;
    box-shadow: var(--portal-shadow);
    padding: 26px;
}

.portal-steps {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 24px;
}

.portal-step {
    background: #f8fafc;
    border: 1px solid #e8edf2;
    border-radius: 12px;
    padding: 11px 13px;
}

.portal-step b { color: var(--portal-orange); font-size: .7rem; }
.portal-step span { display: block; font-size: .76rem; font-weight: 700; }

@media (max-width: 1199px) {
    .portal-header-search { margin: 10px 0; max-width: none; width: 100%; }
    .portal-filter-card { position: static; }
}

@media (max-width: 767px) {
    .portal-page-hero { padding: 42px 0; }
    .portal-page-plane { opacity: .25; right: -20px; width: 150px; }
    .portal-college-main { grid-template-columns: 56px 1fr; }
    .portal-college-logo { height: 54px; width: 54px; }
    .portal-college-main > :last-child { grid-column: 1 / -1; }
    .portal-college-facts { grid-template-columns: 1fr 1fr; }
    .portal-fact:nth-child(2) { border-right: 0; }
    .portal-fact:nth-child(-n+2) { border-bottom: 1px solid #eef1f5; }
    .portal-college-actions { align-items: stretch; flex-wrap: wrap; }
    .portal-college-actions > * { flex: 1 1 auto; }
    .portal-info-grid { grid-template-columns: 1fr 1fr; }
    .portal-auth-art { min-height: 280px; padding: 28px; }
    .portal-auth-art img { max-height: 190px; }
    .portal-auth-form { padding: 28px 22px; }
    .portal-steps { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .portal-info-grid { grid-template-columns: 1fr; }
    .portal-college-facts { grid-template-columns: 1fr; }
    .portal-fact { border-bottom: 1px solid #eef1f5; border-right: 0; }
    .portal-fact:last-child { border-bottom: 0; }
    .portal-results-toolbar { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .portal-page-plane { animation: none; }
}

.portal-student-drawer {
    border-left: 0;
    box-shadow: -18px 0 60px rgba(16, 47, 80, 0.16);
    width: min(420px, 92vw) !important;
}

.portal-student-drawer-head {
    background: linear-gradient(135deg, #067b83, #0f5369);
    color: #fff;
    min-height: 132px;
    padding: 18px 20px 24px;
}

.portal-student-drawer-head strong,
.portal-student-drawer-head small {
    display: block;
}

.portal-student-drawer-head small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
    margin-top: 3px;
}

.portal-student-avatar {
    align-items: center;
    background: rgba(255, 255, 255, 0.13);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    display: inline-flex;
    font-size: 1.4rem;
    font-weight: 800;
    height: 60px;
    justify-content: center;
    width: 60px;
}

.portal-student-menu a {
    align-items: center;
    border-bottom: 1px solid #edf0f4;
    color: #172438;
    display: flex;
    font-size: 0.84rem;
    font-weight: 650;
    gap: 12px;
    min-height: 58px;
    padding: 12px 18px;
    text-decoration: none;
}

.portal-student-menu a:hover {
    background: #f7fafc;
    color: var(--portal-orange-dark);
}

.portal-student-menu a > i:first-child {
    align-items: center;
    background: #f0f6fb;
    border-radius: 9px;
    color: var(--portal-navy);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}
