* {
    box-sizing: border-box
}

body {
    font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    margin: 0;
    color: #333
}

a {
    color: #c0392b;
    text-decoration: none
}

.topbar {
    background: #c0392b;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px
}

.topbar a {
    color: #fff;
    opacity: .9
}

.brand {
    font-weight: 600;
    font-size: 17px
}

.user {
    font-size: 14px
}

.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 16px
}

.container.narrow {
    max-width: 520px
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06)
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px
}

.card h2 {
    margin: 0 0 12px;
    font-size: 18px
}

.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px
}

.event-item {
    display: block;
    background: #fafbfc;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 14px;
    transition: .2s
}

.event-item:hover {
    background: #fff;
    border-color: #c0392b;
    box-shadow: 0 4px 12px rgba(192, 57, 43, .1)
}

.ei-title {
    font-weight: 600;
    margin-bottom: 8px
}

.ei-meta {
    font-size: 13px;
    color: #888;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center
}

.tag {
    background: #ecf0f1;
    color: #555;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px
}

.tag.role {
    background: #fdecea;
    color: #c0392b
}

.form label {
    display: block;
    margin: 12px 0 4px;
    font-size: 14px;
    color: #555
}

.form input,
.form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit
}

.form input:focus,
.form select:focus {
    outline: 0;
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, .1)
}

.form button {
    margin-top: 18px;
    width: 100%;
    padding: 12px;
    background: #c0392b;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer
}

.form button:hover {
    background: #a93226
}

.form.inline {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap
}

.form.inline input,
.form.inline select {
    flex: 1;
    min-width: 120px;
    margin: 0
}

.form.inline button {
    width: auto;
    margin: 0;
    padding: 10px 20px
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.btn {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: 0
}

.btn:hover {
    background: #a93226;
    color: #fff
}

.btn.ghost {
    background: #fff;
    color: #c0392b;
    border: 1px solid #c0392b
}

.btn.ghost:hover {
    background: #fdecea;
    color: #c0392b
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: left
}

th {
    background: #fafbfc;
    font-weight: 600;
    color: #555
}

.strong {
    font-weight: 600;
    color: #c0392b
}

.center {
    text-align: center
}

.muted {
    color: #999;
    font-size: 13px
}

.table-wrap {
    overflow-x: auto
}

.stat-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 20px
}

.stat {
    text-align: center;
    padding: 8px
}

.stat .num {
    font-size: 22px;
    font-weight: 700;
    color: #333
}

.stat.highlight .num {
    color: #c0392b;
    font-size: 26px
}

.stat.highlight {
    background: #fdecea;
    border-radius: 10px
}

.member-list {
    margin: 0 0 8px;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.9
}

.event-info {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 14px;
    color: #666
}

.auth-box {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .08)
}

.auth-box h1 {
    margin: 0 0 20px;
    font-size: 22px;
    text-align: center
}

.ok {
    background: #eafaf1;
    color: #1e8449;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 8px 0
}

.err {
    background: #fdedec;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 8px 0
}

.tip {
    font-size: 13px;
    color: #999;
    text-align: center;
    margin-top: 16px
}

@media(max-width:640px) {
    .container {
        padding: 0 12px;
        margin: 12px auto
    }

    .card {
        padding: 16px
    }

    .row {
        grid-template-columns: 1fr
    }

    .stat .num {
        font-size: 18px
    }

    .stat.highlight .num {
        font-size: 22px
    }
}