:root {
    color-scheme: light;
    --brand-green: #1f4b42;
    --brand-cream: #f4efe3;
    --brand-amber: #f4c64b;
    --brand-blue: #1e88e5;
    --brand-text: #1f2d3d;
}
body {
    font-family: "Inter", Arial, sans-serif;
    margin: 0;
    background: #f3f4f6;
    color: var(--brand-text);
}
.site-header {
    background: linear-gradient(120deg, #12352c, #1f5e52);
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.brand-logo {
    height: 72px;
    width: 72px;
    border-radius: 50%;
    object-fit: contain;
    background: transparent;
    padding: 0;
}
.site-header .brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.site-header .brand-title {
    color: #e53935;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.site-header .brand-subtitle {
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.primary-nav,
.auth-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.mobile-menu-toggle {
    display: none;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 2px solid rgba(255,255,255,0.45);
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
}
.mobile-menu-toggle span,
.mobile-menu-toggle::before,
.mobile-menu-toggle::after {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
}
.mobile-menu-toggle::before,
.mobile-menu-toggle::after {
    position: absolute;
}
.mobile-menu-toggle::before {
    transform: translateY(-7px);
}
.mobile-menu-toggle::after {
    transform: translateY(7px);
}
.site-header.menu-open .mobile-menu-toggle span {
    opacity: 0;
}
.site-header.menu-open .mobile-menu-toggle::before {
    transform: rotate(45deg);
}
.site-header.menu-open .mobile-menu-toggle::after {
    transform: rotate(-45deg);
}
.primary-nav a,
.auth-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.5rem 1rem;
    border-radius: 18px;
    border: 2px solid rgba(255,255,255,0.35);
    transition: background 150ms ease, transform 150ms ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.primary-nav a:hover,
.auth-nav a:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}
main {
    padding: 2.5rem 1.5rem;
    max-width: 1160px;
    margin: 0 auto;
}
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(31, 45, 61, 0.08);
}
.pill { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 999px; background: #e3f2fd; color: #1565c0; font-size: 0.8rem; margin-right: 0.4rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.65rem 1.1rem; border: none; border-radius: 999px; background: var(--brand-blue); color: #fff; font-weight: bold; cursor: pointer; transition: background 160ms ease-in-out; }
.btn[disabled], .btn:disabled { background: #90a4ae; cursor: not-allowed; }
.btn:hover { background: #1565c0; }
.btn-outline { background: #fff; color: var(--brand-blue); border: 2px solid var(--brand-blue); }
.btn-outline:hover { background: #bbdefb; }
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    line-height: 60px;
    z-index: 1000;
    text-decoration: none;
    box-shadow: 2px 2px 10px rgba(0,0,0,.3);
    transition: transform 160ms ease;
}
.whatsapp-float:hover {
    transform: translateY(-3px);
}
.whatsapp-float svg {
    width: 34px;
    height: 34px;
    fill: currentColor;
    vertical-align: middle;
}
.message-list { list-style: none; padding: 0; margin: 0 0 1.5rem 0; }
.message { padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 0.6rem; font-weight: 600; }
.message.success { background: #c8e6c9; color: #1b5e20; }
.message.error { background: #ffcdd2; color: #b71c1c; }
.message.info { background: #bbdefb; color: #0d47a1; }
.tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08); }
th, td { padding: 0.9rem 1rem; border-bottom: 1px solid #e2e8f0; text-align: left; }
tr:last-child td { border-bottom: none; }
.status-pill { display: inline-block; padding: 0.3rem 0.75rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.status-pill.in-progress { background: #fff3cd; color: #8a6d3b; }
.status-pill.completed { background: #c8e6c9; color: #2e7d32; }
.status-pill.expired { background: #ffcdd2; color: #c62828; }
form.inline { display: inline; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.question { background: #fff; border-radius: 12px; padding: 1.4rem; margin-bottom: 1.2rem; box-shadow: 0 3px 8px rgba(0,0,0,0.05); }
.options { list-style: none; padding: 0; margin: 1rem 0; }
.option { background: #f1f5f9; border-radius: 8px; padding: 0.6rem 0.8rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.6rem; border: 2px solid transparent; transition: background 120ms ease, border-color 120ms ease; }
.option.selected { border-color: var(--brand-blue); background: #e3f2fd; }
.option.correct { border-color: #2e7d32; background: #e8f5e9; }
.option.partial { border-color: #f9a825; background: #fff8e1; }
.option.incorrect { border-color: #c62828; background: #ffebee; }
.feedback { margin-top: 0.8rem; font-size: 0.9rem; background: #e3f2fd; padding: 0.8rem; border-radius: 8px; }
.meta { font-size: 0.85rem; color: #d2e5de; }
.exam-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    margin-top: 1.25rem;
}
.summary-card {
    background: #f8fafc;
    border: 1px solid #dbe7f3;
    border-radius: 14px;
    padding: 1rem;
}
.highlight-card {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.08), rgba(67, 160, 71, 0.1));
    border: 1px solid rgba(30, 136, 229, 0.2);
}
.access-status-card {
    background: #eef7f0;
    border: 1px solid rgba(31, 75, 66, 0.16);
}
.summary-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #607d8b;
    margin-bottom: 0.35rem;
}
.summary-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f2d3d;
}
.progress-bar {
    width: 100%;
    height: 12px;
    background: #dfe7ef;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.65rem;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e88e5, #43a047);
    border-radius: 999px;
    transition: width 180ms ease-in-out;
}
.exam-alert {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    font-weight: 600;
}
.exam-alert.warning {
    background: #fff4d6;
    color: #7a5a00;
}
.exam-alert.info {
    background: #e3f2fd;
    color: #0d47a1;
}
.dashboard-section {
    margin-bottom: 3rem;
}
.section-heading {
    margin-bottom: 1rem;
}
.section-heading h2 {
    margin: 0.25rem 0 0;
    color: var(--brand-green);
    font-size: 1.55rem;
}
.section-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    background: #e8f5e9;
    color: #1b5e20;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.exam-template-list {
    display: grid;
    gap: 1rem;
}
.exam-template-card {
    position: relative;
    overflow: hidden;
    padding: 1.45rem;
    border: none;
    background:
        linear-gradient(120deg, rgba(18, 53, 44, 0.86), rgba(31, 94, 65, 0.76)),
        url("ENPRACTICA.png") center / cover no-repeat;
    box-shadow: 0 16px 38px rgba(31, 45, 61, 0.1);
}
.exam-template-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: linear-gradient(180deg, var(--brand-green), var(--brand-amber));
}
.exam-template-main {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(390px, auto) minmax(190px, auto);
    gap: 1.35rem;
    align-items: center;
}
.exam-template-card h3 {
    margin: 0.35rem 0 0;
    color: #fff;
    font-size: 1.35rem;
}
.exam-template-tag {
    color: #f4efe3;
    font-weight: 700;
}
.exam-template-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 0.75rem;
}
.exam-template-stat {
    min-height: 72px;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.exam-template-stat span {
    display: block;
    margin-bottom: 0.25rem;
    color: #f4efe3;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.exam-template-stat strong {
    color: #fff;
    font-size: 1.05rem;
}
.exam-template-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 0;
    padding-right: 0.35rem;
    padding-left: 0.25rem;
}
.exam-template-actions select {
    width: 100%;
    min-width: 190px;
    border: 1px solid rgba(31, 75, 66, 0.25);
    background: #fff;
    color: #1f2d3d;
    font-weight: 600;
}
.exam-template-actions .btn {
    width: 100%;
    min-width: 148px;
    box-shadow: 0 10px 22px rgba(30, 136, 229, 0.22);
}
.page-back-link {
    margin-bottom: 1.5rem;
}
.question-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.question-option-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
}
.question-media {
    max-width: 100%;
    overflow: hidden;
    text-align: center;
}
.question-media img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 220px;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    margin: 0 auto;
}
.exam-mobile-actions {
    display: none;
}
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; flex-wrap: wrap; }
.action-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
input[type="text"], input[type="password"], select, textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #cfd8dc;
    font-size: 1rem;
    background: #fff;
}
footer { padding: 1.5rem; text-align: center; font-size: 0.85rem; color: #78909c; }
@media (max-width: 800px) {
    .site-header {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.85rem;
    }
    .site-header .brand {
        min-width: 0;
    }
    .mobile-menu-toggle {
        display: inline-flex;
    }
    .primary-nav,
    .auth-nav {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
    }
    .site-header.menu-open .primary-nav,
    .site-header.menu-open .auth-nav {
        display: flex;
    }
    main { padding: 2rem 1.25rem; }
    .summary-value { font-size: 1.15rem; }
    .exam-template-main {
        grid-template-columns: 1fr;
    }
    .exam-template-stats {
        grid-template-columns: 1fr;
    }
    .exam-template-actions {
        justify-content: stretch;
    }
    .exam-template-actions .btn {
        width: 100%;
    }
}
@media (max-width: 680px) {
    body {
        background-attachment: scroll;
    }
    .site-header {
        position: sticky;
        padding: 1rem 1.1rem;
        gap: 1rem;
    }
    .brand-logo {
        height: 58px;
        width: 58px;
    }
    .site-header .brand-title {
        font-size: 1.35rem;
    }
    .site-header .brand-subtitle {
        font-size: 0.82rem;
        letter-spacing: 0.12em;
    }
    .primary-nav,
    .auth-nav {
        width: 100%;
        gap: 0.65rem;
    }
    .primary-nav a,
    .auth-nav a {
        flex: 1 1 calc(50% - 0.65rem);
        justify-content: center;
        text-align: center;
        font-size: 0.95rem;
        padding: 0.7rem 0.9rem;
    }
    main {
        padding: 1.35rem 0.9rem 5.5rem;
    }
    .card {
        padding: 1.15rem;
        border-radius: 16px;
    }
    .page-back-link,
    .page-back-link.btn,
    .btn,
    .btn-outline {
        width: 100%;
    }
    .question {
        padding: 1rem;
    }
    .question-option-label {
        align-items: flex-start;
    }
    .option {
        padding: 0.85rem 0.9rem;
    }
    .option input[type="checkbox"] {
        margin-top: 0.2rem;
        transform: scale(1.15);
    }
    .form-actions {
        display: none;
    }
    .exam-mobile-actions {
        display: flex;
        position: sticky;
        bottom: 0.75rem;
        z-index: 20;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding: 0.9rem;
        background: rgba(244, 239, 227, 0.96);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(31, 75, 66, 0.12);
        border-radius: 18px;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.15);
    }
    .exam-mobile-actions .meta {
        color: #455a64;
        text-align: center;
    }
    .whatsapp-float {
        width: 56px;
        height: 56px;
        right: 14px;
        bottom: 14px;
        line-height: 56px;
    }
    footer {
        padding: 1rem;
    }
}
