* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f5f7;
    color: #1f2430;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 16px;
}

header.topbar {
    background: #1f2430;
    color: #fff;
    padding: 16px 0;
}

header.topbar .container {
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.topbar a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

header.topbar nav a {
    margin-left: 16px;
    font-weight: 400;
    opacity: 0.85;
}

h1, h2, h3 { margin-top: 0; }

.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.poll-list-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

.poll-list-item h3 { color: #2453ff; }

.status-badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.status-open { background: #e2f8ec; color: #1a8a4a; }
.status-closed { background: #fbe3e3; color: #b02a2a; }

.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
}

.option-row:hover { border-color: #2453ff; }

.option-row img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
}

.option-row label {
    flex: 1;
    cursor: pointer;
}

.result-bar-track {
    background: #eceef2;
    border-radius: 6px;
    overflow: hidden;
    height: 22px;
    margin-top: 6px;
}

.result-bar-fill {
    background: #2453ff;
    height: 100%;
    color: #fff;
    font-size: 12px;
    line-height: 22px;
    padding-left: 8px;
    white-space: nowrap;
    transition: width 0.4s ease;
}

.result-row { margin-bottom: 14px; }
.result-row .result-meta { display: flex; justify-content: space-between; font-size: 14px; }

.btn {
    display: inline-block;
    background: #2453ff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { background: #1a3fd6; }
.btn-secondary { background: #6b7280; }
.btn-secondary:hover { background: #52585f; }
.btn-danger { background: #d9362e; }
.btn-danger:hover { background: #b32a23; }
.btn-small { padding: 6px 12px; font-size: 13px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; }

.form-group input[type=text],
.form-group input[type=number],
.form-group input[type=password],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d3d6dc;
    border-radius: 6px;
    font-size: 14px;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error { background: #fbe3e3; color: #b02a2a; }
.alert-success { background: #e2f8ec; color: #1a8a4a; }

table.admin-table {
    width: 100%;
    border-collapse: collapse;
}

table.admin-table th, table.admin-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e4e6eb;
    font-size: 14px;
}

.actions a, .actions button { margin-right: 8px; }

.empty-state { text-align: center; color: #777; padding: 40px 0; }

.option-image-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin-bottom: 6px;
}
