/* V7 - corrección de diálogo centrado + dashboard real. Cargar al final del CSS de administración. */
/* Tailwind Preflight restablece margin:0 incluso en dialog. showModal() abre la capa
   superior, pero sin margin:auto queda anclado en la esquina superior izquierda. */
html body dialog.gd-modal[open]{
  position:fixed!important;
  inset:0!important;
  margin:auto!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  width:min(450px,calc(100vw - 32px));
  max-width:calc(100vw - 32px);
  max-height:calc(100dvh - 32px);
  overflow:auto;
  box-sizing:border-box;
  border:1px solid var(--gd-stroke,#d9e7dd);
  border-radius:22px;
  color:var(--gd-text,#203729);
  background:var(--gd-surface,#fff);
  box-shadow:0 24px 90px rgba(0,22,10,.40);
}
html body dialog.gd-modal:not([open]){display:none}
html body dialog.gd-modal::backdrop{background:rgba(3,24,15,.67);backdrop-filter:blur(5px)}
.gd-modal .gd-modal-card{width:100%;padding:clamp(20px,4vw,30px)}
html[data-gd-theme="dark"] body dialog.gd-modal[open]{background:var(--gd-surface,#172b24);color:var(--gd-text,#f0faf3);border-color:var(--gd-stroke,#385449)}
html[data-gd-theme="dark"] .gd-modal-cancel{background:var(--gd-surface-soft);color:var(--gd-text);border-color:var(--gd-stroke)}
@media(max-width:520px){html body dialog.gd-modal[open]{width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:18px}.gd-modal .gd-modal-card{padding:21px 18px}.gd-modal .gd-modal-actions{flex-direction:column-reverse}.gd-modal .gd-modal-actions button{width:100%;min-height:46px}}
/* Dashboard: todas las cifras provienen del controlador, no existen datos demo. */
.gd-overview{display:grid;gap:22px;max-width:1650px;width:100%;color:var(--gd-text)}
.gd-overview-hero{min-height:190px;display:flex;justify-content:space-between;align-items:center;gap:18px;overflow:hidden;border-radius:23px;padding:clamp(22px,3vw,35px);color:#fff;background:radial-gradient(circle at 91% 18%,#58d98155,transparent 32%),linear-gradient(112deg,#073d25,#0c9a39 76%);box-shadow:0 17px 48px #00452420;position:relative}
.gd-overview-hero>div:first-child{position:relative;z-index:1}
.gd-overview-eyebrow{font-weight:850;letter-spacing:.12em;text-transform:uppercase;font-size:10px;color:#e3ffeb;display:flex;align-items:center;gap:7px}
.gd-live-dot{display:inline-block;width:8px;height:8px;background:#ffed00;border-radius:50%;box-shadow:0 0 0 4px #ffed002e}
.gd-overview-hero h2{font-size:clamp(27px,3.4vw,43px);font-weight:900;line-height:1.12;letter-spacing:-.045em;margin:13px 0 10px;color:#fff}
.gd-overview-hero h2 span{color:#ffed00}
.gd-overview-hero p{color:#e3f6e8;line-height:1.65;font-size:13px;max-width:720px;margin:0 0 15px}
.gd-overview-role{display:inline-flex;border:1px solid #c3ffd969;color:#eefff2;background:#ffffff15;padding:7px 12px;border-radius:40px;font-size:11px;font-weight:800}
.gd-hero-mark{flex:0 0 145px;width:145px;height:145px;border:1px solid #ffffff48;border-radius:38px;display:grid;place-items:center;transform:rotate(-13deg);background:#ffffff13;color:#fff;font-size:100px;font-weight:950;letter-spacing:-.13em;opacity:.8}.gd-hero-mark span{font-size:23px;align-self:start;transform:rotate(13deg);margin:16px 25px 0 0;color:#ffed00}
.gd-overview-section{min-width:0}.gd-overview-title{display:flex;flex-wrap:wrap;gap:10px;align-items:end;justify-content:space-between;margin:1px 0 16px}
.gd-overview-title h2,.gd-chart-heading h2{font-size:clamp(18px,2vw,23px);font-weight:900;letter-spacing:-.03em;color:var(--gd-text);line-height:1.25;margin:5px 0 0}
.gd-fresh-label{color:var(--gd-text-muted);font-size:11px;font-weight:700;border:1px solid var(--gd-stroke);padding:7px 10px;border-radius:9px;background:var(--gd-surface)}
.gd-overview-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.gd-overview-metric{border:1px solid var(--gd-stroke);background:var(--gd-surface);border-radius:18px;min-width:0;min-height:165px;padding:20px;box-shadow:var(--gd-shadow);display:flex;flex-direction:column;align-items:flex-start}
.gd-metric-top{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}.gd-metric-icon{width:41px;height:41px;flex:0 0 41px;border-radius:13px;display:grid;place-items:center}.gd-metric-icon .gd-icon{height:20px;width:20px}.gd-icon-green{background:#dbf7e5;color:#087c34}.gd-icon-yellow{background:#fff5cf;color:#9e7416}.gd-icon-blue{background:#e2f0ff;color:#3378bf}.gd-icon-purple{background:#f0e9ff;color:#8050b6}
.gd-metric-caption{font-size:9px;font-weight:900;color:var(--gd-text-muted);letter-spacing:.08em;text-align:right}.gd-overview-metric>strong{font-size:clamp(27px,2.6vw,39px);color:var(--gd-text);font-weight:900;letter-spacing:-.06em;margin:8px 0 0;line-height:1.2}.gd-overview-metric>strong small{font-size:19px}.gd-overview-metric>p{color:var(--gd-text);font-size:12px;font-weight:800;margin:5px 0}.gd-metric-note{color:var(--gd-text-muted);font-size:11px;margin-top:auto;line-height:1.4}.gd-metric-empty{font-size:13px;color:var(--gd-text-muted);min-height:auto}
.gd-overview-visuals{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:16px;align-items:stretch;min-width:0}
.gd-overview-card{min-width:0;background:var(--gd-surface);border:1px solid var(--gd-stroke);box-shadow:var(--gd-shadow);border-radius:20px;padding:clamp(17px,2.2vw,26px)}
.gd-chart-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:18px}.gd-chart-heading>div{min-width:0}.gd-chart-heading p{font-size:11px;line-height:1.5;color:var(--gd-text-muted);margin:5px 0 0}.gd-chart-total{font-size:10px;background:var(--gd-surface-soft);color:var(--gd-text);border:1px solid var(--gd-stroke);border-radius:40px;white-space:nowrap;font-weight:850;padding:8px 10px}
.gd-activity-chart{min-height:222px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:clamp(5px,1.1vw,15px);align-items:end;position:relative;padding:9px 3px 0;border-bottom:1px solid var(--gd-stroke)}
.gd-activity-column{display:flex;align-items:center;flex-direction:column;justify-content:flex-end;gap:7px;min-width:0;height:210px}.gd-activity-count{font-size:11px;font-weight:900;color:var(--gd-text);font-variant-numeric:tabular-nums}.gd-activity-track{height:135px;display:flex;align-items:flex-end;justify-content:center;width:100%;max-width:50px;background:linear-gradient(180deg,transparent,var(--gd-hover));border-radius:8px 8px 0 0;overflow:hidden}.gd-activity-bar{display:block;width:72%;border-radius:7px 7px 0 0;height:var(--gd-bar-height);background:linear-gradient(180deg,#24c658,#0b8c39);transition:height .3s ease}.gd-activity-column:hover .gd-activity-bar{background:linear-gradient(180deg,#ffed00,#baae03)}.gd-activity-day{text-align:center;color:var(--gd-text);font-size:10px;font-weight:850;line-height:1.3}.gd-activity-day small{display:block;color:var(--gd-text-muted);font-weight:500;font-size:9px;margin-top:2px}
.gd-chart-note{font-size:11px;color:var(--gd-text-muted);margin:14px 0 0;line-height:1.5}
.gd-web-chart-body{display:flex;align-items:center;justify-content:center;gap:clamp(16px,2.2vw,33px);margin:23px 0;flex-wrap:wrap}.gd-donut{width:156px;height:156px;border-radius:50%;background:conic-gradient(#0c9a39 0 var(--gd-published),var(--gd-stroke) var(--gd-published) 100%);display:grid;place-items:center;flex:0 0 156px;box-shadow:inset 0 0 0 1px #0c9a3920}.gd-donut-inner{width:116px;height:116px;background:var(--gd-surface);border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px}.gd-donut-inner strong{font-size:28px;font-weight:950;letter-spacing:-.04em;color:var(--gd-text)}.gd-donut-inner span{font-size:10px;color:var(--gd-text-muted);font-weight:800}.gd-web-chart-legend{flex:1;min-width:155px;max-width:235px;display:grid;gap:10px}.gd-web-chart-legend>div{display:flex;align-items:center;gap:9px;font-size:11px;color:var(--gd-text-muted)}.gd-web-chart-legend strong{margin-left:auto;color:var(--gd-text);font-size:12px}.gd-legend-dot{width:9px;height:9px;border-radius:3px}.gd-dot-published{background:#0c9a39}.gd-dot-draft{background:var(--gd-stroke)}.gd-web-chart-legend .gd-legend-total{border-top:1px dashed var(--gd-stroke);padding-top:12px;font-weight:800}
.gd-content-breakdown{display:grid;gap:13px;margin-top:15px}.gd-breakdown-row>div:first-child{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:var(--gd-text-muted);margin-bottom:6px}.gd-breakdown-row strong{color:var(--gd-text);font-variant-numeric:tabular-nums}.gd-breakdown-track{height:7px;border-radius:100px;background:var(--gd-stroke);overflow:hidden}.gd-breakdown-track span{display:block;height:100%;border-radius:100px;background:#0c9a39;transition:width .25s}
.gd-overview-bottom{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;min-width:0}.gd-dash-icon-link{width:40px;height:40px;min-width:40px;display:grid;place-items:center;border:1px solid var(--gd-stroke);border-radius:11px;color:var(--gd-text);background:var(--gd-surface-soft)}.gd-dash-icon-link:hover{border-color:#0c9a39;color:#0c9a39}.gd-dash-icon-link:focus-visible,.gd-quick-link:focus-visible{outline:3px solid #0c9a39;outline-offset:2px}
.gd-account-list{display:grid;gap:16px;margin-top:24px}.gd-account-row>div:first-child{display:flex;align-items:center;gap:9px;margin-bottom:7px;font-size:12px;font-weight:800;color:var(--gd-text)}.gd-account-row strong{margin-left:auto;font-variant-numeric:tabular-nums}.gd-state-dot{height:10px;width:10px;border-radius:4px;flex-shrink:0}.gd-state-dot.gd-state-activo{background:#0c9a39}.gd-state-dot.gd-state-suspendido{background:#dba42b}.gd-state-dot.gd-state-bloqueado{background:#d45b56}.gd-account-track{height:8px;background:var(--gd-stroke);border-radius:99px;overflow:hidden}.gd-account-fill{height:100%;display:block;border-radius:99px}.gd-account-fill.gd-state-activo{background:#0c9a39}.gd-account-fill.gd-state-suspendido{background:#dba42b}.gd-account-fill.gd-state-bloqueado{background:#d45b56}
.gd-recent-list{display:grid;gap:0}.gd-recent-item{display:flex;align-items:center;gap:11px;min-width:0;padding:11px 0;border-bottom:1px solid var(--gd-stroke)}.gd-recent-item:last-child{border-bottom:none}.gd-recent-icon{height:32px;width:32px;min-width:32px;display:grid;place-items:center;border-radius:10px;background:var(--gd-surface-soft);color:#0c9a39}.gd-recent-icon .gd-icon{height:17px;width:17px}.gd-recent-item>div{flex:1;min-width:0}.gd-recent-item strong{font-size:11px;font-weight:900;display:block;overflow-wrap:anywhere;color:var(--gd-text)}.gd-recent-item p{font-size:10px;color:var(--gd-text-muted);margin:4px 0 0;overflow-wrap:anywhere}.gd-recent-item time{font-size:10px;color:var(--gd-text-muted);white-space:nowrap}
.gd-quick-links{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px}.gd-quick-link{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-width:0;padding:12px;border-radius:12px;border:1px solid var(--gd-stroke);background:var(--gd-surface-soft);color:var(--gd-text);font-size:11px;font-weight:850;min-height:48px}.gd-quick-link>.gd-icon:first-child{color:#0c9a39;width:19px;height:19px}.gd-quick-link>.gd-icon:last-child{height:14px;width:14px;margin-left:auto;opacity:.55}.gd-quick-link:hover{border-color:#0c9a39;background:var(--gd-hover)}.gd-quick-link span{min-width:0;overflow-wrap:anywhere}.gd-overview-footnote{font-size:11px;line-height:1.5;color:var(--gd-text-muted);margin:0}
html[data-gd-theme="dark"] .gd-overview-card,html[data-gd-theme="dark"] .gd-overview-metric{background:var(--gd-surface);border-color:var(--gd-stroke)}
html[data-gd-theme="dark"] .gd-icon-green{background:#204b35;color:#9ff0b6}html[data-gd-theme="dark"] .gd-icon-yellow{background:#554822;color:#ffe287}html[data-gd-theme="dark"] .gd-icon-blue{background:#213f56;color:#93c8ff}html[data-gd-theme="dark"] .gd-icon-purple{background:#413151;color:#d1b0f1}
@media(max-width:1230px){.gd-overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.gd-overview-visuals{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.gd-quick-links{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1050px){.gd-overview-visuals{grid-template-columns:minmax(0,1fr)}.gd-overview-bottom{grid-template-columns:minmax(0,1fr)}}
@media(max-width:620px){.gd-overview{gap:14px}.gd-overview-hero{padding:21px;border-radius:17px;min-height:0}.gd-overview-hero p{font-size:12px}.gd-hero-mark{display:none}.gd-overview-metrics{gap:9px}.gd-overview-metric{padding:13px;min-height:148px;border-radius:14px}.gd-metric-top{align-items:flex-start;flex-direction:column;gap:5px}.gd-metric-icon{width:32px;height:32px;flex-basis:32px;border-radius:10px}.gd-metric-icon .gd-icon{width:17px;height:17px}.gd-metric-caption{text-align:left;font-size:8px}.gd-overview-metric>strong{font-size:29px}.gd-overview-card{border-radius:15px;padding:16px}.gd-activity-chart{gap:5px}.gd-activity-track{height:108px}.gd-activity-column{height:180px}.gd-quick-links{grid-template-columns:repeat(2,minmax(0,1fr))}.gd-quick-link{padding:9px}.gd-chart-heading{flex-wrap:wrap}}
@media(max-width:370px){.gd-overview-metrics{grid-template-columns:minmax(0,1fr)}.gd-quick-links{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.gd-activity-bar,.gd-breakdown-track span{transition:none}}
