:root {
    --asg-blue: #009fe3;
    --asg-blue-dark: #003b64;
    --asg-navy: #052b45;
    --asg-sky: #e8f7fd;
    --asg-ink: #071f33;
    --asg-muted: #5c7282;
    --asg-border: #d7e8f0;
}

body.asg-aula-page {
    background: #f3f8fb;
    overflow-x: hidden;
}

body.asg-aula-page .site-header,
body.asg-aula-page .site-footer,
body.asg-aula-page header.wp-block-template-part,
body.asg-aula-page footer.wp-block-template-part,
body.asg-aula-page .wp-site-blocks > header,
body.asg-aula-page .wp-site-blocks > footer {
    display: none !important;
}

body.asg-aula-page .entry-title,
body.asg-aula-page .wp-block-post-title,
body.asg-aula-page .page-title {
    display: none !important;
}

body.asg-aula-page .entry-content,
body.asg-aula-page .wp-block-post-content,
body.asg-aula-page main,
body.asg-aula-page .site-main,
body.asg-aula-page .wp-site-blocks,
body.asg-aula-page .wp-site-blocks > *,
body.asg-aula-page .is-layout-constrained,
body.asg-aula-page .wp-block-group,
body.asg-aula-page .wp-block-group__inner-container,
body.asg-aula-page .wp-block-template-part + main {
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    padding: 0 !important;
    width: 100% !important;
}

body.asg-standalone {
    margin: 0;
    padding: 0;
}

/* ── Top nav sticky ────────────────────────────── */
.asg-topnav {
    background: var(--asg-navy);
    box-shadow: 0 2px 16px rgba(5, 43, 69, .22);
    left: 0;
    position: sticky;
    right: 0;
    top: 0;
    z-index: 1000;
}

.asg-topnav-inner {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 0 auto;
    max-width: 1440px;
    padding: 0 24px;
}

.asg-topnav-logo {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    margin-right: 12px;
    padding: 10px 0;
}

.asg-topnav-logo img {
    background: rgba(255,255,255,.92);
    border-radius: 8px;
    height: auto;
    max-width: 130px;
    padding: 5px 10px;
}

.asg-topnav-links {
    align-items: center;
    display: flex;
    flex: 1;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.asg-topnav-links a {
    align-items: center;
    border-radius: 8px;
    color: rgba(255,255,255,.78);
    display: flex;
    font-size: 14px;
    font-weight: 700;
    gap: 7px;
    padding: 10px 14px;
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.asg-topnav-links a:hover,
.asg-topnav-links a.is-active {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.asg-topnav-badge {
    background: var(--asg-blue);
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    padding: 3px 6px;
}

.asg-topnav-user {
    align-items: center;
    border-left: 1px solid rgba(255,255,255,.14);
    display: flex;
    flex-shrink: 0;
    gap: 10px;
    margin-left: 12px;
    padding-left: 16px;
}

.asg-topnav-avatar {
    align-items: center;
    background: var(--asg-blue);
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 14px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
    flex-shrink: 0;
}

.asg-topnav-name {
    color: rgba(255,255,255,.9);
    font-size: 13px;
    font-weight: 700;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asg-topnav-logout {
    align-items: center;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    color: rgba(255,255,255,.8);
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    padding: 7px 12px;
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.asg-topnav-logout:hover {
    background: rgba(255,255,255,.2);
    color: #fff;
}

/* ── Aula body (debajo del topnav) ─────────────── */
.asg-aula {
    background: #f3f8fb;
    box-sizing: border-box;
    color: var(--asg-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    left: 0;
    min-height: 100vh;
    position: absolute;
    top: 0;
    width: 100%;
}

.asg-aula-body {
    margin: 0 auto;
    max-width: 1440px;
    padding: 28px 24px 48px;
    width: min(100%, 1440px);
}

/* ── Login / Register Gate ────────────────────────────── */
.asg-login-gate {
    bottom: 0;
    box-sizing: border-box;
    color: var(--asg-ink);
    display: flex;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    left: 0;
    overflow-y: auto;
    padding: 32px 16px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #ddeef8 0%, #eaf5fb 50%, #f0f8fd 100%);
    align-items: flex-start;
    justify-content: center;
}

.asg-login-panel {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 28px 80px rgba(5, 43, 69, .18), 0 2px 8px rgba(5,43,69,.06);
    display: grid;
    grid-template-columns: 400px 1fr;
    margin: auto;
    min-height: 580px;
    overflow: hidden;
    width: min(920px, 100%);
}

.asg-register-panel {
    grid-template-columns: 360px 1fr;
    min-height: 0;
    align-self: flex-start;
    margin: auto;
}

/* ── Hero panel (left) ── */
.asg-login-copy {
    background:
        linear-gradient(170deg, rgba(5,43,69,.88) 0%, rgba(0,80,140,.70) 55%, rgba(0,159,227,.55) 100%),
        linear-gradient(135deg, var(--asg-navy), var(--asg-blue));
    background-position: center;
    background-size: cover;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 40px 36px;
    position: relative;
}

.asg-login-copy::after {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    bottom: -80px;
    content: "";
    height: 240px;
    position: absolute;
    right: -60px;
    width: 240px;
}

.asg-login-hero-logo {
    background: rgba(255,255,255,.96);
    border-radius: 10px;
    display: block;
    height: auto;
    margin-bottom: auto;
    max-width: 160px;
    padding: 8px 14px;
    position: relative;
    z-index: 1;
}

.asg-login-hero-tagline {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 16px;
    position: relative;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
    z-index: 1;
}

.asg-login-hero-bullets {
    color: rgba(255,255,255,.85);
    font-size: 13px;
    font-weight: 600;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.asg-login-hero-bullets li {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.asg-login-hero-bullets li::before {
    background: var(--asg-blue);
    border-radius: 50%;
    content: "";
    flex-shrink: 0;
    height: 7px;
    width: 7px;
}

/* ── Form panel (right) ── */
.asg-login-form {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: 100vh;
    overflow-y: auto;
    padding: 44px 42px;
}

.asg-login-panel-logo {
    display: block;
    height: auto;
    margin-bottom: 24px;
    max-width: 130px;
}

.asg-login-panel-title {
    color: var(--asg-navy);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 6px;
}

.asg-login-panel-sub {
    color: var(--asg-ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    margin: 0 0 24px;
    opacity: .75;
}

/* Labels */
.asg-login-form label,
.asg-login-form > form > p > label {
    color: var(--asg-muted);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

/* WordPress wp_login_form label wraps br + input */
.asg-login-form label > br {
    display: none;
}

/* Inputs */
.asg-login-form input[type="text"],
.asg-login-form input[type="email"],
.asg-login-form input[type="password"] {
    background: #f7fbfd;
    border: 1.5px solid #d8e8f0;
    border-radius: 10px;
    box-sizing: border-box;
    color: var(--asg-ink);
    font-size: 15px;
    height: 48px;
    outline: none;
    padding: 0 14px;
    transition: border-color .18s, box-shadow .18s, background .18s;
    width: 100%;
}

.asg-login-form input[type="text"]:focus,
.asg-login-form input[type="email"]:focus,
.asg-login-form input[type="password"]:focus {
    background: #fff;
    border-color: var(--asg-blue);
    box-shadow: 0 0 0 3px rgba(0,159,227,.13);
}

.asg-login-form input[type="file"] {
    background: #f7fbfd;
    border: 1.5px dashed #c8dce8;
    border-radius: 10px;
    box-sizing: border-box;
    color: var(--asg-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 11px 14px;
    width: 100%;
}

/* <p> field wrappers */
.asg-login-form > form > p,
.asg-login-form .asg-field {
    margin: 0 0 14px;
}

/* 2-col grid for register form */
.asg-form-grid {
    display: grid;
    gap: 14px 18px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 14px;
}

.asg-field-full {
    grid-column: 1 / -1;
}

/* Checkbox remember */
.asg-login-form .login-remember {
    margin-bottom: 14px;
}

.asg-login-form .login-remember label {
    align-items: center;
    display: flex;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    letter-spacing: 0;
    text-transform: none;
}

/* Submit button */
.asg-login-form .button,
.asg-login-form button[type="submit"],
.asg-login-form input[type="submit"] {
    background: var(--asg-navy);
    border: 0;
    border-radius: 12px;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    height: 50px;
    letter-spacing: .02em;
    transition: background .2s, transform .15s, box-shadow .2s;
    width: 100%;
}

.asg-login-form .button:hover,
.asg-login-form button[type="submit"]:hover,
.asg-login-form input[type="submit"]:hover {
    background: var(--asg-blue);
    box-shadow: 0 6px 20px rgba(0,159,227,.3);
    transform: translateY(-1px);
}

.asg-login-form .asg-notice {
    margin-top: 0;
}

/* Footer links */
.asg-login-links {
    margin: 8px 0 0;
    text-align: center;
}

.asg-login-links a {
    color: var(--asg-blue-dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.asg-login-links a:hover {
    color: var(--asg-blue);
    text-decoration: underline;
}

.asg-aula-header {
    align-items: center;
    background: linear-gradient(135deg, var(--asg-navy), var(--asg-blue-dark));
    border: 1px solid rgba(0, 159, 227, .28);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(5, 43, 69, .12);
    color: #fff;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 28px;
}

.asg-aula-header span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.asg-aula-header h2 {
    color: #fff;
    font-size: 34px;
    line-height: 1.1;
    margin: 8px 0 0;
}

.asg-aula-kpis {
    display: flex;
    gap: 10px;
}

.asg-aula-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.asg-aula-nav a {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 9px 13px;
    text-decoration: none;
}

.asg-aula-nav a:hover {
    background: #fff;
    color: var(--asg-blue-dark);
}

.asg-aula-kpis div {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 8px;
    min-width: 112px;
    padding: 12px 14px;
}

.asg-aula-kpis strong {
    color: #fff;
    display: block;
    font-size: 26px;
    line-height: 1;
}

.asg-aula-kpis span {
    color: #e8f7fd;
    display: block;
    font-size: 12px;
    letter-spacing: 0;
    margin-top: 6px;
    text-transform: none;
}

.asg-aula-session {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
    text-align: right;
}

.asg-aula-session strong {
    color: #fff;
    font-size: 16px;
    line-height: 1.2;
}

.asg-aula-session .asg-button {
    margin-top: 2px;
}

.asg-button-light {
    background: #fff;
    color: var(--asg-blue-dark);
}

.asg-button-light:hover {
    background: #e8f7fd;
    color: var(--asg-blue-dark);
}

/* ── Tarjetas de curso ─────────────────────────── */
.asg-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.asg-course-view {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.asg-module,
.asg-topic {
    background: #fff;
    border: 1px solid var(--asg-border);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(5, 43, 69, .05);
    padding: 20px;
}

.asg-course-card {
    background: #fff;
    border: 1px solid var(--asg-border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(5, 43, 69, .06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow .18s, transform .18s;
}

.asg-course-card:hover {
    box-shadow: 0 16px 40px rgba(5, 43, 69, .14);
    transform: translateY(-2px);
}

.asg-course-card-thumb {
    background: linear-gradient(135deg, var(--asg-navy) 0%, var(--asg-blue-dark) 100%);
    height: 120px;
    position: relative;
}

.asg-course-card-thumb-img {
    height: 100%;
    left: 0;
    object-fit: cover;
    position: absolute;
    top: 0;
    width: 100%;
}

.asg-course-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

.asg-card-topline {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.asg-card-topline span {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 4px 10px;
    text-transform: uppercase;
}

.asg-card-topline span.is-enrolled {
    background: #dceefb;
    color: #075a96;
}

.asg-card-topline span.is-available {
    background: var(--asg-sky);
    color: var(--asg-muted);
}

.asg-course-card h3 {
    color: var(--asg-navy);
    font-size: 19px;
    line-height: 1.25;
    margin: 0 0 8px;
}

.asg-course-card p {
    color: var(--asg-muted);
    flex: 1;
    font-size: 14px;
    margin: 0 0 14px;
}

.asg-course-view h2,
.asg-module h3 {
    margin-top: 0;
}

.asg-course-hero {
    background: linear-gradient(135deg, var(--asg-navy) 0%, #0a3d62 100%);
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    color: #fff;
    margin-bottom: 32px;
    min-height: 220px;
    overflow: hidden;
    position: relative;
}

.asg-course-hero.has-cover::before {
    background: linear-gradient(135deg, rgba(5,43,69,.88) 0%, rgba(5,43,69,.55) 100%);
    bottom: 0;
    content: "";
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.asg-course-hero-inner {
    padding: 36px 40px;
    position: relative;
    z-index: 1;
}

.asg-course-hero-label {
    color: rgba(255,255,255,.7);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.asg-course-hero h2 {
    color: #fff;
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 10px;
    max-width: 680px;
}

.asg-course-hero p {
    color: rgba(255,255,255,.8);
    font-size: 15px;
    margin: 0 0 20px;
    max-width: 580px;
}

.asg-course-hero .asg-progress {
    margin: 0;
    max-width: 400px;
}

.asg-course-hero .asg-progress-label {
    color: rgba(255,255,255,.85);
}

.asg-course-hero .asg-progress-track {
    background: rgba(255,255,255,.25);
}

.asg-course-hero .asg-progress-track span {
    background: var(--asg-blue);
}

.asg-course-meta {
    display: flex;
    gap: 10px;
    margin: 14px 0;
}

.asg-course-meta span {
    background: var(--asg-sky);
    border: 1px solid var(--asg-border);
    border-radius: 999px;
    color: var(--asg-blue-dark);
    font-size: 13px;
    font-weight: 700;
    padding: 5px 10px;
}

.asg-badge {
    background: var(--asg-navy);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    margin: 0 8px 12px 0;
    padding: 6px 10px;
}

.asg-button,
.asg-resource {
    align-items: center;
    background: var(--asg-blue-dark);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    text-decoration: none;
}

.asg-button:hover,
.asg-resource:hover {
    background: var(--asg-blue);
    color: #fff;
}

.asg-aula-session .asg-button-light {
    background: #fff;
    color: var(--asg-blue-dark);
}

.asg-aula-session .asg-button-light:hover {
    background: #e8f7fd;
    color: var(--asg-blue-dark);
}

.asg-button-secondary {
    background: var(--asg-navy);
    margin-left: 8px;
}

.asg-button-secondary:hover {
    background: #071b19;
}

.asg-notice {
    background: var(--asg-sky);
    border: 1px solid rgba(0, 159, 227, .32);
    border-radius: 8px;
    color: var(--asg-ink);
    font-weight: 700;
    padding: 14px 16px;
}

.asg-progress {
    margin: 14px 0 18px;
}

.asg-progress-label {
    align-items: center;
    display: flex;
    font-size: 13px;
    justify-content: space-between;
    margin-bottom: 6px;
}

.asg-progress-label strong {
    color: var(--asg-blue-dark);
}

.asg-progress-track {
    background: #d9e2e1;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.asg-progress-track span {
    background: var(--asg-blue-dark);
    display: block;
    height: 100%;
}

.asg-cover {
    display: none;
}

/* ── Stepper de módulos ────────────────────────── */
.asg-module-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 24px;
    position: relative;
}

.asg-module-list::before {
    background: var(--asg-border);
    bottom: 0;
    content: "";
    left: 27px;
    position: absolute;
    top: 0;
    width: 2px;
    z-index: 0;
}

.asg-topic-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.asg-course-intro {
    background: #fff;
    border: 1px solid #d9e2e1;
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 18px;
}

.asg-course-intro h3,
.asg-required-documents h4 {
    margin-top: 0;
}

.asg-required-documents {
    border-top: 1px solid #d9e2e1;
    margin-top: 16px;
    padding-top: 16px;
}

.asg-required-document {
    align-items: flex-start;
    background: #f7f9f8;
    border: 1px solid var(--asg-border);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    margin-top: 12px;
    padding: 14px;
}

.asg-required-document h5 {
    font-size: 16px;
    margin: 0 0 6px;
}

.asg-document-status {
    color: #405452;
    margin-bottom: 0;
}

.asg-document-actions form {
    display: grid;
    gap: 8px;
}

.asg-document-actions input[type="file"] {
    background: #f7fbfd;
    border: 1.5px dashed #c8dce8;
    border-radius: 10px;
    box-sizing: border-box;
    color: var(--asg-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 10px 14px;
    width: 100%;
}

/* ── Módulo stepper ────────────────────────────── */
.asg-module {
    background: #fff;
    border: 1px solid var(--asg-border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 20px 20px 20px 72px;
    position: relative;
    z-index: 1;
}

.asg-module:last-child {
    margin-bottom: 0;
}

.asg-module.is-completed {
    background: #f0f9ff;
    border-color: var(--asg-blue);
}

.asg-module.is-locked {
    background: #f8fafc;
    border-color: #dde6ef;
    opacity: .76;
}

.asg-module-heading {
    align-items: flex-start;
    display: flex;
    gap: 0;
    position: relative;
}

.asg-module-heading > span {
    align-items: center;
    background: var(--asg-navy);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--asg-navy);
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    height: 40px;
    justify-content: center;
    left: -52px;
    position: absolute;
    top: -2px;
    width: 40px;
    z-index: 2;
}

.asg-module.is-completed .asg-module-heading > span {
    background: var(--asg-blue);
    box-shadow: 0 0 0 2px var(--asg-blue);
}

.asg-module.is-locked .asg-module-heading > span {
    background: #8ca3bb;
    box-shadow: 0 0 0 2px #8ca3bb;
}

.asg-module-heading h3 {
    font-size: 17px;
    margin: 0 0 4px;
}

.asg-step-status {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    margin: 0;
    text-transform: uppercase;
}

.asg-module:not(.is-locked):not(.is-completed) .asg-step-status { color: var(--asg-blue); }
.asg-module.is-completed .asg-step-status { color: var(--asg-blue); }
.asg-module.is-locked .asg-step-status { color: #8ca3bb; }

/* ── Acordeón de temas ─────────────────────────── */
.asg-topic {
    border-radius: 8px;
    border: 1px solid var(--asg-border);
    overflow: hidden;
    padding: 0;
    transition: border-color .15s;
}

.asg-topic summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-size: 14px;
    font-weight: 700;
    gap: 10px;
    justify-content: space-between;
    list-style: none;
    padding: 14px 16px;
    user-select: none;
}

.asg-topic summary::-webkit-details-marker { display: none; }

.asg-topic summary::after {
    color: #8ca3bb;
    content: "›";
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform .2s;
}

.asg-topic[open] summary::after {
    transform: rotate(-90deg);
}

.asg-topic.is-completed {
    border-color: var(--asg-blue);
    background: #f0f9ff;
}

.asg-topic.is-locked {
    background: #f8fafc;
    border-color: #dde6ef;
    opacity: .74;
}

.asg-topic-status,
.asg-completed-label {
    color: var(--asg-blue-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.asg-topic-status {
    background: var(--asg-sky);
    border-radius: 999px;
    flex-shrink: 0;
    padding: 3px 9px;
}

.asg-topic.is-completed .asg-topic-status {
    background: #dceefb;
    color: #075a96;
}

.asg-topic-status.is-locked {
    background: #eef2f1;
    color: #8ca3bb;
}

.asg-locked-message,
.asg-locked-assessment {
    background: #fff7e6;
    border: 1px solid #f2c94c;
    border-radius: 8px;
    color: #5f4b10;
    font-weight: 700;
    margin-top: 14px;
    padding: 14px 16px;
}

.asg-locked-assessment strong {
    color: var(--asg-ink);
    display: block;
    margin-bottom: 4px;
}

.asg-locked-assessment p {
    margin: 0;
}

.asg-topic-content {
    border-top: 1px solid #d9e2e1;
    margin-top: 12px;
    padding-top: 12px;
}

.asg-topic-image {
    border-radius: 8px;
    display: block;
    height: auto;
    margin: 16px 0;
    max-width: 100%;
}

.asg-complete-form {
    border-top: 1px solid #d9e2e1;
    margin-top: 16px;
    padding-top: 16px;
}

.asg-login-hint {
    color: #5f4b10;
    font-weight: 700;
}

.asg-locked-course {
    background: #fff7e6;
    border: 1px solid #f2c94c;
    border-radius: 8px;
    margin-top: 18px;
    padding: 18px;
}

.asg-enroll-form {
    margin-top: 12px;
}

.asg-quiz-panel {
    background: #fff;
    border: 1px solid #d9e2e1;
    border-radius: 8px;
    margin-top: 18px;
    overflow: hidden;
}

.asg-quiz-panel > summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    list-style-position: inside;
    padding: 16px 18px;
}

.asg-quiz-panel > summary span {
    color: var(--asg-blue-dark);
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.asg-quiz-panel > summary strong {
    color: var(--asg-ink);
    display: block;
    font-size: 17px;
}

.asg-quiz-panel > summary em {
    background: #eef2f1;
    border-radius: 999px;
    color: #405452;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    padding: 6px 9px;
}

.asg-quiz {
    border-top: 1px solid #d9e2e1;
    padding: 20px;
}

.asg-evaluation-header {
    align-items: flex-start;
    border-bottom: 1px solid #d9e2e1;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.asg-evaluation-header span {
    color: var(--asg-blue-dark);
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.asg-evaluation-header h3 {
    margin-bottom: 8px;
}

.asg-evaluation-header p {
    color: #405452;
    margin: 0;
}

.asg-evaluation-status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    padding: 7px 10px;
    white-space: nowrap;
}

.asg-evaluation-status.is-pending {
    background: #eef2f1;
    color: #405452;
}

.asg-evaluation-status.is-passed {
    background: var(--asg-sky);
    color: var(--asg-blue-dark);
}

.asg-evaluation-status.is-failed,
.asg-evaluation-status.is-locked {
    background: #fff7e6;
    color: #8a5a00;
}

.asg-evaluation-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 16px;
}

.asg-evaluation-summary div {
    background: #f7f9f8;
    border: 1px solid var(--asg-border);
    border-radius: 8px;
    padding: 12px;
}

.asg-evaluation-summary span {
    color: #405452;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.asg-evaluation-summary strong {
    color: var(--asg-ink);
    display: block;
    font-size: 18px;
}

.asg-quiz-timer.is-warning {
    color: #8a5a00;
}

.asg-quiz-timer.is-expired {
    color: #b42318;
}

.asg-quiz-start {
    background: #f7f9f8;
    border: 1px solid var(--asg-border);
    border-radius: 8px;
    margin-top: 14px;
    padding: 16px;
}

.asg-quiz-start h4 {
    margin-top: 0;
}

.asg-quiz-start ul {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 14px 0;
    padding-left: 18px;
}

.asg-quiz h3,
.asg-certificate-box h3,
.asg-my-certificates h2 {
    margin-top: 0;
}

.asg-quiz-result {
    align-items: center;
    background: var(--asg-sky);
    border-radius: 8px;
    color: var(--asg-ink);
    display: flex;
    justify-content: space-between;
    margin: 14px 0;
    padding: 14px;
}

.asg-quiz-result span {
    color: var(--asg-blue-dark);
    font-size: 24px;
    font-weight: 800;
}

.asg-question {
    border: 1px solid #d9e2e1;
    border-radius: 8px;
    margin: 16px 0;
    padding: 14px;
}

.asg-question legend {
    font-weight: 800;
    padding: 0 8px;
}

.asg-question.is-correct {
    border-color: var(--asg-blue);
    background: #f3faf8;
}

.asg-question.is-wrong {
    border-color: #c27803;
    background: #fff7e6;
}

.asg-answer {
    align-items: center;
    background: #f7f9f8;
    border: 1px solid var(--asg-border);
    border-radius: 8px;
    display: flex;
    gap: 8px;
    margin: 10px 0;
    padding: 10px 12px;
}

.asg-question-feedback {
    border-top: 1px solid var(--asg-border);
    font-weight: 700;
    margin-top: 12px;
    padding-top: 12px;
}

.asg-certificate-box,
.asg-my-certificates {
    background: #fff;
    border: 1px solid var(--asg-border);
    border-radius: 12px;
    margin-top: 18px;
    padding: 18px;
}

.asg-certificate-box.is-issued {
    background: #f3fbff;
    border-color: var(--asg-blue);
}

.asg-certificate-box code,
.asg-certificate-card code {
    background: var(--asg-sky);
    border-radius: 6px;
    color: var(--asg-ink);
    padding: 4px 6px;
}

.asg-practices-box {
    background: #f7fcff;
}

.asg-practice-session-list {
    display: grid;
    gap: 12px;
}

.asg-practice-session {
    align-items: center;
    background: #fff;
    border: 1px solid #d9e2e1;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px;
}

.asg-practice-session p {
    margin: 6px 0 0;
}

.asg-certificate-list {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.asg-certificate-card {
    border: 1px solid var(--asg-border);
    border-radius: 12px;
    padding: 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.asg-cert-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 4px;
    width: fit-content;
}

.asg-cert-sia {
    background: #0A2050;
    color: #fff;
}

.asg-cert-pa {
    background: #0984D6;
    color: #fff;
}

.asg-cert-carnet {
    background: linear-gradient(90deg, #0A2050, #0984D6);
    color: #fff;
}

.asg-certificate-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--asg-navy);
    margin: 0;
}

.asg-cert-hours {
    font-size: 12px;
    font-weight: 700;
    color: var(--asg-blue);
    margin: 0;
}

.asg-cert-date {
    font-size: 12px;
    color: var(--asg-muted);
    margin: 0;
}

.asg-cert-code {
    font-size: 11px;
    color: var(--asg-muted);
    margin: 0;
}

.asg-cert-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.asg-empty {
    background: #fff7e6;
    border: 1px solid #f2c94c;
    border-radius: 8px;
    padding: 16px;
}

@media (max-width: 760px) {
    /* Topnav móvil */
    .asg-topnav-inner {
        padding: 0 14px;
    }

    .asg-topnav-logo img {
        max-width: 100px;
    }

    /* Fix 1: topnav links scroll horizontal sin ocultar Prácticas/Certificados */
    .asg-topnav-inner {
        padding: 0 12px;
        gap: 4px;
    }

    .asg-topnav-links {
        gap: 0;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-shrink: 1;
    }

    .asg-topnav-links::-webkit-scrollbar {
        display: none;
    }

    .asg-topnav-links li {
        flex-shrink: 0;
    }

    .asg-topnav-links a {
        font-size: 12px;
        gap: 4px;
        padding: 10px 10px;
    }

    .asg-topnav-links svg {
        display: none;
    }

    .asg-topnav-name {
        display: none;
    }

    .asg-topnav-user {
        gap: 8px;
        padding-left: 10px;
    }

    .asg-topnav-logout {
        font-size: 12px;
        padding: 7px 9px;
    }

    .asg-aula-body {
        padding: 16px 14px 40px;
    }

    /* Login móvil */
    .asg-login-gate {
        padding: 0;
        align-items: flex-start;
    }

    .asg-login-panel,
    .asg-register-panel {
        border-radius: 0;
        grid-template-columns: 1fr;
        min-height: 100dvh;
        width: 100%;
    }

    .asg-login-copy {
        display: none;
    }

    .asg-login-form {
        justify-content: flex-start;
        max-height: none;
        overflow-y: visible;
        padding: 36px 24px 48px;
    }

    .asg-form-grid {
        grid-template-columns: 1fr;
    }

    .asg-aula-header {
        display: block;
    }

    .asg-aula-kpis div {
        flex: 1;
        min-width: 0;
    }

    /* Course hero móvil */
    .asg-course-hero {
        border-radius: 12px;
        margin-bottom: 20px;
        min-height: 160px;
    }

    .asg-course-hero-inner {
        padding: 24px 20px;
    }

    .asg-course-hero h2 {
        font-size: 20px;
    }

    .asg-course-hero p {
        font-size: 13px;
    }

    .asg-course-hero .asg-progress {
        max-width: 100%;
        margin-top: 14px;
    }

    /* Stepper móvil */
    .asg-module-list::before {
        left: 19px;
    }

    .asg-module {
        padding: 14px 14px 14px 56px;
    }

    .asg-module-heading > span {
        height: 36px;
        left: -42px;
        width: 36px;
        font-size: 13px;
    }

    .asg-module-heading h3 {
        font-size: 15px;
    }

    /* Topics móvil */
    .asg-topic summary {
        font-size: 14px;
        padding: 14px;
    }

    .asg-topic-status {
        font-size: 11px;
        margin-left: 8px;
        white-space: nowrap;
    }

    /* Course grid 1 col */
    .asg-course-grid {
        grid-template-columns: 1fr;
    }

    .asg-evaluation-header {
        display: block;
    }

    .asg-evaluation-status {
        margin-top: 12px;
    }

    .asg-evaluation-summary {
        grid-template-columns: 1fr;
    }

    /* Fix 2: document card — 1 columna en móvil */
    .asg-required-document {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 16px;
    }

    .asg-required-document h5 {
        font-size: 15px;
    }

    /* Fix 3: botón Descargar y Subir — full width, mismo alto en móvil */
    .asg-document-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .asg-document-actions .asg-button {
        display: flex;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    .asg-document-actions .asg-button,
    .asg-document-actions button[type="submit"] {
        min-height: 48px;
        font-size: 15px;
    }

    /* Fix 4: input file estilizado en móvil */
    .asg-document-actions input[type="file"] {
        background: #f7fbfd;
        border: 1.5px dashed #c8dce8;
        border-radius: 10px;
        box-sizing: border-box;
        color: var(--asg-muted);
        font-size: 14px;
        padding: 12px 14px;
        width: 100%;
    }

    .asg-prac-session-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .asg-prac-enroll-btn {
        width: 100%;
    }
}

/* ── Panel Instructor ────────────────────────────── */
.asg-instructor-panel {
    max-width: 900px;
}

.asg-instructor-header {
    background: linear-gradient(135deg, var(--asg-navy), #0a3d62);
    border-radius: 16px;
    color: #fff;
    margin-bottom: 28px;
    padding: 32px 36px;
}

.asg-instructor-role {
    color: rgba(255,255,255,.65);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.asg-instructor-header h2 {
    color: #fff;
    font-size: 24px;
    margin: 0 0 6px;
}

.asg-instructor-header p {
    color: rgba(255,255,255,.75);
    font-size: 14px;
    margin: 0;
}

.asg-instructor-empty {
    background: var(--asg-sky);
    border: 1px solid var(--asg-border);
    border-radius: 12px;
    color: var(--asg-muted);
    font-size: 14px;
    padding: 24px;
    text-align: center;
}

.asg-instructor-session {
    background: #fff;
    border: 1px solid var(--asg-border);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(5,43,69,.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.asg-instructor-session-header {
    background: linear-gradient(90deg, #f0f8fd, #fff);
    border-bottom: 1px solid var(--asg-border);
    padding: 16px 20px;
}

.asg-instructor-course {
    color: var(--asg-navy);
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.asg-instructor-session-meta {
    color: var(--asg-muted);
    font-size: 13px;
}

.asg-instructor-hint {
    color: var(--asg-muted);
    font-size: 14px;
    padding: 20px;
    text-align: center;
}

.asg-instructor-students {
    display: flex;
    flex-direction: column;
}

.asg-instructor-student-form {
    border-bottom: 1px solid var(--asg-border);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
}

.asg-instructor-student-form:last-child {
    border-bottom: none;
}

.asg-instructor-student-info {
    align-items: center;
    display: flex;
    gap: 12px;
}

.asg-instructor-student-avatar {
    align-items: center;
    background: var(--asg-blue);
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 800;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.asg-instructor-student-info > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.asg-instructor-student-info strong {
    color: var(--asg-navy);
    font-size: 15px;
}

.asg-instructor-dni,
.asg-instructor-email {
    color: var(--asg-muted);
    font-size: 12px;
}

.asg-instructor-controls {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.asg-instructor-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 130px;
}

.asg-instructor-field--notes {
    flex: 1;
    min-width: 200px;
}

.asg-instructor-field label {
    color: var(--asg-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.asg-instructor-field select,
.asg-instructor-field input[type="text"] {
    background: #f7fbfd;
    border: 1.5px solid #d8e8f0;
    border-radius: 8px;
    color: var(--asg-ink);
    font-size: 14px;
    height: 42px;
    outline: none;
    padding: 0 12px;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
    box-sizing: border-box;
}

.asg-instructor-field select:focus,
.asg-instructor-field input[type="text"]:focus {
    border-color: var(--asg-blue);
    box-shadow: 0 0 0 3px rgba(0,159,227,.12);
}

.asg-instructor-save-btn {
    background: var(--asg-blue);
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    height: 42px;
    padding: 0 22px;
    transition: background .15s;
    align-self: flex-end;
}

.asg-instructor-save-btn:hover {
    background: var(--asg-navy);
}

@media (max-width: 760px) {
    .asg-instructor-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .asg-instructor-field {
        min-width: 0;
        width: 100%;
    }

    .asg-instructor-save-btn {
        width: 100%;
    }
}

/* ── Mis Prácticas ────────────────────────────── */
.asg-practicas-section {
    margin-top: 48px;
}

.asg-practicas-section .asg-section-title,
.asg-my-certificates h2 {
    color: var(--asg-navy);
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 20px;
}

.asg-prac-card {
    background: #fff;
    border: 1px solid var(--asg-border);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(5,43,69,.06);
    margin-bottom: 16px;
    overflow: hidden;
}

.asg-prac-card-header {
    background: linear-gradient(90deg, var(--asg-navy), #0a3d62);
    color: #fff;
    font-size: 14px;
    padding: 12px 20px;
}

.asg-prac-card-body {
    padding: 20px;
}

.asg-prac-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin-bottom: 16px;
}

.asg-prac-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.asg-prac-info-label {
    color: var(--asg-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.asg-prac-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.asg-prac-badge {
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 4px 12px;
    text-transform: uppercase;
}

.asg-prac-badge--pending {
    background: #fff8e1;
    color: #b45309;
    border: 1px solid #fde68a;
}

.asg-prac-badge--ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.asg-prac-badge--ko {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.asg-prac-notes {
    background: var(--asg-sky);
    border-left: 3px solid var(--asg-blue);
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    margin: 12px 0 0;
    padding: 10px 14px;
}

.asg-prac-hint {
    color: var(--asg-muted);
    font-size: 14px;
    margin: 0 0 16px;
}

.asg-prac-sessions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asg-prac-session-row {
    align-items: center;
    background: var(--asg-sky);
    border: 1px solid var(--asg-border);
    border-radius: 10px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px 16px;
}

.asg-prac-session-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: 14px;
    color: var(--asg-ink);
}

.asg-prac-session-places {
    color: var(--asg-muted);
    font-size: 13px;
}

.asg-prac-enroll-btn {
    background: var(--asg-blue);
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
    transition: background .15s;
    white-space: nowrap;
}

.asg-prac-enroll-btn:hover {
    background: var(--asg-navy);
}
