/* dashboard.css - Custom Dashboard Styles */

:root {
    --primary-color: #198754;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-brand i {
    margin-right: 8px;
}

/* Summary Cards */
.summary-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.summary-card .card-body {
    padding: 20px;
}

.summary-card h2 {
    font-weight: bold;
    margin: 0;
}

.summary-card .icon-box {
    opacity: 0.3;
}

/* Metric Cards */
.metric-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.metric-card:hover {
    transform: translateY(-3px);
}

.metric-card h6 {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.metric-card h4 {
    font-weight: bold;
    margin: 0;
}

/* Charts */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: white;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
}

.card-header i {
    margin-right: 8px;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

.alert i {
    margin-right: 8px;
}

/* Device Table */
.table-responsive {
    border-radius: 8px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #6c757d;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status Badges */
.badge {
    padding: 6px 12px;
    font-weight: 600;
    border-radius: 20px;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #146c43;
    border-color: #146c43;
}

/* Metric Box (Device Details) */
.metric-box {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.metric-box i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.metric-box h6 {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.metric-box h4 {
    font-weight: bold;
    margin: 0;
}

.metric-box small {
    color: #6c757d;
}

/* Raw JSON Viewer */
#rawJsonViewer {
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .summary-card h2 {
        font-size: 1.5rem;
    }

    .metric-card h4 {
        font-size: 1.2rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* Custom colors for specific icons */
.text-orange {
    color: #ff8c00;
}

/* Period selector buttons */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 6px 0 0 6px;
}

.btn-group .btn:last-child {
    border-radius: 0 6px 6px 0;
}

/* Card hover effects */
.card {
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Animation for alerts */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert {
    animation: slideIn 0.3s ease;
}

/* Search and filter section */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}
