:root {
    --bg-dark: #0f172a; --bg-surface: #1e293b; --accent: #38bdf8;
    --text-main: #f8fafc; --text-muted: #94a3b8; --border: #334155;
}
body {
    background-color: var(--bg-dark); color: var(--text-main);
    font-family: system-ui, -apple-system, sans-serif; margin: 0; padding: 0;
}
.centered-layout { display: flex; height: 100vh; align-items: center; justify-content: center; }
.auth-card { background: var(--bg-surface); padding: 2.5rem; border-radius: 12px; width: 350px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
input, select, textarea {
    width: 100%; padding: 0.75rem; margin-top: 0.5rem; margin-bottom: 1.25rem;
    background: #0f172a; border: 1px solid var(--border); border-radius: 6px; color: white; box-sizing: border-box;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
.btn-primary { background: var(--accent); color: #000; font-weight: bold; width: 100%; padding: 0.75rem; border: none; border-radius: 6px; cursor: pointer; }
.app-bar { background: var(--bg-surface); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.viewport-container { padding: 2rem; max-width: 1200px; margin: 0 auto; }
table { width: 100%; border-collapse: collapse; background: var(--bg-surface); border-radius: 8px; overflow: hidden; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #111827; color: var(--text-muted); text-transform: uppercase; font-size: 0.75rem; }
.status-indicator { font-weight: bold; font-size: 0.8rem; padding: 0.25rem 0.5rem; border-radius: 4px; }
.status-indicator.active { background: #065f46; color: #34d399; }
.status-indicator.inactive { background: #7f1d1d; color: #f87171; }
.btn-action { background: #2563eb; color: white; text-decoration: none; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.9rem; margin-right: 0.5rem;}
.btn-danger { background: #dc2626; color: white; text-decoration: none; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.9rem;}
.btn-edit { color: var(--accent); text-decoration: none; margin-right: 1rem; }
.btn-delete { background: none; border: none; color: #ef4444; cursor: pointer; font-size: inherit; }
.form-container { max-width: 600px; margin: 4rem auto; background: var(--bg-surface); padding: 2rem; border-radius: 8px; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.checkbox-row input { width: auto; margin: 0; }

/* Admin management styles */
.admin-controls {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.badge-super {
    background: #ffd700;
    color: #000;
}

.badge-admin {
    background: #4CAF50;
    color: #fff;
}

.user-badge {
    background: #2196F3;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    margin-right: 10px;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-card h3 {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

#groupCheckboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    #groupCheckboxes {
        grid-template-columns: 1fr;
    }
}