:root {
    --ckpo-navy: #06233d;
    --ckpo-navy-2: #0b3a63;
    --ckpo-ink: #0f172a;
    --ckpo-text: #101828;
    --ckpo-muted: #667085;
    --ckpo-soft: #f8fafc;
    --ckpo-line: #e5e7eb;
    --ckpo-white: #ffffff;
}

html body.ckpo-standalone-body {
    margin: 0 !important;
    padding: 0 !important;
    background: #f5f7fb;
    overflow-x: hidden;
}

.ckpo-front-page,
.ckpo-front-page * {
    box-sizing: border-box;
}

.ckpo-front-page {
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ckpo-text);
}

.ckpo-front-page a {
    text-decoration: none;
}

/* LOGIN */
.ckpo-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 16px;
    background:
        radial-gradient(circle at 18% 18%, rgba(0, 62, 116, .46), transparent 28%),
        radial-gradient(circle at 80% 20%, rgba(148, 163, 184, .32), transparent 28%),
        linear-gradient(135deg, #030712 0%, #07111f 45%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.ckpo-login-page:before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
}

.ckpo-login-card {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 30px;
    padding: 32px;
    box-shadow: 0 34px 90px rgba(0,0,0,.42);
    backdrop-filter: blur(14px);
}

.ckpo-login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.ckpo-login-logo {
    width: 94px;
    height: 94px;
    border-radius: 26px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #eef2f7;
    box-shadow: 0 16px 44px rgba(15,23,42,.12);
}

.ckpo-login-logo img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    display: block;
}

.ckpo-login-brand span {
    color: var(--ckpo-muted);
    font-size: 12px;
    letter-spacing: .11em;
    text-transform: uppercase;
    font-weight: 850;
}

.ckpo-login-brand h1 {
    margin: 8px 0 8px;
    color: var(--ckpo-ink);
    font-size: 31px;
    line-height: 1.1;
    letter-spacing: -.04em;
    font-weight: 900;
}

.ckpo-login-brand p {
    margin: 0;
    color: #475467;
    line-height: 1.55;
    font-size: 14px;
}

.ckpo-login-form label {
    display: block;
    color: var(--ckpo-ink);
    font-size: 13px;
    font-weight: 800;
    margin: 14px 0 8px;
}

.ckpo-login-form input[type="text"],
.ckpo-login-form input[type="password"] {
    width: 100%;
    min-height: 50px;
    border-radius: 15px;
    border: 1px solid #d0d5dd;
    background: #fff;
    padding: 10px 14px;
    color: var(--ckpo-ink);
    font-size: 16px;
    outline: none;
    transition: .18s ease;
}

.ckpo-login-form input[type="text"]:focus,
.ckpo-login-form input[type="password"]:focus {
    border-color: var(--ckpo-navy-2);
    box-shadow: 0 0 0 4px rgba(11,58,99,.12);
}

.ckpo-login-remember {
    display: flex !important;
    gap: 9px;
    align-items: center;
    margin: 16px 0 !important;
    color: #475467 !important;
}

.ckpo-login-remember input {
    width: 16px;
    height: 16px;
}

.ckpo-front-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 18px;
    border-radius: 15px;
    border: 0;
    background: linear-gradient(135deg, var(--ckpo-navy) 0%, var(--ckpo-navy-2) 100%);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(6,35,61,.25);
}

.ckpo-login-message {
    border-radius: 16px;
    padding: 13px 14px;
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 16px;
    font-weight: 700;
}

.ckpo-login-message.error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.ckpo-login-message.success {
    color: #14532d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.ckpo-login-footer {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #667085;
    font-size: 12px;
}

.ckpo-login-footer a {
    color: var(--ckpo-navy-2);
    font-weight: 800;
}

/* PORTAL */
.ckpo-portal-page {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    background:
        radial-gradient(circle at 86% 0%, rgba(11, 58, 99, .12), transparent 26%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.ckpo-app-sidebar {
    min-height: 100vh;
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    padding: 26px 20px;
    background:
        radial-gradient(circle at 26% 10%, rgba(11, 58, 99, .54), transparent 35%),
        linear-gradient(180deg, #030712 0%, #07111f 54%, #0f172a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 22px;
    box-shadow: 18px 0 44px rgba(15, 23, 42, .14);
    z-index: 5;
}

.ckpo-app-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.ckpo-app-logo {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: 0 18px 44px rgba(0,0,0,.25);
}

.ckpo-app-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
}

.ckpo-app-brand strong {
    display: block;
    color: #fff;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -.02em;
}

.ckpo-app-brand span {
    display: block;
    color: rgba(255,255,255,.62);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 750;
}

.ckpo-app-nav {
    display: grid;
    gap: 8px;
}

.ckpo-app-nav a,
.ckpo-app-sidebar-footer a,
.ckpo-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.70);
    border-radius: 15px;
    padding: 12px 14px;
    font-weight: 850;
    transition: .18s ease;
}

.ckpo-app-nav a span {
    width: 26px;
    height: 26px;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.ckpo-app-nav a:hover,
.ckpo-app-nav a.active,
.ckpo-app-sidebar-footer a:hover,
.ckpo-user-link:hover {
    color: #fff;
    background: rgba(255,255,255,.11);
}

.ckpo-app-sidebar-card {
    margin-top: auto;
    border-radius: 22px;
    padding: 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
}

.ckpo-app-sidebar-card span {
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: .10em;
    font-size: 11px;
    font-weight: 900;
}

.ckpo-app-sidebar-card strong {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.ckpo-app-sidebar-card p {
    margin: 8px 0 0;
    color: rgba(255,255,255,.64);
    line-height: 1.45;
    font-size: 13px;
}

.ckpo-app-sidebar-footer {
    display: grid;
    gap: 8px;
}

.ckpo-app-main {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 28px;
}

.ckpo-app-topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.ckpo-app-topbar > div:first-child span {
    display: block;
    color: var(--ckpo-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .10em;
    font-weight: 900;
}

.ckpo-app-topbar > div:first-child strong {
    display: block;
    color: var(--ckpo-ink);
    font-size: 28px;
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -.04em;
    margin-top: 4px;
}

.ckpo-app-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(229,231,235,.92);
    border-radius: 20px;
    padding: 10px 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.ckpo-app-avatar {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ckpo-navy), var(--ckpo-navy-2));
    color: #fff;
    font-weight: 950;
}

.ckpo-app-user strong {
    display: block;
    color: var(--ckpo-ink);
    font-size: 14px;
    font-weight: 900;
}

.ckpo-app-user span {
    display: block;
    color: var(--ckpo-muted);
    font-size: 12px;
    margin-top: 2px;
}

.ckpo-app-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 28%, rgba(0, 56, 105, .40), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.16), transparent 24%),
        linear-gradient(135deg, #050b14 0%, #0b1220 52%, #1f2937 100%);
    color: #fff;
    border-radius: 32px;
    padding: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 24px;
    align-items: stretch;
    box-shadow: 0 22px 54px rgba(15, 23, 42, .15);
}

.ckpo-app-hero-content span,
.ckpo-app-module-head span {
    color: #cbd5e1;
    font-size: 12px;
    letter-spacing: .11em;
    text-transform: uppercase;
    font-weight: 900;
}

.ckpo-app-hero h1 {
    margin: 10px 0 12px;
    color: #fff;
    font-size: clamp(34px, 4vw, 56px);
    line-height: .98;
    font-weight: 950;
    letter-spacing: -.055em;
}

.ckpo-app-hero p {
    margin: 0;
    color: rgba(255,255,255,.76);
    line-height: 1.65;
    max-width: 820px;
    font-size: 15px;
}

.ckpo-app-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.ckpo-app-hero-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 14px;
    padding: 0 16px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    font-weight: 900;
}

.ckpo-app-hero-actions a:first-child {
    background: #fff;
    color: var(--ckpo-navy);
}

.ckpo-app-status-card {
    border-radius: 24px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.15);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ckpo-app-status-card span {
    color: #cbd5e1;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .10em;
    font-weight: 900;
}

.ckpo-app-status-card strong {
    color: #fff;
    font-size: 26px;
    line-height: 1;
    margin-top: 10px;
    font-weight: 950;
    letter-spacing: -.04em;
}

.ckpo-app-status-card p {
    margin: 12px 0 0;
    color: rgba(255,255,255,.72);
}

.ckpo-app-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.ckpo-app-metrics article,
.ckpo-app-module {
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(229,231,235,.98);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
}

.ckpo-app-metrics article span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: var(--ckpo-navy);
    font-size: 12px;
    font-weight: 950;
}

.ckpo-app-metrics article strong {
    display: block;
    color: var(--ckpo-ink);
    margin-top: 16px;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -.03em;
}

.ckpo-app-metrics article p,
.ckpo-app-module p {
    margin: 9px 0 0;
    color: #475467;
    line-height: 1.6;
    font-size: 14px;
}

.ckpo-app-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.ckpo-app-module-wide {
    grid-column: 1 / -1;
}

.ckpo-app-module-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.ckpo-app-module-head span {
    color: var(--ckpo-navy-2);
}

.ckpo-app-module-head h2 {
    margin: 6px 0 0;
    color: var(--ckpo-ink);
    font-size: 24px;
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -.04em;
}

.ckpo-app-module-head strong {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 12px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 950;
}

.ckpo-app-progress {
    margin-top: 18px;
}

.ckpo-app-progress > div {
    height: 11px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.ckpo-app-progress > div span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--ckpo-navy), var(--ckpo-navy-2));
}

.ckpo-app-progress small {
    display: block;
    margin-top: 8px;
    color: var(--ckpo-muted);
    font-weight: 700;
}

.ckpo-app-timeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.ckpo-app-timeline div {
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 16px;
}

.ckpo-app-timeline strong {
    display: block;
    color: var(--ckpo-ink);
    font-size: 14px;
    font-weight: 950;
}

.ckpo-app-timeline span {
    display: block;
    color: var(--ckpo-muted);
    font-size: 13px;
    line-height: 1.45;
    margin-top: 6px;
}

@media (max-width: 1180px) {
    .ckpo-app-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ckpo-app-hero {
        grid-template-columns: 1fr;
    }

    .ckpo-app-status-card {
        max-width: 360px;
    }
}

@media (max-width: 980px) {
    .ckpo-portal-page {
        grid-template-columns: 1fr;
    }

    .ckpo-app-sidebar {
        min-height: auto;
        height: auto;
        position: relative;
        padding: 18px;
        border-radius: 0 0 28px 28px;
    }

    .ckpo-app-brand {
        justify-content: space-between;
    }

    .ckpo-app-logo {
        width: 62px;
        height: 62px;
        border-radius: 18px;
    }

    .ckpo-app-logo img {
        width: 50px;
        height: 50px;
    }

    .ckpo-app-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .ckpo-app-nav::-webkit-scrollbar {
        display: none;
    }

    .ckpo-app-nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .ckpo-app-sidebar-card {
        display: none;
    }

    .ckpo-app-sidebar-footer {
        display: flex;
        flex-wrap: wrap;
    }

    .ckpo-app-main {
        padding: 20px;
    }
}

@media (max-width: 720px) {
    .ckpo-login-card {
        border-radius: 24px;
        padding: 24px;
    }

    .ckpo-login-footer,
    .ckpo-app-topbar,
    .ckpo-app-module-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .ckpo-app-user {
        width: 100%;
    }

    .ckpo-app-main {
        padding: 16px 12px 28px;
    }

    .ckpo-app-hero {
        border-radius: 26px;
        padding: 24px;
    }

    .ckpo-app-hero h1 {
        font-size: clamp(32px, 11vw, 44px);
        line-height: 1;
    }

    .ckpo-app-hero-actions {
        flex-direction: column;
    }

    .ckpo-app-hero-actions a {
        width: 100%;
    }

    .ckpo-app-metrics,
    .ckpo-app-content-grid,
    .ckpo-app-timeline {
        grid-template-columns: 1fr;
    }

    .ckpo-app-module-wide {
        grid-column: auto;
    }

    .ckpo-app-metrics article,
    .ckpo-app-module {
        border-radius: 20px;
        padding: 20px;
    }
}

@media (max-width: 420px) {
    .ckpo-app-sidebar {
        padding: 14px 12px 16px;
    }

    .ckpo-app-brand strong {
        font-size: 16px;
    }

    .ckpo-app-brand span {
        font-size: 11px;
    }

    .ckpo-app-nav a {
        padding: 10px 12px;
        font-size: 13px;
    }

    .ckpo-app-topbar > div:first-child strong {
        font-size: 24px;
    }

    .ckpo-app-user span {
        display: none;
    }
}

/* V0.6 - Portal com dados reais */
.ckpo-portal-notice {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 850;
    border: 1px solid transparent;
}

.ckpo-portal-notice.success {
    color: #14532d;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.ckpo-portal-notice.error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.ckpo-empty-state {
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b !important;
    font-weight: 750;
}

.ckpo-training-list,
.ckpo-assessment-list,
.ckpo-file-list,
.ckpo-project-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.ckpo-training-card,
.ckpo-assessment-form,
.ckpo-project-list > div,
.ckpo-file-list > a {
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    padding: 18px;
}

.ckpo-training-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.ckpo-training-head strong,
.ckpo-project-list strong,
.ckpo-file-list strong {
    display: block;
    color: var(--ckpo-ink);
    font-weight: 950;
    font-size: 16px;
}

.ckpo-training-head span,
.ckpo-project-list span,
.ckpo-file-list span {
    display: block;
    color: var(--ckpo-muted);
    font-size: 13px;
    margin-top: 4px;
}

.ckpo-training-head em {
    flex: 0 0 auto;
    font-style: normal;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 950;
}

.ckpo-lesson-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.ckpo-lesson-list > div {
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 14px;
}

.ckpo-lesson-list strong {
    display: block;
    color: var(--ckpo-ink);
    font-weight: 900;
}

.ckpo-lesson-list span {
    display: block;
    color: var(--ckpo-muted);
    font-size: 13px;
    line-height: 1.45;
    margin-top: 5px;
}

.ckpo-lesson-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ckpo-lesson-actions a,
.ckpo-existing-file {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 0 12px;
    background: #06233d;
    color: #fff !important;
    font-weight: 850;
    font-size: 12px;
}

.ckpo-assessment-title span {
    display: block;
    color: var(--ckpo-navy-2);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ckpo-assessment-title strong {
    display: block;
    color: var(--ckpo-ink);
    font-size: 18px;
    line-height: 1.3;
    margin-top: 6px;
    font-weight: 950;
}

.ckpo-assessment-title em {
    display: block;
    margin-top: 6px;
    color: #027a48;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.ckpo-options {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.ckpo-options label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    color: #344054;
    font-weight: 750;
}

.ckpo-options input {
    margin-top: 2px;
}

.ckpo-upload-field {
    display: block;
    margin: 12px 0;
    color: #344054;
    font-size: 13px;
    font-weight: 850;
}

.ckpo-upload-field span {
    display: block;
    margin-bottom: 8px;
}

.ckpo-upload-field input {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    padding: 11px;
    background: #fff;
}

.ckpo-assessment-form button {
    border: 0;
    border-radius: 14px;
    min-height: 44px;
    padding: 0 16px;
    background: linear-gradient(135deg, var(--ckpo-navy), var(--ckpo-navy-2));
    color: #fff;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(6,35,61,.18);
}

.ckpo-file-list > a {
    display: block;
    text-decoration: none;
}

@media (max-width: 720px) {
    .ckpo-training-head {
        flex-direction: column;
    }

    .ckpo-training-head em {
        align-self: flex-start;
    }

    .ckpo-assessment-form button {
        width: 100%;
    }
}

/* V0.7 - Projetos reais no portal */
.ckpo-project-card p {
    margin: 10px 0 0;
    color: var(--ckpo-muted);
    font-size: 14px;
    line-height: 1.55;
}

.ckpo-project-card em {
    display: block;
    margin-top: 10px;
    font-style: normal;
    color: var(--ckpo-primary);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.45;
}
