/* Portal IP Cursos - Design System global */
:root {
    --primary: #0B2D5F;
    --primary-dark: #071F43;
    --primary-light: #1F6BFF;
    --accent: #4BB8E8;
    --bg: #F4F8FD;
    --card: #FFFFFF;
    --text: #071B3D;
    --muted: #667085;
    --border: #E5ECF5;
    --success: #22C55E;
    --danger: #DC2626;
    --warning: #F59E0B;
    --radius: 22px;
    --button-radius: 14px;
    --shadow: 0 18px 45px rgba(15, 45, 90, 0.08);
    --shadow-strong: 0 24px 60px rgba(15, 45, 90, 0.12);
    --transition: 180ms cubic-bezier(0.22, 1, 0.36, 1);

    --ip-primary: var(--primary);
    --ip-primary-dark: var(--primary-dark);
    --ip-accent: var(--accent);
    --ip-accent-light: #EAF4FF;
    --ip-bg: var(--bg);
    --ip-surface: var(--card);
    --ip-surface-soft: #F8FBFF;
    --ip-border: var(--border);
    --ip-text-primary: var(--text);
    --ip-text-secondary: var(--muted);
    --ip-text-muted: #98A2B3;
    --ip-success: var(--success);
    --ip-danger: var(--danger);
    --shadow-card: var(--shadow);
    --radius-md: var(--button-radius);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 2px);
}

html,
body {
    min-height: 100%;
}

body,
body.auth-page--student,
.student-page--dashboard,
.student-page--form,
.student-page--success {
    background:
        radial-gradient(circle at 50% 14%, rgba(75, 184, 232, 0.16), transparent 34%),
        radial-gradient(circle at 12% 82%, rgba(31, 107, 255, 0.08), transparent 28%),
        linear-gradient(180deg, #F9FBFF 0%, var(--bg) 54%, #F8FBFF 100%) !important;
}

body.report-studio-page,
body.report-dashboard-page {
    background:
        radial-gradient(circle at 14% 10%, rgba(75, 184, 232, 0.14), transparent 30%),
        radial-gradient(circle at 88% 86%, rgba(31, 107, 255, 0.08), transparent 28%),
        linear-gradient(180deg, #FAFCFF 0%, var(--bg) 100%) !important;
}

body::before,
body.auth-page--student::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    width: auto;
    aspect-ratio: auto;
    background: url("../img/login-bg-symbol.png") center bottom 14% / min(520px, 90vw) auto no-repeat;
    opacity: 0.08;
    transform: none;
    pointer-events: none;
}

body.report-studio-page::before,
body.report-dashboard-page::before {
    display: none;
}

body > * {
    position: relative;
    z-index: 1;
}

.student-page {
    position: relative;
    isolation: isolate;
}

.student-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url("../img/login-bg-symbol.png") center bottom 14% / min(520px, 90vw) auto no-repeat;
    opacity: 0.08;
    pointer-events: none;
}

.student-page > * {
    position: relative;
    z-index: 1;
}

.student-page--form::after {
    display: none !important;
}

.student-main,
.student-page--dashboard .student-main,
.student-main--success {
    position: relative;
    z-index: 1;
}

.student-page--dashboard .student-main,
.student-main--success {
    max-width: 1100px;
}

.student-header,
.student-page .student-header,
.student-page.student-page--dashboard .student-header,
.student-page.student-page--form .student-header,
.student-page.student-page--success .student-header {
    position: sticky;
    top: 0;
    z-index: 120;
    min-height: 64px;
    padding: 8px 24px;
    background:
        radial-gradient(circle at 18% 0%, rgba(75, 184, 232, 0.16), transparent 28%),
        rgba(255, 255, 255, 0.9);
    color: var(--text);
    border-bottom: 1px solid rgba(229, 236, 245, 0.86);
    box-shadow: 0 10px 40px rgba(137, 169, 232, 0.08);
    backdrop-filter: blur(22px);
}

.student-header__inner,
.student-page .student-header__inner,
.student-page.student-page--dashboard .student-header__inner,
.student-page.student-page--form .student-header__inner,
.student-page.student-page--success .student-header__inner {
    width: 100%;
    min-height: 48px;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.brand-mark--portal {
    gap: 10px;
    color: var(--text);
    transition: transform var(--transition), opacity var(--transition);
}

.brand-mark--portal:hover {
    opacity: 0.96;
    transform: translateY(-1px);
}

.brand-mark__logo--portal,
.student-page--dashboard .brand-mark__logo--portal {
    width: 210px;
    height: 54px;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.brand-mark__logo--portal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-mark__copy {
    display: grid;
    gap: 2px;
}

.brand-mark__title,
.student-page--dashboard .brand-mark__title {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.brand-mark__subtitle,
.student-page--dashboard .brand-mark__subtitle {
    color: var(--primary-light);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.icon-button,
.avatar-pill,
.student-header__notify,
.student-header__profile .avatar-pill {
    width: 36px;
    height: 36px;
}

.student-header__nav,
.student-page .student-header__nav,
.student-page.student-page--dashboard .student-header__nav,
.student-page.student-page--form .student-header__nav,
.student-page.student-page--success .student-header__nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.student-header__link,
.student-page .student-header__link,
.student-page.student-page--dashboard .student-header__link,
.student-page.student-page--form .student-header__link,
.student-page.student-page--success .student-header__link {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(31, 107, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.student-header__link:hover,
.student-header__link.is-active,
.student-page .student-header__link:hover,
.student-page .student-header__link.is-active,
.student-page.student-page--dashboard .student-header__link:hover,
.student-page.student-page--dashboard .student-header__link.is-active,
.student-page.student-page--form .student-header__link:hover,
.student-page.student-page--form .student-header__link.is-active,
.student-page.student-page--success .student-header__link:hover,
.student-page.student-page--success .student-header__link.is-active {
    border-color: rgba(31, 107, 255, 0.36);
    background: rgba(234, 244, 255, 0.92);
    color: var(--primary);
    box-shadow: 0 12px 24px rgba(31, 107, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.86);
    transform: translateY(-1px);
}

.student-header__link.is-active,
.student-page .student-header__link.is-active,
.student-page.student-page--dashboard .student-header__link.is-active,
.student-page.student-page--form .student-header__link.is-active,
.student-page.student-page--success .student-header__link.is-active {
    border-bottom-color: rgba(31, 107, 255, 0.36);
}

.student-header__actions {
    gap: 10px;
    margin-left: 8px;
}

.student-header__notify,
.student-header__profile .avatar-pill,
.icon-button.student-header__notify {
    border: 1px solid rgba(229, 236, 245, 0.92);
    background: rgba(255, 255, 255, 0.96);
    color: var(--primary);
    box-shadow: 0 12px 26px rgba(15, 45, 90, 0.08);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.student-header__notify:hover,
.student-header__profile:hover .avatar-pill {
    background: #FFFFFF;
    box-shadow: 0 16px 32px rgba(15, 45, 90, 0.14);
    transform: translateY(-1px);
}

.student-header__profile {
    color: var(--muted);
    transition: color var(--transition), transform var(--transition);
}

.student-header__profile:hover {
    color: var(--primary);
}

.app-card,
.card,
.auth-card,
.question-card,
.student-hero-copy,
.student-progress-card,
.student-pending-card,
.student-profile-card,
.student-profile-hero {
    border: 1px solid rgba(229, 236, 245, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.btn,
button.btn,
a.btn,
.question-card__actions .btn,
.question-card__actions [data-wizard-next] {
    min-height: 44px;
    border-radius: var(--button-radius);
    font-weight: 800;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition), color var(--transition);
}

.btn i,
.question-card__actions [data-wizard-next] i,
.wizard-next-arrow {
    transition: transform var(--transition);
}

.btn:hover i,
.question-card__actions [data-wizard-next]:hover:not(:disabled) i,
.question-card__actions [data-wizard-next]:hover:not(:disabled) .wizard-next-arrow {
    transform: translateX(3px);
}

.btn-primary,
.question-card__actions [data-wizard-next],
.student-pending-card__actions .btn.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 58%, var(--primary-dark) 100%);
    color: #FFFFFF;
    box-shadow: 0 14px 28px rgba(11, 45, 95, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover,
.question-card__actions [data-wizard-next]:hover:not(:disabled) {
    background: linear-gradient(135deg, #2F7BFF 0%, var(--primary) 54%, #061A38 100%);
    box-shadow: 0 18px 34px rgba(11, 45, 95, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.btn-outline {
    border-color: rgba(31, 107, 255, 0.42);
    background: rgba(255, 255, 255, 0.86);
    color: var(--primary-light);
}

.btn-neutral {
    background: #EEF4FB;
    color: var(--primary);
}

.btn-success {
    background: linear-gradient(135deg, #34D399 0%, #16A34A 100%);
    color: #FFFFFF;
}

.btn-danger,
.student-profile-logout {
    border-color: rgba(220, 38, 38, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: var(--danger);
}

.admin-sidebar__brand {
    padding: 18px 16px;
}

.admin-brand-logo {
    width: 100%;
    display: flex;
    justify-content: center;
}

.admin-brand-logo__image,
.admin-sidebar .brand-mark__logo.admin-brand-logo__image {
    width: 188px;
    height: 82px;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.admin-brand-logo__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.admin-sidebar__submenu {
    display: none;
    grid-template-rows: 0fr;
    gap: 0;
    margin-left: 28px;
    margin-top: 0;
    padding-left: 0;
    border-left: 0;
    overflow: hidden;
    opacity: 0;
    transition: grid-template-rows 180ms ease, opacity 180ms ease, margin-top 180ms ease, padding-left 180ms ease;
}

.admin-sidebar__submenu > * {
    min-height: 0;
}

.admin-sidebar__group.is-open .admin-sidebar__submenu {
    display: grid;
    grid-template-rows: 1fr;
    gap: 2px;
    margin-top: 4px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 1;
}

.admin-sidebar__group .admin-sidebar__chevron {
    transition: transform 180ms ease;
}

.admin-sidebar__group.is-open .admin-sidebar__chevron {
    transform: rotate(180deg);
}

.btn:active,
.question-card__actions [data-wizard-next]:active:not(:disabled) {
    transform: scale(0.98);
}

.form-input,
.form-select,
.form-textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    border: 1px solid var(--border);
    border-radius: var(--button-radius);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(31, 107, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(31, 107, 255, 0.12);
    outline: none;
}

.student-hero-section {
    gap: 16px;
}

.student-hero-copy,
.student-progress-card {
    min-height: 140px;
}

.student-pending-illustration-img {
    object-fit: contain;
}

.student-main--success {
    padding-top: 8px;
    padding-bottom: 40px;
}

.success-screen {
    min-height: calc(100vh - 92px);
    place-items: start center;
    padding: 8px 0 24px;
    overflow: visible;
}

.success-screen__confetti {
    position: fixed;
    inset: 0;
    z-index: 999;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

.success-screen__card {
    z-index: 2;
    width: min(100%, 600px);
    gap: 12px;
    padding: 20px 24px 18px;
}

.success-screen__icon-wrap {
    width: 76px;
    height: 76px;
}

.success-screen__icon {
    width: 56px;
    height: 56px;
}

.success-screen__icon i {
    font-size: 28px;
}

.success-screen__copy {
    gap: 6px;
}

.success-screen__copy h1 {
    font-size: clamp(30px, 4.4vw, 44px);
}

.success-screen__entity {
    font-size: clamp(20px, 2.8vw, 28px);
}

.success-screen__facts {
    gap: 8px;
}

.success-screen__fact {
    padding: 4px 8px;
}

.success-screen__button {
    min-height: 46px;
}

@media (min-width: 768px) {
    .student-pending-card__actions .btn {
        width: auto;
        min-width: 220px;
        max-width: 280px;
        justify-self: center;
    }

    .student-form-list .student-pending-card--secondary,
    .student-form-list .student-pending-card--secondary.is-done {
        position: relative;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "actions";
        align-items: stretch;
        gap: 12px;
        min-height: 208px;
        padding: 28px 32px 30px;
        overflow: hidden;
    }

    .student-form-list .student-pending-card--secondary .student-pending-card__main,
    .student-form-list .student-pending-card--secondary.is-done .student-pending-card__main {
        position: relative;
        z-index: 3;
        grid-area: main;
        display: flex;
        align-items: flex-start;
        gap: 18px;
        min-width: 0;
    }

    .student-form-list .student-pending-card--secondary .student-pending-card__content,
    .student-form-list .student-pending-card--secondary.is-done .student-pending-card__content {
        display: grid;
        gap: 10px;
        max-width: min(100%, 56%);
        min-width: 0;
    }

    .student-form-list .student-pending-card--secondary .student-pending-card__content h3,
    .student-form-list .student-pending-card--secondary.is-done .student-pending-card__content h3 {
        flex: none;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        color: var(--text);
        font-size: clamp(34px, 4vw, 42px);
        font-weight: 800;
        line-height: 1.08;
    }

    .student-form-list .student-pending-card--secondary .student-pending-card__content .badge,
    .student-form-list .student-pending-card--secondary.is-done .student-pending-card__content .badge {
        flex: none;
        width: fit-content;
    }

    .student-form-list .student-pending-card--secondary .student-pending-card__visual,
    .student-form-list .student-pending-card--secondary.is-done .student-pending-card__visual {
        position: absolute;
        top: 50%;
        right: 28px;
        z-index: 1;
        width: 34%;
        max-width: 260px;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0.72;
        pointer-events: none;
        transform: translateY(-50%);
    }

    .student-form-list .student-pending-card--secondary .student-pending-illustration-img,
    .student-form-list .student-pending-card--secondary.is-done .student-pending-illustration-img {
        width: 100%;
        max-width: 180px;
        max-height: 180px;
        object-fit: contain;
    }

    .student-form-list .student-pending-card--secondary .student-pending-card__actions,
    .student-form-list .student-pending-card--secondary.is-done .student-pending-card__actions {
        position: relative;
        z-index: 4;
        grid-area: actions;
        display: grid;
        justify-items: center;
        width: 100%;
    }

    .student-form-list .student-pending-card--secondary .student-pending-card__actions .btn,
    .student-form-list .student-pending-card--secondary.is-done .student-pending-card__actions .btn {
        width: auto;
        min-width: 220px;
        max-width: 280px;
        min-height: 48px;
        padding: 0 22px;
        border-radius: 16px;
        font-size: 15px;
        box-shadow: 0 18px 34px rgba(11, 45, 95, 0.18);
    }
}

@media (max-width: 767px) {
    .student-header {
        min-height: 64px;
        padding: 8px 16px;
    }

    .student-header__nav {
        display: none;
    }

    .student-header__actions {
        margin-left: auto;
    }

    .student-header__inner {
        min-height: 48px;
        max-width: 400px;
        margin: 0 auto;
    }

    .brand-mark--portal {
        gap: 0;
    }

    .brand-mark__logo--portal,
    .student-page--dashboard .brand-mark__logo--portal {
        width: 156px;
        height: 44px;
    }

    .brand-mark__title,
    .student-page--dashboard .brand-mark__title {
        font-size: 17px;
    }

    .brand-mark__subtitle,
    .student-page--dashboard .brand-mark__subtitle {
        font-size: 10px;
    }

    .student-page--dashboard .student-main {
        max-width: 400px;
        padding-top: 14px;
    }

    .student-hero-section {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
    }

    .student-hero-copy,
    .student-progress-card {
        min-height: 140px;
        max-height: 155px;
    }

    .student-pending-card,
    .student-pending-card--secondary,
    .student-pending-card--secondary.is-done {
        min-height: 170px;
        max-height: 185px;
    }
}

@media (max-width: 767px) {
    .student-page .student-header__nav,
    .student-page.student-page--dashboard .student-header__nav,
    .student-page.student-page--form .student-header__nav,
    .student-page.student-page--success .student-header__nav {
        display: none;
    }

    .student-page .student-main,
    .student-page--dashboard .student-main,
    .student-page--form .student-main,
    .student-page--success .student-main,
    .student-main--success {
        padding-bottom: 172px;
    }

    .student-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 80;
    }

    .student-bottom-nav__inner {
        max-width: 400px;
    }

    .student-main--success {
        padding-top: 8px;
        padding-bottom: 120px;
    }

    .success-screen {
        min-height: calc(100vh - 150px);
        padding-top: 6px;
    }

    .success-screen__card {
        width: min(100%, 360px);
        gap: 9px;
        padding: 16px 16px 14px;
    }

    .success-screen__facts {
        display: none;
    }

    .success-screen__button {
        width: 100%;
        min-height: 44px;
    }
}
