:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #94a3b8;
    --accent: #f43f5e;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --sidebar-width: 260px;
}

body.sidebar-collapsed {
    --sidebar-width: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    background: #0f172a;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevents whole-page side scroll */
}

/* Sidebar - No Transitions for instant feel if requested */
.sidebar {
    width: var(--sidebar-width);
    background: #1e293b;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    height: 70px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-link i {
    font-size: 18px;
    min-width: 22px;
    margin-right: 12px;
}

body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .sidebar-header .nav-text {
    display: none;
}

body.sidebar-collapsed .sidebar-header {
    justify-content: center;
}

/* Main Content - Takes remaining space automatically */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px 30px;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
}

/* Table Container - Handle local scrolling if screen is extremely small */
.table-container {
    width: 100%;
    overflow-x: auto;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

th {
    padding: 12px 15px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    vertical-align: middle;
    word-break: break-word;
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
    }

    .nav-link {
        flex: 1 1 auto;
        margin-bottom: 0;
    }
}

/* Glass & Utils */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    border: none;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.form-input {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: white;
    outline: none;
}