:root {
    --primary: #1b5e20;
    --primary-light: #2e7d32;
    --primary-dark: #0d3b11;
    --primary-bg: #e8f5e9;
    --accent: #5aaa5e;
    --accent-light: #a5d6a7;
    --accent-dark: #388e3c;
    --bg: #f1f8e9;
    --bg-card: #ffffff;
    --text: #1b2a1b;
    --text-light: #3d5a3d;
    --text-muted: #6b7f6b;
    --border: #c8e6c9;
    --success: #43a047;
    --danger: #d32f2f;
    --warning: #f9a825;
    --info: #26a69a;
    --shadow: 0 2px 8px rgba(27,94,32,0.08);
    --shadow-lg: 0 4px 20px rgba(27,94,32,0.12);
    --radius: 8px;
    --radius-sm: 6px;
    --sidebar-width: 250px;
    --header-h: 56px;
    --z-grain: 1;
    --z-overlay: 140;
    --z-sidebar: 150;
    --z-header: 200;
    --z-toast: 900;
    --z-modal: 1000;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: var(--z-grain);
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

.nums { font-variant-numeric: tabular-nums; }

/* ── Skip Link ── */
.skip-link {
    position: fixed; top: -100%; left: 8px; z-index: 9999;
    background: var(--primary); color: white; padding: 8px 16px;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
    text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

/* ── Header ── */
.header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 0 16px;
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: var(--z-header);
    box-shadow: 0 2px 12px rgba(13,59,17,0.25);
}

.header-left { display: flex; align-items: center; gap: 8px; flex: 1; }

.menu-toggle {
    background: none; border: none; color: white;
    font-size: 24px; cursor: pointer;
    padding: 8px; border-radius: var(--radius-sm);
    line-height: 1; display: flex; align-items: center;
    transition: background 0.2s, transform 0.15s;
}
.menu-toggle:hover { background: rgba(255,255,255,0.12); }
.menu-toggle:active { transform: scale(0.92); }

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: white; }
.logo-img { height: 28px; width: auto; object-fit: contain; }
.logo-icon { font-size: 22px; color: var(--accent-light); line-height: 1; }
.logo-text { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }

.header-right {
    display: flex; align-items: center; gap: 10px;
    margin-left: auto; flex-shrink: 0;
}
.user-badge {
    background: rgba(255,255,255,0.15);
    padding: 4px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 600; letter-spacing: 0.2px;
}
.user-role {
    font-size: 11px; color: var(--accent-light);
    background: rgba(0,0,0,0.2);
    padding: 2px 8px; border-radius: 10px;
    display: none; font-weight: 500; letter-spacing: 0.3px;
}
.header-btn {
    color: rgba(255,255,255,0.75); text-decoration: none;
    font-size: 18px; padding: 6px; border-radius: var(--radius-sm);
    display: flex; align-items: center;
    transition: all 0.2s;
}
.header-btn:hover { color: white; background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.header-btn:active { transform: scale(0.92); }
.header-logout { color: rgba(255,180,180,0.8); }
.header-logout:hover { color: #ff8a80; }

/* ── Sidebar ── */
.sidebar {
    position: fixed; top: var(--header-h); left: 0;
    width: var(--sidebar-width); height: calc(100dvh - var(--header-h));
    background: var(--bg-card);
    z-index: var(--z-sidebar);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 16px rgba(27,94,32,0.06);
}
.sidebar.open { transform: translateX(0); }
.sidebar.open ~ .main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: 100%;
    align-self: flex-start;
}

.sidebar-header {
    display: none; align-items: center; gap: 8px;
    padding: 16px 20px;
}
.sidebar-logo-img { height: 24px; width: auto; object-fit: contain; }
.sidebar-header .logo-icon { color: var(--primary); font-size: 20px; }
.sidebar-header .logo-text { color: var(--text); font-size: 16px; font-weight: 600; }

.sidebar-nav { padding: 6px 0; }
.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px; color: var(--text);
    text-decoration: none; font-size: 14px; font-weight: 500;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    position: relative;
}
.sidebar-link:hover {
    background: var(--primary-bg); color: var(--primary);
    border-left-color: var(--accent);
}
.sidebar-link:active { transform: translateX(2px); }
.sidebar-link.active {
    background: var(--primary-bg); color: var(--primary);
    border-left-color: var(--primary); font-weight: 600;
}
.sidebar-link.active::after {
    content: ''; position: absolute; right: 0; top: 25%; bottom: 25%;
    width: 3px; background: var(--accent); border-radius: 2px 0 0 2px;
}
.sidebar-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-divider {
    padding: 14px 20px 4px; font-size: 11px;
    font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-muted);
}

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.25); z-index: var(--z-overlay);
    backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

/* ── Main Content ── */
.main-content {
    margin-top: var(--header-h);
    margin-left: 0;
    padding: 32px;
    max-width: 1200px;
    width: 100%;
    align-self: center;
    transition: all 0.3s var(--ease-out-expo);
    min-height: calc(100dvh - var(--header-h));
    flex: 1;
}

/* ── Typography ── */
.page-title {
    font-size: 26px; font-weight: 700; margin-bottom: 24px;
    color: var(--primary-dark); letter-spacing: -0.5px;
    text-wrap: balance;
    display: flex; align-items: center; gap: 12px;
}

/* ── Cards ── */
.card {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 24px; margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.card-title {
    font-size: 16px; font-weight: 600; margin-bottom: 16px;
    color: var(--primary); letter-spacing: -0.2px;
}

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }

.import-item { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.import-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* ── Stat Cards ── */
.stat-card {
    background: var(--bg-card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 24px 20px; text-align: center;
    border-top: 3px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card.income { border-top-color: var(--success); }
.stat-card.expense { border-top-color: var(--danger); }
.stat-card.balance { border-top-color: var(--accent); }
.stat-card.balance-year { border-top-color: var(--info); }
.stat-card.members { border-top-color: var(--primary); }
.stat-card.missionaries { border-top-color: var(--accent); }
.stat-card.tithers { border-top-color: var(--info); }
.stat-label {
    font-size: 12px; color: var(--text-light);
    font-weight: 600; letter-spacing: 0.3px; margin-bottom: 6px;
}
.stat-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-value.nio { color: var(--primary); }
.stat-value.usd { color: var(--success); }
.stat-sub { font-size: 11px; color: var(--text-light); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; border: none; cursor: pointer;
    transition: all 0.2s; text-decoration: none;
    letter-spacing: 0.2px;
    position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); box-shadow: 0 2px 8px rgba(27,94,32,0.25); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { opacity: 0.92; box-shadow: 0 2px 8px rgba(67,160,71,0.25); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.92; box-shadow: 0 2px 8px rgba(211,47,47,0.2); }
.btn-warning { background: var(--warning); color: #1a1a1a; }
.btn-warning:hover { opacity: 0.92; box-shadow: 0 2px 8px rgba(249,168,37,0.25); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); box-shadow: 0 2px 8px rgba(90,170,94,0.25); }
.btn-sm { padding: 5px 12px; font-size: 12px; letter-spacing: 0.1px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.btn-outline:hover { background: var(--primary-bg); border-color: var(--accent); transform: translateY(-1px); }

.btn-icon { background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px 6px; border-radius: var(--radius-sm); transition: all 0.15s; line-height: 1; color: var(--text-light); }
.btn-icon:hover { background: var(--primary-bg); color: var(--primary); }
.btn-icon-danger:hover { background: #ffebee; color: var(--danger); }
.action-cell { white-space: nowrap; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-light); letter-spacing: 0.2px; }
.form-control {
    width: 100%; padding: 9px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,94,32,0.1); }
select.form-control { cursor: pointer; }

/* ── Tables ── */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--primary); color: white; }
th {
    padding: 11px 14px; text-align: left; font-weight: 600;
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
tr:hover td { background: #f1f8e9; }

/* ── Modals ── */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: var(--z-modal);
    justify-content: center; align-items: center;
    backdrop-filter: blur(3px);
}
.modal-overlay.active { display: flex; }
.modal {
    background: white; border-radius: var(--radius);
    padding: 28px; width: 90%; max-width: 500px;
    max-height: 80vh; overflow-y: auto;
    box-shadow: 0 8px 32px rgba(13,59,17,0.15);
    animation: modalIn 0.2s var(--ease-out-expo);
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; letter-spacing: -0.2px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; }

/* ── Spinner ── */
.btn-loading { position: relative; pointer-events: none; opacity: 0.8; }
.btn-loading .btn-text { visibility: hidden; }
.btn-loading .spinner {
    display: inline-block; position: absolute; left: 50%; top: 50%;
    margin-left: -10px; margin-top: -10px;
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Focus ── */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.btn:focus-visible, .sidebar-link:focus-visible, .tab-btn:focus-visible, .pagination a:focus-visible { outline-offset: 1px; }
.form-control:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(27,94,32,0.1); }

/* ── Toast ── */
.toast-container {
    position: fixed; top: calc(var(--header-h) + 12px); right: 16px;
    z-index: var(--z-toast);
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.toast {
    padding: 12px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-lg); max-width: 360px;
    animation: toastIn 0.3s var(--ease-out-expo);
    pointer-events: auto;
    display: flex; align-items: center; gap: 8px;
}
.toast-success { background: var(--primary-bg); color: var(--primary-dark); border: 1px solid var(--accent-light); }
.toast-danger { background: #ffebee; color: #b71c1c; border: 1px solid #ffcdd2; }
.toast-warning { background: #fff8e1; color: #e65100; border: 1px solid #ffecb3; }
.toast-info { background: #e0f7fa; color: #00695c; border: 1px solid #b2dfdb; }
@keyframes toastIn { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
.toast-remove { animation: toastOut 0.3s var(--ease-out-expo) forwards; }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(50px); } }

/* ── Badges ── */
.badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 12px; font-size: 11px; font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-active { background: var(--primary-bg); color: var(--primary-dark); }
.badge-inactive { background: #ffebee; color: #b71c1c; }
.badge-verified { background: var(--primary-bg); color: var(--primary-dark); }
.badge-pending { background: #fff8e1; color: #e65100; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-light); }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-text { font-size: 15px; color: var(--text-muted); }

/* ── Action Bar ── */
.action-bar {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}

/* ── Pagination ── */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span {
    padding: 7px 13px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); text-decoration: none; color: var(--text);
    font-size: 13px; transition: all 0.15s;
}
.pagination a:hover { background: var(--primary-bg); border-color: var(--accent); }
.pagination .current { background: var(--primary); color: white; border-color: var(--primary); }

/* ── Login Page ── */
.login-page {
    display: flex; justify-content: center; align-items: center;
    min-height: 100dvh;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    position: relative;
}
.login-page::before {
    content: ''; position: absolute; inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat; background-size: 128px 128px;
    opacity: 0.02;
}
.login-card {
    background: white; border-radius: 12px;
    padding: 36px; width: 100%; max-width: 400px;
    box-shadow: 0 8px 32px rgba(13,59,17,0.2);
    position: relative;
}
.login-title { text-align: center; font-size: 24px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; letter-spacing: -0.5px; }
.login-subtitle { text-align: center; font-size: 13px; color: var(--text-light); margin-bottom: 28px; }
.login-footer { text-align: center; margin-top: 20px; font-size: 13px; }
.login-footer a { color: var(--primary); text-decoration: none; font-weight: 500; }
.login-footer a:hover { text-decoration: underline; }
.btn-block { width: 100%; justify-content: center; padding: 11px 20px; }
body:has(.login-layout) .main-content { max-width: none; width: 100%; padding: 0; margin: 0; align-self: auto; min-height: 100dvh; }

/* ── Service Banner ── */
.service-active-banner {
    background: linear-gradient(135deg, var(--success), var(--primary));
    color: white; padding: 16px 24px; border-radius: var(--radius);
    margin-bottom: 24px; display: flex; justify-content: space-between;
    align-items: center; box-shadow: 0 3px 12px rgba(67,160,71,0.2);
}
.service-active-banner h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.2px; }
.service-active-banner span { font-size: 14px; opacity: 0.9; }

.service-inputs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    margin-bottom: 20px;
}

.tithe-table { margin-top: 16px; }
.tithe-table table { font-size: 13px; }
.tithe-table .total-row { font-weight: 700; background: #e8f5e9; }

.fw-bold { font-weight: 700; }
.mt-4 { margin-top: 20px; }
input[readonly].readonly-bg { background: #f0f2f5; }
input[readonly].total-bg { background: #e8f0fe; font-weight: 700; }

.church-form-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 24px;
    align-items: start;
}
.church-form-logo {
    text-align: center;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--primary-bg);
}
.church-form-logo img {
    max-width: 100%;
    max-height: 120px;
    border-radius: var(--radius-sm);
}
.church-value {
    padding: 9px 0;
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}
.church-logo-placeholder {
    color: var(--text-muted);
    font-size: 13px;
    padding: 40px 0;
}

@media (max-width: 768px) {
    .church-form-layout {
        grid-template-columns: 1fr;
    }
    .church-form-logo {
        order: 1;
    }
    .church-form-fields {
        order: 0;
    }
}

.total-row td {
    font-weight: 700;
    background: var(--primary-bg);
    border-top: 2px solid var(--border);
}

/* ── Tabs ── */
.tabs-container { margin-bottom: 24px; }
.tabs-header {
    display: flex; gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs-header::-webkit-scrollbar { display: none; }
.tab-btn {
    padding: 12px 20px; border: none; background: none;
    font-size: 14px; font-weight: 500; color: var(--text-light);
    cursor: pointer; transition: all 0.2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap; letter-spacing: 0.2px;
}
.tab-btn:hover { color: var(--primary); background: var(--primary-bg); }
.tab-btn.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

.tab-pane { display: none; animation: fadeIn 0.3s var(--ease-out-expo); }
.tab-pane.active { display: block; }

.tab-btn-sm {
    padding: 4px 12px; border: 1px solid var(--border); background: var(--bg-card);
    font-size: 12px; font-weight: 500; color: var(--text-light);
    cursor: pointer; border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-out-expo);
    font-family: inherit;
}
.tab-btn-sm:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn-sm.active { background: var(--primary); color: #fff; border-color: var(--primary); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Responsive ── */
@media (min-width: 1024px) {
    .sidebar { transform: translateX(0); }
    .sidebar-overlay { display: none !important; }
    .main-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
        max-width: 100%;
        align-self: flex-start;
    }
}

@media (max-width: 1023px) {
    .sidebar-overlay.visible { display: block; }
    body.sidebar-open { overflow: hidden; }
    .user-role { display: inline; }
    .user-badge { font-size: 12px; padding: 3px 8px; }
}

@media (max-width: 768px) {
    .header { padding: 0 8px; }
    .logo-text { font-size: 15px; }
    .user-role { display: none; }
    .header-btn { font-size: 16px; padding: 4px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .service-inputs { grid-template-columns: 1fr; }
    .action-bar { flex-direction: column; align-items: stretch; }
    .main-content { padding: 16px; }
    .page-title { font-size: 22px; }
    .stat-value { font-size: 22px; }
    .tabs-header { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; flex-wrap: nowrap; }
    .tabs-header .tab-btn { white-space: nowrap; flex-shrink: 0; }
    .filter-bar { flex-direction: column; align-items: stretch; }
}

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 6px; font-size: 14px; text-decoration: none; }
.pagination a { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); }
.pagination a:hover { background: var(--primary-bg); border-color: var(--primary-light); }
.pagination .current { background: var(--primary); color: #fff; font-weight: 600; }
.pagination .nav-btn { font-weight: 700; }
.per-page { display: flex; align-items: center; gap: 6px; margin-left: 16px; font-size: 13px; color: var(--text-light); }
.per-page select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; background: var(--bg-card); cursor: pointer; }

/* Filter bar */
.filter-bar { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; }
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar label { font-size: 12px; margin-bottom: 2px; display: block; color: var(--text-light); }
.filter-bar .form-control { padding: 6px 10px; font-size: 13px; }
.filter-bar .btn { white-space: nowrap; }

/* Permissions table */
#permissions-tab .table-responsive { overflow-x: auto; }
#permissions-tab table { min-width: 600px; }
.perm-role-col { text-align: center; font-size: 0.85rem; min-width: 90px; }
.perm-category-row td { background: var(--primary-bg); padding: 8px 12px; }
.perm-category-row strong { color: var(--primary-dark); font-size: 0.9rem; }
.perm-name { font-size: 0.85rem; white-space: nowrap; }
.perm-check-col { text-align: center; }
.perm-check-col input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
