:root {
  color-scheme: dark;
  --background: #101112;
  --surface: #191a1c;
  --border: #343639;
  --text: #eeeeec;
  --muted: #9b9da2;
  --orange: #ff741f;
  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font-size: 16px; line-height: 1.6; }
[hidden] { display: none !important; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: #ff9a5d; }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
button:disabled { opacity: .45; cursor: not-allowed; }
h1 { font-size: 27px; font-weight: 650; letter-spacing: -.6px; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
h2 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 16px; }
.muted, .field-note { color: var(--muted); }
.icon-sprite { display: none; }
.icon { height: 18px; width: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--text); font-size: 14px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.button-primary { background: var(--orange); color: #201006; border-color: var(--orange); }
.button-primary:hover { background: #ff914a; color: #201006; }
.button-subtle { border-color: var(--border); color: #c6c7ca; }
.button-subtle:hover { background: #27292c; color: white; }
.button-danger { color: #ecaf89; border-color: #61402b; }
.app-header { min-height: 68px; display: flex; align-items: center; gap: 25px; padding: 15px 30px; border-bottom: 1px solid #2a2c2f; }
.app-name { font-size: 16px; font-weight: 600; }
#admin-link { font-size: 14px; }
.account { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; color: var(--muted); }
.app-main { margin: 45px auto 70px; padding: 0 24px; }
.vote-main { max-width: 750px; }
.admin-main { max-width: 1150px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.poll-description { white-space: pre-line; overflow-wrap: anywhere; color: #b0b2b7; margin-bottom: 20px; }
.poll-rules { display: flex; flex-wrap: wrap; gap: 7px 18px; color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.poll-rules>span { display: inline-flex; align-items: center; gap: 6px; }
.poll-rules .icon { height: 15px; width: 15px; }
.poll-options { display: flex; flex-direction: column; gap: 9px; }
.candidate-voters { display: flex; flex-wrap: wrap; gap: 7px 14px; max-height: 180px; overflow-y: auto; list-style: none; padding: 8px 0 4px 28px; margin: 0; }
.voter { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; color: #b7bac0; font-size: 13px; }
.voter span { overflow-wrap: anywhere; }
.voter-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #30343a; flex-shrink: 0; }
.poll-option { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 51px; padding: 12px 15px; color: #d1d2d4; text-align: left; border: 1px solid #3b3d41; border-radius: 5px; background: #191b1e; cursor: pointer; }
.poll-option:hover { border-color: #997048; }
.poll-option:disabled { opacity: 1; cursor: default; }
.poll-option.selected { border-color: #cf7b3c; color: #f2d5bd; background: #30251c; }
.option-indicator { display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid #777a80; border-radius: 50%; flex-shrink: 0; }
.multiple .option-indicator { border-radius: 3px; }
.selected .option-indicator { background: var(--orange); border-color: var(--orange); color: #211006; }
.option-indicator .icon { height: 12px; width: 12px; stroke-width: 2.5; }
.option-label { overflow-wrap: anywhere; font-size: 15px; }
.option-percent { margin-left: auto; white-space: nowrap; color: #c3c4c7; font-size: 14px; }
.option-votes { color: #92969d; font-size: 12px; margin-left: 7px; }
.option-bar { position: absolute; inset: 0 auto 0 0; z-index: -1; background: #303339; }
.leading .option-bar { background: #44301f; }
.leading .option-percent { color: #f3b27c; }
.selection-hint, .field-note { font-size: 13px; line-height: 1.7; margin: 8px 0 0; }
.vote-actions { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.text-button { border: 0; background: none; padding: 5px 0; color: #a5a8ae; font-size: 14px; cursor: pointer; }
.text-button:hover { color: var(--orange); }
.vote-summary { color: var(--muted); font-size: 14px; margin-top: 22px; padding-top: 16px; border-top: 1px solid #2f3135; }
.winner-note { font-size: 15px; margin: 18px 0 0; color: #e9b083; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 22px; margin-top: 25px; border-top: 1px solid #323438; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { color: #92969d; font-size: 13px; font-weight: 500; padding: 12px 12px 12px 0; border-bottom: 1px solid #404247; text-align: left; }
.admin-table td { padding: 18px 14px 18px 0; border-bottom: 1px solid #2a2d31; vertical-align: middle; }
.admin-table td:first-child { min-width: 220px; max-width: 430px; overflow-wrap: anywhere; }
.admin-table td:last-child { padding-right: 0; }
.table-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.table-actions .button { padding: 6px 10px; font-size: 13px; }
.status { font-size: 13px; color: #ceab8b; white-space: nowrap; }
.status.closed { color: #9399a1; }
.empty-state { padding: 22px 0; color: var(--muted); font-size: 15px; }
.message { padding: 12px 15px; font-size: 14px; border: 1px solid #454340; background: #242321; border-radius: 5px; margin: 16px 0; }
.message-error { border-color: #704632; color: #e6b599; background: #30211a; }
.login-page { display: grid; min-height: 100svh; place-items: center; padding: 24px; }
.login-box { width: min(100%, 390px); }
.login-box h1 { margin-bottom: 18px; }
.login-box p { font-size: 15px; }
.login-button { width: 100%; margin-top: 6px; padding: 12px 18px; }
.modal-content { background: #1a1c1f; color: var(--text); border: 1px solid #3a3d42; border-radius: 8px; }
.modal-header { padding: 21px 24px; border-bottom: 1px solid #35383d; }
.modal-title { font-size: 21px; margin: 0; }
.modal-body { padding: 22px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #35383d; }
.modal-backdrop { --bs-backdrop-opacity: .7; }
.close-button { border: 0; background: none; color: #9ba1a9; padding: 0 5px; font-size: 27px; line-height: 1; }
.form-label { font-size: 14px; color: #c5c7cb; }
.form-control, .form-select { font-size: 14px; border-color: #43474e; border-radius: 5px; background-color: #23262b; color: #e3e1dc; min-height: 44px; padding: 10px 12px; }
.form-control:focus, .form-select:focus { border-color: #bb7844; background-color: #27292c; color: white; box-shadow: 0 0 0 3px #bd743019; }
.form-control::placeholder { color: #838a94; }
.form-select { padding-right: 32px; }
.field-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 22px 0 10px; font-size: 13px; }
.option-field { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; }
.option-field>span { color: #7f8792; font-size: 13px; width: 19px; flex-shrink: 0; }
.option-field .close-button { width: 26px; font-size: 23px; }
.checkbox-field { display: flex; align-items: center; gap: 9px; font-size: 14px; margin-top: 22px; color: #c4c7cd; }
.checkbox-field input { accent-color: var(--orange); width: 16px; height: 16px; flex-shrink: 0; }
.reset-field { border-top: 1px solid #3b3b3b; margin-top: 24px; padding-top: 1px; }
.reset-field .checkbox-field { color: #e0a17a; }
.share-field { display: flex; gap: 9px; }
.notification { position: fixed; left: 50%; bottom: 25px; transform: translateX(-50%); max-width: calc(100% - 30px); z-index: 1100; padding: 12px 18px; color: #ead4be; background: #30251b; border: 1px solid #715235; border-radius: 5px; font-size: 14px; }
@media (max-width: 600px) {
  .app-header { padding: 13px 18px; gap: 13px; }
  .app-name { font-size: 14px; }
  .account { gap: 11px; font-size: 13px; }
  .account .button { font-size: 12px; padding: 7px 9px; }
  #account-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #admin-link { font-size: 12px; }
  .app-main { margin-top: 30px; padding: 0 18px; }
  h1 { font-size: 24px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .option-votes { display: none; }
  .table-actions { min-width: 195px; }
  .modal-header, .modal-body, .modal-footer { padding-left: 18px; padding-right: 18px; }
  .share-field { flex-direction: column; }
}
