/* Panel admin (Fase 8). Reusa .mod-kpi, .den-card, .chip, .badge y .modal de los módulos anteriores. */
.admin-nav { background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
.admin-nav-in { display: flex; gap: .35rem; overflow-x: auto; padding: .5rem 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.admin-nav-in::-webkit-scrollbar { display: none; }
.admin-nav-item { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .9rem; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.admin-nav-item .lucide { width: 18px; height: 18px; }
.admin-nav-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.admin-nav-item.active { background: var(--accent); color: var(--accent-text); }
@media (max-width: 768px) { .admin-nav-item { padding: 0 .75rem; } }
@media (min-width: 1025px) { .admin-nav-in { flex-wrap: wrap; overflow: visible; } }

.adm-total { margin: 0 0 .6rem; font-size: 13px; }
.adm-h { font-size: 18px; margin: 1.6rem 0 0; }
.adm-kpi { position: relative; padding-top: 2.4rem; }
.adm-kpi > .lucide { position: absolute; top: .85rem; left: 1rem; width: 18px; height: 18px; color: var(--accent); }
.adm-kpi span { display: block; line-height: 1.3; }
.adm-pends { display: flex; gap: .6rem; flex-wrap: wrap; }
.adm-pend { flex: 1 1 260px; display: flex; align-items: center; gap: .7rem; min-height: 56px; padding: .7rem 1rem; border-radius: var(--radius-m); background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-primary); text-decoration: none; }
.adm-pend span { flex: 1; }
.adm-pend.hay { border-color: var(--danger); background: rgba(192,57,43,.06); }
.adm-pend.hay > .lucide:first-child { color: var(--danger); }
.adm-grid { display: grid; grid-template-columns: 3fr 2fr; gap: .9rem; margin-top: .9rem; }
@media (max-width: 860px) { .adm-grid { grid-template-columns: 1fr; } }
.adm-panel { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 1rem 1.1rem; margin-bottom: .9rem; min-width: 0; }
.adm-grid .adm-panel { margin-bottom: 0; }
.adm-panel h3 { margin: 0 0 .8rem; font-size: 15px; }
.adm-chart { margin: 0; }
.adm-chart { position: relative; }
.adm-chart-vacio { position: absolute; left: 0; right: 0; top: 52px; text-align: center; font-size: 13px; color: var(--text-muted); pointer-events: none; }
.adm-chart svg { width: 100%; height: 150px; display: block; }
.adm-bar { fill: var(--accent); }
.adm-axis { stroke: var(--border); stroke-width: 1; }
.adm-chart figcaption { display: flex; justify-content: space-between; gap: .5rem; font-size: 12px; color: var(--text-muted); margin-top: .35rem; }
.adm-chart figcaption strong { color: var(--text-primary); }
.adm-ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.adm-ranking li { display: grid; grid-template-columns: minmax(80px, 1fr) 1.2fr auto; align-items: center; gap: .6rem; font-size: 14px; }
.adm-meter { height: 8px; border-radius: 99px; background: var(--bg-tertiary); overflow: hidden; }
.adm-meter i { display: block; height: 100%; background: var(--sun); border-radius: 99px; }
.adm-ranking b { font-size: 13px; white-space: nowrap; }
@media (max-width: 480px) { .adm-ranking li { grid-template-columns: 1fr auto; } .adm-meter { grid-column: 1 / -1; order: 3; } }

.adm-rubros { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .2rem; }
.adm-rubro { display: inline-flex; align-items: center; gap: .15rem; padding: 0 .2rem 0 .75rem; min-height: 36px; border-radius: 99px; background: var(--bg-tertiary); font-size: 13px; }
.adm-rubro small { color: var(--text-muted); margin-left: .25rem; }
.adm-rubro button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--text-muted); border-radius: 50%; }
.adm-rubro button:hover { background: var(--bg-primary); color: var(--text-primary); }
.adm-rubro .lucide { width: 15px; height: 15px; }

.adm-logo { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.adm-logo img { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radius-m); background: var(--bg-primary); border: 1px solid var(--border); padding: 6px; }
.adm-logo small { display: block; margin-top: .4rem; }
.adm-func { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .9rem; margin-bottom: .6rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.adm-func small, .adm-switch small { display: block; color: var(--text-muted); font-size: 13px; }
.adm-switch { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; min-height: 56px; cursor: pointer; }
.adm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adm-switch-ui { flex: 0 0 auto; width: 46px; height: 26px; border-radius: 99px; background: var(--border); position: relative; transition: background .2s; }
.adm-switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.adm-switch input:checked + .adm-switch-ui { background: var(--success); }
.adm-switch input:checked + .adm-switch-ui::after { transform: translateX(20px); }
.adm-switch input:focus-visible + .adm-switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.adm-guardar { display: flex; justify-content: flex-end; padding: .5rem 0 1.5rem; }
@media (max-width: 768px) { .adm-guardar .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .adm-switch-ui, .adm-switch-ui::after { transition: none; } }
.adm-sub { margin: 1.1rem 0 .5rem; font-size: 14px; }
.adm-hist { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.adm-hist li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .9rem; border-radius: var(--radius-m); background: var(--bg-primary); border: 1px solid var(--border); flex-wrap: wrap; }
.adm-hist li > div { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.adm-hist li span, .adm-hist li small { color: var(--text-muted); font-size: 13px; }
.adm-hist li span { overflow-wrap: anywhere; }
