:root{--navy:#19172d;--blue:#6d7aba;--blue-dark:#5966a6;--blue-soft:#eef0f8;--line:#dedfeb;--bg:#f7f7fb;--text:#1d1d1b;--muted:#666575;--danger:#b42318;--ok:#067647;--topbar-h:64px;--sidebar-w:240px}*{box-sizing:border-box}html{min-width:0}body{margin:0;min-width:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text);overflow-x:hidden}a{color:var(--blue);text-decoration:none}.topbar{height:var(--topbar-h);background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:relative;z-index:60}.topbar-left,.userbar{display:flex;align-items:center;gap:10px;min-width:0}.brand{font-weight:800;color:var(--navy);white-space:nowrap}.userbar{justify-content:flex-end}.user-name{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-toggle{display:none;width:42px;height:42px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:9px;cursor:pointer;flex:0 0 auto}.menu-toggle span{display:block;height:2px;background:var(--navy);margin:4px 0;border-radius:2px}.layout{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:calc(100vh - var(--topbar-h));min-width:0}.sidebar{background:var(--navy);padding:20px 14px;min-height:calc(100vh - var(--topbar-h));position:relative;z-index:55}.sidebar nav{display:block}.sidebar a{display:block;color:#d7e3ef;padding:11px 12px;border-radius:8px;margin:3px 0;line-height:1.35}.sidebar a:hover,.sidebar a.active{background:#302d4c;color:#fff}.sidebar a[aria-disabled="true"]{color:#afc1d3;cursor:default}.nav-note{font-size:.88em}.sidebar-mobile-head{display:none}.nav-backdrop{display:none;border:0}.content{padding:28px;max-width:1400px;width:100%;min-width:0}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;margin-bottom:18px;box-shadow:0 1px 2px rgba(16,24,40,.04);min-width:0}.grid{display:grid;gap:16px;min-width:0}.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.cols-3{grid-template-columns:2fr .7fr 1fr}.grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.kpi strong{font-size:28px;display:block;margin-top:6px}.muted{color:var(--muted)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--line);background:#fff;color:var(--text);padding:9px 14px;border-radius:8px;cursor:pointer;font-weight:600;min-height:40px}.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}.btn.danger{background:#fff;color:var(--danger);border-color:#f0b7b2}.btn.small{padding:6px 10px;font-size:13px;min-height:34px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px;min-width:0}.toolbar>div{min-width:0}.toolbar h1{margin:0;overflow-wrap:anywhere}.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}table{width:100%;border-collapse:collapse;background:#fff;min-width:620px}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line);vertical-align:middle}th{font-size:12px;text-transform:uppercase;color:var(--muted);letter-spacing:.03em}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef2f6;font-size:12px}.badge.ok{background:#ecfdf3;color:var(--ok)}.badge.warn{background:#fff7ed;color:#b54708}label{font-weight:650;font-size:14px;display:block;margin-bottom:6px}input,select,textarea{width:100%;max-width:100%;border:1px solid #cfd8e3;border-radius:8px;padding:10px 11px;font:inherit;background:#fff;font-size:16px}textarea{min-height:110px;resize:vertical}.field{margin-bottom:15px;min-width:0}.field small{display:block;color:var(--muted);margin-top:5px;font-size:12px}.actions{display:flex;gap:8px;flex-wrap:wrap}.alert{padding:12px 14px;border-radius:8px;margin-bottom:16px;background:var(--blue-soft);color:var(--blue-dark)}.alert.error{background:#fef3f2;color:#b42318}.auth{max-width:430px;margin:9vh auto;background:#fff;border:1px solid var(--line);border-radius:14px;padding:28px}.auth h1{margin-top:0}.compact-form .full{grid-column:1/-1}.field-actions{display:flex;align-items:end}.field-actions .btn{width:100%;justify-content:center}.section-head,.module-title-row{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.module-card{padding:0;overflow:visible}.module-card>.module-title-row{padding:20px;border-bottom:1px solid var(--line)}.eyebrow{text-transform:uppercase;letter-spacing:.05em;font-size:11px;color:var(--muted);font-weight:700}.module-title-row h2{margin:4px 0 6px}.lesson-list{padding:0 20px}.lesson-row{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:14px;padding:16px 0;border-bottom:1px solid var(--line);align-items:start;min-width:0}.lesson-row:last-child{border-bottom:none}.lesson-index{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--blue-soft);color:var(--blue-dark);font-weight:800}.lesson-main{min-width:0}.lesson-heading{display:flex;gap:8px;align-items:center;flex-wrap:wrap;overflow-wrap:anywhere}.lesson-meta{display:flex;gap:14px;flex-wrap:wrap;margin-top:8px;font-size:12px;color:var(--muted)}.lesson-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.module-footer{padding:14px 20px 20px;border-top:1px solid var(--line)}.empty-line{padding:18px 0;color:var(--muted)}.small-text{font-size:13px;margin-top:4px;overflow-wrap:anywhere}.is-inactive{opacity:.58}.checkline{display:flex;gap:8px;align-items:flex-start;font-weight:500;margin:12px 0}.checkline input{width:auto;margin-top:3px}.inline-edit{position:relative}.inline-edit summary{list-style:none}.inline-edit summary::-webkit-details-marker{display:none}.popover-form{position:absolute;right:0;top:42px;width:360px;max-width:calc(100vw - 40px);background:#fff;border:1px solid var(--line);box-shadow:0 12px 30px rgba(16,24,40,.14);border-radius:12px;padding:16px;z-index:20}.materials-list{margin-top:12px;border:1px solid var(--line);border-radius:8px;overflow:hidden}.material-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 11px;border-bottom:1px solid var(--line);background:#fafbfd;min-width:0}.material-item:last-child{border-bottom:none}.material-item>span{min-width:0;overflow-wrap:anywhere}.inline-form{display:inline}.narrow-card{max-width:760px}

@media(max-width:900px){
  :root{--topbar-h:58px}.topbar{height:var(--topbar-h);padding:0 14px;position:sticky;top:0}.menu-toggle{display:block}.brand{font-size:14px;white-space:normal;line-height:1.15}.user-separator{display:none}.userbar{gap:8px}.user-name{display:none}.layout{display:block;min-height:calc(100vh - var(--topbar-h))}.sidebar{position:fixed;top:0;bottom:0;left:0;width:min(84vw,320px);min-height:100vh;padding:0 14px 22px;transform:translateX(-105%);transition:transform .2s ease;box-shadow:8px 0 24px rgba(16,24,40,.18);overflow-y:auto;z-index:100}.sidebar-mobile-head{height:58px;display:flex;align-items:center;justify-content:space-between;color:#fff;border-bottom:1px solid rgba(255,255,255,.13);margin-bottom:12px;padding:0 4px}.menu-close{width:40px;height:40px;border:0;border-radius:8px;background:transparent;color:#fff;font-size:30px;line-height:1;cursor:pointer}.nav-backdrop{display:block;position:fixed;inset:0;background:rgba(15,39,66,.48);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,visibility .2s ease;z-index:90}.nav-open .sidebar{transform:translateX(0)}.nav-open .nav-backdrop{opacity:1;visibility:visible;pointer-events:auto}.nav-open{overflow:hidden}.content{padding:18px 14px;max-width:none}.grid.cols-4,.grid.cols-3,.grid.cols-2{grid-template-columns:1fr}.lesson-row{grid-template-columns:32px minmax(0,1fr)}.lesson-actions{grid-column:2;justify-content:flex-start}.section-head,.module-title-row{flex-direction:column}.popover-form{position:static;width:100%;max-width:100%;margin-top:10px}.material-item{align-items:flex-start;flex-direction:column}.module-card>.module-title-row{padding:16px}.lesson-list{padding:0 16px}.module-footer{padding:12px 16px 16px}.auth{margin:5vh 14px;padding:22px}}

@media(max-width:640px){
  .content{padding:14px 10px}.card{padding:16px;border-radius:10px}.toolbar{align-items:stretch;flex-direction:column}.toolbar>.actions,.toolbar>.btn,.toolbar>a.btn{width:100%}.toolbar>.actions .btn{flex:1 1 140px}.btn{min-height:44px}.btn.small{min-height:40px}.actions{width:100%}.lesson-actions .btn,.material-item .actions .btn,.material-item .actions form{flex:1 1 auto}.material-item .actions{width:100%}.material-item .actions form .btn{width:100%}.kpi strong{font-size:24px}table{min-width:560px}th,td{padding:10px}.module-title-row h2,.card h2{overflow-wrap:anywhere}.lesson-meta{gap:7px 12px}.topbar .brand{max-width:210px}.userbar a{font-weight:600}.narrow-card{max-width:none}}

@media(max-width:420px){
  .topbar .brand{max-width:175px;font-size:13px}.content{padding:12px 8px}.card{padding:14px}.toolbar h1{font-size:26px}.module-card>.module-title-row{padding:14px}.lesson-list{padding:0 12px}.lesson-row{gap:10px}.lesson-actions{grid-column:1/-1}.lesson-actions .btn{flex:1 1 100%}.material-item .actions{flex-direction:column}.material-item .actions .btn,.material-item .actions form{width:100%}.table-wrap.card{padding:0}.table-wrap.card table{margin:0}.auth{margin:3vh 8px;padding:18px}}

/* V1.2 · Área del alumno */
.student-body{background:#f4f7fb}.student-topbar{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(18px,calc((100vw - 1440px)/2));gap:18px;position:sticky;top:0;z-index:50}.student-brand{font-weight:850;color:var(--navy);font-size:18px}.student-nav{display:flex;align-items:center;gap:18px}.student-nav a{font-weight:650}.student-user{color:var(--muted)}.student-main{max-width:1440px;margin:0 auto;padding:30px 24px 48px}.student-page-head h1{font-size:34px;margin:4px 0 4px}.student-course-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.student-course-card{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 3px 12px rgba(16,24,40,.06);display:grid;grid-template-columns:210px minmax(0,1fr);min-height:260px}.student-course-cover{position:relative;background:linear-gradient(145deg,#173b61,#1769d1);min-height:220px}.student-course-cover img{width:100%;height:100%;object-fit:cover}.course-cover-placeholder{height:100%;display:flex;align-items:center;justify-content:center;font-size:44px;font-weight:900;color:#fff;letter-spacing:.06em}.access-pill{position:absolute;left:12px;top:12px;background:#fff;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800}.access-pill.active{color:var(--ok)}.access-pill.expired{color:var(--danger)}.student-course-info{padding:22px;display:flex;flex-direction:column}.student-course-info h2{margin:0 0 8px;font-size:22px}.course-summary{margin:0 0 15px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.progress-line{height:7px;background:#e8eef5;border-radius:999px;overflow:hidden}.progress-line>div{height:100%;background:var(--blue);border-radius:inherit;transition:width .3s ease}.progress-line.large{height:9px}.progress-meta,.course-access-meta{display:flex;justify-content:space-between;gap:12px;margin-top:8px;font-size:12px;color:var(--muted)}.progress-meta strong{color:var(--text)}.student-main-action{margin-top:auto;align-self:flex-start}.student-empty{margin-top:20px}.course-shell{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:24px;align-items:start}.course-stage{min-width:0}.course-breadcrumb{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:13px;margin-bottom:16px}.course-title-block h1{font-size:30px;margin:4px 0 8px}.video-card{background:#0b1420;border-radius:16px;overflow:hidden;box-shadow:0 5px 20px rgba(16,24,40,.14)}.video-frame{position:relative;width:100%;aspect-ratio:16/9;background:#07101a}.video-frame>div:not(.video-loading):not(.caption-overlay),.video-frame iframe{position:absolute!important;inset:0;width:100%!important;height:100%!important}.video-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#dce8f5;background:#0b1420}.custom-video-controls{height:56px;background:#0f1d2d;color:#fff;display:grid;grid-template-columns:auto auto minmax(80px,1fr) auto auto;align-items:center;gap:10px;padding:0 14px}.video-icon-btn{border:0;background:transparent;color:#fff;font-size:20px;cursor:pointer;min-width:38px;min-height:38px;border-radius:8px}.video-icon-btn:hover{background:rgba(255,255,255,.08)}.video-slider{padding:0;border:0;background:transparent;accent-color:#4da3ff}.video-time{font-variant-numeric:tabular-nums;font-size:12px;white-space:nowrap}.video-placeholder{aspect-ratio:16/9;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;background:#eef3f8}.lesson-progress-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;margin-top:16px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 16px;align-items:center}.lesson-progress-card>div:first-child{display:flex;justify-content:space-between;gap:12px}.lesson-progress-card>div:first-child span{font-size:13px;color:var(--muted)}.lesson-progress-card .progress-line{grid-column:1/-1}.student-materials{margin-top:22px}.student-materials h2{font-size:20px}.student-material-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.student-material{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px;color:var(--text)}.student-material:hover{border-color:#9fc2ec}.student-material span:last-child{min-width:0}.student-material strong,.student-material small{display:block;overflow-wrap:anywhere}.student-material small{margin-top:3px;color:var(--muted)}.material-file-icon{width:38px;height:38px;border-radius:9px;background:#eef4ff;color:var(--blue);display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:900;flex:0 0 auto}.course-outline{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;position:sticky;top:88px;max-height:calc(100vh - 112px);display:flex;flex-direction:column}.outline-head{padding:18px;border-bottom:1px solid var(--line)}.outline-head>div:first-child{display:flex;justify-content:space-between;gap:10px;margin-bottom:10px}.outline-modules{overflow-y:auto}.outline-module{padding:14px 14px 4px}.outline-module h3{font-size:14px;margin:0 0 8px;color:var(--navy)}.outline-lesson,.outline-exam{display:grid;grid-template-columns:36px minmax(0,1fr);gap:9px;align-items:center;padding:9px;border-radius:9px;color:var(--text);margin-bottom:4px}.outline-lesson:hover{background:#f5f8fc}.outline-lesson.current{background:var(--blue-soft)}.outline-lesson strong,.outline-lesson small,.outline-exam strong,.outline-exam small{display:block}.outline-lesson strong{font-size:13px}.outline-lesson small,.outline-exam small{color:var(--muted);font-size:11px;margin-top:2px}.outline-check{width:30px;height:30px;border-radius:50%;background:#eef2f6;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;color:var(--muted)}.outline-check.done{background:#ecfdf3;color:var(--ok);font-size:16px}.outline-exam{border-top:1px solid var(--line);border-radius:0;margin:0;padding:14px 18px;background:#fafbfd}
@media(max-width:1100px){.student-course-grid{grid-template-columns:1fr}.course-shell{grid-template-columns:minmax(0,1fr) 330px}}
@media(max-width:900px){.student-topbar{height:auto;min-height:58px;padding:10px 14px;align-items:flex-start}.student-nav{gap:10px;flex-wrap:wrap;justify-content:flex-end}.student-user{display:none}.student-main{padding:18px 12px 36px}.course-shell{grid-template-columns:1fr}.course-outline{position:static;max-height:none;order:-1}.outline-modules{max-height:none}.student-course-card{grid-template-columns:160px minmax(0,1fr)}.student-material-list{grid-template-columns:1fr}}
@media(max-width:640px){.student-brand{font-size:15px}.student-nav{font-size:13px}.student-page-head h1{font-size:28px}.student-course-card{display:block}.student-course-cover{min-height:150px;height:150px}.student-course-info{padding:17px}.progress-meta,.course-access-meta{flex-direction:column;gap:3px}.student-main-action{width:100%}.course-title-block h1{font-size:25px}.custom-video-controls{grid-template-columns:auto minmax(0,1fr) auto auto;height:auto;min-height:58px;padding:8px 10px}.video-time{display:none}.lesson-progress-card{grid-template-columns:1fr}.lesson-progress-card>div:first-child{flex-direction:column;gap:4px}.lesson-progress-card .badge{justify-self:start}.course-breadcrumb{flex-wrap:wrap}}
@media(max-width:420px){.student-topbar{display:block}.student-nav{margin-top:7px;justify-content:flex-start}.student-main{padding:14px 8px 30px}.course-outline{border-radius:10px}.video-card{border-radius:10px}.custom-video-controls{grid-template-columns:auto minmax(0,1fr) auto}.custom-video-controls #fullscreen-toggle{display:none}.student-material{padding:10px}}

/* V1.3 · Subtítulos, guía de clase y Mis apuntes */
.caption-overlay{position:absolute;left:7%;right:7%;bottom:7%;z-index:8;text-align:center;color:#fff;font-size:clamp(17px,2vw,28px);font-weight:650;line-height:1.3;text-shadow:0 2px 5px rgba(0,0,0,.9);pointer-events:none;opacity:0;transition:opacity .08s}.caption-overlay.show{opacity:1}.caption-overlay:not(:empty){background:rgba(0,0,0,.68);padding:5px 9px;border-radius:5px;width:auto!important;height:auto!important;inset:auto 7% 7%!important}.custom-video-controls{grid-template-columns:auto auto minmax(80px,1fr) auto auto auto}.caption-control{margin:0;display:flex;align-items:center;gap:6px;color:#fff;font-size:12px;font-weight:800}.caption-control select{width:auto;max-width:150px;min-height:34px;padding:5px 26px 5px 8px;border-color:#405065;background:#15283d;color:#fff;font-size:12px}.lesson-workspace{margin-top:20px;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}.lesson-tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);padding:0 14px;overflow-x:auto}.lesson-tab{border:0;background:transparent;padding:15px 13px;cursor:pointer;font:inherit;font-weight:750;color:var(--muted);white-space:nowrap;border-bottom:3px solid transparent}.lesson-tab.active{color:var(--blue);border-bottom-color:var(--blue)}.tab-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#eef2f6;font-size:11px;margin-left:4px}.lesson-tab-panel{display:none;padding:20px}.lesson-tab-panel.active{display:block}.lesson-tab-panel h2{margin:0 0 8px;font-size:20px}.lesson-guide-text{line-height:1.65;white-space:normal}.workspace-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}.workspace-head h2{margin-bottom:3px}.workspace-head p{margin:0}.note-compose{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:start;background:#f7f9fc;border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:14px}.note-compose textarea{min-height:76px;margin:0}.note-time-pill,.note-timestamp{font-variant-numeric:tabular-nums}.note-time-pill{background:var(--blue-soft);color:#1849a9;border-radius:999px;padding:8px 10px;font-weight:800;font-size:13px}.student-notes-list{display:flex;flex-direction:column;gap:9px}.student-note{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start;border:1px solid var(--line);border-radius:10px;padding:11px;background:#fff}.note-timestamp{border:0;border-radius:8px;background:#eef4ff;color:#1769d1;font-weight:850;padding:7px 9px;cursor:pointer}.note-timestamp:hover{background:#e1e4f2}.note-body{line-height:1.5;overflow-wrap:anywhere}.note-actions{display:flex;gap:6px}.notes-empty{margin:16px 0 0}.subtitle-admin-list{display:flex;flex-direction:column;gap:9px}.subtitle-admin-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:10px;padding:11px}.subtitle-admin-item small{display:block;margin-top:5px}.btn.danger.small{color:var(--danger)}
@media(max-width:900px){.workspace-head{flex-direction:column}.workspace-head .actions{width:100%}.workspace-head .actions .btn{flex:1 1 180px}.note-compose{grid-template-columns:auto minmax(0,1fr)}.note-compose .btn{grid-column:2}.student-note{grid-template-columns:auto minmax(0,1fr)}.note-actions{grid-column:2}.subtitle-admin-item{align-items:flex-start}}
@media(max-width:640px){.custom-video-controls{grid-template-columns:auto minmax(0,1fr) auto auto;height:auto;min-height:58px;padding:8px 10px}.custom-video-controls .video-time{display:none}.caption-control{grid-column:1/-1;order:5;width:100%}.caption-control select{flex:1;max-width:none}.lesson-tab-panel{padding:16px 13px}.note-compose{grid-template-columns:1fr}.note-compose .btn{grid-column:auto}.note-time-pill{justify-self:start}.student-note{grid-template-columns:1fr}.note-actions{grid-column:auto;width:100%}.note-actions .btn{flex:1}.note-timestamp{justify-self:start}.caption-overlay{font-size:17px;left:4%;right:4%;bottom:10%}.subtitle-admin-item{flex-direction:column}.subtitle-admin-item form,.subtitle-admin-item .btn{width:100%}}
@media(max-width:420px){.custom-video-controls{grid-template-columns:auto minmax(0,1fr) auto}.custom-video-controls #fullscreen-toggle{display:none}.lesson-tabs{padding:0 6px}.lesson-tab{padding:13px 9px;font-size:13px}}

/* V1.3.1 · Editor de texto enriquecido controlado */
.rich-editor{border:1px solid var(--line);border-radius:10px;background:#fff;overflow:hidden}
.rich-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:7px;background:#f7f9fc;border-bottom:1px solid var(--line)}
.rich-toolbar button{min-width:34px;min-height:32px;border:1px solid #d7e0ea;border-radius:7px;background:#fff;color:var(--navy);font:inherit;font-size:12px;cursor:pointer;padding:5px 8px}
.rich-toolbar button:hover,.rich-toolbar button:focus{border-color:#aab1d2;background:#f0f1f8;outline:none}
.rich-toolbar.compact{padding:5px}.rich-toolbar.compact button{min-height:29px;padding:4px 7px}
.rich-editor-area{min-height:150px;padding:12px 13px;line-height:1.6;outline:none;overflow-wrap:anywhere}
.rich-editor-area.tall{min-height:220px}.rich-editor-area.note-area{min-height:78px;max-height:230px;overflow-y:auto}
.rich-editor-area:empty:before{content:attr(data-placeholder);color:#98a2b3;pointer-events:none}
.rich-editor-area p,.rich-content p,.lesson-guide-text p,.note-body p{margin:.35em 0 .75em}
.rich-editor-area h3,.rich-content h3,.lesson-guide-text h3,.note-body h3{margin:1em 0 .45em;font-size:1.12em;color:var(--navy)}
.rich-editor-area h4,.rich-content h4,.lesson-guide-text h4,.note-body h4{margin:.9em 0 .4em;font-size:1.03em;color:var(--navy)}
.rich-editor-area ul,.rich-editor-area ol,.rich-content ul,.rich-content ol,.lesson-guide-text ul,.lesson-guide-text ol,.note-body ul,.note-body ol{margin:.45em 0 .85em;padding-left:1.55em}
.rich-editor-area li,.rich-content li,.lesson-guide-text li,.note-body li{margin:.22em 0}
.note-compose{grid-template-columns:auto minmax(0,1fr);align-items:start}
.note-compose .note-rich-editor{min-width:0}
.note-compose-actions{grid-column:2;display:flex;gap:8px;flex-wrap:wrap}
.note-body{line-height:1.55}
.note-body>:first-child,.lesson-guide-text>:first-child{margin-top:0}.note-body>:last-child,.lesson-guide-text>:last-child{margin-bottom:0}
@media(max-width:640px){.rich-toolbar{gap:4px}.rich-toolbar button{flex:0 0 auto}.note-compose{grid-template-columns:1fr}.note-compose-actions{grid-column:auto}.note-compose-actions .btn{flex:1 1 140px}}


/* V1.3.3 · Identidad visual Capacitación Profesional */
.brand-logo-link{display:inline-flex;align-items:center;gap:10px;color:var(--navy);text-decoration:none;min-width:0}
.brand-logo{display:block;width:220px;max-width:28vw;height:auto}
.brand-admin-tag{font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--blue-dark);padding:4px 8px;border-radius:999px;background:var(--blue-soft);white-space:nowrap}
.student-brand-logo{display:flex;align-items:center;text-decoration:none}
.student-brand-logo img{display:block;width:215px;max-width:34vw;height:auto}
.login-body{min-height:100vh;background:radial-gradient(circle at 50% -10%,#ffffff 0,#f4f4fa 44%,#ececf5 100%);display:flex;align-items:flex-start;justify-content:center}
.brand-auth{width:min(430px,calc(100% - 28px));margin:8vh auto 4vh;box-shadow:0 18px 55px rgba(25,23,45,.10);border-color:#e0e0eb}
.auth-logo-wrap{display:flex;justify-content:center;padding:4px 0 22px;margin-bottom:20px;border-bottom:1px solid var(--line)}
.auth-logo{display:block;width:min(310px,90%);height:auto}
.brand-auth h1{color:var(--navy);margin-bottom:6px}
.btn.primary{background:var(--blue);border-color:var(--blue)}
.btn.primary:hover,.btn.primary:focus{background:var(--blue-dark);border-color:var(--blue-dark)}
a:hover{color:var(--blue-dark)}
.progress-fill,.student-progress-fill{background:var(--blue)!important}
.menu-toggle span{background:var(--navy)}
@media(max-width:900px){.brand-logo{width:176px;max-width:48vw}.brand-admin-tag{display:none}.student-brand-logo img{width:180px;max-width:48vw}}
@media(max-width:520px){.brand-logo{width:150px}.student-brand-logo img{width:155px}.auth-logo{width:min(270px,92%)}}

/* V1.4 · Área del alumno final + portadas de curso */
:root{--student-violet:#6846c7;--student-violet-dark:#5537ae;--student-violet-soft:#f2efff;--student-sidebar-w:260px}
.student-body{background:#fbfbfd;color:var(--text)}
.student-topbar{height:76px;padding:0 28px;background:#fff;border-bottom:1px solid #e8e7ef;position:sticky;top:0;z-index:80;display:flex;align-items:center;justify-content:space-between;gap:18px}
.student-topbar-left,.student-top-actions{display:flex;align-items:center;gap:18px;min-width:0}.student-top-actions{justify-content:flex-end}.student-top-link{font-weight:750;color:var(--student-violet)}.student-top-link:hover{color:var(--student-violet-dark)}
.student-brand-logo img{width:220px;max-width:34vw}.student-menu-toggle{display:none;width:42px;height:42px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:9px;cursor:pointer}.student-menu-toggle span{display:block;height:2px;background:var(--navy);margin:4px 0;border-radius:2px}
.student-layout{display:grid;grid-template-columns:var(--student-sidebar-w) minmax(0,1fr);min-height:calc(100vh - 76px)}
.student-sidebar{background:#fff;border-right:1px solid #e8e7ef;padding:24px 18px;display:flex;flex-direction:column;justify-content:space-between;min-height:calc(100vh - 76px);position:sticky;top:76px;height:calc(100vh - 76px);z-index:65}.student-side-nav,.student-sidebar-bottom{display:flex;flex-direction:column;gap:8px}.student-sidebar-bottom{padding-top:18px;border-top:1px solid #ecebf2}
.student-side-link{display:flex;align-items:center;gap:13px;min-height:48px;padding:11px 14px;border-radius:12px;color:#2f3040;font-weight:700;transition:.18s ease}.student-side-link svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}.student-side-link:hover{background:#f8f6ff;color:var(--student-violet)}.student-side-link.active{background:var(--student-violet-soft);color:var(--student-violet);box-shadow:inset 3px 0 0 var(--student-violet)}
.student-nav-backdrop{display:none}.student-main{max-width:none;margin:0;padding:30px clamp(18px,3vw,48px) 52px;min-width:0;width:100%}.student-page-head,.student-dashboard-head{max-width:1180px;margin:0 auto 24px}.student-page-head h1,.student-dashboard-head h1{color:#141b31}.eyebrow{color:var(--student-violet)!important}
.course-shell{max-width:1360px;margin:0 auto;grid-template-columns:minmax(0,1fr) 360px;gap:28px}.course-title-block h1{color:#111a31;font-size:32px;margin-bottom:16px}.course-stage{min-width:0}.course-outline{top:102px;border-color:#e6e4ee;box-shadow:0 5px 22px rgba(40,36,70,.05)}.outline-lesson.current{background:var(--student-violet-soft);color:var(--student-violet)}.outline-head .progress-line>div,.lesson-progress-card .progress-line>div{background:var(--student-violet)}
.video-card{background:#111827;border-radius:15px;box-shadow:0 8px 25px rgba(17,24,39,.14)}.custom-video-controls{background:#101827}.video-slider{accent-color:var(--student-violet)}
.lesson-progress-card{border-color:#e4e2ed;box-shadow:0 3px 14px rgba(38,34,64,.04)}
.lesson-workspace{border:1px solid #dcd7ec;border-radius:14px;overflow:hidden;background:#fff}.lesson-tabs{display:flex;gap:8px;border-bottom:1px solid #dcd7ec;padding:10px 10px 0;background:#faf9fd;overflow-x:auto}.lesson-tab{display:flex;align-items:center;gap:7px;border:1px solid #dfdbea;border-bottom:0;background:#fff;padding:13px 16px;border-radius:11px 11px 0 0;color:#303246;font-weight:800;white-space:nowrap;cursor:pointer;min-height:48px}.lesson-tab:hover{color:var(--student-violet);border-color:#cfc6ee}.lesson-tab.active{background:linear-gradient(135deg,var(--student-violet),#7a55df);color:#fff;border-color:var(--student-violet);box-shadow:0 5px 12px rgba(104,70,199,.18)}.lesson-tab.active .tab-count{background:rgba(255,255,255,.2);color:#fff}.lesson-tab-icon{font-size:18px;line-height:1}.lesson-tab-panel{padding:22px 20px}.lesson-tab-panel h2{color:#171a2b}.tab-count{background:#f0eef5;color:#5d5b67}
.progress-line>div{background:var(--student-violet)}.note-time-pill,.note-timestamp{background:var(--student-violet-soft);color:var(--student-violet-dark)}.material-file-icon{background:var(--student-violet-soft);color:var(--student-violet)}

/* Portadas */
.course-cover-admin-field input[type=file]{background:#fafafa}.course-cover-admin-preview{display:flex;align-items:center;gap:14px;margin:8px 0 12px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fafafa}.course-cover-admin-preview img{width:180px;aspect-ratio:16/9;object-fit:cover;border-radius:8px;border:1px solid var(--line)}.inline-check{display:flex;gap:7px;align-items:center;font-weight:600}.inline-check input{width:auto}
.student-course-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-width:1280px;margin:0 auto}.student-course-card{display:block;min-height:0}.student-course-cover{height:auto;aspect-ratio:16/9;min-height:0;background:linear-gradient(135deg,#25233d,#6d7aba)}.student-course-info{min-height:270px}.student-course-info h2{font-size:20px}.student-main-action{margin-top:auto}

/* Inicio */
.student-dashboard-head h1{font-size:36px;margin:5px 0}.student-kpi-grid{max-width:1180px;margin:0 auto 22px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.student-kpi{background:#fff;border:1px solid #e5e3ec;border-radius:14px;padding:17px 19px;box-shadow:0 3px 12px rgba(35,32,60,.04)}.student-kpi span,.student-kpi small{display:block;color:var(--muted)}.student-kpi strong{display:block;font-size:29px;color:var(--student-violet);margin:5px 0}.continue-course-card{max-width:1180px;margin:0 auto 26px;background:#fff;border:1px solid #e3e0ec;border-radius:18px;overflow:hidden;display:grid;grid-template-columns:minmax(260px,42%) minmax(0,1fr);box-shadow:0 8px 28px rgba(35,32,60,.07)}.continue-course-cover{background:#f0eef7;min-height:290px}.continue-course-cover img{width:100%;height:100%;object-fit:cover}.continue-course-content{padding:28px;display:flex;flex-direction:column;justify-content:center}.continue-course-content h2{font-size:29px;margin:6px 0 10px}.continue-course-content p{color:var(--muted);line-height:1.55}.continue-course-content .btn{align-self:flex-start;margin-top:18px}.section-title-row{max-width:1180px;margin:22px auto 12px;display:flex;justify-content:space-between;gap:12px;align-items:center}.section-title-row h2{margin:0}.student-mini-course-grid{max-width:1180px;margin:0 auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.student-mini-course{display:grid;grid-template-columns:110px minmax(0,1fr);gap:13px;align-items:center;background:#fff;border:1px solid #e5e3ec;border-radius:13px;padding:9px;color:var(--text)}.student-mini-course:hover{border-color:#cfc6ee}.student-mini-cover{aspect-ratio:16/9;border-radius:8px;overflow:hidden;background:var(--student-violet-soft);display:flex;align-items:center;justify-content:center;color:var(--student-violet);font-weight:900}.student-mini-cover img{width:100%;height:100%;object-fit:cover}.student-mini-course strong,.student-mini-course span{display:block}.student-mini-course span{color:var(--muted);font-size:12px;margin-top:4px}

/* Certificados, apuntes, notificaciones, perfil y ayuda */
.certificate-grid,.help-grid{max-width:1180px;margin:0 auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.certificate-card{background:#fff;border:1px solid #e2e0e9;border-radius:15px;padding:20px;display:flex;gap:17px}.certificate-card h2{margin-top:0}.certificate-seal{width:52px;height:52px;border-radius:50%;background:#ecfdf3;color:var(--ok);display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:900;flex:0 0 auto}.notes-course-group{max-width:1180px;margin:0 auto 24px}.notes-course-stack{background:#fff;border:1px solid #e3e0e9;border-radius:14px;overflow:hidden}.notes-lesson-heading{padding:14px 18px;background:#faf9fd;border-top:1px solid #ece9f2}.notes-lesson-heading:first-child{border-top:0}.notes-lesson-heading strong,.notes-lesson-heading span{display:block}.notes-lesson-heading span{color:var(--muted);font-size:12px;margin-top:3px}.global-note{display:grid;grid-template-columns:auto minmax(0,1fr);gap:13px;padding:13px 18px;border-top:1px solid #f0eef4}.notification-list{max-width:950px;margin:0 auto;display:flex;flex-direction:column;gap:10px}.notification-item{display:grid;grid-template-columns:auto minmax(0,1fr);gap:13px;background:#fff;border:1px solid #e2e0e9;border-radius:13px;padding:15px 17px;color:var(--text)}.notification-item p{margin:4px 0 0;color:var(--muted)}.notification-dot{width:11px;height:11px;border-radius:50%;background:var(--student-violet);margin-top:5px}.notification-item.warning .notification-dot{background:#f59e0b}.notification-item.ok .notification-dot{background:var(--ok)}.profile-card{max-width:900px;margin:0 auto}.profile-card hr{border:0;border-top:1px solid var(--line);margin:24px 0}.help-grid .card{margin:0}.help-grid h2{margin-top:0;color:#171a2b}

@media(max-width:1200px){.student-course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.course-shell{grid-template-columns:minmax(0,1fr) 330px}}
@media(max-width:980px){.student-topbar{height:66px;padding:0 14px}.student-menu-toggle{display:block}.student-brand-logo img{width:185px;max-width:50vw}.student-top-actions .student-user{display:none}.student-layout{display:block}.student-sidebar{position:fixed;top:66px;left:0;bottom:0;width:min(300px,86vw);height:auto;min-height:0;transform:translateX(-105%);transition:transform .22s ease;box-shadow:8px 0 30px rgba(20,18,38,.12);z-index:75}.student-nav-backdrop{display:block;position:fixed;inset:66px 0 0;background:rgba(25,23,45,.34);border:0;z-index:70;opacity:0;pointer-events:none;transition:opacity .2s}.student-nav-open .student-sidebar{transform:translateX(0)}.student-nav-open .student-nav-backdrop{opacity:1;pointer-events:auto}.student-main{padding:22px 14px 40px}.course-shell{grid-template-columns:1fr}.course-outline{position:static;max-height:none;order:-1}.student-course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.continue-course-card{grid-template-columns:1fr}.continue-course-cover{min-height:0;aspect-ratio:16/9}.student-mini-course-grid{grid-template-columns:1fr}.student-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.student-top-actions .student-top-link:first-child{display:none}.student-course-grid{grid-template-columns:1fr}.student-kpi-grid{grid-template-columns:1fr}.certificate-grid,.help-grid{grid-template-columns:1fr}.continue-course-content{padding:20px}.continue-course-content h2{font-size:24px}.lesson-tabs{gap:6px;padding:8px 7px 0}.lesson-tab{padding:11px 12px;font-size:13px}.course-title-block h1{font-size:26px}.course-cover-admin-preview{align-items:flex-start;flex-direction:column}.course-cover-admin-preview img{width:100%;max-width:360px}.profile-card .grid.cols-2{grid-template-columns:1fr}}
@media(max-width:480px){.student-topbar{gap:8px}.student-brand-logo img{width:155px}.student-top-actions{gap:9px;font-size:13px}.student-main{padding:17px 9px 34px}.lesson-tab-icon{display:none}.lesson-tab{padding:10px 9px}.lesson-tab-panel{padding:17px 13px}.custom-video-controls{border-radius:0}.student-mini-course{grid-template-columns:90px minmax(0,1fr)}}

/* V1.5 · Evaluaciones */
.exam-admin-table table{min-width:980px}.question-admin-list{display:flex;flex-direction:column;gap:10px}.question-admin-card{margin:0;display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.question-admin-main{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;min-width:0}.question-number{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--blue-soft);color:var(--blue-dark);font-size:12px;font-weight:850}.exam-option-editor{border:1px solid var(--line);border-radius:12px;padding:14px;margin:14px 0;background:#fafafd}.exam-option-editor-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px}.exam-option-edit{display:grid;grid-template-columns:92px minmax(0,1fr);gap:10px;align-items:center;margin:8px 0}.correct-radio{display:flex;align-items:center;gap:6px;margin:0;font-size:12px}.correct-radio input{width:auto}.exam-page{max-width:1120px;margin:0 auto}.exam-page .student-page-head{margin-left:0;margin-right:0}.exam-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}.exam-head h1{font-size:34px;margin:4px 0 6px;color:#15182b}.exam-timer{position:sticky;top:82px;z-index:5;min-width:145px;background:#fff;border:1px solid #d9d4e9;border-radius:14px;padding:12px 16px;text-align:center;box-shadow:0 5px 18px rgba(40,36,70,.07)}.exam-timer small,.exam-timer strong{display:block}.exam-timer strong{font-size:25px;color:var(--student-violet);margin-top:2px;font-variant-numeric:tabular-nums}.exam-question-stack{display:flex;flex-direction:column;gap:16px}.exam-question-card{background:#fff;border:1px solid #e0dde9;border-radius:16px;padding:21px;box-shadow:0 4px 18px rgba(35,32,60,.04)}.exam-question-title{display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;align-items:start}.exam-question-title>span{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--student-violet-soft);color:var(--student-violet);font-weight:900}.exam-question-title h2{font-size:18px;line-height:1.4;margin:5px 0 14px}.exam-choice-list{display:flex;flex-direction:column;gap:8px;margin-left:50px}.exam-choice{display:grid;grid-template-columns:22px minmax(0,1fr);gap:10px;align-items:flex-start;border:1px solid #e4e1eb;border-radius:11px;padding:11px 13px;margin:0;font-weight:500;cursor:pointer;background:#fff}.exam-choice:hover{border-color:#c8bce9;background:#fbfaff}.exam-choice:has(input:checked){border-color:var(--student-violet);background:var(--student-violet-soft)}.exam-choice input{width:auto;margin-top:3px;accent-color:var(--student-violet)}.exam-submit-bar{position:sticky;bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:rgba(255,255,255,.96);border:1px solid #ded9eb;border-radius:14px;padding:13px 15px;box-shadow:0 8px 28px rgba(32,28,56,.12);backdrop-filter:blur(8px)}.exam-submit-bar span{display:block;font-size:12px;margin-top:2px}.exam-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.exam-status-grid .card{margin:0}.exam-result-card{display:grid;grid-template-columns:72px minmax(0,1fr);gap:18px;align-items:center;border-radius:17px;padding:22px;margin-bottom:18px;border:1px solid}.exam-result-card.approved{background:#effcf5;border-color:#b7e7cc}.exam-result-card.failed{background:#fff8ed;border-color:#f5d5a5}.exam-result-icon{width:64px;height:64px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:32px;font-weight:900;background:#fff}.exam-result-card.approved .exam-result-icon{color:var(--ok)}.exam-result-card.failed .exam-result-icon{color:#b54708}.exam-result-card h2{margin:2px 0}.exam-score{font-size:31px}.exam-attempt-list{display:flex;flex-direction:column}.exam-attempt-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-top:1px solid #eeeaf3}.exam-attempt-row:first-child{border-top:0}.exam-attempt-row span span,.exam-attempt-row small{display:block}.text-ok{color:var(--ok)}.text-warn{color:#b54708}.exam-action-card{display:grid;grid-template-columns:62px minmax(0,1fr);gap:18px;align-items:center}.exam-lock{width:56px;height:56px;border-radius:15px;background:var(--student-violet-soft);color:var(--student-violet);display:flex;align-items:center;justify-content:center;font-size:25px;font-weight:900}.exam-lock.success{background:#ecfdf3;color:var(--ok)}.exam-action-card h2{margin:0 0 5px}.outline-exam{display:flex;gap:10px;align-items:center;padding:12px;border-top:1px solid var(--line);color:var(--text)}a.outline-exam:hover{background:#faf9fd}.outline-exam.ready{background:#faf8ff;color:var(--student-violet)}.outline-exam.approved{background:#f0fbf5;color:var(--ok)}.outline-exam.extra{background:#fff9ed;color:#9a6700}.outline-exam small{display:block;color:var(--muted);margin-top:2px}
@media(max-width:700px){.question-admin-card{flex-direction:column}.question-admin-card>.actions{width:100%}.exam-option-editor-head{flex-direction:column}.exam-option-edit{grid-template-columns:1fr}.correct-radio{min-height:36px}.exam-head{flex-direction:column}.exam-timer{position:static;width:100%}.exam-choice-list{margin-left:0}.exam-question-title{grid-template-columns:32px minmax(0,1fr)}.exam-question-title>span{width:30px;height:30px}.exam-submit-bar{align-items:stretch;flex-direction:column}.exam-submit-bar .btn{width:100%}.exam-status-grid{grid-template-columns:1fr}.exam-result-card{grid-template-columns:52px minmax(0,1fr);padding:17px}.exam-result-icon{width:48px;height:48px;font-size:24px}.exam-attempt-row{align-items:flex-start}.exam-action-card{grid-template-columns:48px minmax(0,1fr)}.exam-lock{width:45px;height:45px;border-radius:12px;font-size:20px}}

/* V1.6 · Gestión académica de alumnos */
.academic-student-table table{min-width:1080px}.student-admin-kpis,.academic-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.student-admin-kpis .card,.academic-overview-grid .card{margin:0}.student-admin-kpis span{display:block;color:var(--muted);font-size:12px}.student-admin-kpis strong{display:block;font-size:22px;margin-top:5px}.academic-big-number{font-size:38px;line-height:1;color:var(--student-violet)}.academic-main-status .progress-line{margin-top:13px}.academic-detail-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:16px;margin-bottom:16px}.academic-detail-grid>.card{margin:0}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}.section-head h2{margin:0}.section-head p{margin:4px 0 0}.academic-lesson-list{display:flex;flex-direction:column}.academic-module-title{font-weight:850;color:#1c2034;background:#f7f6fb;border-radius:9px;padding:9px 11px;margin:8px 0 3px}.academic-lesson-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 6px;border-bottom:1px solid #efedf3}.academic-lesson-row small,.admin-attempt-row small,.admin-event-row small{display:block;color:var(--muted);margin-top:3px}.academic-lesson-progress{flex:0 0 auto}.admin-attempt-list{display:flex;flex-direction:column;gap:9px}.admin-attempt-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:11px;align-items:start;border:1px solid #e6e2ec;border-radius:12px;padding:12px;background:#fff}.admin-attempt-row.is-annulled{background:#fafafa;opacity:.82}.attempt-admin-action{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.attempt-admin-action input,.admin-exam-actions input,.access-admin-actions input{margin:0}.admin-exam-actions{display:flex;flex-direction:column;gap:10px;margin-top:14px}.admin-exam-actions form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.access-admin-actions{display:flex;flex-wrap:wrap;gap:12px}.access-admin-actions form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border:1px solid #ece8f2;border-radius:12px;padding:10px}.access-admin-actions label{display:flex;align-items:center;gap:6px;margin:0}.access-admin-actions input[type=number]{width:82px}.admin-event-list{display:flex;flex-direction:column}.admin-event-row{display:grid;grid-template-columns:260px minmax(0,1fr);gap:16px;padding:11px 0;border-top:1px solid #eeeaf3}.admin-event-row:first-child{border-top:0}.admin-event-row p{margin:0;color:#46485a}.btn.danger{background:#fff;color:#b42318;border-color:#f2b8b5}.btn.danger:hover{background:#fff3f2}.badge.warn{background:#fff3e8;color:#9a4b00}
@media(max-width:1100px){.student-admin-kpis,.academic-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.academic-detail-grid{grid-template-columns:1fr}.admin-event-row{grid-template-columns:1fr;gap:4px}}
@media(max-width:700px){.student-admin-kpis,.academic-overview-grid{grid-template-columns:1fr}.academic-lesson-row{align-items:flex-start}.admin-attempt-row{grid-template-columns:1fr}.attempt-admin-action,.admin-exam-actions form{grid-template-columns:1fr}.access-admin-actions{flex-direction:column}.access-admin-actions form{width:100%;align-items:stretch}.access-admin-actions label{justify-content:space-between}.access-admin-actions input[type=number]{width:110px}}

/* V1.7 · Notificaciones, correo y limpieza administrativa */
.btn.danger-outline{background:#fff;color:var(--danger);border-color:#f0b7b2}.btn.danger-outline:hover{background:#fff5f4}.danger-zone{border-color:#efc2be;background:#fffafa;display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.72fr);gap:24px;align-items:start}.danger-zone h2{margin:4px 0 8px;color:#7a271a}.danger-zone p{margin:0;color:#6f3b35;line-height:1.55}.danger-zone form{border-left:1px solid #f0d2cf;padding-left:22px}.delete-details{position:relative}.delete-details>summary{list-style:none}.delete-details>summary::-webkit-details-marker{display:none}.delete-popover{position:absolute;right:0;top:42px;z-index:25;width:300px;max-width:min(300px,calc(100vw - 36px));background:#fff;border:1px solid #efc2be;border-radius:12px;padding:14px;box-shadow:0 14px 32px rgba(68,29,25,.16)}.delete-popover label{font-size:12px;color:#7a271a}.delete-popover input{margin-top:6px}.delete-popover .btn{width:100%}.attempt-action-stack{grid-column:1/-1;display:flex;flex-direction:column;gap:8px}.attempt-action-stack>form:not(.attempt-admin-action){display:flex;justify-content:flex-end}.student-nav-count{margin-left:auto;min-width:22px;height:22px;padding:0 6px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#6d7aba;color:#fff;font-size:11px;font-weight:800;line-height:1}.student-side-link.active .student-nav-count{background:#fff;color:var(--student-violet)}.notification-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.real-notifications{display:flex;flex-direction:column;gap:10px}.real-notifications .notification-item{display:grid;grid-template-columns:12px minmax(0,1fr);gap:13px;align-items:start;border:1px solid #e4e2eb;border-radius:14px;padding:16px 17px;background:#fff;color:var(--text);transition:.15s ease}.real-notifications .notification-item:hover{border-color:#cfc8e3;box-shadow:0 4px 14px rgba(35,32,60,.05)}.real-notifications .notification-item.is-unread{border-color:#c9c2e2;background:#fbfaff}.real-notifications .notification-item.is-read{opacity:.78}.notification-dot{width:9px;height:9px;border-radius:50%;margin-top:7px;background:#a8a7af}.notification-item.ok .notification-dot{background:#12a76a}.notification-item.warning .notification-dot{background:#e38b2c}.notification-item.info .notification-dot{background:#6d7aba}.notification-copy{min-width:0}.notification-copy p{margin:6px 0 8px;line-height:1.5;color:#515263}.notification-copy small{color:var(--muted)}.notification-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.mail-status-list{display:flex;flex-direction:column}.mail-status-list>div{display:grid;grid-template-columns:130px minmax(0,1fr);gap:14px;padding:10px 0;border-top:1px solid #efedf3}.mail-status-list>div:first-child{border-top:0}.mail-status-list span{color:var(--muted);font-size:13px}.mail-status-list strong{text-align:right;overflow-wrap:anywhere}.mail-status-list strong .badge{font-weight:700}.compact-alert{margin-top:16px;margin-bottom:0}.admin-notification-list{display:flex;flex-direction:column}.admin-notification-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:11px 0;border-top:1px solid #eeeaf3;align-items:start}.admin-notification-row:first-child{border-top:0}.admin-notification-row small{display:block;color:var(--muted);margin-top:4px}.mail-state{white-space:nowrap}.mail-state.sent{color:var(--ok)}.mail-state.failed{color:var(--danger)}.mail-state.skipped{color:#9a6700}
@media(max-width:900px){.danger-zone{grid-template-columns:1fr}.danger-zone form{border-left:0;border-top:1px solid #f0d2cf;padding-left:0;padding-top:18px}.delete-popover{position:fixed;left:18px;right:18px;top:18vh;width:auto;max-width:none}.notification-page-head{flex-direction:column}.mail-status-list>div{grid-template-columns:110px minmax(0,1fr)}.admin-notification-row{grid-template-columns:1fr}}
@media(max-width:560px){.notification-title-row{align-items:flex-start;flex-direction:column}.real-notifications .notification-item{padding:14px}.mail-status-list>div{grid-template-columns:1fr;gap:4px}.mail-status-list strong{text-align:left}.attempt-action-stack>form:not(.attempt-admin-action){justify-content:stretch}.attempt-action-stack>form:not(.attempt-admin-action) .btn{width:100%}}

/* V1.8 · Certificados de aprobación */
.certificate-card-content{min-width:0;flex:1}.certificate-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px}.certificate-admin-section{overflow:visible}.certificate-admin-empty,.certificate-issue-box{border:1px solid #e4e1eb;border-radius:12px;padding:15px;background:#fbfbfd}.certificate-admin-empty p,.certificate-issue-box p{margin:5px 0 0}.certificate-issue-box{display:flex;justify-content:space-between;align-items:center;gap:16px}.certificate-history-list{display:flex;flex-direction:column;margin-top:12px}.certificate-history-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(260px,.9fr);gap:14px;align-items:start;padding:13px 0;border-top:1px solid #eeeaf3}.certificate-history-row:first-child{border-top:0}.certificate-history-row small{display:block;color:var(--muted);margin-top:4px}.certificate-row-actions{display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap}.certificate-row-actions form{display:flex;gap:7px;align-items:center}.certificate-revoke-form{width:100%;justify-content:flex-end}.certificate-revoke-form input{max-width:230px}.certificate-admin-table{min-width:980px}.certificate-validation-body{min-height:100vh;background:#f5f5f9;display:flex;align-items:center;justify-content:center;padding:28px}.certificate-validation-wrap{width:min(760px,100%)}.certificate-validation-brand{display:block;width:min(340px,72vw);margin:0 auto 24px}.certificate-validation-brand img{display:block;width:100%;height:auto}.certificate-validation-card{background:#fff;border:1px solid #dedfeb;border-radius:18px;padding:30px;box-shadow:0 15px 45px rgba(25,23,45,.08)}.certificate-validation-card h1{margin:4px 0 22px;font-size:32px}.certificate-validation-form>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}.validation-result{display:grid;grid-template-columns:48px minmax(0,1fr);gap:14px;align-items:center;border-radius:13px;padding:15px;margin-top:22px}.validation-result.valid{background:#ecfdf3;border:1px solid #abefc6;color:#05603a}.validation-result.invalid{background:#fff6ed;border:1px solid #fedf89;color:#93370d}.validation-result p{margin:4px 0 0;color:inherit}.validation-status-icon{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:900;background:#fff}.validation-data{margin-top:18px;border:1px solid #e8e6ee;border-radius:13px;overflow:hidden}.validation-data>div{display:grid;grid-template-columns:170px minmax(0,1fr);gap:15px;padding:12px 14px;border-top:1px solid #eeeaf3}.validation-data>div:first-child{border-top:0}.validation-data span{color:var(--muted);font-size:13px}.validation-data strong{text-align:right;overflow-wrap:anywhere}.certificate-validation-foot{text-align:center;color:var(--muted);font-size:12px;margin:17px 0 0}
@media(max-width:900px){.certificate-history-row{grid-template-columns:1fr auto}.certificate-row-actions{grid-column:1/-1;justify-content:flex-start}.certificate-revoke-form{justify-content:flex-start}.certificate-issue-box{align-items:flex-start;flex-direction:column}}
@media(max-width:620px){.certificate-card-actions{flex-direction:column}.certificate-card-actions .btn{width:100%}.certificate-validation-body{padding:14px}.certificate-validation-card{padding:20px}.certificate-validation-card h1{font-size:27px}.certificate-validation-form>div{grid-template-columns:1fr}.certificate-validation-form .btn{width:100%}.validation-data>div{grid-template-columns:1fr;gap:4px}.validation-data strong{text-align:left}.certificate-history-row{grid-template-columns:1fr}.certificate-row-actions{flex-direction:column}.certificate-row-actions .btn,.certificate-row-actions form,.certificate-revoke-form,.certificate-revoke-form input{width:100%;max-width:none}.certificate-row-actions form{flex-direction:column;align-items:stretch}}
