/* Panel de administracion de Academia Ateneo */
.adm { padding: 28px 0 40px; }
.adm-state { text-align: center; padding: 60px 16px; color: var(--muted); }
.adm-state a { margin-top: 16px; }
.adm-tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg2); border-radius: 12px; margin: 14px 0 22px; overflow-x: auto; }
.adm-tabs button { flex: 1 0 auto; min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.adm-tabs button[aria-selected="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
.adm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.adm-bar .sub { margin: 0; color: var(--muted); }
.adm-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-filters { display: flex; gap: 10px; flex-wrap: wrap; flex: 1 1 340px; }
.adm-filters .at-input { flex: 1 1 180px; width: auto; }

/* Resumen */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.adm-stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.adm-stat b { display: block; font-family: var(--font-title); font-size: 1.7rem; line-height: 1.2; }
.adm-stat span { color: var(--muted); font-size: .9rem; }
.adm-note { margin: 18px 0 0; color: var(--muted); font-size: .9rem; }

/* Listas (filas que se apilan en el telefono) */
.adm-list { display: grid; gap: 10px; }
.adm-row { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.adm-row .main { min-width: 0; }
.adm-row .main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-row .main small, .adm-row .cell small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-row .cell { min-width: 0; font-size: .92rem; }
.adm-row .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.adm-row .cell .at-progress { margin: 4px 0; }
.adm-code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; font-weight: 600; }
.adm-empty { padding: 30px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.adm-nota { color: var(--muted); font-size: .88rem; margin: 12px 0 0; }
.at-chip.warn { color: #e0a63a; border-color: color-mix(in srgb, #e0a63a 50%, var(--line)); }
.at-chip.off { color: var(--muted); }

/* Cursos agrupados por categoria, en el orden de la portada, con flechas para ordenar */
.adm-orden-nota { margin: 0; color: var(--muted); font-size: .8rem; }
.adm-cat { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; font-family: var(--font-title); font-size: .95rem; font-weight: 600; line-height: 1.3; }
.adm-cat span { color: var(--muted); font-family: var(--font-body); font-size: .74rem; font-weight: 500; }
.adm-row.curso { grid-template-columns: auto minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)) auto; }
.adm-orden { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.adm-orden button { width: 28px; height: 20px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); font-size: .6rem; line-height: 1; cursor: pointer; }
.adm-orden button:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.adm-orden button[disabled] { opacity: .3; cursor: default; }
.adm-orden span { font-size: .7rem; font-weight: 600; color: var(--muted); line-height: 1.3; }
@media (max-width: 760px) {
  .adm-row.curso { grid-template-columns: auto 1fr 1fr; }
  .adm-row.curso .main { grid-column: 2 / -1; }
  /* En celular las flechas quedan al lado del titulo, una junto a la otra */
  .at-zona .adm-row.curso .main { flex: 1 1 calc(100% - 100px); }
  .at-zona .adm-row.curso .main b { white-space: normal; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
  .at-zona .adm-row.curso .adm-orden { flex-direction: row; gap: 4px; }
  .at-zona .adm-row.curso .adm-orden span { min-width: 12px; text-align: center; }
  .at-zona .adm-orden button { width: 30px; height: 28px; }
}

/* Formularios */
.adm-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adm-ta { min-height: 96px; padding: 10px 14px; resize: vertical; line-height: 1.5; }
.adm-check { display: flex !important; flex-direction: row; align-items: center; gap: 10px; color: var(--fg) !important; }
.adm-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.adm-hint { display: block; color: var(--muted); font-size: .82rem; }
.at-form select.at-input { appearance: auto; }
.adm-copy { background: var(--bg2); border: 1px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; margin: 4px 0 0; }
.adm-copy .adm-code { font-size: 1.3rem; display: block; margin-bottom: 8px; }

@media (max-width: 760px) {
  .adm-row { grid-template-columns: 1fr 1fr; }
  .adm-row .main, .adm-row .acts { grid-column: 1 / -1; }
  .adm-row .acts { justify-content: flex-start; }
  .adm-2 { grid-template-columns: 1fr; }
}

/* Portada del curso: vista previa + selector de archivo */
.adm-portada { display: grid; gap: 6px; }
.adm-lbl { font-size: .9rem; color: var(--muted); }
.adm-portada-row { display: flex; gap: 12px; align-items: center; }
.adm-prev { flex: 0 0 120px; aspect-ratio: 16 / 9; border-radius: 10px; border: 1px dashed var(--line); background: var(--bg2) center / cover no-repeat; }
.adm-prev.has { border-style: solid; }
.adm-portada-ctl { flex: 1; min-width: 0; display: grid; gap: 6px; }
.adm-portada-ctl input[type=file] { padding: 8px 10px; min-height: 0; font-size: .85rem; }
@media (max-width: 560px) { .adm-portada-row { flex-direction: column; align-items: stretch; } .adm-prev { flex: none; width: 100%; max-width: 280px; } }
.adm-portada-ctl .at-linkbtn { justify-self: start; }

/* ===== Panel tipo dashboard (2-dic-2026), version sobria: menu lateral con iconos, tarjetas de cristal, texto pequeno y pesos livianos ===== */
body.adm-body {
  --glass: color-mix(in srgb, var(--card) 62%, transparent);
  --glass-b: color-mix(in srgb, var(--line) 70%, transparent);
  --sombra: 0 4px 22px rgba(0, 0, 0, .22);
  background:
    radial-gradient(1100px 600px at 92% -8%, rgba(46, 230, 214, .08), transparent 60%),
    radial-gradient(900px 640px at 0% 100%, rgba(30, 107, 230, .11), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
html[data-theme="light"] body.adm-body {
  --sombra: 0 4px 22px rgba(20, 70, 140, .07);
  background:
    radial-gradient(1100px 620px at 92% -8%, rgba(96, 175, 255, .30), transparent 60%),
    radial-gradient(900px 640px at 0% 100%, rgba(110, 215, 225, .26), transparent 55%),
    linear-gradient(180deg, #f1f7ff, #e8f2fb);
  background-attachment: fixed;
}
body.adm-body .adm.adm-full { max-width: none; padding: 14px 16px 26px; }
body.adm-body .adm-main b, body.adm-body .adm-main strong, body.adm-body .adm-side b { font-weight: 500; }
.adm-shell { display: grid; grid-template-columns: 206px minmax(0, 1fr); gap: 18px; align-items: start; max-width: 1680px; margin: 0 auto; }
.adm-main { min-width: 0; }

/* Menu lateral */
.adm-side { position: sticky; top: 14px; height: calc(100vh - 28px); min-height: 520px; display: flex; flex-direction: column; padding: 16px 10px 14px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-b); box-shadow: var(--sombra); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); }
.adm-logo { display: block; padding: 2px 10px 14px; margin-bottom: 12px; border-bottom: 1px solid var(--glass-b); }
.adm-logo img { width: 100%; max-width: 128px; height: auto; margin: 0 auto; }
.adm-logo .only-light { display: none; }
html[data-theme="light"] .adm-logo .only-dark { display: none; }
html[data-theme="light"] .adm-logo .only-light { display: block; }
html:not([data-theme="light"]) .adm-logo .only-dark { display: block; }
.adm-nav-t { margin: 0 10px 8px; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; opacity: .8; }
.adm-nav { display: flex; flex-direction: column; gap: 3px; }
.adm-nav button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px 4px 6px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-family: var(--font-body); font-weight: 500; font-size: .84rem; cursor: pointer; text-align: left; white-space: nowrap; transition: background .15s, color .15s; }
.adm-nav .ico { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); background: color-mix(in srgb, var(--fg) 5%, transparent); border: 1px solid transparent; transition: background .15s, color .15s; }
.adm-nav .ico svg { width: 16px; height: 16px; }
.adm-nav button:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 4%, transparent); }
.adm-nav button[aria-selected="true"] { color: var(--fg); background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent); }
.adm-nav button[aria-selected="true"] .ico { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.adm-side-pie { margin: auto 6px 0; padding-top: 12px; text-align: center; font-size: .66rem; line-height: 1.5; color: var(--muted); opacity: .75; }

/* Barra superior */
.adm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 2px 14px; }
.adm-hoy { margin: 0 0 2px; font-size: .64rem; letter-spacing: .16em; color: var(--muted); font-weight: 500; }
.adm-h { margin: 0; font-family: var(--font-body); font-size: 1.12rem; line-height: 1.3; font-weight: 500; letter-spacing: -.005em; }
.adm-top-acts { display: flex; align-items: center; gap: 6px; }
.adm-top-acts .at-btn, .adm-top-acts .at-theme { border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); font-weight: 500; font-size: .78rem; }
.adm-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 500; font-size: .74rem; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.adm-avatar.sm { width: 30px; height: 30px; font-size: .68rem; }

/* Etiquetas de autor: el primero azul, el segundo amarillo (clases c0 / c1); sin autor, gris */
.adm-tag { display: inline-flex; align-items: center; max-width: 100%; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 500; line-height: 1.6; white-space: nowrap; }
.adm-tag.c0 { color: #93c5fd; background: rgba(59, 130, 246, .13); border-color: rgba(59, 130, 246, .42); }
.adm-tag.c1 { color: #fde047; background: rgba(234, 179, 8, .11); border-color: rgba(234, 179, 8, .42); }
html[data-theme="light"] .adm-tag.c0 { color: #1d4ed8; background: rgba(59, 130, 246, .10); }
html[data-theme="light"] .adm-tag.c1 { color: #854d0e; background: rgba(234, 179, 8, .17); }

/* Tarjetas */
body.adm-body .adm-stat { background: var(--glass); border: 1px solid var(--glass-b); border-radius: 16px; padding: 11px 14px; box-shadow: var(--sombra); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
body.adm-body .adm-stat b { font-family: var(--font-title); font-weight: 500; font-size: 1.22rem; line-height: 1.2; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-stat-t { display: block; color: var(--muted); font-size: .72rem; margin-bottom: 1px; font-weight: 400; }
.adm-stat-s { display: block; color: var(--muted); font-size: .68rem; margin-top: 1px; opacity: .85; }
.adm-kpi { display: flex; align-items: center; gap: 12px; }
.adm-kpi-c { min-width: 0; }
.adm-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .14); }
.adm-ico svg { width: 17px; height: 17px; }
.adm-ico.t-teal { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.adm-ico.t-blue { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.adm-ico.t-ok { background: linear-gradient(135deg, #4ade80, #16a34a); }
.adm-ico.t-pend { background: linear-gradient(135deg, #fbbf24, #ea8a00); }
.adm-ico.t-violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.adm-kpis, .adm-autores { margin-bottom: 10px; }
.adm-kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.adm-kpis-2 { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.adm-autores { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.adm-autor.c0 { border-left: 3px solid #3b82f6; }
.adm-autor.c1 { border-left: 3px solid #eab308; }
.adm-autor-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.adm-autor-pie { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--glass-b); font-size: .7rem; color: var(--muted); }
.adm-note { margin: 2px 2px 10px; font-size: .74rem; color: var(--muted); }
.adm-cat { display: flex; align-items: baseline; gap: 8px; margin: 16px 2px 8px; font-family: var(--font-body); font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.adm-cat span { font-size: .68rem; letter-spacing: 0; text-transform: none; opacity: .85; }
.adm-cat-1 { margin-top: 2px; }

/* Tarjetas de grafico */
.adm-dash3 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
@media (max-width: 1240px) { .adm-dash3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .adm-dash3 { grid-template-columns: minmax(0, 1fr); } }
.adm-card { background: var(--glass); border: 1px solid var(--glass-b); border-radius: 18px; padding: 14px 16px; box-shadow: var(--sombra); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); min-width: 0; }
.adm-card h3 { margin: 0; font-family: var(--font-body); font-size: .86rem; font-weight: 500; }
.adm-card-s { margin: 1px 0 10px; color: var(--muted); font-size: .7rem; }
.adm-card h3 + .adm-bars, .adm-card h3 + .adm-mini { margin-top: 10px; }
.adm-donut-w { display: flex; flex-direction: column; gap: 12px; }
.adm-donut { position: relative; width: 124px; height: 124px; margin: 0 auto; }
.adm-donut svg { width: 100%; height: 100%; }
.adm-donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.adm-donut-c b { font-family: var(--font-title); font-weight: 500; font-size: 1.2rem; line-height: 1.1; }
.adm-donut-c span { font-size: .66rem; color: var(--muted); }
.adm-lg { display: grid; gap: 6px; }
.adm-lg-f { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 36px; align-items: center; gap: 8px; font-size: .78rem; }
.adm-lg-f .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.adm-lg-f .p { color: var(--muted); font-size: .7rem; text-align: right; }
.sq { display: inline-block; width: 8px; height: 8px; border-radius: 3px; }
.adm-hb { display: grid; grid-template-columns: 10px minmax(0, 1.25fr) minmax(56px, 1fr) 24px; align-items: center; gap: 9px; padding: 6px 0; font-size: .8rem; }
.adm-hb .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-hb .pista { height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 8%, transparent); overflow: hidden; }
.adm-hb .pista i { display: block; height: 100%; border-radius: 99px; }
.adm-hb b { text-align: right; font-size: .8rem; }
.adm-bars { display: flex; align-items: stretch; gap: 10px; height: 150px; }
.adm-barcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.adm-barcol small { color: var(--muted); font-size: .66rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-barval { min-height: 12px; }
.adm-pila { flex: 1 1 auto; width: 100%; max-width: 38px; display: flex; flex-direction: column-reverse; justify-content: flex-start; align-items: stretch; gap: 2px; min-height: 0; }
.adm-pila .seg { display: block; border-radius: 5px; min-height: 3px; }
.adm-pila .seg.c0 { background: linear-gradient(180deg, #60a5fa, #3b82f6); }
.adm-pila .seg.c1 { background: linear-gradient(180deg, #fde047, #eab308); }
.adm-pila .seg.sin { background: var(--muted); opacity: .5; }
.adm-leyenda { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.adm-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid var(--glass-b); }
.adm-mini:first-of-type { border-top: 0; }
.adm-mini .main { min-width: 0; } .adm-mini .main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.adm-mini .main small, .adm-mini .cell small { display: block; color: var(--muted); font-size: .66rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-mini .cell { text-align: right; font-size: .78rem; }

/* Listas (cursos, codigos) */
body.adm-body .adm-list { gap: 8px; }
body.adm-body .adm-row { background: var(--glass); border: 1px solid var(--glass-b); border-radius: 14px; padding: 9px 14px; font-size: .8rem; box-shadow: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body.adm-body .adm-row .main b { font-size: .84rem; font-weight: 500; }
body.adm-body .adm-row .main small, body.adm-body .adm-row .cell small { font-size: .68rem; }
body.adm-body .adm-row .cell { font-size: .78rem; }
body.adm-body .adm-row.curso { grid-template-columns: auto minmax(0, 2fr) 104px 150px 150px auto; }
.adm-html { display: inline-flex; align-items: center; gap: 4px; width: auto; max-width: 100%; padding: 1px 9px; border-radius: 999px; font-size: .68rem; font-weight: 500; line-height: 1.6; white-space: nowrap; }
.adm-html::before { content: "✓"; font-size: .85em; }
.adm-html.warn::before { content: "!"; }
.adm-row .cell .at-chip, body.adm-body .at-chip { white-space: nowrap; font-size: .68rem; font-weight: 500; padding: 1px 9px; }
@media (max-width: 1100px) { body.adm-body .adm-row.curso { grid-template-columns: auto 1fr 1fr; } body.adm-body .adm-row.curso .main { grid-column: 2 / -1; } }
body.adm-body .adm-bar .sub { font-size: .78rem; }
body.adm-body .adm-orden-nota { font-size: .72rem; }
body.adm-body .adm-main .at-btn { font-weight: 500; font-size: .76rem; }
body.adm-body .adm-main .at-btn-sm { min-height: 30px; padding: 0 12px; }

/* Ventas: filtros, franja de totales filtrados y lista */
.adm-bar-v { align-items: flex-end; margin-bottom: 8px; }
.adm-bar-v .adm-filters-v { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; flex: 1 1 520px; }
.adm-fl { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: .66rem; color: var(--muted); }
.adm-bar-v .adm-filters-v .adm-fl .at-input { width: 100%; min-width: 0; flex: none; height: auto; min-height: 32px; font-size: .78rem; padding-top: 4px; padding-bottom: 4px; }
@media (max-width: 700px) { .adm-bar-v .adm-filters-v { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.adm-sums { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; margin: 0 0 8px; }
.adm-sum { background: var(--glass); border: 1px solid var(--glass-b); border-radius: 12px; padding: 6px 11px; min-width: 0; }
.adm-sum small { display: block; color: var(--muted); font-size: .64rem; }
.adm-sum b { display: block; font-size: .84rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-sum.ok b { color: #22c55e; } .adm-sum.pend b { color: #f59e0b; }
.adm-venta { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, .8fr) minmax(170px, auto); align-items: center; gap: 10px; background: var(--glass); border: 1px solid var(--glass-b); border-left: 3px solid var(--line); border-radius: 14px; padding: 9px 14px; font-size: .8rem; box-shadow: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.adm-venta.c0 { border-left-color: #3b82f6; } .adm-venta.c1 { border-left-color: #eab308; }
.adm-venta .main, .adm-venta .cell { min-width: 0; }
.adm-venta .main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; font-weight: 500; }
.adm-venta .main small, .adm-venta .cell small, .adm-est small { display: block; color: var(--muted); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-venta .cell { font-size: .8rem; }
.adm-venta .cell .adm-tag { margin-bottom: 2px; }
.adm-est { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.adm-pay { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; border-radius: 999px; font-size: .7rem; font-weight: 500; border: 1px solid; }
.adm-pay::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.adm-pay.ok { color: #22c55e; background: rgba(34, 197, 94, .11); border-color: rgba(34, 197, 94, .38); }
.adm-pay.pend { color: #f59e0b; background: rgba(245, 158, 11, .11); border-color: rgba(245, 158, 11, .38); }
.adm-pay.sin { color: var(--muted); background: transparent; border-color: var(--line); }
html[data-theme="light"] .adm-pay.ok { color: #15803d; } html[data-theme="light"] .adm-pay.pend { color: #b45309; }
.adm-venta.pagada { background: color-mix(in srgb, var(--glass) 90%, #22c55e 6%); }
@media (max-width: 980px) { .adm-venta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .adm-venta .main, .adm-venta .adm-est { grid-column: 1 / -1; } .adm-est { flex-direction: row; flex-wrap: wrap; align-items: center; } }

/* Estudiantes: una tarjeta por persona con sus cursos */
.adm-alumno { background: var(--glass); border: 1px solid var(--glass-b); border-radius: 16px; padding: 9px 14px 4px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.adm-alumno-cab { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }
.adm-alumno-cab .main { flex: 1; min-width: 0; }
.adm-alumno-cab .main b, .adm-cur .main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; font-weight: 500; }
.adm-alumno-cab .main small, .adm-cur .main small, .adm-cur .cell small { display: block; color: var(--muted); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-cur { display: grid; grid-template-columns: minmax(0, 2fr) 104px minmax(110px, 1.2fr) auto; align-items: center; gap: 12px; padding: 7px 2px; border-top: 1px dashed var(--glass-b); }
.adm-cur .main { min-width: 0; }
.adm-cur .acts { display: flex; justify-content: flex-end; }
@media (max-width: 760px) { .adm-cur { grid-template-columns: minmax(0, 1fr) auto; } .adm-cur .main { grid-column: 1 / -1; } .adm-cur .cell:nth-of-type(2) { grid-column: 1 / -1; } .adm-cur .acts { justify-content: flex-start; } }

/* zona.css (se carga despues) fija columnas y rellenos: estas reglas son mas especificas */
.at-zona .adm-stats.adm-kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.at-zona .adm-stats.adm-kpis-2 { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; }
.at-zona .adm-stats.adm-autores { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
@media (max-width: 560px) { .at-zona .adm-stats.adm-kpis, .at-zona .adm-stats.adm-kpis-2, .at-zona .adm-stats.adm-autores { grid-template-columns: minmax(0, 1fr); } }
body.adm-body.at-zona .adm-stat { padding: 11px 14px; border-radius: 16px; }
body.adm-body.at-zona .adm-stat b { font-size: 1.22rem; }
body.adm-body.at-zona .adm-row { padding: 9px 14px; border-radius: 14px; font-size: .8rem; }
body.adm-body.at-zona .adm-venta { padding: 9px 14px; border-radius: 14px; font-size: .8rem; }
.at-zona .adm-venta .main small, .at-zona .adm-venta .cell small, .at-zona .adm-est small { font-size: .68rem; }
.at-zona .adm-h { font-size: 1.12rem; margin-bottom: 0; }

/* Celular: el menu pasa a una tira arriba */
@media (max-width: 900px) {
  body.adm-body .adm.adm-full { padding: 8px 8px 22px; }
  .adm-shell { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .adm-side { position: static; height: auto; min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 10px 8px; border-radius: 18px; }
  .adm-logo { flex: none; width: 104px; padding: 0; margin: 0; border: 0; }
  .adm-nav-t, .adm-side-pie { display: none; }
  .adm-nav { flex-direction: row; flex: 1 1 100%; overflow-x: auto; gap: 3px; scrollbar-width: none; }
  .adm-nav::-webkit-scrollbar { display: none; }
  .adm-nav button { flex: none; min-height: 38px; padding: 3px 12px 3px 5px; font-size: .8rem; }
  .adm-nav .ico { width: 28px; height: 28px; }
  .adm-h, .at-zona .adm-h { font-size: 1.02rem; }
}
@media (max-width: 520px) { .adm-nav { flex-wrap: wrap; overflow: visible; justify-content: center; } .adm-nav .ico { display: none; } .adm-nav button { min-height: 34px; padding: 3px 12px; font-size: .8rem; } .adm-top-acts .at-btn { padding: 0 10px; } }
