/* ==========================================================================
   MEDWAY PORTAL - STUDENT PORTAL LAYOUT, SIDEBAR & PROFILE STYLES
   ========================================================================== */

/* ---- Portal Shell ---- */
.medway-portal-shell {
    display: flex;
    min-height: auto;
    background: #F0F4FA;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

/* ---- Sidebar ---- */
.medway-sidebar {
    --sb-glow-1: rgba(16, 185, 129, 0.35);
    --sb-glow-2: rgba(15, 98, 254, 0.35);
    width: 264px;
    min-height: auto;
    background: linear-gradient(165deg, #0B4FDE 0%, #0F62FE 42%, #0EA97F 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    top: auto;
    left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(15, 98, 254, 0.15);
    overflow: hidden;
}

/* Soft ambient glow blobs — subtle depth without extra imagery */
.medway-sidebar::before,
.medway-sidebar::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}
.medway-sidebar::before {
    top: -80px;
    right: -90px;
    background: var(--sb-glow-1);
}
.medway-sidebar::after {
    bottom: -100px;
    left: -80px;
    background: var(--sb-glow-2);
}

.medway-sidebar-logo,
.medway-sidebar-nav,
.medway-sidebar-footer {
    position: relative;
    z-index: 1;
}

.medway-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.14);
}

.medway-logo-mark {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.medway-logo-textwrap {
    min-width: 0;
}

.medway-sidebar-logo .medway-logo-text {
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.2px;
}

.medway-sidebar-logo small {
    display: block;
    font-size: 10.5px;
    color: rgba(255,255,255,0.72);
    margin-top: 2px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-weight: 600;
}

.medway-sidebar-nav {
    flex: 1;
    padding: 18px 14px;
    overflow-y: auto;
}

.medway-nav-section-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    letter-spacing: 1.4px;
    text-transform: uppercase;
    padding: 0 12px;
    margin: 18px 0 8px;
}

.medway-nav-section-label:first-child {
    margin-top: 2px;
}

.medway-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 12px;
    border-radius: 12px;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    border: none;
    border-left: 3px solid transparent;
    background: none;
    width: 100%;
    text-align: left;
}

.medway-nav-item:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    text-decoration: none;
    transform: translateX(2px);
}

.medway-nav-item.is-active {
    background: #fff;
    color: #0F62FE;
    font-weight: 700;
    border-left-color: #10B981;
    box-shadow: 0 6px 16px rgba(0,0,0,0.14);
}

.medway-nav-item.is-active .medway-nav-icon {
    color: #10B981;
}

.medway-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.medway-nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.medway-sidebar-footer {
    padding: 14px 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.14);
}

.medway-sidebar-user-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.14);
    margin-bottom: 10px;
}

.medway-sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    border: 2px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

.medway-sidebar-user-info {
    min-width: 0;
}

.medway-sidebar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.medway-sidebar-user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.72);
    margin-top: 1px;
}

/* Logout button in sidebar.
   Was previously nested inside .medway-sidebar-user-mini (a flex row that
   already held the avatar + name), so its own width:100% fought the other
   flex children for space and it effectively got squeezed out of view.
   It's now its own row directly under .medway-sidebar-footer (see
   PortalShortcode::render), and styled in red — the standard color for a
   destructive/exit action — so it's unmistakable. */
.medway-sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    color: #FCA5A5;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
}

.medway-sidebar-logout-icon {
    color: #EF4444;
    display: flex;
    align-items: center;
    justify-content: center;
}

.medway-sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #fff;
}

.medway-sidebar-logout-btn:hover .medway-sidebar-logout-icon {
    color: #fff;
}

/* ---- Main Content Area ---- */
.medway-portal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}

.medway-portal-topbar {
    background: #fff;
    border-bottom: 1px solid #E8EEF6;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.medway-topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
}

.medway-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.medway-portal-content {
    padding: 24px;
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
}

/* ---- Mobile Sidebar Toggle ---- */
.medway-sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    color: #0F172A;
}

.medway-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
}

@media (max-width: 768px) {
    .medway-sidebar {
        position: fixed;
        min-height: 100vh;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        z-index: 1000;
    }
    .medway-sidebar.is-open {
        transform: translateX(0);
    }
    .medway-sidebar-overlay {
        display: block;
    }
    .medway-portal-main {
        margin-left: 0;
    }
    .medway-sidebar-toggle-btn {
        display: flex;
    }
    .medway-portal-content {
        padding: 16px;
    }
    .medway-topbar-title {
        font-size: 15px;
    }
}

/* ==========================================================================
   PROFILE PAGE
   ========================================================================== */

.medway-profile-page-wrapper {
    max-width: 860px;
}

.medway-profile-hero-card {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 60%, rgba(15,98,254,0.12) 100%);
    border-radius: 24px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
    flex-wrap: wrap;
}

.medway-profile-avatar-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3454D1 0%, #0FBF9F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(52, 84, 209, 0.2);
}

.medway-profile-hero-info h2 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px 0;
}

.medway-profile-hero-info p {
    font-size: 14px;
    color: #94A3B8;
    margin: 0;
}

/* Profile form card */
.medway-profile-form-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
    border: 1px solid #E8EEF6;
}

.medway-profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F1F5F9;
}

.medway-profile-section-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
}

/* Edit / Save / Cancel Buttons */
.medway-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1.5px solid #3454D1;
    color: #3454D1;
    background: rgba(52, 84, 209, 0.06);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.medway-btn-edit:hover {
    background: rgba(52, 84, 209, 0.12);
}

.medway-btn-save {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(120deg, #3454D1 0%, #0FBF9F 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.medway-btn-save:hover {
    box-shadow: 0 4px 16px rgba(52, 84, 209, 0.3);
    transform: translateY(-1px);
}

.medway-btn-cancel {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    color: #64748B;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.medway-profile-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Form grid */
.medway-profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}

@media (max-width: 640px) {
    .medway-profile-form-grid {
        grid-template-columns: 1fr;
    }
    .medway-profile-hero-card {
        flex-direction: column;
        text-align: center;
    }
}

.medway-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.medway-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.medway-field-input {
    padding: 10px 14px;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    font-size: 14px;
    color: #0F172A;
    background: #F8FAFC;
    outline: none;
    transition: all 0.2s ease;
    cursor: default;
}

.medway-field-input[readonly] {
    color: #475569;
    cursor: default;
}

.medway-field-input.is-editable {
    background: #fff;
    border-color: #3454D1;
    box-shadow: 0 0 0 3px rgba(52,84,209,0.1);
    cursor: text;
}

.medway-field-input.is-editable:focus {
    border-color: #0FBF9F;
    box-shadow: 0 0 0 3px rgba(15,191,159,0.15);
}

select.medway-field-input[disabled] {
    cursor: default;
    opacity: 0.85;
}

.medway-college-combo {
    position: relative;
    margin-bottom: 6px;
}

#profEduCollegeSearch {
    margin-bottom: 0;
}

/* #profEduCollegeSearch is left visible in every state (view AND edit) —
   same as the rest of the read-only profile fields (e.g. #profName) — so
   the saved college name is still visible when the form isn't being
   edited, styled read-only rather than hidden. It only becomes typeable
   once Edit mode drops [disabled] from it. */

/* The real <select id="profEduCollege"> only exists to hold the value that
   gets submitted with the form (see selectCollege() in dashboard.js) — the
   search box + suggestions list above is the actual UI. Previously this
   select had no visibility rule of its own, so once Edit mode removed
   [disabled] from every .medway-form-control it appeared as a second, plain
   dropdown stacked right under the search box, instead of the single
   type-to-search field this is meant to look like. Always hide it, in
   every state — the search box shows the value instead. */
#profEduCollege {
    display: none !important;
}

.medway-college-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.medway-college-suggestion-item {
    padding: 9px 14px;
    font-size: 14px;
    color: #0F172A;
    cursor: pointer;
}

.medway-college-suggestion-item:hover {
    background: #F1F5F9;
}

.medway-college-suggestion-empty,
.medway-college-suggestion-more {
    padding: 9px 14px;
    font-size: 12.5px;
    color: #94A3B8;
}

select.medway-field-input.is-editable {
    cursor: pointer;
}

/* Profile Alert Banner */
.medway-profile-alert {
    display: none;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.medway-profile-alert.alert-success {
    background: rgba(10, 169, 104, 0.1);
    border: 1px solid rgba(10, 169, 104, 0.25);
    color: #0FA968;
}

.medway-profile-alert.alert-error {
    background: rgba(229, 72, 77, 0.1);
    border: 1px solid rgba(229, 72, 77, 0.25);
    color: #E5484D;
}

/* Profile section divider */
.medway-profile-section-divider {
    border: none;
    border-top: 1px solid #F1F5F9;
    margin: 28px 0 24px;
}

/* Academic section title */
.medway-profile-subsection-title {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 18px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Loading spinner in profile */
.medway-profile-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 14px;
    color: #64748B;
    font-size: 14px;
}

.medway-spin-ring {
    width: 28px;
    height: 28px;
    border: 3px solid #E2E8F0;
    border-top-color: #3454D1;
    border-radius: 50%;
    animation: medway-spin 0.8s linear infinite;
}

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

/* ==========================================================================
   PLANS PAGE - MODE & PROFESSION SELECTOR
   ========================================================================== */

.medway-plans-section {
    max-width: 1200px;
    margin: 0 auto;
}

.medway-plans-selector-bar {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    border-radius: 20px;
    padding: 24px 32px;
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.15);
}

.medway-selector-group {
    flex: 1;
    min-width: 200px;
}

.medway-selector-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.medway-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.medway-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.medway-chip-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

.medway-chip-btn.is-active {
    background: linear-gradient(135deg, #3454D1, #10B981);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(52, 84, 209, 0.3);
}

.medway-chip-icon {
    font-size: 16px;
}

/* ---- Plans Header ---- */
.medway-plans-header {
    text-align: center;
    margin-bottom: 40px;
}

.medway-plans-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0F172A;
    margin: 12px 0 8px;
    line-height: 1.2;
}

.medway-plans-header p {
    font-size: 16px;
    color: #64748B;
    max-width: 600px;
    margin: 0 auto;
}

.medway-pill-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.medway-pill-blue {
    background: rgba(52, 84, 209, 0.1);
    color: #3454D1;
}

/* ---- Plan Group Sections ---- */
.medway-plan-group {
    margin-bottom: 40px;
}

.medway-plan-group-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding: 0 4px;
}

.medway-plan-group-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #F1F5F9;
    flex-shrink: 0;
}

.medway-plan-group-title {
    font-size: 20px;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
}

.medway-plan-group-sub {
    font-size: 13px;
    color: #64748B;
    margin: 2px 0 0;
}

.medway-plan-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ---- Individual Plan Cards ---- */
.medway-plan-card {
    background: #fff;
    border-radius: 20px;
    padding: 0;
    border: 1.5px solid #E8EEF6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.medway-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border-color: #CBD5E1;
}

.medway-plan-card.recommended {
    border-color: #3454D1;
    box-shadow: 0 0 0 2px rgba(52,84,209,0.15), 0 8px 32px rgba(52,84,209,0.1);
}

/* Accent color variants */
.medway-plan-card.accent-purple { --accent: #7C3AED; --accent-light: rgba(124,58,237,0.08); }
.medway-plan-card.accent-blue { --accent: #3454D1; --accent-light: rgba(52,84,209,0.08); }
.medway-plan-card.accent-green { --accent: #10B981; --accent-light: rgba(16,185,129,0.08); }
.medway-plan-card.accent-orange { --accent: #F59E0B; --accent-light: rgba(245,158,11,0.08); }
.medway-plan-card.accent-pink { --accent: #EC4899; --accent-light: rgba(236,72,153,0.08); }

/* Badge / Ribbon */
.medway-plan-badge {
    background: linear-gradient(135deg, #3454D1, #7C3AED);
    text-align: center;
    padding: 8px 16px;
}

.medway-plan-card.recommended .medway-plan-badge {
    background: linear-gradient(135deg, #3454D1, #10B981);
}

.medway-badge-discount {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
}

.medway-badge-text {
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Card Body */
.medway-plan-card-body {
    padding: 20px 20px 0;
    flex: 1;
}

.medway-plan-card-top {
    margin-bottom: 16px;
}

.medway-plan-title {
    font-size: 17px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 4px;
    line-height: 1.3;
}

.medway-plan-subtitle {
    font-size: 12px;
    color: #64748B;
    margin: 0 0 6px;
    line-height: 1.4;
}

.medway-plan-mode-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    background: var(--accent-light, rgba(52,84,209,0.08));
    color: var(--accent, #3454D1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pricing */
.medway-plan-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F1F5F9;
}

.medway-price-current {
    font-size: 28px;
    font-weight: 900;
    color: #0F172A;
    line-height: 1;
}

.medway-price-original {
    font-size: 16px;
    color: #94A3B8;
    text-decoration: line-through;
}

/* Duration Chips */
.medway-plan-durations {
    margin-bottom: 14px;
}

.medway-durations-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.medway-duration-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.medway-dur-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1.5px solid #E2E8F0;
    background: #F8FAFC;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
}

.medway-dur-chip:hover {
    border-color: #CBD5E1;
    background: #F1F5F9;
}

.medway-dur-chip.is-active {
    border-color: var(--accent, #3454D1);
    background: var(--accent-light, rgba(52,84,209,0.08));
    box-shadow: 0 0 0 2px rgba(52,84,209,0.15);
}

.medway-dur-title {
    font-size: 11px;
    font-weight: 700;
    color: #0F172A;
}

.medway-dur-price {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent, #3454D1);
}

.medway-dur-discount {
    font-size: 9px;
    font-weight: 800;
    color: #10B981;
}

/* Expiry */
.medway-plan-expiry {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94A3B8;
    margin-bottom: 12px;
}

/* Covered subjects */
.medway-plan-covered {
    padding: 10px 20px;
    border-top: 1px solid #F1F5F9;
    background: #FAFBFC;
}

.medway-covered-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
}

/* Card Footer / Buy Button */
.medway-plan-card-footer {
    padding: 14px 20px;
}

.medway-btn-buy {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent, #3454D1) 0%, var(--accent, #3454D1) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.medway-btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 84, 209, 0.3);
}

.medway-plan-card.recommended .medway-btn-buy {
    background: linear-gradient(135deg, #3454D1, #10B981);
}

.medway-btn-buy svg {
    transition: transform 0.2s ease;
}

.medway-btn-buy:hover svg {
    transform: translateX(4px);
}

/* Loading & Empty States */
.medway-plans-loading {
    text-align: center;
    padding: 60px 20px;
    color: #64748B;
}

.medway-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E2E8F0;
    border-top-color: #3454D1;
    border-radius: 50%;
    animation: medway-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.medway-plans-error {
    text-align: center;
    padding: 40px 20px;
    color: #EF4444;
    font-weight: 600;
}

.medway-plans-empty {
    text-align: center;
    padding: 60px 20px;
}

.medway-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.medway-plans-empty h3 {
    font-size: 20px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 8px;
}

.medway-plans-empty p {
    color: #64748B;
    margin: 0;
}

/* ---- Responsive Plans ---- */
@media (max-width: 768px) {
    .medway-plans-selector-bar {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    .medway-plans-header h2 {
        font-size: 22px;
    }
    .medway-plan-group-grid {
        grid-template-columns: 1fr;
    }
    .medway-chip-btn {
        font-size: 12px;
        padding: 7px 14px;
    }
}

@media (max-width: 480px) {
    .medway-plans-header h2 {
        font-size: 18px;
    }
    .medway-duration-chips {
        gap: 4px;
    }
    .medway-dur-chip {
        min-width: 60px;
        padding: 5px 10px;
    }
}

/* ==========================================================================
   DASHBOARD - STUDENT PORTAL CTA CARD
   ========================================================================== */

.medway-dash-portal-cta {
    background: linear-gradient(135deg, #3454D1 0%, #0FBF9F 100%);
    border-radius: 20px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(52, 84, 209, 0.2);
    flex-wrap: wrap;
}

.medway-dash-portal-cta-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.medway-dash-portal-cta-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.medway-dash-portal-cta-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
}

.medway-dash-portal-cta-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin: 0;
}

.medway-dash-portal-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 12px;
    background: #fff;
    color: #3454D1;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.medway-dash-portal-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    color: #0FBF9F;
    text-decoration: none;
}

.medway-dash-portal-cta-btn svg {
    transition: transform 0.2s ease;
}

.medway-dash-portal-cta-btn:hover svg {
    transform: translateX(4px);
}

@media (max-width: 640px) {
    .medway-dash-portal-cta {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .medway-dash-portal-cta-content {
        flex-direction: column;
    }
    .medway-dash-portal-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   GUEST / UNAUTHENTICATED STATE
   ========================================================================== */
.medway-portal-guest {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
}

.medway-portal-guest-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.medway-portal-guest h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 10px;
}

.medway-portal-guest p {
    font-size: 16px;
    color: #64748B;
    margin: 0 0 28px;
    max-width: 400px;
}
