:root {
    --primary: #1f3b57;
    --accent: #2e7d8a;
    --background: #f7fafc;
    --text: #1f2937;
    --white: #ffffff;
    --navbar-height: 64px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--background);
    color: var(--text);
}

.navbar {
    background: var(--primary);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    min-height: 64px;
}

.brand {
    position: relative;
}

.brand a {
    display: inline-block;
    color: var(--white);
    text-decoration: none;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.brand a:hover {
    background: var(--accent);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links li {
    position: relative;
}

.nav-links a,
.dropbtn {
    display: inline-block;
    color: var(--white);
    text-decoration: none;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.nav-links a:hover,
.dropdown:hover .dropbtn {
    background: var(--accent);
}

.dropbtn {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 100;
}

.dropdown-content a {
    color: var(--text);
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0;
}

.dropdown-content a:hover {
    background: #e8f0f4;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:focus-within .dropdown-content {
    display: block;
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.hero {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(31, 59, 87, 0.08);
    position: relative;
}

.hero h1 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.hero p {
    margin: 0;
    line-height: 1.55;
}

.auth-card.profile-auth-card {
    text-align: left;
    max-width: none;
    margin: 0;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 1rem 2rem;
}

.profile-info-column p {
    margin: 0 0 0.55rem;
}

.profile-info-column p:last-child {
    margin-bottom: 0;
}

.auth-card {
    max-width: 520px;
    margin: 0 auto;
}


.auth-card h1,
.profile-auth-card h1 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary);
}

.auth-card form,
.profile-auth-card form {
    display: grid;
    gap: 0.85rem;
}

.profile-auth-card form p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.profile-auth-card .helptext {
    font-size: 0.875rem;
    color: #5f6b7a;
}

.profile-auth-card .errorlist {
    margin: 0;
    padding-left: 1.2rem;
}

.auth-card label,
.profile-auth-card label {
    font-weight: 600;
}

.auth-card input,
.profile-auth-card input,
.auth-card select,
.profile-auth-card select,
.auth-card textarea,
.profile-auth-card textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #c7d2de;
    border-radius: 8px;
    font: inherit;
}

.event-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(31, 59, 87, 0.08);
    margin-bottom: 1.5rem;
}

.event-title-link,
.event-title-link:visited,
.event-title-link:hover,
.event-title-link:active {
    color: inherit;
    text-decoration: none;
}

.event-title-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.manager-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(31, 59, 87, 0.08);
    margin-bottom: 1.5rem;
}

.event-detail-card h1 {
    margin-bottom: 1rem;
}

.signup-table-card h2 {
    margin-top: 0;
    margin-bottom: 0.9rem;
}

.signup-table-wrap {
    overflow-x: auto;
    border: 1px solid #c9d6e2;
    border-radius: 10px;
}

.signup-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    background: #fcfdff;
}

.signup-table th,
.signup-table td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    border: 1px solid #d4e0ea;
}

.signup-table th {
    background: #eef4f8;
    color: #1a354f;
    font-weight: 700;
    font-size: 0.92rem;
}

.signup-table tbody tr:nth-child(even) {
    background: #f8fbfd;
}

.signup-table tbody tr:hover {
    background: #edf5fa;
}

.signup-table-empty {
    text-align: center;
    color: #5f6b7a;
    padding: 1rem;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-block;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent);
}

.btn-secondary {
    background: #e8f0f4;
    color: var(--text);
}

.btn-secondary:hover {
    background: #d8e6ee;
}

.btn-danger {
    background: #b42318;
    color: var(--white);
}

.btn-danger:hover {
    background: #8f1c13;
}

.auth-helper {
    margin-top: 1rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.profile-header h1 {
    margin: 0;
}

.profile-top-action {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 20;
}

@media (max-width: 760px) {
    .profile-top-action {
        position: static;
        display: inline-block;
        width: auto;
        text-align: center;
        margin-bottom: 0.75rem;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.errorlist {
    margin: 0;
    padding-left: 1.2rem;
    color: #b42318;
}

@media (max-width: 760px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .nav-links a,
    .dropbtn,
    .brand a {
        padding: 0.65rem 0.8rem;
    }
}

@media (max-width: 480px) {
    main {
        margin: 1rem auto;
        padding: 0 0.65rem;
    }

    .hero {
        padding: 1.25rem;
        border-radius: 10px;
    }

    .navbar {
        align-items: stretch;
        padding: 0.6rem 0.65rem;
        gap: 0.6rem;
    }

    .brand,
    .nav-links,
    .nav-links li,
    .nav-links a,
    .dropbtn {
        width: 100%;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    .nav-links a,
    .dropbtn,
    .brand a {
        text-align: left;
        padding: 0.65rem 0.75rem;
    }

    .dropdown-content {
        position: static;
        display: none;
        min-width: 0;
        border-radius: 8px;
        box-shadow: none;
        margin-top: 0.25rem;
    }

    .dropdown:hover .dropdown-content,
    .dropdown:focus-within .dropdown-content {
        display: block;
    }

    .event-card,
    .manager-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 375px) {
    .hero {
        padding: 1rem;
    }

    .auth-card {
        max-width: 100%;
    }

    .auth-actions {
        gap: 0.5rem;
    }

    .auth-actions > * {
        flex: 1 1 100%;
    }

    .auth-actions a,
    .auth-actions button,
    .auth-actions form {
        width: 100%;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        text-align: center;
    }

    .profile-top-action {
        width: 100%;
    }
}

.help-img {

    max-width: 10px;
}