/**
 * Dashboard CSS - Additional styles for the dashboard
 */

.dashboard-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.metric-card {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin: 10px 0;
}

.metric-card.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.metric-card.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.metric-card.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.metric-card .value {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.metric-card .label {
    font-size: 0.9em;
    opacity: 0.9;
}

.progress-container {
    margin: 20px 0;
}

.progress-container progress {
    width: 100%;
    height: 25px;
    border-radius: 15px;
    background: #f0f0f0;
}

.progress-container progress::-webkit-progress-bar {
    background: #f0f0f0;
    border-radius: 15px;
}

.progress-container progress::-webkit-progress-value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
}

.progress-container progress::-moz-progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
}

.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

.notification-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-indicator.online {
    background: #4caf50;
}

.status-indicator.offline {
    background: #f44336;
}

.status-indicator.warning {
    background: #ff9800;
}

/* Loading states */
.loading {
    position: relative;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .metric-card {
        margin: 10px 5px;
    }

    .metric-card .value {
        font-size: 2em;
    }

    .dashboard-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .chart-container {
        height: 300px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dashboard-card {
        background: #2d3748;
        color: #e2e8f0;
    }

    .metric-card {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
}

/* Print styles */
@media print {
    .dashboard-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .metric-card {
        background: #f8f9fa !important;
        color: #333 !important;
    }
}

/* PHP parity classes */
.fretezero{
  font-weight: 900;
  font-size: 1.05em;
  color: #e00000 !important;
}

/* Table defaults similar to PHP templates */
table {
    font-family: sans-serif;
    table-layout: fixed;
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}
table td, table th{
    white-space: nowrap;
    border: 1px solid #ddd;
    padding: 6px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure results container uses consistent spacing */
.results-container {
    padding: 18px;
}
