/**
 * Stefan Optimizer Cloud Control - Admin Design System & Mobile App Stylesheet
 * Versiune: v4.9.8 Enterprise
 * Autor: Stefan Optimizer
 */

:root {
    --bg: #090C12;
    --card-bg: rgba(17, 23, 37, 0.95);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --cyan: #06B6D4;
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --success: #10B981;
    --warning: #F59E0B;
    --text: #F8FAFC;
    --muted: #94A3B8;
    --lan-ip: #38BDF8;
    --lan-bg: rgba(56, 189, 248, 0.12);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
}

html, body { 
    background: var(--bg); 
    color: var(--text); 
    min-height: 100vh; 
    padding: 24px 16px; 
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container { 
    max-width: 1300px; 
    margin: 0 auto; 
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 24px; 
    flex-wrap: wrap; 
    gap: 16px; 
    border-bottom: 1px solid var(--card-border); 
    padding-bottom: 16px; 
}

.title { 
    font-size: 22px; 
    font-weight: 800; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.badge { 
    background: rgba(59, 130, 246, 0.15); 
    color: #60A5FA; 
    border: 1px solid rgba(59, 130, 246, 0.3); 
    padding: 4px 12px; 
    border-radius: 999px; 
    font-size: 12px; 
    font-weight: 700; 
}

.badge-ver { 
    background: rgba(16, 185, 129, 0.15); 
    color: #34D399; 
    border: 1px solid rgba(16, 185, 129, 0.3); 
    padding: 4px 10px; 
    border-radius: 999px; 
    font-size: 12px; 
    font-weight: 700; 
}

/* Navigation Tabs */
.nav-tabs { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 24px; 
    border-bottom: 1px solid rgba(255,255,255,0.06); 
    padding-bottom: 8px; 
    flex-wrap: wrap; 
}

.nav-tab { 
    padding: 10px 18px; 
    border-radius: 10px; 
    font-size: 14px; 
    font-weight: 700; 
    text-decoration: none; 
    color: var(--muted); 
    background: transparent; 
    border: 1px solid transparent; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    transition: all 0.2s; 
}

.nav-tab:hover { 
    color: #fff; 
    background: rgba(255,255,255,0.04); 
}

.nav-tab.active { 
    color: #fff; 
    background: rgba(59, 130, 246, 0.15); 
    border-color: rgba(59, 130, 246, 0.35); 
}

.tab-badge { background: #EF4444; color: #fff; border-radius: 999px; font-size: 11px; padding: 2px 7px; font-weight: 800; }
.tab-badge-green { background: #10B981; color: #fff; border-radius: 999px; font-size: 11px; padding: 2px 7px; font-weight: 800; }
.tab-badge-yellow { background: #F59E0B; color: #111; border-radius: 999px; font-size: 11px; padding: 2px 7px; font-weight: 800; }

/* Cards & Containers */
.card { 
    background: var(--card-bg); 
    border: 1px solid var(--card-border); 
    border-radius: 18px; 
    padding: 22px; 
    margin-bottom: 24px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    box-sizing: border-box;
}

/* Buttons */
.btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 8px; 
    padding: 9px 16px; 
    border-radius: 10px; 
    font-size: 13px; 
    font-weight: 600; 
    text-decoration: none; 
    cursor: pointer; 
    border: none; 
    transition: 0.2s; 
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4); }
.btn-cyan { background: #0891B2; color: #fff; }
.btn-cyan:hover { background: #06B6D4; }
.btn-danger { background: var(--danger-bg); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: #EF4444; color: #fff; }
.btn-secondary { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.12); }
.btn-secondary:hover { background: rgba(255,255,255,0.15); }
.btn-success { background: rgba(16, 185, 129, 0.2); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.35); }
.btn-success:hover { background: #10B981; color: #fff; }
.btn-warning { background: rgba(245, 158, 11, 0.2); color: #FCD34D; border: 1px solid rgba(245, 158, 11, 0.4); }
.btn-warning:hover { background: #F59E0B; color: #000; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.input { 
    width: 100%; 
    background: rgba(10, 14, 23, 0.85); 
    border: 1px solid rgba(255,255,255,0.12); 
    color: #fff; 
    padding: 10px 14px; 
    border-radius: 10px; 
    font-size: 14px; 
    box-sizing: border-box;
}
.input:focus { outline: none; border-color: var(--accent); }

/* Statistics Grid */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 14px; 
    margin-bottom: 24px; 
}
.stat-card { 
    background: rgba(12, 17, 28, 0.7); 
    border: 1px solid rgba(255,255,255,0.06); 
    border-radius: 14px; 
    padding: 16px; 
}
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-val { font-size: 24px; font-weight: 800; color: #38BDF8; margin-top: 4px; }

/* Status & OS Badges */
.pill-lan { display: inline-flex; align-items: center; gap: 6px; background: var(--lan-bg); color: var(--lan-ip); border: 1px solid rgba(56, 189, 248, 0.3); padding: 4px 10px; border-radius: 8px; font-weight: 700; font-family: monospace; font-size: 13px; }
.pill-proc { display: inline-flex; align-items: center; gap: 4px; background: rgba(239, 68, 68, 0.15); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.3); padding: 3px 8px; border-radius: 6px; font-weight: 700; font-family: monospace; font-size: 12px; }
.pill-status-online { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; }
.pill-status-idle { background: rgba(245, 158, 11, 0.15); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.3); padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; }
.pill-status-offline { background: rgba(148, 163, 184, 0.15); color: #94A3B8; border: 1px solid rgba(148, 163, 184, 0.3); padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; }
.pill-host { font-weight: 700; color: #E2E8F0; }
.pill-user { color: #A5B4FC; font-weight: 600; }
.pill-muted { color: var(--muted); font-size: 11px; }

.pill-win11 { display: inline-flex; align-items: center; gap: 4px; background: rgba(59, 130, 246, 0.18); color: #60A5FA; border: 1px solid rgba(59, 130, 246, 0.35); padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.pill-win10 { display: inline-flex; align-items: center; gap: 4px; background: rgba(6, 182, 212, 0.18); color: #22D3EE; border: 1px solid rgba(6, 182, 212, 0.35); padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.pill-lic-full { background: rgba(16, 185, 129, 0.18); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.35); padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.pill-lic-usb { background: rgba(168, 85, 247, 0.18); color: #C084FC; border: 1px solid rgba(168, 85, 247, 0.35); padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.pill-lic-prog { background: rgba(59, 130, 246, 0.18); color: #93C5FD; border: 1px solid rgba(59, 130, 246, 0.35); padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.pill-lic-free { background: rgba(148, 163, 184, 0.12); color: #94A3B8; border: 1px solid rgba(148, 163, 184, 0.25); padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

.btn-lic-usb { background: rgba(168, 85, 247, 0.16); color: #D8B4FE; border: 1px solid rgba(168, 85, 247, 0.35); }
.btn-lic-usb:hover { background: #9333EA; color: #fff; }
.btn-lic-prog { background: rgba(59, 130, 246, 0.16); color: #93C5FD; border: 1px solid rgba(59, 130, 246, 0.35); }
.btn-lic-prog:hover { background: #2563EB; color: #fff; }
.btn-lic-full { background: rgba(16, 185, 129, 0.18); color: #6EE7B7; border: 1px solid rgba(16, 185, 129, 0.4); }
.btn-lic-full:hover { background: #059669; color: #fff; }
.btn-lic-reset { background: rgba(239, 68, 68, 0.12); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.25); }
.btn-lic-reset:hover { background: #EF4444; color: #fff; }

.domain-tag { display: inline-flex; align-items: center; gap: 8px; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.25); color: #FCA5A5; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; margin: 4px; }
.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #34D399; padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; }
.alert-danger { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #F87171; padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; }

/* Table Wrapper */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid rgba(255,255,255,0.06); width: 100%; box-sizing: border-box; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { background: rgba(10, 14, 23, 0.95); color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 12px; text-transform: uppercase; }
td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-box { min-width: 260px; flex: 1; position: relative; }

/* Filter Controls */
.filter-container { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; background: rgba(12, 17, 28, 0.6); padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.06); }
.filter-tabs { display: inline-flex; background: rgba(10, 14, 23, 0.85); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 4px; gap: 4px; }
.btn-status-filter { background: transparent; border: none; color: var(--muted); padding: 7px 15px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.btn-status-filter:hover { color: #fff; background: rgba(255,255,255,0.06); }
.btn-status-filter.active-all { background: rgba(59, 130, 246, 0.22); color: #93C5FD; border: 1px solid rgba(59, 130, 246, 0.45); }
.btn-status-filter.active-online { background: rgba(16, 185, 129, 0.22); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.45); }
.btn-status-filter.active-offline { background: rgba(148, 163, 184, 0.2); color: #E2E8F0; border: 1px solid rgba(148, 163, 184, 0.4); }

/* OS Tabs */
.os-tab-bar { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 14px; flex-wrap: wrap; }
.btn-os-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); color: var(--muted); transition: all 0.2s; }
.btn-os-tab:hover { color: #fff; background: rgba(255,255,255,0.08); }
.btn-os-tab.active-os-all { background: rgba(59, 130, 246, 0.18); color: #60A5FA; border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 0 14px rgba(59, 130, 246, 0.2); }
.btn-os-tab.active-os-win11 { background: rgba(59, 130, 246, 0.22); color: #93C5FD; border-color: #3B82F6; box-shadow: 0 0 14px rgba(59, 130, 246, 0.25); }
.btn-os-tab.active-os-win10 { background: rgba(6, 182, 212, 0.22); color: #67E8F9; border-color: #06B6D4; box-shadow: 0 0 14px rgba(6, 182, 212, 0.25); }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); z-index: 999; align-items: center; justify-content: center; padding: 20px; }
.modal-box { background: #0F172A; border: 1px solid rgba(255,255,255,0.15); border-radius: 16px; max-width: 800px; width: 100%; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7); }
.modal-header { padding: 18px 24px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: flex-end; gap: 10px; }

/* ===================================================================
   Mobile Native App View Styles (Automatic on screens <= 768px)
   =================================================================== */
.mobile-endpoints-cards {
    display: none;
}

.mob-device-card {
    background: linear-gradient(135deg, rgba(20, 27, 45, 0.95), rgba(12, 17, 28, 0.98));
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;
}

.mob-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mob-card-title {
    font-size: 16px;
    font-weight: 800;
    color: #60A5FA;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mob-card-tags {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.pill-ver-tag {
    background: rgba(59, 130, 246, 0.15);
    color: #93C5FD;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.mob-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin-bottom: 12px;
    font-size: 12px;
}

.mob-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    word-break: break-word;
}

.mob-info-label {
    font-size: 10px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mob-info-val {
    color: #F1F5F9;
    font-size: 12px;
}

.mob-card-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mob-quick-actions {
    display: flex;
    gap: 6px;
    width: 100%;
}

/* Device Detail Page Hero & Metrics */
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 14px; border-bottom: 1px solid var(--card-border); padding-bottom: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: #60A5FA; text-decoration: none; font-weight: 700; font-size: 14px; background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.3); padding: 8px 16px; border-radius: 10px; transition: all 0.2s; }
.back-link:hover { background: rgba(59, 130, 246, 0.25); color: #fff; transform: translateX(-3px); }

.live-indicator { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #34D399; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10B981; box-shadow: 0 0 8px #10B981; animation: blink 1.8s infinite; }

.quarantine-alert-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.35)); border: 2px solid #EF4444; border-radius: 16px; padding: 18px 24px; margin-bottom: 24px; box-shadow: 0 0 25px rgba(239, 68, 68, 0.3); animation: pulse 2.5s infinite; }
.quarantine-alert-title { font-size: 16px; font-weight: 800; color: #FCA5A5; display: flex; align-items: center; gap: 10px; }
.quarantine-alert-desc { font-size: 13px; color: #FECACA; margin-top: 4px; }

.hero-device { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95)); border: 1px solid rgba(59, 130, 246, 0.25); border-radius: 20px; padding: 28px; margin-bottom: 24px; box-shadow: 0 15px 35px rgba(0,0,0,0.4); }
.device-identity { display: flex; align-items: center; gap: 20px; }
.device-icon-box { width: 72px; height: 72px; border-radius: 18px; background: rgba(59, 130, 246, 0.15); border: 2px solid rgba(59, 130, 246, 0.35); display: flex; align-items: center; justify-content: center; font-size: 34px; box-shadow: 0 0 25px rgba(59, 130, 246, 0.25); }
.device-title { font-size: 26px; font-weight: 800; color: #F8FAFC; display: flex; align-items: center; gap: 12px; }
.device-subtitle { font-size: 14px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card { background: rgba(12, 17, 28, 0.7); border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 20px; position: relative; overflow: hidden; }
.metric-label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.metric-val { font-size: 26px; font-weight: 800; color: #F8FAFC; }

.progress-bar-bg { width: 100%; height: 8px; background: rgba(255,255,255,0.08); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 999px; transition: width 0.5s ease; }

.action-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }

.pagination-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 13px; color: var(--muted); }
.pagination-controls { display: flex; gap: 6px; align-items: center; }
.page-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: #E2E8F0; padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.page-btn:hover:not(:disabled) { background: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.code-box { font-family: 'JetBrains Mono', monospace; font-size: 11px; background: rgba(0,0,0,0.4); padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.06); color: #7DD3FC; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.85; } }

/* ===================================================================
   Mobile Media Queries (Compact & Zero Overflow)
   =================================================================== */
@media (max-width: 768px) {
    html, body { 
        overflow-x: hidden !important; 
        width: 100% !important; 
        max-width: 100vw !important; 
        margin: 0 !important; 
        padding: 10px 8px !important; 
        font-size: 13px; 
    }
    .container { 
        max-width: 100% !important; 
        width: 100% !important; 
        overflow-x: hidden !important; 
        padding: 0 !important; 
    }
    .header { margin-bottom: 12px; padding-bottom: 10px; gap: 8px; flex-direction: column; align-items: flex-start; }
    .title { font-size: 16px; gap: 6px; flex-wrap: wrap; }
    .badge, .badge-ver { font-size: 10.5px; padding: 2px 8px; }

    /* Nav tabs horizontal scroll */
    .nav-tabs { 
        display: flex; 
        flex-wrap: nowrap; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        gap: 6px; 
        padding-bottom: 6px; 
        margin-bottom: 14px;
        scrollbar-width: none; 
    }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tab { 
        flex-shrink: 0; 
        padding: 7px 12px; 
        font-size: 12px; 
        border-radius: 8px;
        gap: 6px;
    }

    /* 2x2 Grid for Stats */
    .grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 8px; 
        margin-bottom: 14px; 
    }
    .stat-card { padding: 10px; border-radius: 10px; }
    .stat-label { font-size: 10px; letter-spacing: 0.2px; }
    .stat-val { font-size: 17px; margin-top: 2px; }

    .card { 
        padding: 12px 10px !important; 
        border-radius: 14px !important; 
        margin-bottom: 14px !important; 
        width: 100% !important; 
        box-sizing: border-box !important; 
        overflow-x: hidden !important; 
    }
    .filter-container { padding: 10px 8px; gap: 8px; flex-direction: column; align-items: stretch; }
    .filter-tabs { width: 100%; display: flex; justify-content: space-between; }
    .btn-status-filter { flex: 1; text-align: center; justify-content: center; padding: 6px 4px; font-size: 11px; }

    .os-tab-bar { 
        display: flex; 
        flex-wrap: nowrap; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        gap: 6px; 
        padding-bottom: 6px;
        margin-bottom: 10px; 
        scrollbar-width: none; 
    }
    .os-tab-bar::-webkit-scrollbar { display: none; }
    .btn-os-tab { flex-shrink: 0; padding: 6px 10px; font-size: 11px; gap: 4px; border-radius: 8px; }

    .search-box { min-width: 100%; width: 100%; }
    .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }

    /* Switch: Hide Wide Table and Show Native Mobile Cards */
    .table-wrap { 
        display: none !important;
    }
    .mobile-endpoints-cards {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .pill-lan { padding: 2px 6px; font-size: 11px; word-break: break-all; }
    .pill-proc { padding: 2px 6px; font-size: 10.5px; }
    .btn-sm { padding: 4px 8px; font-size: 11px; }

    .modal-overlay { padding: 6px; }
    .modal-box { max-height: 94vh; border-radius: 12px; width: 98vw; }
    .modal-header { padding: 10px 14px; }
    .modal-body { padding: 12px 14px; }
    .modal-footer { padding: 8px 14px; }

    /* Device detail view on mobile */
    .top-bar { margin-bottom: 12px; padding-bottom: 10px; gap: 8px; flex-direction: column; align-items: flex-start; }
    .back-link { font-size: 12px; padding: 6px 12px; border-radius: 8px; width: 100%; justify-content: center; box-sizing: border-box; }
    
    .hero-device { 
        padding: 14px 12px !important; 
        border-radius: 14px !important; 
        gap: 12px !important; 
        margin-bottom: 14px !important; 
        width: 100% !important; 
        box-sizing: border-box !important; 
        overflow-x: hidden !important; 
    }
    .device-identity { gap: 10px; flex-direction: row; align-items: center; width: 100%; }
    .device-icon-box { width: 44px; height: 44px; min-width: 44px; font-size: 22px; border-radius: 10px; }
    .device-title { font-size: 17px; gap: 6px; flex-wrap: wrap; word-break: break-all; }
    .device-subtitle { font-size: 11.5px; gap: 4px; margin-top: 2px; }
    
    .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; width: 100%; box-sizing: border-box; }
    .metric-card { padding: 10px 10px; border-radius: 12px; box-sizing: border-box; }
    .metric-label { font-size: 10px; letter-spacing: 0.2px; margin-bottom: 3px; }
    .metric-val { font-size: 16px; }
    
    .action-card-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 8px; width: 100%; box-sizing: border-box; }
    .pagination-bar { flex-direction: column; align-items: center; gap: 8px; font-size: 12px; }
    .pagination-controls { flex-wrap: wrap; justify-content: center; }
    .page-btn { padding: 4px 8px; font-size: 11px; }
    
    .quarantine-alert-banner { padding: 12px 10px; border-radius: 12px; gap: 8px; flex-direction: column; width: 100%; box-sizing: border-box; }
    .quarantine-alert-title { font-size: 13.5px; }
    .quarantine-alert-desc { font-size: 11px; }
}

@media (max-width: 480px) {
    .title { font-size: 14px; }
    .stat-val { font-size: 15px; }
    .btn { font-size: 11.5px; padding: 7px 10px; }
    .mob-card-body { grid-template-columns: 1fr; gap: 6px; }
    .device-title { font-size: 15px; }
    .action-card-grid { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; gap: 6px; }
    .metric-val { font-size: 15px; }
}
