/* ConnectaSec ACCESS — portal (/), administración (/admin) y barra de sesión (shell.html).
   Tema claro (va incrustado en el panel blanco). Sin estilos en línea: CSP style-src 'self'. */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --soft: #f3f4f6;
  --dark: #111827;
  --dark-2: #1f2937;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-soft: #fff7ed;
  --accent-line: #fed7aa;
  --accent-ink: #ffffff;
  --ok: #16a34a;
  --ok-soft: #f0fdf4;
  --ok-line: #bbf7d0;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --warn-line: #fde68a;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-line: #fecaca;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow: 0 1px 3px rgba(17, 24, 39, .08), 0 1px 2px rgba(17, 24, 39, .04);
  --shadow-lg: 0 20px 40px -12px rgba(17, 24, 39, .25), 0 4px 12px rgba(17, 24, 39, .08);
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 22px; margin: 0; font-weight: 650; }
h2 { font-size: 18px; margin: 0; font-weight: 650; }
h3 { font-size: 14px; margin: 0; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.spacer { flex: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- buttons */
.btn, button {
  font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; font-weight: 600; font-size: 14px;
  background: var(--accent); color: var(--accent-ink); line-height: 1.3; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}
.btn:hover, button:hover { background: var(--accent-hover); text-decoration: none; }
.btn.ghost, button.ghost { background: var(--panel); color: var(--ink-2); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn.ghost:hover, button.ghost:hover { background: var(--soft); color: var(--ink); }
.btn.plain, button.plain { background: transparent; color: var(--ink-2); border-color: transparent; padding: 6px 8px; }
.btn.plain:hover, button.plain:hover { background: var(--soft); }
.btn.danger, button.danger { background: var(--danger); color: #fff; }
.btn.danger:hover, button.danger:hover { background: #b91c1c; }
button.danger-ghost { background: var(--panel); color: var(--danger); border-color: var(--danger-line); }
button.danger-ghost:hover { background: var(--danger-soft); }
.btn.sm, button.sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn.xs, button.xs { padding: 2px 7px; font-size: 12px; border-radius: 6px; }
button.icon { padding: 4px 8px; min-width: 30px; }
button:disabled, .btn:disabled { opacity: .5; cursor: default; }
button.link { background: none; border: 0; color: var(--accent-hover); padding: 0; font-weight: 600; }
button.link:hover { background: none; text-decoration: underline; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- forms */
label, .label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 5px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=time],
input:not([type]), select, textarea {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; min-height: 38px;
  transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 80px; resize: vertical; font-family: var(--mono); font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249, 115, 22, .18); }
input:disabled, select:disabled { background: var(--soft); color: var(--muted); }
input.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: .4em; text-align: center; padding: 10px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; color: var(--ink); margin: 6px 0; cursor: pointer; }
.check input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.check.disabled { color: var(--faint); cursor: default; }
.check .soon { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row3 { display: grid; grid-template-columns: 130px 1fr 110px; gap: 0 12px; }
@media (max-width: 560px) { .row2, .row3 { grid-template-columns: 1fr; } }

/* segmented control */
.seg { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { background: transparent; color: var(--muted); border: 0; padding: 6px 12px; font-size: 13px; border-radius: 7px; box-shadow: none; }
.seg button:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.seg.full { display: flex; }
.seg.full button { flex: 1; }
.seg.allow button.on.allow { color: var(--ok); }
.seg.allow button.on.deny { color: var(--danger); }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; font-size: 13px; color: var(--ink-2); margin: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 34px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); transition: transform .15s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- badges, chips */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--soft); color: var(--muted); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.nodot::before { display: none; }
.badge.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.badge.off { color: var(--muted); background: var(--soft); border-color: var(--line); }
.badge.warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.badge.err { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.badge.info { color: var(--info); background: var(--info-soft); border-color: #bfdbfe; }
.badge.ok.live::before { box-shadow: 0 0 0 3px rgba(22, 163, 74, .2); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--soft); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-line); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-right: 6px; vertical-align: 1px; }
.dot.ok { background: var(--ok); }
.dot.warn { background: #f59e0b; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 30px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 99px;
  background: var(--panel); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink); max-width: 100%;
}
.chip .k { color: var(--muted); font-weight: 600; }
.chip .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { background: transparent; color: var(--faint); border: 0; padding: 0; width: 20px; height: 20px; border-radius: 50%; font-size: 13px; line-height: 1; }
.chip button:hover { background: var(--soft); color: var(--danger); }
.chip.include { border-color: #bbf7d0; background: #f7fef9; }
.chip.require { border-color: #bfdbfe; background: #f6f9ff; }
.chip.exclude { border-color: var(--danger-line); background: #fffafa; }
button.add-rule { background: transparent; color: var(--accent-hover); border: 1px dashed var(--accent-line); padding: 3px 10px; font-size: 12.5px; border-radius: 99px; }
button.add-rule:hover { background: var(--accent-soft); }

/* ---------------------------------------------------------------- brand & topbar */
.topbar { background: var(--dark); color: #fff; border-bottom: 1px solid #000; }
.topbar-in { display: flex; align-items: center; gap: 14px; padding: 0 24px; height: 56px; max-width: 1360px; margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: 15px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15);
}
.logo b { color: var(--accent); font-weight: 750; letter-spacing: .04em; font-size: 13px; margin-left: 2px; }
.topbar .sub { color: #9ca3af; font-size: 13px; padding-left: 14px; border-left: 1px solid #374151; }
@media (max-width: 560px) { .topbar .sub { display: none; } .topbar-in { padding: 0 16px; } }

.userbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.user-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.user-pill .av { width: 26px; height: 26px; border-radius: 50%; background: var(--dark); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.user-pill .em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }

/* ---------------------------------------------------------------- portal */
.page { max-width: 1120px; margin: 0 auto; padding: 32px 24px 48px; }
html.embed .page { padding: 16px 16px 24px; }
@media (max-width: 560px) { .page { padding: 20px 16px 32px; } }

.auth-wrap { min-height: calc(100vh - 56px); display: flex; align-items: flex-start; justify-content: center; padding: 56px 16px 32px; }
html.embed .auth-wrap { min-height: 0; padding: 24px 16px; }
.auth {
  width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 28px;
}
@media (max-width: 420px) { .auth { padding: 22px 18px; } .auth-wrap { padding-top: 24px; } }
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head .logo-mark { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; margin-bottom: 12px; }
.auth-head h1 { font-size: 20px; }
.auth-head p { color: var(--muted); margin-top: 4px; }
.auth .seg { margin-bottom: 18px; }
.auth form .btn, .auth form button[type=submit] { width: 100%; margin-top: 4px; padding: 10px 14px; }
.auth .step-title { font-weight: 650; margin-bottom: 4px; }
.auth .step-text { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.auth .back { margin-top: 14px; text-align: center; font-size: 13px; }
.auth-foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 18px; }
.otp-url { display: block; font-family: var(--mono); font-size: 11.5px; word-break: break-all; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0 0 14px; color: var(--ink-2); user-select: all; }
.form-msg { font-size: 13px; border-radius: 8px; padding: 9px 11px; margin-bottom: 14px; }
.form-msg.err { background: var(--danger-soft); color: #991b1b; border: 1px solid var(--danger-line); }
.form-msg.ok { background: var(--ok-soft); color: #166534; border: 1px solid var(--ok-line); }
.form-msg.info { background: var(--info-soft); color: #1e40af; border: 1px solid #bfdbfe; }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .titles { flex: 1; min-width: 220px; }
.page-head p { color: var(--muted); margin-top: 4px; }

.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
@media (max-width: 560px) { .apps-grid { grid-template-columns: 1fr; gap: 10px; } }
.app-card {
  display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 0; padding: 18px; min-height: 150px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm);
  font-weight: 400; white-space: normal; position: relative;
}
.app-card:hover { background: var(--panel); border-color: var(--accent-line); box-shadow: 0 6px 18px -6px rgba(17, 24, 39, .15); }
.app-card:hover .open { color: var(--accent-hover); }
.app-card .top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.app-card .txt { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.app-card .name { font-weight: 650; font-size: 15px; line-height: 1.3; word-break: break-word; }
.app-card .desc { color: var(--muted); font-size: 13px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-card .open { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.app-card.busy { opacity: .7; cursor: progress; }
@media (max-width: 560px) { .app-card { min-height: 0; padding: 14px; flex-direction: row; align-items: center; gap: 12px; } .app-card .top { margin: 0; } .app-card .open { margin: 0 0 0 auto; } .app-card .desc { -webkit-line-clamp: 1; line-clamp: 1; } .app-card .txt { min-width: 0; flex: 1; } }

.avatar {
  width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-weight: 700; font-size: 19px; color: #fff; background: #64748b; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.avatar.img { background: #fff; border: 1px solid var(--line); }
.avatar.sm { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
.avatar.c0 { background: #f97316; } .avatar.c1 { background: #2563eb; } .avatar.c2 { background: #16a34a; }
.avatar.c3 { background: #7c3aed; } .avatar.c4 { background: #0891b2; } .avatar.c5 { background: #db2777; }
.avatar.c6 { background: #475569; } .avatar.c7 { background: #ca8a04; }

.empty { text-align: center; padding: 48px 20px; background: var(--panel); border: 1px dashed var(--line-2); border-radius: 12px; }
.empty .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.empty h3 { font-size: 15px; margin-bottom: 4px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto; }
.empty .btn-row { justify-content: center; margin-top: 16px; }
.foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 32px; }
html.embed .foot { display: none; }

/* ---------------------------------------------------------------- admin layout */
.subbar { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.subbar-in { max-width: 1360px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
html.embed .subbar-in { padding: 0 16px; }
@media (max-width: 560px) { .subbar-in { padding: 0 12px; gap: 8px; } }
.company { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
.company label { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.company select { width: auto; min-width: 200px; max-width: 280px; min-height: 34px; padding: 5px 30px 5px 10px; font-weight: 600; }
@media (max-width: 560px) { .company { width: 100%; } .company select { flex: 1; min-width: 0; max-width: none; } }
.tabs { display: flex; gap: 2px; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: transparent; color: var(--muted); border: 0; border-radius: 0; padding: 0 14px; height: 52px; font-size: 14px; font-weight: 600;
  border-bottom: 2px solid transparent; box-shadow: none;
}
.tabs button:hover { background: transparent; color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { font-size: 11px; background: var(--soft); color: var(--muted); border-radius: 99px; padding: 1px 7px; margin-left: 4px; font-weight: 700; }
@media (max-width: 560px) { .tabs { width: 100%; } .tabs button { height: 44px; padding: 0 10px; font-size: 13px; } }
.subbar .userbox { margin-left: auto; }
html.embed .subbar .who { display: none; }

.main { max-width: 1360px; margin: 0 auto; padding: 24px 24px 64px; }
html.embed .main { padding: 16px 16px 40px; }
@media (max-width: 560px) { .main { padding: 16px 12px 48px; } }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-hover); margin-bottom: 4px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card + .card { margin-top: 16px; }

.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--info-soft); border: 1px solid #bfdbfe; color: #1e3a8a; font-size: 13px; margin-bottom: 16px; }
.callout .ci { flex: none; width: 20px; height: 20px; border-radius: 50%; background: #2563eb; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.callout.warn { background: var(--warn-soft); border-color: var(--warn-line); color: #78350f; }
.callout.warn .ci { background: #d97706; }
.callout.ok { background: var(--ok-soft); border-color: var(--ok-line); color: #14532d; }
.callout.ok .ci { background: var(--ok); }

/* tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650;
  padding: 10px 14px; background: #fafafa; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fcfcfd; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.sel td { background: var(--accent-soft); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.actions { text-align: right; white-space: nowrap; }
.tbl .cell-app { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.tbl .cell-app .t { font-weight: 650; }
.tbl .cell-app .d { color: var(--muted); font-size: 12.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .sub { color: var(--muted); font-size: 12px; }
/* Conectores: versión y actualización automática */
.tbl td.ver { min-width: 190px; }
.tbl .sub.upd-new { color: var(--warn); font-weight: 600; }
.tbl .sub.upd-ok { color: var(--ok); }
.tbl .sub.upd-err { color: var(--danger); max-width: 320px; overflow-wrap: anywhere; }
.upd-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.upd-row .switch { font-size: 12px; }
.tbl tr.off td:not(.actions) { opacity: .6; }
.dest { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); background: var(--soft); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.tbl-empty { padding: 36px 20px; text-align: center; color: var(--muted); }

/* dropdown menu */
.menu-wrap { position: relative; display: inline-block; }
.menu {
  position: fixed; z-index: 40; min-width: 210px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; text-align: left;
}
.menu button { display: flex; width: 100%; justify-content: flex-start; background: transparent; color: var(--ink); border: 0; padding: 8px 10px; font-weight: 500; font-size: 13.5px; border-radius: 7px; }
.menu button:hover { background: var(--soft); }
.menu button.danger-item { color: var(--danger); }
.menu button.danger-item:hover { background: var(--danger-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ---------------------------------------------------------------- policies */
.pol-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .pol-layout { grid-template-columns: 1fr; } }
.pol-app { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pol-app select { width: auto; min-width: 240px; }
.pol-list { display: flex; flex-direction: column; gap: 12px; }
.pol { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.pol.disabled { opacity: .7; }
.pol-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fcfcfd; flex-wrap: wrap; }
.pol-num { width: 26px; height: 26px; border-radius: 7px; background: var(--dark); color: #fff; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pol-head input.pname { flex: 1; min-width: 160px; font-weight: 600; min-height: 34px; padding: 5px 9px; }
.pol-head .seg button { padding: 4px 10px; }
.pol-head .moves { display: flex; gap: 2px; }
.pol-body { padding: 4px 14px 12px; }
.pol-grp { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); align-items: start; }
.pol-grp:last-of-type { border-bottom: 0; }
.pol-grp .gl { font-weight: 650; font-size: 13px; padding-top: 5px; }
.pol-grp .gl small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
@media (max-width: 640px) { .pol-grp { grid-template-columns: 1fr; gap: 4px; } }
.pol-opts { display: flex; align-items: center; gap: 10px; padding: 10px 0 2px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.pol-opts input { width: 90px; min-height: 32px; padding: 4px 8px; }
.pol-warn { font-size: 12.5px; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 8px; padding: 6px 10px; margin-top: 8px; }
.pol-add { margin-top: 12px; width: 100%; padding: 12px; border: 1px dashed var(--line-2); background: var(--panel); color: var(--ink-2); border-radius: 12px; }
.pol-add:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hover); }
.pol-fallback { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pol-fallback .pol-num { background: var(--faint); }
.savebar {
  position: sticky; bottom: 12px; z-index: 15; margin-top: 16px; display: flex; align-items: center; gap: 10px;
  background: var(--dark); color: #fff; border-radius: 12px; padding: 10px 12px 10px 16px; box-shadow: var(--shadow-lg);
}
.savebar .t { flex: 1; font-weight: 600; font-size: 13.5px; }
.savebar button.ghost { background: transparent; color: #e5e7eb; border-color: #4b5563; box-shadow: none; }
.savebar button.ghost:hover { background: var(--dark-2); color: #fff; }
.side-card h3 { margin-bottom: 4px; }
.side-card .field { margin-bottom: 10px; }
.result { margin-top: 12px; border-radius: 10px; padding: 12px; font-size: 13px; }
.result.allow { background: var(--ok-soft); border: 1px solid var(--ok-line); color: #14532d; }
.result.deny { background: var(--danger-soft); border: 1px solid var(--danger-line); color: #7f1d1d; }
.result .big { font-size: 15px; font-weight: 700; margin-bottom: 4px; }

/* ---------------------------------------------------------------- modal, drawer, toasts */
.overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; }
@media (max-width: 560px) { .overlay { padding: 12px 8px; } }
.modal { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; display: flex; flex-direction: column; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-head .titles { flex: 1; }
.modal-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.modal-head .x { background: transparent; color: var(--muted); border: 0; font-size: 20px; padding: 0 6px; line-height: 1; }
.modal-head .x:hover { background: var(--soft); color: var(--ink); }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fafafa; border-radius: 0 0 14px 14px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.form-section { padding-bottom: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; margin-bottom: 0; }
.form-section > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.preset { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.preset button { background: var(--panel); color: var(--ink-2); border: 1px solid var(--line-2); padding: 3px 10px; font-size: 12.5px; border-radius: 99px; }
.preset button:hover { background: var(--soft); }
.preset button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.dest-preview { font-family: var(--mono); font-size: 12.5px; background: var(--soft); border-radius: 8px; padding: 8px 10px; color: var(--ink-2); word-break: break-all; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.days label { margin: 0; }
.days input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.days span { display: inline-flex; width: 40px; height: 32px; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.days input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.days input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* lucide line icons (same set as the ConnectaSec panel) */
svg.lc { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Añadir regla: types on the left, their form on the right */
.modal.rule-picker { max-width: 820px; }
.rule-picker .modal-head { align-items: center; }
.rule-picker .modal-body { padding: 0; display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 420px; }
.rp-seg button { padding: 5px 10px; }
.rp-seg button small { color: var(--faint); font-weight: 500; margin-left: 4px; }
.rp-nav { border-right: 1px solid var(--line); background: #fcfcfd; padding: 10px 8px; }
.rp-nav h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 12px 10px 4px; font-weight: 700; }
.rp-nav h4:first-child { margin-top: 2px; }
.rp-nav button {
  display: flex; width: 100%; justify-content: flex-start; gap: 10px; background: transparent; color: var(--ink-2);
  border: 0; padding: 7px 10px; font-weight: 500; font-size: 13.5px; border-radius: 8px; text-align: left;
}
.rp-nav button svg { color: var(--faint); }
.rp-nav button:hover { background: var(--soft); color: var(--ink); }
.rp-nav button:hover svg { color: var(--muted); }
.rp-nav button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.rp-nav button.on svg { color: var(--accent); }
.rp-cfg { padding: 18px 20px; display: flex; flex-direction: column; min-width: 0; }
.rp-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.rp-head p { color: var(--muted); font-size: 13px; }
.rp-ico {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel);
  display: inline-flex; align-items: center; justify-content: center; color: var(--accent); flex: none;
}
.rp-ico svg.lc { width: 18px; height: 18px; }
.rp-form { flex: 1; }
.rp-form .preset { margin: 0 0 12px; }
.rp-form .field .preset { margin: 0; }
.rp-note { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.rp-note svg { color: var(--faint); margin-top: 2px; }
.rp-preview {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted);
  background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-top: 14px;
}
.rp-preview .chip { padding-right: 10px; }
.grp-pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 99px; border: 1px solid; }
.grp-pill.include { color: #15803d; border-color: var(--ok-line); background: var(--ok-soft); }
.grp-pill.require { color: #1d4ed8; border-color: #bfdbfe; background: var(--info-soft); }
.grp-pill.exclude { color: #b91c1c; border-color: var(--danger-line); background: var(--danger-soft); }
.modal-foot .rp-err { color: var(--danger); font-size: 12.5px; }
.search-box { position: relative; margin-bottom: 10px; }
.search-box svg { position: absolute; left: 11px; top: 11px; color: var(--faint); pointer-events: none; }
.search-box input { padding-left: 34px; }
.pick-list { border: 1px solid var(--line); border-radius: 10px; max-height: 232px; overflow-y: auto; }
.pick-list label {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; font-weight: 500; font-size: 13.5px;
  color: var(--ink); border-bottom: 1px solid var(--line); cursor: pointer;
}
.pick-list label:last-child { border-bottom: 0; }
.pick-list label:hover { background: var(--soft); }
.pick-list input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.pick-list .av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--muted); font-weight: 600; font-size: 11.5px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.pick-list .nm { flex: 1; min-width: 0; }
.pick-list .nm small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-list .tag-sm { font-size: 11.5px; color: var(--muted); background: var(--soft); border-radius: 6px; padding: 1px 6px; }
.pick-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.rp-ext { margin-top: 10px; }
.rp-ext summary { font-size: 12.5px; color: var(--muted); cursor: pointer; }
.rp-inline { display: flex; gap: 8px; margin-top: 8px; }
.rp-at { display: flex; align-items: center; gap: 6px; }
.rp-at span { font-family: var(--mono); color: var(--muted); }
input.rp-iso { max-width: 120px; text-transform: uppercase; }
.radio-cards { display: grid; gap: 8px; }
.radio-cards label {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border: 1px solid var(--line-2);
  border-radius: 10px; cursor: pointer; font-weight: 500; color: var(--ink);
}
.radio-cards label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-cards input { accent-color: var(--accent); margin: 3px 0 0; }
.radio-cards small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
@media (max-width: 720px) {
  .rule-picker .modal-body { grid-template-columns: 1fr; }
  .rp-nav { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 4px; overflow-x: auto; }
  .rp-nav h4 { display: none; }
  .rp-nav button { width: auto; white-space: nowrap; flex: none; }
  .rp-seg button small { display: none; }
}

.code-box { background: var(--dark); color: #e5e7eb; border-radius: 10px; padding: 12px 12px 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.code-box pre { margin: 0; flex: 1; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.code-box button { background: #374151; color: #fff; border: 0; flex: none; }
.code-box button:hover { background: #4b5563; }
.enroll-code { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.enroll-code .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-hover); font-weight: 700; }
.enroll-code .val { font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: .06em; color: var(--ink); word-break: break-all; }
.enroll-code .grow { flex: 1; min-width: 180px; }
.conn-status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); margin-bottom: 16px; font-size: 13.5px; font-weight: 600; }
.conn-status.ok { background: var(--ok-soft); border-color: var(--ok-line); color: #166534; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
.btn .spinner, button .spinner { border-color: rgba(255, 255, 255, .4); border-top-color: #fff; width: 14px; height: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.okmark { width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: none; }
.opt-tabs { margin: 4px 0 10px; }
.steps { margin: 0 0 10px; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.steps li { margin: 2px 0; }

.drawer-ov { position: fixed; inset: 0; background: rgba(17, 24, 39, .3); z-index: 90; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100%; background: var(--panel); z-index: 91; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.drawer .modal-body { overflow-y: auto; flex: 1; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; margin-bottom: 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 16px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line-2); }
.timeline li.ok::before { border-color: var(--ok); }
.timeline li.err::before { border-color: var(--danger); }
.timeline .t { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.timeline .e { font-weight: 600; }
.timeline .d { color: var(--ink-2); font-family: var(--mono); font-size: 12px; word-break: break-all; }

.toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--dark); color: #fff; border-radius: 10px; padding: 11px 14px; font-size: 13.5px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start; animation: tin .18s ease-out; }
.toast.err { background: #7f1d1d; }
.toast.ok .ti { color: #4ade80; }
.toast .ti { font-weight: 800; }
.toast a { color: #fdba74; font-weight: 600; }
@keyframes tin { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filters select { width: auto; min-width: 200px; min-height: 34px; padding: 5px 9px; }
.filters .check { margin: 0; }
.live-note { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.live-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }

.center-msg { max-width: 460px; margin: 64px auto; text-align: center; }
.center-msg .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.center-msg p { color: var(--muted); margin: 6px 0 16px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 48px 0; }

/* ---------------------------------------------------------------- session shell (shell.html, app origin) */
body.shell { display: flex; flex-direction: column; height: 100vh; }
.bar { display: flex; align-items: center; gap: 14px; padding: 8px 16px; background: var(--dark); color: #fff; flex-wrap: wrap; }
.bar .brand { font-weight: 800; letter-spacing: .08em; font-size: 12px; color: var(--accent); margin-right: 6px; }
.bar .res { font-weight: 600; }
.bar .state { font-size: 13px; color: #9ca3af; }
.bar .state.ok { color: #4ade80; }
.bar .state.err { color: #fca5a5; }
.bar .spacer { flex: 1; }
.bar button { padding: 5px 12px; font-size: 13px; }
.bar button.ghost { background: transparent; color: #e5e7eb; border-color: #4b5563; box-shadow: none; }
.bar button.ghost:hover { background: var(--dark-2); }
.view { flex: 1; border: 0; width: 100%; background: #fff; }
.notice { margin: 48px auto; max-width: 520px; padding: 0 16px; text-align: center; }
.hidden-copy { position: fixed; top: -1000px; left: 0; opacity: 0; }
input.bad { border-color: var(--danger); }
.ev-title { margin-bottom: 10px; }
.ev-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding: 10px 0; border-top: 1px solid var(--line); position: sticky; bottom: -18px; background: var(--panel); } /* -18px = padding de .modal-body: que no asome la lista por debajo */
.ev-page-info { font-size: 12.5px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
body.portal .topbar-in { max-width: 1120px; }
.tbl .t { font-weight: 650; }
.side-card form { margin-top: 14px; }
.dur-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dur-row input { width: 120px; }
.dur-row .preset { margin: 0; }
.tbl td .tag { margin-top: 3px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 400; }
@media (max-width: 560px) {
  .page-head .userbox { width: 100%; justify-content: flex-start; flex-wrap: nowrap; }
  .page-head .userbox .user-pill { order: -1; flex: 1; min-width: 0; }
  .subbar .userbox { width: 100%; padding-bottom: 8px; }
  .subbar .userbox .user-pill { flex: 1; min-width: 0; }
  .page-head > button { width: 100%; }
  .pol-app select { min-width: 0; width: 100%; }
  .filters select { min-width: 0; flex: 1; }
}
.tbl td.nowrap { white-space: nowrap; }
.conn-status .muted { font-weight: 500; }
@media (max-width: 1200px) {
  .tbl th, .tbl td { padding-left: 10px; padding-right: 10px; }
  .tbl .cell-app { min-width: 180px; }
  .tbl .cell-app .d { max-width: 200px; }
}
/* SSO */
.seg.full button { white-space: normal; line-height: 1.25; }
.btn.full, button.full { width: 100%; padding: 10px 14px; }
.sp-data { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px 14px; margin: 16px 0 0; font-size: 13px; align-items: center; }
.sp-data dt { color: var(--muted); font-weight: 600; }
.sp-data dd { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.sp-data code { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 640px) { .sp-data { grid-template-columns: 1fr; gap: 4px; } .sp-data dd { margin-bottom: 8px; } }
.hint code { font-family: var(--mono); font-size: 12px; background: var(--soft); padding: 1px 4px; border-radius: 4px; }
.ellip { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doms { display: flex; flex-wrap: wrap; gap: 4px; }
#tab-sso .card + .card { margin-top: 16px; }
.auth { max-width: 460px; }
.auth .seg button { padding: 6px 8px; }

/* ¿Llega el conector? (2026-10-02) */
.callout.reach .grow { flex: 1; min-width: 0; }
.callout.reach .reach-fix { margin-top: 10px; }
.reach-fix .seg { margin-bottom: 8px; }
.reach-fix .hint { color: #78350f; }
button.link.reach-link { color: #b45309; font-size: 12px; }

/* Añadir aplicación: wizard (Destino → Presentación → Revisar) */
.sr-only { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.modal.app-wizard { max-width: 820px; }
.app-wizard .modal-body { padding: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 440px; }
.wz-steps { list-style: none; margin: 0; padding: 16px 10px; border-right: 1px solid var(--line); background: #fcfcfd; }
.wz-steps li { position: relative; margin-bottom: 6px; }
.wz-steps li + li::before { content: ""; position: absolute; left: 22px; top: -6px; height: 8px; border-left: 1px solid var(--line-2); }
.wz-steps button, .wz-steps li.later {
  display: flex; width: 100%; gap: 10px; align-items: flex-start; justify-content: flex-start; text-align: left; white-space: normal;
  background: transparent; color: var(--muted); border: 0; padding: 9px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
}
.wz-steps button:disabled { opacity: 1; }
.wz-steps small { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }
.wz-steps .n {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--panel); flex: none; color: var(--muted);
}
.wz-steps .n svg.lc { width: 13px; height: 13px; }
.wz-steps li.on button { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.wz-steps li.on .n { border-color: var(--accent); color: var(--accent); }
.wz-steps li.done button { color: var(--ink-2); }
.wz-steps li.done button:not(:disabled):hover { background: var(--soft); }
.wz-steps li.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.wz-steps li.later { margin-top: 12px; border: 1px dashed var(--line-2); color: var(--faint); }
.wz-steps li.later::before { display: none; }
.wz-steps li.later .n { border-style: dashed; color: var(--faint); }
.wz-pane { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wz-title { margin-bottom: 12px; }
.wz-title h3 { font-size: 16px; }
.wz-title p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.url-row { display: flex; gap: 8px; align-items: stretch; }
.url-row .url-scheme { width: auto; flex: none; min-height: 42px; font-family: var(--mono); font-weight: 600; }
.url-row .url-box { flex: 1; min-width: 0; }
.url-box { position: relative; }
.url-box svg { position: absolute; left: 12px; top: 13px; color: var(--faint); pointer-events: none; }
.url-box input { padding-left: 36px; font-family: var(--mono); min-height: 42px; }
.url-parts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }
.url-parts span { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; }
.url-parts span.url-hint { background: none; border: 0; padding: 0; }
.url-parts b { color: var(--ink-2); font-weight: 600; font-family: var(--mono); }
.url-parts.bad span.url-hint { color: var(--danger); }
.url-parts span.url-warn { color: var(--warn); font-weight: 500; }
.tls-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.tls-row .tx { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; font-weight: 500; }
.tls-row .tx svg { color: var(--faint); margin-top: 2px; }
.tls-row small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.conn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.conn-cards .callout { grid-column: 1 / -1; margin: 0; }
button.conn {
  display: flex; align-items: center; gap: 10px; text-align: left; justify-content: flex-start; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-weight: 500; white-space: normal;
}
button.conn:hover { background: var(--soft); }
button.conn > svg { color: var(--faint); }
button.conn .cn { display: flex; flex-direction: column; min-width: 0; flex: 1; }
button.conn .cn b { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
button.conn .cn small { font-size: 12px; color: var(--muted); }
button.conn.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
button.conn.on > svg { color: var(--accent); }
.wz-two { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; align-items: start; }
.wz-prev .label { margin-bottom: 8px; }
.wz-prev .app-card { min-height: 0; }
.logo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.logo-zone {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 12px; border: 1px dashed var(--line-2);
  border-radius: 10px; cursor: pointer; font-weight: 500; background: var(--panel);
}
.logo-zone:hover, .logo-zone.over { border-color: var(--accent); background: var(--accent-soft); }
.logo-zone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.logo-prev { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--faint); background: var(--soft); overflow: hidden; flex: none; }
.logo-prev img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.logo-prev svg.lc { width: 20px; height: 20px; }
.lz-t { display: flex; flex-direction: column; }
.lz-t b { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-hover); font-weight: 600; font-size: 13.5px; }
.lz-t small { color: var(--muted); font-size: 12px; }
.wz-review { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.wz-review > div { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: center; font-size: 13.5px; }
.wz-review > div:last-child { border-bottom: 0; }
.wz-review .k { color: var(--muted); display: flex; gap: 8px; align-items: center; }
.wz-review .k svg { color: var(--faint); }
.wz-review .v { overflow-wrap: anywhere; }
.wz-review .v code { font-family: var(--mono); font-size: 12.5px; background: var(--soft); padding: 1px 6px; border-radius: 6px; }
.wz-review .v small { color: var(--muted); }
.wz-review button { gap: 6px; }
.wz-app { display: flex; gap: 10px; align-items: center; }
.wz-app small { display: block; color: var(--muted); font-size: 12.5px; }
.wz-opts { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.modal.app-done { max-width: 580px; }
.done-app { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.done-app code { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.done-q { font-weight: 650; font-size: 15px; margin: 6px 0 10px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
button.choice {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 6px; text-align: left; white-space: normal;
  padding: 14px; border-radius: 12px; font-weight: 650; font-size: 14px;
}
button.choice small { font-weight: 400; font-size: 12.5px; }
button.choice.ghost small { color: var(--muted); }
button.choice svg.lc { width: 18px; height: 18px; }
button.link.no-pol { color: #b45309; font-size: 12px; display: block; }
.pol-add.attn { border-color: var(--accent); color: var(--accent-hover); background: var(--accent-soft); animation: attn 1.6s ease-out; }
@keyframes attn { 0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .45); } 100% { box-shadow: 0 0 0 14px rgba(249, 115, 22, 0); } }
@media (max-width: 720px) {
  .app-wizard .modal-body { grid-template-columns: 1fr; }
  .wz-steps { display: flex; gap: 4px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .wz-steps li { margin: 0; flex: none; }
  .wz-steps small, .wz-steps li + li::before, .wz-steps li.later { display: none; }
  .wz-two, .choices { grid-template-columns: 1fr; }
  .wz-review > div { grid-template-columns: 1fr auto; }
  .wz-review .k { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- listas de correo (import) */
.import-summary { display: grid; gap: 6px; margin-top: 4px; }
.import-summary .sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.import-summary .callout { margin: 8px 0 0; }
.tag.link { cursor: pointer; }

/* Portal con la marca de la empresa (dominio propio) */
.brand-logo { display: block; object-fit: contain; }
.logo .logo-img { height: 28px; max-width: 160px; border-radius: 6px; background: #fff; padding: 2px; }
.auth-head .auth-logo { height: 52px; max-width: 220px; margin: 0 auto 12px; }
.seg.single { display: none; }
.stack { display: grid; gap: 16px; }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; margin-top: 12px; }
@media (max-width: 860px) { .portal-grid { grid-template-columns: 1fr; } }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 44px; height: 36px; padding: 2px; border-radius: 8px; }
.color-row input[type=text] { width: 120px; }
.portal-prev { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.pp-card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.pp-logo { max-height: 44px; max-width: 180px; object-fit: contain; }
.pp-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--dark); color: #fff; display: grid; place-items: center; font-weight: 700; }
.pp-btn { color: #fff; border-radius: 8px; padding: 8px 18px; font-weight: 600; width: 100%; }
.pp-foot { color: var(--faint); font-size: 11px; }
.kv { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.kv > .sub:first-child { width: 80px; }
.dns-tbl { margin: 8px 0; }
