/* Panel de administración PPDesk — usa las variables y botones de /app.css (tema PPDesk). */
.small { font-size: 13px; }
.adm { display: flex; height: 100%; }
.side { width: 220px; flex-shrink: 0; background: #141426; border-right: 1px solid var(--gold); display: flex; flex-direction: column; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 16px; font-weight: 700; font-size: 18px; border-bottom: 1px solid #2a2a48; }
.side-brand img { width: 34px; height: 34px; border-radius: 8px; }
.side nav { display: flex; flex-direction: column; padding: 10px; gap: 4px; overflow: auto; flex: 1; }
.side nav a { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-size: 14px; display: flex; justify-content: space-between; align-items: center;
  background: var(--grad); border: 1px solid transparent; opacity: .9; }
.side nav a:hover { opacity: 1; border-color: var(--gold); }
.side nav a.active { background: var(--sel); color: #1a1a2e; font-weight: 700; opacity: 1; }
.side-foot { padding: 12px; border-top: 1px solid #2a2a48; }
.side-foot .btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.count { background: #e94560; color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.side nav a.active .count { background: #1a1a2e; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--gold); background: #141426; }
.head h1 { font-size: 20px; }
.head-right { display: flex; align-items: center; gap: 10px; }
#emergency.on { background: #e94560; border-color: #e94560; font-weight: 700; }
.view-body { flex: 1; overflow: auto; padding: 20px 22px 40px; }

.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.bar .grow { flex: 1; }
.bar input, .bar select { height: 38px; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: #1f1f38; border: 1px solid var(--gold); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 24px; color: var(--sel); }
.stat span { font-size: 12px; color: var(--muted); }

.tbl-wrap { overflow: auto; border: 1px solid var(--gold); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; background: #141426; position: sticky; top: 0; }
th, td { padding: 10px 12px; border-bottom: 1px solid #2a2a48; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #22223e; }
td .sub { font-size: 12px; color: var(--muted); }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn { margin-left: 4px; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.pill.ok { background: #143322; color: #2ecc71; } .pill.off { background: #2a2a40; color: var(--muted); }
.pill.warn { background: #3a2f0a; color: var(--sel); } .pill.bad { background: #3a1422; color: #ff7a93; }
.pill.info { background: #13284a; color: #8fb8ff; }
.sev { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }
.sev.info { background: #8fb8ff; } .sev.warning { background: var(--sel); } .sev.critical { background: #e94560; }

.panel { background: #1f1f38; border: 1px solid var(--gold); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.panel h2 { font-size: 16px; margin: 0 0 12px; color: var(--gold); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.checks label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.checks input { height: auto; width: 18px; height: 18px; accent-color: #f1c40f; }
input[type=file] { padding: 8px; height: auto; }

dialog { background: #1a1a2e; color: var(--text); border: 1px solid var(--gold); border-radius: 16px; padding: 0; width: min(560px, 94vw); }
dialog::backdrop { background: rgba(5, 5, 15, .7); }
.dlg-inner { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dlg-inner h2 { margin: 0; font-size: 18px; color: var(--gold); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.code-box { font-family: ui-monospace, Consolas, monospace; font-size: 26px; letter-spacing: 2px; text-align: center; background: #141426; border: 1px dashed var(--sel);
  border-radius: 12px; padding: 16px; color: var(--sel); user-select: all; word-break: break-all; }
pre.log { background: #10101e; border: 1px solid #2a2a48; border-radius: 10px; padding: 12px; max-height: 60vh; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
dialog.wide { width: min(1100px, 96vw); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1f1f38; border: 1px solid var(--gold); border-radius: 12px;
  padding: 12px 18px; z-index: 50; max-width: 90vw; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.toast.err { border-color: #e94560; color: #ffb4c0; }

@media (max-width: 860px) {
  .adm { flex-direction: column; }
  .side { width: auto; border-right: 0; border-bottom: 1px solid var(--gold); }
  .side nav { flex-direction: row; overflow-x: auto; padding: 8px; }
  .side nav a { white-space: nowrap; }
  .side-brand, .side-foot { display: none; }
  .head { flex-wrap: wrap; padding: 12px 14px; }
  .view-body { padding: 14px; }
}
.span-all { grid-column: 1 / -1; }
tr.unread td { font-weight: 600; }
ol li { margin: 6px 0; }
td.mono, td .mono { white-space: nowrap; }
.tbl-wrap td.sub { overflow-wrap: anywhere; max-width: 420px; }
