* {
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', Arial, sans-serif;
    background: linear-gradient(135deg, #FFD700, #FF69B4);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

main.container {
    flex: 1;
}

ul {
    list-style: none;
    padding: 0;
}

.container {
    /* Slightly wider layout so event tables have room for long names */
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: transparent;
    text-align: center;
}

.logo {
    max-width: 150px;
    margin-bottom: 0;
}

header.container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

header.container h1 {
    flex: 1;
    margin: 0;
    font-size: 1.5rem;
}

header.container a.btn + a.btn {
    margin-left: 10px;
}

.login-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    margin-top: 20px;
}

.admin-page,
.admin-dashboard {
    text-align: left;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.page-title {
    flex: 1 1 auto;
    text-align: left;
}

.page-title h2 {
    margin: 0;
}

.page-subtitle {
    margin: 8px 0 0;
    color: #555;
    font-size: 0.95rem;
}

.back-btn {
    white-space: nowrap;
}

.page-footer {
    margin-top: 30px;
    text-align: right;
}

.page-footer .btn {
    margin: 0;
}

.login-container label {
    display: block;
    margin-bottom: 10px;
}

.login-container input {
    padding: 8px;
    width: 100%;
    max-width: 300px;
}

/* Ensure checkboxes don't stretch across the form */
.login-container input[type="checkbox"] {
    width: auto;
    max-width: none;
    margin-right: 5px;
}

.login-container button {
    padding: 10px 20px;
    margin-top: 10px;
}

.error {
    color: red;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px 0;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.btn:hover {
    background: #555;
}

.admin-sections {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .admin-sections {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

.admin-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 20px;
    text-align: left;
}

.admin-section h3 {
    margin-top: 0;
}

.admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.admin-links .btn {
    flex: 1 1 150px;
    margin: 0;
    text-align: center;
}

table.event-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}
table.event-table th, table.event-table td {
    border: 1px solid #ccc;
    padding: 8px;
}
table.event-table th {
    background: #f8f8f8;
}

table.event-table input[type="text"],
table.event-table input[type="email"],
table.event-table input[type="number"],
table.event-table select {
    width: 100%;
    box-sizing: border-box;
}

.summary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.summary-card {
    flex: 1 1 320px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 15px;
}

.summary-card h4 {
    margin-top: 0;
}

.success {
    color: green;
    font-weight: bold;
}

.status-paid {
    color: green;
    font-weight: bold;
}

.status-unpaid {
    color: red;
    font-weight: bold;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .login-container {
        padding: 20px;
    }

    .btn {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin: 8px 0;
    }

    table.event-table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
    table.event-table th,
    table.event-table td {
        white-space: nowrap;
    }

    .summary-grid {
        flex-direction: column;
        gap: 15px;
    }
}
