:root{
  --yellow:#f5b400;
  --orange:#ff7a00;
  --dark:#101114;
  --dark2:#191c22;
  --bg:#f4f5f7;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --line:rgba(17,24,39,.10);
  --shadow:0 18px 50px rgba(0,0,0,.08);
  --radius:22px;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{
  text-decoration:none;
  color:inherit;
}

h1,h2,h3{
  font-family:Poppins,Inter,sans-serif;
  letter-spacing:-.04em;
}

p{
  line-height:1.65;
  color:var(--muted);
}

.app-shell{
  display:grid;
  grid-template-columns:280px 1fr;
  min-height:100vh;
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  min-height:0;
  overflow:hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(245,180,0,.18), transparent 34%),
    linear-gradient(180deg,#0d0f12 0%,#181b21 100%);
  color:#fff;
  padding:22px;
  display:flex;
  flex-direction:column;
  border-right:1px solid rgba(255,255,255,.08);
}

.side-brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:28px;
}

.side-brand__mark{
  width:48px;
  height:48px;
  border-radius:16px;
  background:linear-gradient(135deg,var(--yellow),var(--orange));
  color:#111;
  display:grid;
  place-items:center;
  font-family:Poppins,sans-serif;
  font-weight:900;
  box-shadow:0 14px 28px rgba(245,180,0,.22);
}

.side-brand strong{
  display:block;
  font-size:20px;
  line-height:1;
}

.side-brand small{
  display:block;
  color:rgba(255,255,255,.58);
  font-weight:700;
  font-size:12px;
  margin-top:4px;
}

.side-nav{
  display:grid;
  align-content:start;
  gap:8px;
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-right:4px;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
}

.side-nav::-webkit-scrollbar{width:6px}
.side-nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.18);border-radius:999px}
.side-nav::-webkit-scrollbar-track{background:transparent}

.side-nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:44px;
  padding:0 14px;
  border-radius:15px;
  color:rgba(255,255,255,.72);
  font-weight:800;
  font-size:14px;
  transition:.2s ease;
}

.side-nav a:hover,
.side-nav a.active{
  background:rgba(245,180,0,.14);
  color:#fff;
}

.side-nav a.active{
  box-shadow:inset 0 0 0 1px rgba(245,180,0,.18);
}

.side-user{
  flex:0 0 auto;
  margin-top:14px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius:20px;
  padding:16px;
}

.side-user strong,
.side-user small,
.side-user a{
  display:block;
}

.side-user strong{
  font-size:14px;
}

.side-user small{
  color:rgba(255,255,255,.62);
  font-size:12px;
  margin:5px 0 12px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.side-user a{
  color:var(--yellow);
  font-weight:900;
  font-size:13px;
}

.main{
  padding:28px;
  min-width:0;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:22px;
}

.topbar h1{
  font-size:38px;
  line-height:1;
  margin:0;
  color:#111827;
}

.topbar p{
  margin:8px 0 0;
}

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
}

.grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:var(--shadow);
}

.card h2{
  margin:0 0 10px;
  color:#111827;
}

.metric{
  position:relative;
  overflow:hidden;
  min-height:145px;
}

.metric::before{
  content:"";
  position:absolute;
  right:-34px;
  top:-34px;
  width:130px;
  height:130px;
  border-radius:50%;
  background:rgba(245,180,0,.14);
}

.metric strong{
  display:block;
  font-family:Poppins,sans-serif;
  font-size:42px;
  line-height:1;
  color:#111;
  position:relative;
  z-index:2;
}

.metric span{
  display:block;
  color:var(--muted);
  font-weight:800;
  margin-top:8px;
  position:relative;
  z-index:2;
}

.metric small{
  display:inline-flex;
  margin-top:18px;
  padding:7px 10px;
  border-radius:999px;
  background:#fff4cf;
  color:#8a5a00;
  font-size:12px;
  font-weight:900;
  position:relative;
  z-index:2;
}

.table-wrap{
  overflow:auto;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
}

.table{
  width:100%;
  border-collapse:collapse;
  min-width:760px;
}

.table th,
.table td{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
  font-size:14px;
}

.table th{
  background:#fff4cf;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#4a3b10;
}

.table tr:last-child td{
  border-bottom:0;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 16px;
  border-radius:999px;
  border:1px solid transparent;
  font-weight:900;
  cursor:pointer;
  font-size:14px;
  transition:.2s ease;
}

.btn:hover{
  transform:translateY(-2px);
}

.btn-primary{
  background:linear-gradient(135deg,var(--yellow),var(--orange));
  color:#111;
  box-shadow:0 12px 24px rgba(245,180,0,.22);
}

.btn-dark{
  background:#111;
  color:#fff;
}

.btn-light{
  background:#fff;
  border-color:var(--line);
  color:#111;
}

.btn-small{
  min-height:34px;
  padding:0 12px;
  font-size:12px;
}

.status{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
}

.status-ok{
  background:#dcfce7;
  color:#166534;
}

.status-warn{
  background:#fef3c7;
  color:#92400e;
}

.status-bad{
  background:#fee2e2;
  color:#991b1b;
}

.status-neutral{
  background:#e5e7eb;
  color:#374151;
}

.form{
  display:grid;
  gap:14px;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.field label{
  display:block;
  font-size:13px;
  font-weight:900;
  margin-bottom:7px;
  color:#374151;
}

.form input,
.form textarea,
.form select{
  width:100%;
  padding:13px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  font:inherit;
  background:#fff;
  outline:none;
}

.form input:focus,
.form textarea:focus,
.form select:focus{
  border-color:rgba(245,180,0,.65);
  box-shadow:0 0 0 4px rgba(245,180,0,.12);
}

.form textarea{
  min-height:130px;
  resize:vertical;
}

.alert{
  padding:14px 16px;
  border-radius:16px;
  margin-bottom:16px;
  font-weight:800;
}

.alert-error{
  background:#fee2e2;
  color:#991b1b;
}

.alert-ok{
  background:#dcfce7;
  color:#166534;
}

.login-page{
  min-height:100vh;
  display:grid;
  grid-template-columns:1fr 460px;
  background:#111;
  color:#fff;
}

.login-hero{
  padding:52px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  background:
    linear-gradient(90deg,rgba(0,0,0,.85),rgba(0,0,0,.28)),
    url('https://images.unsplash.com/photo-1581092918056-0c4c3acd3789?auto=format&fit=crop&w=1600&q=80') center/cover;
}

.login-hero h1{
  font-size:60px;
  line-height:.95;
  margin:0 0 16px;
}

.login-hero span{
  color:var(--yellow);
}

.login-hero p{
  color:rgba(255,255,255,.78);
  max-width:620px;
  font-size:18px;
}

.login-panel{
  background:#fff;
  color:#111;
  display:grid;
  place-items:center;
  padding:28px;
}

.login-card{
  width:100%;
  max-width:380px;
}

.login-card h2{
  font-size:34px;
  margin:0 0 8px;
}

.login-card p{
  margin-bottom:20px;
}

.module-list{
  display:grid;
  gap:12px;
}

.module-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}

.module-item strong{
  display:block;
  color:#111827;
}

.module-item small{
  color:var(--muted);
  font-weight:700;
}

@media(max-width:1100px){
  .grid{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:980px){
  .app-shell{
    grid-template-columns:1fr;
  }

  .sidebar{
    height:auto;
    position:relative;
  }

  .main{
    padding:18px;
  }

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

  .login-page{
    grid-template-columns:1fr;
  }

  .login-hero{
    min-height:360px;
  }

  .login-panel{
    min-height:calc(100vh - 360px);
  }

  .topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .topbar h1{
    font-size:32px;
  }
}
.mobile-menu-btn{
  display:none;
  position:fixed;
  right:16px;
  top:16px;
  z-index:3000;
  width:48px;
  height:48px;
  border:0;
  border-radius:16px;
  background:linear-gradient(135deg,var(--yellow),var(--orange));
  color:#111;
  font-size:24px;
  font-weight:900;
  box-shadow:0 18px 40px rgba(0,0,0,.20);
}

.mobile-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:1999;
}

@media(max-width:980px){
  .mobile-menu-btn{
    display:grid;
    place-items:center;
  }

  .app-shell{
    display:block;
  }

  .sidebar{
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    width:286px;
    height:100vh;
    height:100dvh;
    max-height:100dvh;
    min-height:0;
    overflow:hidden;
    z-index:2000;
    transform:translateX(-105%);
    transition:.25s ease;
  }

  .sidebar.is-open{
    transform:translateX(0);
  }

  .mobile-overlay.is-open{
    display:block;
  }

  .main{
    padding-top:78px;
  }
}
/* ===== Course cards uniformes ===== */

.course-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  align-items:stretch;
}

.course-card{
  min-height:430px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.course-card h2{
  min-height:58px;
  display:flex;
  align-items:flex-start;
}

.course-card p{
  min-height:78px;
  margin:0;
}

.course-card .course-meta{
  display:grid;
  gap:8px;
  margin-top:auto;
}

.course-card .course-actions{
  display:grid;
  gap:10px;
  margin-top:10px;
}

.course-price{
  font-size:26px;
  font-weight:900;
  color:#111;
}

.course-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.course-flow{
  display:grid;
  grid-template-columns:1fr 360px;
  gap:18px;
  align-items:start;
}

.lesson-list{
  display:grid;
  gap:12px;
}

.lesson-item{
  display:grid;
  grid-template-columns:54px 1fr auto;
  gap:14px;
  align-items:center;
  padding:16px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  box-shadow:0 10px 26px rgba(0,0,0,.05);
}

.lesson-num{
  width:44px;
  height:44px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:#fff4cf;
  color:#8a5a00;
  font-weight:900;
}

.lesson-item strong{
  display:block;
  color:#111827;
}

.lesson-item small{
  display:block;
  color:var(--muted);
  font-weight:700;
  margin-top:4px;
}

.course-side{
  position:sticky;
  top:24px;
}

.doc-actions{
  display:grid;
  gap:10px;
}

.topic-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:18px;
  flex-wrap:wrap;
}

.video-box{
  margin:22px 0;
  border-radius:22px;
  overflow:hidden;
  background:#000;
}

.video-box video{
  width:100%;
  max-height:520px;
  display:block;
}

.external-video-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px;
  border-radius:20px;
  background:#fff8df;
  border:1px solid rgba(245,180,0,.28);
  margin:18px 0;
}

.completed-panel{
  border:1px solid rgba(22,101,52,.18);
  background:#f0fdf4;
}

.completed-panel h2{
  color:#166534;
}

@media(max-width:1100px){
  .course-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .course-flow{
    grid-template-columns:1fr;
  }

  .course-side{
    position:relative;
    top:auto;
  }
}

@media(max-width:700px){
  .course-grid{
    grid-template-columns:1fr;
  }

  .course-card{
    min-height:auto;
  }

  .course-card h2,
  .course-card p{
    min-height:auto;
  }

  .lesson-item{
    grid-template-columns:44px 1fr;
  }

  .lesson-item .btn{
    grid-column:1 / -1;
    width:100%;
  }

  .topic-nav .btn{
    width:100%;
  }

  .external-video-box{
    flex-direction:column;
    align-items:flex-start;
  }
}
/* ===== Ajustes finos dashboard / cursos / responsive ===== */

.main{
  width:100%;
}

.dashboard-hero{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(245,180,0,.20), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(255,122,0,.16), transparent 30%),
    linear-gradient(135deg,#101114,#1d222b);
  color:#fff;
  border-radius:30px;
  padding:30px;
  margin-bottom:28px;
  box-shadow:0 22px 60px rgba(0,0,0,.16);
}

.dashboard-hero h1{
  color:#fff;
  font-size:42px;
  line-height:1;
  margin:0 0 10px;
}

.dashboard-hero p{
  color:rgba(255,255,255,.76);
  max-width:720px;
  margin:0;
}

.dashboard-hero__content{
  position:relative;
  z-index:2;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:22px;
}

.dashboard-hero__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.dashboard-hero__kpis{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:24px;
  position:relative;
  z-index:2;
}

.dashboard-kpi{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  border-radius:20px;
  padding:16px;
}

.dashboard-kpi strong{
  display:block;
  font-family:Poppins,Inter,sans-serif;
  font-size:26px;
  color:#f5b400;
  line-height:1;
}

.dashboard-kpi span{
  display:block;
  color:rgba(255,255,255,.72);
  font-size:13px;
  font-weight:800;
  margin-top:6px;
}

.course-grid{
  gap:24px !important;
  padding-bottom:18px;
}

.course-card{
  min-height:460px;
  padding:24px;
  border-radius:26px;
}

.course-card h2{
  font-size:25px;
  line-height:1.08;
  margin:0;
}

.course-card p{
  line-height:1.65;
}

.course-card .module-list{
  gap:10px;
}

.course-card .module-item{
  border-radius:18px;
  padding:13px;
}

.course-card.completed-panel{
  background:
    radial-gradient(circle at 100% 0%, rgba(22,163,74,.12), transparent 28%),
    #ffffff;
  border-color:rgba(22,101,52,.20);
}

.course-card.completed-panel .course-badges .status-ok{
  box-shadow:0 8px 20px rgba(22,163,74,.14);
}

.course-actions .btn{
  width:100%;
}

.course-flow{
  gap:26px !important;
}

.course-flow > .card,
.course-side{
  border-radius:26px;
}

.lesson-list{
  gap:16px !important;
}

.lesson-item{
  margin-bottom:0;
  border-radius:22px;
  transition:.2s ease;
}

.lesson-item:hover{
  transform:translateY(-3px);
  box-shadow:0 16px 36px rgba(0,0,0,.08);
}

.course-side{
  top:28px;
}

.course-side .btn{
  width:100%;
}

.doc-actions{
  margin-top:18px;
}

.catalog-top-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.empty-state{
  max-width:720px;
  margin:auto;
  text-align:center;
  padding:44px 28px;
}

.empty-state h2{
  font-size:34px;
  margin-bottom:10px;
}

@media(max-width:1200px){
  .course-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}

@media(max-width:980px){
  .dashboard-hero{
    padding:24px;
    margin-bottom:22px;
  }

  .dashboard-hero__content{
    flex-direction:column;
    align-items:flex-start;
  }

  .dashboard-hero__actions{
    justify-content:flex-start;
    width:100%;
  }

  .dashboard-hero__actions .btn{
    flex:1;
    min-width:180px;
  }

  .dashboard-hero__kpis{
    grid-template-columns:1fr;
  }

  .course-grid{
    grid-template-columns:1fr;
    gap:18px !important;
  }

  .course-card{
    min-height:auto;
  }

  .course-flow{
    gap:18px !important;
  }
}

@media(max-width:700px){
  .main{
    padding-left:14px;
    padding-right:14px;
  }

  .dashboard-hero{
    border-radius:24px;
    padding:22px;
  }

  .dashboard-hero h1{
    font-size:32px;
  }

  .dashboard-hero__actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .dashboard-hero__actions .btn{
    width:100%;
  }

  .topbar{
    gap:12px;
  }

  .catalog-top-actions{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }

  .catalog-top-actions .btn{
    width:100%;
  }

  .course-card{
    padding:20px;
    border-radius:22px;
  }

  .course-card h2{
    font-size:22px;
  }

  .lesson-item{
    padding:14px;
    gap:12px;
  }

  .lesson-num{
    width:40px;
    height:40px;
    border-radius:13px;
  }
}
.catalog-brand{
  display:flex;
  justify-content:center;
  margin:6px 0 24px;
}

.catalog-brand img{
  display:block;
  height:76px;
  width:auto;
  max-width:320px;
  object-fit:contain;
}

@media(max-width:700px){
  .catalog-brand{
    margin:0 0 18px;
  }

  .catalog-brand img{
    height:58px;
    max-width:260px;
  }
}
.login-logo{
  display:flex;
  justify-content:center;
  margin-bottom:22px;
}

.login-logo img{
  height:82px;
  width:auto;
  max-width:320px;
  object-fit:contain;
}

@media(max-width:700px){
  .login-logo img{
    height:64px;
    max-width:260px;
  }
}
.panel-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px 10px 22px;
  text-decoration:none;
}

.panel-logo img{
  display:block;
  width:100%;
  max-width:210px;
  height:auto;
  object-fit:contain;
}

@media(max-width:980px){
  .panel-logo{
    padding-top:18px;
  }

  .panel-logo img{
    max-width:190px;
  }
}
.login-logo{
  display:flex;
  justify-content:center;
  margin-bottom:28px;
}

.login-logo img{
  height:135px;
  width:auto;
  max-width:420px;
  object-fit:contain;
}

@media(max-width:700px){
  .login-logo img{
    height:105px;
    max-width:320px;
  }
}
/* Logo con borde/brillo blanco para paneles y login */
.panel-logo img,
.login-logo img,
.catalog-brand img{
  filter:
    drop-shadow(0 0 4px rgba(255,255,255,.95))
    drop-shadow(0 0 12px rgba(255,255,255,.82))
    drop-shadow(0 12px 24px rgba(0,0,0,.24));
}

.panel-logo img{
  max-width:250px !important;
}

.login-logo img{
  height:155px !important;
  max-width:470px !important;
}

.catalog-brand img{
  height:92px !important;
  max-width:390px !important;
}

@media(max-width:980px){
  .panel-logo img{
    max-width:215px !important;
  }
}

@media(max-width:700px){
  .login-logo img{
    height:118px !important;
    max-width:340px !important;
  }

  .catalog-brand img{
    height:68px !important;
    max-width:290px !important;
  }
}
.panel-subtitle{
  text-align:center;
  margin:-8px 0 22px;
  padding:0 12px;
}

.panel-subtitle strong{
  display:block;
  font-size:14px;
  font-weight:900;
  color:#111827;
}

.panel-subtitle small{
  display:block;
  margin-top:3px;
  font-size:12px;
  font-weight:700;
  color:#64748b;
}

.side-nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.nav-badge{
  display:inline-grid;
  place-items:center;
  min-width:22px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  background:#f5b400;
  color:#111827;
  font-size:12px;
  font-weight:900;
  line-height:1;
}

.panel-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px 10px 18px;
  text-decoration:none;
}

.panel-logo img{
  display:block;
  width:100%;
  max-width:245px;
  height:auto;
  object-fit:contain;
  filter:
    drop-shadow(0 0 4px rgba(255,255,255,.95))
    drop-shadow(0 0 12px rgba(255,255,255,.82))
    drop-shadow(0 12px 24px rgba(0,0,0,.24));
}
input[type="file"]{
  width:100%;
  padding:12px;
  border:1px dashed rgba(15,23,42,.22);
  border-radius:16px;
  background:#f8fafc;
  cursor:pointer;
}

input[type="file"]::file-selector-button{
  border:0;
  border-radius:12px;
  padding:10px 14px;
  margin-right:12px;
  background:#111827;
  color:#f5b400;
  font-weight:900;
  cursor:pointer;
}