/* === Global Styles === */
:root {
    --primary: #22c55e;
    --primary-dark: #15803d;
    --accent: #eefbf3; /* A lighter accent for backgrounds */
    --bg: #f8fafc; /* Light grey background like the image */
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --text: #334155;
    --text-light: #64748b;
    --success-bg: #e6f9ed;
    --success-text: #15803d;
    --error-bg: #fde8e8;
    --error-text: #b91c1c;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}
body {
    font-family: 'Inter', 'Roboto', system-ui, Arial, sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.main-content {
    margin-left: 260px; /* Same as sidebar width */
    padding: 30px;
    transition: margin-left 0.3s ease;
}

.page-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px;
}

.page-header h1, .page-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* DEPRECATED STYLES - REMOVED */
/* .header, .nav, .container, .container-wide no longer used in the new layout */
.container, .container-wide {
     /* These are now replaced by the main-content wrapper and specific page containers */
    width: 100%;
    margin: 0;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

/* --- Styled Alerts for Success and Error Messages --- */
.alert {
    padding: 14px 18px 14px 44px;
    border-radius: 6px;
    margin: 18px 0;
    font-size: 15px;
    font-family: 'Arial', sans-serif;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1.5px solid transparent;
}

.alert.success {
    background: #e6f9ed;
    color: #15803d;
    border-color: #22c55e;
}
.alert.success::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #22c55e;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.alert.error {
    background: #fde8e8;
    color: #b91c1c;
    border-color: #f87171;
}
.alert.error::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #b91c1c;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 60px; /* Space for the toggle button */
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .container, .container-wide {
        padding: 20px;
    }

    /* Adjust tables to scroll horizontally */
    .table-wrapper {
        overflow-x: auto;
    }
}

/* --- Pagination Component --- */
.pagination-wrapper {
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    padding: 15px 0;
    margin-top: 20px;
    border-top: 1px solid #edf2f7;
    font-size: 14px;
    color: var(--text-light);
    gap: 20px;
}
.pagination-left {
    margin-right: auto; /* Push left content to left if any */
}
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}
.pagination-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 13px;
}
.pagination-btn:hover:not(.disabled) {
    background: #f8fafc;
    border-color: #cbd5e0;
}
.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}
.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}
.rows-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rows-per-page select {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--text);
    background: white;
    outline: none;
    cursor: pointer;
    font-size: 13px;
}

