:root {
    --google-blue: #4285F4;
    --google-red: #EA4335;
    --google-yellow: #FBBC05;
    --google-green: #34A853;
    --bg-gradient: linear-gradient(135deg, #4285F4 0%, #34A853 50%, #FBBC05 100%);
    --sidebar-bg: #1a1a2e;
    --card-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 10px 15px rgba(0,0,0,0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
}

/* Google-inspired Header */
.bg-header {
    background: linear-gradient(135deg, #4285F4 0%, #34A853 70%, #FBBC05 100%);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.navbar-dark .navbar-nav .nav-link i {
    margin-right: 4px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1.5rem;
}

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

.card-header {
    background: transparent;
    border-bottom: 2px solid #f0f2f5;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Stat Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.2;
    position: absolute;
    right: 15px;
    bottom: 15px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
    font-weight: 500;
}

.stat-blue { background: linear-gradient(135deg, #4285F4, #5a9cff); color: #fff; }
.stat-green { background: linear-gradient(135deg, #34A853, #4caf6e); color: #fff; }
.stat-yellow { background: linear-gradient(135deg, #FBBC05, #fdd835); color: #333; }
.stat-red { background: linear-gradient(135deg, #EA4335, #ef5350); color: #fff; }
.stat-teal { background: linear-gradient(135deg, #00897b, #26a69a); color: #fff; }
.stat-purple { background: linear-gradient(135deg, #7b1fa2, #ab47bc); color: #fff; }

/* Tables */
.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background: rgba(66,133,244,0.05);
}

/* Buttons */
.btn-google-blue { background: #4285F4; color: #fff; border: none; }
.btn-google-blue:hover { background: #3367d6; color: #fff; }

.btn-google-green { background: #34A853; color: #fff; border: none; }
.btn-google-green:hover { background: #2d9249; color: #fff; }

.btn-google-red { background: #EA4335; color: #fff; border: none; }
.btn-google-red:hover { background: #d33426; color: #fff; }

.btn-google-yellow { background: #FBBC05; color: #333; border: none; }
.btn-google-yellow:hover { background: #f1b200; color: #333; }

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .logo-icon {
    font-size: 3rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-logo h3 {
    font-weight: 700;
    margin-top: 0.5rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Status Badges */
.badge-online { background: #34A853; color: #fff; }
.badge-offline { background: #EA4335; color: #fff; }
.badge-maintenance { background: #FBBC05; color: #333; }
.badge-active { background: #34A85310; color: #34A853; border: 1px solid #34A853; }
.badge-inactive { background: #EA433510; color: #EA4335; border: 1px solid #EA4335; }

/* Online/Offline dot */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-dot.online { background: #34A853; box-shadow: 0 0 8px rgba(52,168,83,0.5); }
.status-dot.offline { background: #EA4335; }
.status-dot.maintenance { background: #FBBC05; }

/* Device Cards */
.device-card {
    border-left: 4px solid #4285F4;
}

.device-card.online { border-left-color: #34A853; }
.device-card.offline { border-left-color: #EA4335; }
.device-card.maintenance { border-left-color: #FBBC05; }

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Pulse animation for online indicator */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52,168,83,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(52,168,83,0); }
    100% { box-shadow: 0 0 0 0 rgba(52,168,83,0); }
}

.pulse-online {
    animation: pulse 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card .stat-value { font-size: 1.4rem; }
    .card { border-radius: 8px; }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* Select2 */
.select2-container--bootstrap-5 .select2-selection { min-height: 38px; }

/* DataTables */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #4285F4 !important;
    border-color: #4285F4 !important;
    color: #fff !important;
}

/* Print */
@media print {
    .navbar, .no-print { display: none !important; }
    .card { box-shadow: none; border: 1px solid #dee2e6; }
}

/* Notification bell */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.6rem;
    padding: 2px 5px;
}
