/* =========================================================
   IronPhantom Dashboard – Dark Style + Export/Delete Actions
   CSS estratto 1:1 dal file PHP (NO MODIFICHE)
   ========================================================= */

body.wp-admin.toplevel_page_ironphantom-dashboard #wpcontent,
body.wp-admin.toplevel_page_ironphantom-dashboard #wpbody-content {
    padding: 0 !important;
}

body.wp-admin.toplevel_page_ironphantom-dashboard .wrap {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ironphantom-dashboard,
.ironphantom-dashboard * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ironphantom-dashboard {
    width: 100%;
    min-height: calc(100vh - 32px);
    background: #000000;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== HEADER ========== */
.ip-header {
    background: #0d0d0d;
    padding: 25px 40px;
    border-bottom: 1px solid #1c1c1c;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ip-header img {
    width: 60px;
    height: 60px;
}

.ip-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: #ff3b3b;
    text-transform: uppercase;
}

.ip-subtitle {
    color: #aaaaaa;
    font-size: 14px;
    margin-top: 4px;
}

.ip-status {
    margin-left: auto;
    background: #1a1a1a;
    border: 1px solid #ff3b3b;
    color: #ff3b3b;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ========== TRANSACTIONS SECTION ========== */
.ip-transactions-section {
    padding: 30px 40px;
    background: #0b0b0b;
    border-bottom: 1px solid #1a1a1a;
}

.ip-transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ip-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #ff3b3b;
}

.ip-actions {
    display: flex;
    gap: 10px;
}

.ip-actions button {
    background: #1a1a1a;
    color: #ffffff;
    border: 1px solid #333;
    padding: 10px 18px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.ip-actions button:hover {
    background: #ff3b3b;
    color: #000;
    box-shadow: 0 0 0 2px #ff3b3b33;
}

/* === TABLE SCROLL === */
.ip-table-wrapper {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #222;
}

/* ========== TABLE ========== */
.ip-transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #111111;
    min-width: 900px;
}

.ip-transactions-table th {
    position: sticky;
    top: 0;
    background: #1c1c1c;
    padding: 15px;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 2px solid #333;
    z-index: 2;
}

.ip-transactions-table td {
    padding: 15px;
    border-bottom: 1px solid #1a1a1a;
    color: #dddddd;
}

.ip-transactions-table tbody tr:hover {
    background: rgba(255,59,59,.1);
    cursor: pointer;
}

.ip-checkbox {
    accent-color: #ff3b3b;
    cursor: pointer;
}

.transaction-id {
    font-weight: 600;
}

.transaction-ip {
    color: #ff3b3b;
}

.transaction-amount {
    font-weight: bold;
}

.transaction-status-high {
    color: #ff3b3b;
}

.transaction-status-medium {
    color: #ffa502;
}

.transaction-status-low {
    color: #00ff00;
}

/* ========== MAIN CONTENT & CARDS ========== */
.ip-main-content {
    padding: 40px;
}

.ip-main-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.ip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.ip-card {
    background: #121212;
    border-radius: 10px;
    border: 1px solid #222;
    transition: transform .25s ease, box-shadow .25s ease;
}

.ip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255,59,59,.1);
}

.ip-card-header {
    background: #1a1a1a;
    padding: 20px;
    border-bottom: 1px solid #222;
}

.ip-card-header h2 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.ip-card-body {
    padding: 20px;
    background: #181818;
}

.ip-card ul {
    list-style: none;
}

.ip-card li {
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
}

.ip-risk-high {
    color: #ff3b3b;
}

.ip-risk-med {
    color: #ffa502;
}

.ip-risk-low {
    color: #00ff00;
}

.ip-big {
    font-size: 36px;
    font-weight: 900;
    text-align: center;
}

/* ===============================
   SYSTEM STATS – BOTTOM CARDS
   CLEAN SOC / ENTERPRISE
=============================== */

/* ===============================
   GRID LAYOUT
=============================== */

.ip-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 28px 0 12px;
}

/* ===============================
   STAT CARD BASE
=============================== */

.ip-stat-card {
    position: relative;
    background: #141414;
    border: 1px solid rgba(255, 80, 80, 0.12);
    border-radius: 12px;

    min-height: 185px;
    padding: 22px;

    display: flex;
    flex-direction: column;
    gap: 8px; /* sostituisce space-between */

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.03),
        0 10px 28px rgba(0,0,0,0.6);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

/* ===============================
   HOVER – SOBRIO
=============================== */

.ip-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 80, 80, 0.45);
    box-shadow:
        inset 0 0 0 1px rgba(255,80,80,0.12),
        0 14px 36px rgba(0,0,0,0.8);
}

/* ===============================
   TITLES / TEXT
=============================== */

.ip-stat-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ff9a9a;
    font-weight: 600;
}

.ip-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 2px 0;
}

.ip-stat-sub {
    font-size: 12px;
    color: #b3b3b3;
    line-height: 1.4;
    opacity: 0.85;
}

/* ===============================
   SYSTEM CHECK LIST
=============================== */

.ip-system-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ip-system-list li {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #cfcfcf;
}

.ip-system-list .label {
    opacity: 0.85;
}

.ip-system-list .state {
    font-weight: 600;
    font-size: 11px;
}

/* Stati singole voci */
.ip-system-list li.running .state { color: #9a9a9a; }
.ip-system-list li.ok .state      { color: #00ff9c; }
.ip-system-list li.warn .state    { color: #ffb020; }
.ip-system-list li.fail .state    { color: #ff4d4d; }

/* ===============================
   BUTTON (SYSTEM CHECK)
=============================== */

.ip-system-btn {
    margin-top: auto; /* resta in basso ma ordinato */
    align-self: flex-start;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;

    background: transparent;
    border: 1px solid rgba(255,80,80,0.5);
    color: #ff9a9a;
    border-radius: 6px;

    cursor: pointer;
    transition: all 0.2s ease;
}

.ip-system-btn:hover {
    background: rgba(255,80,80,0.1);
    border-color: rgba(255,80,80,0.8);
}

.ip-system-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===============================
   STATUS COLORS (CARD)
=============================== */

.ip-stat-card.ok {
    border-color: rgba(0,255,156,0.6);
}

.ip-stat-card.warning {
    border-color: rgba(255,176,32,0.6);
}

.ip-stat-card.critical {
    border-color: rgba(255,77,77,0.9);
}

/* ===============================
   CRITICAL – SOFT PULSE ONLY
=============================== */

@keyframes ip-critical-pulse {
    0%   { box-shadow: 0 0 18px rgba(255,77,77,0.25); }
    50%  { box-shadow: 0 0 32px rgba(255,77,77,0.55); }
    100% { box-shadow: 0 0 18px rgba(255,77,77,0.25); }
}

.ip-stat-card.critical {
    animation: ip-critical-pulse 2.2s ease-in-out infinite;
}

/* ===============================
   MICRO FOOTER SOC
=============================== */

.ip-stat-card::after {
    content: "SOC MONITOR • realtime";
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.4px;
}

/* ===============================
   RESPONSIVE
=============================== */

@media (max-width: 900px) {
    .ip-stats {
        grid-template-columns: 1fr;
    }
}

/* =================================================
   HEADER CENTERING & BRAND POLISH (SAFE PATCH)
   NO HTML CHANGES
================================================= */

/* centra otticamente SOLO il blocco testo header */
.ip-header > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* subtitle più compatta e centrata */
.ip-subtitle {
    text-align: center;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* powered by – elegante, leggibile, enterprise */
.ip-powered {
    margin-top: 6px;
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-align: center;
    color: rgba(190, 190, 190, 0.85);
}

.ip-powered strong {
    color: #ff3b3b;
    font-weight: 600;
}

/* ===========================
   STATUS BADGE – READABILITY FIX
=========================== */

.ip-status {
    display: flex;
    flex-direction: column;
    align-items: center;

    background: #1a1a1a;
    border: 1px solid #ff3b3b;
    color: #ff3b3b;

    padding: 10px 18px;
    border-radius: 6px;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    line-height: 1.1;
}

/* sottotitolo status (Core Protection Active) */
.ip-status-sub {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.3px;
    color: #cfcfcf;
    opacity: 0.85;
}

/* =================================================
   IRONPHANTOM DIVIDER – HEADER → LIVE AREA
   CSS ONLY / NO HTML CHANGES
================================================= */

.ip-transactions-section {
    position: relative;
}

.ip-transactions-section::before {
    content: "";
    display: block;

    width: 70%;              /* ✅ più lunga */
    max-width: 560px;        /* limite enterprise */
    height: 2px;
    margin: 0 auto 26px;

    background: linear-gradient(
        90deg,
        rgba(255,59,59,0.1),
        rgba(255,59,59,0.9),
        rgba(255,59,59,0.1)
    );

    border-radius: 2px;
}


/* =========================================================
   CEREBRUS-X ALERT – ADVANCED SOC STYLE (WOW ZONE)
   Dedicated visual layer – NO STRUCTURE CHANGES
========================================================= */

/* evidenzia la card Cerebrus-X */
.ip-stat-card #cerebrusx-demo {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* lista più compatta e tecnica */
#cerebrusx-demo li {
    font-size: 12px;
    color: #d6d6d6;
    letter-spacing: 0.2px;
}

/* valori dinamici */
#cerebrusx-demo strong {
    font-weight: 600;
}

/* =========================================
   CEREBRUS-X HEADER BADGE – FIXED POSITION
========================================= */

#cerebrusx-card .ip-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#cerebrusx-card .ip-card-header h2 {
    margin: 0;
    flex: 1 1 auto;
}

#cerebrusx-card .ip-stat-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    margin-left: auto;
}

#cerebrusx-card .ip-stat-badge.active {
    background: rgba(0, 183, 255, 0.12);
    color: #7dd3fc;
    border: 1px solid rgba(0, 183, 255, 0.35);
}

#cerebrusx-card .ip-stat-badge.warning {
    background: rgba(255, 176, 32, 0.12);
    color: #ffb020;
    border: 1px solid rgba(255, 176, 32, 0.35);
}


/* ===============================
   PROGRESS BAR – CEREBRUS-X
=============================== */

.cerebrus-progress {
    position: relative;
    width: 100%;
    height: 7px;
    background: #0e0e0e;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.cerebrus-progress::after {
    content: "analyzing";
    position: absolute;
    right: 8px;
    top: -16px;
    font-size: 10px;
    letter-spacing: 0.6px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
}

.cerebrus-progress.active::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 35%;
    background: linear-gradient(
        90deg,
        rgba(0,183,255,0.15),
        rgba(0,183,255,0.95),
        rgba(0,183,255,0.15)
    );
    animation: cerebrus-scan 1.4s linear infinite;
    border-radius: 6px;
}

@keyframes cerebrus-scan {
    from { transform: translateX(-120%); }
    to   { transform: translateX(280%); }
}

/* ===============================
   RISK SCORE COLOR CODING
=============================== */

#cx-score {
    font-size: 13px;
    font-weight: 700;
}

#cx-level {
    font-weight: 700;
}

/* livello rischio */
#cx-level:contains("High"),
.ip-risk-high {
    color: #ff4d4d;
}

#cx-level:contains("Medium"),
.ip-risk-med {
    color: #ffb020;
}

#cx-level:contains("Low"),
.ip-risk-low {
    color: #00ff9c;
}

/* ===============================
   CONFIDENCE / TREND
=============================== */

#cx-confidence {
    color: #7dd3fc;
    font-weight: 600;
}

#cx-trend {
    font-weight: 600;
    letter-spacing: 0.3px;
}

#cx-trend:contains("↑") {
    color: #ff4d4d;
}

#cx-trend:contains("↓") {
    color: #00ff9c;
}

#cx-trend:contains("→") {
    color: #b3b3b3;
}

/* ===============================
   DECISION HINT – SOC STYLE
=============================== */

#cx-decision {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.05);
}

/* ===============================
   DEMO MODE LABEL – PROFESSIONAL
=============================== */

.cx-demo-label {
    margin-top: 6px;
    padding-top: 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.45);
    border-top: 1px dashed rgba(255,255,255,0.08);
}

/* ===============================
   MICRO GLOW WHEN ACTIVE
=============================== */

.ip-stat-card:has(.cerebrus-progress.active) {
    box-shadow:
        inset 0 0 0 1px rgba(0,183,255,0.15),
        0 0 28px rgba(0,183,255,0.12),
        0 18px 40px rgba(0,0,0,0.9);
}

/* ===============================
   CEREBRUS-X – UPGRADE STATE
=============================== */

.ip-stat-card.cx-upgrade {
    border-color: rgba(255,59,59,0.9);
    box-shadow:
        inset 0 0 0 1px rgba(255,59,59,0.25),
        0 0 34px rgba(255,59,59,0.35),
        0 18px 42px rgba(0,0,0,0.9);
}

.ip-stat-card.cx-upgrade::after {
    content: "UPGRADE TO PRO";
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 10px;
    letter-spacing: 1px;
    color: #ff3b3b;
    font-weight: 700;
}


/* =================================================
   SUSPICIOUS ACTIVITY CARD – AUTO ADAPTIVE LAYOUT
   NO PHP / NO HTML CHANGES
================================================= */

/* rende la lista elastica e distribuita */
#suspicious-activity-card .ip-stat-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 8px;
}

/* ogni riga si adatta senza forzature */
#suspicious-activity-card .ip-stat-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 20px;
    line-height: 1.4;
}

/* la demo label va SEMPRE in fondo */
#suspicious-activity-card .cx-demo-label {
    margin-top: auto;
}

/* evita che il testo rompa il layout */
#suspicious-activity-card strong {
    max-width: 55%;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* ===============================
   SYSTEM STATUS – LOADING EFFECT
   Subtle SOC refresh (NON fake)
=============================== */

.ip-stat-card.ip-loading {
    overflow: hidden;
}

.ip-stat-card.ip-loading::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        110deg,
        rgba(255,255,255,0.00) 25%,
        rgba(255,255,255,0.06) 37%,
        rgba(255,255,255,0.00) 63%
    );

    animation: ip-loading-scan 1.2s linear infinite;
    pointer-events: none;
}

@keyframes ip-loading-scan {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}


/* ========== FOOTER – SLOGAN (WHITE / ENTERPRISE) ========== */
.ip-footer {
    position: relative;

    background: #0d0d0d;
    padding: 34px 40px 30px;
    border-top: 1px solid #1c1c1c;

    text-align: center;
    font-size: 12px;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.9);

    min-height: 60px;
}

/* linea rossa IronPhantom integrata nel footer */
.ip-footer::before {
    content: "";
    display: block;

    width: 70%;
    max-width: 520px;
    height: 2px;
    margin: 0 auto 22px;

    background: linear-gradient(
        90deg,
        rgba(255,59,59,0.1),
        rgba(255,59,59,0.9),
        rgba(255,59,59,0.1)
    );

    border-radius: 2px;
}

/* slogan visibile SEMPRE */
.ip-footer strong {
    display: block;
    color: #ffffff;
    font-weight: 600;
}
/* =================================================
   HEADER STATUS – CYBER BICOLOR (PRODUCTION)
   White + Cyber Blue
================================================= */

body.wp-admin.toplevel_page_ironphantom-dashboard .ip-status {
    background: #141414;
    border: 1px solid rgba(0,183,255,0.45);

    padding: 14px 22px;

    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;

    box-shadow:
        inset 0 0 0 1px rgba(0,183,255,0.12),
        0 0 22px rgba(0,183,255,0.10);
}

/* IRONPHANTOM FREE (MAIN LABEL) */
body.wp-admin.toplevel_page_ironphantom-dashboard .ip-status {
    color: #ffffff;
}

/* Core Protection Active (SUB) */
body.wp-admin.toplevel_page_ironphantom-dashboard .ip-status-sub {
    color: #7dd3fc; /* cyber blue */
    font-size: 13px;
    font-weight: 600;

    margin-top: 6px;
    letter-spacing: 0.5px;
    opacity: 0.95;
}
/* =================================================
   HEADER SUBTITLE – WHITE VISIBILITY FIX
   REAL-TIME MONITORING / POWERED BY
================================================= */

body.wp-admin.toplevel_page_ironphantom-dashboard .ip-subtitle {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.6px;
    opacity: 0.95;
}

/* powered by */
body.wp-admin.toplevel_page_ironphantom-dashboard .ip-powered {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.8px;
    opacity: 0.9;
}

/* evidenzia leggermente il brand dopo "powered by" */
body.wp-admin.toplevel_page_ironphantom-dashboard .ip-powered strong {
    color: #7dd3fc; /* cyber blue coerente con Cerebrus-X */
    font-weight: 600;
}
/* =========================================
   IRONPHANTOM – EMPTY TRANSACTIONS STATE
   (Live monitoring placeholder)
========================================= */

.ironphantom-empty-state {
    width: 100%;
    padding: 36px 16px;
    text-align: center;

    background: transparent;
    border-radius: 10px;

    color: #9ca3af;
}

/* Icona scudo */
.ironphantom-empty-state .empty-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 10px;
    opacity: 0.9;
}

/* Titolo principale */
.ironphantom-empty-state .empty-title {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 4px;
}

/* Sottotitolo */
.ironphantom-empty-state .empty-subtitle {
    font-size: 13px;
    color: #9ca3af;
}

/* =========================================
   MICRO HEARTBEAT (subtle, SOC-style)
========================================= */

.ironphantom-empty-state .empty-icon {
    animation: ip-empty-pulse 2.6s ease-in-out infinite;
}

@keyframes ip-empty-pulse {
    0%   { opacity: 0.5; }
    50%  { opacity: 1; }
    100% { opacity: 0.5; }
}

/* 🔒 PREVENT INITIAL FLASH */
.ip-transactions-table {
    display: none;
}



.pwd-safe {
    color: #22c55e;
    font-weight: 600;
}

.pwd-compromised {
    color: #ef4444;
    font-weight: 700;
}
/* =========================================================
   IRONPHANTOM DASHBOARD – MOBILE FIX PATCH
   SAFE • NO STRUCTURE CHANGE • CSS ONLY
   ========================================================= */

@media (max-width: 768px) {

    /* ===============================
       GLOBAL PADDING REDUCTION
    =============================== */
    .ip-main-content,
    .ip-transactions-section,
    .ip-footer {
        padding: 20px 16px !important;
    }

    /* ===============================
       HEADER – STACK MODE
    =============================== */
    .ip-header {
        flex-direction: column;
        align-items: center;
        padding: 20px 16px;
        gap: 14px;
        text-align: center;
    }

    .ip-header img {
        width: 52px;
        height: 52px;
    }

    .ip-header h1 {
        font-size: 22px;
        line-height: 1.2;
    }

    .ip-subtitle {
        font-size: 13px;
    }

    /* status badge sotto il titolo */
    .ip-status {
        margin-left: 0 !important;
        margin-top: 8px;
        width: 100%;
        max-width: 260px;
    }

    /* ===============================
       TRANSACTIONS HEADER
    =============================== */
    .ip-transactions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* ===============================
       ACTION BUTTONS – STACK
    =============================== */
    .ip-actions {
        width: 100%;
        flex-direction: column;
    }

    .ip-actions button {
        width: 100%;
        text-align: center;
    }

    /* ===============================
       TABLE – MOBILE SAFE SCROLL
    =============================== */
    .ip-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ip-transactions-table {
        font-size: 12px;
    }

    /* ===============================
       CARDS GRID
    =============================== */
    .ip-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* ===============================
       STATS GRID
    =============================== */
    .ip-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ip-stat-card {
        min-height: auto;
        padding: 18px;
    }

    .ip-stat-value {
        font-size: 24px;
    }

    /* ===============================
       SYSTEM LIST TEXT WRAP
    =============================== */
    .ip-system-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .ip-system-list .state {
        font-size: 11px;
    }

    /* ===============================
       FOOTER
    =============================== */
    .ip-footer {
        font-size: 11px;
    }

    .ip-footer::before {
        width: 90%;
    }
}

/* ===============================
   IRONPHANTOM – HIDE PASSWORD COLUMN
   =============================== */

.ip-transactions-table th:nth-child(5),
.ip-transactions-table td:nth-child(5) {
    display: none;
}

/* =================================================
   CEREBRUS-X CARD – FINAL OVERRIDE (NO CONFLICT)
   This block neutralizes inherited pseudo-labels
================================================= */

#cerebrusx-card::after {
    content: "";
}

/* =====================================================
   IRONPHANTOM – PRO UPGRADE MODAL (MATTE BLACK STYLE)
   ===================================================== */

.ip-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;

    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px); /* Leggermente aumentato per profondità */

    align-items: center;
    justify-content: center;
}

/* Modal container */

.ip-modal-content {
    position: relative;
    overflow: hidden;
    
    /* Fondo nero con riflessi rosso (alto sx) e blu (basso dx) */
    background: #0b0b0b;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(255, 0, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(0, 102, 255, 0.08) 0%, transparent 50%);

    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;

    padding: 28px;
    width: 420px;
    max-width: 90%;

    color: #ffffff;

    /* Shadow con un leggerissimo alone cromatico */
    box-shadow:
        0 25px 60px rgba(0,0,0,0.9),
        0 0 20px rgba(255, 0, 0, 0.03),
        0 0 20px rgba(0, 102, 255, 0.03);

    text-align: center;
}

/* Linea decorativa superiore sfumata (Rosso -> Blu) */
.ip-modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff3333, #0066ff);
    opacity: 0.5;
}

/* titolo */

.ip-modal-content h3 {
    font-size: 20px;
    margin-bottom: 12px;

    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase; /* Un tocco più "IronPhantom" */
    letter-spacing: 0.5px;
}

/* testo */

.ip-modal-content p {
    font-size: 14px;
    line-height: 1.6;

    color: #e5e5e5;
}

/* bottoni */

.ip-modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* close */

#ip-modal-close {
    padding: 8px 22px; /* Un po' più largo per bilanciamento */
    border-radius: 6px;

    border: 1px solid rgba(255,255,255,0.20);

    background: #111111;
    color: #ffffff;

    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#ip-modal-close:hover {
    background: #1a1a1a;
    border-color: #0066ff; /* Riflesso blu al passaggio */
    box-shadow: 0 0 10px rgba(0, 102, 255, 0.2);
    transform: translateY(-1px);
}

/* =========================================================
   CEREBRUS-X — DYNAMIC GLOW ENGINE (FINAL SOC STYLE)
   ========================================================= */

/* 1. STATO UNIVERSALE (BASE / FREE / PRO SAFE) */
/* Questa configurazione assicura che la card sia sempre "accesa" */
#cerebrusx-card, 
.ip-stat-card.cx-status-safe,
.ip-stat-card:not(.cx-status-critical) {
    background: #0b0b0b !important;
    border: 1px solid rgba(0, 183, 255, 0.15) !important;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    
    /* Glow Blu soffuso interno: indica "Sistema Operativo" */
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.8),
        inset -20px -20px 50px rgba(0, 102, 255, 0.03);
}

/* 2. STATO CRITICAL (ROSSO - SOLO PRO ALERT) */
.ip-stat-card.cx-status-critical {
    border-color: rgba(255, 51, 51, 0.4) !important;
    background: #0b0b0b !important;
    animation: ip-critical-pulse 1.8s ease-in-out infinite !important;
    
    /* Glow Rosso interno: indica "Rilevamento Minaccia" */
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.9),
        inset 20px 20px 60px rgba(255, 51, 51, 0.06) !important;
}

/* 3. TESTO DINAMICO (SCORE) */
#cx-score {
    transition: all 0.3s ease;
}

/* Score in Allerta */
.cx-status-critical #cx-score {
    color: #ff4d4d !important;
    text-shadow: 0 0 15px rgba(255, 77, 77, 0.6);
}

/* Score in Scansione / Safe */
#cx-score, .cx-status-safe #cx-score {
    color: #00ccff !important;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.3);
}

/* 4. EFFETTO SCANNER (Universale - Indica lettura DB reale) */
#cerebrusx-card::before {
    content: "";
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.02), 
        transparent
    );
    animation: cx-scanner-line 7s infinite linear;
    pointer-events: none;
    z-index: 1;
}

@keyframes cx-scanner-line {
    0% { left: -150%; }
    100% { left: 150%; }
}

/* 5. LED DI STATO (FOOTER) */
.pulse-dot {
    height: 6px; width: 6px;
    background-color: #00ff00; /* Verde = Motore Online */
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 8px #00ff00;
    animation: cx-led-blink 2s infinite;
}

@keyframes cx-led-blink {
    0%, 100% { opacity: 1; filter: brightness(1.2); }
    50% { opacity: 0.4; filter: brightness(0.8); }
}

/* Supporto per il testo pulsante in modalità Free */
.cx-is-analyzing {
    animation: cx-text-pulse 2s infinite;
    font-size: 11px;
    letter-spacing: 0.5px;
}

@keyframes cx-text-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
/* =========================================
   IRONPHANTOM – SENSOR CARD WOW STYLE
========================================= */

#ip-sensor-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(90, 140, 255, 0.16);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 32%),
        radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.10), transparent 28%),
        linear-gradient(180deg, rgba(17, 22, 32, 0.98) 0%, rgba(10, 14, 22, 0.99) 100%);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

#ip-sensor-card:hover {
    transform: translateY(-3px);
    border-color: rgba(90, 140, 255, 0.30);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(90, 140, 255, 0.08) inset;
}

#ip-sensor-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #22c55e 55%, #60a5fa 100%);
    opacity: 0.95;
}

#ip-sensor-card::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

#ip-sensor-card .ip-stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

#ip-sensor-card .ip-stat-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f4f8ff;
    text-shadow: 0 0 16px rgba(59, 130, 246, 0.08);
}

#ip-sensor-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8f1ff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 6px 16px rgba(0,0,0,0.18);
}

#ip-sensor-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.65);
    flex-shrink: 0;
}

#ip-sensor-card .ip-stat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

#ip-sensor-card .ip-stat-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.05);
    color: #b9c6d8;
    font-size: 13px;
    line-height: 1.45;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

#ip-sensor-card .ip-stat-list li:hover {
    background: rgba(255,255,255,0.055);
    border-color: rgba(90, 140, 255, 0.12);
    transform: translateX(2px);
}

#ip-sensor-card .ip-stat-list strong {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

#ip-sensor-card .ip-modal-actions {
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

#ip-sensor-card label[for="ip-sensor-toggle"] {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #eef4ff;
    font-size: 14px;
    font-weight: 700;
    user-select: none;
}

#ip-sensor-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.40);
    border: 1px solid rgba(255,255,255,0.10);
    position: relative;
    cursor: pointer;
    outline: none;
    transition: all 0.22s ease;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.26);
}

#ip-sensor-toggle::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #dbeafe 100%);
    box-shadow:
        0 3px 10px rgba(0,0,0,0.22),
        inset 0 1px 0 rgba(255,255,255,0.85);
    transition: transform 0.22s ease;
}

#ip-sensor-toggle:checked {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
    border-color: rgba(34, 197, 94, 0.42);
    box-shadow:
        0 0 0 4px rgba(34, 197, 94, 0.10),
        inset 0 2px 6px rgba(0,0,0,0.16);
}

#ip-sensor-toggle:checked::before {
    transform: translateX(24px);
}

#ip-sensor-toggle:focus-visible {
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.16),
        inset 0 2px 6px rgba(0,0,0,0.24);
}

#ip-sensor-card p {
    margin: 14px 0 0;
    color: #98a7bc;
    font-size: 13px;
    line-height: 1.6;
}

#ip-sensor-status-text {
    color: #dfffea;
    text-shadow: 0 0 14px rgba(34, 197, 94, 0.16);
}
/* =========================================
   FREE HEADER UPGRADE BUTTON
   compact elegant red version
   ========================================= */

.ip-free-upgrade-wrap {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.ip-upgrade-pro-btn {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 185px;
    padding: 10px 16px;
    border: 1px solid rgba(185, 46, 46, 0.62);
    border-radius: 14px;
    background: linear-gradient(180deg, #7a1616 0%, #4b0d0d 100%);
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.26),
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 0 18px rgba(170, 28, 28, 0.18);
    color: #fff7f7;
    cursor: pointer;
    text-align: center;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.ip-upgrade-pro-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(230, 72, 72, 0.78);
    background: linear-gradient(180deg, #8a1b1b 0%, #561010 100%);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 24px rgba(205, 40, 40, 0.24);
}

.ip-upgrade-pro-btn:active {
    transform: translateY(0);
}

.ip-upgrade-pro-btn:focus {
    outline: none;
    border-color: rgba(245, 95, 95, 0.82);
    box-shadow:
        0 0 0 3px rgba(210, 50, 50, 0.18),
        0 10px 24px rgba(0, 0, 0, 0.28);
}

.ip-upgrade-pro-btn-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fffafa;
    line-height: 1.15;
}

.ip-upgrade-pro-btn-sub {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.25;
    color: rgba(255, 232, 232, 0.84);
    letter-spacing: 0.01em;
}

@media (max-width: 640px) {
    .ip-upgrade-pro-btn {
        min-width: 170px;
        padding: 10px 14px;
    }

    .ip-upgrade-pro-btn-label {
        font-size: 0.8rem;
    }

    .ip-upgrade-pro-btn-sub {
        font-size: 0.68rem;
    }
}
