/* Student application portal */

body.student-portal-page {
    --sp-ink: #0f172a;
    --sp-muted: #64748b;
    --sp-line: #e2e8f0;
    --sp-surface: #ffffff;
    --sp-soft: #f8fafc;
    --sp-accent: #0f766e;
    --sp-accent-soft: #f0fdfa;
    --sp-accent-line: #99f6e4;
    --sp-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.04);
    background: #f4f6f8;
    min-height: 100vh;
}

.student-portal-page .apply-wrap {
    max-width: 640px;
}

.student-portal-page .apply-wrap:has(.sp-profile) {
    max-width: 720px;
}

.sp-shell {
    padding-bottom: 1rem;
}

.sp-profile {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.sp-auth {
    max-width: 420px;
    margin: 0 auto;
}

/* Landing: two clear options */
.sp-choose {
    max-width: 560px;
    margin: 0 auto;
}

.sp-choose-hero {
    text-align: center;
    margin-bottom: 1.35rem;
    padding: 0.25rem 0 0;
}

.sp-choose-kicker {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #059669;
}

.sp-choose-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.sp-choose-sub {
    margin: 0.35rem 0 0;
    font-size: 0.9375rem;
    color: #64748b;
    font-weight: 600;
}

.sp-choose-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 639px) {
    .sp-choose-grid {
        grid-template-columns: 1fr;
    }
}

.sp-choose-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
    padding: 1.15rem 0.9rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.sp-choose-card:hover {
    border-color: rgba(5, 150, 105, 0.35);
    box-shadow: 0 6px 24px rgba(5, 150, 105, 0.1);
    transform: translateY(-1px);
}

.sp-choose-card--new:hover {
    border-color: rgba(2, 132, 199, 0.35);
    box-shadow: 0 6px 24px rgba(2, 132, 199, 0.1);
}

.sp-choose-card__icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-choose-card__icon--login {
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    color: #047857;
}

.sp-choose-card__icon--new {
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    color: #0369a1;
}

.sp-choose-card__body {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
}

.sp-choose-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.sp-choose-card__sub {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.sp-choose-card--new .sp-choose-card__sub {
    color: #64748b;
}

.sp-choose-card__desc {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    color: #94a3b8;
    line-height: 1.35;
}

.sp-choose-card__arrow {
    display: none;
}

.sp-back {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
}

.sp-back:hover {
    color: #047857;
}

.sp-option-title {
    margin: 0 0 0.35rem;
    font-size: 1.125rem;
}

.sp-option-hint {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.apply-steps--two .apply-steps__item {
    flex: 1;
}

.btn-block {
    width: 100%;
}

.sp-letterhead .apply-letterhead__logo {
    width: 92px;
    height: 92px;
}

.sp-letterhead__main {
    align-items: center;
}

.sp-letterhead .apply-letterhead__name,
.sp-letterhead__name {
    margin: 0;
    font-size: clamp(0.92rem, 2.2vw + 0.4rem, 1.24rem);
    color: #1e3a8a;
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.sp-letterhead .apply-letterhead__brand,
.sp-letterhead__subtitle {
    margin: 0.12rem 0 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
}

@media (max-width: 639px) {
    body.student-portal-page .sp-letterhead.apply-letterhead {
        overflow: visible;
    }

    body.student-portal-page .sp-letterhead .apply-letterhead__main {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 0.8rem 0.7rem 0.72rem;
        gap: 0.5rem;
    }

    body.student-portal-page .sp-letterhead .apply-letterhead__logo {
        width: 68px !important;
        height: 68px !important;
    }

    body.student-portal-page .sp-letterhead .apply-letterhead__info {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    body.student-portal-page .sp-letterhead .apply-letterhead__name,
    body.student-portal-page .sp-letterhead__name {
        font-size: clamp(0.86rem, 3.6vw, 1.02rem) !important;
        letter-spacing: 0.025em;
        line-height: 1.35;
        max-width: 17.5rem;
        margin-left: auto;
        margin-right: auto;
    }

    body.student-portal-page .sp-letterhead__subtitle {
        font-size: 0.76rem;
    }

    body.student-portal-page--choose .sp-choose-hero {
        margin-bottom: 1rem;
        padding: 0 0.1rem;
    }

    body.student-portal-page--choose .sp-choose-kicker {
        font-size: 0.64rem;
        line-height: 1.35;
    }

    body.student-portal-page--choose .sp-choose-title {
        font-size: 1.32rem;
    }

    body.student-portal-page--choose .sp-choose-sub {
        font-size: 0.88rem;
    }

    body.student-portal-page--choose .sp-choose-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 0.75rem;
    }

    body.student-portal-page--choose .sp-choose-card {
        width: 100%;
        max-width: 20.5rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.65rem;
        padding: 1.15rem 1rem;
    }

    body.student-portal-page--choose .sp-choose-card__body {
        text-align: center;
    }

    body.student-portal-page--choose .sp-choose-card__icon {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 12px;
    }

    body.student-portal-page--choose .sp-choose-card__title {
        font-size: 1rem;
    }

    body.student-portal-page--choose .sp-choose-card__desc {
        font-size: 0.8rem;
    }
}

.sp-sticky-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 0.65rem;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #bfdbfe;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
    backdrop-filter: blur(8px);
}

.sp-sticky-bar[hidden] {
    display: none !important;
}

.sp-sticky-bar.is-visible {
    display: flex !important;
}

.sp-sticky-bar__title {
    flex: 1;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e3a8a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-sticky-bar__link {
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap;
}

.sp-sticky-bar__link--primary {
    color: #1d4ed8;
}

.sp-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    border-radius: 8px;
    white-space: nowrap;
}

.sp-nav-btn--home {
    color: #fff !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: 1px solid #1e40af;
}

.sp-nav-btn--signout {
    color: #64748b !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.sp-contact-quick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    border-left: 3px solid #2563eb;
    background: #f8fafc;
}

.sp-contact-quick__label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
}

.sp-contact-quick__btn {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1d4ed8;
    text-decoration: none;
}

.sp-copy-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.sp-copy-chip__icon {
    font-size: 0.8rem;
    color: #64748b;
}

.sp-copy-chip.is-copied .sp-copy-chip__icon {
    color: #059669;
}

@media (max-width: 639px) {
    .sp-timeline-item--collapsible:not(.sp-timeline-item--focus) .sp-timeline-body > p,
    .sp-timeline-item--collapsible:not(.sp-timeline-item--focus) .sp-timeline-body > ol.sp-step-list,
    .sp-timeline-item--collapsible:not(.sp-timeline-item--focus) .sp-timeline-body > .sp-letter-links,
    .sp-timeline-item--collapsible:not(.sp-timeline-item--focus) .sp-timeline-body > a.btn,
    .sp-timeline-item--collapsible:not(.sp-timeline-item--focus) .sp-timeline-body > a.sp-action-btn,
    .sp-timeline-item--collapsible:not(.sp-timeline-item--focus) .sp-timeline-body > .sp-timeline-expand,
    .sp-timeline-item--collapsible:not(.sp-timeline-item--focus) .sp-timeline-body > form,
    .sp-timeline-item--collapsible:not(.sp-timeline-item--focus) .sp-timeline-lock-msg {
        display: none;
    }

    .sp-timeline-item--collapsible:not(.sp-timeline-item--focus) .sp-timeline-head {
        cursor: pointer;
    }

    .sp-timeline-item--collapsible.is-expanded .sp-timeline-body > p,
    .sp-timeline-item--collapsible.is-expanded .sp-timeline-body > ol.sp-step-list,
    .sp-timeline-item--collapsible.is-expanded .sp-timeline-body > .sp-letter-links,
    .sp-timeline-item--collapsible.is-expanded .sp-timeline-body > a.btn,
    .sp-timeline-item--collapsible.is-expanded .sp-timeline-body > a.sp-action-btn,
    .sp-timeline-item--collapsible.is-expanded .sp-timeline-body > .sp-timeline-expand,
    .sp-timeline-item--collapsible.is-expanded .sp-timeline-body > form,
    .sp-timeline-item--collapsible.is-expanded .sp-timeline-lock-msg {
        display: block;
    }

    .sp-timeline-item--collapsible.is-expanded .sp-timeline-body > .sp-letter-links {
        display: flex;
    }
}

.sp-card--plain {
    border: none;
    box-shadow: none;
    padding: 0.5rem 0 0;
    background: transparent;
}

.sp-setup-kicker {
    margin: 0 0 0.85rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #047857;
}

.sp-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 1.25rem;
}

.sp-title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.35rem, 3vw + 0.5rem, 1.65rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.sp-lead {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.sp-footnote {
    margin: 1rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.sp-one-tab-note {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 10px;
    color: #92400e;
}

.sp-one-tab-note__form {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.85;
}

.sp-form .form-group {
    margin-bottom: 0.85rem;
}

.sp-name-initial-row {
    display: flex;
    gap: 0.55rem;
    align-items: flex-end;
}

.sp-name-initial-row__initial {
    flex: 0 0 4.25rem;
    max-width: 4.25rem;
}

.sp-name-initial-row__initial .form-control {
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.sp-name-initial-row__name {
    flex: 1 1 auto;
    min-width: 0;
}

.sp-profile {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Progress bar */
.sp-dashboard-row {
    display: grid;
    gap: 0.55rem;
}

.sp-dashboard-row--split {
    margin-bottom: 0.15rem;
}

@media (min-width: 680px) {
    .sp-dashboard-row--split {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        align-items: stretch;
    }
}

.sp-progress-card {
    padding: 0.75rem 0.9rem;
}

.sp-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.sp-progress-head__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.sp-progress-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.35;
}

.sp-progress-label-ta {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.sp-progress-pct {
    font-size: 0.8125rem;
    font-weight: 800;
    color: #334155;
}

.sp-progress-track {
    height: 5px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.sp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #475569, #64748b);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.sp-progress-dots {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
    padding: 0 2px;
}

.sp-progress-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #cbd5e1;
    box-shadow: 0 0 0 2px #fff;
}

.sp-progress-dot--kind-form.sp-progress-dot--active,
.sp-progress-dot--kind-form.sp-progress-dot--available,
.sp-progress-dot--kind-form.sp-progress-dot--complete { background: var(--sp-form); }
.sp-progress-dot--kind-download.sp-progress-dot--active,
.sp-progress-dot--kind-download.sp-progress-dot--available,
.sp-progress-dot--kind-download.sp-progress-dot--complete { background: var(--sp-download); }
.sp-progress-dot--kind-upload.sp-progress-dot--active,
.sp-progress-dot--kind-upload.sp-progress-dot--available,
.sp-progress-dot--kind-upload.sp-progress-dot--complete { background: var(--sp-upload); }
.sp-progress-dot--processing { background: var(--sp-upload); }
.sp-progress-dot--pending_review { background: #d97706; }
.sp-progress-dot--locked { background: #cbd5e1; }

/* Vertical timeline */
.sp-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sp-timeline-item {
    display: grid;
    grid-template-columns: 2.15rem 1fr;
    gap: 0 0.65rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.sp-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 1.05rem;
    top: 2.1rem;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.sp-timeline-item--complete:not(:last-child)::before {
    background: #cbd5e1;
}

.sp-timeline-marker {
    display: flex;
    justify-content: center;
    padding-top: 0.7rem;
    position: relative;
    z-index: 1;
}

.sp-timeline-num,
.sp-timeline-check,
.sp-timeline-lock {
    width: 2.05rem;
    height: 2.05rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
}

.sp-timeline-item--kind-form .sp-timeline-num {
    background: var(--sp-form-bg);
    color: var(--sp-form);
}

.sp-timeline-item--kind-download .sp-timeline-num {
    background: var(--sp-download-bg);
    color: var(--sp-download);
}

.sp-timeline-item--kind-upload .sp-timeline-num {
    background: var(--sp-upload-bg);
    color: var(--sp-upload);
}

.sp-timeline-item--focus.sp-timeline-item--kind-form .sp-timeline-num {
    background: var(--sp-form);
    color: #fff;
    box-shadow: 0 0 0 3px var(--sp-form-glow);
}

.sp-timeline-item--focus.sp-timeline-item--kind-download .sp-timeline-num {
    background: var(--sp-download);
    color: #fff;
    box-shadow: 0 0 0 3px var(--sp-download-glow);
}

.sp-timeline-item--focus.sp-timeline-item--kind-upload .sp-timeline-num {
    background: var(--sp-upload);
    color: #fff;
    box-shadow: 0 0 0 3px var(--sp-upload-glow);
}

.sp-timeline-check {
    background: #64748b;
    color: #fff;
    font-size: 0.9rem;
}

.sp-timeline-lock {
    background: #f1f5f9;
    color: #94a3b8;
}

.sp-timeline-lock::before {
    content: '';
    width: 0.55rem;
    height: 0.65rem;
    border: 2px solid #94a3b8;
    border-radius: 2px;
    position: relative;
    top: 0.15rem;
    box-shadow: 0 -0.45rem 0 -0.05rem #94a3b8;
}

.sp-timeline-body {
    padding: 0.68rem 0.78rem;
    border-left: 3px solid #e2e8f0;
    transition: opacity 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.sp-timeline-item--kind-form .sp-timeline-body {
    border-left-color: var(--sp-form-border);
}

.sp-timeline-item--kind-download .sp-timeline-body {
    border-left-color: var(--sp-download-border);
}

.sp-timeline-item--kind-upload .sp-timeline-body {
    border-left-color: var(--sp-upload-border);
}

.sp-timeline-item.is-locked .sp-timeline-body {
    opacity: 0.68;
    background: #f8fafc;
    border-left-color: #e2e8f0;
}

.sp-timeline-item--focus.sp-timeline-item--kind-form .sp-timeline-body {
    border-left-color: var(--sp-form);
    box-shadow: 0 2px 12px var(--sp-form-glow);
}

.sp-timeline-item--focus.sp-timeline-item--kind-download .sp-timeline-body {
    border-left-color: var(--sp-download);
    box-shadow: 0 2px 12px var(--sp-download-glow);
}

.sp-timeline-item--focus.sp-timeline-item--kind-upload .sp-timeline-body {
    border-left-color: var(--sp-upload);
    box-shadow: 0 2px 12px var(--sp-upload-glow);
}

.sp-timeline-head {
    margin-bottom: 0.4rem;
}

.sp-timeline-head__main {
    min-width: 0;
}

.sp-timeline-head__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    margin-bottom: 0.28rem;
}

.sp-kind-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.sp-kind-chip__icon {
    font-size: 0.7rem;
    line-height: 1;
}

.sp-kind-chip__ta {
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.9;
}

.sp-kind-chip--form {
    background: var(--sp-form-bg);
    color: var(--sp-form);
    border-color: var(--sp-form-border);
}

.sp-kind-chip--download {
    background: var(--sp-download-bg);
    color: var(--sp-download);
    border-color: var(--sp-download-border);
}

.sp-kind-chip--upload {
    background: var(--sp-upload-bg);
    color: var(--sp-upload);
    border-color: var(--sp-upload-border);
}

.sp-status-chip {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.14rem 0.38rem;
    border-radius: 999px;
}

.sp-status-chip--now.sp-status-chip--form {
    background: var(--sp-form);
    color: #fff;
}

.sp-status-chip--now.sp-status-chip--download {
    background: var(--sp-download);
    color: #fff;
}

.sp-status-chip--now.sp-status-chip--upload {
    background: var(--sp-upload);
    color: #fff;
}

.sp-status-chip--done {
    background: #f1f5f9;
    color: #64748b;
}

.sp-status-chip--locked {
    background: #f1f5f9;
    color: #94a3b8;
}

.sp-timeline-head h3 {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.25;
}

.sp-timeline-head p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.sp-step-note-ta {
    margin-top: 0.35rem !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
}

.sp-step-list {
    margin: 0.28rem 0 0;
    padding-left: 1rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.sp-step-list li {
    margin-bottom: 0.22rem;
}

.sp-step-list li:last-child {
    margin-bottom: 0;
}

.sp-step-list__en {
    display: block;
}

.sp-step-list__ta {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.72rem;
    color: #64748b;
}

.sp-timeline-badge {
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    white-space: nowrap;
}

.sp-timeline-badge--active { background: #ecfdf5; color: #047857; }
.sp-timeline-badge--done { background: #ecfdf5; color: #059669; }
.sp-timeline-badge--wait { background: #fffbeb; color: #b45309; }
.sp-timeline-badge--locked { background: #f1f5f9; color: #64748b; }

.sp-timeline-lock-msg {
    margin: 0;
    font-size: 0.8125rem;
    color: #94a3b8;
    font-style: italic;
}

.sp-timeline-expand {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border-light);
}

.sp-timeline-details {
    margin-top: 0.65rem;
    font-size: 0.8125rem;
}

.sp-timeline-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    padding: 0.35rem 0;
}

.sp-timeline-details summary:hover {
    color: #047857;
}

.sp-timeline-details .sp-form {
    margin-top: 0.5rem;
}

.sp-timeline-expand--request {
    border-top: 1px dashed #fca5a5;
    background: #fffbeb;
    margin-top: 0.75rem;
    padding: 0.85rem;
    border-radius: 8px;
}

.sp-uploaded-tag {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
}

.sp-submit-done {
    padding: 1.15rem 1.25rem;
    text-align: center;
    border: 2px solid #059669;
    background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.12);
}

.sp-submit-done__kicker {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #059669;
}

.sp-submit-done__title {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
}

.sp-submit-done__meta {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.sp-submit-done__btn {
    margin-bottom: 0.65rem;
}

.sp-submit-done__hint {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.sp-timeline-item--just-submitted .sp-timeline-body {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.apply-doc-defer-note {
    margin: 0 1rem 0.75rem;
    padding: 0.65rem 0.75rem;
    background: #eff6ff;
    border-radius: 8px;
    border-left: 3px solid #0284c7;
}

.sp-profile-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.15rem;
}

.sp-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.sp-meta {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.sp-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

@media (max-width: 720px) {
    .sp-steps {
        grid-template-columns: 1fr;
    }
}

.sp-step {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-left: 3px solid #e2e8f0;
}

.sp-step--complete { border-left-color: #059669; }
.sp-step--available { border-left-color: #0284c7; }
.sp-step--pending,
.sp-step--pending_review { border-left-color: #d97706; }
.sp-step--blocked { border-left-color: #dc2626; }

.sp-step__head {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.sp-step__num {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.sp-step h3 {
    margin: 0 0 0.2rem;
    font-size: 0.9375rem;
}

.sp-step p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.sp-file-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sp-panel {
    padding: 1rem 1.15rem;
}

.sp-panel h3 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
}

.sp-doc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.22rem 0.65rem;
    font-size: 0.75rem;
}

.sp-doc-list li.is-done::before { content: '✓ '; color: #059669; font-weight: 700; }
.sp-doc-list li.is-missing::before { content: '○ '; color: #94a3b8; }

@media (max-width: 600px) {
    .sp-doc-list { grid-template-columns: 1fr; }
}

/* Advanced profile dashboard */
.sp-profile-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.8rem 0.85rem 0.85rem;
    border: 1px solid #bbf7d0;
    background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.07);
}

.sp-profile-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    margin-bottom: 0.55rem;
}

.sp-profile-hero__actions .sp-nav-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
}

.sp-profile-hero__main {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    min-width: 0;
}

.sp-profile-hero__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
}

.sp-profile-hero__name {
    margin: 0;
    font-size: clamp(1rem, 4.2vw, 1.22rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    word-break: break-word;
}

.sp-profile-status {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.18rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    white-space: nowrap;
}

.sp-profile-meta {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    width: 100%;
}

.sp-profile-meta__row {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
}

.sp-profile-meta__label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.2;
}

.sp-profile-meta__value {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
    font: inherit;
    text-align: left;
    min-width: 0;
}

.sp-profile-meta__value--static {
    cursor: default;
}

.sp-profile-meta__mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(0.72rem, 3.4vw, 0.84rem);
    font-weight: 700;
    color: #0f172a;
    word-break: break-all;
    line-height: 1.25;
}

.sp-profile-meta .sp-copy-form__icon,
.sp-profile-meta .sp-copy-chip__icon {
    font-size: 0.72rem;
    color: #64748b;
    flex-shrink: 0;
}

.sp-profile-meta .sp-copy-form.is-copied .sp-copy-form__icon,
.sp-profile-meta .sp-copy-chip.is-copied .sp-copy-chip__icon {
    color: #059669;
}

.sp-profile-edit {
    margin-top: 0.55rem;
    padding: 0.85rem 1rem 1rem;
}

.sp-profile-edit__summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--trust-primary, #047857);
    list-style: none;
}

.sp-profile-edit__summary::-webkit-details-marker {
    display: none;
}

.sp-profile-edit__hint {
    margin: 0.65rem 0 0.85rem;
    font-size: 0.88rem;
    color: #475569;
}

.sp-profile-edit__form {
    margin-top: 0.25rem;
}

.sp-detail-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    padding: 0.5rem 0.4rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-width: 0;
    text-align: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.sp-detail-chip--form-no {
    border-color: #bbf7d0;
    background: #fafffe;
}

.sp-detail-chip--year {
    border-color: #e2e8f0;
}

.sp-detail-chip--code {
    border-color: #bfdbfe;
    background: #f8fafc;
}

.sp-detail-chip__label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
}

.sp-detail-chip__value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0 0.35rem;
    border: 0;
    background: transparent;
    font-size: 0.8125rem;
    color: #0f172a;
    text-align: center;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: visible;
    word-break: normal;
    box-sizing: border-box;
}

.sp-detail-chip__value--static {
    cursor: default;
    overflow: visible;
}

.sp-detail-chip__value strong {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sp-detail-chip__mono {
    font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Consolas, monospace;
    font-weight: 700;
    letter-spacing: 0;
    flex: 0 1 auto;
    min-width: 0;
}

.sp-detail-chip--form-no .sp-detail-chip__mono {
    font-size: clamp(0.64rem, 2.2vw, 0.76rem);
}

.sp-detail-chip--code .sp-detail-chip__mono {
    font-size: clamp(0.7rem, 2.8vw, 0.8125rem);
    letter-spacing: 0.06em;
}

.sp-detail-chip .sp-copy-form__icon,
.sp-detail-chip .sp-copy-chip__icon {
    font-size: 0.72rem;
}

.sp-detail-chip .sp-copy-form,
.sp-detail-chip .sp-copy-chip {
    cursor: pointer;
}

.sp-detail-chip .sp-copy-form.is-copied,
.sp-detail-chip .sp-copy-chip.is-copied {
    color: #047857;
}

.sp-profile-hero__main {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    min-width: 0;
}

.sp-btn-ta {
    font-weight: 500;
    opacity: 0.85;
}

.sp-choose-home {
    margin: 0 0 0.5rem;
}

.sp-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.18);
}

.sp-avatar.sp-avatar--passport {
    width: 6.1rem;
    align-self: stretch;
    height: auto;
    min-height: 6.85rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(5, 150, 105, 0.15);
}

.sp-avatar--passport img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.sp-avatar--passport > span {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-copy-form {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.sp-copy-form__icon {
    font-size: 0.75rem;
    color: #64748b;
}

.sp-copy-form.is-copied .sp-copy-form__icon {
    color: #059669;
}

.sp-status-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    margin: 0.15rem 0 0;
}

.sp-next-action {
    padding: 0.7rem 0.95rem;
    border-left: 4px solid #2563eb;
    background: linear-gradient(90deg, #eff6ff 0%, #fff 62%);
}

.sp-next-action__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sp-next-action__text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    min-width: 0;
    flex: 1 1 auto;
}

.sp-next-action__label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1d4ed8;
    white-space: nowrap;
}

.sp-next-action__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.sp-next-action__sep {
    color: #94a3b8;
    font-weight: 500;
}

.sp-next-action__ta {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

.sp-next-action__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.5rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: 1px solid #1e40af;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.sp-next-action__btn:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}

@media (max-width: 520px) {
    .sp-next-action__row {
        flex-direction: column;
        align-items: stretch;
    }

    .sp-next-action__btn {
        width: 100%;
    }
}

.sp-complete-banner {
    padding: 1rem 1.1rem;
    border-left: 4px solid #059669;
    background: #ecfdf5;
}

.sp-complete-banner strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #047857;
}

.sp-complete-banner p {
    margin: 0;
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.45;
}

.sp-reupload-alert {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.18);
}

.sp-reupload-alert--banner {
    margin-bottom: 0.15rem;
}

.sp-reupload-alert--upload {
    margin-bottom: 0.85rem;
    border-color: #ea580c;
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.14);
}

.sp-reupload-alert__icon {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #ea580c;
    color: #fff;
    font-weight: 900;
    font-size: 1.1rem;
    line-height: 2rem;
    text-align: center;
}

.sp-reupload-alert__content {
    flex: 1;
    min-width: 0;
}

.sp-reupload-alert__title {
    margin: 0 0 0.55rem;
    font-size: 1rem;
    font-weight: 800;
    color: #9a3412;
    line-height: 1.35;
}

.sp-reupload-alert__block {
    margin-bottom: 0.55rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(234, 88, 12, 0.22);
}

.sp-reupload-alert__block--reason {
    border-color: rgba(185, 28, 28, 0.22);
    background: rgba(255, 255, 255, 0.88);
}

.sp-reupload-alert__label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #b45309;
}

.sp-reupload-alert__docs {
    margin: 0;
    padding-left: 1.1rem;
    color: #7c2d12;
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.sp-reupload-alert__reason-text {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #991b1b;
    line-height: 1.45;
}

.sp-reupload-alert__hint {
    margin: 0.15rem 0 0;
    font-size: 0.8125rem;
    color: #78350f;
    line-height: 1.45;
}

.sp-timeline-item--reupload .sp-timeline-body {
    border: 2px solid #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.sp-timeline-item--reupload .sp-timeline-badge--active,
.sp-timeline-item--reupload .sp-timeline-badge--next {
    background: #ea580c;
    color: #fff;
}

.sp-doc-list li.is-missing.is-reupload-needed {
    color: #b45309;
    font-weight: 800;
}

.sp-doc-panel--reupload {
    border: 1px solid #fcd34d;
    background: #fffbeb;
}

.sp-doc-panel--reupload .sp-doc-panel__title {
    color: #9a3412;
}

.sp-doc-panel {
    padding: 0.75rem 0.85rem;
}

.sp-doc-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.sp-doc-panel__title {
    margin: 0;
    font-size: 0.875rem;
}

.sp-doc-panel__sub {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.sp-doc-panel__pct {
    font-size: 0.875rem;
    font-weight: 800;
    color: #059669;
    white-space: nowrap;
}

.sp-doc-panel__cta {
    width: 100%;
    margin-top: 0.55rem;
    justify-content: center;
    min-height: 2.35rem;
}

.sp-doc-jump {
    color: var(--sp-upload);
    text-decoration: underline;
    text-decoration-color: rgba(5, 150, 105, 0.35);
    text-underline-offset: 2px;
}

.sp-doc-jump:hover {
    color: #047857;
}

.sp-step-ta {
    display: block;
    margin-top: 0.05rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
}

/* Step action buttons — colour by kind */
.sp-action-btn {
    border: none;
    color: #fff;
    font-weight: 700;
    justify-content: center;
    text-align: center;
}

.sp-action-btn--form {
    background: linear-gradient(135deg, #3b82f6, var(--sp-form));
}

.sp-action-btn--download {
    background: linear-gradient(135deg, #8b5cf6, var(--sp-download));
}

.sp-action-btn--upload {
    background: linear-gradient(135deg, #10b981, var(--sp-upload));
}

.sp-action-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.sp-action-btn--muted {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0;
}

.sp-action-btn--next {
    width: 100%;
    min-height: 2.45rem;
    font-weight: 800;
}

@media (min-width: 640px) {
    .sp-action-btn--next {
        width: auto;
        min-width: 11rem;
    }
}

.sp-timeline-next-kicker {
    margin: 0 0 0.4rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sp-timeline-next-kicker--form { color: var(--sp-form); }
.sp-timeline-next-kicker--download { color: var(--sp-download); }
.sp-timeline-next-kicker--upload { color: var(--sp-upload); }

.sp-timeline-badge--next {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #6ee7b7;
}

.sp-timeline-action--next {
    width: 100%;
    justify-content: center;
    min-height: 2.45rem;
    font-weight: 800;
}

.sp-letter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.55rem;
    margin-top: 0.45rem;
}

.sp-letter-link-btn {
    flex: 1 1 8.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    min-height: 2.5rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    line-height: 1.15;
    text-align: center;
}

.sp-letter-link-btn.sp-btn--download::before {
    content: '↓ ';
    font-weight: 800;
}

.sp-letter-link-btn__main {
    font-weight: 700;
}

.sp-letter-link-btn__ta {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.92;
}

@media (min-width: 640px) {
    .sp-timeline-action--next {
        width: auto;
        min-width: 12rem;
    }
}

.sp-timeline-item--pulse .sp-timeline-body {
    animation: spPulse 0.9s ease;
}

@keyframes spPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.sp-file-drop {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sp-upload-note {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #334155;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
}

.sp-step-expand--upload {
    margin-top: 0.15rem;
    padding-top: 0.55rem;
    border-top: 1px dashed var(--sp-line);
}

.sp-step-expand--upload .sp-file-group {
    margin-bottom: 0.7rem;
}

.sp-step-expand--upload .sp-file-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--sp-ink);
    margin-bottom: 0.2rem;
}

.sp-step-expand--upload .sp-file-hint {
    margin: 0 0 0.4rem;
    font-size: 0.74rem;
}

.sp-step-expand--upload .sp-file-drop {
    margin-top: 0.15rem;
}

.sp-step-expand--upload .sp-upload-meter {
    margin-bottom: 0.75rem;
}

.sp-step-expand--upload .sp-upload-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.sp-upload-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 9rem;
    max-width: 11.5rem;
    min-height: 3rem;
    padding: 0.75rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 800;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.22);
}

.sp-upload-note .lbl-ta,
.sp-upload-note .lbl-en {
    display: block;
}

.sp-upload-note .lbl-en {
    margin-top: 0.25rem;
    color: #475569;
}

.sp-file-hint {
    margin: 0 0 0.35rem;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #64748b;
}

.sp-file-drop.has-file .sp-file-name {
    color: #047857;
    font-weight: 600;
}

.sp-file-name {
    font-size: 0.75rem;
    color: #64748b;
}

.sp-file-drop.is-invalid .sp-file-name {
    color: #64748b;
    font-weight: 400;
}

.sp-file-error {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
}

.sp-file-status {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #334155;
}

.sp-file-status.is-uploading {
    color: #1d4ed8;
}

.sp-file-status.is-success {
    color: #047857;
    font-weight: 600;
}

.sp-file-drop.is-uploading {
    opacity: 0.85;
    pointer-events: none;
}

.sp-file-drop.is-uploaded {
    border-style: solid;
    border-color: #6ee7b7;
    background: #ecfdf5;
}

.sp-file-drop.is-invalid .form-control {
    border-color: #f87171;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.sp-upload-note--mobile {
    display: none;
}

@media (max-width: 768px) {
    .sp-upload-note--mobile {
        display: block;
    }

    .sp-final-upload-form[data-mobile-auto-upload="1"] .sp-upload-submit {
        display: none;
    }
}

.sp-help-card {
    padding: 1rem 1.1rem;
    background: #f8fafc;
    border-style: dashed;
}

.sp-help-card__title {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
}

.sp-help-card__line {
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
    color: #475569;
}

.sp-help-card__address {
    line-height: 1.45;
}

.sp-help-card__hint {
    margin: 0.65rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.sp-pick-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.sp-pick-item {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.75rem 0.85rem;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sp-pick-item:has(input:checked) {
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.12);
    background: #f0fdf4;
}

.sp-pick-item__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.8125rem;
    color: #475569;
}

.sp-pick-item__body strong {
    font-size: 0.875rem;
    color: #0f172a;
}

.sp-pick-item__body small {
    color: #64748b;
}

@media (max-width: 560px) {
    .sp-profile-hero {
        padding: 0.7rem 0.75rem 0.8rem;
    }

    .sp-profile-hero__main {
        gap: 0.65rem;
    }

    .sp-avatar--passport {
        width: 5.35rem;
        min-height: 6.35rem;
    }

    .sp-profile-hero__actions {
        margin-bottom: 0.45rem;
    }
}

/* —— Colour print guide (Step 2) —— */
.sp-print-guide {
    margin-top: 0.85rem;
    padding: 0.75rem 0.85rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #14532d;
}

.sp-print-guide__title {
    margin: 0 0 0.45rem;
    font-weight: 800;
    font-size: 0.8125rem;
    color: #047857;
}

.sp-print-guide__steps {
    margin: 0;
    padding-left: 1.15rem;
}

.sp-print-guide__steps li {
    margin-bottom: 0.25rem;
}

.sp-print-guide__ta {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: #166534;
}

/* —— Floating help chat —— */
.sp-help-chat {
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 9000;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.sp-help-chat__toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(4, 120, 87, 0.35);
}

.sp-help-chat__toggle-icon {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    font-weight: 900;
}

.sp-help-chat__toggle-ta {
    font-weight: 700;
    opacity: 0.92;
}

.sp-help-chat__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(300px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.sp-help-chat__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    padding: 0.65rem 0.85rem;
    background: #ecfdf5;
    border-bottom: 1px solid #bbf7d0;
    font-size: 0.875rem;
    color: #047857;
}

.sp-help-chat__head-ta {
    font-size: 0.75rem;
    color: #059669;
    font-weight: 700;
}

.sp-help-chat__close {
    margin-left: auto;
    border: none;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 0 0.15rem;
}

.sp-help-chat__body {
    padding: 0.75rem 0.85rem 0.85rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #334155;
}

.sp-help-chat__body p {
    margin: 0 0 0.5rem;
}

.sp-help-chat__ta {
    font-size: 0.75rem;
    color: #475569;
}

.sp-help-chat__phone {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #0f172a;
    margin: 0.35rem 0 0.65rem !important;
}

.sp-help-chat__actions {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
}

.sp-help-chat__btn {
    flex: 1;
    text-align: center;
    justify-content: center;
}

.sp-help-chat__note {
    font-size: 0.6875rem;
    color: #64748b;
    margin: 0 !important;
}

.sp-help-chat[data-open="1"] .sp-help-chat__toggle {
    box-shadow: 0 4px 14px rgba(4, 120, 87, 0.28);
}

/* ── Portal v2: calm command center + accordion steps ── */

.student-portal-page .sp-profile > .card {
    border: 1px solid var(--sp-line);
    box-shadow: var(--sp-shadow);
    border-radius: 16px;
}

.sp-command-center {
    padding: 0.85rem 0.9rem 0.75rem;
    background: var(--sp-surface);
}

.sp-command-center__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.sp-command-center__eyebrow {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sp-muted);
}

.sp-command-center__metric {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.sp-command-center__pct {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--sp-ink);
    line-height: 1;
}

.sp-command-center__step {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sp-muted);
}

.sp-command-center__step-ta {
    margin: 0.15rem 0 0;
    font-size: 0.72rem;
    color: var(--sp-muted);
}

.sp-lang-switch {
    display: inline-flex;
    padding: 0.15rem;
    border-radius: 999px;
    background: var(--sp-soft);
    border: 1px solid var(--sp-line);
    flex-shrink: 0;
}

.sp-lang-switch__btn {
    border: none;
    background: transparent;
    color: var(--sp-muted);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    cursor: pointer;
}

.sp-lang-switch__btn.is-active {
    background: var(--sp-surface);
    color: var(--sp-ink);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.sp-progress-track--slim {
    height: 4px;
    margin-bottom: 0.65rem;
}

.sp-progress-fill {
    background: linear-gradient(90deg, #115e59, var(--sp-accent));
}

.sp-step-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
}

.sp-step-rail__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    text-decoration: none;
    color: inherit;
    padding: 0.35rem 0.2rem;
    border-radius: 12px;
    transition: background 0.15s;
}

.sp-step-rail__item:hover {
    background: var(--sp-soft);
}

.sp-step-rail__bubble {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    border: 1.5px solid var(--sp-line);
    background: var(--sp-surface);
    color: var(--sp-muted);
}

.sp-step-rail__item.is-done .sp-step-rail__bubble {
    background: var(--sp-accent-soft);
    border-color: var(--sp-accent-line);
    color: var(--sp-accent);
}

.sp-step-rail__item.is-current .sp-step-rail__bubble {
    background: var(--sp-accent);
    border-color: var(--sp-accent);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.sp-step-rail__item.is-locked {
    opacity: 0.45;
    pointer-events: none;
}

.sp-step-rail__label {
    font-size: 0.62rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    color: var(--sp-muted);
}

.sp-step-rail__item.is-current .sp-step-rail__label {
    color: var(--sp-ink);
}

body[data-sp-lang="en"] .sp-rail-ta,
body[data-sp-lang="en"] .sp-step-list__ta,
body[data-sp-lang="en"] .sp-step-card__title-ta,
body[data-sp-lang="en"] .sp-letter-link-btn__ta,
body[data-sp-lang="en"] .sp-command-center__step-ta {
    display: none;
}

body[data-sp-lang="ta"] .sp-rail-en,
body[data-sp-lang="ta"] .sp-step-list__en,
body[data-sp-lang="ta"] .sp-step-card__title,
body[data-sp-lang="ta"] .sp-letter-link-btn__main,
body[data-sp-lang="ta"] .sp-command-center__step {
    display: none;
}

body[data-sp-lang="ta"] .sp-step-card__title-ta {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--sp-ink);
}

.sp-doc-panel {
    padding: 0.75rem 0.85rem;
}

.sp-doc-panel__ring {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--sp-accent);
    background:
        radial-gradient(closest-side, var(--sp-surface) 72%, transparent 73% 100%),
        conic-gradient(var(--sp-accent) calc(var(--sp-doc-pct, 0) * 1%), var(--sp-line) 0);
}

.sp-doc-jump {
    color: var(--sp-accent);
}

.sp-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sp-step-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: 14px;
    box-shadow: var(--sp-shadow);
    overflow: hidden;
}

.sp-step--focus .sp-step-card {
    border-color: var(--sp-accent-line);
    box-shadow: 0 0 0 1px var(--sp-accent-line), var(--sp-shadow);
}

.sp-step.is-locked .sp-step-card {
    opacity: 0.72;
}

.sp-step-card__toggle {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.sp-step--focus .sp-step-card__toggle {
    cursor: default;
}

.sp-step-card__bubble {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    background: var(--sp-soft);
    border: 1px solid var(--sp-line);
    color: var(--sp-muted);
}

.sp-step--focus .sp-step-card__bubble {
    background: var(--sp-accent);
    border-color: var(--sp-accent);
    color: #fff;
}

.sp-step--complete .sp-step-card__bubble {
    background: var(--sp-accent-soft);
    border-color: var(--sp-accent-line);
    color: var(--sp-accent);
}

.sp-step-card__titles {
    min-width: 0;
}

.sp-step-card__title {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--sp-ink);
    line-height: 1.25;
}

.sp-step-card__title-ta {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--sp-muted);
}

.sp-step-card__pill {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    background: var(--sp-accent);
    color: #fff;
}

.sp-step-card__pill--done,
.sp-step-card__pill--muted {
    background: var(--sp-soft);
    color: var(--sp-muted);
    border: 1px solid var(--sp-line);
}

.sp-step-card__chev {
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform 0.18s;
}

.sp-step--focus .sp-step-card__chev {
    transform: rotate(-135deg);
}

.sp-step-card__body {
    padding: 0 0.75rem 0.75rem;
}

.sp-step-list {
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.65rem 0.55rem 1.35rem;
    font-size: 0.78rem;
    color: var(--sp-muted);
    line-height: 1.45;
    background: var(--sp-soft);
    border: 1px solid var(--sp-line);
    border-radius: 12px;
    list-style: decimal;
}

.sp-step--focus .sp-step-list {
    background: var(--sp-accent-soft);
    border-color: var(--sp-accent-line);
}

.sp-step-list li + li {
    margin-top: 0.35rem;
}

.sp-step-list__en,
.sp-step-list__ta {
    display: block;
}

.sp-step-list__ta {
    margin-top: 0.12rem;
    font-size: 0.72rem;
    color: var(--sp-muted);
}

body[data-sp-lang="en"] .sp-step-list__ta {
    display: none;
}

body[data-sp-lang="ta"] .sp-step-list__en {
    display: none;
}

body[data-sp-lang="ta"] .sp-step-list__ta {
    font-size: 0.78rem;
    color: var(--sp-ink);
}

.sp-step-card__actions {
    margin-top: 0.15rem;
}

.sp-step-card__actions--edit-done {
    display: none;
}

.sp-step-note-en {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--sp-ink);
}

.sp-edit-callout {
    margin: 0 0 0.65rem;
    padding: 0.75rem 0.8rem;
    border-radius: 12px;
    border: 1.5px solid var(--sp-accent-line);
    background: var(--sp-accent-soft);
}

.sp-edit-callout__badge {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--sp-accent);
}

.sp-edit-callout__badge .sp-lang-en,
.sp-edit-callout__badge .sp-lang-ta,
.sp-edit-callout__badge .sp-lang-both,
.sp-edit-callout__steps .sp-lang-en,
.sp-edit-callout__steps .sp-lang-ta,
.sp-edit-callout__steps .sp-lang-both {
    display: block;
}

.sp-edit-callout__steps {
    margin: 0 0 0.75rem;
    padding-left: 1.15rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--sp-ink);
}

.sp-edit-callout__steps li + li {
    margin-top: 0.35rem;
}

.sp-edit-callout__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.85rem;
    font-size: 0.92rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.25;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.22);
}

@media (min-width: 640px) {
    .sp-edit-callout__btn {
        max-width: 18rem;
    }
}

.sp-step-lock-msg {
    margin: 0;
    font-size: 0.76rem;
    color: var(--sp-muted);
}

.sp-letter-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.sp-btn {
    border-radius: 10px;
    font-weight: 700;
}

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

.sp-btn--primary:hover {
    filter: brightness(1.04);
}

.sp-btn--outline {
    background: var(--sp-surface);
    color: var(--sp-ink);
    border: 1px solid var(--sp-line);
}

.sp-btn--download {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1.5px solid #93c5fd;
    box-shadow: 0 1px 2px rgba(29, 78, 216, 0.08);
}

.sp-btn--download:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

.sp-btn--download.sp-btn--emphasis::before {
    content: '↓ ';
    font-weight: 800;
}

.sp-btn--soft {
    background: var(--sp-soft);
    color: var(--sp-ink);
    border: 1px solid var(--sp-line);
}

.sp-btn--ghost {
    background: transparent;
    color: var(--sp-muted);
    border: 1px dashed var(--sp-line);
}

.sp-btn--emphasis {
    width: 100%;
    min-height: 2.45rem;
}

@media (min-width: 640px) {
    .sp-btn--emphasis {
        width: auto;
        min-width: 11rem;
    }
}

.sp-quick-cta {
    position: sticky;
    bottom: 0.65rem;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
}

.sp-quick-cta__label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.72;
}

.sp-quick-cta__title {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
}

.sp-quick-cta__btn {
    flex-shrink: 0;
    min-width: 3.25rem;
    text-align: center;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    background: #fff;
    color: var(--sp-ink);
    font-weight: 800;
    text-decoration: none;
}

.sp-step-rail__item.is-inview .sp-step-rail__bubble {
    transform: scale(1.06);
}

.sp-step--pulse .sp-step-card {
    animation: spStepPulse 0.85s ease;
}

@keyframes spStepPulse {
    0%, 100% { box-shadow: var(--sp-shadow); }
    50% { box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18), var(--sp-shadow); }
}

.student-portal-page .sp-profile {
    padding-bottom: 0.25rem;
}

@media (max-width: 639px) {
    body.student-portal-page .apply-wrap.sp-shell {
        width: 100%;
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
        padding-left: max(0.85rem, env(safe-area-inset-left));
        padding-right: max(0.85rem, env(safe-area-inset-right));
        padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
    }

    body.student-portal-page .apply-letterhead__main,
    body.apply-page.student-portal-page .apply-letterhead__main {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center;
    }

    body.student-portal-page .sp-auth {
        width: 100%;
        max-width: 22rem;
        margin-left: auto;
        margin-right: auto;
    }

    body.student-portal-page .sp-auth .sp-card {
        border-radius: 14px;
        text-align: left;
    }

    body.student-portal-page--choose .sp-choose {
        width: 100%;
        max-width: 22rem;
        margin-left: auto;
        margin-right: auto;
    }

    body.student-portal-page--profile .sp-profile {
        gap: 0.5rem;
    }

    body.student-portal-page--profile .sp-profile-hero {
        border-radius: 14px;
    }

    body.student-portal-page--profile .sp-command-center {
        padding: 0.8rem 0.75rem 0.7rem;
        text-align: center;
    }

    body.student-portal-page--profile .sp-command-center__top {
        flex-direction: column;
        align-items: center;
        gap: 0.55rem;
    }

    body.student-portal-page--profile .sp-command-center__summary {
        width: 100%;
    }

    body.student-portal-page--profile .sp-command-center__metric {
        justify-content: center;
        flex-wrap: wrap;
    }

    body.student-portal-page--profile .sp-command-center__step,
    body.student-portal-page--profile .sp-command-center__step-ta {
        text-align: center;
    }

    body.student-portal-page--profile .sp-lang-switch {
        align-self: center;
    }

    body.student-portal-page--profile .sp-doc-panel__head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.45rem;
    }

    body.student-portal-page--profile .sp-doc-panel__sub {
        text-align: center;
    }

    body.student-portal-page--profile .sp-step-card__actions {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    body.student-portal-page--profile .sp-step-card__actions .sp-btn,
    body.student-portal-page--profile .sp-edit-callout__btn {
        width: 100%;
        max-width: 18rem;
    }

    body.student-portal-page--profile .sp-letter-links {
        grid-template-columns: 1fr;
        width: 100%;
    }

    body.student-portal-page--profile .sp-letter-link-btn {
        justify-content: center;
        text-align: center;
    }

    body.student-portal-page--profile .sp-upload-actions {
        display: flex;
        justify-content: center;
    }

    body.student-portal-page--profile .sp-upload-actions .sp-btn,
    body.student-portal-page--profile .sp-upload-actions .btn {
        width: 100%;
        max-width: 16rem;
    }

    body.student-portal-page .alert {
        text-align: center;
    }

    .sp-step-rail__label {
        font-size: 0.58rem;
    }

    .sp-lang-switch__btn {
        padding: 0.28rem 0.38rem;
    }

    .sp-step-card__body {
        padding: 0 0.65rem 0.85rem;
    }

    .sp-step-note-en,
    .sp-step-note-ta {
        font-size: 0.82rem;
        line-height: 1.5;
        text-align: left;
    }

    .sp-edit-callout {
        padding: 0.85rem 0.75rem;
        text-align: left;
    }

    .sp-edit-callout__btn {
        margin-left: auto;
        margin-right: auto;
    }

    .sp-edit-callout__steps {
        font-size: 0.8rem;
    }

    .sp-toolkit {
        flex-wrap: wrap;
        justify-content: center;
    }

    .sp-toolkit__hint {
        display: none;
    }
}

/* ── Portal v3: advanced toolkit ── */

.sp-command-center__metric-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.2rem;
}

.sp-ring {
    position: relative;
    width: 3.25rem;
    height: 3.25rem;
    flex-shrink: 0;
}

.sp-ring__svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.sp-ring__track,
.sp-ring__fill {
    fill: none;
    stroke-width: 2.8;
}

.sp-ring__track {
    stroke: var(--sp-line);
}

.sp-ring__fill {
    stroke: var(--sp-accent);
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.sp-ring__label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--sp-ink);
}

.sp-command-center__pct {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--sp-ink);
    line-height: 1.2;
}

.sp-toolkit {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0.45rem 0 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--sp-line);
}

.sp-toolkit__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    border: 1px solid var(--sp-line);
    background: var(--sp-soft);
    color: var(--sp-ink);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
}

.sp-toolkit__btn.is-active {
    background: var(--sp-accent-soft);
    border-color: var(--sp-accent-line);
    color: var(--sp-accent);
}

.sp-toolkit__btn--link:hover {
    filter: brightness(0.98);
}

.sp-toolkit__icon {
    font-size: 0.75rem;
    line-height: 1;
}

.sp-toolkit__hint {
    margin-left: auto;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--sp-muted);
}

.sp-smart-tip {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.55rem;
    border-radius: 10px;
    background: var(--sp-soft);
    border: 1px solid var(--sp-line);
}

.sp-smart-tip__icon {
    flex-shrink: 0;
    font-size: 0.9rem;
    line-height: 1.2;
}

.sp-smart-tip__en,
.sp-smart-tip__ta {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--sp-muted);
}

.sp-smart-tip__ta {
    margin-top: 0.15rem;
    font-size: 0.7rem;
}

body[data-sp-lang="en"] .sp-smart-tip__ta {
    display: none;
}

body[data-sp-lang="ta"] .sp-smart-tip__en {
    display: none;
}

.sp-step-rail__eta {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--sp-muted);
    opacity: 0.85;
}

.sp-coach {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.45rem 0 0;
    padding: 0.45rem 0.55rem;
    font-size: 0.68rem;
    color: var(--sp-muted);
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
}

.sp-coach__dismiss {
    border: none;
    background: #fff;
    color: var(--sp-ink);
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.25rem 0.45rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

body.sp-focus-mode .sp-step:not(.sp-step--focus) {
    display: none;
}

body.sp-focus-mode .sp-step--focus .sp-step-card__body {
    display: block !important;
}

body.sp-focus-mode .sp-step--focus .sp-step-card__toggle {
    pointer-events: none;
}

.sp-upload-meter {
    margin-bottom: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: var(--sp-soft);
    border: 1px solid var(--sp-line);
}

.sp-upload-meter__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.sp-upload-meter__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--sp-muted);
}

.sp-upload-meter__count {
    font-size: 0.72rem;
    color: var(--sp-accent);
}

.sp-upload-meter__track {
    height: 4px;
    background: var(--sp-line);
    border-radius: 999px;
    overflow: hidden;
}

.sp-upload-meter__fill {
    height: 100%;
    background: var(--sp-accent);
    border-radius: 999px;
    transition: width 0.25s ease;
}

.sp-file-drop[data-dropzone] {
    position: relative;
    border: 1.5px dashed var(--sp-line);
    border-radius: 10px;
    padding: 0.55rem;
    min-height: 3.1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.sp-file-drop[data-dropzone] .sp-file-input {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
    border: none;
    background: transparent;
}

.sp-file-drop[data-dropzone] .sp-file-name {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0.55rem 0.35rem;
    text-align: center;
    pointer-events: none;
}

.sp-file-drop[data-dropzone] .sp-file-error {
    position: relative;
    z-index: 4;
    pointer-events: none;
}

.sp-file-drop.is-dragover {
    border-color: var(--sp-accent);
    background: var(--sp-accent-soft);
}

.sp-file-drop.has-file {
    border-style: solid;
    border-color: var(--sp-accent-line);
    background: var(--sp-accent-soft);
}

@media (max-width: 768px) {
    .sp-file-drop[data-dropzone] .sp-file-input {
        position: static;
        inset: auto;
        z-index: 2;
        width: 100%;
        height: auto;
        opacity: 1;
        font-size: 16px;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        background: #fff;
        padding: 0.32rem 0.4rem;
    }

    .sp-file-drop[data-dropzone] .sp-file-name {
        padding: 0.2rem 0 0;
        text-align: left;
    }
}

@media print {
    body.student-portal-page {
        background: #fff;
    }

    .no-print,
    .sp-quick-cta,
    .sp-toolkit,
    .sp-coach,
    .sp-lang-switch,
    .sp-help-chat,
    .sp-portal-float-dock,
    .sp-sticky-bar,
    .sp-profile-edit,
    .sp-contact-quick {
        display: none !important;
    }

    .sp-step {
        display: block !important;
        break-inside: avoid;
    }

    .sp-step-card__body {
        display: block !important;
    }

    .sp-step-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ── Portal v4: easy-first layout ── */

.sp-now-card {
    padding: 1rem 1rem 0.85rem;
    background: var(--sp-surface);
    text-align: center;
}

.sp-now-card__meta {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--sp-muted);
}

.sp-now-card__title {
    margin: 0.55rem 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--sp-ink);
}

.sp-now-card__hint {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--sp-muted);
}

.sp-now-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: var(--sp-accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}

.sp-now-card__btn:hover {
    filter: brightness(1.04);
}

.sp-now-card__docs {
    margin: 0.65rem 0 0;
    font-size: 0.75rem;
    color: var(--sp-muted);
}

.sp-now-card__link {
    display: inline-block;
    margin-top: 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--sp-accent);
    text-decoration: none;
}

.sp-more-tools {
    margin-top: 0.75rem;
    text-align: left;
    border-top: 1px solid var(--sp-line);
    padding-top: 0.55rem;
}

.sp-more-tools summary {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--sp-muted);
    cursor: pointer;
    list-style: none;
}

.sp-more-tools summary::-webkit-details-marker {
    display: none;
}

.sp-more-tools__body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.55rem;
}

.sp-steps-heading {
    margin: 0.65rem 0 0.35rem;
    padding: 0 0.15rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--sp-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sp-steps--easy {
    gap: 0.35rem;
}

.sp-step--done-row .sp-step-card {
    background: var(--sp-soft);
    box-shadow: none;
}

.sp-step--done-row .sp-step-card__body {
    display: none !important;
}

.sp-step-card__head--static,
.sp-step-card__head--done {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem;
}

.sp-step--focus .sp-step-card {
    border-color: var(--sp-accent-line);
}

.sp-step-card__actions .sp-btn--edit-form {
    width: 100%;
    min-height: 2.75rem;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
}

@media (min-width: 640px) {
    .sp-step-card__actions .sp-btn--edit-form {
        max-width: 16rem;
    }
}

.sp-doc-panel--compact {
    padding: 0.55rem 0.65rem;
}

.sp-doc-list--chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
}

.sp-doc-chip {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
    background: var(--sp-soft);
    border: 1px solid var(--sp-line);
    color: var(--sp-muted);
    list-style: none;
}

.sp-doc-chip.is-done {
    background: var(--sp-accent-soft);
    border-color: var(--sp-accent-line);
    color: var(--sp-accent);
}

.sp-doc-chip.is-missing {
    border-style: dashed;
}

.sp-contact-quick--inline {
    padding: 0.45rem 0.65rem;
    text-align: center;
}

.sp-contact-quick--inline .sp-contact-quick__btn {
    width: 100%;
    justify-content: center;
}

body[data-sp-lang="en"] .sp-edit-callout .sp-lang-ta,
body[data-sp-lang="en"] .sp-edit-callout .sp-lang-both {
    display: none !important;
}

body[data-sp-lang="ta"] .sp-edit-callout .sp-lang-en,
body[data-sp-lang="ta"] .sp-edit-callout .sp-lang-both {
    display: none !important;
}

body[data-sp-lang="both"] .sp-edit-callout .sp-lang-en,
body[data-sp-lang="both"] .sp-edit-callout .sp-lang-ta {
    display: none !important;
}

body[data-sp-lang="both"] .sp-edit-callout .sp-lang-both {
    display: block !important;
}

body[data-sp-lang="en"] .sp-hint-ta,
body[data-sp-lang="en"] .sp-step-list__ta,
body[data-sp-lang="en"] .sp-step-card__title-ta,
body[data-sp-lang="en"] .sp-letter-link-btn__ta,
body[data-sp-lang="en"] .sp-rail-ta,
body[data-sp-lang="en"] .sp-now-card__title .sp-hint-ta,
body[data-sp-lang="en"] .sp-command-center__step-ta,
body[data-sp-lang="en"] .sp-step-note-ta,
body[data-sp-lang="en"] .sp-lang-ta,
body[data-sp-lang="en"] .sp-lang-both {
    display: none !important;
}

body[data-sp-lang="ta"] .sp-hint-en,
body[data-sp-lang="ta"] .sp-step-list__en,
body[data-sp-lang="ta"] .sp-step-card__title,
body[data-sp-lang="ta"] .sp-letter-link-btn__main,
body[data-sp-lang="ta"] .sp-rail-en,
body[data-sp-lang="ta"] .sp-now-card__title .sp-hint-en,
body[data-sp-lang="ta"] .sp-now-card__docs .sp-hint-en,
body[data-sp-lang="ta"] .sp-command-center__step,
body[data-sp-lang="ta"] .sp-step-note-en,
body[data-sp-lang="ta"] .sp-lang-en,
body[data-sp-lang="ta"] .sp-lang-both {
    display: none !important;
}

body[data-sp-lang="both"] .sp-lang-en,
body[data-sp-lang="both"] .sp-lang-ta {
    display: none !important;
}

body[data-sp-lang="ta"] .sp-step-card__title-ta {
    display: block !important;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--sp-ink);
}

body[data-sp-lang="ta"] .sp-step-list__ta {
    font-size: 0.8rem;
    color: var(--sp-ink);
}

body[data-sp-lang="both"] .sp-step-card__title-ta {
    display: block;
    margin-top: 0.08rem;
}

body[data-sp-lang="both"] .sp-rail-en,
body[data-sp-lang="both"] .sp-rail-ta {
    display: block;
}

.sp-step-rail--compact {
    margin-top: 0.15rem;
}

.sp-toolkit--compact {
    margin: 0;
    padding: 0;
    border: none;
}
