/*
 * DESAM Calbuco Dashboard · Professional UI V10
 * Scoped frontend refinements. No theme-level selectors.
 */

#ad9-dashboard.ad9-dashboard{
  --pro-navy:#0f2748;
  --pro-navy-2:#183b67;
  --pro-blue:#176bcc;
  --pro-blue-soft:#eef6ff;
  --pro-cyan:#4aa8ff;
  --pro-green:#0d9b67;
  --pro-orange:#d98922;
  --pro-red:#c94d58;
  --pro-bg:#f3f6fa;
  --pro-card:#ffffff;
  --pro-text:#18263a;
  --pro-muted:#708096;
  --pro-border:#e1e8f0;
  --pro-shadow:0 10px 30px rgba(15,39,72,.055);
  --pro-shadow-hover:0 16px 42px rgba(15,39,72,.09);
  background:
    radial-gradient(circle at 86% 0%,rgba(23,107,204,.055),transparent 22%),
    linear-gradient(180deg,#f8fbff 0,#f3f6fa 180px,#f3f6fa 100%);
  color:var(--pro-text);
  padding:18px 18px 30px;
}

#ad9-dashboard .ad9-dashboard-head{
  position:relative;
  min-height:78px;
  margin:0 0 18px;
  padding:11px 18px;
  border:1px solid rgba(218,228,239,.92);
  border-radius:18px;
  background:rgba(255,255,255,.92);
  box-shadow:0 8px 28px rgba(15,39,72,.045);
  backdrop-filter:blur(16px);
}

#ad9-dashboard .ad9-dashboard-head::after{
  content:"";
  position:absolute;
  inset:auto 18px 0;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--pro-blue),rgba(74,168,255,.34),transparent 72%);
  opacity:.8;
}

#ad9-dashboard .ad9-dashboard-brand{gap:18px}
#ad9-dashboard .ad9-dashboard-brand img{max-width:218px;max-height:52px}
#ad9-dashboard .ad9-dashboard-brand>div{padding-left:17px;border-color:#dfe8f1}
#ad9-dashboard .ad9-dashboard-brand span{font-size:9.5px;letter-spacing:.13em;color:#316aa7}
#ad9-dashboard .ad9-dashboard-brand strong{font-size:12px;color:#66758b}

#ad9-dashboard .ad9-data-date{
  padding:9px 11px;
  border:1px solid #e5ebf2;
  border-radius:11px;
  background:#f9fbfd;
}
#ad9-dashboard .ad9-data-date span{font-size:9px}
#ad9-dashboard .ad9-data-date strong{font-size:10px;color:#465a74}

#ad9-dashboard .ad9-dashboard-layout{
  grid-template-columns:236px minmax(0,1fr);
  gap:20px;
  margin-top:0;
}

#ad9-dashboard .ad9-sidebar{
  top:18px;
  min-height:calc(100vh - 48px);
  padding:14px 11px;
  border:1px solid var(--pro-border);
  border-radius:18px;
  background:rgba(255,255,255,.94);
  box-shadow:var(--pro-shadow);
  backdrop-filter:blur(12px);
}

#ad9-dashboard .ad9-sidebar-label{
  padding:8px 12px 14px;
  color:#9aa8ba;
  font-size:9px;
  letter-spacing:.12em;
}

#ad9-dashboard .ad9-nav{gap:7px}
#ad9-dashboard .ad9-nav-btn{
  position:relative;
  min-height:48px;
  grid-template-columns:32px minmax(0,1fr) auto;
  gap:10px;
  padding:0 11px;
  border:1px solid transparent;
  border-radius:12px;
  color:#63738a;
  font-size:12.5px;
  transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;
}
#ad9-dashboard .ad9-nav-btn svg{
  width:17px;
  height:17px;
  padding:7px;
  box-sizing:content-box;
  border-radius:10px;
  background:#f4f7fa;
  color:#68809b;
  transition:inherit;
}
#ad9-dashboard .ad9-nav-btn:hover{
  transform:translateY(-1px);
  border-color:#e5edf5;
  background:#f8fbff;
  color:var(--pro-navy);
}
#ad9-dashboard .ad9-nav-btn:hover svg{background:#eaf3fc;color:var(--pro-blue)}
#ad9-dashboard .ad9-nav-btn.is-active{
  border-color:#15375e;
  background:linear-gradient(135deg,#102b55 0%,#173f70 100%);
  color:#fff;
  box-shadow:0 9px 20px rgba(16,43,85,.16);
}
#ad9-dashboard .ad9-nav-btn.is-active::before{
  content:"";
  position:absolute;
  left:-5px;
  top:13px;
  width:3px;
  height:22px;
  border-radius:999px;
  background:#4aa8ff;
  box-shadow:0 0 0 3px rgba(74,168,255,.1);
}
#ad9-dashboard .ad9-nav-btn.is-active svg{background:rgba(255,255,255,.10);color:#fff}
#ad9-dashboard .ad9-nav-btn em{font-size:8px;padding:4px 7px}

#ad9-dashboard .ad9-sidebar-note{
  margin-top:24px;
  padding:16px 12px 5px;
  border-color:#edf1f5;
}
#ad9-dashboard .ad9-sidebar-note strong{font-size:12px;color:#40536c}
#ad9-dashboard .ad9-sidebar-note span{font-size:9.5px;color:#9aa6b5}

#ad9-dashboard .ad9-main{padding:2px 2px 0}
#ad9-dashboard .ad9-title{margin:5px 0 20px}
#ad9-dashboard .ad9-title>span,
#ad9-dashboard .ad9-title>div:first-child>span{
  margin-bottom:7px;
  color:#2873bd;
  font-size:9px;
  letter-spacing:.13em;
}
#ad9-dashboard .ad9-title h1{
  color:#17263a;
  font-size:32px;
  font-weight:650;
  letter-spacing:-.035em;
}
#ad9-dashboard .ad9-title p{
  margin-top:8px;
  color:#748398;
  font-size:13px;
  line-height:1.55;
}

#ad9-dashboard .ad9-executive-badge{
  padding:8px 11px;
  border-color:#d8e9df;
  border-radius:999px;
  background:#f3fbf7;
  color:#2e7355;
  font-size:9px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7);
}

#ad9-dashboard .ad9-kpis,
#ad9-dashboard .ad9-report-kpis{gap:12px;margin-bottom:15px}
#ad9-dashboard .ad9-kpi,
#ad9-dashboard .ad9-report-kpis>div{
  position:relative;
  overflow:hidden;
  border:1px solid var(--pro-border);
  border-radius:15px;
  background:rgba(255,255,255,.98);
  box-shadow:0 5px 18px rgba(15,39,72,.035);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
#ad9-dashboard .ad9-kpi::after,
#ad9-dashboard .ad9-report-kpis>div::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:2px;
  background:linear-gradient(90deg,rgba(23,107,204,.75),rgba(74,168,255,.14),transparent);
  opacity:.55;
}
#ad9-dashboard .ad9-kpi:hover,
#ad9-dashboard .ad9-report-kpis>div:hover{
  transform:translateY(-2px);
  border-color:#d5e2ef;
  box-shadow:var(--pro-shadow-hover);
}
#ad9-dashboard .ad9-kpi{min-height:118px;padding:18px 17px}
#ad9-dashboard .ad9-kpi span{font-size:10.5px;color:#7b899b}
#ad9-dashboard .ad9-kpi strong{font-size:29px;color:var(--pro-navy)}
#ad9-dashboard .ad9-kpi small{font-size:9px;color:#9ca7b5}

#ad9-dashboard .ad9-card,
#ad9-dashboard .ad9-cohort-course{
  border:1px solid var(--pro-border);
  border-radius:16px;
  background:#fff;
  box-shadow:0 5px 20px rgba(15,39,72,.035);
}
#ad9-dashboard .ad9-card{overflow:hidden}
#ad9-dashboard .ad9-card-head{
  padding:16px 18px;
  border-color:#edf1f5;
  background:linear-gradient(180deg,#fff,#fdfefe);
}
#ad9-dashboard .ad9-card-head span{font-size:9px;color:#3677b9}
#ad9-dashboard .ad9-card-head h2{font-size:16px;color:#273a54}
#ad9-dashboard .ad9-card-head>small{font-size:9.5px;color:#929ead}

#ad9-dashboard .ad9-area-card{
  border-radius:15px;
  border-color:#e1e8f0;
  box-shadow:0 4px 16px rgba(15,39,72,.03);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
#ad9-dashboard .ad9-area-card:hover{
  transform:translateY(-2px);
  border-color:#d2dfec;
  box-shadow:0 13px 32px rgba(15,39,72,.075);
}

#ad9-dashboard .ad9-toolbar,
#ad9-dashboard .ad9-area-toolbar{
  gap:10px;
}
#ad9-dashboard .ad9-toolbar input,
#ad9-dashboard .ad9-toolbar select,
#ad9-dashboard .ad9-area-toolbar input,
#ad9-dashboard .ad9-area-toolbar select{
  border-color:#dce5ef;
  border-radius:11px;
  background:#fff;
  color:#42556e;
  box-shadow:0 2px 9px rgba(15,39,72,.025);
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
#ad9-dashboard .ad9-toolbar input:focus,
#ad9-dashboard .ad9-toolbar select:focus,
#ad9-dashboard .ad9-area-toolbar input:focus,
#ad9-dashboard .ad9-area-toolbar select:focus{
  border-color:#86b9eb;
  box-shadow:0 0 0 4px rgba(23,107,204,.08);
  background:#fff;
}

#ad9-dashboard .ad9-table-wrap{
  scrollbar-width:thin;
  scrollbar-color:#ccd8e5 transparent;
}
#ad9-dashboard .ad9-table-wrap::-webkit-scrollbar{display:block;height:8px;width:8px}
#ad9-dashboard .ad9-table-wrap::-webkit-scrollbar-thumb{background:#ccd8e5;border-radius:999px}
#ad9-dashboard .ad9-table-wrap::-webkit-scrollbar-track{background:transparent}

#ad9-dashboard .ad9-table{
  border-collapse:separate;
  border-spacing:0;
  font-size:12px;
}
#ad9-dashboard .ad9-table th{
  position:sticky;
  top:0;
  z-index:3;
  padding:13px 14px;
  border-bottom:1px solid #e4ebf2;
  background:#f8fafc;
  color:#66778d;
  font-size:9.5px;
  font-weight:750;
  letter-spacing:.015em;
}
#ad9-dashboard .ad9-table td{
  padding:14px;
  border-bottom:1px solid #edf1f5;
  color:#586a80;
  background:#fff;
  transition:background .15s ease;
}
#ad9-dashboard .ad9-table tbody tr:hover td{background:#f8fbff}
#ad9-dashboard .ad9-table tbody tr:last-child td{border-bottom:0}

#ad9-dashboard .ad9-person{gap:11px}
#ad9-dashboard .ad9-avatar{
  width:36px;height:36px;
  background:linear-gradient(135deg,#e9f3ff,#f5f9ff);
  border:1px solid #d9e9fa;
  color:#1762ad;
}
#ad9-dashboard .ad9-person strong{font-size:12.3px;color:#2e415a}
#ad9-dashboard .ad9-person span{font-size:9.3px;color:#8e9aaa}

#ad9-dashboard .ad9-course-box>strong{font-size:10.9px;color:#3e536d}
#ad9-dashboard .ad9-course-mini .ad9-mini-track{height:6px;background:#e7edf3}
#ad9-dashboard .ad9-course-mini .ad9-mini-track i{
  background:linear-gradient(90deg,#0c5fb5,#2f8de5);
  box-shadow:0 0 8px rgba(23,107,204,.16);
}
#ad9-dashboard .ad9-course-state{min-height:21px;font-size:7.3px}

#ad9-dashboard .ad9-detail{
  height:36px;
  padding:0 13px;
  border-color:#cfe0f0;
  border-radius:9px;
  background:#fff;
  color:#145fae;
  box-shadow:0 2px 8px rgba(15,39,72,.03);
  transition:background .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
#ad9-dashboard .ad9-detail:hover{
  transform:translateY(-1px);
  border-color:#8ebbe7;
  background:#f5faff;
  box-shadow:0 8px 16px rgba(23,107,204,.08);
}

#ad9-dashboard .ad9-status,
#ad9-dashboard .ad9-presence-chip,
#ad9-dashboard .ad9-area-badge{
  border-radius:999px;
}

#ad9-dashboard .ad9-presence-chip.online{
  box-shadow:0 0 0 3px rgba(13,155,103,.06);
}

/* Ficha 360: drawer más limpio y ejecutivo. */
#ad9-dashboard .ad9-modal-backdrop{
  background:rgba(10,28,50,.52);
  backdrop-filter:blur(6px) saturate(120%);
}
#ad9-dashboard .ad9-modal-dialog{
  width:min(680px,96vw);
  padding:30px;
  border-left:1px solid rgba(255,255,255,.7);
  border-radius:22px 0 0 22px;
  box-shadow:-30px 0 80px rgba(8,25,46,.22);
}
#ad9-dashboard .ad9-modal-close{
  width:38px;height:38px;
  border:1px solid #e2e8ef;
  background:#f7f9fb;
  color:#56667a;
  transition:transform .15s ease,background .15s ease,color .15s ease;
}
#ad9-dashboard .ad9-modal-close:hover{transform:rotate(4deg);background:#eef4fa;color:#173f70}
#ad9-dashboard .ad9-modal-title{gap:14px;padding-bottom:20px}
#ad9-dashboard .ad9-modal-big-avatar{
  width:52px;height:52px;
  border:1px solid #d7e6f5;
  background:linear-gradient(135deg,#eaf4ff,#f7fbff);
  color:#1762ad;
  box-shadow:0 4px 12px rgba(23,107,204,.07);
}
#ad9-dashboard .ad9-modal-title h2{font-size:23px;color:#233851}
#ad9-dashboard .ad9-modal-title p{font-size:10.5px;color:#8794a4}
#ad9-dashboard .ad9-modal-overview{gap:10px;margin:18px 0}
#ad9-dashboard .ad9-modal-overview>div{
  padding:13px 14px;
  border-color:#e4ebf2;
  border-radius:11px;
  background:#f9fbfd;
}
#ad9-dashboard .ad9-modal-row{
  padding:15px;
  border-color:#e0e8f0;
  border-radius:12px;
  box-shadow:0 2px 8px rgba(15,39,72,.02);
}
#ad9-dashboard .ad9-modal-metrics>div{border:1px solid #edf1f5;border-radius:9px;background:#f9fbfd}

/* Certificados dentro de Ficha 360 y reporte. */
#ad9-dashboard .ad9-certificate-box{
  padding:12px 13px;
  border-color:#d5e6f7;
  border-radius:11px;
  background:linear-gradient(135deg,#f7fbff,#fbfdff);
}
#ad9-dashboard .ad9-certificate-box a,
#ad9-dashboard .ad9-cert-view-link{
  min-height:34px;
  padding:0 12px;
  border-color:#bad4ee;
  border-radius:9px;
  background:#fff;
  color:#145fae;
  box-shadow:0 2px 8px rgba(23,107,204,.04);
  cursor:pointer;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
#ad9-dashboard .ad9-certificate-box a:hover,
#ad9-dashboard .ad9-cert-view-link:hover{
  transform:translateY(-1px);
  border-color:#7eb3e6;
  background:#f5faff;
  box-shadow:0 7px 16px rgba(23,107,204,.09);
}
#ad9-dashboard .ad9-cert-month-card{
  border-radius:14px;
  box-shadow:0 4px 14px rgba(15,39,72,.03);
}
#ad9-dashboard .ad9-cert-month-card.is-active{
  border-color:#84b7e7;
  background:linear-gradient(180deg,#f6fbff,#eef7ff);
  box-shadow:0 9px 22px rgba(23,107,204,.08),inset 0 0 0 1px rgba(23,107,204,.08);
}
#ad9-dashboard .ad9-cert-summary{border-radius:12px;background:#fbfcfe}

/* Microinteracciones sin marear al usuario. */
@media (prefers-reduced-motion:no-preference){
  #ad9-dashboard .ad9-panel.is-active{animation:ad9ProFade .18s ease both}
  @keyframes ad9ProFade{from{opacity:.25;transform:translateY(3px)}to{opacity:1;transform:none}}
}

/* Popup profesional de certificado. Se inserta fuera del root para poder cubrir toda la ventana. */
.ad9-certificate-modal{
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:22px;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.ad9-certificate-modal.is-open{display:flex}
.ad9-certificate-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(7,20,37,.68);
  backdrop-filter:blur(8px) saturate(115%);
}
.ad9-certificate-modal__dialog{
  position:relative;
  z-index:2;
  width:min(1180px,96vw);
  height:min(900px,94vh);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.72);
  border-radius:20px;
  background:#fff;
  box-shadow:0 35px 100px rgba(5,19,35,.34);
  animation:ad9CertIn .2s ease both;
}
@keyframes ad9CertIn{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
.ad9-certificate-modal__header{
  flex:0 0 auto;
  min-height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:12px 14px 12px 20px;
  border-bottom:1px solid #e6edf4;
  background:linear-gradient(180deg,#fff,#fbfcfe);
}
.ad9-certificate-modal__title{min-width:0}
.ad9-certificate-modal__eyebrow{
  display:block;
  margin-bottom:3px;
  color:#2670ba;
  font-size:9px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.ad9-certificate-modal__title strong{
  display:block;
  overflow:hidden;
  color:#20354e;
  font-size:15px;
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ad9-certificate-modal__actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.ad9-certificate-modal__external,
.ad9-certificate-modal__close{
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d8e3ee;
  border-radius:10px;
  background:#fff;
  color:#40566f;
  font:700 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  text-decoration:none;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .15s ease,color .15s ease;
}
.ad9-certificate-modal__external{padding:0 13px}
.ad9-certificate-modal__close{width:38px;padding:0;font-size:21px;font-weight:400}
.ad9-certificate-modal__external:hover,
.ad9-certificate-modal__close:hover{transform:translateY(-1px);border-color:#a9c8e6;background:#f5faff;color:#165fa9}
.ad9-certificate-modal__viewer{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  background:#eef2f6;
}
.ad9-certificate-modal__loader{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  color:#6f7e92;
  background:linear-gradient(180deg,#f7f9fc,#eef2f6);
  font-size:12px;
  transition:opacity .18s ease,visibility .18s ease;
}
.ad9-certificate-modal__loader::before{
  content:"";
  width:30px;
  height:30px;
  border:3px solid #d8e4ef;
  border-top-color:#176bcc;
  border-radius:50%;
  animation:ad9CertSpin .75s linear infinite;
}
@keyframes ad9CertSpin{to{transform:rotate(360deg)}}
.ad9-certificate-modal.is-loaded .ad9-certificate-modal__loader{opacity:0;visibility:hidden}
.ad9-certificate-modal__iframe{
  width:100%;
  height:100%;
  display:block;
  border:0;
  background:#fff;
}
.ad9-certificate-modal__footer{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 18px;
  border-top:1px solid #e6edf4;
  background:#fbfcfe;
  color:#8996a7;
  font-size:10px;
}
.ad9-certificate-modal__footer span:first-child::before{
  content:"";
  display:inline-block;
  width:7px;
  height:7px;
  margin-right:7px;
  border-radius:50%;
  background:#0d9b67;
  box-shadow:0 0 0 3px rgba(13,155,103,.08);
}

@media (max-width:1180px){
  #ad9-dashboard .ad9-dashboard-layout{grid-template-columns:218px minmax(0,1fr);gap:14px}
  #ad9-dashboard .ad9-kpis-six{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width:900px){
  #ad9-dashboard{padding:10px 9px 20px}
  #ad9-dashboard .ad9-dashboard-head{border-radius:14px;margin-bottom:10px}
  #ad9-dashboard .ad9-dashboard-layout{display:block}
  #ad9-dashboard .ad9-sidebar{
    position:static;
    min-height:0;
    margin-bottom:12px;
    padding:7px;
    border-radius:14px;
    overflow:auto;
  }
  #ad9-dashboard .ad9-nav{flex-direction:row;min-width:max-content}
  #ad9-dashboard .ad9-nav-btn{width:auto;min-width:145px;grid-template-columns:28px auto auto}
  #ad9-dashboard .ad9-nav-btn.is-active::before{display:none}
  #ad9-dashboard .ad9-sidebar-label,#ad9-dashboard .ad9-sidebar-note{display:none}
  #ad9-dashboard .ad9-title h1{font-size:26px}
  #ad9-dashboard .ad9-kpis-six{grid-template-columns:repeat(2,minmax(0,1fr))}
  #ad9-dashboard .ad9-modal-dialog{width:100vw;border-radius:18px 0 0 18px;padding:22px 16px}
  .ad9-certificate-modal{padding:10px}
  .ad9-certificate-modal__dialog{width:100%;height:calc(100vh - 20px);border-radius:15px}
}

@media (max-width:620px){
  #ad9-dashboard .ad9-dashboard-head{padding:10px 12px}
  #ad9-dashboard .ad9-dashboard-brand img{max-width:170px}
  #ad9-dashboard .ad9-dashboard-brand>div,#ad9-dashboard .ad9-data-date{display:none}
  #ad9-dashboard .ad9-kpis-six{grid-template-columns:1fr 1fr}
  #ad9-dashboard .ad9-kpi{min-height:104px;padding:14px}
  #ad9-dashboard .ad9-kpi strong{font-size:24px}
  #ad9-dashboard .ad9-title-row{align-items:flex-start;flex-direction:column}
  #ad9-dashboard .ad9-modal-overview,#ad9-dashboard .ad9-modal-metrics-four{grid-template-columns:1fr 1fr}
  .ad9-certificate-modal__header{padding:10px 10px 10px 14px}
  .ad9-certificate-modal__external{display:none}
  .ad9-certificate-modal__title strong{font-size:13px}
  .ad9-certificate-modal__footer{font-size:9px}
}

@media (prefers-reduced-motion:reduce){
  #ad9-dashboard *,
  .ad9-certificate-modal *{animation:none!important;transition:none!important}
}


/* V10.1.0 · Visor limpio: el iframe recibe una vista que contiene solo el certificado. */
.ad9-certificate-modal__viewer{background:#eef2f6}
.ad9-certificate-modal__iframe{background:#eef2f6}
.ad9-certificate-modal__footer{display:none!important}
.ad9-certificate-modal__dialog{height:min(860px,94vh)}


/* ==========================================================
   V10.1.0 · CERTIFICACIÓN EN FORMATO CALENDARIO
   ========================================================== */
#ad9-dashboard .ad9-cert-title-block{margin-bottom:18px}
#ad9-dashboard .ad9-cert-calendar-overview{
  display:grid;
  grid-template-columns:220px 220px minmax(280px,1fr);
  gap:10px;
  margin-bottom:12px;
}
#ad9-dashboard .ad9-cert-calendar-stat,
#ad9-dashboard .ad9-cert-calendar-selected{
  min-height:92px;
  padding:15px 16px;
  border:1px solid #e1e8ef;
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 16px rgba(15,39,72,.025);
}
#ad9-dashboard .ad9-cert-calendar-stat span,
#ad9-dashboard .ad9-cert-calendar-selected span{
  display:block;
  color:#7b8798;
  font-size:10px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}
#ad9-dashboard .ad9-cert-calendar-stat strong{
  display:block;
  margin-top:5px;
  color:#183452;
  font-size:27px;
  line-height:1;
  letter-spacing:-.04em;
}
#ad9-dashboard .ad9-cert-calendar-stat small,
#ad9-dashboard .ad9-cert-calendar-selected small{
  display:block;
  margin-top:7px;
  color:#93a0af;
  font-size:10px;
}
#ad9-dashboard .ad9-cert-calendar-selected{
  background:linear-gradient(135deg,#f8fbff,#fff);
}
#ad9-dashboard .ad9-cert-calendar-selected strong{
  display:block;
  margin-top:6px;
  color:#175fa8;
  font-size:18px;
}

#ad9-dashboard .ad9-cert-calendar-months{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}
#ad9-dashboard .ad9-cert-month-card{
  position:relative;
  min-height:132px;
  overflow:hidden;
  padding:0 15px 14px;
  border:1px solid #dfe7ef;
  border-radius:15px;
  background:#fff;
}
#ad9-dashboard .ad9-cert-month-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:4px;
  background:#dce5ee;
}
#ad9-dashboard .ad9-cert-month-card:hover{
  transform:translateY(-2px);
  border-color:#a8c7e5;
  box-shadow:0 10px 25px rgba(15,61,110,.08);
}
#ad9-dashboard .ad9-cert-month-card.is-active{
  border-color:#78afe2;
  background:linear-gradient(180deg,#f4f9ff,#fff 70%);
  box-shadow:0 12px 28px rgba(23,107,204,.10),inset 0 0 0 1px rgba(23,107,204,.06);
}
#ad9-dashboard .ad9-cert-month-card.is-active::before{background:#176bcc}
#ad9-dashboard .ad9-cert-month-top{
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  margin:0 -15px 11px;
  padding:12px 15px 9px;
  border-bottom:1px solid #edf1f5;
  background:#fbfcfe;
}
#ad9-dashboard .ad9-cert-month-top em{
  color:#176bcc;
  font-size:10px;
  font-style:normal;
  font-weight:800;
  letter-spacing:.12em;
}
#ad9-dashboard .ad9-cert-month-top small{margin:0;color:#9aa5b3;font-size:9px}
#ad9-dashboard .ad9-cert-month-card>strong{
  display:block;
  margin:0;
  color:#203650;
  font-size:17px;
  line-height:1.25;
}
#ad9-dashboard .ad9-cert-month-metrics{
  display:flex;
  gap:14px;
  margin-top:11px;
}
#ad9-dashboard .ad9-cert-month-metrics span{
  display:block;
  color:#8793a3;
  font-size:9.5px;
  font-weight:500;
  letter-spacing:0;
  text-transform:none;
}
#ad9-dashboard .ad9-cert-month-metrics b{color:#2d4765;font-size:11px}

#ad9-dashboard .ad9-cert-calendar-card{overflow:hidden}
#ad9-dashboard .ad9-cert-calendar-panels{padding:0}
#ad9-dashboard .ad9-cert-month-panel{display:none}
#ad9-dashboard .ad9-cert-month-panel.is-active{display:block}
#ad9-dashboard .ad9-cert-month-panel[hidden]{display:none!important}
#ad9-dashboard .ad9-cert-panel-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:15px 18px;
  border-bottom:1px solid #edf1f5;
  background:#fbfcfe;
}
#ad9-dashboard .ad9-cert-panel-heading>div{display:flex;align-items:baseline;gap:10px}
#ad9-dashboard .ad9-cert-panel-heading span{
  color:#176bcc;
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
}
#ad9-dashboard .ad9-cert-panel-heading strong{color:#2b405b;font-size:17px}
#ad9-dashboard .ad9-cert-panel-heading p{margin:0;color:#8995a5;font-size:10.5px}

#ad9-dashboard .ad9-cert-day-list{padding:4px 18px 18px}
#ad9-dashboard .ad9-cert-day-group{
  display:grid;
  grid-template-columns:86px minmax(0,1fr);
  gap:14px;
  padding:16px 0;
  border-bottom:1px solid #edf1f5;
}
#ad9-dashboard .ad9-cert-day-group:last-child{border-bottom:0}
#ad9-dashboard .ad9-cert-day-date{
  align-self:start;
  min-height:83px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border:1px solid #dce7f2;
  border-radius:13px;
  background:linear-gradient(180deg,#f8fbff,#fff);
}
#ad9-dashboard .ad9-cert-day-date strong{color:#163b64;font-size:26px;line-height:1}
#ad9-dashboard .ad9-cert-day-date span{margin-top:4px;color:#176bcc;font-size:9px;font-weight:800;letter-spacing:.1em}
#ad9-dashboard .ad9-cert-day-date small{margin-top:5px;color:#9aa5b3;font-size:8px}
#ad9-dashboard .ad9-cert-day-events{display:grid;gap:9px}
#ad9-dashboard .ad9-cert-event-card{
  display:grid;
  grid-template-columns:minmax(220px,.85fr) minmax(280px,1.15fr) auto;
  align-items:center;
  gap:16px;
  padding:13px 14px;
  border:1px solid #e4eaf0;
  border-radius:12px;
  background:#fff;
  box-shadow:0 2px 8px rgba(15,39,72,.02);
}
#ad9-dashboard .ad9-cert-event-card:hover{border-color:#bfd6eb;background:#fcfdff}
#ad9-dashboard .ad9-cert-event-person{display:flex;align-items:center;gap:11px;min-width:0}
#ad9-dashboard .ad9-cert-event-avatar{
  flex:0 0 37px;
  width:37px;
  height:37px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#eaf4ff;
  color:#1762ad;
  font-size:10px;
  font-weight:800;
}
#ad9-dashboard .ad9-cert-event-person>div,
#ad9-dashboard .ad9-cert-event-course{min-width:0}
#ad9-dashboard .ad9-cert-event-person strong,
#ad9-dashboard .ad9-cert-event-course strong{
  display:block;
  overflow:hidden;
  color:#31465f;
  font-size:11px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#ad9-dashboard .ad9-cert-event-person small,
#ad9-dashboard .ad9-cert-event-course small{
  display:block;
  margin-top:3px;
  color:#8a97a8;
  font-size:9px;
  line-height:1.35;
}
#ad9-dashboard .ad9-cert-event-course>span{
  display:block;
  margin-bottom:3px;
  color:#a0a9b6;
  font-size:7.5px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
}
#ad9-dashboard .ad9-cert-event-card .ad9-cert-view-link{
  flex:0 0 auto;
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}
#ad9-dashboard .ad9-cert-calendar-empty{
  min-height:260px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:35px 20px;
  text-align:center;
}
#ad9-dashboard .ad9-cert-calendar-empty-icon{
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:12px;
  border:1px solid #dae5ef;
  border-radius:14px;
  background:#f7faff;
  color:#5c87b3;
  font-size:22px;
}
#ad9-dashboard .ad9-cert-calendar-empty strong{color:#3b5069;font-size:13px}
#ad9-dashboard .ad9-cert-calendar-empty span{max-width:430px;margin-top:6px;color:#8b97a7;font-size:10px;line-height:1.5}

/* Popup más limpio: curso + cerrar. */
.ad9-certificate-modal__header{min-height:56px;padding:9px 12px 9px 18px}
.ad9-certificate-modal__title strong{font-size:14px}
.ad9-certificate-modal__eyebrow,
.ad9-certificate-modal__external{display:none!important}
.ad9-certificate-modal__actions{gap:0}

@media (max-width:1100px){
  #ad9-dashboard .ad9-cert-calendar-overview{grid-template-columns:1fr 1fr}
  #ad9-dashboard .ad9-cert-calendar-selected{grid-column:1/-1}
  #ad9-dashboard .ad9-cert-event-card{grid-template-columns:minmax(190px,.85fr) minmax(230px,1.15fr) auto}
}
@media (max-width:820px){
  #ad9-dashboard .ad9-cert-calendar-months{grid-template-columns:1fr 1fr}
  #ad9-dashboard .ad9-cert-event-card{grid-template-columns:1fr;gap:10px}
  #ad9-dashboard .ad9-cert-event-card .ad9-cert-view-link{justify-self:start}
}
@media (max-width:620px){
  #ad9-dashboard .ad9-cert-calendar-overview{grid-template-columns:1fr}
  #ad9-dashboard .ad9-cert-calendar-selected{grid-column:auto}
  #ad9-dashboard .ad9-cert-calendar-months{grid-template-columns:1fr}
  #ad9-dashboard .ad9-cert-day-group{grid-template-columns:62px minmax(0,1fr);gap:9px}
  #ad9-dashboard .ad9-cert-day-date{min-height:72px}
  #ad9-dashboard .ad9-cert-day-date strong{font-size:22px}
  #ad9-dashboard .ad9-cert-panel-heading{align-items:flex-start;flex-direction:column;gap:5px}
}

/* ============================================================
   V10.2.0 · FICHA 360 EN POPUP + TIMELINE PROFESIONAL
   ============================================================ */

/* La Ficha 360 usa las mismas proporciones del visor de certificado. */
#ad9-dashboard .ad9-modal{
  z-index:2147482000;
  align-items:center;
  justify-content:center;
  padding:22px;
}
#ad9-dashboard .ad9-modal-backdrop{
  background:rgba(7,20,37,.68);
  backdrop-filter:blur(8px) saturate(115%);
}
#ad9-dashboard .ad9-modal-dialog{
  width:min(1180px,96vw);
  height:min(900px,94vh);
  max-width:none;
  max-height:none;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:0;
  border:1px solid rgba(255,255,255,.72);
  border-radius:20px;
  background:#fff;
  box-shadow:0 35px 100px rgba(5,19,35,.34);
  animation:ad9FichaIn .2s ease both;
}
@keyframes ad9FichaIn{
  from{opacity:0;transform:translateY(12px) scale(.985)}
  to{opacity:1;transform:none}
}
#ad9-dashboard #ad9-modal-content{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:30px 32px 34px;
  scrollbar-width:thin;
  scrollbar-color:#cbd8e5 transparent;
}
#ad9-dashboard #ad9-modal-content::-webkit-scrollbar{display:block;width:8px}
#ad9-dashboard #ad9-modal-content::-webkit-scrollbar-thumb{background:#cbd8e5;border-radius:999px}
#ad9-dashboard #ad9-modal-content::-webkit-scrollbar-track{background:transparent}
#ad9-dashboard .ad9-modal-close{
  z-index:5;
  top:18px;
  right:18px;
  width:40px;
  height:40px;
  border-radius:11px;
  background:#fff;
  box-shadow:0 3px 12px rgba(15,39,72,.06);
}
#ad9-dashboard .ad9-modal-title{
  min-height:72px;
  padding:0 58px 20px 0;
  border-bottom:1px solid #e6edf4;
}
#ad9-dashboard .ad9-modal-title h2{font-size:26px;letter-spacing:-.025em}
#ad9-dashboard .ad9-modal-title p{font-size:12px}
#ad9-dashboard .ad9-modal-overview{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:20px 0 24px;
}
#ad9-dashboard .ad9-modal-overview>div{
  min-height:78px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:15px 16px;
  border-radius:13px;
}
#ad9-dashboard .ad9-modal-overview span{font-size:11px}
#ad9-dashboard .ad9-modal-overview strong{font-size:22px}
#ad9-dashboard .ad9-modal-stage-title{
  margin:4px 0 11px;
  font-size:9px;
  letter-spacing:.12em;
}
#ad9-dashboard .ad9-modal-row{
  margin-bottom:14px;
  padding:18px;
  border-radius:14px;
  box-shadow:0 4px 16px rgba(15,39,72,.035);
}
#ad9-dashboard .ad9-modal-row-head{margin-bottom:12px}
#ad9-dashboard .ad9-modal-row-head strong{font-size:13px;line-height:1.4;color:#2b3f58}
#ad9-dashboard .ad9-modal-course-label{font-size:9px!important;letter-spacing:.1em}
#ad9-dashboard .ad9-modal-metrics{gap:10px}
#ad9-dashboard .ad9-modal-metrics>div{padding:11px 12px;border-radius:10px}
#ad9-dashboard .ad9-modal-metrics span{font-size:10px}
#ad9-dashboard .ad9-modal-metrics strong{font-size:12.5px}

/* El estado se comunica una sola vez dentro del bloque Resultado. */
#ad9-dashboard .ad9-modal-row-head>.ad9-status{display:none!important}

/* Línea de tiempo del curso: stepper más legible y jerárquico. */
#ad9-dashboard .ad9-timeline{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:0;
  margin:18px 2px 0;
  padding:0 4px 2px;
}
#ad9-dashboard .ad9-timeline-step{
  position:relative;
  min-width:0;
  padding:0 5px;
  text-align:center;
  color:#94a1b2;
  font-size:10px;
  line-height:1.3;
}
#ad9-dashboard .ad9-timeline-step::before{display:none}
#ad9-dashboard .ad9-timeline-step::after{
  content:"";
  position:absolute;
  z-index:0;
  top:15px;
  left:50%;
  width:100%;
  height:2px;
  background:#e2e9f0;
}
#ad9-dashboard .ad9-timeline-step:last-child::after{display:none}
#ad9-dashboard .ad9-timeline-step.is-done::after{
  background:linear-gradient(90deg,#16a373,#43c495);
}
#ad9-dashboard .ad9-timeline-dot{
  position:relative;
  z-index:2;
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 8px;
  border:2px solid #dce5ee;
  border-radius:50%;
  background:#fff;
  color:#98a5b5;
  font-size:10px;
  font-weight:800;
  box-shadow:0 0 0 4px #fff;
}
#ad9-dashboard .ad9-timeline-label{
  display:block;
  min-height:26px;
  font-weight:650;
  white-space:normal;
}
#ad9-dashboard .ad9-timeline-step.is-done{color:#3e5a50}
#ad9-dashboard .ad9-timeline-step.is-done .ad9-timeline-dot{
  border-color:#16a373;
  background:#16a373;
  color:#fff;
  box-shadow:0 0 0 4px #fff,0 4px 12px rgba(22,163,115,.18);
}
#ad9-dashboard .ad9-timeline-step.is-current{color:#225b9b}
#ad9-dashboard .ad9-timeline-step.is-current .ad9-timeline-dot{
  border-color:#2879cf;
  background:#eef6ff;
  color:#176bcc;
  box-shadow:0 0 0 4px #fff,0 0 0 7px rgba(23,107,204,.08);
}
#ad9-dashboard .ad9-timeline-step.is-pending .ad9-timeline-dot{background:#f8fafc}

/* Regreso contextual desde el certificado a Ficha 360°. */
.ad9-certificate-modal__back{
  display:none;
  height:38px;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 13px;
  border:1px solid #cfe0f0;
  border-radius:10px;
  background:#f7fbff;
  color:#145fae;
  font:700 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
.ad9-certificate-modal.has-ficha .ad9-certificate-modal__back{display:inline-flex}
.ad9-certificate-modal__back:hover{
  transform:translateY(-1px);
  border-color:#8ebbe7;
  background:#eef7ff;
  box-shadow:0 7px 16px rgba(23,107,204,.08);
}
.ad9-certificate-modal__back span{font-size:15px;line-height:1}

@media (max-width:900px){
  #ad9-dashboard .ad9-modal{padding:10px}
  #ad9-dashboard .ad9-modal-dialog{
    width:100%;
    height:calc(100vh - 20px);
    border-radius:15px;
  }
  #ad9-dashboard #ad9-modal-content{padding:24px 18px 28px}
  #ad9-dashboard .ad9-modal-overview{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width:620px){
  #ad9-dashboard .ad9-modal-title h2{font-size:21px}
  #ad9-dashboard .ad9-modal-overview{grid-template-columns:1fr 1fr}
  #ad9-dashboard .ad9-modal-overview>div:last-child{grid-column:1/-1}
  #ad9-dashboard .ad9-modal-metrics-four{grid-template-columns:1fr 1fr}
  #ad9-dashboard .ad9-timeline{overflow-x:auto;grid-template-columns:repeat(5,minmax(88px,1fr));padding-bottom:8px}
  .ad9-certificate-modal__back{width:38px;padding:0;font-size:0}
  .ad9-certificate-modal__back span{font-size:17px}
}

/* ============================================================
   V10.2.1 · MODAL ÚNICO FICHA 360 + CERTIFICADO
   ============================================================ */

/* El mismo #ad9-modal cambia de contenido; nunca se apila otro popup. */
#ad9-dashboard .ad9-modal.ad9-modal--certificate #ad9-modal-content{
  padding:0!important;
  overflow:hidden!important;
  background:#f2f6fa;
}

#ad9-dashboard .ad9-modal.ad9-modal--certificate .ad9-modal-dialog{
  width:min(1180px,96vw);
  height:min(900px,94vh);
}

#ad9-dashboard .ad9-unified-certificate{
  width:100%;
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  background:#f2f6fa;
}

#ad9-dashboard .ad9-unified-certificate__header{
  flex:0 0 auto;
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 66px 10px 18px;
  border-bottom:1px solid #e3eaf1;
  background:#fff;
}

#ad9-dashboard .ad9-unified-certificate__title{
  min-width:0;
  overflow:hidden;
  color:#263c57;
  font-size:14px;
  font-weight:750;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#ad9-dashboard .ad9-unified-certificate__back{
  flex:0 0 auto;
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 13px;
  border:1px solid #cfe0f0;
  border-radius:10px;
  background:#f7fbff;
  color:#145fae;
  font:700 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
#ad9-dashboard .ad9-unified-certificate__back:hover{
  transform:translateY(-1px);
  border-color:#8ebbe7;
  background:#eef7ff;
  box-shadow:0 7px 16px rgba(23,107,204,.08);
}
#ad9-dashboard .ad9-unified-certificate__back span{font-size:15px;line-height:1}

#ad9-dashboard .ad9-unified-certificate__viewer{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  background:#edf3f8;
}

#ad9-dashboard .ad9-unified-certificate__iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  opacity:0;
  background:#edf3f8;
  transition:opacity .16s ease;
}
#ad9-dashboard .ad9-unified-certificate__viewer.is-loaded .ad9-unified-certificate__iframe{opacity:1}

#ad9-dashboard .ad9-unified-certificate__loader{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  color:#7e8c9d;
  font-size:11px;
  background:#f3f7fa;
  transition:opacity .15s ease,visibility .15s ease;
}
#ad9-dashboard .ad9-unified-certificate__loader span{
  width:28px;
  height:28px;
  border:3px solid #d7e4ef;
  border-top-color:#2375c5;
  border-radius:50%;
  animation:ad9UnifiedCertSpin .8s linear infinite;
}
#ad9-dashboard .ad9-unified-certificate__loader em{font-style:normal}
#ad9-dashboard .ad9-unified-certificate__viewer.is-loaded .ad9-unified-certificate__loader{
  opacity:0;
  visibility:hidden;
}
@keyframes ad9UnifiedCertSpin{to{transform:rotate(360deg)}}

/* Calendario: fecha perfectamente centrada dentro de su caja. */
#ad9-dashboard .ad9-cert-day-date{
  width:100%;
  box-sizing:border-box;
  text-align:center!important;
  place-self:center center;
}
#ad9-dashboard .ad9-cert-day-date strong,
#ad9-dashboard .ad9-cert-day-date span,
#ad9-dashboard .ad9-cert-day-date small{
  width:100%;
  display:block;
  text-align:center!important;
}

@media (max-width:620px){
  #ad9-dashboard .ad9-unified-certificate__header{padding-left:13px;padding-right:58px}
  #ad9-dashboard .ad9-unified-certificate__title{font-size:12px}
  #ad9-dashboard .ad9-unified-certificate__back{width:38px;padding:0;font-size:0}
  #ad9-dashboard .ad9-unified-certificate__back span{font-size:17px}
}


/* ============================================================
   V10.2.2 · ALINEACIÓN CALENDARIO + CONTROLES DEL VISOR
   ============================================================ */

/* La caja de fecha queda centrada respecto de toda la altura del grupo del día. */
#ad9-dashboard .ad9-cert-day-date{
  align-self:center!important;
  justify-self:center!important;
  place-self:center center!important;
}

/* En modo certificado, la X comparte la misma línea visual que Volver a Ficha 360°. */
#ad9-dashboard .ad9-modal.ad9-modal--certificate .ad9-modal-close{
  top:10px!important;
  right:14px!important;
  width:38px!important;
  height:38px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
}

#ad9-dashboard .ad9-modal.ad9-modal--certificate .ad9-unified-certificate__header{
  min-height:58px;
  padding-top:10px;
  padding-bottom:10px;
}

#ad9-dashboard .ad9-modal.ad9-modal--certificate .ad9-unified-certificate__back{
  height:38px;
  min-height:38px;
}
