:root {
    --color-bg: #f7f7f9;
    --color-surface: #ffffff;
    --color-border: #e2e2e7;
    --color-text: #1f1f23;
    --color-text-muted: #6b6b76;
    --color-primary: #3b5bfd;
    --color-primary-hover: #2c46d9;
    --color-success: #1f9d55;
    --color-danger: #d64545;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.15rem;
    margin-top: 2rem;
    /*color: var(--color-text-muted);*/
}

p {
    color: var(--color-text-muted);
}

/* Forms */
form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

form > * {
    padding: 0.5rem;
}
a > button { /*for href buttons*/
    padding: 0.5rem;
}

input[type="text"],
input[type="password"],
textarea,
select {
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
}

textarea {
    width: 100%;
    resize: vertical;
    min-height: 80px;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

button {
    padding: 0.5rem;
    min-height: 2.2rem;
    /*max-height: 2.2rem;*/
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: white;
    cursor: pointer;
    transition: background 0.15s ease;
}

button:hover {
    background: var(--color-primary-hover);
}

/* Lists */
ul, ol {
    padding-left: 0;
}

li {
    margin: 0.4rem 0;
    list-style: none;
}

/* Voting options as cards */
.vote-list, ul:has(form[action="/vote"]) {
    list-style: none;
    padding: 0;
}

/* Tables (Admin) */
table {
    min-width: 75%;
    max-width: 95%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius);
    /*overflow: hidden;*/
    /*box-shadow: var(--shadow);*/
    margin: 1rem 0;
}

th, td {
    text-align: left;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

th {
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

tr:last-child td {
    border-bottom: none;
}

/* Status indicators */
strong {
    font-weight: 600;
}

hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2rem 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}