/* Design tokens aligned with ecortes.cl (Manrope + DM Mono, ink + brand green).
   Mismo sistema visual que mcp_dokploy_multiusers: tema claro/oscuro, sidebar oscuro, héroes con grilla. */
:root {
  --ink: #0c110e;
  --ink-raised: #121a15;
  --ink-soft: #1a251e;
  --on-dark: #e9eee7;
  --on-dark-muted: #a3afa5;
  --line-dark: rgba(224, 238, 226, 0.14);

  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --text: #14201a;
  --muted: #55655b;
  --line: #e0e8e2;

  --brand: #00dc82;
  --brand-bright: #3ff0a0;
  --brand-deep: #00a566;
  --brand-text: #00753f;
  --brand-soft: rgba(0, 220, 130, 0.12);
  --on-brand: #0c110e;

  --info: #3b4fb8;
  --info-soft: #eef1ff;
  --warn: #9a5b00;
  --warn-soft: #fff1dc;
  --danger: #c4372a;
  --danger-soft: #fdecea;
  --code-bg: #eef3f0;

  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sans: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(12, 17, 14, 0.04), 0 12px 32px -12px rgba(12, 17, 14, 0.16);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c110e;
    --surface: #121a15;
    --surface-2: #16201a;
    --text: #e9eee7;
    --muted: #a3afa5;
    --line: rgba(224, 238, 226, 0.12);
    --brand-text: #3ff0a0;
    --brand-soft: rgba(0, 220, 130, 0.14);
    --info: #8aa4ff;
    --info-soft: rgba(138, 164, 255, 0.14);
    --warn: #ffb454;
    --warn-soft: rgba(255, 180, 84, 0.14);
    --danger: #ff7a6e;
    --danger-soft: rgba(255, 122, 110, 0.14);
    --code-bg: #0f1712;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-text); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
code { background: var(--code-bg); padding: 1px 6px; border-radius: 6px; }
pre { background: var(--code-bg); padding: 14px; border-radius: var(--radius-sm); overflow: auto; margin: 0; white-space: pre-wrap; word-break: break-word; border: 1px solid var(--line); }
h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; margin: 0; letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: 17px; margin: 0 0 12px; letter-spacing: -0.01em; font-weight: 750; }
h3 { font-size: 15px; margin: 0 0 8px; font-weight: 700; }
p { margin: 0 0 12px; }
.accent { color: var(--brand-text); }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-weight: 800; letter-spacing: -0.02em; font-size: 17px; line-height: 1.1; color: var(--on-dark); }
.brand-name span { color: var(--brand); }
.brand-by { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--on-dark-muted); letter-spacing: 0.02em; margin-top: 2px; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100%; }
.layout > div { min-width: 0; }
.sidebar {
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(0, 220, 130, 0.14), transparent 60%),
    var(--ink);
  color: var(--on-dark);
  padding: 22px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line-dark);
}
.brand-link { display: block; padding: 0 8px 22px; text-decoration: none; }
.brand-link:hover { text-decoration: none; }
.nav-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-dark-muted); padding: 14px 12px 6px; opacity: 0.8; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--on-dark-muted); font-weight: 600; font-size: 14.5px; position: relative; }
.nav a:hover { background: var(--ink-soft); color: var(--on-dark); text-decoration: none; }
.nav a.active { background: rgba(0, 220, 130, 0.1); color: var(--brand); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.sidebar-footer { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line-dark); font-size: 13px; color: var(--on-dark-muted); }
.sidebar-footer .email { color: var(--on-dark); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer .by { display: flex; align-items: center; gap: 8px; margin-top: 14px; opacity: 0.75; }
.sidebar-footer .by img { height: 18px; width: auto; }
.sidebar-footer .legal-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-family: var(--mono); font-size: 11.5px; }
.sidebar-footer .legal-links a { color: var(--on-dark-muted); font-weight: 400; }
.main { padding: 32px 40px 56px; min-width: 0; max-width: 1320px; }
.topbar { display: none; }
.backdrop { display: none; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 30; transform: translateX(-100%); transition: transform 0.2s ease; }
  .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, 0.4); }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ink); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line-dark); }
  .topbar .icon-btn { color: var(--on-dark); border-color: var(--line-dark); background: transparent; }
  .main { padding: 22px 16px 44px; }
  .backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 25; }
}

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin: 10px 0 0; max-width: 680px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-text); margin-bottom: 12px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.eyebrow.on-dark { color: var(--brand); }

/* ---------- Hero (dark, like ecortes.cl) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 30px 32px;
  margin-bottom: 20px;
  color: var(--on-dark);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(0, 220, 130, 0.22), transparent 60%),
    linear-gradient(rgba(224, 238, 226, 0.05) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(224, 238, 226, 0.05) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--ink);
  border: 1px solid var(--line-dark);
}
.hero h1 { color: #fff; max-width: 760px; }
.hero h1 .accent { color: var(--brand); }
.hero p { color: var(--on-dark-muted); max-width: 640px; margin-top: 12px; }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-dark); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13px; color: var(--on-dark); margin-bottom: 18px; }
.hero .pill b { background: var(--brand); color: var(--on-brand); border-radius: 999px; padding: 2px 9px; font-size: 11px; font-family: var(--mono); font-weight: 500; }
.hero .copy input { background: rgba(255, 255, 255, 0.04); border-color: var(--line-dark); color: var(--on-dark); }
.hero .copy .btn { background: rgba(255, 255, 255, 0.06); border-color: var(--line-dark); color: var(--on-dark); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; align-items: center; }

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.grid > .card + .card { margin-top: 0; }
.card.dark { background: var(--ink); border-color: var(--line-dark); color: var(--on-dark); box-shadow: none; }
.card.dark .muted, .card.dark .hint, .card.dark .label { color: var(--on-dark-muted); }
.card.danger-zone { border-color: var(--danger); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title h2 { margin: 0; }
.icon-square { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); flex: none; }
.icon-square.brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1150px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px; }
  .stat .value { font-size: 28px; }
}
@media (max-width: 480px) { .stat .icon-square { display: none; } .stat .label { font-size: 11px; } }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .top { display: flex; align-items: center; justify-content: space-between; }
.stat .label { color: var(--muted); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat .value { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat .hint { color: var(--muted); font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.05s; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 8px 24px -10px rgba(0, 220, 130, 0.7); }
.btn.primary:hover { background: var(--brand-bright); border-color: var(--brand-bright); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: var(--ink-soft); }
.btn.outline-dark { background: transparent; border-color: var(--line-dark); color: var(--on-dark); }
.btn.outline-dark:hover { background: rgba(255, 255, 255, 0.06); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn.warn { color: var(--warn); }
.btn.warn:hover { background: var(--warn-soft); border-color: transparent; }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand-text); }
.hero .link-arrow { color: var(--on-dark); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
form.inline { display: inline-flex; margin: 0; }

label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px; }
label.field > small, .field-hint { display: block; color: var(--muted); margin-top: 6px; font-size: 12.5px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--brand-deep); }
.check { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.check input { width: 17px; flex: none; }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.truncate { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--brand-soft); color: var(--brand-text); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.primary { background: var(--info-soft); color: var(--info); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot.ok { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.dot.danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

.alert { padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.success { background: var(--brand-soft); color: var(--brand-text); }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 17px; }

/* Diálogos (el equivalente server-rendered de los modales de la SPA). */
dialog.modal { background: var(--surface); color: var(--text); border-radius: 18px; border: 1px solid var(--line); width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 26px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5); }
dialog.modal::backdrop { background: rgba(12, 17, 14, 0.6); backdrop-filter: blur(2px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h2 { margin: 0; }

/* ---------- Auth (split layout) ---------- */
.auth { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
  position: relative;
  overflow: hidden;
  color: var(--on-dark);
  padding: 40px 56px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(70% 60% at 85% 20%, rgba(0, 220, 130, 0.22), transparent 60%),
    linear-gradient(rgba(224, 238, 226, 0.05) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(90deg, rgba(224, 238, 226, 0.05) 1px, transparent 1px) 0 0 / 38px 38px,
    var(--ink);
}
.auth-hero .content { margin: auto 0; max-width: 560px; }
.auth-hero h1 { font-size: clamp(32px, 4vw, 52px); color: #fff; letter-spacing: -0.035em; }
.auth-hero h1 .accent { color: var(--brand); }
.auth-hero p { color: var(--on-dark-muted); font-size: 17px; margin-top: 18px; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--on-dark); font-weight: 600; }
.auth-points li span { color: var(--on-dark-muted); font-weight: 400; display: block; font-size: 14px; }
.auth-points .icon-square { width: 34px; height: 34px; border-radius: 10px; background: rgba(0, 220, 130, 0.12); border-color: transparent; color: var(--brand); }
.auth-hero .foot { font-family: var(--mono); font-size: 12px; color: var(--on-dark-muted); display: flex; align-items: center; gap: 10px; }
.auth-hero .foot img { height: 20px; }
.auth-panel { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card { padding: 30px; }
.auth-card h2 { font-size: 24px; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 6px; }
.auth-legal { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; font-family: var(--mono); font-size: 12px; }
.auth-legal a { color: var(--muted); font-weight: 400; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 20px 32px; }
  .auth-hero .content { margin: 28px 0 0; }
  .auth-points, .auth-hero .foot { display: none; }
}

/* ---------- Páginas públicas simples (consentimiento OAuth, errores, legales) ---------- */
.public { min-height: 100%; display: flex; flex-direction: column; }
.public-head { background: radial-gradient(60% 140% at 100% 0%, rgba(0, 220, 130, 0.2), transparent 60%), var(--ink); border-bottom: 1px solid var(--line-dark); padding: 16px 24px; }
.public-main { flex: 1; display: grid; place-items: center; padding: 28px 16px; }
.public-card { width: 100%; max-width: 460px; }
.public-card.wide { max-width: 780px; }
.public-card .card { padding: 30px; }
.public-card h1 { font-size: 24px; letter-spacing: -0.025em; margin-bottom: 8px; }
.public-card h1 em { font-style: normal; color: var(--brand-text); }
.public-foot { text-align: center; padding: 18px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.public-foot a { color: var(--brand-text); font-weight: 400; }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 16px 0; font-size: 14px; background: var(--code-bg); }
.box > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.box > div > span:first-child { color: var(--muted); }
.box > div > span:last-child { text-align: right; word-break: break-all; font-family: var(--mono); font-size: 13px; }
ul.dots { margin: 6px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
ul.dots li { position: relative; padding-left: 22px; margin-bottom: 6px; }
ul.dots li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.btns { display: flex; gap: 10px; margin-top: 22px; }
.btns .btn { flex: 1; }
.legal h2 { margin-bottom: 4px; font-size: 22px; }
.legal h3 { margin: 22px 0 4px; font-size: 16px; }
.legal p { color: var(--muted); }

/* ---------- Misc ---------- */
.copy { display: flex; gap: 8px; align-items: stretch; }
.copy input { font-family: var(--mono); font-size: 13.5px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: none; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--brand-text); border-bottom-color: var(--brand); }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 10px; }
.steps li::marker { color: var(--brand-text); font-family: var(--mono); font-weight: 500; }
.codeblock { position: relative; }
.codeblock .btn { position: absolute; top: 6px; right: 6px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 14px; }
.kv > div:nth-child(odd) { color: var(--muted); }
.kv > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .kv { grid-template-columns: 100px 1fr; } }
.server-card { display: flex; flex-direction: column; gap: 12px; }
.server-card.paused { opacity: 0.65; }
.server-card .url { color: var(--muted); font-size: 13.5px; word-break: break-all; font-family: var(--mono); }
.hint-box { border-left: 3px solid var(--brand-deep); padding: 4px 0 4px 12px; color: var(--muted); font-size: 13.5px; }
[hidden] { display: none !important; }

/* ---------- Utilidades (la CSP prohíbe style="…": todo el estilo vive aquí) ---------- */
.mt6 { margin-top: 6px; } .mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; } .mt16 { margin-top: 16px; } .mt18 { margin-top: 18px; } .mt20 { margin-top: 20px; } .mt28 { margin-top: 28px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.mw520 { max-width: 520px; } .mw560 { max-width: 560px; }
.nowrap-flex { flex-wrap: nowrap; }
.pwd-inline { display: flex; gap: 6px; align-items: center; }
.pwd-inline input { width: 190px; }

/* --- Memoria de código --- */
.grow { flex: 1 1 220px; min-width: 0; }
progress { width: 100%; height: 8px; accent-color: var(--brand); }
.pre-wrap { white-space: pre-wrap; margin: 6px 0 0; }
.adr { padding: 12px 0; border-top: 1px solid var(--line); }
.adr:first-of-type { border-top: 0; }
input[type="search"] { width: 100%; }
td code { word-break: break-all; }
.row select { width: auto; }
td progress { min-width: 120px; }

.repo-lista { max-height: 62vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 12px; }
.repo-fila { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.repo-fila:last-child { border-bottom: 0; }
.repo-fila:hover { background: var(--brand-soft); }
.repo-fila[hidden] { display: none; }
.repo-fila.agregado { opacity: .6; cursor: default; }
.repo-fila input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.repo-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.repo-info small { overflow: hidden; text-overflow: ellipsis; }
.mb16 { margin-bottom: 16px; }
.repo-titulo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* --- grafo --- */
.grafo-barra { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.grafo-barra .migas { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; flex: 1 1 240px; }
.grafo-barra .migas i { color: var(--muted); font-style: normal; }
.grafo-buscar { flex: 1 1 320px; flex-wrap: nowrap; }
.grafo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; margin-top: 14px; }
.grafo-wrap { position: relative; height: 66vh; min-height: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; touch-action: none; }
.grafo-wrap canvas { width: 100%; height: 100%; display: block; }
.grafo-tip { position: absolute; max-width: 270px; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: 12.5px; pointer-events: none; display: flex; flex-direction: column; gap: 2px; z-index: 2; }
.grafo-tip[hidden] { display: none; }
.grafo-detalle { max-height: 66vh; overflow: auto; margin: 0; }
.grafo-detalle h3 { margin: 0 0 4px; word-break: break-word; }
.grafo-detalle h4 { margin: 16px 0 6px; font-size: 13px; }
.gd-fila { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.gd-lista { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.grafo-leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; }
.gl-item { display: inline-flex; align-items: center; gap: 6px; }
.gl-punto { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
@media (max-width: 900px) { .grafo-layout { grid-template-columns: 1fr; } .grafo-detalle { max-height: none; } }
