@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors - Risk Legion Inspired */
    --primary: #1e293b;
    --primary-light: #334155;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    
    /* Risk Levels */
    --risk-low: #10b981;
    --risk-medium: #f59e0b;
    --risk-high: #f97316;
    --risk-critical: #ef4444;
    
    /* Neutral */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --sidebar-active-bg: #1e293b;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    --radius: 8px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 50;
    transition: all 0.3s ease;
}

.sidebar-logo {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
}

.nav-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin: 20px 0 8px 12px;
    color: var(--text-muted);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: #fff;
}

.nav-item.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

/* Main Content */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.header {
    height: var(--header-height);
    background-color: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.content {
    padding: 32px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Components */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.kpi-card {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-main);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-low { background-color: rgba(16, 185, 129, 0.1); color: var(--risk-low); }
.badge-medium { background-color: rgba(245, 158, 11, 0.1); color: var(--risk-medium); }
.badge-high { background-color: rgba(249, 115, 22, 0.1); color: var(--risk-high); }
.badge-critical { background-color: rgba(239, 68, 68, 0.1); color: var(--risk-critical); }

/* Heatmap Placeholder */
.heatmap {
    aspect-ratio: 16 / 9;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 4px;
    margin-top: 16px;
}

.heatmap-cell {
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.heatmap-cell:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Icons */
.lucide {
    width: 18px;
    height: 18px;
}
