:root {
  --ink: #0f1b2d; --muted: #5b6575; --line: #e3e7ee; --line-soft: #eef1f5; --bg: #ffffff; --panel: #f4f6f9;
  --accent: #1f5fd6; --accent-dark: #14449e; --accent-tint: #f3f7fe; --accent-line: #c8d8f5;
  --ok: #11743f; --ok-tint: #e3f4ea; --warn: #8a5a00; --warn-tint: #fff1d6; --warn-line: #f1d9a6;
  --crit: #a31f1f; --crit-strong: #c62828; --crit-tint: #fdecec; --crit-line: #f3b9b9;
  --radius: 12px;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-size: 15px; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1 { font-size: 26px; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
p { margin: 0 0 10px; }
code, .mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.wrap { max-width: 1392px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* top bar */
.topbar { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav a { padding: 10px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; min-height: 44px; }
.nav a:hover { background: var(--panel); color: var(--ink); text-decoration: none; }
.nav a.on { color: var(--ink); background: var(--panel); }
/* 1.15.20: «Backups» con dos opciones */
.nav-dd { position: relative; display: flex; }
.nav-dd-btn { padding: 10px 10px; border-radius: 8px; color: var(--muted); font: inherit; font-weight: 500; display: flex; align-items: center; gap: 6px; min-height: 44px; background: none; border: 0; cursor: pointer; }
.nav-dd-btn:hover, .nav-dd.on > .nav-dd-btn, .nav-dd.open > .nav-dd-btn { background: var(--panel); color: var(--ink); }
.nav-dd-caret { font-size: 11px; }
.nav-dd-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 40; min-width: 290px; flex-direction: column; gap: 2px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 27, 45, .12); }
.nav-dd:hover > .nav-dd-menu, .nav-dd:focus-within > .nav-dd-menu, .nav-dd.open > .nav-dd-menu { display: flex; }
.nav-dd-menu a { white-space: nowrap; }
.top-tools { display: flex; gap: 6px; align-items: center; }
.top-tools form { margin: 0; }
.badge { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--panel); color: var(--ink); }
.badge-warn { background: var(--warn-tint); color: var(--warn); }
.badge-crit { background: var(--crit-strong); color: #fff; }

.main { padding-top: 24px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 18px; }
.foot { color: var(--muted); font-size: 12px; padding-bottom: 24px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.h-sub { font-size: 16px; font-weight: 400; }

/* buttons & forms */
.btn { font: inherit; font-weight: 600; font-size: 14px; border-radius: 10px; min-height: 44px; padding: 0 16px; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-danger { background: var(--crit-strong); color: #fff; }
.btn-danger:hover { background: #a01f1f; color: #fff; }
.btn-ghost { background: #fff; border-color: #d5dbe5; color: #3c4658; font-weight: 500; }
.btn-ghost:hover { background: var(--panel); color: var(--ink); }
.btn-light { background: #fff; color: var(--crit); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: 13px; font-weight: 600; color: #3c4658; margin-bottom: 4px; }
input, select { font: inherit; font-size: 15px; min-height: 44px; padding: 8px 12px; border: 1px solid #cfd6e1; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.w-sm { width: 140px; } .w-md { width: 260px; max-width: 100%; }
.upper { text-transform: uppercase; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack label { margin-bottom: -4px; }
.stack-lg { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.form-grid .w-sm { width: 100%; }
.span-2 { grid-column: 1 / -1; }
.form-end { display: flex; align-items: flex-end; gap: 10px; }
.inline-form { margin-top: 10px; }
.ip-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.row-actions form { margin: 0; }
.danger-zone summary { list-style: none; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone[open] form { margin-top: 8px; padding: 10px; border: 1px solid var(--crit-line); border-radius: 10px; background: var(--crit-tint); }

/* cards & tiles */
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; min-width: 0; }
.card-accent { border-color: var(--accent-line); background: var(--accent-tint); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tiles-sm { margin: 12px 0 18px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tiles-sm .tile-num { font-size: 26px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile-accent { border-color: var(--accent-line); background: var(--accent-tint); }
.tile-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.tile-num { font-family: 'IBM Plex Mono', monospace; font-size: 32px; font-weight: 600; margin-top: 4px; }
.tile-sub { font-size: 13px; color: var(--muted); }
.t-crit { color: var(--crit); font-weight: 600; }

/* notices */
.notice { border-radius: 10px; padding: 12px 16px; border: 1px solid; font-size: 14px; }
.notice-ok { background: var(--ok-tint); border-color: #b9e0c8; color: #0b4f2b; }
.notice-warn { background: var(--warn-tint); border-color: var(--warn-line); color: #5c3c00; }
.notice-crit { background: var(--crit-tint); border-color: var(--crit-line); color: #7a1717; }
.red-banner { background: var(--crit-strong); color: #fff; animation: pulse 1.2s ease-in-out infinite alternate; }
.red-inner { display: flex; gap: 16px; align-items: center; min-height: 56px; flex-wrap: wrap; }
@keyframes pulse { from { background: #c62828; } to { background: #8e1515; } }
@media (prefers-reduced-motion: reduce) { .red-banner { animation: none; } }

/* levels */
.lvl { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border-radius: 6px; padding: 3px 8px; white-space: nowrap; display: inline-block; }
.lvl-warning { background: var(--warn-tint); color: var(--warn); }
.lvl-critical { background: var(--crit-strong); color: #fff; }
.lvl-red { background: #7a0f0f; color: #fff; }
.lvl-ok { background: var(--ok-tint); color: var(--ok); }
.lvl-pending { background: var(--panel); color: #3c4658; }

/* server grid */
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.srv { display: flex; flex-direction: column; gap: 2px; border-radius: 10px; padding: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); min-height: 92px; }
.srv:hover { text-decoration: none; color: var(--ink); border-color: #b9c3d3; }
.srv-code { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 16px; }
.srv-state { font-size: 12px; font-weight: 600; }
.srv-meta, .srv-seen { font-size: 12px; color: var(--muted); }
.srv-warning { background: var(--warn-tint); border-color: var(--warn-line); }
.srv-critical, .srv-red { background: var(--crit-strong); border-color: var(--crit-strong); color: #fff; }
.srv-critical .srv-meta, .srv-critical .srv-seen, .srv-red .srv-meta, .srv-red .srv-seen { color: #ffe1e1; }
.srv-critical:hover, .srv-red:hover { color: #fff; }
.srv-red { animation: pulse 1.2s ease-in-out infinite alternate; }
.srv-pending { background: #fff; border-style: dashed; }

/* alerts */
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { border-top: 1px solid var(--line-soft); }
.alert-list li > a, .alert-list li { display: flex; gap: 10px; align-items: center; padding: 10px 0; color: var(--ink); flex-wrap: wrap; }
.alert-list li > a { padding: 0; width: 100%; }
.alert-list li > a:hover { text-decoration: none; }
.al-title { flex: 1; min-width: 160px; }
.alert-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; }
.alert-critical { border-color: var(--crit-line); }
.alert-red { border: 2px solid var(--crit-strong); }
.alert-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.alert-title { font-size: 18px; margin: 10px 0 4px; }
.alert-reason { color: #3c4658; }
.what-box { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--panel); }
.what-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.what-box p { margin: 6px 0 0; }
.what-form { margin-top: 10px; }
.alert-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.alert-actions form { margin: 0; }
.tabs { display: flex; gap: 4px; }
.tabs a, .tabs button { font: inherit; font-size: 14px; padding: 8px 12px; min-height: 36px; border-radius: 8px; color: var(--muted); background: none; border: 1px solid transparent; cursor: pointer; }
.tabs a.on, .tabs button.on { background: var(--panel); color: var(--ink); border-color: var(--line); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
td.num, th.num { text-align: right; }
.svc-list, .inv-list { list-style: none; margin: 0; padding: 0; }
.svc-list li, .inv-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }

/* charts */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.chart { margin: 0; border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; }
.chart figcaption { font-size: 13px; font-weight: 600; color: #3c4658; display: flex; justify-content: space-between; }
.chart svg { width: 100%; height: 140px; display: block; margin-top: 6px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .area { fill: var(--accent); fill-opacity: .1; stroke: none; }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart { position: relative; }
.chart-msg { position: absolute; inset: 40px 0 0 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }

/* commands */
.cmd { background: var(--ink); color: #e9eef6; padding: 14px 16px; border-radius: 10px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; white-space: pre-wrap; word-break: break-all; margin: 10px 0; }

/* login */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--panel); padding: 16px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 12px; }
.login-wide { max-width: 480px; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 6px; }
.qr { display: flex; justify-content: center; }
.qr svg { width: 220px; height: 220px; }
.code-input { font-family: 'IBM Plex Mono', monospace; font-size: 24px; letter-spacing: .2em; text-align: center; }

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar-inner { gap: 8px; padding-top: 8px; }
  .nav { order: 3; width: 100%; flex: none; flex-wrap: nowrap; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  .nav-dd { display: contents; }
  .nav-dd-btn { display: none; }
  .nav-dd-menu, .nav-dd:hover > .nav-dd-menu { display: contents; }
  .red-inner { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .top-tools { width: 100%; justify-content: flex-end; }
  .w-md { width: 100%; }
}

.hit { color: var(--crit-strong); font-weight: 700; }

/* abuse causes */
.cause-row td { border-top: 0; padding-top: 0; background: var(--bg-soft, transparent); }
.cause-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 4px 0 6px; }
.evidence { margin: 2px 0 10px; }
.evidence summary { cursor: pointer; font-size: 13px; color: var(--accent, inherit); }
.evidence h4 { margin: 12px 0 4px; font-size: 13px; }
.tbl-sm td, .tbl-sm th { padding: 4px 8px; font-size: 12.5px; }
.brk { white-space: pre-wrap; overflow-wrap: anywhere; }
pre.brk { margin: 4px 0; padding: 8px; border-radius: 6px; background: var(--code-bg, rgba(127,127,127,.08)); }
.advice { margin-top: 4px; color: var(--muted, #555); }
.check-ok { color: var(--ok, #1a7f37); }
.check-bad { color: var(--crit, #c62828); font-weight: 600; }
.alta-list { list-style: none; padding: 0; margin: 6px 0 0; }
.alta-list li { display: flex; gap: 8px; padding: 3px 0; }

/* ---------------------------------------------------------------- integrated assistant */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-ia { background: var(--ink); color: #fff; }
.btn-ia:hover { background: #22324d; color: #fff; }
.btn-ia svg { flex: none; }
.lvl-restr { background: #e8eefc; color: var(--accent-dark); }
.ia-cell { min-width: 150px; }
.ia-cell .btn { margin-bottom: 4px; }
.ia-chip { display: inline-block; font-size: 12.5px; line-height: 1.35; border-radius: 8px;
  padding: 3px 9px; background: var(--panel); color: #3c4658; border: 1px solid var(--line); }
.ia-cell .ia-chip { display: block; margin-top: 2px; max-width: 220px; }
.ia-chip strong { font-weight: 600; color: var(--ink); }
.ia-chip-esperar { background: var(--ok-tint); border-color: #b9e0c8; color: #0b4f2b; }
.ia-chip-actuar { background: var(--warn-tint); border-color: var(--warn-line); color: #5c3c00; }
.ia-chip-resuelto { background: #eef1f5; color: var(--muted); }
.ia-chip-due { box-shadow: inset 3px 0 0 var(--crit-strong); }
.ia-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-tint); border: 1px solid var(--accent-line); }
.ia-note p { margin: 6px 0 0; }
.ia-detail-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ia-detail-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ia-shift { border-color: var(--accent-line); }
.ia-shift-list { list-style: none; margin: 0; padding: 0; }
.ia-shift-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.ia-shift-main { display: flex; flex-direction: column; gap: 2px; min-width: 260px; flex: 1; }
.ia-shift-side { display: flex; gap: 8px; align-items: center; }

.ia-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: #fff; z-index: 40;
  border-left: 1px solid var(--line); box-shadow: -18px 0 40px rgba(15, 27, 45, .12); display: flex; flex-direction: column; }
@media (min-width: 1680px) { body.ia-open .main, body.ia-open .foot { margin-right: 580px; max-width: none; } }
.ia-head { flex: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 12px;
  background: var(--ink); color: #fff; }
.ia-head h2 { margin: 2px 0 0; font-size: 16px; color: #fff; }
.ia-kicker { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: #b8c4d8; display: flex; align-items: center; gap: 8px; }
.ia-mark { font-family: 'IBM Plex Mono', monospace; font-weight: 600; background: #fff; color: var(--ink); border-radius: 5px; padding: 0 5px; letter-spacing: 0; }
.ia-close { background: transparent; color: #fff; border-color: #43536e; }
.ia-close:hover { background: #22324d; color: #fff; }
.ia-state { border-bottom: 1px solid var(--line); background: var(--panel); font-size: 13.5px; flex: none; }
.ia-state-toggle { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 18px; min-height: 40px; border: 0; background: none;
  font: inherit; font-size: 13px; color: #3c4658; text-align: left; cursor: pointer; }
.ia-state-toggle:hover { background: #eaeef4; }
.ia-state-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ia-arrow { display: inline-block; transition: transform .15s; color: var(--muted); flex: none; }
.ia-state-open .ia-arrow { transform: rotate(90deg); }
.ia-state-sum { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ia-state-sum .ia-chip { padding: 1px 7px; font-size: 12px; }
.ia-state-more { flex: none; font-size: 12px; font-weight: 600; color: var(--accent); }
.ia-state-body { padding: 2px 18px 12px; display: flex; flex-direction: column; gap: 6px; max-height: 34vh; overflow-y: auto; }
.ia-state-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.ia-state-label { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); min-width: 92px; }
.ia-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.ia-m { max-width: 100%; }
.ia-m-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.ia-m-user { align-self: flex-end; max-width: 88%; }
.ia-m-user .ia-bubble { background: var(--accent-tint); border: 1px solid var(--accent-line); }
.ia-m-user .ia-m-meta { text-align: right; }
.ia-bubble { border-radius: 12px; padding: 10px 13px; background: #fff; border: 1px solid var(--line); overflow-wrap: anywhere; }
.ia-m-assistant .ia-bubble { background: #fff; }
.ia-bubble p { margin: 0 0 8px; }
.ia-bubble p:last-child, .ia-bubble ul:last-child, .ia-bubble ol:last-child { margin-bottom: 0; }
.ia-bubble h4 { font-size: 14px; margin: 12px 0 6px; }
.ia-bubble h4:first-child { margin-top: 0; }
.ia-bubble ul, .ia-bubble ol { margin: 0 0 8px; padding-left: 22px; }
.ia-bubble li { margin-bottom: 4px; }
.ia-bubble code { font-size: 12.5px; background: var(--panel); border-radius: 4px; padding: 1px 4px; }
.ia-bubble table { font-size: 12.5px; margin: 6px 0 10px; }
.ia-bubble th, .ia-bubble td { padding: 4px 8px 4px 0; }
.ia-code { position: relative; margin: 6px 0 10px; }
.ia-code pre { margin: 0; background: var(--ink); color: #e9eef6; padding: 12px 14px; padding-right: 74px; border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.ia-code pre code { background: none; padding: 0; color: inherit; }
.ia-copy { position: absolute; top: 6px; right: 6px; font: inherit; font-size: 12px; font-weight: 600; border-radius: 6px;
  border: 1px solid #43536e; background: #22324d; color: #fff; padding: 4px 9px; cursor: pointer; min-height: 28px; }
.ia-copy:hover { background: #2f4366; }
.ia-tool { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; padding-left: 2px; }
.ia-tool::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #9aa6b8; flex: none; }
.ia-system { font-size: 13px; color: #24324a; background: var(--panel); border-radius: 10px; padding: 8px 12px; border-left: 3px solid var(--accent); }
.ia-system-ok { border-left-color: var(--ok); background: var(--ok-tint); color: #0b4f2b; }
.ia-error { font-size: 13px; background: var(--crit-tint); color: #7a1717; border: 1px solid var(--crit-line); border-radius: 10px; padding: 8px 12px; }
.ia-prop { border: 2px solid var(--accent); border-radius: 12px; padding: 12px 14px; background: var(--accent-tint); }
.ia-prop-danger { border-color: var(--crit-strong); background: var(--crit-tint); }
.ia-prop-k { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ia-prop h3 { margin: 2px 0 6px; font-size: 15px; }
.ia-prop p { margin: 0 0 6px; font-size: 13.5px; }
.ia-prop-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.ia-prop-status { font-size: 13px; }
.ia-prop-result { font-family: 'IBM Plex Mono', monospace; font-size: 12px; background: #fff; border-radius: 8px; padding: 6px 8px; margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ia-progress { flex: none; display: flex; gap: 10px; align-items: center; padding: 8px 18px; font-size: 13px; color: #3c4658; border-top: 1px solid var(--line-soft); }
.ia-dot { display: inline-block; vertical-align: middle; margin-right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: iaPulse 1s ease-in-out infinite alternate; flex: none; }
@keyframes iaPulse { from { opacity: .25; transform: scale(.8); } to { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .ia-dot { animation: none; } }
.ia-continue { padding: 8px 18px; border-top: 1px solid var(--line); background: var(--warn-tint); display: flex; align-items: center; gap: 10px; flex: none; }
.ia-continue p { margin: 0; font-size: 13px; color: #5c3c00; flex: 1; }
.ia-continue .btn { width: auto; flex: none; min-height: 36px; padding: 0 14px; font-size: 13px; }
.ia-form { flex: none; border-top: 1px solid var(--line); padding: 12px 18px 14px; display: flex; flex-direction: column; gap: 8px; }
.ia-form textarea { font: inherit; font-size: 14.5px; width: 100%; resize: vertical; min-height: 64px; max-height: 40vh; padding: 10px 12px;
  border: 1px solid #cfd6e1; border-radius: 10px; color: var(--ink); }
.ia-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ia-form-row { display: flex; gap: 8px; align-items: center; }
.ia-budget { flex: 1; font-size: 12px; color: var(--muted); }
.ia-budget-low { color: var(--crit); font-weight: 600; }
.ia-scope { margin: 0; font-size: 11.5px; color: var(--muted); }
.ia-form[aria-disabled="true"] textarea { background: var(--panel); }
.ia-quick { display: flex; gap: 8px; }
.ia-quick .btn { min-height: 34px; }
.ia-chip-pending { background: var(--crit-tint); border-color: var(--crit-line); color: #7a1717; font-weight: 600; }
.ia-alarm-list { margin-bottom: 4px; }
.ia-alarm { background: var(--crit-tint); border-radius: 10px; padding: 10px 12px !important; border: 1px solid var(--crit-line) !important; margin-bottom: 6px; color: #5a1010; }
.nowrap { white-space: nowrap; }
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; cursor: pointer; accent-color: var(--accent); vertical-align: middle; }
.acct-batch tbody tr { cursor: pointer; }
.acct-batch tbody tr:hover td { background: var(--panel); }
.acct-batch tbody tr.sel td { background: var(--accent-tint); }
.acct-count { font-size: 13px; color: var(--muted); align-self: center; }

/* Sortable table headers */
th.th-sort { cursor: pointer; user-select: none; }
th.th-sort:hover { color: var(--text, inherit); }
th.th-sort .sort-arrow { margin-left: 5px; font-size: 11px; opacity: .45; }
th.th-sort[data-dir] .sort-arrow { opacity: 1; color: var(--accent, inherit); }

/* Consumption split (Abusos) */
.split { min-width: 150px; max-width: 220px; }
.split-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line-soft); }
.split-bar span { display: block; height: 100%; }
.split-bar span + span { box-shadow: inset 1px 0 0 #fff; }
.split-txt { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; color: var(--ink); }
.split-txt span { white-space: nowrap; }
.split-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
.split-web { background: #1f5fd6; }
.split-mysql { background: #c2410c; }
.split-cron { background: #7c3aed; }
.split-ssh { background: #0f766e; }
.split-stats { background: #a16207; }
.split-otro { background: #8a94a6; }
td.split-cell { vertical-align: middle; }

/* SPAM page */
.spam-verdict { white-space: normal; text-transform: none; letter-spacing: 0; font-size: 12.5px; line-height: 1.3; }
.spam-why { margin-top: 3px; max-width: 220px; }
.spam-reasons { margin: 0 0 12px 18px; padding: 0; }
.spam-reasons li { margin: 2px 0; }
.kind { font-size: 11.5px; font-weight: 600; border-radius: 5px; padding: 2px 6px; white-space: nowrap; background: var(--panel); color: #3c4658; }
.kind-casilla { background: #e8eefc; color: var(--accent-dark); }
.kind-script { background: var(--warn-tint); color: var(--warn); }
td.src-cell { min-width: 200px; max-width: 320px; }
td.src-cell .evidence { margin-top: 4px; }
.tile-num-sm { font-size: 15px; font-family: inherit; }
.card > .split { max-width: 560px; }
td.src-cell:has(details[open]) { max-width: none; min-width: 480px; }
td.src-cell details[open] .tbl-sm td:first-child { min-width: 200px; }
.spam-why { min-width: 170px; }

/* Compact ranking: fits one screen (Abusos) */
.tbl-compact { font-size: 13.5px; }
.tbl-compact th { white-space: normal; padding: 8px 8px 8px 0; line-height: 1.25; vertical-align: bottom; }
.tbl-compact td { padding: 9px 8px 9px 0; }
.tbl-compact td.cut { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-compact td.small { min-width: 70px; }
.tbl-compact .split { min-width: 120px; max-width: 160px; }
.tbl-compact .split-txt { gap: 0 6px; }
.tbl-compact td.ia-cell { min-width: 90px; max-width: 170px; }
.tbl-compact td.ia-cell .ia-chip { white-space: normal; display: inline-block; margin-top: 4px; }
.tbl-compact td.num { white-space: nowrap; }

/* SPAM table: one screen, details in a full-width row below */
.linklike { background: none; border: 0; padding: 0; margin-top: 3px; color: var(--accent); cursor: pointer; font: inherit; text-align: left; }
.linklike:hover { text-decoration: underline; }
.tbl-spam td.acct-cell { max-width: 150px; }
.tbl-spam td.src-cell, .tbl-spam td.src-cell:has(details[open]) { min-width: 0; max-width: 210px; }
.tbl-spam .cut { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tbl-spam td.verdict-cell { max-width: 190px; }
.tbl-spam .spam-why { min-width: 0; max-width: 190px; }
.tbl-spam td.small { max-width: 120px; }
.tbl-spam tr.row-detail > td { background: var(--panel); padding: 12px 14px; }
.tbl-spam tr.row-detail .tbl-sm { background: #fff; }
tr.row-total td { border-top: 2px solid var(--line); font-weight: 600; }

/* Guardian settings */
.w-xs { width: 70px; }
.form-row.tight { gap: 8px; align-items: center; flex-wrap: wrap; }
label.chk { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; margin-right: 8px; }
.guard-tbl td { vertical-align: middle; white-space: nowrap; }
.guard-form .table-wrap { margin: 12px 0 4px; }
#proteccion h3 { margin: 18px 0 8px; font-size: 15px; }
#g_exc { width: 100%; max-width: 520px; }
.sound-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 16px; margin: 8px 0 14px; }
.sound-grid label.chk { margin: 0; }

/* Blesta (1.14) */
.bl-cat > summary { list-style: none; cursor: pointer; }
.bl-cat > summary::-webkit-details-marker { display: none; }
.bl-sum { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.bl-sum h2 { margin: 0; }
.bl-cat > .bl-sum::before { content: '▸'; color: var(--muted); font-size: 14px; width: 12px; }
.bl-cat[open] > .bl-sum::before { content: '▾'; }
.bl-cat[open] > .bl-sum { margin-bottom: 8px; }
#config > summary { list-style: none; cursor: pointer; }
#config > summary::-webkit-details-marker { display: none; }
.bl-urgent { border: 2px solid var(--crit-strong); }
.bl-list { margin: 4px 0 6px; padding-left: 18px; }
.bl-list li { margin-bottom: 4px; }
.bl-todo { font-weight: 600; color: #3c4658; }
.bl-batch-row { margin-top: 10px; align-items: center; }
.bl-batch tbody tr.sel { background: var(--accent-tint); }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 36px; }
textarea { font: inherit; font-size: 13px; width: 100%; border: 1px solid #d5dbe5; border-radius: 10px; padding: 8px 10px; }
.bl-wrap { overflow-wrap: anywhere; min-width: 160px; }
.bl-act .btn { white-space: nowrap; }
.bl-note-row td { border-top: 0; padding-top: 0; }
.bl-note { background: #fff8d9; border: 1px solid #f1d9a6; border-radius: 10px; padding: 10px 12px; margin: 0 0 4px; max-width: 900px; }
.bl-note-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0; color: #3d2f00; }
.bl-note textarea { background: #fffdf2; margin-top: 6px; }
.bl-note-btns { margin-top: 8px; align-items: center; }

/* Backups (1.15) */
.bk-h { margin: 0; }
.bk-tile-bad { border-color: var(--crit-line); background: var(--crit-tint); }
.bk-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.bk-fact > div { margin-top: 4px; }
.bk-srv.bk-bad { border-color: var(--crit-line); }
.bk-sum { flex-wrap: wrap; }
.bk-sum-right { margin-left: auto; }
.bk-meta { display: grid; gap: 4px; margin: 6px 0 10px; }
.bk-btns { margin-bottom: 12px; }
.bk-btns form { display: flex; gap: 8px; flex-wrap: wrap; }
.bk-sub > summary { list-style: none; cursor: pointer; }
.bk-sub > summary::-webkit-details-marker { display: none; }
.bk-sub > summary h3::before { content: '▸ '; color: var(--muted); }
.bk-sub[open] > summary h3::before { content: '▾ '; }
.bk-err { font-size: 12px; word-break: break-all; margin-top: 4px; }
.bk-key { margin: 10px 0 14px; }
.bk-pre { white-space: pre-wrap; word-break: break-all; background: var(--panel); padding: 8px 10px; border-radius: 8px; margin: 6px 0; }
.bl-act form + form { margin-top: 6px; }
.notice-info { border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.bk-now { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; }
.bk-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.bk-dot-on { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.bk-legend { margin: 0 0 8px; }
.bk-obs { display: grid; gap: 10px; }
.bk-obs-row { display: flex; gap: 14px; justify-content: space-between; border: 1px solid var(--crit-line); border-radius: 10px; padding: 10px 12px; }
.bk-obs-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.bk-obs-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 170px; }
.bk-proc { background: var(--panel); border-radius: 8px; padding: 6px 10px; }
.bk-proc ol { margin: 6px 0 2px 18px; padding: 0; display: grid; gap: 3px; }
.bk-proc code, .bk-det code { font-size: 12px; background: #fff; padding: 0 4px; border-radius: 4px; border: 1px solid var(--line); }
.bk-proc summary, .bk-det summary { cursor: pointer; }
.bk-det pre { max-height: 260px; overflow: auto; }
.bk-ia { display: grid; gap: 2px; }
@media (max-width: 760px) { .bk-obs-row { flex-direction: column; } .bk-obs-act { min-width: 0; } }
.bk-fix { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 6px; background: #fff; }
.bk-fix-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.t-ok { color: #0b6b37; }

/* 1.15.8: «El sitio no funciona» (Abusos) */
.site-search form { align-items: flex-end; }
.site-findings { list-style: none; margin: 0; padding: 0; }
.site-f { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 10px 12px; border-left: 4px solid var(--line, #e3e7ee); border-radius: 6px; margin-bottom: 8px; background: var(--panel); }
.site-f-crit { border-left-color: var(--crit-strong); }
.site-f-warn { border-left-color: var(--warn); }
.site-f-ok { border-left-color: var(--ok); }
.site-f-main .lvl { margin-right: 6px; }
table.kv th { text-align: left; white-space: nowrap; width: 190px; vertical-align: top; color: #3c4658; font-weight: 600; }

/* 1.15.20: Backups en Discos de Servidores */
.t-warn { color: var(--warn); }
.wb-grid { gap: 20px; align-items: start; }
.wb-grid table { width: 100%; }
.bk-issues { display: grid; gap: 6px; margin: 4px 0 10px; }
.bk-issues .notice { margin: 0; }

/* 1.15.21 */
.bl-grid { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0; }
.bl-grid dt { color: var(--muted); }
.bl-grid dd { margin: 0; }
.bl-explained { margin: 0 0 10px; }
.bl-explained table { margin: 6px 0 10px; }
.dup-case { border-top: 1px solid var(--line); padding: 12px 0; }
.dup-case:first-of-type { border-top: 0; }
.danger-modal { border: 3px solid var(--crit-strong); border-radius: 14px; padding: 0; max-width: 560px; width: calc(100% - 32px); }
.danger-modal::backdrop { background: rgba(120, 10, 10, .55); }
.danger-modal form { padding: 22px 24px; background: #fff5f5; }
.danger-modal h2 { color: var(--crit-strong); margin: 0 0 6px; font-size: 20px; }
.danger-modal ul { margin: 8px 0 14px; padding-left: 20px; }
.danger-modal li { margin-bottom: 6px; }
.dz-irrev { background: var(--crit-strong); color: #fff; font-weight: 700; padding: 8px 12px; border-radius: 8px; margin: 8px 0; }
.dz-label { display: block; font-weight: 700; margin-top: 12px; }
.dz-check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.dz-code { font-size: 22px; letter-spacing: 4px; width: 9ch; text-align: center; margin: 6px 0 12px; }
.dz-btns { gap: 10px; }
.dz-go { background: var(--crit-strong); color: #fff; font-weight: 700; }
.dz-go:hover { background: #a01f1f; color: #fff; }

/* 1.15.23: Ciberseguridad */
.cb-inc { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.cb-inc-new { border: 2px solid var(--crit-strong); background: #fff8f8; }
.cb-inc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cb-inc-head h3 { margin: 0; }
.cb-due { font-weight: 700; }
.cb-steps { margin: 8px 0; padding-left: 20px; }
.cb-ig4 { display: grid; gap: 4px; margin: 10px 0; padding: 10px 12px; background: var(--panel); border-radius: 10px; }
.cb-ig4 .btn { justify-self: start; margin-top: 4px; }
.cb-text { width: 100%; font-size: 12px; margin: 6px 0; }
.cb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.cb-actions form.form-row { margin: 0; }
.cb-actions .bk-det { flex-basis: 100%; }
.w-lg { width: 100%; max-width: 420px; }

/* 1.15.24: backup de WHM gestionado */
.wb-manage { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 6px 0 12px; }
.wb-manage-on { border-style: solid; border-color: #9fd3b0; background: #f3fbf5; }
.wb-manage .form-row { gap: 12px; align-items: center; }
.wb-manage-list { margin: 6px 0 0; padding-left: 18px; }
.wb-manage-list li { margin-bottom: 3px; }

/* 1.15.25: restaurar una cuenta desde Hetzner */
.rs-form { gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0 12px; }
.rs-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.rs-card { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 14px 16px; margin: 8px 0 14px; }
.rs-card h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.rs-tbl th { text-align: left; width: 220px; font-weight: 600; }
.rs-go { margin-top: 12px; gap: 12px; align-items: center; }
.rs-h { margin: 14px 0 6px; }

/* 1.15.25: una sola lista de servidores por página, con «Qué falta hacer» arriba */
.todo-card.todo-bad { border-left: 4px solid var(--crit-strong); }
.todo-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
.todo-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 6px 8px; border-radius: 8px; }
.todo-list li.todo-crit { background: #fff1f1; }
.todo-list li.todo-warn { background: #fff8e8; }
.bk-sum-facts { flex-basis: 100%; color: var(--muted, #666); }
.bk-srvcfg { border-top: 1px dashed var(--line, #ddd); margin-top: 12px; padding-top: 10px; }
.bk-srvcfg .form-row { gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.bk-srvcfg label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }

/* 1.15.26: suspensión automática de duplicadas */
.dup-st { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.dup-st-old .small { color: var(--crit-strong, #b42318); font-weight: 600; }
.dup-cfg { margin-top: 10px; }
.dup-cfg .form-row { gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 8px; }
.dup-cfg label { display: flex; flex-direction: column; gap: 3px; }
form.inline { display: inline; }

/* 1.15.27: «Resuelta» en alertas y novedades */
.btn-ok { background: #e7f6ec; color: #11633a; border: 1px solid #9fd8b4; }
.btn-ok:hover { background: #d3efdd; }
.alert-reopen { background: #fff8e8; border-left: 3px solid #d98e04; padding: 6px 10px; margin: 6px 0; font-size: 13px; }
.ia-shift-side form.inline { display: inline; }

/* 1.15.28: rojo (requiere intervención) / amarillo (se resuelve solo) */
.tri > summary h2 { display: inline; margin-right: 8px; }
.tri-red:not(.tri-none) { border-left: 5px solid var(--crit-strong, #b42318); }
.tri-yel { border-left: 5px solid #d98e04; }
.tri-srv { margin: 12px 0 4px; }
.tri-srv-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; font-size: 15px; }
.ti { border-radius: 8px; padding: 10px 12px; margin: 8px 0; border: 1px solid; }
.ti-r { background: #fff4f3; border-color: #f3c1bc; }
.ti-y { background: #fffaee; border-color: #f0dca8; }
.ti-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.ti-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ti-r .ti-dot { background: #d92d20; } .ti-y .ti-dot { background: #dc9b0a; }
.ti-who { margin-left: auto; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #fff; border: 1px solid #e3e3e3; }
.ti-row { display: flex; gap: 10px; font-size: 14px; margin: 2px 0; }
.ti-k { flex: 0 0 82px; color: #666; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; padding-top: 2px; }
.ti-act { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.ti-dead { color: #8a1c12; }
.ti-det { margin-top: 6px; } .ti-det > div { white-space: pre-wrap; word-break: break-word; margin-top: 4px; color: #555; }
.ti-yel-fold { margin: 8px 0; }
.risk { font-size: 13px; padding: 2px 8px; border-radius: 10px; }
.risk-bad { background: #fde8e6; color: #8a1c12; font-weight: 600; }
.risk-ok { background: #e7f6ec; color: #11633a; }
.badge-warn { background: #fdf0d0; color: #7a4b00; }

/* 1.15.28: Abusos por servidor */
.srvbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.srvchip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 7px; border: 1px solid #ddd;
  border-radius: 8px; text-decoration: none; color: inherit; background: #fff; overflow: hidden; font-size: 13px; }
.srvchip:hover { border-color: #999; }
.srvchip.on { background: #1f2937; color: #fff; border-color: #1f2937; }
.srvchip-zero { color: #999; }
.srvchip-n { font-size: 11px; background: #fde8e6; color: #8a1c12; border-radius: 8px; padding: 0 6px; }
.srvchip.on .srvchip-n { background: #fff; }
.srvchip-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: #d92d20; }
.srvchip-dot { width: 7px; height: 7px; border-radius: 50%; background: #d92d20; }
.tri-all { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.alert-down { margin: 8px 0; }
.cb-close { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #ddd; max-width: 720px; }
.cb-close button { align-self: flex-start; }
/* 1.15.31: origen y qué hacer por cuenta (Backups en Discos) */
.bk-diag { margin: 2px 0 4px; line-height: 1.45; }
.bk-diag .lvl { font-size: 10.5px; padding: 1px 6px; }
.lvl-tec { background: #e8eefc; color: #2448a8; }
/* 1.15.32: en curso y botones apretados (grises, sin poder volver a apretar) */
.t-run { color: #2448a8; }
.badge-run { background: #e8eefc; color: #2448a8; }
.btn:disabled, .btn[disabled] { background: #e6e8ec !important; color: #8a919c !important; border-color: #d5d9df !important; cursor: not-allowed; opacity: 1; box-shadow: none; }
.ti-c { background: #f5f8ff; border-color: #c7d4f3; }
.ti-c .ti-dot { background: #2448a8; }
.tri-run { border-left: 4px solid #2448a8; }
/* 1.15.34: Servidores en lista negra */
.bl-item { border-top: 1px solid #eef0f3; padding: 8px 0; }
.bl-manual { margin: 6px 0 2px; padding: 8px 12px; background: #fff5f5; border-left: 3px solid #c62828; border-radius: 6px; }
.bl-manual ol { margin: 4px 0 0 18px; }
.bk-admin h2 { margin-top: 0; }
