body {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    margin: 0;
    padding: 1rem 2rem;
    background: #f5f5f5;
}

h1 {
    margin-top: 0;
}

.app {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.view {
    display: none;
    margin-top: 1rem;
}

.view.active {
    display: block;
}

.toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.toolbar button {
    flex: 0 0 auto;
}

.card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fafafa;
}

label {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.5rem;
    margin-top: 0.25rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

textarea {
    resize: vertical;
}

button {
    margin-top: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #eee;
    cursor: pointer;
    font-size: 0.9rem;
}

button.primary {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.row > .card {
    flex: 1 1 280px;
}

.status {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #555;
    min-height: 1.2em;
}

.status.error {
    color: #b71c1c;
}

.status.success {
    color: #1b5e20;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #e0e0e0;
    margin-left: 0.4rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th,
td {
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background: #f0f0f0;
}

ul {
    padding-left: 1.1rem;
}

.small {
    font-size: 0.8rem;
}

.vote-card {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #ccc;
}

.vote-card:last-child {
    border-bottom: none;
}

.inline {
    display: inline-block;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.card-header h2 {
    margin: 0;
}
.card-header .status-pill {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #eee;
}
