/* ============================================================
   ipConsulta — design system 2026
   Dark (padrão) + Light, identidade ipHosting (#EB6608).
   As classes legadas dos fragmentos AJAX (.section, .rows, .row,
   .label, .value, tabelas, terminal etc.) são re-estilizadas aqui —
   o HTML do servidor não muda.
   ============================================================ */

:root {
    --accent: #EB6608;
    --accent-bright: #ff8a2a;
    --accent-soft: rgba(235, 102, 8, .13);
    --accent-border: rgba(235, 102, 8, .34);

    --bg: #101014;
    --bg-raise: #17171d;
    --bg-panel: rgba(23, 23, 29, .78);
    --bg-card: rgba(28, 28, 36, .62);
    --bg-input: #0a0a0e;
    --bg-terminal: #0a0a0e;

    --border: #26262e;
    --border-soft: rgba(255, 255, 255, .07);

    --text: #e9e9ee;
    --muted: #9a9aa6;
    --text-muted: #9a9aa6;   /* alias usado pelos fragmentos legados */
    --text-main: #e9e9ee;

    --green: #34d399;
    --yellow: #fbbf24;
    --red: #f87171;
    --orange: var(--accent); /* alias legado */
    --border-subtle: var(--border-soft); /* alias legado */
    --border-glow: var(--accent-border); /* alias legado */

    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-ui: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius: 14px;
    --radius-lg: 20px;
    --shadow-1: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-2: 0 24px 60px rgba(0, 0, 0, .45);
    --terminal-ink: #4ade80;
    color-scheme: dark;
}

html[data-theme="light"] {
    --accent: #c85200;            /* laranja legível sobre claro */
    --accent-bright: #EB6608;
    --accent-soft: rgba(235, 102, 8, .10);
    --accent-border: rgba(200, 82, 0, .38);

    --bg: #f5f5f7;
    --bg-raise: #ffffff;
    --bg-panel: rgba(255, 255, 255, .86);
    --bg-card: rgba(255, 255, 255, .92);
    --bg-input: #ffffff;
    --bg-terminal: #101014;       /* o terminal continua escuro no tema light */

    --border: #dcdce2;
    --border-soft: rgba(16, 16, 20, .10);

    --text: #1b1b22;
    --muted: #5b5b68;
    --text-muted: #5b5b68;
    --text-main: #1b1b22;

    --green: #0f8a5f;
    --yellow: #a16207;
    --red: #cc3340;

    --shadow-1: 0 8px 24px rgba(20, 20, 30, .10);
    --shadow-2: 0 20px 48px rgba(20, 20, 30, .14);
    color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background .25s ease, color .25s ease;
}
button, input, textarea, select { font: inherit; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
::selection { background: var(--accent); color: #fff; }

/* fundo: malha de pontos + bloom laranja (herança do blueprint antigo, mais sutil) */
body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: radial-gradient(var(--border-soft) 1px, transparent 1px);
    background-size: 26px 26px;
    z-index: -2; pointer-events: none;
}
body::after {
    content: '';
    position: fixed; top: -22%; left: -12%;
    width: 62vw; height: 62vh;
    background: radial-gradient(circle, rgba(235, 102, 8, .09) 0%, transparent 62%);
    z-index: -1; pointer-events: none;
}

.wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(18px, 4vw, 40px) 0 clamp(42px, 6vw, 70px);
}

/* ---------- hero ---------- */
.hero {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(340px, 470px) minmax(250px, 1fr);
    gap: clamp(14px, 2vw, 24px);
    align-items: center;
    margin-bottom: clamp(20px, 3.4vw, 34px);
    animation: heroIn .5s ease both;
}
@keyframes heroIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.brand { display: flex; gap: 18px; align-items: center; min-width: 0; justify-self: start; }
.brand-logo {
    display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 0 10px rgba(235, 102, 8, .35));
    flex: 0 0 auto;
}
.brand-logo svg { width: clamp(46px, 6vw, 58px); height: clamp(46px, 6vw, 58px); }
.brand-logo .logo-stroke { stroke: var(--text); }
.brand-text h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -1.4px;
    line-height: 1;
}
.brand-text h1 span { color: var(--accent-bright); }
.brand-text .subtitle {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    font-family: var(--font-mono);
}

/* card "Seu IP atual" */
.current-ip-card {
    position: relative;
    justify-self: center;
    width: min(100%, 470px);
    padding: 20px 56px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--accent-border);
    background:
        radial-gradient(circle at 16% 8%, var(--accent-soft), transparent 42%),
        var(--bg-panel);
    box-shadow: var(--shadow-2);
    backdrop-filter: blur(14px);
    text-align: center;
    transition: transform .2s ease, border-color .2s ease;
}
.current-ip-card:hover { transform: translateY(-2px); }
.current-ip-top {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--muted);
    font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 8px;
}
.current-ip-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px var(--green);
    animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.current-ip-value {
    display: block;
    font-family: var(--font-mono);
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 700;
    letter-spacing: -1.2px;
    overflow-wrap: anywhere;
    text-shadow: 0 0 24px rgba(235, 102, 8, .35);
}
.current-ip-copy-btn {
    position: absolute; top: 12px; right: 12px;
    width: 36px; height: 36px;
    border-radius: 11px;
    border: 1px solid var(--border-soft);
    background: var(--bg-input);
    color: var(--muted);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; transition: .18s ease;
}
.current-ip-card:hover .current-ip-copy-btn,
.current-ip-copy-btn:focus-visible { opacity: 1; }
.current-ip-copy-btn:hover { color: var(--accent-bright); border-color: var(--accent-border); }
.current-ip-copy-btn.copied { opacity: 1; color: var(--green); border-color: var(--green); }

/* caixa de suporte + toggle de tema */
.support-box {
    justify-self: end;
    display: grid; gap: 10px;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 12.5px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-1);
    min-width: 264px;
}
.support-line { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-width: 0; }
.support-site { color: var(--accent-bright); font-weight: 700; text-decoration: none; }
.support-site:hover { text-decoration: underline; }
.whatsapp-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--green); font-weight: 700; text-decoration: none;
    background: rgba(52, 211, 153, .10);
    padding: 4px 10px; border-radius: 8px;
    border: 1px solid rgba(52, 211, 153, .25);
    transition: transform .15s ease;
}
.whatsapp-link:hover { transform: translateY(-1px); }

.theme-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--border-soft);
    background: var(--bg-input);
    color: var(--muted);
    border-radius: 999px;
    padding: 5px 12px;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 12px; font-weight: 600;
    transition: color .18s ease, border-color .18s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent-border); }
.theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ---------- painel principal + abas ---------- */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-top: 1px solid var(--accent-border);
    border-radius: clamp(18px, 2vw, 24px);
    padding: clamp(16px, 2.6vw, 26px);
    box-shadow: var(--shadow-2);
    backdrop-filter: blur(16px);
}

.mode-tabs {
    position: sticky; top: 10px; z-index: 20;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 20px;
    padding: 6px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--bg-raise);
    box-shadow: var(--shadow-1);
    backdrop-filter: blur(18px);
}
.mode-tab {
    min-width: 0;
    position: relative;
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    height: 42px;
    padding: 0 8px;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(10.5px, .8vw, 12.5px);
    text-transform: uppercase;
    letter-spacing: .6px;
    border-radius: 999px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color .16s ease, background .16s ease, transform .16s ease;
}
.mode-tab:hover { color: var(--text); background: var(--accent-soft); }
.mode-tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-bright), #d45500);
    box-shadow: 0 8px 22px rgba(235, 102, 8, .35);
}
.mode-tab:active { transform: scale(.98); }
.mode-tab:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

/* ---------- busca (prompt de terminal — assinatura) ---------- */
.search { display: flex; gap: 12px; align-items: stretch; }
.search-field {
    position: relative;
    flex: 1;
    display: flex; align-items: center;
    min-width: 0;
}
.search-field::before {
    content: '❯';
    position: absolute; left: 18px;
    color: var(--accent-bright);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 17px;
    pointer-events: none;
}
.search input, .net-select, .search-plain input {
    width: 100%;
    height: 56px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text);
    outline: none;
    padding: 0 18px;
    font-size: 15.5px;
    font-family: var(--font-mono);
    caret-color: var(--accent-bright);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.search-field input { padding-left: 42px; }
.search input:focus, .net-select:focus {
    border-color: var(--accent-bright);
    box-shadow: 0 0 0 3px var(--accent-soft), 0 0 22px rgba(235, 102, 8, .14);
}
.search input::placeholder { color: var(--muted); opacity: .8; }
.search button {
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-bright), #d45500);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0 30px;
    cursor: pointer;
    text-transform: uppercase;
    min-height: 46px;
    transition: filter .16s ease, transform .16s ease;
    touch-action: manipulation;
}
.search button:hover { filter: brightness(1.08); }
.search button:active { transform: scale(.98); }
.search button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.search .btn-secondary-soft {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
}
.search .btn-secondary-soft:hover { border-color: var(--accent-border) !important; color: var(--accent-bright) !important; }
.kbd-hint {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 7px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 11px;
    pointer-events: none;
    background: var(--bg-raise);
}

/* últimas consultas */
.recent { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.recent-label {
    width: 100%;
    color: var(--muted);
    font-size: 10.5px; letter-spacing: 1.6px; font-weight: 800; text-transform: uppercase;
    font-family: var(--font-display);
}
.tag {
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-raise);
    border-radius: 9px;
    padding: 8px 13px;
    font-size: 12.5px;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: .18s ease;
}
.tag:hover { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-bright); }

/* ---------- cards de resumo ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-top: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    min-height: 104px;
    position: relative;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-top-color: var(--accent-bright);
    box-shadow: var(--shadow-1);
}
.card::after {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="%239a9aa6" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>');
    position: absolute; top: 14px; right: 14px; opacity: 0; transition: opacity .15s ease;
}
.card:hover::after { opacity: .8; }
.card.copied::after {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="%2334d399" stroke-width="3"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    opacity: 1;
}
.card-title {
    color: var(--muted);
    font-size: 10.5px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1.1px;
    font-family: var(--font-display);
}
.card-value {
    margin-top: 13px;
    font-size: 13px; font-weight: 600;
    word-break: break-word;
    font-family: var(--font-mono);
}

/* ---------- seções de resultado (fragmentos legados) ---------- */
.section {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: clamp(16px, 2.4vw, 24px);
    margin-bottom: 20px;
    animation: fadeIn .28s ease;
    backdrop-filter: blur(10px);
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.section h2 {
    margin: 0 0 16px;
    color: var(--accent-bright);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
}

.rows { border-radius: 12px; border: 1px solid var(--border-soft); overflow: hidden; }
.row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    padding: 13px 45px 13px 16px;
    border-top: 1px solid var(--border-soft);
    background: var(--bg-raise);
    position: relative;
    min-width: 0;
}
.row:nth-child(even) { background: color-mix(in srgb, var(--bg-raise) 88%, var(--bg)); }
.row:first-child { border-top: 0; }
.row:hover { background: var(--accent-soft); }
.label {
    color: var(--muted);
    font-size: 11.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .4px;
}
.value { font-family: var(--font-mono); font-size: 13px; word-break: break-word; }
.value, .label, .row, .terminal-box, .batch-result, .batch-box, td, th { overflow-wrap: anywhere; word-break: break-word; }

.status-muted { color: var(--muted); font-weight: 700; }
.ok { color: var(--green); font-weight: 700; }
.erro { color: var(--red); font-weight: 700; }
.alerta { color: var(--yellow); font-weight: 700; }
.muted { color: var(--muted); }

.row-copy-btn {
    position: absolute; right: 10px; top: 10px;
    background: none; border: none;
    color: var(--muted); cursor: pointer;
    opacity: 0; padding: 5px; border-radius: 6px;
    transition: .15s ease;
}
.row:hover .row-copy-btn { opacity: 1; }
.row-copy-btn:hover { color: var(--text); background: var(--accent-soft); }
.row-copy-btn.copied { color: var(--green); opacity: 1; }

/* badges Cloudflare / ipHosting */
.cloud-orange { color: var(--accent-bright); font-size: 17px; line-height: 1; }
.cf-badge, .iph-badge { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; font-weight: 800; }
.cf-badge { color: var(--accent-bright); }
.iph-badge { color: var(--green); margin-left: 8px; }
.iph-badge img {
    width: 16px; height: 16px; padding: 2px;
    background: #fff; border-radius: 5px;
    border: 1px solid var(--border-soft);
    object-fit: contain;
}
.mini-badge {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--bg-raise);
    padding: 6px 11px;
    margin: 4px 6px 4px 0;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
}

/* tabelas */
table {
    width: 100%; border-collapse: collapse;
    font-family: var(--font-mono); font-size: 12.5px;
    display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: top; min-width: 110px; white-space: normal; }
th {
    color: var(--accent-bright);
    text-transform: uppercase; font-size: 10.5px; letter-spacing: 1px;
    font-family: var(--font-display);
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--accent-soft); }

/* ---------- terminal ---------- */
.terminal-wrap { position: relative; margin-top: 16px; }
.terminal-box {
    background: var(--bg-terminal);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    color: var(--terminal-ink);
    font-family: var(--font-mono);
    font-size: 12.5px;
    white-space: pre-wrap;
    overflow-x: auto; max-width: 100%;
    min-height: 300px; max-height: 600px; overflow-y: auto;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, .55);
    line-height: 1.55;
}
html[data-theme="light"] .terminal-box { color: #6ee7a0; border-color: #2a2a33; }
.terminal-copy-btn {
    position: absolute; right: 12px; top: 12px; z-index: 5;
    width: 34px; height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(16, 16, 20, .85);
    color: #9a9aa6;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: .16s ease;
}
.terminal-copy-btn:hover { color: #fff; border-color: var(--accent-border); }
.terminal-copy-btn.copied { color: var(--green); border-color: var(--green); }

/* ---------- lote ---------- */
.batch-box {
    width: 100%; min-height: 160px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text);
    padding: 16px;
    font-size: 13.5px;
    font-family: var(--font-mono);
    margin-bottom: 16px;
    outline: none;
    transition: border-color .18s ease;
}
.batch-box:focus { border-color: var(--accent-bright); box-shadow: 0 0 0 3px var(--accent-soft); }
.batch-result {
    position: relative;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px;
    background: var(--bg-raise);
}
.batch-result.batch-ok { border-left: 3px solid var(--green); }
.batch-result.batch-warn { border-left: 3px solid var(--yellow); }
.batch-ip-item { margin-top: 2px; }
.batch-ip-main { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.35; }
.batch-ip-reverse { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1.3; }
.copy-float-btn {
    position: absolute; right: 12px; top: 12px;
    width: 28px; height: 28px;
    border-radius: 9px;
    border: 1px solid var(--border-soft);
    background: var(--bg-input);
    color: var(--muted);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; transition: .16s ease; z-index: 4;
}
.batch-result:hover .copy-float-btn { opacity: 1; }
.copy-float-btn:hover { color: var(--accent-bright); border-color: var(--accent-border); }
.copy-float-btn.copied { color: var(--green); border-color: var(--green); opacity: 1; }

/* ---------- ferramentas de rede ---------- */
.net-advanced-bar { display: grid; grid-template-columns: minmax(260px, 1fr); gap: 12px; margin-bottom: 14px; }
.net-select-wrap { position: relative; }
.net-select-label {
    display: block; margin: 0 0 6px;
    font-size: 10px; font-weight: 800; letter-spacing: 1.3px;
    text-transform: uppercase; color: var(--muted);
    font-family: var(--font-display);
}
.net-select { height: 48px; }
.net-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
    gap: 9px; margin: 14px 0 18px; align-items: stretch;
}
.net-tool-btn {
    border: 1px solid var(--border);
    border-radius: 12px;
    min-height: 46px;
    background: var(--bg-raise);
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700;
    cursor: pointer;
    font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
    transition: .16s ease;
    display: inline-flex; align-items: center; justify-content: center; text-align: center;
    line-height: 1.25;
    touch-action: manipulation;
}
.net-tool-btn:hover { transform: translateY(-2px); border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent-bright); }
.net-tool-btn:active { transform: scale(.97); }
.net-tool-btn:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.net-tool-wide.dns-auto { border-color: rgba(96, 165, 250, .4); color: #7cb3f7; }
.net-tool-wide.dns-auto:hover { background: rgba(96, 165, 250, .10); color: #9cc5fa; border-color: rgba(96, 165, 250, .55); }
.net-tool-wide.profile-auto { border-color: rgba(52, 211, 153, .4); color: var(--green); }
.net-tool-wide.profile-auto:hover { background: rgba(52, 211, 153, .10); border-color: rgba(52, 211, 153, .55); }
html[data-theme="light"] .net-tool-wide.dns-auto { color: #1d4ed8; }
html[data-theme="light"] .net-tool-wide.profile-auto { color: #0f8a5f; }

/* guias (details) */
.net-help-card {
    margin-top: 18px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--bg-raise);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}
.net-help-card summary {
    list-style: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 18px;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700; letter-spacing: .4px; text-transform: uppercase; font-size: 12px;
}
.net-help-card summary::-webkit-details-marker { display: none; }
.net-help-card summary::after {
    content: '▾'; color: var(--accent-bright); font-size: 13px; transition: transform .2s ease;
}
.net-help-card[open] summary::after { transform: rotate(180deg); }
.net-help-subtitle { color: var(--muted); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; font-family: var(--font-ui); }
.net-help-body { padding: 0 18px 18px; }
.net-help-alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; margin-bottom: 14px; }
.net-help-pill { border-radius: 12px; padding: 12px 14px; font-size: 12px; font-weight: 700; font-family: var(--font-mono); }
.net-help-pill.dns { background: rgba(96, 165, 250, .10); border: 1px solid rgba(96, 165, 250, .28); color: #7cb3f7; }
.net-help-pill.profile { background: rgba(52, 211, 153, .10); border: 1px solid rgba(52, 211, 153, .28); color: var(--green); }
html[data-theme="light"] .net-help-pill.dns { color: #1d4ed8; }
.net-help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.net-help-item { border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg-card); padding: 12px 14px; }
.net-help-title {
    color: var(--accent-bright);
    font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px;
    margin-bottom: 6px;
    font-family: var(--font-display);
}
.net-help-text { color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* ---------- diagnóstico pro ---------- */
.pro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; margin-bottom: 18px; }
.pro-btn {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 700; letter-spacing: .8px;
    background: var(--bg-raise);
    color: var(--text);
    text-transform: uppercase;
    font-size: 11px;
    min-height: 46px;
    transition: .16s ease;
    display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.25;
    touch-action: manipulation;
}
.pro-btn:hover { border-color: var(--accent-border); color: var(--accent-bright); background: var(--accent-soft); transform: translateY(-2px); }
.pro-btn:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.pro-category-title {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 10px;
    margin: 4px 0 2px;
    color: var(--accent-bright);
    font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px;
    font-family: var(--font-display);
}
.pro-category-title::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, var(--accent-border), transparent); }
.pro-guide {
    margin: 18px 0 22px;
    border: 1px solid var(--border-soft);
    background: var(--bg-raise);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-1);
}
.pro-guide-bottom { margin-top: 24px; }
.pro-guide-head {
    display: flex; justify-content: space-between; gap: 12px; align-items: center;
    color: var(--accent-bright);
    font-family: var(--font-display);
    font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
    margin-bottom: 14px; font-size: 12px;
}
.pro-guide-head span:last-child { color: var(--muted); font-size: 11px; font-weight: 600; font-family: var(--font-ui); text-transform: none; }
.pro-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.pro-guide-grid > div {
    border: 1px solid var(--border-soft);
    background: var(--bg-card);
    border-radius: 12px; padding: 13px;
    color: var(--muted); font-size: 12.5px; line-height: 1.5;
}
.pro-guide-grid strong { display: block; color: var(--text); margin-bottom: 5px; font-size: 12.5px; }

.tool-running { opacity: .7; pointer-events: none; filter: saturate(.7); }
.result-footer-note {
    margin-top: 12px; padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--bg-raise);
    color: var(--muted); font-size: 12px; line-height: 1.5;
}

/* ---------- portas ---------- */
.port-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 11px; }
.port-item {
    border: 1px solid var(--border-soft);
    background: var(--bg-raise);
    border-radius: 12px; padding: 13px;
    font-family: var(--font-mono); font-size: 12.5px;
    transition: .2s ease;
}
.port-item:hover { border-color: var(--accent-border); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.port-item strong { display: block; margin-bottom: 8px; color: var(--muted); }

/* ---------- score / health ---------- */
.score-dashboard { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; }
.score-dashboard-pro { align-items: start; }
.score-main { text-align: center; }
.score-circle {
    position: relative;
    width: 120px; height: 120px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--bg-input);
    border: 4px solid var(--border);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, .45);
}
.score-val { font-size: 36px; font-weight: 800; font-family: var(--font-mono); }
.score-bars { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.s-bar-row { display: flex; align-items: center; gap: 12px; font-size: 11.5px; font-family: var(--font-mono); color: var(--muted); }
.s-bar-label { width: 130px; text-transform: uppercase; }
.s-bar-track { flex: 1; height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; border: 1px solid var(--border-soft); }
.s-bar-fill { height: 100%; border-radius: 4px; transition: width 1s ease-out; }
.score-concept { margin-top: 12px; font-size: 13px; font-weight: 800; letter-spacing: 1.4px; font-family: var(--font-mono); }
.score-risk {
    margin-top: 8px; display: inline-flex; align-items: center; justify-content: center;
    padding: 7px 12px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: .8px;
    border: 1px solid var(--border-soft); background: var(--bg-raise);
}
.score-risk.risk-low { color: var(--green); border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .08); }
.score-risk.risk-mid { color: var(--yellow); border-color: rgba(251, 191, 36, .3); background: rgba(251, 191, 36, .08); }
.score-risk.risk-high { color: var(--red); border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .08); }
.health-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin-top: 22px; }
.health-box { border: 1px solid var(--border-soft); background: var(--bg-raise); border-radius: 12px; padding: 16px; }
.health-box h3 {
    margin: 0 0 12px; color: var(--accent-bright);
    font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px;
    font-family: var(--font-display);
}
.health-box ul { margin: 0; padding-left: 18px; color: var(--text); font-size: 13px; line-height: 1.7; }
.health-box li { margin-bottom: 4px; }
.health-ok { color: var(--green); font-size: 13px; font-weight: 700; }
.health-based { margin-top: 16px; color: var(--muted); font-size: 11.5px; font-family: var(--font-mono); text-align: center; }

/* ---------- SEO score cards ---------- */
.seo-score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.seo-score-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--bg-raise);
    box-shadow: var(--shadow-1);
}
.seo-score-card.ok { border-color: rgba(52, 211, 153, .38); }
.seo-score-card.alerta { border-color: rgba(251, 191, 36, .38); }
.seo-score-card.erro { border-color: rgba(248, 113, 113, .38); }
.seo-score-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-family: var(--font-display); }
.seo-score-value { margin-top: 8px; font-size: 27px; font-weight: 800; font-family: var(--font-mono); color: var(--text); }
.seo-score-card.ok .seo-score-value { color: var(--green); }
.seo-score-card.alerta .seo-score-value { color: var(--yellow); }
.seo-score-card.erro .seo-score-value { color: var(--red); }
.seo-score-sub { margin-top: 4px; color: var(--muted); font-size: 12px; }

/* ---------- footer ---------- */
footer {
    text-align: center; margin-top: 40px;
    color: var(--muted); font-size: 12.5px;
    font-family: var(--font-mono);
    line-height: 1.7;
}
footer strong { color: var(--accent-bright); }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent-bright); }

.tab-content { display: none; }
.empty { color: var(--muted); font-family: var(--font-mono); font-size: 13px; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
    /* abas sempre em UMA linha: rolagem horizontal com snap (touch-friendly) */
    .mode-tabs {
        display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 7px;
        scroll-snap-type: x proximity; scrollbar-width: none;
        border-radius: 16px;
        -webkit-overflow-scrolling: touch;
    }
    .mode-tabs::-webkit-scrollbar { display: none; }
    .mode-tab {
        flex: 0 0 auto; min-width: 118px; scroll-snap-align: start;
        height: 40px; font-size: 11px; letter-spacing: .2px; padding: 0 14px;
        border-radius: 12px;
    }
}
@media (max-width: 980px) {
    .wrap { width: min(100% - 24px, 900px); }
    .hero { grid-template-columns: 1fr; align-items: stretch; }
    .brand { justify-self: center; }
    .current-ip-card, .support-box { justify-self: center; width: min(100%, 560px); }
    .mode-tabs { position: relative; top: auto; }
    .score-dashboard, .score-dashboard-pro { grid-template-columns: 1fr !important; justify-items: center; }
}
@media (max-width: 720px) {
    body::before { background-size: 22px 22px; }
    .wrap { width: min(100% - 18px, 680px); padding-top: 14px; }
    .hero { margin-bottom: 18px; }
    .brand { justify-content: center; gap: 14px; }
    .panel { padding: 14px; }
    .mode-tabs { margin-bottom: 18px; }
    .mode-tab { min-width: 112px; }
    .search { flex-direction: column; gap: 11px; }
    .search input { height: 62px; min-height: 62px; font-size: 16px; border-radius: 16px; }
    .search button { height: 54px; min-height: 54px; width: 100%; font-size: 14px; }
    .kbd-hint { display: none; }
    .row { grid-template-columns: 1fr !important; gap: 5px; padding: 13px 42px 13px 14px; }
    .row-copy-btn, .copy-float-btn, .current-ip-copy-btn { opacity: 1; }
    .terminal-box { min-height: 230px; max-height: 480px; font-size: 12px; padding: 14px; }
    .batch-box { min-height: 140px; font-size: 13px; padding: 14px; }
    .pro-grid, .net-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pro-btn, .net-tool-btn { padding: 12px 10px; font-size: 10px; letter-spacing: .45px; }
    .pro-guide-grid, .net-help-grid, .net-help-alerts { grid-template-columns: 1fr; }
    footer { font-size: 11px; padding: 0 8px; }
}
@media (max-width: 430px) {
    .wrap { width: min(100% - 12px, 420px); }
    .brand-text h1 { font-size: 27px; letter-spacing: -1px; }
    .current-ip-value { font-size: clamp(22px, 8vw, 30px); }
    .support-line { flex-direction: column; align-items: flex-start; }
    .whatsapp-link { width: 100%; justify-content: center; }
    .mode-tab { min-width: 102px; }
    .pro-grid, .net-tools-grid, .seo-score-grid, .port-grid { grid-template-columns: 1fr; }
    .search input { height: 64px; min-height: 64px; }
    th, td { padding: 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* ---------- impressão (relatório com marca) ---------- */
@media print {
    body::before, body::after { display: none; }
    .mode-tabs, .search, .recent, .net-help-card, .pro-guide, .theme-toggle,
    .row-copy-btn, .copy-float-btn, .terminal-copy-btn, .current-ip-copy-btn, .kbd-hint { display: none !important; }
    body { background: #fff; color: #111; }
    .panel, .section, .rows, .card { box-shadow: none; background: #fff; border-color: #ddd; }
    .section h2, th, .brand-text h1 span { color: #EB6608; }
    .terminal-box { background: #f8fafc; color: #111; border-color: #ddd; box-shadow: none; }
}

/* ============ Laudo IA (Fase 7) ============ */
.ai-quota-bar {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
    padding: 10px 14px; margin-bottom: 16px;
    border: 1px solid var(--border-subtle); border-radius: 10px;
    background: var(--accent-soft); color: var(--text-muted); font-size: 13px;
}
.ai-quota-bar strong { color: var(--accent-bright); }
.ai-link-btn {
    background: none; border: none; color: var(--accent); cursor: pointer;
    font: inherit; font-weight: 700; text-decoration: underline; padding: 0 4px;
}
.ai-link-btn:hover { color: var(--accent-bright); }

.ai-auth-box {
    border: 1px solid var(--border-subtle); border-radius: 12px;
    padding: 16px; margin-bottom: 16px; max-width: 420px;
}
.ai-auth-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.ai-auth-tab {
    flex: 1; padding: 8px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--border-subtle); background: transparent;
    color: var(--text-muted); font-weight: 700; font-size: 13px;
}
.ai-auth-tab.active { border-color: var(--accent-border); color: var(--accent-bright); background: var(--accent-soft); }
.ai-auth-box form { display: grid; gap: 10px; }
.ai-auth-box input {
    padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-subtle);
    background: transparent; color: var(--text-main); font: inherit;
}
.ai-auth-box input:focus { outline: none; border-color: var(--accent-border); }
.ai-auth-msg { margin-top: 10px; font-size: 13px; color: var(--text-muted); min-height: 18px; }
.ai-auth-msg.ok { color: var(--green); }
.ai-auth-msg.erro { color: var(--red); }

.ai-badge {
    display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em;
    color: var(--accent-bright); border: 1px solid var(--accent-border);
    border-radius: 999px; padding: 2px 10px; vertical-align: middle; margin-left: 6px;
    background: var(--accent-soft);
}
.ai-meta { color: var(--text-muted); font-size: 12.5px; margin-bottom: 14px; }
.ai-body { line-height: 1.65; font-size: 14.5px; }
.ai-body p { margin: 0 0 12px; }
.ai-h {
    color: var(--accent-bright); font-family: 'Space Grotesk', sans-serif;
    font-size: 15px; text-transform: uppercase; letter-spacing: .05em;
    margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border-subtle);
}
.ai-list { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.ai-disclaimer {
    margin-top: 16px; padding-top: 10px; border-top: 1px dashed var(--border-subtle);
    color: var(--text-muted); font-size: 11.5px;
}
