/* CLC Student Portal - Stylesheet */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:  #003C78;          /* matches clcinc.org site --navy */
    --navy-dark: #002a56;      /* site --navy-dark (used by the header bg) */
    --yellow: #FCD34E;
    --gold: #F7D24D;
    --gold-hover: #e5c23e;
    --navy-deeper: #001d3d;
    --navy-light: #003B79;
    --gray-bg: #f4f6f9;
    --gray-border: #dde2ea;
    --gray-text: #6b7280;
    --white: #ffffff;
    --error: #dc2626;
    --success: #16a34a;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.10);
    --transition: 0.2s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-bg);
    color: #1a1a2e;
    min-height: 100vh;
}

/* ── Header (matches clcinc.org/demo site header) ── */
.portal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0,42,86,.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
}

.portal-header .header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.portal-header .logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 2rem;
}

.portal-header .logo img {
    height: 42px;
    width: auto;
    filter: brightness(0) invert(1);
}

.portal-header nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.portal-header nav a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-weight: 500;
    font-size: .875rem;
    transition: color .2s;
    letter-spacing: .2px;
    white-space: nowrap;
}

.portal-header nav a:hover { color: var(--white); }
.portal-header nav a.active,
.mobile-menu-inner > a.active {
    color: var(--white);
    font-weight: 700;
}

.portal-header .nav-ctas {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-left: 1rem;
}

/* Header / mobile-menu pill buttons */
.btn-gold,
.btn-outline-white,
.btn-outline-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    padding: .7rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: .875rem;
    text-decoration: none;
    transition: all .3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    letter-spacing: .2px;
}

.btn-gold {
    background: var(--gold);
    color: var(--navy);
}
.btn-gold:hover {
    background: var(--gold-hover);
    box-shadow: 0 6px 20px rgba(247,210,77,.35);
    transform: translateY(-1px);
}
.btn-outline-white {
    border-color: rgba(255,255,255,.35);
    color: var(--white);
    background: transparent;
}
.btn-outline-white:hover {
    border-color: var(--white);
    background: rgba(255,255,255,.08);
}
.btn-outline-gold {
    border-color: var(--gold);
    color: var(--gold);
    background: transparent;
}
.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--navy);
}

.student-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    cursor: default;
    user-select: none;
    letter-spacing: 0.5px;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.student-avatar { cursor: pointer; }
.student-avatar:hover { opacity: 0.85; }

/* ── Avatar dropdown ── */
.avatar-wrap {
    position: relative;
}

.avatar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 200;
}

.avatar-dropdown.open { display: block; }

.avatar-dropdown-header {
    background: var(--navy);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.avatar-dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--navy);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-dropdown-name {
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
}

.avatar-dropdown-role {
    color: rgba(255,255,255,0.65);
    font-size: 12px;
}

.avatar-dropdown-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid var(--gray-border);
}

.avatar-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.avatar-field .label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-text);
}

.avatar-field .value {
    font-size: 13px;
    color: #1a1a2e;
}

.avatar-dropdown-footer {
    padding: 12px 16px;
}

.avatar-dropdown-footer > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.avatar-reset-link {
    background: none;
    border: none;
    color: var(--navy);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
    text-align: left;
}

.avatar-reset-link:hover { color: var(--yellow); }

.coming-soon-tag {
    font-size: 10px;
    background: var(--gray-border);
    color: var(--gray-text);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 6px;
    font-weight: 600;
    vertical-align: middle;
}

.avatar-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 13px;
    color: #1a1a2e;
    box-sizing: border-box;
    outline: none;
}

.avatar-input:focus { border-color: var(--navy); }

.avatar-update-btn {
    width: 100%;
    justify-content: center;
}

.avatar-dropdown .btn-primary {
    background: var(--yellow) !important;
    color: var(--navy) !important;
}

/* ── Header socials ── */
.portal-header .nav-socials {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: 2rem;
}
.portal-header .nav-socials a {
    color: rgba(255,255,255,.5);
    transition: color .2s, transform .2s;
    display: flex;
}
.portal-header .nav-socials a:hover {
    color: var(--gold);
    transform: translateY(-1px);
}
.portal-header .nav-socials svg { width: 16px; height: 16px; }

/* ── Hamburger ── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    z-index: 200;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all .3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Mobile slide-out menu ── */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--navy-deeper);
    z-index: 150;
    transition: right .35s cubic-bezier(.4,0,.2,1);
    padding: 5rem 2rem 2rem;
    overflow-y: auto;
}
.mobile-menu.open { right: 0; }
.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.mobile-menu-inner > a:not(.btn-gold):not(.btn-outline-gold) {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: .75rem 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: color .2s;
}
.mobile-menu-inner > a:not(.btn-gold):not(.btn-outline-gold):hover { color: var(--gold); }
.mobile-menu hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,.1);
    margin: .75rem 0;
}
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 140;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}
.mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.mobile-socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
.mobile-socials a {
    color: rgba(255,255,255,.5);
    transition: color .2s;
    display: flex;
}
.mobile-socials a:hover { color: var(--gold); }
.mobile-socials svg { width: 20px; height: 20px; }

@media (max-width: 768px) {
    .portal-header nav { display: none; }
    .portal-header .nav-socials { display: none; }
    .portal-header .nav-ctas > a,
    .portal-header .nav-ctas > button { display: none; }
    .hamburger { display: flex; }
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--yellow);
    color: var(--navy);
}
.btn-primary:hover { background: #f5c800; }

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.4);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1px solid var(--gray-border);
}
.btn-outline:hover { border-color: var(--navy); }

.btn-danger {
    background: transparent;
    color: #dc2626;
    border: 1px solid #dc2626;
}
.btn-danger:hover { background: #dc2626; color: white; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-full { width: 100%; }

/* ── Auth pages (login, setup, set-password) ── */
.auth-wrapper {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}

.auth-card-header {
    background: var(--navy);
    padding: 28px 32px;
}

.auth-card-header h1 {
    color: var(--white);
    font-size: 22px;
    font-weight: 700;
}

.auth-card-header p {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    margin-top: 4px;
}

.auth-card-body { padding: 32px; }

/* ── Form elements ── */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 15px;
    color: #1a1a2e;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0,42,86,0.08);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--gray-text);
}

.form-footer a, .form-footer button.link-btn {
    color: var(--navy);
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.form-footer a:hover, .form-footer button.link-btn:hover {
    text-decoration: underline;
}

/* ── Alerts ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error);
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--success);
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

/* ── Spinner ── */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,42,86,0.2);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.spinner-white {
    border-color: rgba(255,255,255,0.3);
    border-top-color: white;
}

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

.loading-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--gray-text);
    font-size: 15px;
}

/* ── Dashboard layout ── */
.dashboard-wrapper {
    width: 100%;
    margin: 0;
    padding: 32px 24px;
    box-sizing: border-box;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 24px;
    align-items: start;
}

.dashboard-grid > div:nth-child(2) {
    max-width: 836px;
    width: 100%;
    margin: 0 auto;
}

.dashboard-grid > .right-column {
    justify-self: end;
    width: 280px;
}

/* ── Cards ── */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
}

.card-body { padding: 24px; }

/* ── Student profile card ── */
.profile-card .card-header {
    background: var(--navy);
    border-bottom: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.profile-card .card-header h2 {
    color: var(--white);
    font-size: 18px;
}

.profile-card .card-header p {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.profile-detail {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-detail-item .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-text);
    font-weight: 600;
}

.profile-detail-item .value {
    font-size: 14px;
    color: #1a1a2e;
    font-weight: 500;
}

/* ── Right column ── */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Right column card headers — match profile card branding ── */
.right-column .card-header {
    background: var(--navy);
    border-bottom: none;
}

.right-column .card-header h2 {
    color: var(--white);
}

/* ── Success story card ── */
.success-story-intro {
    font-size: 14px;
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 16px;
}

.success-story-btn {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

/* ── Flow Modal ── */
.flow-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.flow-modal-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow: hidden;
}

.flow-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-border);
    flex-shrink: 0;
}

.flow-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
}

.flow-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--gray-text);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background var(--transition);
}
.flow-modal-close:hover { background: var(--gray-bg); color: #1a1a2e; }

.flow-modal-iframe {
    border: none;
    flex: 1;
    width: 100%;
    min-height: 520px;
}

/* ── File Preview Modal ── */
.file-preview-box { max-width: 960px; }
.file-preview-content { display: flex; flex-direction: column; flex: 1; overflow: auto; }
.file-preview-iframe { border: none; width: 100%; min-height: 70vh; flex: 1; }
.file-preview-img { max-width: 100%; max-height: 75vh; object-fit: contain; display: block; margin: 0 auto; padding: 16px; }
.file-preview-unsupported { display: flex; align-items: center; justify-content: center; padding: 48px; color: var(--gray-text); font-size: 14px; }
.pdf-canvas-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; background: #525659; min-height: 100%; }
.pdf-canvas-page { max-width: 100%; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }

/* ── Transcript Modal ── */
.transcript-modal-box {
    max-width: 760px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.transcript-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.transcript-print-btn {
    font-size: 13px;
    padding: 6px 14px;
}

.transcript-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

/* ── Transcript Document ── */
.tr-document {
    font-family: Georgia, 'Times New Roman', serif;
    color: #1a1a2e;
    font-size: 13px;
    line-height: 1.6;
}

.tr-addresses {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 12px;
}

.tr-address { text-align: left; }
.tr-address-right { text-align: right; }
.tr-address-logo { display: flex; align-items: flex-start; justify-content: center; }

.tr-program {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tr-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.tr-student-name {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.tr-divider {
    border: none;
    border-top: 1px solid #ccc;
    margin: 14px 0;
}

.tr-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 12px;
}

.tr-row {
    display: grid;
    grid-template-columns: 1fr 160px 80px;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

.tr-table-header {
    font-weight: 700;
    border-bottom: 2px solid #ccc;
    padding-bottom: 6px;
    margin-bottom: 2px;
}

.tr-col-name { }
.tr-col-date { text-align: center; }
.tr-col-score { text-align: right; }

.tr-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    margin-top: 4px;
}

/* ── Print Styles ── */
@media print {
    body > *:not(#transcript-modal) { display: none !important; }
    #transcript-modal {
        position: static !important;
        display: block !important;
        background: none !important;
        padding: 0 !important;
    }
    .transcript-modal-box {
        box-shadow: none !important;
        border-radius: 0 !important;
        max-height: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .flow-modal-header { display: none !important; }
    .transcript-content {
        overflow: visible !important;
        padding: 0 !important;
    }
}

/* ── Tabs ── */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid var(--gray-border);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-text);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--yellow); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Enrollment cards ── */
.enrollment-list { display: flex; flex-direction: column; gap: 16px; }

.enrollment-card {
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    transition: var(--transition);
    overflow: hidden;
}

.enrollment-card:hover { border-color: var(--navy); }

.enrollment-card-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    cursor: pointer;
    user-select: none;
    gap: 12px;
}

.enrollment-card-toggle:hover { background: rgba(0,42,86,0.03); }

.enrollment-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.chevron-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    background: var(--yellow);
    color: var(--navy);
    padding: 6px 12px;
    border-radius: var(--radius);
    font-weight: 700;
    transition: background var(--transition);
}
.chevron-wrap:hover { background: #f5c800; }

.chevron-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.2px;
}

.chevron {
    width: 20px;
    height: 20px;
    color: var(--navy);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.enrollment-card.expanded .chevron { transform: rotate(180deg); }

.enrollment-card-info {
    padding: 0 18px 14px;
}

.enrollment-card-body {
    display: none;
    padding: 0 18px 18px;
    border-top: 1px solid var(--gray-border);
}

.enrollment-card.expanded .enrollment-card-body { display: block; }

.enrollment-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-active { background: #dcfce7; color: #15803d; }
.badge-completed { background: #dbeafe; color: #1d4ed8; }
.badge-default { background: #f3f4f6; color: #6b7280; }

.enrollment-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.enrollment-meta-item { font-size: 13px; color: var(--gray-text); }
.enrollment-meta-item strong { color: #374151; }
.enrollment-meta-start { grid-column-start: 1; }

/* ── Enrollment tabs ── */
.enrollment-tabs {
    margin-top: 16px;
    border-top: 1px solid var(--gray-border);
    padding-top: 12px;
}

.enrollment-tabs .tabs {
    margin-bottom: 16px;
}

.enrollment-tab-panel { display: none; }
.enrollment-tab-panel.active { display: block; }

/* ── Progress bar ── */
.progress-wrap { margin-top: 14px; }
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray-text);
    margin-bottom: 6px;
}
.progress-bar-bg {
    height: 8px;
    background: var(--gray-border);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--yellow);
    border-radius: 4px;
    transition: width 0.6s ease;
}
.progress-bar-fill--complete { background: var(--navy); }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-text);
}

.empty-state p { font-size: 15px; }

/* ── Attendance list ── */
.punch-list { overflow-x: auto; }

.attendance-header, .attendance-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 14px;
    min-width: 600px;
    text-align: center;
}

.attendance-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-text);
    border-bottom: 1px solid var(--gray-border);
    margin-bottom: 4px;
}

.attendance-row { border-radius: var(--radius); }
.attendance-row:nth-child(even) { background: var(--gray-bg); }
/* Weekly divider: separates each week of attendance for readability. */
.attendance-row--week-break { border-top: 2px solid var(--gray-border); margin-top: 8px; padding-top: 12px; }

.attendance-date   { color: #374151; font-weight: 500; }
.punch-in-ok       { color: var(--success); font-weight: 600; }
.punch-in-late     { color: #dc2626; font-weight: 600; }
.punch-in-missing  { color: #dc2626; font-weight: 600; }
.punch-out-ok      { color: var(--success); font-weight: 600; }
.punch-out-late    { color: #dc2626; font-weight: 600; }
.punch-out-missing { color: #dc2626; font-weight: 600; }

.attendance-status { font-weight: 600; }
.status-present  { color: var(--success); }
.status-perfect  { color: var(--success); }
.status-excused  { color: var(--success); }
.status-absent   { color: #dc2626; }
.status-late     { color: #d97706; }
.status-holiday  { color: #1d4ed8; }
.status-pending  { color: var(--gray-text); font-weight: 400; }

.attendance-infractions { color: #374151; }
.infraction-count { color: #dc2626; font-weight: 600; }

.attendance-adjustments { color: #374151; }
.attendance-summary-row {
    display: flex;
    gap: 1px;
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius);
    margin-bottom: 8px;
    overflow: hidden;
    min-width: 600px;
}

.attendance-summary-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.15);
}
.attendance-summary-col:last-child { border-right: none; }

.attendance-summary-val {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 4px;
}
.attendance-summary-val.net-white { color: var(--white); }
.attendance-summary-val.net-yellow { color: var(--yellow); }
.attendance-summary-val.net-red { color: #f87171; }

.attendance-summary-lbl {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.7);
}

/* ── Employment tab sections ── */
.emp-section {
    margin-bottom: 24px;
}
.emp-section:last-child { margin-bottom: 0; }

.emp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 8px;
    border-bottom: 2px solid var(--navy);
    margin-bottom: 12px;
}

.emp-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.emp-coming-soon { padding: 20px 0; }

.emp-coming-soon-sub {
    font-size: 12px;
    color: var(--gray-text);
    margin-top: 4px;
}

/* ── Employment list ── */
.employment-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr 1fr 1fr;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 14px;
}

.employment-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-text);
    border-bottom: 1px solid var(--gray-border);
    margin-bottom: 4px;
}

.employment-row:not(.employment-header):nth-child(even) { background: var(--gray-bg); border-radius: var(--radius); }

.emp-status { font-weight: 600; }
.emp-status-current { color: var(--success); }
.emp-status-past    { color: var(--gray-text); }

/* ── Grades list ── */
.grades-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--gray-bg);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--gray-text);
    margin-bottom: 12px;
}

.grades-summary-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grades-summary-right {
    display: flex;
    align-items: center;
    gap: 12px;
}


.grades-avg strong { color: var(--navy); }

.grades-completed { color: var(--gray-text); }

.grades-transcript-btn {
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    padding: 6px 14px;
}

.btn-coming-soon {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.grades-list { overflow-x: auto; }

.grades-header, .grades-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr 1.2fr;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 14px;
    min-width: 520px;
    text-align: center;
}

.grades-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-text);
    border-bottom: 1px solid var(--gray-border);
    margin-bottom: 4px;
}

.grades-row:not(.grades-header):nth-child(even) { background: var(--gray-bg); border-radius: var(--radius); }

.grades-name { font-weight: 500; color: #374151; text-align: left; }

.grade-pass { color: var(--success); font-weight: 600; }
.grade-fail { color: #dc2626; font-weight: 600; }

.grade-status-completed  { color: var(--success); font-weight: 500; }
.grade-status-inprogress { color: #d97706; font-weight: 500; }
.grade-status-assigned   { color: var(--gray-text); }

/* ── Files list (Certificates + Resume) ── */
.files-list { padding: 4px 0; }

.file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 14px;
}

.file-row:nth-child(even) { background: var(--gray-bg); border-radius: var(--radius); }

.file-ext-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    background: var(--navy);
    color: #fff;
    border-radius: 3px;
    padding: 2px 5px;
    min-width: 32px;
    text-align: center;
}

.file-name {
    flex: 1;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 12px;
    color: var(--gray-text);
    white-space: nowrap;
    flex-shrink: 0;
}

.file-view-btn {
    flex-shrink: 0;
    padding: 4px 12px;
    font-size: 13px;
}

/* ── Campus program pills ── */
.campus-programs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.campus-programs a {
    display: inline-block;
    padding: 4px 12px;
    background: #f5f7fa;
    border: 1px solid #dde3ec;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.campus-programs a:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* ── Footer ── */
footer {
    background: #001a38;
    color: rgba(255,255,255,0.6);
    padding: 4rem 0 1.5rem;
    margin-top: 48px;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.footer-logo-text {
    color: var(--yellow);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.footer-brand p {
    margin-top: 1rem;
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-copy {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

footer h4 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul li { margin-bottom: 0.6rem; }

footer ul a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

footer ul a:hover { color: var(--yellow); }

.footer-badge {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    /* minmax(0,1fr) (not 1fr) so the column can shrink below the data tables'
       min-content — otherwise a 580px table stretches every card and overflows
       the whole page past the header/footer. */
    .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
    /* right column is a fixed 280px / right-aligned on desktop — make it
       full-width when the grid collapses (Success Story card was narrow). */
    .dashboard-grid > .right-column { width: 100%; justify-self: stretch; }
    .dashboard-grid > div { min-width: 0; }
    .dashboard-grid > div:nth-child(2) { max-width: none; }
    /* let the wide tables scroll inside their own box instead of pushing the page */
    .enrollment-card, .enrollment-card-body, .enrollment-tab-panel, .tab-panel,
    .emp-section, .emp-section-body, .punch-list, .grades-list { min-width: 0; max-width: 100%; }
    .portal-header .header-inner { padding: 0 1rem; }
    .auth-card-body { padding: 24px; }
    .enrollment-meta { grid-template-columns: 1fr; }

    /* Enrollment tabs wrap instead of forcing the whole card (and page) wider
       than the phone — "Employment/Placement" + 3 others don't fit one row. */
    .enrollment-tabs .tabs,
    .tabs { flex-wrap: wrap; }
    .tab-btn { padding: 10px 14px; font-size: 13px; }

    /* Footer: match the site's 2-up collapse instead of a cramped 5-col */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
    .footer-badge { justify-content: flex-start; }

    /* Data tables: keep columns aligned by scrolling horizontally rather than
       crushing 6 columns into a phone width. (attendance/grades already wrap in
       overflow-x containers; give placement its own and set min-widths.) */
    .emp-section-body { overflow-x: auto; }
    .attendance-header, .attendance-row,
    .grades-header, .grades-row,
    .employment-header, .employment-row { min-width: 580px; }

    /* Transcript modal rows */
    .transcript-content { overflow-x: auto; }
    .tr-table-header, .tr-row { min-width: 420px; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* Toast notification */
#toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--navy);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
    white-space: normal;
    max-width: min(480px, calc(100vw - 48px));
    text-align: center;
}
#toast.toast-success { border-left: 4px solid var(--success); }
#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
