:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --nav-bg: #1e293b;
    --danger: #ef4444;
    --success: #10b981;
}

body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text-main); margin: 0; padding-top: 70px; }

/* --- Navbar --- */
.navbar { position: fixed; top: 0; left: 0; right: 0; background: var(--nav-bg); color: white; height: 64px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); z-index: 50; }
.nav-brand { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.nav-brand span { color: var(--primary); background: white; padding: 2px 8px; border-radius: 4px; font-size: 0.9rem; }
.nav-menu { display: flex; gap: 24px; height: 100%; align-items: center; }
.nav-link { color: #cbd5e1; text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.2s; height: 100%; display: flex; align-items: center; border-bottom: 2px solid transparent; }
.nav-link:hover, .nav-link.active { color: white; border-bottom-color: var(--primary); }
.nav-user { font-size: 0.85rem; background: rgba(255,255,255,0.1); padding: 6px 16px; border-radius: 99px; }

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; }
.card { background: var(--surface); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid var(--border); overflow: hidden; padding: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

/* --- Tables --- */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th { text-align: left; padding: 12px; background: #f1f5f9; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); }
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover { background: #f8fafc; }

/* --- Forms & Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; text-decoration: none; border: none; font-size: 0.9rem; transition: 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { background: #f1f5f9; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; }
.btn-icon:hover { color: var(--primary); }

.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9rem; }
.form-input, .form-select { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; font-size: 0.95rem; }
.form-input:focus { outline: none; border-color: var(--primary); ring: 2px solid var(--primary); }

/* --- Modals --- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 100; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal-overlay.active { display: flex; }
.modal-box { background: white; padding: 24px; border-radius: 12px; width: 100%; max-width: 450px; animation: slideUp 0.2s ease-out; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 20px; font-weight: 700; font-size: 1.25rem; }

/* --- Utilities --- */
.badge { padding: 4px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.badge-admin { background: #fee2e2; color: #b91c1c; }
.badge-user { background: #dcfce7; color: #15803d; }
.text-center { text-align: center; }
.avatar-circle { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #cbd5e1; display: inline-flex; align-items: center; justify-content: center; color: white; font-weight: bold; }