/**
 * ============================================================================
 * DMR SENTINEL 3.0 - RMM & SOC DESIGN SYSTEM
 * ============================================================================
 * Arquivo: assets/style.css
 * Referência Visual: Makrolock (Interface corporativa, limpa e moderna)
 * Paleta Principal:
 *   - Sidebar Esquerda: #0b1136 (Azul Noturno Profundo)
 *   - Fundo Central: #f4f5f8 (Cinza Suave Corporativo)
 *   - Cards e Painéis: #ffffff
 *   - Status Online: #10b981 (Verde Esmeralda)
 *   - Status Offline: #94a3b8 (Cinza Ardósia)
 *   - Alertas / EDR: #ef4444 (Vermelho Alerta)
 *   - Destaque / Ação: #2563eb / #3b82f6 (Azul Elétrico)
 * ============================================================================
 */

:root {
    --bg-sidebar: #0b1136;
    --bg-sidebar-hover: #131b4d;
    --bg-sidebar-active: #1a2563;
    --bg-main: #f4f5f8;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-subtle: rgba(226, 232, 240, 0.8);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --text-sidebar-dim: #94a3b8;
    
    --color-online: #10b981;
    --color-online-bg: rgba(16, 185, 129, 0.12);
    --color-offline: #94a3b8;
    --color-offline-bg: rgba(148, 163, 184, 0.15);
    --color-danger: #ef4444;
    --color-danger-bg: rgba(239, 68, 68, 0.1);
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-primary: #2563eb;
    --color-primary-bg: rgba(37, 99, 235, 0.08);
    --color-purple: #8b5cf6;
    --color-purple-bg: rgba(139, 92, 246, 0.1);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.04), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
    --shadow-floating: 0 12px 30px rgba(11, 17, 54, 0.06);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    
    --sidebar-left-width: 256px;
    --sidebar-right-width: 320px;
    --header-height: 68px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

/* Reset Global & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout App Container */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* ============================================================================
   1. SIDEBAR ESQUERDA (Navegação Makrolock #0b1136)
   ============================================================================ */
.sidebar-left {
    width: var(--sidebar-left-width);
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar-dim);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.2);
    user-select: none;
}

.brand-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    flex-shrink: 0;
}

.brand-text h1 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.brand-text span {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #38bdf8;
    letter-spacing: 1px;
}

.nav-container {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-container::-webkit-scrollbar {
    width: 4px;
}

.nav-container::-webkit-scrollbar-track {
    background: transparent;
}

.nav-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.nav-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 1.2px;
    padding: 12px 12px 6px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-sidebar-dim);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: #ffffff;
    background-color: var(--bg-sidebar-hover);
}

.nav-link.active {
    color: #ffffff;
    background-color: var(--bg-sidebar-active);
    font-weight: 600;
    box-shadow: inset 3px 0 0 #3b82f6;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    transition: transform var(--transition-fast);
}

.nav-link:hover svg {
    transform: scale(1.05);
}

.nav-badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-badge.badge-blue {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.nav-badge.badge-red {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background-color: rgba(0, 0, 0, 0.15);
}

.system-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--color-online);
    border-radius: 50%;
    position: relative;
}

.status-dot-pulse::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 12px;
    height: 12px;
    background-color: var(--color-online);
    opacity: 0.4;
    border-radius: 50%;
    animation: pulse 2s infinite ease-out;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(2.2); opacity: 0; }
}

.system-status-info {
    display: flex;
    flex-direction: column;
}

.system-status-info .title {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
}

.system-status-info .subtitle {
    font-size: 10px;
    color: #64748b;
}

/* ============================================================================
   2. ÁREA CENTRAL (Cockpit #f4f5f8)
   ============================================================================ */
.main-wrapper {
    margin-left: var(--sidebar-left-width);
    margin-right: var(--sidebar-right-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 28px 40px 28px;
}

/* Header Superior */
.topbar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.topbar-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-title p {
    font-size: 12px;
    color: var(--text-muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--color-primary);
    color: #ffffff !important;
    border: 1px solid var(--color-primary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary) !important;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-primary) !important;
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Row Global de Cards de Estatísticas / Métricas Rápidas */
.ativos-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
    width: 100%;
}

.ativo-stat-card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.ativo-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.ativo-stat-number {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-top: 4px;
}

.badge-soc-active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

/* Grid de Métricas Principais (3 Cards Base Makrolock) */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.metric-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.metric-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-card-icon.icon-blue {
    background-color: var(--color-primary-bg);
    color: var(--color-primary);
}

.metric-card-icon.icon-red {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}

.metric-card-icon.icon-purple {
    background-color: var(--color-purple-bg);
    color: var(--color-purple);
}

.metric-trend {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.metric-trend.trend-green {
    background-color: var(--color-online-bg);
    color: #059669;
}

.metric-trend.trend-red {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}

.metric-trend.trend-blue {
    background-color: var(--color-primary-bg);
    color: var(--color-primary);
}

.metric-value-block {
    margin-bottom: 8px;
}

.metric-value-block .metric-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metric-value-block .metric-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.5px;
}

.metric-footer {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

/* Área de Telemetria e Monitoramento Detalhado */
.content-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
    padding: 22px 24px;
    margin-bottom: 24px;
}

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

.section-header-title h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-header-title p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Tabela de Telemetria e Responsividade */
.telemetry-table-container,
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
}

.telemetry-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.telemetry-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background-color: #f8fafc;
}

.telemetry-table th:first-child {
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}

.telemetry-table th:last-child {
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}

.telemetry-table td {
    padding: 14px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-secondary);
    vertical-align: middle;
}

.telemetry-table tr:hover td {
    background-color: #fcfdfe;
}

.endpoint-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.endpoint-avatar {
    width: 34px;
    height: 34px;
    background-color: #e2e8f0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-weight: 700;
    font-size: 13px;
}

.endpoint-names {
    display: flex;
    flex-direction: column;
}

.endpoint-names .host {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
}

.endpoint-names .ip {
    font-size: 11px;
    color: var(--text-muted);
}

/* Barras de Medição (CPU / RAM / Disco) */
.stat-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 90px;
}

.stat-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-track {
    width: 100%;
    height: 6px;
    background-color: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.progress-fill.fill-green { background-color: var(--color-online); }
.progress-fill.fill-yellow { background-color: var(--color-warning); }
.progress-fill.fill-red { background-color: var(--color-danger); }
.progress-fill.fill-blue { background-color: var(--color-primary); }

/* Badges de Status */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.badge-status.online {
    background-color: var(--color-online-bg);
    color: #065f46;
}

.badge-status.offline {
    background-color: var(--color-offline-bg);
    color: #475569;
}

.status-dot-sm {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot-sm.online { background-color: var(--color-online); }
.status-dot-sm.offline { background-color: var(--color-offline); }

/* Botões de Ação na Linha */
.btn-icon-action {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    text-decoration: none;
}

.table-actions-cell,
td:last-child > div {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.btn-icon-action:hover {
    background-color: var(--bg-main);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ============================================================================
   3. SIDEBAR DIREITA (Painel Flutuante Branco - Grupo Padrão)
   ============================================================================ */
.sidebar-right {
    width: var(--sidebar-right-width);
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-floating);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 90;
}

.right-sidebar-header {
    padding: 20px 20px 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.group-badge-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.group-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.group-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #f8fafc;
    font-size: 12px;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--color-primary);
    background-color: #ffffff;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 15px;
    height: 15px;
}

/* Lista de Máquinas em Tempo Real */
.machines-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.machine-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.machine-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transform: translateX(-2px);
}

.machine-item.is-selected {
    border-color: var(--color-primary);
    background-color: #f8faff;
}

.machine-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.machine-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot-indicator.online {
    background-color: var(--color-online);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-dot-indicator.offline {
    background-color: var(--color-offline);
}

.machine-item-hostname {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.machine-item-ip {
    font-size: 11px;
    color: var(--text-muted);
}

.machine-metrics-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    background-color: #f8fafc;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.machine-metric-tag {
    display: flex;
    align-items: center;
    gap: 4px;
}

.machine-metric-tag span {
    font-weight: 600;
    color: var(--text-primary);
}

.machine-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
}

/* ============================================================================
   RESPONSIVIDADE SUPREMA (Notebooks 14", 15", Tablets e Mobile)
   ============================================================================ */

/* Componentes de Navegação Mobile */
.btn-hamburger {
    display: none;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 38px;
    height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    margin-right: 12px;
    transition: all var(--transition-fast);
}

.btn-hamburger:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(11, 17, 54, 0.65);
    backdrop-filter: blur(3px);
    z-index: 998;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-close-btn {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    width: 32px;
    height: 32px;
    color: #ffffff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
    transition: background-color var(--transition-fast);
}

.sidebar-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* 1. Telas Médias / Notebooks de 14" e 15" (max-width: 1440px) */
@media (max-width: 1440px) {
    :root {
        --sidebar-left-width: 236px;
        --sidebar-right-width: 280px;
    }
    .main-wrapper {
        padding: 0 20px 32px 20px;
    }
    .topbar {
        margin-bottom: 20px;
    }
    .metrics-grid {
        gap: 16px;
        margin-bottom: 22px;
    }
    .charts-analytical-grid {
        gap: 16px !important;
        margin-bottom: 22px !important;
    }
    .content-section {
        padding: 18px 20px;
        margin-bottom: 20px;
    }
    .ativo-stat-card {
        padding: 18px !important;
    }
}

/* 2. Notebooks Compactos e Telas Verticais (max-width: 1200px) */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .charts-analytical-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 3. Tablets e Resoluções Reduzidas (max-width: 1024px) */
@media (max-width: 1024px) {
    .sidebar-right {
        display: none;
    }
    .main-wrapper {
        margin-right: 0 !important;
        padding: 0 18px 28px 18px;
    }
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .charts-analytical-grid {
        grid-template-columns: 1fr !important;
    }
    .mosaico-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    }
    .ativos-stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .perf-hardware-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 4. Telas Mobile e Smartphones (max-width: 768px) */
@media (max-width: 768px) {
    .btn-hamburger {
        display: inline-flex;
    }
    
    .sidebar-close-btn {
        display: inline-flex;
    }

    /* Sidebar esquerda oculta em formato Drawer Off-canvas */
    .sidebar-left {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    }

    body.sidebar-open .sidebar-left {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .main-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100%;
        padding: 0 14px 24px 14px;
    }

    .topbar {
        height: auto;
        min-height: var(--header-height);
        padding: 14px 0;
        flex-wrap: wrap;
        gap: 12px;
    }

    .topbar-title {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .topbar-title h2 {
        font-size: 18px;
    }

    .topbar-title p {
        display: none;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .metrics-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .charts-analytical-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .mosaico-grid {
        grid-template-columns: 1fr !important;
    }

    .ativos-stats-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .perf-hardware-grid {
        grid-template-columns: 1fr !important;
    }

    .perf-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }

    .perf-actions {
        width: 100% !important;
        flex-wrap: wrap !important;
    }

    .perf-actions form, 
    .perf-actions .select-custom {
        width: 100% !important;
    }

    .blocker-form-row {
        flex-direction: column !important;
    }

    .btn-submit-blocker {
        width: 100%;
        justify-content: center;
    }

    .table-responsive table {
        min-width: 640px;
    }
}

/* ============================================================================
   ESTILOS DE CONFORMIDADE E SLA DE HARDWARE (FASE 13)
   ============================================================================ */
.badge-sla-danger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.badge-sla-warning {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.badge-sla-success {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.sla-progress-bar-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 110px;
}

.sla-progress-track {
    width: 100%;
    height: 7px;
    background-color: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.sla-progress-fill-green {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: var(--radius-full);
}

.sla-progress-fill-yellow {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: var(--radius-full);
}

.sla-progress-fill-red {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    border-radius: var(--radius-full);
}


