html, body { min-height: 100%; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: #111; font-size: 14px; }
.portal-body { background: #fff; }
.portal-brand-strip {
    height: 116px;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.portal-brand-logo {
    display: block;
    width: 467px;
    max-width: 52vw;
    height: auto;
    object-fit: contain;
}
.legacy-nav { height: 62px; margin: 0; padding-left: max(0px, calc((100vw - 1760px)/2)); background: linear-gradient(#233754, #07111f); display: flex; align-items: stretch; }
.legacy-nav a { min-width: 98px; padding: 0 22px; color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 17px; }
.legacy-nav a.active { color: #050505; background: linear-gradient(#ff6d19, #f04a00); }
.portal-main { width: 100%; padding-bottom: 30px; }
.welcome-line { font-size: 27px; line-height: 1.2; margin: 4px 20px 24px; }
.legacy-panel { margin: 0 3% 30px; border: 1px solid #d5d5d5; border-radius: 5px 5px 0 0; }
.legacy-panel-title { background: #f2f2f2; padding: 14px 15px; border-bottom: 1px solid #d5d5d5; }
.legacy-panel-body { padding: 30px 12px 6px; }
.report-tabs { display: flex; justify-content: center; margin: -10px 0 32px; }
.tab-button { border: 1px solid #d2d9df; background: #fff; color: #1470c9; padding: 9px 13px; text-decoration: none; font-size: 15px; line-height: 1; }
.tab-button:first-child { border-radius: 4px 0 0 4px; }
.tab-button:last-child { border-radius: 0 4px 4px 0; margin-left: -1px; }
.tab-button.active { background: #337fba; color: #fff; border-color: #337fba; }
.section-heading { font-size: 29px; font-weight: 500; margin: 0 0 22px 0; }
.home-panel .legacy-panel-body { padding: 30px 10px 6px; }
.home-tabs { margin-bottom: 28px; }
.legacy-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legacy-table th, .legacy-table td { border-top: 1px solid #d6dde3; border-bottom: 1px solid #d6dde3; padding: 12px 12px; vertical-align: top; }
.legacy-table th { color: #0066ff; font-family: Georgia, 'Times New Roman', serif; font-weight: 700; background: #fff; }
.legacy-table th.dark-th { color: #111; }
.home-table td { font-size: 16px; }
.home-table th:nth-child(2) { width: 55%; }
.home-action { display: block; width: 100%; color: #fff; text-align: center; text-decoration: none; font-style: italic; font-size: 22px; padding: 10px 10px; border-radius: 4px; margin-top: 8px; }
.home-action-green { background: #26ae49; }
.home-action-blue { background: #0e7ef1; }
.report-panel .legacy-panel-body { padding: 29px 10px 0; }
.report-filter-row { display: flex; align-items: end; min-height: 78px; margin: 0 12px 28px 210px; position: relative; gap: 8px; }
.date-field { width: 180px; }
.date-field label, .additional-filters label { display: block; font-size: 13px; margin-bottom: 3px; }
.filter-icon-btn { width: 28px; height: 34px; border: 0; background: transparent; color: #5ea3be; position: relative; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 19px; }
.filter-icon-btn .plus, .filter-icon-btn .minus { position: absolute; right: 1px; bottom: 0; width: 12px; height: 12px; border-radius: 50%; color: #fff; font: bold 10px/12px Arial; text-align: center; }
.filter-icon-btn .plus { background: #61c84b; }
.filter-icon-btn .minus { background: #ef5c5c; }
.additional-filter-link { position: absolute; right: 12px; bottom: 8px; border: 0; background: transparent; color: #0066ff; }
.additional-filters { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)) auto; gap: 10px; margin: -16px 14px 18px 210px; padding: 12px; background: #f8f9fa; border: 1px solid #e3e3e3; }
.report-table-wrap { border-top: 1px solid #d6dde3; }
.report-table th, .report-table td { padding-top: 11px; padding-bottom: 11px; }
.report-table td { font-size: 13px; }
.completed-table th:nth-child(1), .completed-table td:nth-child(1) { width: 10%; }
.completed-table th:nth-child(2), .completed-table td:nth-child(2) { width: 10%; }
.completed-table th:nth-child(3), .completed-table td:nth-child(3) { width: 11%; }
.completed-table th:nth-child(4), .completed-table td:nth-child(4) { width: 10%; }
.completed-table th:nth-child(5), .completed-table td:nth-child(5) { width: 38%; }
.situation-table th:nth-child(5), .situation-table td:nth-child(5) { width: 30%; }
.link-cell, .link-cell a { color: #0066ff; text-decoration: none; }
.icon-cell { text-align: center; vertical-align: middle !important; }
.pdf-icon { color: #d64040; font-size: 17px; }
.status-orb { display: inline-flex; width: 17px; height: 17px; border-radius: 50%; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #dfffd4, #4a9d34 55%, #1e5f19); color: #fff; font-size: 10px; }
.status-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(#c9ffc9, #19af25); box-shadow: inset 0 0 2px rgba(0,0,0,.3); }
.empty-row { text-align: center; padding: 28px !important; color: #666; }

.popup-body { background: #fafafa; font-size: 14px; }
.popup-header { height: 48px; display: flex; justify-content: space-between; align-items: center; padding-left: 10px; background: linear-gradient(#fbfbfb, #e7e7e7); border-bottom: 1px solid #d1d1d1; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.popup-header h1 { font-size: 29px; font-weight: 400; margin: 0; }
.popup-top-close { height: 38px; align-self: flex-start; border: 1px solid #ccc; border-radius: 0 0 5px 5px; background: linear-gradient(#fff, #e9e9e9); padding: 0 14px; font-size: 16px; }
.popup-content { padding: 27px 28px 34px 54px; }
.course-summary { display: grid; grid-template-columns: 320px 1fr; row-gap: 18px; margin: 0 6px 26px; }
.course-summary dt { font-weight: 400; }
.course-summary dd { margin: 0; }
.popup-table th, .popup-table td { padding: 7px 7px; font-size: 13px; }
.popup-table th { color: #111; }
.popup-table th:first-child { width: 63%; }
.popup-bottom-close { display: block; width: 100%; margin-top: 26px; padding: 9px; border: 1px solid #1f5d8f; border-radius: 6px; color: white; background: linear-gradient(#3b86bc, #1e6194); font-style: italic; font-size: 17px; }

@media (max-width: 900px) {
    .welcome-line { font-size: 22px; }
    .legacy-panel { margin-left: 10px; margin-right: 10px; }
    .report-filter-row, .additional-filters { margin-left: 0; }
    .additional-filters { grid-template-columns: 1fr 1fr; }
    .course-summary { grid-template-columns: 140px 1fr; }
}

/* Login legacy */
.login-body { background: #fff; }
.login-nav { height: 56px; padding-left: 76px; }
.login-page-wrap { padding: 96px 38px 22px; }
.login-title {
    margin: 0 0 32px;
    text-align: center;
    font-size: 37px;
    line-height: 1.1;
    font-weight: 700;
}
.legacy-login-form { width: 100%; }
.login-field { margin-bottom: 16px; }
.login-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 400;
}
.legacy-login-input {
    width: 100%;
    height: 31px;
    border: 1px solid #f1c8c8;
    border-radius: 4px;
    background: #e8f0fb;
    padding: 4px 8px;
    outline: none;
}
.legacy-login-input:focus {
    border-color: #b6cce9;
    box-shadow: 0 0 0 2px rgba(37, 116, 205, .08);
}
.password-field-wrap { position: relative; }
.password-field-wrap .legacy-login-input { padding-right: 42px; }
.password-toggle {
    position: absolute;
    right: 4px;
    top: 1px;
    height: 29px;
    width: 34px;
    border: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1;
}
.legacy-login-button {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    border: 0;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-size: 20px;
    font-style: italic;
    line-height: 44px;
}
.login-enter {
    margin-top: 30px;
    color: #fff;
    background: #0d7cf0;
}
.login-secondary {
    color: #fff;
    background: #77818a;
}
.login-secondary:hover, .login-enter:hover { color: #fff; filter: brightness(.97); }
.login-assistance {
    margin-top: 42px;
    text-align: center;
    font-size: 27px;
    line-height: 1.25;
}
.login-assistance a { color: #087ff5; text-decoration: none; }
.login-error {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #dc3545;
    border-radius: 4px;
    color: #a61e2b;
    background: #fff5f5;
}

@media (max-width: 900px) {
    .portal-brand-strip { height: 90px; }
    .portal-brand-logo { max-width: 70vw; }
    .login-nav { padding-left: 0; }
    .login-page-wrap { padding: 58px 18px 20px; }
    .login-title { font-size: 30px; }
    .login-assistance { font-size: 20px; }
}

.google-auth-wrap { max-width: 760px; margin: 0 auto; }
.google-auth-card { max-width: 520px; margin: 0 auto; }
.google-auth-qr { width: 220px; max-width: 100%; border: 1px solid #ddd; padding: 8px; background: #fff; }
