/* ==========================================================================
   EduNova — Hoja de estilos principal
   Dirección: editorial-SaaS cálido · crema + tinta + coral/teal/oro
   Tipografías: Fraunces (display) + Plus Jakarta Sans (texto)
   ========================================================================== */

/* ----------------------------- Tokens / Variables ----------------------- */
:root {
    /* Paleta corporativa */
    --ink:        #14201C;   /* verde-tinta casi negro */
    --ink-2:      #3a4a44;
    --muted:      #6b7a73;
    --cream:      #f7f3ec;   /* fondo principal */
    --paper:      #ffffff;
    --paper-2:    #fbf8f3;

    --coral:      #ff6a3d;
    --coral-deep: #e8501f;
    --teal:       #0fb5a2;
    --teal-deep:  #0a8f80;
    --gold:       #f1a73a;

    --line:       rgba(20, 32, 28, .10);
    --line-soft:  rgba(20, 32, 28, .06);

    /* Acento dinámico (lo cambia cada slide / card) */
    --accent:       var(--coral);
    --accent-deep:  var(--coral-deep);
    --accent-soft:  rgba(255, 106, 61, .12);

    /* Tipografía */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Medidas */
    --container: 1180px;
    --radius:    20px;
    --radius-sm: 12px;
    --radius-lg: 28px;

    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(20, 32, 28, .06);
    --shadow:    0 16px 40px -18px rgba(20, 32, 28, .25);
    --shadow-lg: 0 40px 80px -30px rgba(20, 32, 28, .35);

    --ease: cubic-bezier(.22, 1, .36, 1);
}

/* Acentos por nombre */
[data-accent="coral"] { --accent: #ff6a3d; --accent-deep: #e8501f; --accent-soft: rgba(255,106,61,.13); }
[data-accent="teal"]  { --accent: #0fb5a2; --accent-deep: #0a8f80; --accent-soft: rgba(15,181,162,.14); }
[data-accent="gold"]  { --accent: #f1a73a; --accent-deep: #d68a18; --accent-soft: rgba(241,167,58,.16); }

/* ----------------------------- Reset ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, button { font: inherit; color: inherit; }

::selection { background: var(--accent); color: #fff; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 200;
    background: var(--ink); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ----------------------------- Layout ---------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
}

.section { padding: clamp(64px, 9vw, 120px) 0; }

.section-head { max-width: 640px; margin: 0 auto clamp(36px, 5vw, 60px); text-align: center; }
.section-eyebrow {
    display: inline-block;
    font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent-deep); margin-bottom: .9rem;
}
.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    line-height: 1.12;
    letter-spacing: -.01em;
}
.section-title em { font-style: italic; color: var(--accent-deep); }
.section-sub { margin-top: 1rem; color: var(--muted); font-size: 1.06rem; }

/* ----------------------------- Botones --------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .95rem 1.5rem;
    border-radius: 999px;
    font-weight: 700; font-size: .98rem;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .25s, color .25s;
    white-space: nowrap;
}
.btn-icon { width: 18px; height: 18px; transition: transform .3s var(--ease); }

.btn-primary {
    background: var(--accent); color: #fff;
    box-shadow: 0 12px 26px -10px var(--accent);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 32px -10px var(--accent); }
.btn-primary:hover .btn-icon { transform: translateX(4px); }

.btn-ghost {
    border: 1.5px solid var(--line);
    background: transparent; color: var(--ink); padding: .7rem 1.2rem;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.btn-text { background: transparent; color: var(--ink); padding: .9rem .6rem; }
.btn-text .btn-icon { color: var(--accent-deep); }
.btn-text:hover { color: var(--accent-deep); }

.btn-block { width: 100%; }

/* ----------------------------- Header ---------------------------------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    transition: background .35s var(--ease), box-shadow .35s var(--ease), padding .35s var(--ease);
    padding: 18px 0;
}
.site-header.is-scrolled {
    background: rgba(247, 243, 236, .82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
    padding: 12px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; }
.brand-mark {
    width: 38px; height: 38px; display: grid; place-items: center;
    background: var(--ink); color: var(--coral); border-radius: 11px;
    box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-size: 1.28rem; letter-spacing: -.02em; font-family: var(--font-display); font-weight: 600; }
.brand-accent { color: var(--coral-deep); }

/* Logo en imagen (GCA & Quality) */
.brand-logo { height: 46px; width: auto; display: block; transition: height .35s var(--ease); }
.site-header.is-scrolled .brand-logo { height: 40px; }
.app-header .brand-logo { height: 38px; }
.brand--footer { display: inline-flex; background: #fff; padding: .55rem .85rem; border-radius: 12px; box-shadow: var(--shadow-sm); }
.brand--footer .brand-logo { height: 40px; }
.modal-logo { height: 50px; width: auto; margin: 0 auto 1.1rem; display: block; }
@media (max-width: 760px) {
    .brand-logo { height: 40px; }
    .site-header.is-scrolled .brand-logo { height: 36px; }
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav-list { display: flex; align-items: center; gap: 1.7rem; }
.nav-link {
    font-weight: 600; font-size: .96rem; color: var(--ink-2);
    position: relative; padding: .3rem 0;
    transition: color .25s;
}
.nav-link::after {
    content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
    background: var(--coral); border-radius: 2px; transition: width .3s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }
.nav-link.is-active { color: var(--ink); }

/* Hamburguesa */
.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span {
    position: absolute; left: 11px; right: 11px; height: 2.2px; background: var(--ink);
    border-radius: 2px; transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ----------------------------- Hero ------------------------------------ */
.hero {
    position: relative;
    padding: clamp(120px, 17vh, 180px) 0 clamp(60px, 8vw, 110px);
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob {
    position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
}
.blob-1 {
    width: 520px; height: 520px; top: -160px; right: -120px;
    background: radial-gradient(circle at 30% 30%, rgba(255,106,61,.55), transparent 70%);
}
.blob-2 {
    width: 460px; height: 460px; bottom: -180px; left: -140px;
    background: radial-gradient(circle at 40% 40%, rgba(15,181,162,.45), transparent 70%);
}
.grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--line-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
}

.hero-slider { position: relative; z-index: 1; }
.hero-track { display: flex; transition: transform .7s var(--ease); }
.hero-slide {
    min-width: 100%;
    display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(2rem, 5vw, 4.5rem);
}

.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--accent-soft); color: var(--accent-deep);
    padding: .5rem 1rem; border-radius: 999px;
    font-weight: 700; font-size: .85rem; letter-spacing: .02em;
    margin-bottom: 1.4rem;
}
.eyebrow-icon { width: 17px; height: 17px; }

.hero-title {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(2.5rem, 6vw, 4.3rem);
    line-height: 1.04; letter-spacing: -.02em;
}
.hero-title .hl {
    color: var(--accent-deep); font-style: italic;
    position: relative; white-space: nowrap;
}
.hero-text {
    margin: 1.5rem 0 2rem; font-size: 1.14rem; color: var(--ink-2); max-width: 36ch;
}
.hero-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* Visual del hero — tarjeta de curso "mock" */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 360px; }
.course-card {
    width: min(360px, 100%);
    background: var(--paper); border-radius: var(--radius-lg);
    padding: 1.5rem; box-shadow: var(--shadow-lg);
    border: 1px solid var(--line-soft);
    transform: rotate(-2deg);
    animation: floatCard 6s ease-in-out infinite;
}
@keyframes floatCard { 50% { transform: rotate(-2deg) translateY(-12px); } }
.course-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; }
.cc-thumb {
    width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-deep);
}
.cc-icon { width: 30px; height: 30px; }
.cc-live {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .78rem; font-weight: 700; color: var(--coral-deep);
    background: rgba(255,106,61,.1); padding: .35rem .7rem; border-radius: 999px;
}
.cc-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.cc-bar { height: 11px; border-radius: 6px; background: var(--line); margin-bottom: .7rem; }
.cc-bar-lg { width: 85%; }
.cc-bar-md { width: 55%; }
.cc-progress { height: 8px; border-radius: 6px; background: var(--line); margin: 1.2rem 0 .8rem; overflow: hidden; }
.cc-progress span { display: block; height: 100%; width: 68%; border-radius: 6px; background: var(--accent); }
.cc-meta { display: flex; gap: 1.2rem; color: var(--muted); font-size: .85rem; font-weight: 600; }
.cc-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.cc-mini { width: 15px; height: 15px; }

.float-chip {
    position: absolute; z-index: 2;
    display: inline-flex; align-items: center; gap: .45rem;
    background: var(--paper); padding: .65rem 1rem; border-radius: 14px;
    font-weight: 700; font-size: .86rem; box-shadow: var(--shadow);
    border: 1px solid var(--line-soft);
}
.chip-icon { width: 18px; height: 18px; color: var(--accent-deep); }
.chip-cert { top: 14%; left: -4%; animation: floatChip 5s ease-in-out infinite; }
.chip-rate { bottom: 12%; right: -2%; color: var(--teal-deep); animation: floatChip 5s ease-in-out infinite .8s; }
.chip-rate .chip-icon { color: var(--teal-deep); }
@keyframes floatChip { 50% { transform: translateY(-10px); } }

/* Flechas y puntos */
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--paper); box-shadow: var(--shadow); color: var(--ink);
    display: grid; place-items: center;
    border: 1px solid var(--line-soft);
    transition: transform .3s var(--ease), background .25s, color .25s;
}
.slider-arrow:hover { background: var(--ink); color: #fff; }
.arrow-svg { width: 22px; height: 22px; }
.slider-prev { left: -8px; }
.slider-prev .arrow-svg { transform: rotate(180deg); }
.slider-next { right: -8px; }
.slider-prev:hover { transform: translateY(-50%) scale(1.08); }
.slider-next:hover { transform: translateY(-50%) scale(1.08); }

.slider-dots { display: flex; justify-content: center; gap: .6rem; margin-top: 2.6rem; }
.dot {
    width: 9px; height: 9px; border-radius: 999px; background: var(--line);
    transition: width .35s var(--ease), background .25s;
}
.dot.is-active { width: 30px; background: var(--accent); }

/* ----------------------------- Stats ----------------------------------- */
.stats { padding: clamp(36px, 5vw, 56px) 0; border-block: 1px solid var(--line); background: var(--paper-2); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat-value {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1; color: var(--ink);
    letter-spacing: -.02em;
}
.stat-label { margin-top: .5rem; color: var(--muted); font-weight: 600; font-size: .95rem; }
.stat:nth-child(1) .stat-value { color: var(--coral-deep); }
.stat:nth-child(2) .stat-value { color: var(--teal-deep); }
.stat:nth-child(3) .stat-value { color: var(--gold); }
.stat:nth-child(4) .stat-value { color: var(--ink); }

/* ----------------------------- Beneficios ------------------------------ */
.benefits-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.benefit-card {
    position: relative; overflow: hidden;
    background: var(--paper); border-radius: var(--radius);
    padding: 2rem 1.8rem; border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-sm);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.benefit-card:nth-child(3n+1) { --accent: #ff6a3d; --accent-deep: #e8501f; --accent-soft: rgba(255,106,61,.12); }
.benefit-card:nth-child(3n+2) { --accent: #0fb5a2; --accent-deep: #0a8f80; --accent-soft: rgba(15,181,162,.13); }
.benefit-card:nth-child(3n+3) { --accent: #f1a73a; --accent-deep: #d68a18; --accent-soft: rgba(241,167,58,.15); }
.benefit-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: transparent; }
.benefit-icon {
    width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-deep); margin-bottom: 1.3rem;
    transition: transform .4s var(--ease);
}
.benefit-card:hover .benefit-icon { transform: scale(1.08) rotate(-6deg); }
.b-icon { width: 28px; height: 28px; }
.benefit-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin-bottom: .5rem; }
.benefit-text { color: var(--muted); font-size: .98rem; }
.benefit-glow {
    position: absolute; width: 160px; height: 160px; border-radius: 50%;
    background: var(--accent-soft); filter: blur(40px);
    bottom: -80px; right: -50px; opacity: 0; transition: opacity .4s;
}
.benefit-card:hover .benefit-glow { opacity: 1; }

/* ----------------------------- Cursos ---------------------------------- */
.courses { background: var(--paper-2); }
.courses-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.course {
    background: var(--paper); border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.course:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.course-thumb {
    position: relative; height: 168px; display: grid; place-items: center;
    background:
        radial-gradient(circle at 70% 20%, rgba(255,255,255,.35), transparent 60%),
        linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff;
}
.course-cat {
    position: absolute; top: 14px; left: 14px;
    background: rgba(255,255,255,.9); color: var(--ink);
    font-size: .76rem; font-weight: 700; padding: .35rem .8rem; border-radius: 999px;
}
.course-play { width: 52px; height: 52px; opacity: .92; transition: transform .35s var(--ease); }
.course:hover .course-play { transform: scale(1.15); }
/* Miniatura con imagen real del curso */
.course-thumb--img { overflow: hidden; text-decoration: none; }
.course-thumb--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.course-thumb--img::after { content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(11,27,46,.18), rgba(11,27,46,.45)); }
.course-thumb--img .course-cat, .course-thumb--img .course-play { position: relative; z-index: 2; }
.course-thumb--img .course-play { filter: drop-shadow(0 3px 10px rgba(0,0,0,.45)); }
.course-body { padding: 1.5rem; }
.course-name { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; }
.course-meta { display: flex; gap: 1.2rem; margin: .9rem 0 1.2rem; color: var(--muted); font-weight: 600; font-size: .88rem; }
.course-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.course-link {
    display: inline-flex; align-items: center; gap: .4rem;
    font-weight: 700; color: var(--accent-deep);
}
.course-link .btn-icon { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.course-link:hover .btn-icon { transform: translateX(4px); }

/* ----------------------------- Clientes (marquee) ---------------------- */
.clients { padding-bottom: clamp(64px, 9vw, 120px); }
.marquee {
    position: relative; overflow: hidden; padding: 1rem 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 3.5rem; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.client-logo {
    display: inline-flex; align-items: center; justify-content: center;
    height: 150px; width: 230px; flex: 0 0 auto;
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: .55rem .9rem; box-shadow: 0 6px 18px rgba(11,27,46,.06);
    opacity: 1; transition: transform .3s, box-shadow .3s;
}
.client-logo img {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    object-fit: contain; filter: grayscale(.15); opacity: 1; transition: filter .3s, transform .3s;
}
.client-logo:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.client-logo:hover img { filter: grayscale(0); transform: scale(1.04); }

/* ----------------------------- Contacto -------------------------------- */
.contact { background:
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(15,181,162,.07), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(255,106,61,.08), transparent 60%),
    var(--cream); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-info .section-head { text-align: left; margin: 0; }
.contact-info .section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }

.contact-list { margin-top: 2.4rem; display: grid; gap: 1.3rem; }
.contact-list li { display: flex; align-items: center; gap: 1rem; }
.ci-icon {
    flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
    background: var(--paper); box-shadow: var(--shadow-sm); color: var(--accent-deep);
    border: 1px solid var(--line-soft);
}
.ci-svg { width: 22px; height: 22px; }
.contact-list strong { display: block; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.contact-list a, .contact-list div span { font-weight: 700; font-size: 1.05rem; color: var(--ink); }

/* Formulario */
.contact-form {
    background: var(--paper); border-radius: var(--radius-lg);
    padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow);
    border: 1px solid var(--line-soft);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .45rem; }
.field .opt { color: var(--muted); font-weight: 500; }
.field input, .field textarea {
    width: 100%; padding: .85rem 1rem; border-radius: var(--radius-sm);
    background: var(--paper-2); border: 1.5px solid var(--line);
    transition: border-color .25s, box-shadow .25s, background .25s;
    resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #aab4ae; }
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--coral);
    background: var(--paper); box-shadow: 0 0 0 4px rgba(255,106,61,.12);
}
.field.has-error input, .field.has-error textarea { border-color: #e5484d; background: #fff5f5; }
.field-error { display: block; color: #d33; font-size: .82rem; font-weight: 600; margin-top: .35rem; min-height: 1em; }

.btn-spinner {
    width: 18px; height: 18px; border-radius: 50%; display: none;
    border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.contact-form.is-loading .btn-label,
.login-form.is-loading .btn-label { opacity: .6; }
.contact-form.is-loading .btn-spinner,
.login-form.is-loading .btn-spinner { display: inline-block; }

.form-feedback { margin-top: 1rem; font-weight: 600; font-size: .95rem; text-align: center; min-height: 1.2em; }
.form-feedback.is-ok { color: var(--teal-deep); }
.form-feedback.is-err { color: #d33; }

/* ----------------------------- Footer ---------------------------------- */
.site-footer { background: var(--ink); color: #cdd6d1; padding-top: clamp(56px, 8vw, 90px); }
.footer-grid {
    display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 2.5rem;
    padding-bottom: 3rem;
}
.brand--light .brand-name { color: #fff; }
.brand--light .brand-mark { background: rgba(255,255,255,.08); }
.footer-tagline { margin: 1.2rem 0 1.5rem; max-width: 32ch; color: #9aa8a1; font-size: .98rem; }
.socials { display: flex; gap: .6rem; }
.social {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: rgba(255,255,255,.06); color: #cdd6d1; transition: background .25s, color .25s, transform .25s;
}
.social svg { width: 20px; height: 20px; }
.social:hover { background: var(--coral); color: #fff; transform: translateY(-3px); }

.footer-title { color: #fff; font-size: .92rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.2rem; font-weight: 700; }
.footer-links { display: grid; gap: .7rem; }
.footer-links a, .footer-links span { color: #9aa8a1; font-size: .96rem; transition: color .2s; }
.footer-links a:hover { color: var(--coral); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1.5rem 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom p { font-size: .9rem; color: #8a978f; }
.footer-legal a { color: #8a978f; }
.footer-legal a:hover { color: var(--coral); }

/* ----------------------------- Página 404 ------------------------------ */
.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; background: var(--cream); }
.error-code { font-family: var(--font-display); font-size: clamp(5rem, 18vw, 11rem); font-weight: 600; color: var(--coral); line-height: 1; }
.error-page h1 { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); margin: .5rem 0 1rem; }
.error-text { color: var(--muted); margin-bottom: 2rem; }

/* ----------------------------- Reveal animación ------------------------ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
    html { scroll-behavior: auto; }
}

/* ============================ RESPONSIVE ============================== */
@media (max-width: 980px) {
    .hero-slide { grid-template-columns: 1fr; text-align: center; }
    .hero-copy { order: 2; }
    .hero-visual { order: 1; min-height: 300px; margin-bottom: 1rem; }
    .hero-text { margin-inline: auto; }
    .hero-actions { justify-content: center; }
    .eyebrow { margin-inline: auto; }
    .benefits-grid, .courses-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-info .section-head { text-align: center; }
    .contact-list { max-width: 420px; margin-inline: auto; }
}

@media (max-width: 760px) {
    /* Menú móvil */
    .nav-toggle { display: block; }
    .nav {
        position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw);
        flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
        background: var(--paper); padding: 100px 28px 40px;
        box-shadow: var(--shadow-lg);
        transform: translateX(105%); transition: transform .4s var(--ease);
        z-index: 90;
    }
    .nav.is-open { transform: translateX(0); }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-list li { border-bottom: 1px solid var(--line-soft); }
    .nav-link { display: block; padding: 1rem 0; font-size: 1.1rem; }
    .nav-cta-login { margin-top: 1.5rem; text-align: center; justify-content: center; }
    .nav-backdrop {
        position: fixed; inset: 0; background: rgba(20,32,28,.4); z-index: 80;
        opacity: 0; visibility: hidden; transition: opacity .3s;
        backdrop-filter: blur(2px);
    }
    .nav-backdrop.is-open { opacity: 1; visibility: visible; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
    .slider-arrow { display: none; }
    .float-chip { font-size: .78rem; padding: .5rem .8rem; }
    .chip-cert { left: 0; } .chip-rate { right: 0; }
}

@media (max-width: 520px) {
    .container { padding-inline: 18px; }
    .form-row { grid-template-columns: 1fr; }
    .benefits-grid, .courses-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: clamp(2.2rem, 11vw, 3rem); }
}

/* ==========================================================================
   MÓDULO DE AUTENTICACIÓN — modal, header de usuario, perfil y admin
   ========================================================================== */

/* ----------------------------- Header: usuario ------------------------- */
.user-menu { display: flex; align-items: center; gap: 1rem; }
.nav-logout { font-weight: 700; font-size: .92rem; color: var(--muted); transition: color .2s; }
.nav-logout:hover { color: var(--coral-deep); }

/* ----------------------------- Modal de login -------------------------- */
.modal {
    position: fixed; inset: 0; z-index: 1000;
    display: grid; place-items: center; padding: 1.5rem;
    visibility: hidden; opacity: 0;
    transition: opacity .3s var(--ease), visibility .3s;
}
.modal.is-open { visibility: visible; opacity: 1; }
.modal-overlay {
    position: absolute; inset: 0;
    background: rgba(15, 24, 21, .55);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.modal-dialog {
    position: relative; z-index: 1;
    width: min(420px, 100%);
    background: var(--paper); border-radius: var(--radius-lg);
    padding: clamp(1.8rem, 4vw, 2.6rem);
    box-shadow: var(--shadow-lg);
    transform: translateY(16px) scale(.98);
    transition: transform .35s var(--ease);
}
.modal.is-open .modal-dialog { transform: none; }
.modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; color: var(--muted);
    transition: background .2s, color .2s;
}
.modal-close svg { width: 20px; height: 20px; }
.modal-close:hover { background: var(--line-soft); color: var(--ink); }

.modal-head { text-align: center; margin-bottom: 1.6rem; }
.modal-mark {
    width: 54px; height: 54px; margin: 0 auto 1rem;
    display: grid; place-items: center; border-radius: 15px;
    background: var(--ink); color: var(--coral);
}
.modal-mark svg { width: 30px; height: 30px; }
.modal-title { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; }
.modal-sub { color: var(--muted); margin-top: .4rem; font-size: .96rem; }

.login-form .field { margin-bottom: 1.1rem; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 3rem; }
.password-toggle {
    position: absolute; top: 50%; right: .5rem; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    color: var(--muted); transition: color .2s, background .2s;
}
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle:hover { color: var(--ink); background: var(--line-soft); }
.password-toggle.is-visible { color: var(--coral-deep); }

/* ----------------------------- Layout área privada --------------------- */
.app-body { background: var(--cream); min-height: 100vh; display: flex; flex-direction: column; }
.app-header {
    background: var(--paper); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
}
.app-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 14px; }
.app-nav { display: flex; align-items: center; gap: 1.4rem; }
.app-nav-link { font-weight: 600; font-size: .94rem; color: var(--ink-2); transition: color .2s; }
.app-nav-link:hover { color: var(--coral-deep); }
.app-user { display: flex; align-items: center; gap: .6rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.app-avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: var(--coral); color: #fff; font-weight: 800; font-size: 1rem;
}
.app-user-name { font-weight: 700; font-size: .92rem; }
.btn-logout { padding: .55rem 1.1rem; font-size: .9rem; }
.app-main { flex: 1; }
.app-footer { background: var(--ink); color: #9aa8a1; padding: 1.4rem 0; text-align: center; font-size: .9rem; }

/* ----------------------------- Perfil del alumno ----------------------- */
.profile-hero {
    background:
        radial-gradient(ellipse 50% 70% at 0% 0%, rgba(255,106,61,.10), transparent 60%),
        radial-gradient(ellipse 50% 70% at 100% 0%, rgba(15,181,162,.10), transparent 60%),
        var(--paper-2);
    padding: clamp(2.5rem, 6vw, 4rem) 0; border-bottom: 1px solid var(--line);
}
.profile-welcome { display: flex; align-items: center; gap: 1.3rem; margin-bottom: 2.5rem; }
.profile-avatar {
    width: 72px; height: 72px; flex: none; border-radius: 22px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--coral), var(--coral-deep));
    color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 2rem;
    box-shadow: var(--shadow);
}
.profile-eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--coral-deep); }
.profile-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.1; }
.profile-rut { color: var(--muted); font-weight: 600; margin-top: .2rem; }

.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.pstat {
    display: flex; align-items: center; gap: .9rem;
    background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
    padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm);
}
.pstat-icon {
    width: 48px; height: 48px; flex: none; border-radius: 13px; display: grid; place-items: center;
    background: rgba(255,106,61,.12); color: var(--coral-deep);
}
.pstat-icon.pstat-teal { background: rgba(15,181,162,.13); color: var(--teal-deep); }
.pstat-icon.pstat-gold { background: rgba(241,167,58,.16); color: #d68a18; }
.pstat strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; line-height: 1; }
.pstat span { color: var(--muted); font-size: .86rem; font-weight: 600; }

.profile-courses { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.profile-section-head { margin-bottom: 1.8rem; }
.profile-section-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; }
.profile-section-head p { color: var(--muted); }

.learn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.learn-card {
    background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.learn-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.learn-thumb {
    position: relative; height: 130px; display: grid; place-items: center; color: #fff;
    background:
        radial-gradient(circle at 75% 15%, rgba(255,255,255,.3), transparent 55%),
        linear-gradient(135deg, var(--accent), var(--accent-deep));
}
.learn-cat {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255,255,255,.92); color: var(--ink);
    font-size: .72rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px;
}
.learn-badge {
    position: absolute; top: 12px; right: 12px;
    display: inline-flex; align-items: center; gap: .3rem;
    background: rgba(15,24,21,.55); color: #fff;
    font-size: .72rem; font-weight: 700; padding: .3rem .65rem; border-radius: 999px;
}
.learn-badge .cc-mini { width: 13px; height: 13px; }
.learn-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.learn-thumb.has-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,32,28,.05), rgba(20,32,28,.45)); z-index: 1; }
.learn-thumb.has-img .learn-cat, .learn-thumb.has-img .learn-badge, .learn-thumb.has-img .course-play { position: relative; z-index: 2; }
.learn-thumb.has-img .course-play { filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.course-play { width: 46px; height: 46px; opacity: .9; }
.learn-body { padding: 1.3rem; }
.learn-title { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; line-height: 1.25; }
.learn-meta { display: flex; flex-wrap: wrap; gap: .9rem; margin: .7rem 0 1.1rem; color: var(--muted); font-weight: 600; font-size: .84rem; }
.learn-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.learn-meta .cc-mini { width: 15px; height: 15px; }
.learn-progress { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem; }
.learn-progress-bar { flex: 1; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.learn-progress-bar span { display: block; height: 100%; border-radius: 6px; background: var(--accent); transition: width .8s var(--ease); min-width: 2px; }
.learn-progress-label { font-weight: 800; font-size: .95rem; color: var(--accent-deep); min-width: 42px; text-align: right; }
.learn-cta { padding: .7rem 1rem; font-size: .92rem; }

.empty-state {
    background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius);
    padding: 3rem; text-align: center; color: var(--muted);
}

/* ----------------------------- Panel admin ----------------------------- */
.admin-hero {
    background: var(--ink); color: #e6ece9;
    padding: clamp(2.5rem, 6vw, 3.5rem) 0;
}
.admin-hero .profile-eyebrow { color: var(--coral); }
.admin-hero .profile-name { color: #fff; }
.admin-hero .profile-rut { color: #9aa8a1; }
.admin-body { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 3rem; }
.admin-stat {
    background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
    padding: 1.6rem; box-shadow: var(--shadow-sm); text-align: center;
}
.admin-stat-icon {
    width: 52px; height: 52px; margin: 0 auto .9rem; border-radius: 14px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-deep);
}
.admin-stat-num { display: block; font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; line-height: 1; color: var(--ink); }
.admin-stat-label { color: var(--muted); font-weight: 600; font-size: .92rem; }

.admin-modules-title { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; }
.admin-modules-sub { color: var(--muted); margin-bottom: 1.6rem; }
.admin-modules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.admin-module {
    background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow-sm); position: relative;
}
.admin-module.is-soon { opacity: .65; }
.admin-module-icon {
    position: relative; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-deep); margin-bottom: 1rem;
}
.admin-module-icon .b-icon { width: 26px; height: 26px; }
.admin-modules-grid .admin-module:nth-child(3n+2) .admin-module-icon { background: rgba(15,181,162,.14); color: var(--teal-deep); }
.admin-modules-grid .admin-module:nth-child(3n+3) .admin-module-icon { background: rgba(241,167,58,.16); color: #d68a18; }
.admin-module-badge {
    position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; padding: 0 6px;
    border-radius: 999px; background: var(--coral); color: #fff; font-size: .72rem; font-weight: 800;
    display: grid; place-items: center; box-shadow: 0 2px 6px rgba(255,106,61,.4);
}
.admin-module h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin-bottom: .4rem; }
.admin-module p { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }
.admin-module-tag {
    display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: .3rem .7rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep);
}
.admin-module.is-soon .admin-module-tag { background: var(--line); color: var(--muted); }

/* ----------------------------- Responsive (auth) ----------------------- */
@media (max-width: 880px) {
    .profile-stats, .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .learn-grid, .admin-modules-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .app-nav { gap: .8rem; }
    .app-user-name, .app-nav-link { display: none; }
    .profile-stats, .admin-stats { grid-template-columns: 1fr 1fr; }
    .learn-grid, .admin-modules-grid { grid-template-columns: 1fr; }
    .profile-welcome { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   GESTIÓN DE ALUMNOS (admin)
   ========================================================================== */
.admin-hero--sm { padding: clamp(1.6rem, 4vw, 2.4rem) 0; }
.admin-crumbs { font-size: .86rem; color: #9aa8a1; margin-bottom: .7rem; }
.admin-crumbs a { color: var(--coral); font-weight: 600; }
.admin-crumbs span { margin: 0 .3rem; opacity: .6; }
.admin-titlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

a.admin-module { display: block; text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
a.admin-module:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

/* Módulo clickeable usa acento coral por defecto */
.admin-module { --accent-soft: rgba(255,106,61,.12); --accent-deep: #e8501f; }

/* Alertas */
.alert { padding: 1rem 1.3rem; border-radius: var(--radius-sm); font-weight: 600; margin-bottom: 1.5rem; border: 1px solid transparent; }
.alert-success { background: rgba(15,181,162,.12); color: var(--teal-deep); border-color: rgba(15,181,162,.25); }
.alert-error { background: #fdecea; color: #c0392b; border-color: #f5c6bf; }

/* Layout de dos columnas */
.admin-split { display: grid; grid-template-columns: 320px 1fr; gap: 1.5rem; align-items: start; }
.import-split { grid-template-columns: 1.2fr .8fr; }

/* Tarjeta genérica del admin */
.admin-card {
    background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
    padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.admin-card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin-bottom: 1.2rem; }

/* Formularios admin */
.stack-form .field { margin-bottom: 1rem; }
.field select {
    width: 100%; padding: .8rem 1rem; border-radius: var(--radius-sm);
    background: var(--paper-2); border: 1.5px solid var(--line); cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.field select:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255,106,61,.12); background: var(--paper); }
.form-hint { margin-top: .8rem; font-size: .84rem; color: var(--muted); }

/* Búsqueda en tabla */
.table-search { display: flex; gap: .6rem; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; }
.table-search input {
    flex: 1; min-width: 200px; padding: .7rem 1rem; border-radius: var(--radius-sm);
    background: var(--paper-2); border: 1.5px solid var(--line);
}
.table-search input:focus { outline: none; border-color: var(--coral); background: var(--paper); }
.table-clear { font-size: .88rem; color: var(--muted); font-weight: 600; }
.table-filter {
    padding: .7rem 1rem; border-radius: var(--radius-sm); background: var(--paper-2);
    border: 1.5px solid var(--line); font-weight: 600; color: var(--ink-2); max-width: 280px;
}
.table-filter:focus { outline: none; border-color: var(--coral); background: var(--paper); }

/* Cursos del alumno (pills con el nombre del curso) */
.course-pills { display: flex; flex-wrap: wrap; gap: .35rem; max-width: 320px; }
.pill-course {
    min-width: 0; height: auto; padding: .2rem .6rem; border-radius: 8px;
    background: var(--accent-soft); color: var(--coral-deep); font-weight: 600;
    font-size: .78rem; line-height: 1.3; max-width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Paginación */
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: center; margin-top: 1.4rem; }
.page-link {
    display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 .8rem;
    border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--paper);
    color: var(--ink-2); font-weight: 700; font-size: .9rem; transition: all .15s;
}
a.page-link:hover { border-color: var(--coral); color: var(--coral-deep); background: var(--paper-2); }
.page-link.is-active { background: var(--coral); border-color: var(--coral); color: #fff; }
.page-link.is-disabled { opacity: .45; pointer-events: none; }
.page-gap { color: var(--muted); padding: 0 .2rem; }

/* Tabla de datos */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th {
    text-align: left; padding: .7rem .9rem; font-size: .76rem; text-transform: uppercase;
    letter-spacing: .05em; color: var(--muted); border-bottom: 2px solid var(--line);
}
.data-table td { padding: .85rem .9rem; border-bottom: 1px solid var(--line-soft); }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: var(--paper-2); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.muted { color: var(--muted); }
.pill {
    display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 .5rem;
    border-radius: 999px; background: var(--accent-soft); color: var(--coral-deep);
    font-weight: 700; font-size: .82rem;
}
.tag { display: inline-block; padding: .25rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.tag-ok { background: rgba(15,181,162,.14); color: var(--teal-deep); }
.tag-off { background: var(--line); color: var(--muted); }
.tag-warn { background: #fdeede; color: #b9700d; }

/* Dropzone de archivo */
.dropzone {
    display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center;
    padding: 2.2rem 1.5rem; border: 2px dashed var(--line); border-radius: var(--radius);
    background: var(--paper-2); cursor: pointer; transition: border-color .25s, background .25s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--coral); background: rgba(255,106,61,.05); }
.dropzone.has-file { border-color: var(--teal); border-style: solid; background: rgba(15,181,162,.06); }
.dropzone-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--coral-deep); }
.dropzone-text { font-weight: 700; }
.dropzone-text u { color: var(--coral-deep); }
.dropzone-hint { font-size: .82rem; color: var(--muted); }

/* Ayuda de formato */
.import-help p { color: var(--ink-2); font-size: .94rem; margin-bottom: 1rem; }
.format-table { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 1.1rem; font-size: .82rem; }
.format-row { display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; }
.format-row span { padding: .5rem .7rem; border-bottom: 1px solid var(--line-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.format-row:last-child span { border-bottom: none; }
.format-head { background: var(--ink); }
.format-head span { color: #fff; font-weight: 700; }
.import-tips { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.import-tips li { position: relative; padding-left: 1.3rem; font-size: .88rem; color: var(--ink-2); }
.import-tips li::before { content: '✓'; position: absolute; left: 0; color: var(--teal-deep); font-weight: 800; }

/* Reporte de importación */
.import-target { font-size: 1rem; margin-bottom: 1.2rem; }
.import-target--warn { color: #c0392b; }
.result-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .9rem; margin-bottom: 1.2rem; }
.result-stat { background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 1rem; text-align: center; }
.result-stat strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; line-height: 1; }
.result-stat span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.result-stat.ok strong { color: var(--teal-deep); }
.result-stat.err strong { color: #c0392b; }
.import-note { background: rgba(241,167,58,.12); color: #a06a10; padding: .8rem 1rem; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 1.2rem; }
.result-errors-title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin: 1.4rem 0 .8rem; }
.import-actions { display: flex; gap: .7rem; margin-top: 1.5rem; flex-wrap: wrap; }

@media (max-width: 880px) {
    .admin-split, .import-split { grid-template-columns: 1fr; }
    .result-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
    .result-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-titlebar { align-items: stretch; }
}

/* ==========================================================================
   GESTIÓN DE CURSOS — admin, ficha, aula y reproductor
   ========================================================================== */

.btn-sm { padding: .55rem 1rem; font-size: .9rem; }
.titlebar-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ----------------------------- Admin: lista de cursos ------------------ */
.course-admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.course-admin-card {
    background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.course-admin-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.cac-thumb { position: relative; height: 168px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); overflow: hidden; }
.cac-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cac-thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; opacity: .85; }
.cac-thumb-fallback .course-play { width: 54px; height: 54px; }
.cac-status {
    position: absolute; top: 10px; right: 10px; font-size: .72rem; font-weight: 700;
    padding: .25rem .7rem; border-radius: 999px; background: rgba(20,32,28,.6); color: #fff;
}
.cac-status.is-pub { background: var(--teal); }
.cac-body { padding: 1.2rem; }
.cac-cat { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-deep); }
.cac-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: .25rem 0 .8rem; line-height: 1.2; }
.cac-meta { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin-bottom: 1.1rem; }
.cac-meta span { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; color: var(--ink-2); background: var(--paper-2, #f1efe8); border: 1px solid var(--line); border-radius: 999px; padding: .28rem .65rem; }
.cac-meta .cc-mini { width: 15px; height: 15px; color: var(--accent-deep); flex: none; }
.cac-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cac-actions form { margin: 0; }
.cac-actions-icons { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; }
.cac-icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid var(--line); background: var(--paper); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.cac-icon-btn .cc-mini { width: 18px; height: 18px; }
.cac-icon-btn:hover { background: var(--accent-soft, #fdeaea); color: var(--accent-deep); border-color: var(--accent-deep); }
.btn-icon-del {
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    color: #d33; border: 1px solid var(--line); background: var(--paper); transition: background .2s, color .2s;
}
.btn-icon-del svg { width: 18px; height: 18px; }
.btn-icon-del:hover { background: #fde8e8; }

/* Botón de acción destructiva y agrupaciones de acciones */
.btn-danger { background: #d33; color: #fff; border: 1px solid #d33; }
.btn-danger:hover { background: #b71c1c; border-color: #b71c1c; }
.titlebar-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.row-actions { display: inline-flex; align-items: center; gap: .5rem; justify-content: flex-end; }
.row-actions .btn-icon-del { width: 34px; height: 34px; }

/* ----------------------------- Notificaciones -------------------------- */
.notif-grid { display: grid; grid-template-columns: 380px 1fr; gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
.notif-compose textarea { width: 100%; resize: vertical; font: inherit; }
.notif-contact { display: flex; flex-direction: column; gap: .2rem; }
.notif-mini { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; }
.notif-mini .cc-mini { width: 14px; height: 14px; opacity: .7; }
.notif-mini.muted { color: var(--muted, #999); }
.notif-table td { vertical-align: middle; }
.notif-history { margin-top: 1.5rem; }
.wa-results { margin-top: 1.5rem; border: 1px solid #25d36633; background: #25d3660d; }
.wa-actions { display: flex; align-items: center; gap: .8rem; margin: .6rem 0 1rem; flex-wrap: wrap; }
.wa-link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.wa-chip { display: flex; align-items: center; gap: .55rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); transition: border-color .2s, background .2s; }
.wa-chip:hover { border-color: #25d366; background: #25d3660d; }
.wa-chip-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #25d366; color: #fff; flex: none; }
.wa-chip-icon .cc-mini { width: 16px; height: 16px; }
.wa-chip-name { font-weight: 700; font-size: .9rem; }
.wa-chip-phone { margin-left: auto; font-size: .8rem; color: var(--ink-2); }
@media (max-width: 820px) { .notif-grid { grid-template-columns: 1fr; } }

/* ----------------------------- SCORM ----------------------------------- */
.scorm-demo { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.scorm-player { display: flex; flex-direction: column; min-height: calc(100vh - 67px); }
.scorm-bar { display: flex; align-items: center; gap: 1.2rem; padding: .7rem 1.2rem; background: var(--paper, #f7f5ef); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.scorm-back { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .9rem; color: var(--ink); }
.scorm-back .pb-icon { width: 18px; height: 18px; transform: rotate(180deg); color: var(--accent-deep); }
.scorm-titlebox { display: flex; flex-direction: column; line-height: 1.2; }
.scorm-title { font-size: .98rem; }
.scorm-meta { font-size: .72rem; color: var(--muted, #8a8f8a); }
.scorm-status { margin-left: auto; font-size: .85rem; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem; }
.scorm-status b { color: var(--accent-deep); }
.scorm-frame-wrap { flex: 1; background: #e9ecf1; }
.scorm-frame { width: 100%; height: 100%; min-height: calc(100vh - 130px); border: 0; display: block; }
/* Tarjetas SCORM para el alumno (perfil y curso) */
.scorm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.scorm-card { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; }
.scorm-card-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft, #fdeaea); color: var(--accent-deep, #c0392b); }
.scorm-card-icon .b-icon { width: 24px; height: 24px; }
.scorm-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.scorm-card-title { font-size: 1rem; font-weight: 700; margin: 0; }
.scorm-card-meta { font-size: .78rem; color: var(--muted, #8a8f8a); }
.scorm-card .btn { flex: none; }
.course-scorm { margin-top: 1.8rem; }
.course-scorm-title { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; font-family: var(--font-display); font-weight: 600; color: var(--navy, #0b1b2e); }
.course-scorm-title .b-icon { width: 22px; height: 22px; color: var(--accent-deep); }
.profile-scorm-head { margin-top: 1rem; }
.profile-scorm-head h2 { display: flex; align-items: center; gap: .5rem; }
.profile-scorm-head h2 .b-icon { width: 24px; height: 24px; color: var(--accent-deep); }

/* ----------------------------- Acceso administradores ------------------ */
.auth-body { margin: 0; min-height: 100vh; background: linear-gradient(135deg, #0b1b2e 0%, #1a2740 60%, #3a1016 100%); display: flex; }
.auth-wrap { margin: auto; width: 100%; padding: 2rem 1rem; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 2.2rem 2rem; box-shadow: 0 24px 60px rgba(0,0,0,.35); text-align: center; }
.auth-logo { height: 2.4rem; width: auto; margin-bottom: 1.1rem; }
.auth-title { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; margin: 0 0 .2rem; }
.auth-sub { color: var(--ink-2); font-size: .92rem; margin-bottom: 1.4rem; }
.auth-card .stack-form { text-align: left; }
.auth-back { display: inline-block; margin-top: 1.2rem; font-size: .85rem; color: var(--ink-2); }
.auth-back:hover { color: var(--accent-deep, #c0392b); }

/* ----------------------------- Validación de certificado --------------- */
.validate-wrap { padding: clamp(2.5rem, 7vw, 5rem) 0; background: var(--paper, #f7f5ef); min-height: 70vh; display: flex; align-items: center; }
.validate-card { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow); text-align: center; }
.validate-badge { width: 74px; height: 74px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; }
.validate-badge svg { width: 44px; height: 44px; }
.validate-card.is-valid .validate-badge { background: #e6f7ee; color: #1d9d63; }
.validate-card.is-invalid .validate-badge { background: #fdeaea; color: #d33; }
.validate-title { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; margin-bottom: .4rem; }
.validate-sub { color: var(--ink-2); margin-bottom: 1.6rem; }
.validate-data { text-align: left; border-top: 1px solid var(--line); }
.validate-data > div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.validate-data dt { color: var(--muted, #8a8f8a); font-size: .9rem; }
.validate-data dd { font-weight: 600; text-align: right; }
.validate-home { margin-top: 1.6rem; }

/* ----------------------------- Foro de consultas ----------------------- */
.forum-filter { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.forum-filter-tab { padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.forum-filter-tab.is-active { background: var(--accent-deep, #c0392b); color: #fff; border-color: var(--accent-deep, #c0392b); }
.forum-thread { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1.4rem; }
.forum-msg { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.1rem; max-width: 86%; }
.forum-msg.is-student { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.forum-msg.is-admin { align-self: flex-end; background: var(--accent-soft, #fdeaea); border-top-right-radius: 4px; }
.forum-msg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.forum-msg-author { font-weight: 700; font-size: .9rem; }
.forum-role { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-deep); background: #fff; border: 1px solid var(--accent-deep, #c0392b); border-radius: 6px; padding: .02rem .3rem; margin-left: .2rem; }
.forum-msg-meta { font-size: .72rem; color: var(--muted, #8a8f8a); white-space: nowrap; }
.forum-via .cc-mini { width: 12px; height: 12px; vertical-align: -2px; }
.forum-msg-body { line-height: 1.6; color: var(--ink); }
.forum-reply textarea { width: 100%; resize: vertical; font: inherit; }
.forum-reply-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .6rem; }
.forum-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.forum-toolbar .forum-filter { margin-bottom: 0; }
.forum-msg.is-auto { background: #f1f4f8; border-style: dashed; }
.forum-role-auto { color: #4b5563; border-color: #9aa5b1; }
.forum-quick { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: .8rem; }
.forum-quick-label { font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-right: .2rem; }
.forum-quick-chip { font-size: .82rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper, #f7f5ef); color: var(--ink-2); cursor: pointer; transition: background .2s, border-color .2s; }
.forum-quick-chip:hover { background: var(--accent-soft, #fdeaea); border-color: var(--accent-deep, #c0392b); color: var(--accent-deep, #c0392b); }

/* Autoservicio de preguntas frecuentes (alumno) */
.forum-faq { margin-bottom: 1.5rem; }
.faq-list { display: flex; flex-direction: column; gap: .5rem; margin: .6rem 0 1rem; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: var(--paper, #f7f5ef); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: .8rem 1rem; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--accent-deep, #c0392b); line-height: 1; flex: none; }
.faq-item[open] summary::after { content: '–'; }
.faq-item[open] summary { color: var(--accent-deep, #c0392b); }
.faq-answer { padding: 0 1rem 1rem; color: var(--ink-2); line-height: 1.6; }
.faq-cta { margin-top: .2rem; }

/* Banner de acceso al foro (perfil del alumno) */
.profile-forum-cta-wrap { padding: 0 0 .5rem; margin-top: -1rem; }
.forum-cta { display: flex; align-items: center; gap: 1.1rem; padding: 1.1rem 1.4rem; border-radius: 18px;
    background: linear-gradient(100deg, #e2001a 0%, #b3001a 55%, #0b1b2e 100%); color: #fff;
    box-shadow: 0 12px 30px rgba(226,0,26,.22); transition: transform .2s var(--ease, ease), box-shadow .2s; }
.forum-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(226,0,26,.3); color: #fff; }
.forum-cta-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.16); }
.forum-cta-icon .b-icon { width: 28px; height: 28px; color: #fff; }
.forum-cta-text { display: flex; flex-direction: column; gap: .15rem; }
.forum-cta-text strong { font-size: 1.12rem; font-weight: 700; }
.forum-cta-text span { font-size: .9rem; color: rgba(255,255,255,.9); }
.forum-cta-arrow { margin-left: auto; flex: none; }
.forum-cta-arrow .b-icon { width: 26px; height: 26px; color: #fff; }
@media (max-width: 560px) { .forum-cta-arrow { display: none; } .forum-cta-text strong { font-size: 1rem; } }

/* ----------------------------- Historial académico --------------------- */
.acad-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.acad-stat { background: var(--paper, #f7f5ef); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; text-align: center; }
.acad-stat strong { display: block; font-size: 1.5rem; font-family: var(--font-display); color: var(--accent-deep); }
.acad-stat span { font-size: .8rem; color: var(--ink-2); }
.acad-course { border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; margin-bottom: 1.1rem; }
.acad-course-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.acad-course-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.acad-course-meta { font-size: .82rem; color: var(--muted, #8a8f8a); }
.acad-progress { margin-bottom: .9rem; }
.acad-progress-bar { height: 7px; border-radius: 999px; background: var(--paper-2, #eceae3); overflow: hidden; }
.acad-progress-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal, #1f9c8b), var(--accent-deep, #c0392b)); }
.acad-progress-label { display: block; margin-top: .35rem; font-size: .78rem; color: var(--ink-2); }
.acad-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.acad-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #8a8f8a); border-bottom: 1px solid var(--line); padding: .4rem .5rem; }
.acad-table td { padding: .5rem .5rem; border-bottom: 1px solid var(--line); }
.acad-table tr:last-child td { border-bottom: 0; }
.acad-final td { font-weight: 600; }
.acad-badge { display: inline-block; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-deep); background: var(--accent-soft, #fdeaea); border-radius: 6px; padding: .05rem .35rem; margin-left: .25rem; }
.acad-badge-final { color: #0b1b2e; background: #e7ecf3; }
.acad-extra { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: .8rem; font-size: .85rem; align-items: center; }
.acad-extra .cc-mini { width: 14px; height: 14px; vertical-align: -2px; color: var(--teal, #1f9c8b); }
.acad-cert strong { color: var(--accent-deep); }

/* Historial — impresión (PDF) */
@page acadpage { size: A4 portrait; margin: 1.4cm; }
.acad-sheet { page: acadpage; max-width: 21cm; margin: 1.5rem auto; background: #fff; color: #1c1c1c; padding: 1.6rem; }
.acad-print-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 2px solid #e2001a; padding-bottom: .6rem; margin-bottom: 1rem; }
.acad-print-title { font-size: 1.6rem; font-weight: 800; margin: 0; color: #0b1b2e; }
.acad-print-inst { color: #555; font-size: .9rem; }
.acad-print-logo { height: 1.6cm; width: auto; }
.acad-print-student { display: grid; grid-template-columns: repeat(2, 1fr); gap: .2rem .8rem; margin-bottom: 1.1rem; font-size: .92rem; }
.acad-print-student .lbl { color: #888; margin-right: .3rem; }
.acad-print-foot { margin-top: 1.2rem; border-top: 1px solid #ddd; padding-top: .5rem; font-size: .75rem; color: #888; text-align: center; }
@media print { .acad-sheet { margin: 0; padding: 0; max-width: none; } .acad-course { break-inside: avoid; } }

/* ----------------------------- Formulario de curso --------------------- */
.course-form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.cf-main, .cf-side { display: grid; gap: 1.5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 600; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--coral); }
.check-warn { color: var(--coral-deep); }
.cf-submit { display: grid; gap: .6rem; position: sticky; top: 80px; }

.pres-toolbar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pres-upload { cursor: pointer; }
.pres-status { font-size: .85rem; font-weight: 600; color: var(--muted); }
.pres-status.is-ok { color: var(--teal-deep); }
.pres-status.is-err { color: #d33; }
.pres-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pres-pane-label { display: block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .4rem; }
#presInput { width: 100%; font-family: ui-monospace, monospace; font-size: .82rem; line-height: 1.5; padding: .9rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--paper-2); resize: vertical; }
.pres-preview { max-height: 420px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 1.2rem; background: var(--paper); }

.cover-uploader { display: grid; gap: .7rem; }
.cover-preview { aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2); border: 1px dashed var(--line); display: grid; place-items: center; color: var(--muted); }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ----------------------------- Presentación renderizada ---------------- */
.pres { line-height: 1.7; color: var(--ink-2); }
.pres h3 { font-family: var(--font-display); color: var(--ink); margin: 1.6rem 0 .6rem; line-height: 1.25; }
.pres h3:first-child { margin-top: 0; }
.pres-section { font-size: 1.25rem; font-weight: 600; padding-bottom: .4rem; border-bottom: 2px solid var(--accent-soft); }
.pres-module {
    font-size: 1.05rem; font-weight: 600; color: var(--accent-deep);
    background: var(--accent-soft); padding: .6rem 1rem; border-radius: 10px; border-bottom: none;
}
.pres p { margin: .6rem 0; }
.pres-list { margin: .6rem 0 1rem 0; padding-left: 0; display: grid; gap: .45rem; }
.pres-list li { position: relative; padding-left: 1.6rem; }
.pres-list li::before { content: ""; position: absolute; left: .3rem; top: .6em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.pres strong { color: var(--ink); }

/* ----------------------------- Contenido (temario admin) --------------- */
.content-grid { display: grid; grid-template-columns: 1fr 380px; gap: 1.5rem; align-items: start; }
.curriculum { display: grid; gap: 1rem; }
.curr-module { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); overflow: hidden; }
.curr-module-head { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; background: var(--paper-2); }
.curr-mnum { width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--coral); color: #fff; font-weight: 800; font-size: .85rem; display: grid; place-items: center; }
.curr-module-head h3 { font-size: 1rem; font-weight: 700; flex: 1; }
.curr-count { font-size: .8rem; color: var(--muted); font-weight: 600; }
.curr-lessons { padding: .4rem .6rem; display: grid; gap: .1rem; }
.curr-lessons li { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 8px; }
.curr-lessons li:hover { background: var(--paper-2); }
.curr-licon { color: var(--muted); display: inline-flex; }
.curr-ltitle { flex: 1; font-size: .92rem; font-weight: 600; }
.curr-ltags { display: flex; gap: .35rem; }
.tag-video { background: rgba(255,106,61,.14); color: var(--coral-deep); }
.tag-doc { background: rgba(15,181,162,.14); color: var(--teal-deep); }
.tag-text { background: var(--line); color: var(--muted); }
.curr-module-head form, .curr-lessons li form { margin: 0; display: flex; }
.curr-del { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.curr-del svg { width: 16px; height: 16px; }
.curr-del:hover { background: #fde8e8; color: #d33; }
.curr-del--sm { width: 26px; height: 26px; opacity: .55; }
.curr-del--sm svg { width: 14px; height: 14px; }
.curr-lessons li:hover .curr-del--sm { opacity: 1; }

/* Editor de temario: renombrar, reordenar, agregar */
.curr-rename { flex: 1; display: flex; align-items: center; gap: .3rem; margin: 0; }
.curr-rename input { flex: 1; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: .35rem .5rem; font-weight: 700; font-size: 1rem; color: var(--ink); }
.curr-rename input:hover { border-color: var(--line); }
.curr-rename input:focus { outline: none; border-color: var(--coral); background: var(--paper); box-shadow: 0 0 0 3px rgba(255,106,61,.12); }
.curr-save { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; color: var(--teal-deep); opacity: 0; transition: opacity .2s, background .2s; }
.curr-save svg { width: 16px; height: 16px; }
.curr-rename:hover .curr-save, .curr-rename input:focus ~ .curr-save { opacity: 1; }
.curr-save:hover { background: rgba(15,181,162,.14); }
.curr-ctrl { display: flex; align-items: center; gap: .15rem; }
.curr-ctrl form, .curr-lmove form { margin: 0; display: flex; }
.curr-move { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.curr-move svg { width: 16px; height: 16px; }
.curr-move:hover { background: var(--line); color: var(--ink); }
.curr-move--xs { width: 20px; height: 18px; }
.curr-move--xs svg { width: 13px; height: 13px; }
.curr-lmove { display: flex; flex-direction: column; gap: 0; flex: none; }
.curr-ltitle--link { color: var(--ink); transition: color .2s; }
.curr-ltitle--link:hover { color: var(--coral-deep); }
.curr-edit { width: 28px; height: 28px; flex: none; border-radius: 7px; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.curr-edit svg { width: 16px; height: 16px; }
.curr-edit:hover { background: var(--accent-soft); color: var(--accent-deep); }
.curr-add { display: flex; gap: .5rem; align-items: center; margin: .5rem .6rem .2rem; }
.curr-add input { flex: 1; padding: .5rem .7rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); font-size: .9rem; }
.curr-add input:focus { outline: none; border-color: var(--coral); }
.curr-add .btn { white-space: nowrap; }
.curr-add-module { margin: 1.3rem 0 0; padding-top: 1.2rem; border-top: 1px dashed var(--line); }

/* Materiales en el editor de lección */
.mat-admin-list { display: grid; gap: .5rem; margin-bottom: .5rem; }
.mat-admin-list li { display: flex; align-items: center; gap: .6rem; }
.mat-admin-list form { margin: 0; display: flex; }
.mat-ext--sm { width: 38px; height: 38px; font-size: .64rem; }
.mat-admin-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; font-size: .88rem; }
.mat-admin-name small { color: var(--muted); font-weight: 500; font-size: .76rem; }
.mat-admin-view { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.mat-admin-view:hover { background: var(--line); color: var(--ink); }
.hidden-form { display: none; }

/* Importación ZIP */
.import-card { position: sticky; top: 80px; }
.dropzone {
    border: 2px dashed var(--line); border-radius: var(--radius-sm); padding: 1.8rem 1rem; text-align: center;
    cursor: pointer; transition: border-color .25s, background .25s; color: var(--muted);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--coral); background: rgba(255,106,61,.05); }
.dz-icon { width: 34px; height: 34px; margin: 0 auto .5rem; color: var(--accent-deep); }
.dz-text { font-size: .9rem; }
.dz-text span { color: var(--coral-deep); font-weight: 700; }
.dz-file { margin-top: .6rem; font-weight: 700; color: var(--ink); }
.zip-help { margin-top: 1.4rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.zip-help h3 { font-size: .95rem; margin-bottom: .6rem; }
.zip-tree { background: var(--ink); color: #cdd6d1; border-radius: 10px; padding: 1rem; font-size: .76rem; line-height: 1.5; overflow-x: auto; font-family: ui-monospace, monospace; }
.zip-tree span { color: #7d8a83; }
.zip-rules { margin-top: 1rem; display: grid; gap: .5rem; font-size: .86rem; color: var(--ink-2); }
.zip-rules li { padding-left: 1.1rem; position: relative; }
.zip-rules li::before { content: "\2022"; position: absolute; left: 0; color: var(--coral); }
.zip-rules code { background: var(--paper-2); padding: .1rem .35rem; border-radius: 5px; font-size: .85em; }

/* ----------------------------- Aula: portada del curso ----------------- */
.course-cover { position: relative; padding: clamp(2.5rem, 6vw, 4rem) 0; background: var(--ink); color: #fff; overflow: hidden; }
.course-cover-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .28; }
.course-cover-overlay { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(20,32,28,.92), rgba(20,32,28,.6)); }
.course-cover-inner { position: relative; z-index: 1; max-width: 760px; }
.admin-crumbs.light a { color: #cdd6d1; }
.admin-crumbs.light { color: #8a978f; }
.course-cover-cat { display: inline-block; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--coral); margin-bottom: .6rem; }
.course-cover-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 4.5vw, 2.9rem); line-height: 1.1; }
.course-cover-sum { color: #cdd6d1; margin-top: .8rem; font-size: 1.08rem; }
.course-cover-meta { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 1.3rem 0; color: #b8c4bd; font-weight: 600; font-size: .92rem; }
.course-cover-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.course-cover-actions { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.course-cover-progress { min-width: 220px; }
.ccp-bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.18); overflow: hidden; }
.ccp-bar span { display: block; height: 100%; border-radius: 6px; background: var(--coral); transition: width .8s var(--ease); min-width: 2px; }
.ccp-label { font-size: .9rem; color: #eef2f6; font-weight: 700; margin-top: .45rem; display: inline-block; }

.course-detail { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.course-detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 2.5rem; align-items: start; }
.course-presentation { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: var(--shadow-sm); }

/* Ficha por pestañas */
.ficha-tabnav { display: flex; flex-wrap: wrap; gap: .3rem; border-bottom: 2px solid var(--line); margin-bottom: 1.6rem; }
.ficha-tab {
    padding: .7rem 1.1rem; font-weight: 700; font-size: .94rem; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .2s, border-color .2s;
}
.ficha-tab:hover { color: var(--ink); }
.ficha-tab.is-active { color: var(--accent-deep); border-bottom-color: var(--accent); }
.ficha-panel { display: none; animation: fichaFade .35s var(--ease); }
.ficha-panel.is-active { display: block; }
@keyframes fichaFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Edición de alumno */
.form-sep { border: none; border-top: 1px solid var(--line); margin: 1.2rem 0; }
input:disabled { background: var(--paper-2); color: var(--muted); cursor: not-allowed; }
.td-action { text-align: right; white-space: nowrap; }
.enrolled-list { display: grid; gap: .6rem; }
.enrolled-list li { display: flex; align-items: center; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--paper); }
.enrolled-info { flex: 1; min-width: 0; }
.enrolled-info strong { display: block; font-size: .95rem; }
.enrolled-meta { font-size: .82rem; color: var(--muted); font-weight: 600; }
.enrolled-list form { margin: 0; }

/* Temario (TOC) */
.course-toc { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); position: sticky; top: 80px; }
.course-toc-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.course-toc-head h2 { font-size: 1.15rem; font-family: var(--font-display); font-weight: 600; }
.course-toc-head span { font-size: .82rem; color: var(--muted); font-weight: 700; }
.toc-module { margin-bottom: 1.1rem; }
.toc-module-title { display: flex; align-items: center; gap: .6rem; font-size: .95rem; font-weight: 700; margin-bottom: .5rem; }
.toc-module-title span { width: 24px; height: 24px; flex: none; border-radius: 7px; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; font-size: .8rem; }
.toc-lessons { display: grid; gap: .15rem; }
.toc-lesson a, .toc-locked { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 9px; font-size: .9rem; font-weight: 600; }
.toc-lesson a { color: var(--ink-2); transition: background .2s, color .2s; }
.toc-lesson a:hover { background: var(--paper-2); color: var(--ink); }
.toc-licon { display: inline-flex; color: var(--muted); }
.toc-lesson.is-done .toc-licon { color: var(--teal); }
.toc-lesson.is-current a { background: var(--accent-soft); color: var(--accent-deep); }
.toc-lesson.is-current .toc-licon { color: var(--accent-deep); }
.toc-locked { color: #b3bcb7; cursor: not-allowed; }

/* ----------------------------- Reproductor ----------------------------- */
.player { display: grid; grid-template-columns: 320px 1fr; min-height: calc(100vh - 67px); }
.player-side { background: var(--paper); border-right: 1px solid var(--line); padding: 1.4rem; overflow-y: auto; max-height: calc(100vh - 67px); position: sticky; top: 67px; }
.player-back { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; margin-bottom: 1.4rem; color: var(--ink); }
.pb-icon { width: 18px; height: 18px; transform: rotate(180deg); color: var(--accent-deep); }
.player-main { display: flex; flex-direction: column; min-width: 0; }
.player-toc-toggle { display: none; align-items: center; gap: .5rem; margin: 1rem 1rem 0; font-weight: 700; color: var(--accent-deep); }
.player-content { flex: 1; padding: clamp(1.5rem, 4vw, 3rem); max-width: 1240px; width: 100%; margin: 0 auto; }
.player-progress { margin-bottom: 1.6rem; }
.player-progress .pp-head { display: flex; align-items: baseline; justify-content: space-between; font-size: .82rem; font-weight: 700; color: var(--ink-2); margin-bottom: .4rem; }
.player-progress .pp-head strong { font-size: 1rem; color: var(--accent-deep); }
.player-progress .pp-bar { height: 8px; border-radius: 999px; background: var(--paper-2, #eceae3); overflow: hidden; }
.player-progress .pp-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal, #1f9c8b), var(--accent-deep, #c0392b)); transition: width .4s var(--ease, ease); }
.player-progress .pp-sub { display: block; margin-top: .35rem; font-size: .78rem; color: var(--muted, #8a8f8a); }
.player-eyebrow { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-deep); }
.player-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin: .3rem 0 1.4rem; line-height: 1.15; }
.player-video { position: relative; aspect-ratio: 16/9; max-height: calc(100vh - 220px); border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); margin-bottom: 1.8rem; }
.player-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-text { line-height: 1.75; color: var(--ink-2); margin-bottom: 1.8rem; max-width: 900px; }
.player-text p { margin: .7rem 0; }
.player-materials { margin-top: 1rem; }
.player-materials h2 { font-size: 1.2rem; font-family: var(--font-display); font-weight: 600; margin-bottom: 1rem; }
.material-list { display: grid; gap: .7rem; }
.material-list li { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--paper); }
.mat-ext { flex: none; width: 48px; height: 48px; border-radius: 10px; background: rgba(255,106,61,.12); color: var(--coral-deep); display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
.mat-name { flex: 1; font-weight: 600; font-size: .94rem; min-width: 0; }
.mat-size { color: var(--muted); font-size: .82rem; font-weight: 600; }
.mat-download { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--accent-deep); font-size: .88rem; }
.mat-download .cc-mini { width: 15px; height: 15px; }

.player-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem clamp(1.5rem, 4vw, 3rem); border-top: 1px solid var(--line); background: var(--paper); position: sticky; bottom: 0; }
.player-nav.is-loading .btn-spinner { display: inline-block; }
.player-nav.is-loading .btn-label { opacity: .6; }

/* ----------------------------- Responsive (cursos) --------------------- */
@media (max-width: 980px) {
    .course-form-grid, .content-grid, .course-detail-grid { grid-template-columns: 1fr; }
    .course-admin-grid { grid-template-columns: repeat(2, 1fr); }
    .cf-submit, .import-card, .course-toc { position: static; }
    .player { grid-template-columns: 1fr; }
    .player-side { position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 85vw); z-index: 60; transform: translateX(-105%); transition: transform .3s var(--ease); max-height: 100vh; box-shadow: var(--shadow-lg); }
    .player-side.is-open { transform: translateX(0); }
    .player-toc-toggle { display: inline-flex; }
}
@media (max-width: 720px) {
    .pres-editor { grid-template-columns: 1fr; }
    .course-admin-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   EVALUACIONES — flujo, pruebas, encuesta y editor
   ========================================================================== */
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--coral); color: #fff; font-size: .72rem; font-weight: 800; }

/* Flujo en el temario */
.toc-flow-mod { margin-top: 1rem; }
.toc-flow-item.toc-eval a, .toc-flow-item.toc-eval .toc-locked { background: var(--paper-2); border: 1px solid var(--line-soft); margin: .25rem 0; }
.toc-flow-item.toc-eval.is-current a { background: var(--accent-soft); border-color: transparent; }
.toc-badge { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; margin-top: .1rem; }
.toc-flow-item.toc-eval .toc-licon { color: var(--accent-deep); }

/* Página de prueba (alumno) */
.quiz-content, .survey-content { max-width: 760px; }
.quiz-desc { color: var(--ink-2); margin-bottom: 1rem; }
.quiz-warn { display: inline-flex; align-items: center; gap: .5rem; background: rgba(241,167,58,.16); color: #b07400; padding: .6rem 1rem; border-radius: 10px; font-weight: 600; font-size: .9rem; margin: 0; }
.quiz-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; position: sticky; top: 75px; z-index: 5; }
.quiz-timer { display: inline-flex; align-items: center; gap: .6rem; background: var(--ink); color: #fff; padding: .5rem 1.1rem; border-radius: 999px; box-shadow: var(--shadow); }
.qt-label { font-size: .74rem; opacity: .8; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.qt-clock { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.quiz-timer.is-danger { background: #c8102e; animation: qtpulse 1s infinite; }
@keyframes qtpulse { 50% { opacity: .72; } }
.quiz-q { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 1.2rem; margin-bottom: 1rem; }
.quiz-q legend { display: flex; gap: .6rem; align-items: flex-start; font-weight: 700; font-size: 1.02rem; padding: 0; }
.quiz-qnum { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; font-size: .85rem; font-weight: 800; }
.quiz-opts { display: grid; gap: .5rem; margin-top: 1rem; padding-left: 2.1rem; }
.quiz-opt { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .2s, background .2s; }
.quiz-opt:hover { border-color: var(--accent); }
.quiz-opt input { accent-color: var(--coral); width: 18px; height: 18px; }
.quiz-opt input:checked + span { font-weight: 700; }

.quiz-result { text-align: center; padding: 2rem 1rem; }
.quiz-result-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: rgba(15,181,162,.14); color: var(--teal-deep); }
.quiz-result h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; }
.quiz-grade { font-size: 1.1rem; margin-top: .5rem; }
.quiz-retake { margin: 1.5rem 0; }
.retake-box summary { cursor: pointer; font-weight: 700; color: var(--accent-deep); }
.retake-box textarea { width: 100%; margin: .6rem 0; padding: .7rem; border: 1.5px solid var(--line); border-radius: 10px; }
.quiz-pending { display: inline-flex; align-items: center; gap: .5rem; color: #b07400; font-weight: 600; }
.player-nav-inline { margin-top: 1.5rem; }

/* Encuesta (alumno) */
.survey-q { padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.survey-qtext { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; margin-bottom: .8rem; }
.survey-scale { display: flex; gap: .4rem; flex-wrap: wrap; padding-left: 2.1rem; }
.scale-opt { cursor: pointer; }
.scale-opt input { position: absolute; opacity: 0; }
.scale-opt span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 700; transition: all .2s; }
.scale-opt input:checked + span { background: var(--coral); color: #fff; border-color: var(--coral); }
.scale-opt:hover span { border-color: var(--coral); }
.survey-form textarea { width: 100%; padding: .8rem; border: 1.5px solid var(--line); border-radius: 10px; margin-left: 0; }
.survey-form > button { margin-top: 1.5rem; }

/* Editor de pruebas (admin) */
.quiz-builder-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.module-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; margin-top: .5rem; }
.qb-question { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 1.1rem; margin-bottom: 1rem; background: var(--paper-2); }
.qb-qhead { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.qb-qnum { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--coral); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.qb-qtext { flex: 1; padding: .55rem .7rem; border: 1.5px solid var(--line); border-radius: 8px; font-weight: 600; }
.qb-options { display: grid; gap: .45rem; margin: 0 0 .7rem 2.1rem; }
.qb-option { display: flex; align-items: center; gap: .6rem; }
.qb-option input[type=radio] { accent-color: var(--teal); width: 18px; height: 18px; flex: none; }
.qb-option input[type=text] { flex: 1; padding: .5rem .7rem; border: 1.5px solid var(--line); border-radius: 8px; }
.import-quiz-card { border: 1px dashed var(--line); background: var(--paper-2); }
.import-quiz-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.import-quiz-paste { display: grid; gap: .6rem; margin-bottom: .8rem; }
.import-quiz-paste textarea { width: 100%; padding: .8rem; border: 1.5px solid var(--line); border-radius: 10px; font-family: ui-monospace, monospace; font-size: .85rem; background: var(--paper); }
.import-quiz-warn { font-size: .82rem; color: #b07400; margin: 0; }

/* Lista de evaluaciones en Contenido */
.eval-card { margin-top: 1.5rem; }
.eval-list { display: grid; gap: .7rem; }
.eval-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.eval-icon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(15,181,162,.14); color: var(--teal-deep); }
.eval-icon.is-final { background: rgba(255,106,61,.14); color: var(--coral-deep); }
.eval-info { flex: 1; min-width: 0; }
.eval-info strong { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.eval-meta { color: var(--muted); font-size: .85rem; }
.eval-actions { display: flex; align-items: center; gap: .4rem; }
.eval-actions form { margin: 0; }

/* Revisión (admin) */
.grade-form { display: flex; gap: .4rem; align-items: center; margin: 0; }
.grade-input { width: 70px; padding: .4rem .6rem; border: 1.5px solid var(--line); border-radius: 8px; text-align: center; font-weight: 700; }
.grade-form--lg { gap: .6rem; }
.grade-form--lg .grade-input { width: 120px; }
.answer-list { display: grid; gap: .7rem; padding-left: 1.2rem; }
.answer-item { padding: .9rem 1rem; border-radius: 10px; border-left: 4px solid var(--line); background: var(--paper-2); }
.answer-item.is-ok { border-left-color: var(--teal); }
.answer-item.is-bad { border-left-color: #e5484d; }
.answer-q { font-weight: 700; margin-bottom: .4rem; }
.answer-given { display: flex; align-items: center; gap: .4rem; font-size: .92rem; }
.answer-mark { color: var(--teal-deep); font-weight: 800; }
.answer-item.is-bad .answer-mark { color: #d33; }
.answer-correct { font-size: .88rem; color: var(--teal-deep); margin-top: .3rem; }
.survey-stats { display: grid; gap: .6rem; }
.survey-stats li { display: grid; grid-template-columns: 1fr 120px 60px; gap: .8rem; align-items: center; }
.ss-text { font-size: .9rem; }
.ss-bar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }
.ss-bar span { display: block; height: 100%; background: var(--teal); border-radius: 6px; }
.ss-val { font-weight: 700; text-align: right; }
.ss-val small { color: var(--muted); font-weight: 500; }
.survey-comments { display: grid; gap: .6rem; }
.survey-comments li { padding: .8rem 1rem; background: var(--paper-2); border-radius: 10px; border-left: 3px solid var(--coral); font-size: .92rem; }
.retake-actions { display: flex; gap: .4rem; }
.retake-actions form { margin: 0; }

@media (max-width: 720px) {
    .survey-stats li { grid-template-columns: 1fr; gap: .3rem; }
    .eval-item { flex-wrap: wrap; }
}

/* ==========================================================================
   CERTIFICADOS (imprimibles)
   ========================================================================== */
.cover-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }
.cover-ghost:hover { background: #fff; color: var(--ink); }
.learn-cert { display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; font-weight: 700; font-size: .85rem; color: var(--accent-deep); }
.learn-cert .cc-mini { width: 15px; height: 15px; }

/* Ajustes admin: imágenes de certificación */
.cert-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cert-img-field { display: grid; gap: .5rem; }
.cert-img-field > label:first-child { font-weight: 700; font-size: .9rem; }
.cert-img-preview { aspect-ratio: 3/2; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); color: var(--muted); overflow: hidden; }
.cert-img-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Página del certificado */
/* Certificado vertical (tamaño carta) — diseño GCA QUALITY */
.print-body { background: #d9ddda; margin: 0; }
.cert-toolbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; gap: .5rem; justify-content: center; align-items: center; padding: .7rem; background: var(--ink); box-shadow: var(--shadow); }
.cert-page { padding: 70px 16px 40px; display: flex; justify-content: center; }
.cert-sheet {
    width: 21.6cm; max-width: 100%; min-height: 27.9cm; background: #fff; position: relative; overflow: hidden;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,.45);
    font-family: var(--font-body); color: #1c1c1c;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cert-deco { position: absolute; z-index: 0; }
.cert-deco-tl { top: 0; left: 0; width: 7.2cm; height: auto; }
.cert-deco-br { bottom: 0; right: 0; width: 10.5cm; height: auto; }
.cert-inner { position: relative; z-index: 1; min-height: 27.9cm; padding: 1.4cm 1.7cm; display: flex; flex-direction: column; }
.cert-top { display: flex; justify-content: center; align-items: center; gap: .85cm; margin: .2cm 0 1.2cm; }
.cert-logo { height: 2.1cm; width: auto; }
.cert-top-stamp { height: 2.2cm; width: auto; }
.cert-sence-logo { height: 1.98cm; width: auto; }

.cert-word { font-weight: 800; font-size: 4.7rem; line-height: .95; letter-spacing: -.02em; color: #9a9da1; margin: 0; }
.cert-name { font-weight: 400; font-size: 2.5rem; color: #2c2c2c; line-height: 1.1; margin: .25cm 0 .25cm; }
.cert-lines { font-size: 1.18rem; line-height: 1.52; }
.cert-lines p { margin: 0; }
.cert-lines .lbl { color: #8a8d90; font-weight: 400; }
.cert-lines strong { color: #1c1c1c; font-weight: 700; }
.cert-lines .val-course { color: #1c1c1c; font-weight: 800; font-size: 1.24rem; margin-bottom: .05cm; }

.cert-bottom { margin-top: auto; display: flex; align-items: flex-end; gap: 1.4cm; padding-bottom: .2cm; }
.cert-signblock { position: relative; min-width: 6.8cm; }
.cert-sign-media { position: relative; height: 3.9cm; margin-bottom: .05cm; }
.cert-stamp { position: absolute; left: -.4cm; bottom: -.1cm; height: 3cm; width: auto; opacity: .85; }
.cert-sign-img { position: absolute; left: .5cm; bottom: .15cm; height: 3.7cm; width: auto; }
.cert-sign-name { font-weight: 700; color: #1c1c1c; border-top: 1.5px solid #2c2c2c; padding-top: .12cm; }
.cert-sign-role, .cert-sign-org { color: #3a3a3a; font-size: .98rem; line-height: 1.32; }
.cert-otec { color: #2a2a2a; font-weight: 600; line-height: 1.38; padding-bottom: .6cm; }
.cert-otec-res { margin-top: .1cm; }
.cert-qr { display: flex; align-items: center; gap: .3cm; margin: .35cm 0 .1cm; }
.cert-qr-img { width: 2.2cm; height: 2.2cm; flex: none; }
.cert-qr-img .qr-svg { width: 100%; height: 100%; display: block; }
.cert-qr-cap { font-size: .7rem; line-height: 1.3; color: #2a2a2a; max-width: 3.1cm; }
.cert-qr-cap strong { display: block; font-size: .78rem; }
.cert-qr-cap span { display: block; word-break: break-word; }
.cert-web { position: absolute; right: 1.4cm; bottom: 1cm; z-index: 2; color: #fff; font-weight: 700; letter-spacing: .04em; font-size: 1.05rem; }

/* Lote de certificados (uno por página) */
.cert-batch .cert-page { break-after: page; page-break-after: always; }
.cert-batch .cert-page:last-child { break-after: auto; page-break-after: auto; }

/* Generador por curso (página de certificación) */
.cert-batch-form { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.cert-batch-form select { min-width: 280px; flex: 1; }
.btn.is-disabled { opacity: .45; pointer-events: none; }
.cert-batch-group { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .9rem; }
.cert-batch-label { font-size: .82rem; font-weight: 700; color: var(--ink-2); min-width: 190px; }
.cert-batch-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cover-note { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.14); color: #fff; padding: .7rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: .92rem; }

@page certpage { size: letter portrait; margin: 0; }
@media print {
    .no-print { display: none !important; }
    .print-body { background: #fff; }
    .cert-page { padding: 0; }
    .cert-sheet { width: 21.6cm; min-height: 27.9cm; box-shadow: none; page: certpage; }
}
@media (max-width: 720px) {
    .cert-img-grid { grid-template-columns: 1fr; }
    .cert-word { font-size: 3rem; }
    .cert-name { font-size: 1.7rem; }
    .cert-lines { font-size: 1rem; }
    .cert-bottom { flex-direction: column; align-items: flex-start; gap: .6cm; }
}

/* ==========================================================================
   REPORTES
   ========================================================================== */
.report-courses { display: grid; gap: 1rem; }
.report-course { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); }
.report-course-info strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.report-course-info span { color: var(--muted); font-size: .88rem; }
.report-course-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.report-link { display: flex; align-items: center; gap: .4rem; }
.report-link-label { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .85rem; color: var(--ink-2); margin-right: .2rem; }
.report-link-label .cc-mini { width: 15px; height: 15px; color: var(--accent-deep); }

/* Selector de curso para reportes */
.report-select-form { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.report-select-form .field { flex: 1; min-width: 260px; margin: 0; }
.report-panel { margin-top: 1.2rem; }
.report-types { display: grid; gap: .8rem; }
.report-type { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--paper); transition: box-shadow .25s; }
.report-type:hover { box-shadow: var(--shadow-sm); }
.report-type-icon { width: 48px; height: 48px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); }
.report-type:nth-child(2) .report-type-icon { background: rgba(15,181,162,.14); color: var(--teal-deep); }
.report-type:nth-child(3) .report-type-icon { background: rgba(241,167,58,.16); color: #d68a18; }
.report-type-info { flex: 1; min-width: 0; }
.report-type-info strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.report-type-info span { color: var(--muted); font-size: .88rem; }
.report-type-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.report-type-actions .cc-mini { width: 14px; height: 14px; }
.report-email { margin-top: 1.2rem; }
.report-email-checks { display: flex; flex-wrap: wrap; gap: .7rem 1.6rem; margin: .5rem 0 0; }
.report-email-form .check { margin: 0; }
.report-email-group { margin-bottom: 1.1rem; }
.report-email-label { display: block; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
@media (max-width: 620px) {
    .report-type { flex-wrap: wrap; }
    .report-type-actions { width: 100%; }
}

/* Hoja del reporte (PDF) */
.report-page { padding: 70px 16px 40px; display: flex; justify-content: center; }
.report-sheet {
    width: 27.9cm; max-width: 100%; min-height: 21.6cm; background: #fff; position: relative;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,.45); padding: 1.4cm 1.6cm;
    font-family: var(--font-body); color: #1c1c1c;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.report-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid #e2001a; padding-bottom: .5cm; }
.report-logo { height: 1.5cm; width: auto; }
.report-head-meta { text-align: right; display: flex; flex-direction: column; }
.report-head-meta span:first-child { font-weight: 800; color: var(--ink); }
.report-head-meta span:last-child { font-size: .85rem; color: var(--muted); }
.report-titlebar { display: flex; align-items: baseline; justify-content: space-between; margin-top: .6cm; }
.report-titlebar h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; color: var(--ink); }
.report-gen { font-size: .85rem; color: var(--muted); }
.report-courseinfo { display: flex; flex-wrap: wrap; gap: .3cm 1.2cm; margin: .4cm 0 .7cm; padding: .4cm .6cm; background: #f7f5f2; border-radius: 10px; }
.report-courseinfo div { display: flex; flex-direction: column; }
.report-courseinfo span { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.report-courseinfo strong { font-size: .98rem; color: var(--ink); }

.report-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.report-table thead th { background: #e2001a; color: #fff; font-weight: 700; text-align: left; padding: .35cm .4cm; font-size: .85rem; }
.report-table th.ta-c, .report-table td.ta-c { text-align: center; }
.report-table tbody td { padding: .28cm .4cm; border-bottom: 1px solid #ececec; }
.report-table tbody tr:nth-child(even) { background: #faf8f5; }
.report-table tbody tr:hover { background: #fff4ef; }
.report-table .muted { color: var(--muted); }
.report-table .cell-time { color: var(--muted); font-weight: 500; font-size: .78em; }

.report-foot { display: flex; justify-content: space-between; margin-top: .7cm; padding-top: .35cm; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.report-survey { font-size: .82rem; }
.report-survey thead th.ta-c { padding: .25cm .1cm; min-width: 1.4em; }
.report-survey tbody td.ta-c { padding: .22cm .1cm; }
.report-legend { margin-top: .6cm; }
.report-legend h3, .report-comments h3 { font-size: 1rem; font-family: var(--font-display); font-weight: 600; margin-bottom: .25cm; color: var(--ink); }
.report-legend h3 span { color: var(--muted); font-weight: 400; font-size: .85rem; }
.report-legend ol { columns: 2; column-gap: 1.2cm; padding-left: 1.3em; font-size: .8rem; color: var(--ink-2); }
.report-legend li { margin-bottom: .08cm; break-inside: avoid; }
.report-comments { margin-top: .6cm; }
.report-comments p { font-size: .85rem; margin-bottom: .15cm; padding: .15cm .35cm; background: #f7f5f2; border-radius: 6px; break-inside: avoid; }

@page reportpage { size: A4 landscape; margin: 0; }
@media print {
    .report-page { padding: 0; }
    .report-sheet { width: 100%; min-height: 100vh; box-shadow: none; padding: 1cm 1.2cm; page: reportpage; }
    .report-table tbody tr:hover { background: transparent; }
}
@media (max-width: 760px) {
    .report-course { flex-direction: column; align-items: flex-start; }
}

/* ============================ Catálogo público (ficha de curso) ========== */
.cat-hero { padding-top: clamp(90px, 12vw, 140px); padding-bottom: clamp(32px, 5vw, 56px); }
.cat-crumbs { margin-bottom: 1.4rem; }
.cat-crumbs a { color: var(--muted); text-decoration: none; }
.cat-crumbs a:hover { color: var(--accent-deep); }
.cat-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.cat-hero-media { position: relative; border-radius: 22px; overflow: hidden;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep)); box-shadow: var(--shadow); display: grid; place-items: center; }
.cat-hero-media img { width: 100%; height: auto; object-fit: contain; display: block; }
.cat-hero-fallback { padding: 4rem 0; }
.cat-hero-fallback .course-play { width: 64px; height: 64px; color: #fff; opacity: .9; }
.cat-tag { position: absolute; top: 14px; left: 14px; font-size: .76rem; font-weight: 700;
    padding: .35rem .8rem; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); }
.cat-tag--scorm { background: var(--accent-deep); color: #fff; }
.cat-title { margin: .4rem 0 .6rem; }
.cat-summary { margin-bottom: 1.2rem; }
.cat-meta { display: flex; flex-wrap: wrap; gap: .6rem .9rem; margin-bottom: 1rem; }
.cat-meta span { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem;
    color: var(--ink-2); background: var(--surface-2, #f4f6f8); border: 1px solid var(--line); padding: .4rem .8rem; border-radius: 999px; }
.cat-meta .cc-mini { color: var(--accent-deep); }
.cat-instructor { display: flex; align-items: center; gap: .4rem; color: var(--muted); margin-bottom: 1.3rem; }
.cat-instructor .cc-mini { color: var(--accent-deep); }
.cat-cta { display: flex; flex-wrap: wrap; gap: .8rem; }

.cat-detail { padding-top: clamp(24px, 4vw, 40px); }
.cat-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(1.5rem, 4vw, 2.8rem); align-items: start; }
.cat-block { margin-bottom: 2rem; }
.cat-h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.cat-desc { color: var(--ink-2); line-height: 1.7; }
.cat-presentation { color: var(--ink-2); line-height: 1.7; }
.cat-presentation img { max-width: 100%; border-radius: 12px; }
.cat-scorm-note { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface-2, #f4f6f8);
    border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.4rem; }
.cat-scorm-note .cc-mini { width: 26px; height: 26px; color: var(--accent-deep); flex: 0 0 auto; }
.cat-scorm-note p { color: var(--muted); margin-top: .3rem; }

.cat-modules { list-style: none; display: flex; flex-direction: column; gap: .8rem; counter-reset: none; }
.cat-module { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.cat-module-head { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.2rem; background: var(--surface-2, #f7f9fb); }
.cat-module-num { font-family: var(--font-display); font-weight: 700; color: var(--accent-deep); font-size: 1.1rem;
    width: 38px; height: 38px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; flex: 0 0 auto; }
.cat-module-title { font-size: 1.05rem; font-weight: 700; flex: 1; }
.cat-module-count { font-size: .82rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.cat-lessons { list-style: none; padding: .6rem 1.2rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.cat-lessons li { display: flex; align-items: center; gap: .6rem; color: var(--ink-2); }
.cat-lessons .cc-mini { width: 16px; height: 16px; color: var(--accent-deep); flex: 0 0 auto; }

.cat-card { position: sticky; top: 96px; background: #fff; border: 1px solid var(--line); border-radius: 20px;
    padding: 1.5rem; box-shadow: var(--shadow); }
.cat-card-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; }
.cat-includes { list-style: none; display: flex; flex-direction: column; gap: .65rem; margin-bottom: 1.3rem; }
.cat-includes li { display: flex; align-items: center; gap: .6rem; color: var(--ink-2); font-size: .92rem; }
.cat-includes .cc-mini { width: 18px; height: 18px; color: var(--accent-deep); flex: 0 0 auto; }
.btn-block { width: 100%; justify-content: center; }
.cat-card-note { font-size: .82rem; color: var(--muted); text-align: center; margin-top: .7rem; }

@media (max-width: 860px) {
    .cat-hero-grid { grid-template-columns: 1fr; }
    .cat-detail-grid { grid-template-columns: 1fr; }
    .cat-card { position: static; }
}

/* Distintivo SCORM en tarjeta de curso (admin) */
.cac-scorm-tag { position: absolute; top: 12px; left: 12px; z-index: 3;
    background: var(--accent-deep, #0b1b2e); color: #fff; font-size: .68rem; font-weight: 800;
    letter-spacing: .04em; padding: .25rem .6rem; border-radius: 999px; }

/* Temario SCORM en modo lectura (admin/cursos/{id}/contenido) */
.curriculum--readonly .curr-module-head { display: flex; align-items: center; gap: .8rem; }
.curr-mtitle { font-weight: 700; flex: 1; }
.curr-mcount { font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.curriculum--readonly .curr-lessons li { display: flex; align-items: center; gap: .6rem; padding: .5rem .2rem; }
.curriculum--readonly .curr-ltitle { color: var(--ink-2); }
.scorm-includes { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.scorm-includes .tag { display: inline-flex; align-items: center; gap: .4rem; }
.scorm-includes .cc-mini { width: 15px; height: 15px; }

/* ============================ PWA (instalar app) ======================== */
.pwa-install-btn {
    position: fixed; right: 18px; bottom: 18px; z-index: 1200;
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--accent, #e2001a); color: #fff; border: 0; cursor: pointer;
    font-weight: 700; font-size: .92rem; padding: .75rem 1.1rem; border-radius: 999px;
    box-shadow: 0 10px 30px rgba(226,0,26,.35);
    transform: translateY(24px); opacity: 0; transition: transform .35s ease, opacity .35s ease, background .2s;
}
.pwa-install-btn.is-on { transform: translateY(0); opacity: 1; }
.pwa-install-btn:hover { background: var(--accent-deep, #b80016); }
.pwa-install-btn svg { flex: 0 0 auto; }

.pwa-ios-tip {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1200;
    background: #10221E; color: #fff; border-radius: 14px; padding: .85rem 2.4rem .85rem 1rem;
    font-size: .9rem; line-height: 1.5; box-shadow: 0 12px 36px rgba(0,0,0,.3);
    transform: translateY(20px); opacity: 0; transition: transform .35s ease, opacity .35s ease;
    max-width: 460px; margin: 0 auto;
}
.pwa-ios-tip.is-on { transform: translateY(0); opacity: 1; }
.pwa-ios-tip strong { color: #fff; }
.pwa-ios-x {
    position: absolute; top: 6px; right: 8px; background: transparent; border: 0; color: #fff;
    font-size: 1.4rem; line-height: 1; cursor: pointer; opacity: .8; padding: .2rem .4rem;
}
.pwa-ios-x:hover { opacity: 1; }
@media (min-width: 640px) { .pwa-ios-tip { left: auto; right: 18px; bottom: 18px; } }
