:root {
    --color-bg: #f7f9fb;
    --color-sidebar: #1f2937;
    --color-primary: #3b82f6;
    --color-primary-light: #e0ecff;
    --color-text: #111827;
    --color-muted: #6b7280;
    --sidebar-width: 240px;
    --font-stack: "Inter", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-stack);
    background: var(--color-bg);
    color: var(--color-text);
    display: flex;
    height: 100vh;
}

/* ----- Layout ----- */
.layout-wrapper {
    display: flex;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--color-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 0;
}

    .sidebar .logo {
        font-weight: 600;
        font-size: 1.2rem;
        padding: 0 1.5rem 1.2rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .sidebar nav {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        gap: 0.3rem;
    }

    .sidebar .nav-item {
        color: #d1d5db;
        padding: 0.6rem 1rem;
        border-radius: 6px;
        text-decoration: none;
        transition: background 0.2s;
    }

        .sidebar .nav-item:hover,
        .sidebar .nav-item.active {
            background: rgba(255,255,255,0.1);
            color: #fff;
        }

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

    .sidebar-footer .small {
        font-size: 0.85em;
        color: #9ca3af;
        text-decoration: none;
    }

/* ----- Main Content ----- */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: white;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 500;
}

.page-body {
    padding: 1.5rem;
    overflow-y: auto;
}

/* ----- Tables ----- */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

    .table th, .table td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f0f0f0;
        text-align: left;
    }

    .table th {
        background: var(--color-primary-light);
        font-weight: 600;
    }

    .table tr:hover {
        background: #f9fafb;
    }

/* ----- Forms ----- */
form {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    max-width: 600px;
}

input[type=text],
input[type=email],
input[type=password],
input[type=file],
textarea,
select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

    button:hover {
        background: #2563eb;
    }

/* ----- Pagination ----- */
.pagination {
    margin-top: 1rem;
    display: flex;
    gap: 0.4rem;
}

    .pagination a {
        border: 1px solid #d1d5db;
        padding: 5px 10px;
        border-radius: 4px;
        color: var(--color-text);
        text-decoration: none;
        background: white;
    }

        .pagination a.active {
            background: var(--color-primary);
            color: #fff;
            border-color: var(--color-primary);
        }

/* Scrollbar */
.page-body::-webkit-scrollbar {
    width: 8px;
}

.page-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}
