/* ============================================================
   ClickMonitor — Tema Premium v1.0 (ARQUIVO NOVO)
   Carregado DEPOIS do main.css: só muda a "casca" (cores, fonte,
   ícones, efeitos, responsivo). Nenhuma regra de funcionamento.
   Para voltar ao visual antigo basta remover o <link> no layout.

   Regras de performance deste arquivo:
   - ZERO blur / backdrop-filter (inclusive remove os que existiam)
   - Animações somente com transform / opacity (compositor/GPU)
   - will-change só enquanto a interação acontece
   - prefers-reduced-motion respeitado no fim do arquivo
   ============================================================ */

:root {
    --bg-base:       #060a14;
    --bg-surface:    #0b1120;
    --bg-card:       #0f172a;
    --bg-card-hover: #141e36;
    --bg-input:      #0a1122;
    --border:        #1b2742;
    --border-light:  #28395e;

    --text-primary:   #eef2fb;
    --text-secondary: #8c9bb8;
    --text-muted:     #56658a;

    --accent:        #5b8cff;
    --accent-hover:  #4a7cf5;
    --accent-2:      #8b5cf6;
    --accent-glow:   rgba(91,140,255,.14);
    --grad-brand:    linear-gradient(135deg, #5b8cff 0%, #7c6bff 55%, #9b5cf6 100%);

    --sidebar-w:     236px;
    --radius:        16px;
    --radius-sm:     10px;
    --shadow:        0 10px 30px -12px rgba(0,0,0,.55);
    --shadow-lg:     0 24px 60px -18px rgba(0,0,0,.7);
    --ease-out:      cubic-bezier(.22,1,.36,1);
    --transition:    .22s var(--ease-out);

    --font-body: 'Geist', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

body {
    font-family: var(--font-body);
    font-feature-settings: 'ss01' 1, 'cv11' 1;
    letter-spacing: -.005em;
    background:
        radial-gradient(1200px 600px at 110% -10%, rgba(91,140,255,.07), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(139,92,246,.06), transparent 60%),
        var(--bg-base);
    background-attachment: fixed;
}
::selection { background: rgba(91,140,255,.35); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Scrollbar discreta e visível (antes quase invisível → parecia "cortado") */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #22314f; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #33477a; background-clip: padding-box; }
* { scrollbar-color: #22314f transparent; }

/* ── ÍCONES SVG ─────────────────────────────────────────────── */
.ico {
    width: 1.15em; height: 1.15em; flex: 0 0 auto;
    display: inline-block; vertical-align: -.2em;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
    transition: transform .3s var(--ease-out);
}
.ico-dot-r, .ico-dot-g, .ico-dot-y { width: .9em; height: .9em; vertical-align: -.1em; }

/* Micro-animações de ícone (GPU) quando o elemento pai recebe hover */
.btn:hover .ico, .nav-item:hover .ico, button:hover > .ico { transform: translateY(-1px) scale(1.1); }
.btn:hover .ico-refresh, button:hover > .ico-refresh { transform: rotate(180deg); }
.btn:hover .ico-gear, .nav-item:hover .ico-gear { transform: rotate(60deg); }
.btn:hover .ico-trash, button:hover > .ico-trash { transform: translateY(-1px) rotate(-8deg); }
.btn:hover .ico-bell, button:hover > .ico-bell { animation: cmRing .6s var(--ease-out); }
.btn:hover .ico-send, button:hover > .ico-send { transform: translate(2px,-2px); }
@keyframes cmRing { 0%,100%{transform:rotate(0)} 25%{transform:rotate(14deg)} 50%{transform:rotate(-12deg)} 75%{transform:rotate(6deg)} }

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
    background: linear-gradient(180deg, #0a1020 0%, #080d1a 100%);
    border-right: 1px solid var(--border);
}
.sidebar-logo { padding: 22px 18px; gap: 12px; }
.sidebar-logo-icon {
    width: 40px; height: 40px; border-radius: 12px; font-size: 0; color: #fff;
    background: var(--grad-brand);
    box-shadow: 0 8px 22px -6px rgba(91,140,255,.55), inset 0 1px 0 rgba(255,255,255,.25);
    position: relative; overflow: hidden;
}
.sidebar-logo-icon .ico { width: 22px; height: 22px; stroke-width: 2; }
.sidebar-logo-icon::after { /* brilho que atravessa o logo (GPU) */
    content: ''; position: absolute; top: 0; left: 0; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform: translateX(-160%); animation: cmLogoShine 5.5s var(--ease-out) infinite 1.2s;
}
@keyframes cmLogoShine { 0%{transform:translateX(-160%)} 30%,100%{transform:translateX(330%)} }
.sidebar-logo-text { font-family: var(--font-body); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.sidebar-logo-sub { font-size: 10px; letter-spacing: .12em; color: var(--text-muted); }

.sidebar-nav { padding: 10px 12px 16px; }
.nav-section { font-size: 10.5px; letter-spacing: .14em; padding: 18px 10px 8px; color: #465576; font-weight: 600; }
.nav-item {
    position: relative; gap: 10px; padding: 8px 8px; margin-bottom: 3px; white-space: nowrap;
    border: 1px solid transparent; border-radius: 12px;
    font-size: 13.5px; font-weight: 500; color: var(--text-secondary);
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.nav-item .nav-icon {
    width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.04);
    font-size: 0; transition: background-color .2s ease, border-color .2s ease;
}
.nav-item .nav-icon .ico { width: 17px; height: 17px; }
.nav-item:hover { background: rgba(255,255,255,.035); color: var(--text-primary); }
.nav-item:hover .nav-icon { background: rgba(91,140,255,.1); border-color: rgba(91,140,255,.18); }
.nav-item::before { /* indicador lateral animado (scaleY = GPU) */
    content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--grad-brand);
    transform: scaleY(0); transform-origin: center; transition: transform .3s var(--ease-out);
}
.nav-item.active {
    background: linear-gradient(90deg, rgba(91,140,255,.14), rgba(139,92,246,.05));
    border-color: rgba(91,140,255,.18); color: #fff;
}
.nav-item.active::before { transform: scaleY(1); }
.nav-item.active .nav-icon { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -6px rgba(91,140,255,.7); }
.sidebar-footer { border-top: 1px solid var(--border); }
.sidebar-footer .nav-item .nav-icon { background: rgba(244,63,94,.08); border-color: rgba(244,63,94,.12); }
.user-avatar { width: 36px; height: 36px; border-radius: 11px; background: var(--grad-brand); box-shadow: 0 6px 16px -6px rgba(91,140,255,.6); }
.sidebar-back-btn { background: var(--grad-brand) !important; border-radius: 12px !important; }

/* ── TOPBAR (sem blur: fundo sólido quase opaco) ─────────────── */
.topbar {
    background: rgba(6,10,20,.94);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(91,140,255,.06), 0 10px 30px -20px rgba(0,0,0,.8);
}
.topbar-title { font-size: 17px; font-weight: 650; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar > .flex-center { min-width: 0; }
#sidebarToggle { display: inline-flex; align-items: center; justify-content: center; font-size: 0; }
#sidebarToggle .ico { width: 19px; height: 19px; }

/* HUD: brilho animado agora por transform (antes animava "left" → reflow a cada frame) */
.hud-shine { left: 0 !important; animation: cmHudShine 6s linear infinite !important; transform: translateX(-120%); will-change: transform; }
@keyframes cmHudShine { from { transform: translateX(-120%); } to { transform: translateX(300%); } }
.hud-digits { font-family: var(--font-mono); }
.hud-date { font-family: var(--font-mono); }

/* ── CARDS ───────────────────────────────────────────────────── */
.card, .stat-card {
    background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,0) 40%), var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.card { transition: border-color .25s ease, box-shadow .25s ease; }
.card:hover { border-color: var(--border-light); }
.card-header { padding: 18px 22px; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 8px; }

.stat-card {
    padding: 20px 22px; border-radius: var(--radius);
    transition: transform .35s var(--ease-out), border-color .25s ease, box-shadow .35s var(--ease-out);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -20px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05); }
.stat-card::after { /* reflexo que atravessa o card no hover (GPU) */
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.05) 50%, transparent 65%);
    transform: translateX(-100%); transition: transform .9s var(--ease-out);
}
.stat-card:hover::after { transform: translateX(100%); }
.stat-label { font-size: 11px; letter-spacing: .08em; font-weight: 600; }
.stat-value { font-family: var(--font-mono); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-icon {
    width: 50px; height: 50px; border-radius: 14px; font-size: 0; position: relative;
    border: 1px solid rgba(255,255,255,.06);
    transition: transform .4s var(--ease-out);
}
.stat-icon .ico { width: 24px; height: 24px; stroke-width: 1.9; }
.stat-card:hover .stat-icon { transform: scale(1.08) rotate(-4deg); }
.stat-icon::after { /* anel pulsante (scale + opacity) */
    content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid currentColor;
    opacity: 0; transform: scale(1); animation: cmPulseRing 3.2s var(--ease-out) infinite;
}
@keyframes cmPulseRing { 0%{opacity:.45;transform:scale(1)} 70%,100%{opacity:0;transform:scale(1.35)} }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ── BOTÕES ─────────────────────────────────────────────────── */
.btn {
    position: relative; overflow: hidden; isolation: isolate;
    border-radius: var(--radius-sm); font-weight: 600; letter-spacing: -.005em; gap: 7px;
    transition: transform .18s var(--ease-out), box-shadow .25s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary { background: var(--grad-brand); border-color: transparent; box-shadow: 0 8px 20px -10px rgba(91,140,255,.8), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-primary:hover { background: var(--grad-brand); box-shadow: 0 12px 26px -10px rgba(91,140,255,.9), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary::after { /* brilho de varredura (GPU) */
    content: ''; position: absolute; top: 0; left: 0; width: 40%; height: 100%; z-index: -1; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
    transform: translateX(-160%); transition: transform .7s var(--ease-out);
}
.btn-primary:hover::after { transform: translateX(320%); }
.btn-ghost { background: rgba(255,255,255,.02); }
.btn-ghost:hover { background: rgba(91,140,255,.08); border-color: rgba(91,140,255,.3); }
.btn-danger:hover { box-shadow: 0 10px 24px -12px rgba(244,63,94,.8); }
.btn-icon { font-size: 0; }
.btn-icon .ico { width: 16px; height: 16px; }
.btn-sm .ico { width: 15px; height: 15px; }
/* Ondinha do clique (criada pelo theme.js; só transform/opacity) */
.cm-ripple { position: absolute; border-radius: 50%; pointer-events: none; z-index: -1; background: rgba(255,255,255,.28); transform: scale(0); opacity: .6; animation: cmRipple .55s var(--ease-out) forwards; }
@keyframes cmRipple { to { transform: scale(1); opacity: 0; } }

/* ── FORMULÁRIOS ─────────────────────────────────────────────── */
.form-control { border-radius: var(--radius-sm); border-color: var(--border); transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.form-control:hover { border-color: var(--border-light); }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(91,140,255,.14); background: #0b1427; }
.form-label { font-weight: 550; }
.toggle-slider { background: #1a2640 !important; border: 1px solid #25355a; transition: background-color .25s ease, border-color .25s ease !important; }
.toggle-slider::before { box-shadow: 0 2px 6px rgba(0,0,0,.45); transition: transform .32s var(--ease-out) !important; }
.toggle input:checked + .toggle-slider { background: var(--grad-brand) !important; border-color: transparent; }
.search-bar { border-radius: var(--radius-sm); transition: border-color .2s ease, box-shadow .2s ease; }
.search-bar:focus-within { box-shadow: 0 0 0 4px rgba(91,140,255,.12); }
.search-bar .ico { color: var(--text-muted); }

/* ── TABELAS ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
thead th { font-size: 10.5px; letter-spacing: .09em; font-weight: 650; color: #5b6b8f; background: rgba(255,255,255,.012); }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover td { background: rgba(91,140,255,.045); }
.table-actions .btn-icon { width: 32px; height: 32px; padding: 0; }
.badge { font-weight: 650; letter-spacing: .01em; }

/* ── MODAIS (sem blur: overlay sólido + entrada por transform) ── */
.modal-overlay { background: rgba(3,6,14,.8); -webkit-backdrop-filter: none; backdrop-filter: none; }
.modal { border-radius: 18px; border-color: var(--border-light); background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 30%), var(--bg-card); animation: cmModalIn .32s var(--ease-out); }
@keyframes cmModalIn { from { opacity: 0; transform: translateY(14px) scale(.965); } to { opacity: 1; transform: none; } }
.modal-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.modal-close { display: inline-flex; border-radius: 8px; transition: color .2s ease, background-color .2s ease, transform .25s var(--ease-out); }
.modal-close:hover { background: rgba(255,255,255,.06); transform: rotate(90deg); }
/* Confirmação do main.js (sysConfirm) usava blur(6px) inline: neutralizado aqui */
#_sysConfirmModal { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: rgba(3,6,14,.8) !important; }

.alert { border-radius: var(--radius-sm); }
.empty-state-icon { font-size: 0; opacity: .55; }
.empty-state-icon .ico { width: 52px; height: 52px; stroke-width: 1.4; }

/* ── ENTRADA DA PÁGINA: um único movimento orquestrado ────────── */
.page-content > * { animation: cmRise .5s var(--ease-out) both; }
.page-content > *:nth-child(2) { animation-delay: .05s; }
.page-content > *:nth-child(3) { animation-delay: .1s; }
.page-content > *:nth-child(4) { animation-delay: .15s; }
.page-content > *:nth-child(n+5) { animation-delay: .2s; }
@keyframes cmRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   RESPONSIVO — notebooks (1024–1440), tablets e celulares
   ============================================================ */
@media (max-width: 1600px) {
    thead th { padding: 11px 12px; white-space: normal; line-height: 1.3; }
    tbody td { padding: 12px 12px; }
    /* URL longa quebra; IP (até 15 caracteres) continua numa linha só */
    .table-wrap td .text-mono { word-break: normal; overflow-wrap: anywhere; display: inline-block; min-width: 7.8em; }
}
@media (max-width: 1440px) {
    :root { --sidebar-w: 224px; }
    .page-content { padding: 24px; }
    .topbar { padding: 0 24px; }
    table { font-size: 13.5px; }
    thead th { padding: 10px 10px; }
    tbody td { padding: 11px 10px; }
    .table-actions { gap: 4px; }
    /* Bloqueios: a busca ganha linha própria (antes o botão sobrava sozinho) */
    .blk-search { flex: 1 1 100% !important; }
}
@media (max-width: 1280px) {
    thead th { padding: 10px 9px; font-size: 10px; letter-spacing: .06em; }
    tbody td { padding: 11px 9px; }
    .table-actions .btn-icon { width: 30px; height: 30px; }
    .stat-value { font-size: 28px; }
}
/* Tabela de Bloqueios não tinha rolagem: em telas menores cortava */
#blkTableWrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#blkTableWrap .blk-table { min-width: 760px; }
@media (max-width: 900px) {
    :root { --sidebar-w: 224px; }
}
@media (max-width: 768px) {
    .page-content { padding: 16px; }
    .topbar { padding: 0 14px; height: 60px; }
    .topbar-title { font-size: 15.5px; }
    .topbar-right { gap: 8px; }
    .topbar-right > .btn { padding: 7px 10px; }
    .hud-clock { padding: 5px 10px 4px; }
    .hud-digits { font-size: 16px; }
    .card-header { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-icon { width: 42px; height: 42px; border-radius: 12px; }
    .stat-value { font-size: 24px; }
    .modal { border-radius: 16px; }
    .sidebar { box-shadow: 30px 0 60px -20px rgba(0,0,0,.8); }
}
@media (max-width: 480px) {
    .hud-date { display: none; }
    .topbar-right .lbl { display: none; }
    .stats-grid { gap: 10px; }
    .stat-label { font-size: 10px; letter-spacing: .05em; }
}

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

/* Bloqueios: tabela mais compacta em notebook (cabe sem rolar em 1280) */
@media (max-width: 1440px) {
    .blk-table th, .blk-table td { padding: 12px 11px !important; }
    .blk-table td { font-size: 13px; }
    .blk-badge-sys { white-space: normal !important; line-height: 1.25; }
    .blk-date { white-space: normal !important; }
}

/* ============================================================
   RELÓGIO PREMIUM v2 (substitui o HUD antigo)
   Anel de segundos = 1 camada girando por transform (60s/volta),
   sincronizada com o segundo real. Nenhum JS por quadro, nenhum blur.
   ============================================================ */
.cm-clock {
    display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto;
    grid-template-areas: "orb time" "orb date"; column-gap: 11px; align-items: center;
    height: 48px; padding: 0 16px 0 8px; border-radius: 15px; cursor: default; user-select: none;
    background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.008)), #0a1122;
    border: 1px solid rgba(91,140,255,.24);
    box-shadow: 0 10px 28px -16px rgba(91,140,255,.55), inset 0 1px 0 rgba(255,255,255,.06);
    transition: border-color .3s ease, box-shadow .3s ease;
}
.cm-clock:hover { border-color: rgba(91,140,255,.45); box-shadow: 0 14px 34px -16px rgba(91,140,255,.75), inset 0 1px 0 rgba(255,255,255,.08); }
.cm-clock-orbit {
    grid-area: orb; position: relative; width: 32px; height: 32px; border-radius: 50%;
    background: radial-gradient(circle, rgba(91,140,255,.16) 0 35%, transparent 36%);
    box-shadow: inset 0 0 0 2px rgba(91,140,255,.14);
    transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.cm-clock:hover .cm-clock-orbit { transform: scale(1.08); }
.cm-clock-arm {
    position: absolute; inset: 0; border-radius: 50%;
    animation: cmClockSpin 60s linear infinite; will-change: transform;
}
.cm-clock-arm::before { /* rastro de cometa: gira junto com o braço */
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(91,140,255,0) 0deg, rgba(91,140,255,0) 200deg, rgba(124,107,255,.7) 320deg, rgba(167,139,250,1) 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
}
.cm-clock-arm i {
    position: absolute; top: -2px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 0 2px rgba(155,92,246,.45), 0 0 10px 2px rgba(124,107,255,.9);
}
@keyframes cmClockSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.cm-clock-time { grid-area: time; display: flex; align-items: baseline; gap: 5px; line-height: 1; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.cm-clock-hm { font-size: 20px; font-weight: 700; color: #f1f5ff; letter-spacing: -.02em; }
.cm-clock-colon { display: inline-block; margin: 0 1px; color: #7ea4ff; animation: cmColon 1s steps(1) infinite; }
@keyframes cmColon { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .25; } }
.cm-clock-sec { display: inline-block; overflow: hidden; height: 14px; font-size: 12.5px; font-weight: 700; color: #a78bfa; }
.cm-clock-sec span { display: inline-block; }
.cm-clock-date { grid-area: date; margin-top: 3px; font-size: 10.5px; font-weight: 550; color: #6f7fa3; letter-spacing: .02em; white-space: nowrap; line-height: 1.1; }
@media (max-width: 768px) {
    .cm-clock { height: 42px; padding: 0 12px 0 6px; column-gap: 9px; border-radius: 13px; }
    .cm-clock-orbit { width: 26px; height: 26px; }
    .cm-clock-hm { font-size: 17px; }
}
@media (max-width: 480px) {
    .cm-clock { grid-template-areas: "orb time"; grid-template-rows: auto; }
    .cm-clock-date { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cm-clock-arm, .cm-clock-colon { animation: none !important; } }

/* ============================================================
   AVISOS (TOASTS) PREMIUM v1 — usados pelo assets/js/toast.js
   Entrada/saída/barra: só transform + opacity. Nenhum blur.
   ============================================================ */
#toast-container { bottom: 22px; right: 22px; gap: 10px; align-items: flex-end; max-width: calc(100vw - 32px); }
.cm-toast {
    --tc: #5b8cff; --tg: rgba(91,140,255,.22);
    position: relative; display: flex; align-items: flex-start; gap: 13px; width: 370px; max-width: 100%;
    padding: 14px 14px 16px 14px; border-radius: 16px; overflow: hidden; isolation: isolate;
    background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.01) 45%), #0d1528;
    border: 1px solid rgba(255,255,255,.07);
    box-shadow: 0 22px 50px -18px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.25), 0 0 30px -12px var(--tg);
    animation: cmToastIn .45s cubic-bezier(.22,1.3,.36,1) both; will-change: transform, opacity;
}
.cm-toast::before { /* faixa luminosa à esquerda */
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc);
    box-shadow: 0 0 14px var(--tc);
}
.cm-toast::after { /* luz de canto (gradiente estático) */
    content: ''; position: absolute; left: -40px; top: -60px; width: 160px; height: 160px; border-radius: 50%; z-index: -1;
    background: radial-gradient(circle, var(--tg), transparent 65%);
}
.cm-t-success { --tc: #22d3a2; --tg: rgba(34,211,162,.22); }
.cm-t-error   { --tc: #f43f5e; --tg: rgba(244,63,94,.24); }
.cm-t-warning { --tc: #f59e0b; --tg: rgba(245,158,11,.22); }
.cm-t-info    { --tc: #5b8cff; --tg: rgba(91,140,255,.22); }
.cm-t-ico {
    position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 28%, transparent);
    animation: cmToastPop .55s cubic-bezier(.22,1.5,.36,1) .08s both;
}
.cm-t-ico .ico { width: 21px; height: 21px; stroke-width: 2; }
.cm-t-ring { position: absolute; inset: 0; border-radius: inherit; border: 1.5px solid var(--tc); opacity: 0; animation: cmToastRing 1.2s ease-out .25s; }
.cm-t-spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--tc) 25%, transparent); border-top-color: var(--tc); animation: cmToastSpin .75s linear infinite; }
.cm-t-body { flex: 1; min-width: 0; padding-top: 1px; }
.cm-t-title { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tc); margin-bottom: 3px; }
.cm-t-msg { font-size: 13.5px; line-height: 1.45; color: #d6deef; white-space: pre-line; word-break: break-word; }
.cm-t-msg .ico { width: 1.05em; height: 1.05em; vertical-align: -.17em; }
.cm-t-x {
    flex: 0 0 auto; width: 28px; height: 28px; margin: -4px -4px 0 0; border: 0; border-radius: 8px; background: transparent;
    color: #5d6c90; display: grid; place-items: center; cursor: pointer; transition: color .2s ease, background-color .2s ease, transform .25s var(--ease-out);
}
.cm-t-x:hover { color: #fff; background: rgba(255,255,255,.07); transform: rotate(90deg); }
.cm-t-x .ico { width: 15px; height: 15px; }
.cm-t-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.04); }
.cm-t-bar i { display: block; height: 100%; transform-origin: left center; background: linear-gradient(90deg, var(--tc), color-mix(in srgb, var(--tc) 55%, #fff)); animation: cmToastBar 4s linear forwards; }
.cm-toast:hover .cm-t-bar i { animation-play-state: paused; }   /* passar o mouse segura o aviso */
.cm-t-out { animation: cmToastOut .26s cubic-bezier(.4,0,1,1) forwards !important; }
@keyframes cmToastIn   { from { opacity: 0; transform: translate3d(34px, 0, 0) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes cmToastOut  { to { opacity: 0; transform: translate3d(40px, 0, 0) scale(.94); } }
@keyframes cmToastPop  { from { transform: scale(.5) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cmToastRing { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
@keyframes cmToastSpin { to { transform: rotate(360deg); } }
@keyframes cmToastBar  { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 600px) {
    #toast-container { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); align-items: stretch; max-width: none; }
    .cm-toast { width: auto; }
    @keyframes cmToastIn  { from { opacity: 0; transform: translate3d(0, 24px, 0) scale(.96); } to { opacity: 1; transform: none; } }
    @keyframes cmToastOut { to { opacity: 0; transform: translate3d(0, 20px, 0) scale(.96); } }
}

/* ============================================================
   ROLAGEM DA PÁGINA INVISÍVEL (continua funcionando: roda, toque,
   teclado). Tabelas largas mantêm a barra fina para indicar rolagem.
   ============================================================ */
html, body, .sidebar-nav { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, .sidebar-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ============================================================
   DASHBOARD (index.php) — celular
   ============================================================ */
@media (max-width: 768px) {
    .cm-groups { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; }
    .cm-groups > a { min-width: 0 !important; padding: 11px 12px !important; }
    .cm-groups > a > div:last-of-type { min-width: 0; }
    .cm-hosts-head { flex-wrap: wrap; row-gap: 6px; min-width: 0; }
    .cm-hosts-head .card-title { white-space: nowrap; }
    .cm-hosts-head .toggle-wrap { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; min-width: 0; }
    .cm-hosts-head .toggle-wrap > span { line-height: 1.5; min-width: 0; }
    .cm-hosts-head .toggle { transform: none !important; flex: 0 0 auto; }
}

/* ============================================================
   HISTÓRICO DO HOST (host.php) — tablet e celular
   ============================================================ */
.cm-hp-chart { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.cm-hp-chart-in { position: relative; min-width: 100%; }
@media (max-width: 1100px) {
    .cm-hp-cols { grid-template-columns: 1fr !important; }
    .cm-hp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 768px) {
    .cm-hp-uptime { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .cm-hp-uptime > :last-child:nth-child(odd) { grid-column: 1 / -1; }   /* 5º visor ocupa a linha toda */
    .cm-hp-uptime .stat-value, .cm-hp-stats .stat-value { font-size: 24px !important; }
    .cm-hp-stats { gap: 10px !important; }
    .cm-hp-stats .stat-card { padding: 16px; }
    .cm-hp-stats .stat-icon { display: none; }                          /* ícone sobreposto ao valor no celular */
    .cm-hp-chart-in { min-width: 680px; }                                  /* gráfico com largura boa + rolagem lateral */
    .cm-hp-id { min-width: 0; }
    .cm-hp-id > div:last-child { min-width: 0; }
    .cm-hp-id > div:last-child > div:nth-child(2) { word-break: break-all; }
    #checksCard .card-body, #incCard .card-body { overflow-x: auto; }
    #checksCard .card-title, #incCard .card-title { white-space: nowrap; }
}
