* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Auth pages (login, register, index) ── */

.container {
    background: #16213e;
    padding: 2.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ── App layout (sidebar + content) ── */

body.app {
    align-items: stretch;
    justify-content: stretch;
}

.sidebar {
    width: 220px;
    min-height: 100vh;
    background: #16213e;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.sidebar-brand {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e94560;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid #1a1a2e;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    flex-grow: 1;
}

.sidebar-nav a {
    color: #aaa;
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
    color: #fff;
    background: rgba(233, 69, 96, 0.15);
}

.sidebar-nav a.active {
    color: #e94560;
    font-weight: 600;
    background: rgba(233, 69, 96, 0.1);
    border-left: 3px solid #e94560;
}

.sidebar-logout {
    color: #aaa;
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    border-top: 1px solid #1a1a2e;
    margin-top: auto;
}

.sidebar-logout:hover {
    color: #e94560;
}

.content {
    flex-grow: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

/* ── Mobile: sidebar becomes top nav ── */

@media (max-width: 768px) {
    body.app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        flex-direction: row;
        align-items: center;
        padding: 0;
        flex-wrap: wrap;
    }

    .sidebar-brand {
        padding: 0.8rem 1rem;
        border-bottom: none;
        border-right: 1px solid #1a1a2e;
        font-size: 1.1rem;
    }

    .sidebar-nav {
        flex-direction: row;
        padding: 0;
        flex-grow: 1;
        flex-wrap: wrap;
    }

    .sidebar-nav a {
        padding: 0.8rem 0.8rem;
        font-size: 0.85rem;
    }

    .sidebar-nav a.active {
        border-left: none;
        border-bottom: 2px solid #e94560;
    }

    .sidebar-logout {
        padding: 0.8rem 1rem;
        border-top: none;
        border-left: 1px solid #1a1a2e;
        margin-top: 0;
        margin-left: auto;
    }

    .content {
        padding: 1.5rem;
    }
}

/* ── Shared elements ── */

h1 {
    margin-bottom: 1rem;
    color: #e94560;
}

p {
    margin-bottom: 1.5rem;
    color: #aaa;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

label {
    font-size: 0.9rem;
    color: #ccc;
}

input {
    padding: 0.6rem 0.8rem;
    border: 1px solid #333;
    border-radius: 6px;
    background: #0f3460;
    color: #eee;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: #e94560;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: #e94560;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.btn:hover {
    background: #c73752;
}

.btn-secondary {
    background: #533483;
}

.btn-secondary:hover {
    background: #3f276a;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.error {
    color: #e94560;
    background: rgba(233, 69, 96, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.link {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.link a {
    color: #e94560;
    text-decoration: none;
}

.link a:hover {
    text-decoration: underline;
}

/* ── Lists and tables ── */

.event-list, .resource-list {
    list-style: none;
    text-align: left;
}

.event-list li, .resource-list li {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #1a1a2e;
    color: #ccc;
}

.event-list li:last-child, .resource-list li:last-child {
    border-bottom: none;
}

.resource-list a {
    color: #e94560;
    text-decoration: none;
}

.resource-list a:hover {
    text-decoration: underline;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.user-table th {
    color: #e94560;
    padding: 0.5rem 0.8rem;
    border-bottom: 2px solid #1a1a2e;
}

.user-table td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid #1a1a2e;
    color: #ccc;
}
