/* CerberoShield - Inteligencia IP/ASN
 * CSS extraído para permitir una CSP sin style-src unsafe-inline.
 */

        :root { --accent: #58a6ff; --bg-main: #0a0e14; --bg-panel: #161b22; --border: #30363d; --success: #238636; }
        *, *::before, *::after { box-sizing: border-box; }
        html { -webkit-text-size-adjust: 100%; overflow-y: scroll; scrollbar-gutter: stable; }
        body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--bg-main); color: var(--text); margin: 0; padding: 20px; line-height: 1.6; overflow-x: hidden; }
        img, svg, canvas { max-width: 100%; height: auto; }
        .container { width: min(100%, 1200px); max-width: 1200px; margin: 0 auto; background: var(--bg-panel); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.8); }
        .inner-padding { padding: 30px; }
        .header-img { width: 100%; display: block; border-bottom: 1px solid var(--border); }

        .hero-main { color: var(--accent); font-weight: 900; font-size: 2em; letter-spacing: 4px; text-align: center; margin: 30px 0 0; text-transform: uppercase; text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.4); }
        .hero-sub { color: var(--muted); font-size: 0.85em; letter-spacing: 2px; text-align: center; margin: 0 auto 30px; text-transform: uppercase; font-weight: 600; opacity: 0.9; border-bottom: 1px solid var(--border); padding-bottom: 20px; width: 80%; }

        .whois-section { background: var(--bg-soft); padding: 25px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 25px; }
        .search-container { display: flex; gap: 10px; margin-bottom: 20px; }
        .search-box { flex-grow: 1; min-width: 0; padding: 14px; background: var(--bg-main); border: 1px solid var(--border); border-left: 4px solid var(--accent); color: var(--text-strong); border-radius: 6px; font-size: 1em; outline: none; transition: border-color 0.3s; }
        .search-box:focus { border-color: var(--accent); }
        .grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
        .grid-6 > * { min-width: 0; }
        .grid-6.grid-whois { grid-template-columns: 1.12fr 0.86fr 1.02fr; }
        .data-card { background: var(--bg-panel); padding: 18px; border-radius: 8px; border: 1px solid var(--border); transition: transform 0.2s; min-width: 0; }
        .data-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
        .data-card h3 { margin: 0 0 10px 0; color: var(--accent); font-size: 0.75em; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border); padding-bottom: 5px; }
        .label { color: var(--muted); display: block; font-size: 0.7em; font-weight: bold; margin-top: 8px; text-transform: uppercase; }
        .data-value { font-size: 1em; color: var(--text); word-break: break-all; }
        .ip-scroll { max-height: 140px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 5px; background: var(--bg-main); padding: 10px; border-radius: 6px; margin-top: 10px; border: 1px solid #333; }
        .ip-badge { background: var(--surface-raised); border: 1px solid var(--border); color: var(--accent); padding: 2px 8px; border-radius: 4px; font-family: monospace; font-size: 0.8em; }
        .ping-console { grid-column: span 3; background: #000; color: #00ff00; padding: 15px; font-family: 'Courier New', monospace; border-radius: 8px; border: 1px solid #333; margin-top: 10px; font-size: 0.85em; }
        .intelligence-bar { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 25px; background: var(--bg-soft); padding: 25px; border-left: 5px solid var(--accent); margin-bottom: 25px; border-radius: 4px; align-items: center; }
        .intelligence-bar > * { min-width: 0; }
        .intel-item strong { color: var(--accent); font-size: 0.9em; text-transform: uppercase; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
        .intel-content { font-size: 1em; color: var(--text); line-height: 1.4; }
        .intel-code { background: #000; color: var(--text-strong); padding: 3px 8px; border-radius: 4px; font-family: monospace; font-size: 0.95em; border: 1px solid #333; display: inline-block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
        .filter-input { width: 100%; padding: 14px; background: var(--bg-main); border: 1px solid var(--border); border-left: 4px solid var(--success); color: var(--text-strong); border-radius: 6px; box-sizing: border-box; margin-bottom: 15px; }
        table { width: 100%; border-collapse: collapse; margin-top: 10px; }
        th { text-align: left; padding: 12px; background: var(--surface-raised); color: var(--accent); font-size: 0.85em; text-transform: uppercase; border-bottom: 2px solid var(--border); }
        td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 0.95em; }
        .file-row:hover { background: rgba(255,255,255,0.03); }
        .file-link { color: var(--accent); font-weight: bold; text-decoration: none; transition: 0.2s; }
        .file-link:hover { text-decoration: underline; color: var(--info); }
        .footer-bar { background: var(--bg-soft); padding: 20px 30px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 0.85em; color: var(--muted); }
        .footer-left { display: flex; flex-direction: column; gap: 7px; }
        .footer-stats { font-size: 0.82em; color: var(--muted); letter-spacing: 0.2px; }
        .footer-stats .stats-number { color: var(--success); font-weight: 800; }
        .footer-stats .footer-separator { color: var(--border); margin: 0 8px; }
        .status-dot { width: 10px; height: 10px; background: var(--success); border-radius: 50%; display: inline-block; margin-right: 10px; box-shadow: 0 0 10px var(--success); animation: pulse 2s infinite; }
        @keyframes pulse { 0% { opacity: 1; transform: scale(0.95); } 50% { opacity: 0.5; transform: scale(1.1); } 100% { opacity: 1; transform: scale(0.95); } }

        .btn-whois { background: var(--success); color: var(--text-strong); border: none; padding: 0 25px; border-radius: 6px; font-weight: bold; cursor: pointer; transition: background 0.2s; min-height: 48px; white-space: nowrap; }
        .btn-whois:hover { background: var(--success); }
        .btn-whois:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; opacity: 0.65; }
        .btn-whois:disabled:hover { background: var(--border); }
        .copy-btn { background: var(--surface-raised); border: 1px solid var(--border); color: var(--text); padding: 8px 15px; border-radius: 4px; cursor: pointer; font-size: 0.8em; font-weight: bold; transition: all 0.2s ease; text-decoration: none; display: inline-block; }
        .copy-btn:hover { background: var(--border); border-color: var(--muted); }
        .btn-action { padding: 0 20px; border-radius: 6px; text-decoration: none; font-size: 0.8em; font-weight: bold; display: flex; align-items: center; justify-content: center; transition: background 0.2s; color: var(--text-strong); border: 1px solid transparent; min-height: 48px; white-space: nowrap; }
        .btn-myip { background: var(--primary); border: 1px solid var(--primary); }
        .btn-myip:hover { background: var(--accent); }
        .btn-reset { background: var(--border); border: 1px solid var(--border); }
        .btn-reset:hover { background: #3b434d; border-color: var(--muted); }

        .peers-box { max-height: 50px; overflow-y: auto; font-size: 0.85em; margin-top: 5px; color: var(--muted); line-height: 1.4; scrollbar-width: thin; scrollbar-color: var(--border) var(--bg-soft); }
        .peers-box::-webkit-scrollbar { width: 6px; }
        .peers-box::-webkit-scrollbar-thumb { background-color: var(--border); border-radius: 3px; }
        .peer-link { color: var(--accent); text-decoration: none; font-weight: bold; transition: color 0.2s; }
        .peer-link:hover { color: var(--text-strong); text-decoration: underline; }

        .dualstack-box { background: var(--bg-soft); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 16px; margin: -5px 0 20px 0; }
        .dualstack-title { color: var(--accent); font-size: 0.8em; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
        .dualstack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
        .dualstack-item { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; padding: 12px; min-width: 0; }
        .dualstack-item .data-value { font-family: monospace; font-size: 0.95em; }
        .dualstack-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
        .dualstack-note { color: var(--muted); font-size: 0.8em; margin-top: 12px; line-height: 1.4; }
        .dualstack-error { color: var(--degraded); }
        .dualstack-ok { color: var(--success); }
        .security-head-grid, .security-split { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 15px; align-items: start; }
        .security-head-grid h3 { margin-top: 0; }
        .security-head-tool { border-left: 1px solid var(--border); padding-left: 15px; min-width: 0; white-space: nowrap; }
        .security-tool { border-left: 1px solid var(--border); padding-left: 15px; min-width: 0; }
        .security-tool form { margin: 12px 0 0 0; }
        .security-tool .copy-btn { text-align: center; min-width: 120px; }
        .plain-info-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 16px;
            margin: 0 0 22px;
        }
        .plain-info-card {
            padding: 20px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-soft);
            min-width: 0;
        }
        .plain-info-card h2 {
            display: flex;
            align-items: center;
            gap: 9px;
            margin: 0 0 15px;
            color: var(--text-strong);
            font-size: 1.02rem;
            letter-spacing: .015em;
            text-transform: uppercase;
        }
        .plain-metrics {
            display: grid;
            gap: 10px;
            margin: 0;
        }
        .plain-metric-row,
        .plain-format-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }
        .plain-metric-row dt,
        .plain-format-label {
            color: var(--muted);
            font-weight: 650;
        }
        .plain-metric-row dd {
            margin: 0;
            color: var(--text-strong);
            font-weight: 800;
            font-variant-numeric: tabular-nums;
        }
        .plain-format-list {
            display: grid;
            gap: 10px;
        }
        .plain-format-row code {
            max-width: 100%;
            padding: 5px 8px;
            border: 1px solid var(--border);
            border-radius: 5px;
            background: var(--bg-panel);
            color: var(--text-strong);
            font-size: .86rem;
            overflow-wrap: anywhere;
        }
        .plain-status-pill {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 4px 9px;
            border: 1px solid rgba(22, 163, 74, .28);
            border-radius: 999px;
            background: rgba(22, 163, 74, .09);
            color: var(--success, #16803c);
            font-size: .88rem;
            font-weight: 800;
        }
        .plain-status-pill.is-offline {
            border-color: rgba(218, 54, 51, .30);
            background: rgba(218, 54, 51, .10);
            color: var(--danger, #da3633);
        }
        .plain-sync-dot {
            position: relative;
            width: 8px;
            height: 8px;
            flex: 0 0 8px;
            border-radius: 50%;
            background: currentColor;
            box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
            animation: plain-sync-heartbeat 1.8s ease-in-out infinite;
        }
        .plain-sync-dot::after {
            content: '';
            position: absolute;
            inset: -5px;
            border: 2px solid currentColor;
            border-radius: 50%;
            opacity: 0;
            transform: scale(.45);
            animation: plain-sync-ripple 1.8s ease-out infinite;
        }
        .plain-status-pill.is-offline .plain-sync-dot {
            box-shadow: 0 0 0 3px rgba(218, 54, 51, .14), 0 0 11px rgba(218, 54, 51, .42);
        }
        .plain-status-pill.is-offline .plain-sync-dot::after {
            border-color: var(--danger, #da3633);
        }
        @keyframes plain-sync-heartbeat {
            0%, 100% { opacity: 1; transform: scale(.92); }
            45% { opacity: .68; transform: scale(1.18); }
        }
        @keyframes plain-sync-ripple {
            0% { opacity: .48; transform: scale(.45); }
            70%, 100% { opacity: 0; transform: scale(1.18); }
        }
        .plain-filter-label {
            display: block;
            margin-bottom: 6px;
            color: var(--text-strong);
            font-weight: 700;
        }
        .plain-table-wrap {
            width: 100%;
            overflow-x: auto;
            border: 1px solid var(--border);
            border-radius: 8px;
        }
        .plain-list-table {
            width: 100%;
            min-width: 850px;
            margin-top: 0;
            border-collapse: collapse;
        }
        .plain-list-table th,
        .plain-list-table td {
            padding: 12px;
            border-bottom: 1px solid var(--border);
            text-align: left;
            white-space: nowrap;
        }
        .plain-list-table th {
            color: var(--accent);
            background: var(--surface-raised);
            font-size: .82rem;
            text-transform: none;
            border-bottom: 1px solid var(--border);
        }
        .plain-list-table tbody tr:last-child td { border-bottom: 0; }
        .plain-list-table tbody tr:hover td { background: rgba(var(--accent-rgb), .035); }
        .plain-size-col,
        .plain-hits-col {
            width: 1%;
            text-align: right !important;
        }
        .plain-hits-col {
            font-variant-numeric: tabular-nums;
            font-weight: 800;
        }
        .plain-action-col { width: 1%; }
        .plain-list-table th.plain-action-col { text-align: center; }
        .plain-list-table td.plain-action-col { text-align: right; }
        .plain-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 6px;
            margin-left: auto;
        }
        .plain-btn {
            display: inline-flex;
            min-height: 42px;
            align-items: center;
            justify-content: center;
            padding: 8px 12px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--surface-raised);
            color: var(--text-strong);
            font: inherit;
            font-weight: 750;
            line-height: 1;
            text-decoration: none;
            cursor: pointer;
            transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
        }
        .plain-btn:hover {
            border-color: var(--accent);
            background: var(--surface-hover);
            transform: translateY(-1px);
        }
        .plain-btn-download {
            border-color: rgba(var(--accent-rgb), .38);
            background: var(--accent-soft);
            color: var(--accent);
        }
        .plain-region-entry {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .plain-country-flag {
            width: 24px;
            height: 18px;
            flex: 0 0 auto;
            border: 1px solid rgba(var(--accent-rgb), .18);
            border-radius: 3px;
            object-fit: cover;
            box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
        }
        #plainListRows.is-limited tr:nth-child(n+11) { display: none; }
        #plainListRows tr[hidden] { display: none !important; }
        .plain-empty {
            padding: 24px !important;
            color: var(--muted);
            text-align: center !important;
            white-space: normal !important;
        }
        @media (prefers-reduced-motion: reduce) {
            .plain-sync-dot,
            .plain-sync-dot::after { animation: none; }
            .plain-sync-dot::after { display: none; }
        }

        @media (max-width: 900px) {
            .plain-info-grid { grid-template-columns: 1fr; }
            .plain-metric-row, .plain-format-row { align-items: flex-start; }
            body { padding: 10px; }
            .container { border-radius: 10px; }
            .inner-padding { padding: 18px; }
            .hero-main { font-size: 1.55rem; letter-spacing: 2px; margin-top: 20px; }
            .hero-sub { width: auto; margin: 0 18px 22px 18px; font-size: 0.78em; letter-spacing: 1px; padding-bottom: 16px; }
            .whois-section { padding: 16px; }
            .search-container { flex-direction: column; }
            .search-box, .btn-whois, .btn-action { width: 100%; min-height: 46px; }
            .grid-6, .grid-6.grid-whois, .intelligence-bar, .dualstack-grid { grid-template-columns: 1fr; }
            .grid-6 > .data-card, .ping-console, .data-card[style*="grid-column"] { grid-column: 1 / -1 !important; }
            .data-card > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
            .security-head-grid, .security-split { grid-template-columns: 1fr; }
            .security-head-tool, .security-tool { border-left: 0; border-top: 1px solid var(--border); padding-left: 0; padding-top: 12px; }
            .security-head-tool { white-space: normal; }
            table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
            th, td { padding: 9px; }
            .copy-btn { width: auto; max-width: 100%; white-space: normal; }
            .footer-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
        }

        @media (max-width: 520px) {
            body { padding: 6px; }
            .inner-padding { padding: 14px; }
            .hero-main { font-size: 1.25rem; letter-spacing: 1.4px; }
            .hero-sub { margin-left: 14px; margin-right: 14px; font-size: 0.72em; }
            .whois-section, .intelligence-bar { padding: 14px; }
            .data-card { padding: 14px; }
            .ip-badge { font-size: 0.76em; }
        }
    

        /* Ajuste local: ventana de contacto más limpia en Inicio */
        .cerbero-contact-card {
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .cerbero-contact-label,
        .cerbero-contact-email {
            width: 100%;
            text-align: center;
        }

        .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

        .cerbero-contact-email {
            display: inline-block;
        }

        .cerbero-contact-action {
            display: none !important;
        }
    


/* OWASP/CSP: sustituciones de estilos que antes estaban incrustados en HTML. */
.ip-empty-note { color: #8b949e; font-size: .85em; }
.ip-badge-link { text-decoration: none; }
.intel-error { color: #fff; padding: 15px; background: #7a1f22; border-radius: 6px; border: 1px solid #ffb4ab; margin-bottom: 20px; text-align: center; font-weight: 700; }
.asn-number, .accent-value { color: var(--accent); font-weight: 700; }
.asn-number { font-size: 1.2em; }
.compact-value { font-size: .85em; line-height: 1.2; }
.abuse-email { font-size: .9em; word-break: break-all; }
.action-row { margin-top: 10px; }
.action-row-large { margin-top: 12px; }
.action-row-small { margin-top: 8px; }
.copy-btn-block { display: block; width: 100%; text-align: center; box-sizing: border-box; }
.copy-btn-truncate { color: #c9d1d9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 8px 5px; }
.label-divider { margin-top: 15px; display: block; border-top: 1px solid #30363d; padding-top: 8px; }
.label-spaced { margin-top: 8px; }
.topology-btn { cursor: pointer; width: 100%; border-color: var(--accent); color: var(--accent); }
.bgp-status { font-weight: 700; }
.bgp-status.is-active { color: #2ea043; }
.bgp-status.is-inactive { color: #f85149; }
.peers-box-compact { max-height: 40px; margin-bottom: 8px; }
.data-card-wide { grid-column: span 3; }
.dns-resolution-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 12px; }
@media (max-width: 700px) { .dns-resolution-grid { grid-template-columns: 1fr; } }
