:root {
            --bg-body: #f8fafc;
            --sidebar-bg: #0f172a;
            --primary: #6366f1;
            --primary-hover: #4f46e5;
            --text-main: #1e293b;
            --text-muted: #64748b;
            --card-bg: #ffffff;
            --border-color: #e2e8f0;
            --danger: #ef4444;
            --success: #22c55e;
        }

        * {
            box-sizing: border-box;
            transition: all 0.2s ease;
        }

        body {
            font-family: 'Inter', sans-serif;
            margin: 0;
            background-color: var(--bg-body);
            color: var(--text-main);
            display: flex;
            min-height: 100vh;
        }

        /* --- Login Overlay --- */
        .login-overlay {
            position: fixed;
            inset: 0;
            background: var(--sidebar-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .login-card {
            background: white;
            padding: 2.5rem;
            border-radius: 1.5rem;
            width: 100%;
            max-width: 400px;
            box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
            text-align: center;
        }

        /* --- Layout Structure --- */
        #dashboard {
            display: flex;
            width: 100%;
        }

        .sidebar {
            width: 260px;
            background: var(--sidebar-bg);
            color: white;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            position: fixed;
            height: 100vh;
        }

        .main-content {
            margin-left: 260px;
            flex: 1;
            padding: 2rem;
        }

        /* --- Components --- */
        .brand {
            font-weight: 700;
            font-size: 1.25rem;
            margin-bottom: 2rem;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #fff;
        }

        .nav-link {
            padding: 0.75rem 1rem;
            border-radius: 0.5rem;
            color: #94a3b8;
            text-decoration: none;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .nav-link.active, .nav-link:hover {
            background: rgba(255,255,255,0.1);
            color: white;
        }

        .card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 1rem;
            padding: 1.5rem;
            margin-bottom: 2rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 1rem;
        }

        h1, h2, h3 { margin: 0; font-weight: 600; }
        
        /* --- Form Elements --- */
        .input-group {
            display: flex;
            gap: 10px;
            margin-bottom: 1.5rem;
        }

        input, textarea {
            padding: 0.75rem 1rem;
            border: 1px solid var(--border-color);
            border-radius: 0.5rem;
            font-size: 0.95rem;
            width: 100%;
            font-family: inherit;
        }

        input:focus, textarea:focus {
            outline: 2px solid #6366f133;
            border-color: var(--primary);
        }

        button {
            padding: 0.75rem 1.5rem;
            border-radius: 0.5rem;
            border: none;
            background: var(--primary);
            color: white;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
        }

        button:hover { background: var(--primary-hover); }
        
        button.btn-outline {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-main);
        }

        button.btn-danger { background: var(--danger); }

        .scroll-box {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f1f5f9;
    padding: 10px;
}

/* Custom Scrollbar */
.scroll-box::-webkit-scrollbar { width: 6px; }
.scroll-box::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 15px;
}

.page-btn {
    padding: 5px 12px;
    border: 1px solid #cbd5e1;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
}

.page-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.template-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}


        /* --- List View --- */
        ul { list-style: none; padding: 0; }
        
        li {
            background: #fff;
            border: 1px solid var(--border-color);
            padding: 0.75rem 1rem;
            border-radius: 0.75rem;
            margin-bottom: 0.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        li:hover { border-color: var(--primary); }

        .badge {
            font-size: 0.75rem;
            padding: 2px 8px;
            border-radius: 10px;
            background: #e0e7ff;
            color: var(--primary);
        }

        .hidden { display: none !important; }

        @media (max-width: 768px) {
            .sidebar { width: 70px; padding: 1rem 0.5rem; }
            .sidebar span { display: none; }
            .main-content { margin-left: 70px; }
        }