:root {
  color-scheme: light;
  --ink: #19333b;
  --deep: #103e46;
  --deepest: #0b3139;
  --teal: #176570;
  --mint: #67d9b5;
  --paper: #f7f8f5;
  --white: #ffffff;
  --line: #e4eae8;
  --muted: #6b7e83;
  --shadow: 0 18px 48px rgba(21, 54, 58, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Segoe UI", Inter, Arial, sans-serif; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
:focus-visible { outline: 3px solid #36b8a2; outline-offset: 3px; }
::selection { background: #b5f2d9; color: var(--deepest); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }

/* Shared brand and controls */
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; position: relative; background: var(--deep); color: #fff; border-radius: 11px; font-family: Georgia, serif; font-size: 26px; font-weight: 700; line-height: 1; }
.brand-mark span { color: var(--mint); position: absolute; top: 4px; right: 4px; font: 12px Arial, sans-serif; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.08; letter-spacing: .04em; }
.brand-copy strong { font-size: 18px; font-weight: 800; }
.brand-copy small { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-top: 5px; }
.brand-light { color: #fff; }
.brand-light .brand-mark { background: rgba(255,255,255,.13); }
.brand-light .brand-copy small { color: #9dc0c0; }
.eyebrow, .section-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow.light { color: #9be7c8; }
.eyebrow-line { display: inline-block; width: 19px; height: 1px; background: currentColor; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 21px; min-height: 46px; padding: 11px 18px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 800; line-height: 1.2; white-space: nowrap; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button span { font-size: 19px; font-weight: 400; line-height: .8; }
.button-primary { background: var(--deep); color: #fff; box-shadow: 0 8px 18px rgba(16, 62, 70, .13); }
.button-primary:hover:not(:disabled) { background: #0c323b; box-shadow: 0 10px 22px rgba(16, 62, 70, .18); }
.button-outline { border-color: #d9e4df; color: var(--deep); background: #fff; }
.button-outline:hover:not(:disabled) { background: #eff7f3; }
.button-secondary { background: #e8f2ef; color: var(--deep); }
.button-secondary:hover:not(:disabled) { background: #d8ece5; }
.button-full { width: 100%; }
.text-link, .back-link { color: var(--teal); font-size: 13px; font-weight: 800; }
.text-link:hover, .back-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.flash-stack { width: min(1160px, 100%); margin: 0 auto 18px; display: grid; gap: 8px; }
.flash { padding: 13px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; border: 1px solid; }
.flash-error { background: #fff1ef; border-color: #f4c9c2; color: #993e31; }
.flash-success { background: #eaf8f0; border-color: #bee8cf; color: #21714a; }
.flash-info { background: #edf7f7; border-color: #cae9e8; color: #24636a; }
.field-error, .errorlist { color: #ae4037; font-size: 12px; margin: 5px 0 0; padding-left: 0; list-style: none; }

/* Public pages */
.public-body { min-height: 100vh; display: flex; flex-direction: column; }
.site-header { width: 100%; height: 76px; padding: 0 max(32px, calc((100vw - 1210px) / 2)); display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); }
.header-link { color: #536c72; font-size: 12px; font-weight: 700; }
.header-link span { margin-left: 7px; color: var(--teal); font-size: 17px; }
.header-link:hover { color: var(--deep); }
.public-main { width: 100%; flex: 1; padding: 38px 24px 42px; }
.site-footer { min-height: 62px; padding: 19px max(32px, calc((100vw - 1210px) / 2)); display: flex; justify-content: space-between; gap: 20px; color: #84969a; font-size: 11px; font-weight: 600; border-top: 1px solid var(--line); }
.entry-layout { width: min(1160px, 100%); min-height: 622px; margin: 0 auto; display: grid; grid-template-columns: 1.04fr .96fr; background: #fff; border: 1px solid #e8edeb; border-radius: 23px; overflow: hidden; box-shadow: var(--shadow); }
.entry-hero { position: relative; padding: 58px 58px 38px; overflow: hidden; color: #fff; background: radial-gradient(circle at 90% 8%, rgba(95, 190, 153, .16), transparent 26%), radial-gradient(circle at 0 90%, rgba(14, 106, 104, .45), transparent 36%), #103d46; display: flex; flex-direction: column; align-items: flex-start; }
.entry-hero::after { content: ""; position: absolute; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -160px; top: 95px; box-shadow: 0 0 0 70px rgba(255,255,255,.018), 0 0 0 140px rgba(255,255,255,.018); pointer-events: none; }
.entry-hero h1, .login-intro h1 { position: relative; z-index: 1; margin: 38px 0 19px; font-size: clamp(40px, 4.1vw, 60px); line-height: 1.07; font-weight: 760; letter-spacing: -.055em; }
.entry-hero h1 em, .login-intro h1 em { color: #a5eac8; font-family: Georgia, serif; font-weight: 400; letter-spacing: -.045em; }
.entry-intro { position: relative; z-index: 1; max-width: 410px; margin: 0; color: #bfdddb; font-size: 15px; line-height: 1.8; }
.hero-steps { position: relative; z-index: 1; margin-top: auto; width: min(390px, 100%); padding-top: 25px; }
.hero-steps div { display: flex; gap: 17px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.13); }
.hero-steps span { color: #9fe4c5; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.hero-steps p { margin: 0; color: #e5f2ee; font-size: 13px; font-weight: 600; }
.privacy-note { position: relative; z-index: 1; display: flex; gap: 12px; align-items: center; max-width: 420px; margin-top: 25px; color: #c5dfdc; }
.privacy-icon { color: #9fe4c5; font-size: 22px; }
.privacy-note p { margin: 0; font-size: 11px; line-height: 1.55; }
.entry-side { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 55px 62px; background: linear-gradient(155deg, #fff, #fbfcfa); }
.entry-card { width: min(375px, 100%); }
.pill, .status-badge { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .025em; }
.pill { padding: 7px 11px; background: #e8f7ed; color: #216e4b; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #37ad72; }
.entry-card h2, .login-card h2 { margin: 24px 0 7px; color: var(--ink); font-size: 31px; line-height: 1.2; letter-spacing: -.045em; }
.entry-card .muted, .login-card .muted { margin: 0 0 28px; font-size: 13px; line-height: 1.7; }
.stack-form { display: flex; flex-direction: column; }
.stack-form label { margin-bottom: 8px; color: #29454c; font-size: 12px; font-weight: 800; }
.stack-form input { width: 100%; height: 48px; padding: 0 14px; margin-bottom: 19px; border: 1px solid #dce6e3; border-radius: 8px; background: #fff; color: var(--ink); font-size: 14px; transition: border-color .18s ease, box-shadow .18s ease; }
.stack-form input::placeholder { color: #9aabae; }
.stack-form input:focus { border-color: #45aa9b; box-shadow: 0 0 0 3px rgba(69,170,155,.12); outline: none; }
.stack-form .button { margin-top: 7px; }
.card-footnote { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); color: #849397; font-size: 11px; }
.card-footnote span { color: var(--teal); font-size: 17px; margin-right: 5px; }
.support-note { margin-top: 29px; color: #85979a; text-align: center; font-size: 11px; }

/* Ballot and state screens */
.ballot-shell { width: min(860px, 100%); margin: 0 auto; padding: 37px 44px 35px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.ballot-topline { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.step-counter { color: #789096; font-size: 11px; font-weight: 800; }
.ballot-progress { height: 4px; margin: 22px 0 31px; background: #e8f1ed; border-radius: 10px; overflow: hidden; }
.ballot-progress span { display: block; width: 66%; height: 100%; background: #46b58c; border-radius: inherit; }
.ballot-heading { display: flex; justify-content: space-between; gap: 25px; align-items: center; }
.ballot-heading h1 { margin: 7px 0 4px; font-size: clamp(28px, 3.5vw, 39px); line-height: 1.16; letter-spacing: -.05em; }
.ballot-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.limit-note { display: flex; flex-direction: column; min-width: 130px; padding: 12px 16px; background: #eff8f3; border: 1px solid #dbeee2; border-radius: 10px; color: #216b4d; text-align: right; }
.limit-note strong { font-size: 13px; }
.limit-note span { font-size: 11px; }
.ballot-instruction { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; margin: 30px 0 16px; background: #f5f8f6; border-radius: 9px; }
.instruction-icon { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid #5f8985; border-radius: 50%; color: var(--teal); font-family: Georgia, serif; font-style: italic; font-weight: 700; }
.ballot-instruction p { flex: 1; margin: 0; color: #526a6f; font-size: 12px; }
.ballot-instruction strong { color: var(--teal); font-size: 11px; white-space: nowrap; }
.candidate-list { display: grid; gap: 10px; }
.candidate-option { display: flex; align-items: center; gap: 17px; min-height: 67px; padding: 12px 18px; border: 1px solid #e2eae6; border-radius: 10px; background: #fff; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.candidate-option:hover { transform: translateX(2px); border-color: #b6d8cb; background: #fbfefc; }
.candidate-option:has(input:checked) { background: #f0faf4; border-color: #5ebe93; }
.candidate-option:has(input:focus-visible) { outline: 3px solid #36b8a2; outline-offset: 3px; }
.candidate-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.candidate-order { color: #82a09b; font-size: 12px; font-weight: 800; }
.candidate-name { flex: 1; font-size: 15px; font-weight: 700; }
.candidate-check { display: grid; place-items: center; width: 25px; height: 25px; border: 1.5px solid #c5d4d0; border-radius: 7px; color: transparent; font-size: 16px; font-weight: 900; transition: all .16s ease; }
.candidate-option input:checked ~ .candidate-check { background: var(--deep); color: #fff; border-color: var(--deep); }
.ballot-actions { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 24px; margin-top: 25px; border-top: 1px solid var(--line); }
.ballot-actions p { max-width: 310px; margin: 0; color: #89999b; font-size: 11px; }
.state-card { width: min(580px, 100%); margin: 8vh auto 0; padding: 57px 55px 50px; background: #fff; border: 1px solid var(--line); border-radius: 21px; text-align: center; box-shadow: var(--shadow); }
.success-icon, .closed-icon { display: grid; place-items: center; width: 71px; height: 71px; margin: 0 auto 24px; border-radius: 50%; background: #e8f8ee; color: #239362; font-size: 36px; }
.closed-icon { background: #edf3f2; color: var(--teal); }
.state-card h1 { margin: 11px 0 12px; font-size: clamp(29px, 4vw, 39px); line-height: 1.18; letter-spacing: -.045em; }
.state-card p { max-width: 390px; margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.75; }
.state-divider { height: 1px; margin: 29px auto; background: var(--line); }

/* Administrative login */
.login-layout { width: min(1070px, 100%); min-height: 570px; margin: 22px auto; display: grid; grid-template-columns: 1fr .92fr; align-items: center; gap: 70px; }
.login-intro { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 55px 45px; }
.login-intro h1 { margin-top: 24px; color: var(--deep); }
.login-intro h1 em { color: #319579; }
.login-intro p { max-width: 390px; margin: 0; color: #6b8589; font-size: 15px; line-height: 1.8; }
.login-decoration { position: absolute; bottom: -165px; left: 30px; width: 355px; height: 355px; border: 1px solid #d3e4da; border-radius: 50%; box-shadow: 0 0 0 52px #edf5ee, 0 0 0 105px #f3f8f1; opacity: .7; }
.login-decoration span { display: grid; place-items: center; width: 100%; height: 100%; font-family: Georgia, serif; font-size: 105px; color: #cce5d5; }
.login-card { position: relative; z-index: 1; padding: 49px 47px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.login-card .back-link { display: inline-block; margin-top: 26px; }

/* Administration shell */
.admin-body { background: #f5f7f5; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 27px 17px 18px; color: #fff; background: linear-gradient(155deg, #103d46, #0c333b 75%); }
.admin-sidebar .brand { margin: 0 14px 52px; }
.sidebar-section-label { margin: 0 18px 12px; color: #7fa4a7; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.admin-nav { display: grid; gap: 5px; }
.admin-nav a { display: flex; align-items: center; gap: 13px; min-height: 42px; padding: 0 14px; border-radius: 8px; color: #b5ced0; font-size: 12px; font-weight: 700; transition: background .16s ease, color .16s ease; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(188,240,215,.11); color: #fff; }
.admin-nav a.active { box-shadow: inset 3px 0 0 #6edab3; }
.nav-icon { display: grid; place-items: center; width: 21px; color: #8ac0b8; font-size: 19px; font-weight: 400; }
.admin-nav a.active .nav-icon { color: #a6ebc9; }
.sidebar-bottom { margin-top: auto; }
.sidebar-public-link { display: flex; justify-content: space-between; margin: 0 6px 22px; padding: 12px 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: #e9f7f0; font-size: 11px; font-weight: 700; }
.sidebar-public-link:hover { background: rgba(255,255,255,.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 15px 7px 11px; border-top: 1px solid rgba(255,255,255,.13); }
.user-avatar, .topbar-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; background: #d8efe1; color: var(--deep); font-size: 13px; font-weight: 800; }
.sidebar-user span:last-child { min-width: 0; display: flex; flex-direction: column; }
.sidebar-user strong { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.sidebar-user small { color: #91afb2; font-size: 10px; }
.logout-form button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 5px 7px; border: 0; background: transparent; color: #9fbfc1; font-size: 11px; font-weight: 700; }
.logout-form button:hover { color: #fff; }
.admin-area { min-width: 0; }
.admin-topbar { height: 77px; display: flex; align-items: center; justify-content: space-between; padding: 0 43px; background: #fff; border-bottom: 1px solid var(--line); }
.admin-topbar > div:first-child { display: flex; flex-direction: column; }
.topbar-kicker { color: #92a4a4; font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.admin-topbar strong { color: #25434a; font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 24px; }
.live-indicator { display: inline-flex; align-items: center; gap: 8px; color: #819495; font-size: 10px; font-weight: 700; }
.live-indicator span { width: 7px; height: 7px; border-radius: 50%; background: #49bc87; }
.topbar-avatar { width: 31px; height: 31px; font-size: 12px; }
.admin-content { width: min(1390px, 100%); margin: 0 auto; padding: 31px 42px 70px; }
.admin-flashes { width: 100%; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; margin-bottom: 27px; }
.page-heading h1 { margin: 6px 0 4px; font-size: clamp(28px, 3vw, 35px); line-height: 1.16; letter-spacing: -.055em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.page-heading .button { flex: 0 0 auto; }
.panel { min-width: 0; padding: 25px 25px 24px; background: #fff; border: 1px solid #e6eeea; border-radius: 13px; box-shadow: 0 6px 24px rgba(17,58,63,.025); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.panel-heading h2, .info-panel h2, .next-panel h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.035em; }
.panel-symbol { color: #a9c8c2; font-size: 29px; line-height: 1; }
.count-pill { padding: 5px 9px; border-radius: 7px; color: var(--teal); background: #ebf5f2; font-size: 11px; font-weight: 800; }
.status-badge { padding: 6px 10px; white-space: nowrap; }
.status-open { color: #227247; background: #e8f7ee; }
.status-closed { color: #77726b; background: #f1f0ed; }
.status-paused { color: #986d20; background: #fff3db; }
.status-used { color: #517786; background: #eaf3f6; }
.election-strip { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 18px; margin-bottom: 19px; background: #fff; border: 1px solid #e5eeea; border-radius: 11px; }
.election-strip > div:first-child { display: flex; flex-direction: column; }
.strip-label { color: #91a6a4; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.election-strip strong { font-size: 13px; }
.strip-actions { display: flex; align-items: center; gap: 13px; }
.inline-select select, .heading-select select { max-width: 245px; min-height: 33px; padding: 5px 29px 5px 9px; border: 1px solid #dce7e1; border-radius: 7px; color: #385961; background: #fff; font-size: 11px; font-weight: 700; }
.heading-select select { max-width: 265px; min-height: 40px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 17px; }
.metric-card { min-height: 161px; display: flex; flex-direction: column; align-items: flex-start; padding: 17px 20px; background: #fff; border: 1px solid #e6eeea; border-radius: 12px; }
.metric-card.accent { background: #eaf8ef; border-color: #d2ebdb; }
.metric-icon { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 9px; border-radius: 7px; font-size: 19px; line-height: 1; }
.metric-icon.teal { color: #279b7c; background: #e7f5ef; }
.metric-icon.blue { color: #4888aa; background: #ebf3f8; }
.metric-icon.amber { color: #be9550; background: #fbf4e8; }
.metric-icon.mint { color: #269368; background: #d8f1df; }
.metric-card > span { color: #7d9598; font-size: 10px; font-weight: 700; }
.metric-card strong { margin: 3px 0 -2px; color: #183b43; font-size: 29px; line-height: 1.2; letter-spacing: -.045em; }
.metric-card sup { font-size: 14px; vertical-align: 7px; }
.metric-card small { color: #a2b0af; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 17px; }
.participation-number { margin: 3px 0 9px; color: var(--deep); font-size: 49px; font-weight: 750; line-height: 1.2; letter-spacing: -.06em; }
.participation-number span { color: #5cafa0; font-size: 25px; }
.progress-track, .result-track { height: 9px; overflow: hidden; border-radius: 50px; background: #ecf2ee; }
.progress-track span, .result-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #238871, #72d0a2); }
.progress-legend { display: flex; flex-wrap: wrap; gap: 17px; margin-top: 17px; color: #6f8588; font-size: 10px; font-weight: 700; }
.progress-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-dot.filled { background: #3da980; }
.legend-dot.empty { background: #d9e4df; }
.panel-note { padding-top: 17px; margin-top: 25px; border-top: 1px solid var(--line); color: #899b9c; font-size: 10px; line-height: 1.6; }
.results-hidden { min-height: 177px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.lock-symbol { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 10px; border-radius: 9px; background: #edf6f3; color: #639a8e; font-size: 27px; }
.results-hidden strong { font-size: 13px; }
.results-hidden p { margin: 4px 0 10px; color: #8b9e9d; font-size: 11px; }
.results-hidden a { color: var(--teal); font-size: 10px; font-weight: 800; }
.result-row { margin: 17px 0; }
.result-row > div:first-child { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 7px; font-size: 11px; }
.result-row strong { font-weight: 700; }
.result-row span { color: #7d9598; }
.result-track { height: 6px; }
.quick-panel { padding-bottom: 15px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-grid a { position: relative; display: flex; flex-direction: column; min-height: 115px; padding: 15px; border: 1px solid #e5eee9; border-radius: 9px; transition: background .16s ease, border-color .16s ease; }
.quick-grid a:hover { background: #f7fcf9; border-color: #bfdecf; }
.quick-icon { color: #3c9c83; font-size: 22px; line-height: 1; }
.quick-grid strong { margin-top: 8px; font-size: 11px; }
.quick-grid small { color: #8a9e9d; font-size: 10px; }
.quick-arrow { position: absolute; right: 14px; top: 17px; color: #72a397; font-size: 17px; }
.empty-panel { padding: 70px 25px; text-align: center; }
.empty-icon { margin-bottom: 11px; color: #59aa90; font-size: 40px; }
.empty-panel h2 { margin: 0; }
.empty-panel p { color: var(--muted); font-size: 13px; }
.empty-panel .button { margin-top: 13px; }

/* Management pages */
.management-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr); align-items: start; gap: 17px; }
.side-stack { display: grid; gap: 17px; }
.election-list { display: grid; }
.election-list-item { display: flex; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); }
.election-list-item:hover .election-list-copy strong { color: var(--teal); }
.election-list-icon { display: grid; place-items: center; flex: 0 0 auto; width: 37px; height: 37px; border-radius: 9px; background: #eaf5f0; color: #2b8b75; font-size: 22px; }
.election-list-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.election-list-copy strong { font-size: 12px; transition: color .15s ease; }
.election-list-copy small { color: #93a4a4; font-size: 10px; }
.list-arrow { color: #7fa79d; font-size: 18px; }
.form-panel > .muted { margin: -8px 0 19px; font-size: 11px; line-height: 1.7; }
.admin-form { display: grid; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { color: #315158; font-size: 11px; font-weight: 800; }
.form-field input, .filter-bar input, .filter-bar select { width: 100%; min-height: 41px; padding: 9px 11px; border: 1px solid #dce7e2; border-radius: 8px; color: var(--ink); background: #fff; font-size: 12px; }
.form-field input:focus, .filter-bar input:focus, .filter-bar select:focus, .inline-select select:focus, .heading-select select:focus { border-color: #60b9a3; outline: 3px solid #dff5e9; }
.form-field input:disabled { color: #829391; background: #f4f7f5; }
.form-field small { color: #8b9c9a; font-size: 10px; }
.form-divider { height: 1px; background: var(--line); }
.check-field { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check-field input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: #1d856d; }
.check-field span { display: flex; flex-direction: column; }
.check-field strong { font-size: 11px; }
.check-field small { color: #92a2a0; font-size: 10px; line-height: 1.45; }
.admin-form .button { margin-top: 3px; }
.back-row { margin: -4px 0 18px; }
.back-row a { color: var(--teal); font-size: 11px; font-weight: 800; }
.back-row a:hover { text-decoration: underline; }
.info-row { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: #819493; }
.info-row strong { color: var(--deep); }
.info-panel h2, .next-panel h2 { margin-bottom: 16px; }
.next-panel a { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); color: var(--teal); font-size: 11px; font-weight: 800; }
.next-panel a:hover { color: #0b3f48; }
.notice-bar { display: flex; align-items: center; gap: 11px; padding: 12px 16px; margin-bottom: 16px; background: #eff7f3; border: 1px solid #d6eadd; border-radius: 9px; color: #326752; }
.notice-bar > span { font-size: 21px; }
.notice-bar p { margin: 0; font-size: 11px; font-weight: 600; }
.candidate-admin-row { display: flex; align-items: center; gap: 13px; min-height: 58px; border-top: 1px solid var(--line); }
.candidate-admin-order { display: grid; place-items: center; flex: 0 0 auto; width: 31px; height: 31px; border-radius: 8px; color: #3e8b78; background: #ecf6f1; font-size: 10px; font-weight: 800; }
.candidate-admin-row > div:nth-child(2) { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.candidate-admin-row strong { font-size: 11px; }
.candidate-admin-row small { color: #98a8a6; font-size: 10px; }
.row-actions { display: flex; align-items: center; gap: 14px; }
.row-actions a, .danger-link { padding: 0; border: 0; background: transparent; color: var(--teal); font-size: 10px; font-weight: 800; }
.row-actions a:hover, .danger-link:hover { text-decoration: underline; }
.danger-link { color: #ae5a51; }
.empty-inline { padding: 27px 0; color: #8ba09f; font-size: 12px; }
.narrow-panel { max-width: 590px; }
.code-summary { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: stretch; margin-bottom: 17px; }
.code-summary > div { display: flex; flex-direction: column; padding: 13px 19px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.code-summary span { color: #8ca09e; font-size: 10px; font-weight: 700; }
.code-summary strong { color: var(--deep); font-size: 23px; line-height: 1.2; }
.code-summary .button { align-self: center; }
.code-management-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(285px, .82fr); gap: 17px; align-items: start; }
.filter-bar { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 8px; margin-bottom: 16px; }
.filter-bar .button { min-height: 41px; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 10px 9px; background: #f6f9f7; color: #8aa09d; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.data-table td { padding: 11px 9px; border-bottom: 1px solid #edf1ee; color: #5c7275; font-size: 10px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .table-action { text-align: right; }
.code-text { color: var(--ink); font-family: Consolas, "Courier New", monospace; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.empty-table { padding: 24px !important; text-align: center; color: #8da2a0 !important; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 15px; margin-top: 8px; border-top: 1px solid var(--line); color: #8ca09e; font-size: 10px; }
.pagination > div { display: flex; gap: 12px; }
.pagination a { color: var(--teal); font-weight: 800; }

@media (max-width: 1100px) {
  .admin-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .admin-sidebar { padding-left: 12px; padding-right: 12px; }
  .admin-content { padding-left: 27px; padding-right: 27px; }
  .admin-topbar { padding-left: 27px; padding-right: 27px; }
  .management-grid, .code-management-grid { grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); }
}
@media (max-width: 850px) {
  .entry-hero { padding: 45px 35px 34px; }
  .entry-side { padding: 45px 35px; }
  .admin-layout { display: block; }
  .admin-sidebar { position: relative; height: auto; padding: 13px 20px; }
  .admin-sidebar .brand { margin: 0 0 14px; }
  .sidebar-section-label, .sidebar-bottom { display: none; }
  .admin-nav { display: flex; overflow-x: auto; padding-bottom: 2px; }
  .admin-nav a { flex: 0 0 auto; padding: 0 12px; min-height: 37px; white-space: nowrap; }
  .admin-nav a.active { box-shadow: inset 0 -3px 0 #6edab3; }
  .admin-topbar { height: 61px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-grid, .code-management-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .site-header { height: 65px; padding: 0 19px; }
  .header-link { max-width: 103px; text-align: right; line-height: 1.25; font-size: 10px; }
  .header-link span { display: none; }
  .public-main { padding: 18px 12px 30px; }
  .site-footer { padding: 16px 19px; font-size: 10px; }
  .site-footer span:last-child { display: none; }
  .entry-layout, .login-layout { display: block; min-height: 0; }
  .entry-hero { min-height: 395px; padding: 33px 27px 28px; }
  .entry-hero h1 { margin: 24px 0 14px; font-size: 41px; }
  .entry-intro { font-size: 13px; }
  .hero-steps { padding-top: 25px; }
  .hero-steps div { padding: 7px 0; }
  .privacy-note { margin-top: 18px; }
  .entry-side { padding: 35px 27px; }
  .support-note { margin-top: 18px; }
  .ballot-shell { padding: 25px 19px; }
  .ballot-heading { align-items: flex-start; }
  .ballot-heading h1 { font-size: 28px; }
  .ballot-heading p { font-size: 11px; }
  .limit-note { min-width: 85px; padding: 8px; }
  .ballot-instruction { flex-wrap: wrap; gap: 8px; }
  .ballot-instruction p { flex-basis: calc(100% - 35px); }
  .ballot-instruction strong { margin-left: 30px; }
  .ballot-actions { align-items: stretch; flex-direction: column; gap: 15px; }
  .ballot-actions .button { width: 100%; }
  .state-card { padding: 42px 28px; }
  .login-layout { margin: 0 auto; }
  .login-intro { min-height: 250px; padding: 30px 20px; }
  .login-intro h1 { font-size: 39px; }
  .login-decoration { display: none; }
  .login-card { padding: 35px 27px; }
  .admin-sidebar { padding: 12px; }
  .admin-sidebar .brand { margin: 0 5px 10px; }
  .admin-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; overflow: visible; }
  .admin-nav a { min-height: 58px; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 2px; text-align: center; white-space: normal; font-size: 10px; line-height: 1.15; }
  .nav-icon { font-size: 17px; }
  .admin-topbar { padding: 0 17px; }
  .topbar-right { gap: 8px; }
  .live-indicator { display: none; }
  .admin-content { padding: 25px 15px 45px; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 13px; }
  .page-heading .button, .heading-select select { width: 100%; }
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 145px; padding: 14px; }
  .metric-card strong { font-size: 25px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-grid a { min-height: 95px; }
  .panel { padding: 20px; }
  .election-strip { align-items: flex-start; flex-direction: column; }
  .strip-actions { width: 100%; justify-content: space-between; }
  .inline-select { flex: 1; }
  .inline-select select { width: 100%; max-width: none; }
  .code-summary { grid-template-columns: repeat(3, 1fr); }
  .code-summary > div { padding: 10px; }
  .code-summary strong { font-size: 20px; }
  .code-summary .button { grid-column: 1 / -1; width: 100%; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar input { grid-column: 1 / -1; }
  .filter-bar .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
