:root {
    --bg-dark: #0f1014;
    --bg-sidebar: #181a20;
    --bg-header: #1e2026;
    --border: #2b2f38;
    --orange: #FF8C42;
    --blue: #3B9AFF;
    --text-main: #ECECEC;
    --text-muted: #888888;
    --green: #2ecc71;
    --red: #e74c3c;
    --legal: #00b894;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg-dark); color: var(--text-main); height: 100vh; overflow: hidden; font-size: 13px; }

/* LAYOUT */
.app-container { display: flex; height: 100vh; }
.sidebar { width: 280px; background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 1rem; flex-shrink: 0; }
.content-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-dark); }

/* BRANDING */
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.brand-logo { height: 40px; width: auto; }
.brand h1 { font-family: 'JetBrains Mono'; font-weight: 700; color: var(--orange); font-size: 1.4rem; letter-spacing: -1px; line-height: 1; }
.version { font-size: 0.7rem; color: var(--text-muted); font-family: 'JetBrains Mono'; }

/* SEARCH */
.search-box { margin-bottom: 1.5rem; }
.search-box label { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; display: block; }
#search { width: 100%; background: #000; border: 1px solid var(--border); color: white; padding: 10px; font-family: 'JetBrains Mono'; border-radius: 4px; font-size: 0.9rem; transition: 0.2s; }
#search:focus { border-color: var(--orange); outline: none; }
#count-badge { font-size: 0.7rem; color: var(--blue); text-align: right; margin-top: 5px; font-weight: bold; }

/* NAVIGATION */
.nav-filters { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.nav-header { font-size: 0.7rem; color: var(--text-muted); font-weight: 800; margin-top: 1rem; margin-bottom: 0.5rem; letter-spacing: 1px; }
.filter-btn { background: transparent; border: 1px solid transparent; color: #aaa; padding: 8px 12px; text-align: left; cursor: pointer; font-family: 'JetBrains Mono'; font-size: 0.8rem; border-radius: 4px; transition: 0.2s; }
.filter-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.filter-btn.active { background: rgba(59, 154, 255, 0.15); color: var(--blue); border-color: var(--blue); font-weight: bold; }

/* TABLE */
.table-container { flex: 1; overflow: auto; padding: 0; }
#penal-table { width: 100%; border-collapse: collapse; min-width: 900px; }

th { background: var(--bg-header); color: var(--text-muted); text-align: left; padding: 10px 15px; border-bottom: 1px solid var(--border); font-size: 0.7rem; font-weight: 700; position: sticky; top: 0; font-family: 'JetBrains Mono'; letter-spacing: 0.5px; z-index: 10; }
td { padding: 8px 15px; border-bottom: 1px solid #222; vertical-align: middle; font-size: 0.85rem; }
tr:hover { background: #15161a; }

/* CELL STYLES */
.code-cell { font-family: 'JetBrains Mono'; color: var(--orange); font-weight: bold; }
.stat-cell { font-family: 'JetBrains Mono'; color: #666; font-size: 0.8rem; }
.title-cell { font-weight: 600; color: #ddd; font-size: 0.95rem; }
.mono-cell { font-family: 'JetBrains Mono'; }
.desc-cell { color: #888; font-style: italic; font-size: 0.8rem; max-width: 300px; line-height: 1.3; }

.text-green { color: var(--green); }
.text-red { color: var(--red); }

/* BADGES */
.badge { padding: 2px 6px; border-radius: 3px; font-size: 0.65rem; font-weight: bold; font-family: 'JetBrains Mono'; display: inline-block; width: 45px; text-align: center; }
.badge-felony { background: rgba(231, 76, 60, 0.15); color: var(--red); border: 1px solid var(--red); }
.badge-misd { background: rgba(241, 196, 15, 0.15); color: #f1c40f; border: 1px solid #f1c40f; }
.badge-inf { background: rgba(149, 165, 166, 0.15); color: #95a5a6; border: 1px solid #95a5a6; }
.badge-legal { background: rgba(0, 184, 148, 0.15); color: var(--legal); border: 1px solid var(--legal); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }