* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1f3a 0%, #2d3561 100%);
    color: #e2e8f0;
    overflow-x: hidden;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 220px;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    z-index: 1000;
    overflow-y: auto;
}

.logo {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.logo h2 {
    color: white;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    padding: 20px 10px;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.nav-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.main-content {
    margin-left: 220px;
    min-height: 100vh;
}

.top-bar {
    background: rgba(30, 41, 75, 0.8);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.top-bar h1 {
    font-size: 18px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.top-bar-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.search-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 14px;
    width: 200px;
}

.search-box i {
    color: rgba(255,255,255,0.5);
}

.top-bar-icons {
    display: flex;
    gap: 15px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 25px;
    cursor: pointer;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.page-content {
    padding: 40px;
}

.dashboard-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.performance-header {
    margin-bottom: 30px;
}

.performance-title {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.performance-main-title {
    color: white;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.tab-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.main-chart-container {
    width: 100%;
    height: 260px;
    margin-bottom: 24px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    padding: 16px;
}

.main-chart {
    width: 100%;
    height: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.4);
}

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

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.stat-icon.purple {
    background: rgba(129, 140, 248, 0.2);
    color: #a5b4fc;
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.stat-icon.orange {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.stat-icon.teal {
    background: rgba(45, 212, 191, 0.2);
    color: #2dd4bf;
}

.stat-icon.red {
    background: rgba(248, 113, 113, 0.2);
    color: #f97373;
}

.stat-label {
    font-size: 13px;
    color: rgba(148, 163, 184, 1);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-top: 4px;
}

.stat-subtext {
    margin-top: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

.stat-chart {
    margin-top: 12px;
    height: 60px;
}

.bottom-section {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.section-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.4);
}

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

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-checkbox-active {
    background: #22c55e;
}

.task-checkbox-paused {
    background: #f97316;
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.task-meta {
    font-size: 12px;
    color: rgba(148, 163, 184, 1);
}

.task-menu {
    color: rgba(148, 163, 184, 1);
}

.simple-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.simple-table th,
.simple-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    text-align: left;
}

.simple-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(148, 163, 184, 1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    text-align: left;
}

.data-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(148, 163, 184, 1);
    background: rgba(15, 23, 42, 0.9);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.badge-warning {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #bfdbfe;
}

.badge-secondary {
    background: rgba(148, 163, 184, 0.2);
    color: #e5e7eb;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(148, 163, 184, 1);
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 12px;
}

@media (max-width: 1024px) {
    .bottom-section {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Map page */
.map-page .performance-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}
.map-header-actions { display: flex; align-items: center; }
.map-legend {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}
.legend-item { display: flex; align-items: center; gap: 6px; }

.map-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 900px) {
    .map-container { grid-template-columns: 1fr; }
}
.map-wrapper {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.map-canvas {
    width: 100%;
    height: 560px;
    min-height: 400px;
}
.map-sidebar {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-height: 560px;
}
.map-sidebar-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
}
.map-sidebar-title i { color: #3b82f6; }
.map-user-list {
    max-height: 480px;
    overflow-y: auto;
}
.map-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 14px;
}
.map-user-item .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.map-user-item .status-online { background: #22c55e; }
.map-user-item .status-paused { background: #fbbf24; }
.map-user-item .status-offline { background: #ef4444; }
.map-user-item .status-unknown { background: #6b7280; }
.map-user-item-clickable {
    cursor: pointer;
    transition: background 0.2s;
}
.map-user-item-clickable:hover {
    background: rgba(255,255,255,0.08);
}
.map-user-item-clickable .status-dot.status-online { box-shadow: 0 0 0 2px rgba(34,197,94,0.4); }
.map-empty-hint { color: rgba(255,255,255,0.5); font-size: 14px; padding: 16px 0; }


