/* --- 1. VARIABLES & RESET --- */
:root {
    --bg-app: #15171b; --bg-panel: #1e2329; --bg-header: #282e36;
    --bg-input: #121417; --bg-hover: #ffffff0d; --bg-active: #ffffff1a;
    --border-main: #343b45; --border-light: #464f5b; --border-dark: #111316;
    --border-focus: #38bdf8; --text-primary: #e2e8f0; --text-dim: #64748b;
    --text-label: #475569; --text-inv: #1e2329;
    --accent-blue: #38bdf8; --color-money: #4ade80;
    --header-height: 28px; --sidebar-width: 350px;
    --font-ui: "Inter", -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", monospace;
}

*, *:before, *:after { box-sizing: border-box; }

body {
    background-color: var(--bg-app); color: var(--text-primary);
    font-family: var(--font-ui); overflow: hidden; user-select: none;
    width: 100vw; height: 100vh; margin: 0; padding: 0;
    font-size: 11px;
}

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-panel); }
::-webkit-scrollbar-thumb { background: var(--border-main); border: 2px solid var(--bg-panel); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* --- 2. LAYOUT GRID (Your Grid System) --- */
.app-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    grid-template-rows: 1fr; 
    background-color: var(--bg-app); gap: 1px;
    width: 100vw; height: 100vh; 
}

.layout-main {
    grid-column: 1/2; grid-row: 1/2;
    background: var(--bg-panel); overflow: hidden; position: relative;
    display: flex; flex-direction: column; 
}
.layout-sidebar {
    grid-column: 2/3; grid-row: 1/2;
    display: flex; background: var(--bg-app); overflow: hidden;
    flex-direction: column; gap: 1px;
}

/* --- 3. WIDGET SHELLS --- */
.panel-container { background: var(--bg-panel); display: flex; flex-direction: column; height: 100%; width: 100%; }
.omni-widget { display: flex; position: relative; flex-direction: column; width: 100%; height: 100%; }

.widget-header {
    height: var(--header-height); background: var(--bg-header);
    border-bottom: 1px solid var(--border-dark); 
    display: flex; font-family: var(--font-mono); color: var(--text-dim); 
    align-items: center; padding: 0 8px; font-size: 10px; justify-content: space-between;
}
.widget-title { color: var(--text-primary); font-weight: 700; letter-spacing: 0.5px; }
.widget-controls { display: flex; align-items: center; gap: 8px; }
.widget-body { overflow-y: auto; flex: 1; position: relative; }

/* Perf Stat Badge */
.perf-stat { font-family: var(--font-mono); background: var(--bg-input); border: 1px solid var(--border-main); color: var(--text-dim); border-radius: 2px; padding: 2px 4px; font-size: 9px; }

/* --- 4. GENERIC LIST ITEMS (Derived from your .fleet-item) --- */
.erp-list { list-style: none; padding: 0; margin: 0; }

.erp-list-item {
    display: flex; align-items: center; padding: 10px 12px;
    border-bottom: 1px solid var(--border-main);
    transition: background 0.2s; cursor: pointer;
}
.erp-list-item:hover { background: var(--bg-hover); }

/* Active state for the Theme Selector */
.erp-list-item.active {
    background: var(--bg-active);
    border-left: 3px solid var(--accent-blue);
}

.erp-col-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.erp-label { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.erp-meta { font-size: 11px; color: var(--text-dim); white-space: pre-wrap; line-height: 1.2; }

/* Placeholder for Map */
.map-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center;
    background: #000; color: #333; font-family: var(--font-mono); text-align: center;
}
