/* Estilos específicos para o Dashboard de Monitoramento */

.monitor-body {
    overflow-y: auto;
}

.monitor-container {
    min-height: 100vh;
    padding: 20px;
    background: var(--bg-primary);
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-light);
}

.monitor-header h1 {
    font-size: 1.75rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.last-update {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.btn-refresh {
    padding: 8px 16px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card-wide {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .card-wide {
        grid-column: span 1;
    }
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.1rem;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.online {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.status-badge.loading {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.card-body {
    padding: 20px;
}

/* Stats */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

.stat-value.small {
    font-size: 0.85rem;
    font-family: 'SF Mono', monospace;
}

/* Progress Bar */
.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    margin-left: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Ports Grid */
.ports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.port-item {
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.port-item:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.port-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.port-service {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Apps List */
.apps-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.app-item {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.2s;
}

.app-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

/* Processes Table */
.processes-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

table tbody tr {
    transition: background 0.2s;
}

table tbody tr:hover {
    background: var(--bg-tertiary);
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* Charts */
canvas {
    max-width: 100%;
    height: auto !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Loading State */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 20px;
    margin-bottom: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
