* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #f5f5f5; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* Header */
header { background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 20px 0; }
header h1 { margin-bottom: 15px; }
nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav a { color: white; text-decoration: none; padding: 8px 15px; }
.user-menu { display: flex; align-items: center; gap: 15px; margin-left: auto; background: rgba(255,255,255,0.1); padding: 10px 20px; border-radius: 8px; }
.user-menu span { color: white; }

/* Main */
main { padding: 30px 0; }
section { background: white; padding: 25px; margin-bottom: 30px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
h2 { color: #667eea; margin-bottom: 20px; border-bottom: 2px solid #667eea; padding-bottom: 10px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-card { background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 20px; border-radius: 10px; text-align: center; }
.stat-card h3 { font-size: 14px; margin-bottom: 10px; opacity: 0.9; }
.stat-card p { font-size: 28px; font-weight: bold; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
table th, table td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }
table th { background: #667eea; color: white; }
table tr:hover { background: #f8f9fa; }

/* Buttons */
.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; margin: 5px; }
.btn-secondary { background: #6c757d; color: white; padding: 8px 15px; border: none; border-radius: 5px; cursor: pointer; margin: 5px; }
.btn-block { width: 100%; }

/* Modals */
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); }
.modal.active { display: block; }
.modal-content { background: white; margin: 5% auto; padding: 30px; border-radius: 10px; max-width: 500px; position: relative; }
.modal-large { max-width: 700px; }
.modal-xlarge { max-width: 900px; }
.close { position: absolute; right: 20px; top: 15px; font-size: 28px; cursor: pointer; color: #aaa; }
.close:hover { color: #333; }

/* Login Modal */
.login-modal { max-width: 450px; }
.login-header { text-align: center; padding: 20px; background: linear-gradient(135deg, #667eea, #764ba2); color: white; border-radius: 10px 10px 0 0; margin: -30px -30px 20px -30px; }
.login-footer { text-align: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.security-note { font-size: 12px; color: #6c757d; }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; }
.error-message { background: #f8d7da; color: #721c24; padding: 10px; border-radius: 5px; margin-bottom: 15px; }

/* Badges */
.badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }

/* Profile */
.profile-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 20px 0; }
.info-card { background: #f8f9fa; padding: 15px; border-radius: 8px; border-left: 4px solid #667eea; }
.info-card h4 { color: #667eea; font-size: 13px; margin-bottom: 5px; }
.info-card p { font-size: 16px; font-weight: 600; }

/* Footer */
footer { background: #333; color: white; text-align: center; padding: 20px; margin-top: 40px; }

/* Admin Only */
.admin-only { display: none; }

/* Loading */
.loading { text-align: center; padding: 40px; color: #667eea; }

/* Responsive */
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .user-menu { flex-wrap: wrap; }
}