/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #2196F3; text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Container === */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* === Navbar === */
.navbar {
    background: #2196F3;
    color: #fff;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}
.navbar-brand {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
}
.navbar-links { display: flex; align-items: center; gap: 16px; }
.navbar-links a { color: rgba(255,255,255,0.9); font-size: 0.95rem; }
.navbar-links a:hover { color: #fff; text-decoration: none; }
.navbar-user { color: rgba(255,255,255,0.7); font-size: 0.85rem; }

/* === Footer === */
.footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

/* === Alerts === */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 0.95rem;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-error { background: #fce4ec; color: #c62828; border: 1px solid #f8bbd0; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.alert-warning { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }

/* === Cards === */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
    margin: 16px 0;
}
.card h2 { margin-bottom: 16px; color: #333; }

/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: #555;
}
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33,150,243,0.1);
}
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { appearance: auto; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-error {
    color: #c62828;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, transform 0.1s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary { background: #2196F3; color: #fff; }
.btn-primary:hover { background: #1976D2; color: #fff; }

.btn-success { background: #4CAF50; color: #fff; }
.btn-success:hover { background: #388E3C; color: #fff; }

.btn-danger { background: #f44336; color: #fff; }
.btn-danger:hover { background: #d32f2f; color: #fff; }

.btn-secondary { background: #78909c; color: #fff; }
.btn-secondary:hover { background: #546e7a; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }

/* === Tables === */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.table th, .table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.table th {
    background: #f5f7fa;
    font-weight: 600;
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table tr:hover { background: #fafbfc; }

/* === Auth Pages === */
.auth-wrap {
    max-width: 420px;
    margin: 60px auto;
}
.auth-wrap h1 {
    text-align: center;
    margin-bottom: 24px;
    color: #333;
}
.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: #666;
}

/* === Landing Page === */
.hero {
    text-align: center;
    padding: 80px 20px 60px;
}
.hero h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 16px;
}
.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 32px;
}
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    padding: 40px 0;
}
.feature-card {
    text-align: center;
    padding: 32px 24px;
}
.feature-card h3 { color: #2196F3; margin-bottom: 8px; }
.feature-card p { color: #666; font-size: 0.95rem; }

/* === Participant List (Event Create) === */
.participant-rows { margin: 8px 0; }
.participant-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}
.participant-row .form-control { margin: 0; }

/* === Event List === */
.event-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}
.event-list-item:last-child { border-bottom: none; }
.event-meta { color: #999; font-size: 0.85rem; }

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-draft { background: #fff3e0; color: #e65100; }
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-closed { background: #eceff1; color: #546e7a; }

/* === Responsive === */
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .participant-row { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .navbar-inner { flex-direction: column; gap: 8px; }
    .navbar-links { flex-wrap: wrap; justify-content: center; }
}
