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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0e27;
    color: #e4e4e7;
    line-height: 1.6;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    max-width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1f3a 0%, #0f1628 100%);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 30px 20px;
    overflow-y: auto;
    z-index: 1000;
}

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

.logo {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 48px;
    font-weight: bold;
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 5px;
}

.nav-menu {
    list-style: none;
}

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

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.nav-icon {
    margin-right: 12px;
    font-size: 18px;
}

.main-content {
    margin-left: 280px;
    padding: 15px 20px 30px 20px;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
    max-width: calc(100% - 280px);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    color: #f1f5f9;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.stat-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-icon.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.stat-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%);
}

.stat-icon.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.stat-label {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #f1f5f9;
}

.stat-subvalue {
    font-size: 14px;
    color: #64748b;
    margin-top: 8px;
}

.chart-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    overflow: hidden;
}

.chart-title {
    font-size: 15px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    word-break: break-word;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #cbd5e1;
    font-size: 14px;
}

tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

tr.hidden_row {
    display: none !important;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-high {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.badge-average {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.badge-disaster {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.badge-warning {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: no
    ne;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #e4e4e7;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.form-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 14px;
}

input[type="text"],
input[type="date"],
select {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 14px;
}

input:focus, select:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.alert {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.user-rank {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-rank:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(4px);
}

.rank-number {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.rank-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
}

.rank-silver {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    color: #000;
}

.rank-bronze {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
}

.rank-default {
    background: rgba(255,255,255,0.1);
    color: #94a3b8;
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.chart-label {
    width: 120px;
    font-size: 13px;
    color: #94a3b8;
    flex-shrink: 0;
}

.chart-bar-container {
    flex: 1;
    height: 32px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-weight: 600;
    font-size: 13px;
    color: white;
    transition: width 0.5s ease;
}

.chart-bar-text {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    min-width: 60px;
    text-align: right;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.user-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    transform: translateY(-2px);
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.user-name {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
}

.user-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.metric {
    text-align: center;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #6366f1;
}

.metric-label {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.progress-ring {
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.detail-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.comparison-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.comparison-badge.above {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.comparison-badge.below {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.comparison-badge.equal {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}
