:root {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #172b4d;
  background: #f5f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #193862;
  --muted: #8190a5;
  --line: #e8edf3;
  --teal: #659de1;
  --blue: #659de1;
  --blue-dark: #4c85c9;
  --blue-soft: #edf5ff;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: #659de1; text-decoration: none; }
button, input, select { font: inherit; }
button, select { touch-action: manipulation; }
button { cursor: pointer; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 20% 10%, #e7efff 0, transparent 42%), #f5f7fb; }
.auth-card { width: min(100%, 440px); padding: 40px; border: 1px solid #edf0f5; border-radius: 20px; background: #fff; box-shadow: 0 22px 64px #18304b12; }
.brand-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: #fff; background: #659de1; font: 800 18px 'Segoe UI', sans-serif; letter-spacing: -1px; }
.eyebrow, .panel-kicker { margin: 22px 0 8px; color: #8090a5; font-size: 10px; font-weight: 700; letter-spacing: 1.35px; }
.auth-card h1 { margin: 0 0 10px; color: var(--navy); font: 800 27px/1.25 Manrope, sans-serif; letter-spacing: -.8px; }
.muted, .auth-card > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.6; }
.form-stack { display: flex; flex-direction: column; gap: 15px; }
.auth-card .form-stack { margin-top: 26px; }
label { display: flex; flex-direction: column; gap: 7px; color: #3f5068; font-size: 12px; font-weight: 600; }
input, select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #e1e7ef; border-radius: 8px; outline: none; background: white; color: #263b58; font-size: 13px; transition: border .15s, box-shadow .15s; }
input:focus, select:focus { border-color: #659de1; box-shadow: 0 0 0 3px #659de124; }
input::placeholder { color: #a5afbd; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.button-wide { width: 100%; min-height: 44px; margin-top: 5px; }
.auth-footnote { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #edf0f5; font-size: 12px !important; }
.notice { margin: 16px 0; padding: 11px 13px; border: 1px solid #b9e4dc; border-radius: 8px; color: #176e5f; background: #effaf7; font-size: 12px; }
.notice-error { border-color: #f5caca; color: #a13f3f; background: #fff5f4; }
.auth-card:has(.login-brand) .notice { color: #c8d8f2; background: #202632; }
.auth-card:has(.login-brand) .notice-error { color: #ffc2c2; border-color: #58353b; background: #2a1c23; }
.auth-page:has(.login-brand) { background: radial-gradient(ellipse at 88% 12%, #15264a 0, transparent 47%), #0f121a; }
.auth-card:has(.login-brand) { width: min(100%, 590px); padding: 64px 60px 66px; border: 1px solid #292a32; border-radius: 24px; background: #17181f; box-shadow: 0 28px 85px #0005; }
.auth-card .login-brand { margin: 0; color: #6ea2ff; font: 700 47px/1.1 Georgia, 'Times New Roman', serif; letter-spacing: -.7px; }
.auth-card .login-tagline { margin: 9px 0 29px; color: #8a9dbf; font-size: 11px; font-weight: 700; letter-spacing: 1.1px; }
.auth-card:has(.login-brand) .form-stack { gap: 20px; margin-top: 0; }
.auth-card:has(.login-brand) label { gap: 9px; color: #9195a4; font-size: 12px; letter-spacing: .7px; text-transform: uppercase; }
.auth-card:has(.login-brand) input { height: 62px; padding: 0 18px; border-color: #292a32; border-radius: 12px; background: #0f1015; color: #f1f2f8; font-size: 16px; }
.auth-card:has(.login-brand) input:focus { border-color: #659de1; box-shadow: 0 0 0 3px #659de124; }
.auth-card:has(.login-brand) .button-primary { min-height: 62px; margin-top: 1px; border-radius: 12px; color: #fff; background: #659de1; font-size: 16px; }
.auth-card:has(.login-brand) .button-primary:hover { background: #80b2ee; }
.auth-card:has(.login-brand) > .login-brand { font: 700 47px/1.1 Georgia, 'Times New Roman', serif; letter-spacing: -.7px; color: #79adee; }
.auth-card:has(.login-brand) > .login-tagline { margin: 9px 0 29px; color: #a9bddb; font-size: 11px; font-weight: 700; letter-spacing: 1.1px; }
.auth-card:has(.login-brand) .auth-footnote { border-color: #292a32; color: #9899a5; }
.auth-card:has(.login-brand) a:not(.brand-mark) { color: #7eabfa; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 2; display: flex; flex-direction: column; width: 244px; padding: 24px 16px 18px; background: #fff; border-right: 1px solid #e9edf2; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 2px 8px 29px; color: var(--navy); }
.brand-lockup .brand-mark { width: 42px; height: 42px; border-radius: 13px; font-size: 16px; }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup strong { font: 700 13px Manrope, sans-serif; }
.brand-lockup small { margin-top: 4px; color: #8895a6; font-size: 11px; }
.side-label { padding: 8px 12px; color: #9aa5b4; font-size: 9px; letter-spacing: 1.2px; font-weight: 700; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 8px; color: #718097; font-size: 12px; font-weight: 600; }
.nav-item.active { color: var(--blue); background: var(--blue-soft); }
.nav-icon { font-size: 16px; }
.nav-count { margin-left: auto; color: #99a5b4; font-size: 9px; font-weight: 600; }
.nav-tree { margin: 2px 0 0; }
.nav-tree-toggle { width: 100%; }
.nav-candidate > summary::-webkit-details-marker { display: none; }
.nav-tree-content { max-height: min(48vh, 420px); overflow-y: auto; padding: 2px 0 5px 12px; }
.nav-candidate { margin: 1px 0; }
.nav-candidate > summary { position: relative; display: flex; align-items: center; gap: 5px; overflow: hidden; padding: 8px 17px 8px 10px; border-radius: 7px; color: #596b83; cursor: pointer; font-size: 10px; line-height: 1.35; list-style: none; }
.nav-candidate-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-candidate-count { flex: 0 0 auto; color: #99a5b4; font-size: 8px; white-space: nowrap; }
.nav-candidate > summary::before { position: absolute; right: 7px; content: '›'; color: #9aa5b4; font-size: 15px; }
.nav-candidate[open] > summary { color: var(--blue-dark); background: #f4f8fd; }
.nav-candidate[open] > summary::before { transform: rotate(90deg); }
.nav-followers { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 4px 9px; }
.nav-subitem { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 31px; padding: 6px 8px; border-radius: 6px; color: #718097; font-size: 9px; line-height: 1.3; }
.nav-subitem.active, .nav-subitem:hover { color: var(--blue-dark); background: var(--blue-soft); }
.nav-subitem small { flex: 0 0 auto; color: #99a5b4; font-size: 8px; }
.nav-empty { padding: 6px 8px; color: #9aa5b4; font-size: 9px; }
.sidebar-bottom { margin-top: auto; }
.users-panel { margin-top: 18px; padding: 17px 18px; }
.users-help { margin: -4px 0 15px; color: #8491a3; font-size: 11px; line-height: 1.5; }
.managed-username { display: block; margin-top: 4px; color: #8b98a9; font-size: 10px; }
.username-update-form { display: grid; grid-template-columns: minmax(130px, 1fr) auto; align-items: center; gap: 7px; min-width: 240px; }
.username-update-form input { height: 36px; font-size: 11px; }
.username-update-form .button, .delete-user-form .button { min-height: 36px; white-space: nowrap; }
.button-danger { color: #fff; background: #d95c62; }
.button-danger:hover { background: #bd454c; }
.password-reset-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; }
.password-reset-form input { height: 36px; font-size: 11px; }
.password-reset-form .button { white-space: nowrap; }
.app-shell[data-view="voters"] .main-content > .welcome-row,
.app-shell[data-view="voters"] .main-content > .stats-grid,
.app-shell[data-view="voters"] .main-content > .election-panel,
.app-shell[data-view="voters"] .main-content > .admin-grid,
.app-shell[data-view="voters"] .main-content > .hierarchy-panel,
.app-shell[data-view="voters"] .main-content > .page-footer { display: none; }
.app-shell[data-view="voters"] .main-content > .voter-panel { margin-top: 18px; }
.sidebar-note { display: flex; align-items: center; gap: 10px; margin: 0 4px 12px; padding: 13px 11px; border-radius: 9px; color: #8693a5; background: #f7f9fb; font-size: 10px; line-height: 1.6; }
.sidebar-note strong { color: #41536c; font-size: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #44b29a; box-shadow: 0 0 0 4px #44b29a1e; }
.sidebar-user { display: flex; align-items: flex-start; gap: 9px; padding: 14px 2px 0; border-top: 1px solid #edf0f5; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font: 700 13px 'Segoe UI', sans-serif; }
.user-meta { flex: 1; min-width: 0; }
.user-meta strong, .user-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta strong { color: #34465f; font-size: 11px; }
.user-meta small { margin-top: 3px; color: #8c98a8; font-size: 10px; }
.logout-button { min-height: 30px; padding: 0; border: 0; color: var(--blue-dark); background: transparent; font-size: 10px; font-weight: 700; }
.logout-button:hover { color: var(--navy); text-decoration: underline; }
.main-content { max-width: 1500px; margin-left: 244px; padding: 0 42px 28px; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; min-height: 86px; border-bottom: 1px solid #e8edf3; background: #f5f7fb; }
.topbar .eyebrow { margin: 0 0 5px; font-size: 9px; }
.topbar h1 { margin: 0; color: var(--navy); font: 800 20px Manrope, sans-serif; letter-spacing: -.5px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.topbar-user { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: #687991; font-size: 11px; }
.topbar-user-name { display: flex; align-items: center; gap: 8px; }
.topbar-user .logout-button { min-height: 24px; }
.online-indicator { width: 7px; height: 7px; border-radius: 50%; background: #45b39c; }
.main-content > .notice { margin-top: 20px; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; padding: 24px 0 19px; }
.welcome-row h2 { margin: 0 0 5px; color: #172b4d; font: 800 19px Manrope, sans-serif; letter-spacing: -.45px; }
.wave { font-size: 17px; }
.welcome-row p { margin: 0; color: #8a96a7; font-size: 12px; }
.today-chip { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #e7ebf1; border-radius: 8px; color: #63748a; background: white; font-size: 11px; }
.calendar-icon { color: var(--blue); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 17px; }
.stat-card { position: relative; min-height: 132px; padding: 17px 17px 14px; border: 1px solid #e9edf2; border-radius: 11px; background: #fff; }
.stat-icon { position: absolute; top: 15px; right: 15px; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; font-size: 15px; }
.icon-blue { color: #659de1; background: #edf3ff; }.icon-green { color: #2864c8; background: #edf3ff; }.icon-amber { color: #547bb9; background: #eef3fa; }.icon-purple { color: #586fc0; background: #f0f2fb; }
.stat-label { display: block; color: #7f8da1; font-size: 11px; font-weight: 600; }
.stat-value { display: block; margin-top: 10px; color: #172b4d; font: 800 25px Manrope, sans-serif; letter-spacing: -.8px; }
.stat-caption { display: block; margin-top: 4px; color: #a0aaba; font-size: 9px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 0 0 16px; }
.panel { border: 1px solid #e9edf2; border-radius: 11px; background: #fff; }
.admin-grid .panel { padding: 17px 18px 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.panel-heading .panel-kicker { display: block; margin: 0 0 4px; font-size: 9px; }
.panel-heading h2 { margin: 0; color: #203653; font: 700 14px Manrope, sans-serif; letter-spacing: -.2px; }
.heading-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--blue); background: var(--blue-soft); }
.compact-form { gap: 10px; }
.compact-form label { gap: 5px; font-size: 10px; }
.compact-form input, .compact-form select { height: 36px; font-size: 11px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compact-form .button { align-self: flex-start; min-height: 35px; margin-top: 3px; font-size: 10px; }
.empty-inline { margin: 0; padding: 12px; border-radius: 7px; color: #8390a1; background: #f8fafb; font-size: 11px; line-height: 1.55; }
.team-panel { margin-bottom: 16px; padding: 17px 18px 5px; }
.team-panel .panel-heading { margin-bottom: 8px; }
.team-row { display: flex; align-items: center; min-height: 57px; gap: 11px; border-top: 1px solid #f0f2f5; }
.avatar-soft { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.team-name { min-width: 120px; flex: 1; }
.team-name strong, .team-name small { display: block; }
.team-name strong { color: #34465f; font-size: 11px; }
.team-name small { margin-top: 3px; color: #9aa5b3; font-size: 9px; }
.team-count { width: 90px; color: #728198; font-size: 10px; }
.progress-cell { display: flex; align-items: center; gap: 9px; width: 190px; }
.progress-track { flex: 1; height: 5px; border-radius: 5px; background: #edf1f4; overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: #659de1; }
.progress-cell small { width: 60px; color: #8492a4; font-size: 9px; }
.voter-panel { overflow: hidden; }
.voter-panel table { border-collapse: separate; border-spacing: 0; }
.voter-heading { padding: 17px 18px 14px; margin: 0; }
.voter-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.voter-view-toggle { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; padding: 3px; border: 1px solid #e1e7ef; border-radius: 8px; background: #f7f9fc; }
.view-toggle-button { min-height: 28px; padding: 0 9px; border: 0; border-radius: 6px; color: #718097; background: transparent; font-size: 9px; font-weight: 600; white-space: nowrap; }
.view-toggle-button[aria-pressed="true"] { color: #fff; background: var(--blue); }
.bulk-assignment-form { flex: 0 0 auto; }
.bulk-save-button { min-height: 34px; font-size: 10px; }
.search-form { position: relative; display: flex; align-items: center; width: 210px; }
.search-form > span { position: absolute; left: 11px; color: #92a0b1; font-size: 20px; }
.search-form input { height: 34px; padding-left: 32px; padding-right: 28px; background: #fbfcfd; font-size: 10px; }
.search-form .clear-search { position: absolute; right: 10px; color: #8290a1; font-size: 17px; }
.table-wrap { width: 100%; min-width: 0; overflow: hidden; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; white-space: normal; }
thead { background: #fafbfd; }
th { padding: 11px 14px; color: #98a3b1; font-size: 8px; font-weight: 700; letter-spacing: .8px; }
td { padding: 11px 14px; border-top: 1px solid #f0f2f5; color: #63738a; font-size: 10px; }
.voter-cell { display: flex; align-items: center; min-width: 0; gap: 9px; color: #334861; font-size: 10px; }
.voter-cell strong { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.avatar-table { width: 27px; height: 27px; border-radius: 8px; font-size: 10px; }
.attendance-form { min-width: 0; }
.attendance-options { display: flex; flex-wrap: wrap; gap: 5px; }
.attendance-option { min-height: 27px; padding: 5px 9px; border: 1px solid var(--blue); border-radius: 999px; color: var(--blue-dark); background: #fff; font-size: 9px; line-height: 1.15; white-space: nowrap; }
.attendance-option:hover { background: var(--blue-soft); }
.attendance-option:disabled { opacity: .65; cursor: wait; }
.attendance-status-message { display: block; margin-top: 5px; color: #338c74; font-size: 9px; }
.attendance-status-message:empty { display: none; }
.attendance-status-message[data-state="error"] { color: #c24e58; }
.attendance-option.is-selected, .attendance-option.is-selected:hover { color: #fff; background: var(--blue); }
.attendance-option:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.voter-representative { display: block; margin-top: 5px; color: #8190a5; font-size: 9px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.follower-assignment { display: grid; gap: 2px; min-width: 0; }
.phone-editor { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.phone-current { overflow-wrap: anywhere; }
.phone-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ballot-box { display: none; color: var(--blue); font-size: 11px; font-weight: 700; white-space: nowrap; }
.voter-panel[data-list-view="summary"] .ballot-box { display: inline; order: 1; }
.voter-panel[data-list-view="summary"] .phone-line { flex-direction: column; align-items: flex-end; gap: 2px; }
a.phone-current { color: inherit; text-decoration: none; }
a.phone-current:hover { color: var(--blue-dark); text-decoration: underline; }
.phone-edit > summary { cursor: pointer; color: var(--blue-dark); font-size: 9px; font-weight: 700; }
.phone-edit-form { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.phone-edit-form input { width: min(150px, 100%); min-width: 0; height: 34px; padding: 0 8px; font-size: 10px; }
.phone-edit-form .button { min-height: 34px; padding: 0 9px; font-size: 9px; }
.voter-detail-row > td { padding: 10px 14px 15px; background: #fff; }
.voter-bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; overflow: hidden; border-top: 1px solid #e8edf3; background: #fff; }
.voter-notes, .voter-references { min-width: 0; padding: 12px; background: transparent; }
.voter-references { border-top: 1px solid #e8edf3; }
.voter-notes h3, .voter-references h3 { margin: 0; color: #34465f; font-size: 11px; }
.notes-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notes-edit { margin-left: auto; }
.notes-edit > summary { cursor: pointer; color: var(--blue-dark); font-size: 9px; font-weight: 700; list-style: none; }
.notes-edit > summary::-webkit-details-marker { display: none; }
.notes-edit > summary:hover { text-decoration: underline; }
.notes-form { display: grid; gap: 9px; margin-top: 10px; }
.notes-form label { font-size: 9px; }
.notes-form textarea { width: 100%; min-height: 58px; padding: 8px; border: 1px solid #e1e7ef; border-radius: 8px; color: #263b58; font: inherit; font-size: 10px; resize: vertical; }
.notes-form .button { justify-self: start; min-height: 34px; font-size: 9px; }
.voter-notes p, .reference-list p { margin: 7px 0 0; color: #63738a; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.voter-notes p strong { color: #53667f; }
.reference-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.reference-add > summary { min-height: 32px; padding: 0 10px; border-radius: 7px; font-size: 9px; list-style: none; }
.reference-add > summary::-webkit-details-marker { display: none; }
.reference-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.reference-form label { min-width: 0; font-size: 9px; }
.reference-form label:last-of-type { grid-column: 1 / -1; }
.reference-form input { height: 36px; font-size: 10px; }
.reference-form textarea { width: 100%; min-height: 65px; padding: 8px; border: 1px solid #e1e7ef; border-radius: 8px; color: #263b58; font: inherit; font-size: 10px; resize: vertical; }
.reference-form .button { grid-column: 1 / -1; justify-self: start; min-height: 34px; font-size: 9px; }
.reference-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.reference-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 8px; border-radius: 6px; background: #f7f9fb; }
.reference-content { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
.reference-content strong { min-width: 0; color: #445970; font-size: 10px; overflow-wrap: anywhere; }
.reference-content > span, .reference-content > a.phone-current { color: #65768b; font-size: 9px; }
.reference-content p { grid-column: 1 / -1; margin-top: 1px; }
.reference-actions { display: flex; align-items: flex-start; gap: 8px; }
.reference-edit > summary, .reference-delete { padding: 2px 0; border: 0; color: var(--blue-dark); background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; list-style: none; white-space: nowrap; }
.reference-edit > summary::-webkit-details-marker { display: none; }
.reference-edit > summary:hover, .reference-delete:hover { text-decoration: underline; }
.reference-delete { color: #c24e58; }
.reference-update-form { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: min(320px, 70vw); padding: 9px; border: 1px solid #e9edf2; border-radius: 7px; background: #fff; }
.reference-update-form .button { grid-column: 1 / -1; }
.reference-empty { margin: 9px 0 0; font-size: 9px; }
.text-button { padding: 5px 7px; border: 0; border-radius: 5px; color: var(--blue); background: transparent; font-size: 9px; font-weight: 700; }
.text-button:hover { background: var(--blue-soft); }
.empty-state { padding: 34px 15px; text-align: center; }
.empty-state > * { display: block; }
.empty-state .empty-icon { margin-bottom: 8px; color: #bac4d0; font-size: 22px; }
.empty-state strong { color: #596b83; font-size: 11px; }
.empty-state small { margin-top: 5px; color: #9ba6b4; font-size: 10px; }
.table-foot { padding: 11px 15px; border-top: 1px solid #f0f2f5; color: #9aa5b2; font-size: 9px; }
.table-foot:has(.pagination) { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.pagination a { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid #e6ebf2; border-radius: 7px; color: var(--blue); background: #fff; font-size: 10px; font-weight: 600; }
.pagination a:hover { background: var(--blue-soft); }
.pagination span { color: #73839a; font-size: 9px; }
.page-footer { padding: 18px 0 0; color: #a2acb9; text-align: center; font-size: 9px; }
.page-footer span { padding: 0 4px; }

.voter-panel tbody tr:not(.voter-detail-row):not(:has(.empty-state)) td {
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid #e8edf3;
  background: #fff;
}
.voter-panel tbody tr:not(.voter-detail-row):not(:has(.empty-state)) td:first-child {
  border-left: 2px solid var(--navy);
  border-radius: 11px 0 0;
}
.voter-panel tbody tr:not(.voter-detail-row):not(:has(.empty-state)) td:last-child {
  border-right: 0;
  border-radius: 0;
}
.voter-panel tbody tr.voter-detail-row > td {
  border: 0;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  border-left: 2px solid var(--navy);
  border-radius: 0 0 11px 11px;
  background: #fff;
}
.election-panel { margin-bottom: 16px; padding: 19px 21px; }
.election-heading { align-items: flex-start; }
.live-controls { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.refresh-button { min-height: 34px; padding: 0 10px; border: 1px solid #e3e9ef; border-radius: 7px; color: #53677e; background: #fff; font-size: 10px; font-weight: 600; }
.refresh-button:hover:not(:disabled) { border-color: #a9c3ef; color: var(--blue); background: var(--blue-soft); }
.refresh-button:disabled { opacity: .6; cursor: wait; }
.live-status { width: 100%; color: #97a2b0; text-align: right; font-size: 8px; }
.live-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-height: 82px; padding: 13px 16px; border: 1px solid #e9edf2; border-radius: 11px; background: #fff; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #d6eee7; border-radius: 20px; color: #338c74; background: #f0faf6; font-size: 9px; font-weight: 700; }
.live-badge > span { width: 7px; height: 7px; border-radius: 50%; background: #35a585; box-shadow: 0 0 0 3px #35a58523; }
.election-chart { display: flex; align-items: flex-start; justify-content: center; gap: 42px; min-height: 202px; padding: 5px 0; }
.pie-chart { display: grid; flex: 0 0 auto; place-items: center; width: 176px; height: 176px; border-radius: 50%; box-shadow: 0 5px 20px #263b5814; }
.pie-hole { display: flex; width: 102px; height: 102px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #eff1f4; border-radius: 50%; background: #fff; }
.pie-hole strong { color: #203653; font: 800 24px Manrope, sans-serif; }
.pie-hole span { margin-top: 2px; color: #9aa5b4; font-size: 9px; }
.chart-legend { width: min(100%, 570px); }
.legend-row { display: grid; grid-template-columns: 9px 1fr auto 40px; align-items: center; gap: 9px; min-height: 31px; border-bottom: 1px solid #f1f3f6; }
.chart-drilldown-toggle { width: 100%; padding: 0; color: inherit; background: #fff; text-align: left; cursor: pointer; }
.chart-drilldown-toggle:hover, .chart-drilldown-toggle[aria-expanded="true"] { background: #f8faff; }
.chart-drilldown-toggle:focus-visible, .voted-candidate-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; background: var(--legend-color); }
.legend-label { color: #65758a; font-size: 10px; }
.legend-row strong { color: #364a65; font: 700 11px Manrope, sans-serif; }
.legend-row small { color: #98a3b1; text-align: right; font-size: 9px; }
.voted-drilldown { padding: 12px 0 4px; border-bottom: 1px solid #f1f3f6; }
.voted-candidate-list { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.voted-candidate-button { min-width: 0; min-height: 38px; padding: 6px; border: 1px solid #e1e7ef; border-radius: 7px; color: #526680; background: #fff; font-size: 9px; line-height: 1.3; overflow-wrap: anywhere; cursor: pointer; }
.voted-candidate-button:hover, .voted-candidate-button[aria-pressed="true"] { border-color: var(--blue); color: var(--blue-dark); background: var(--blue-soft); }
.voted-detail-status { margin: 10px 0 0; color: #8290a1; font-size: 10px; }
.voted-detail-status:empty { display: none; }
.voted-follower-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 10px; }
.voted-follower-card { min-width: 0; padding: 9px; border: 1px solid #e8edf3; border-radius: 8px; background: #fff; }
.voted-follower-card h3 { margin: 0 0 6px; color: #34465f; font-size: 10px; }
.voted-follower-count { display: block; margin-bottom: 6px; color: #8290a1; font-size: 9px; font-weight: 600; }
.voted-follower-card ul { display: grid; gap: 4px; margin: 0; padding: 0; color: #63738a; font-size: 9px; list-style: none; }
.voted-empty { margin: 0; color: #8290a1; font-size: 10px; }
.chart-note { margin: 10px 0 0; color: #929eae; font-size: 9px; line-height: 1.55; }
.hierarchy-panel { margin-bottom: 16px; padding: 17px 18px 18px; }
.candidate-list { display: flex; flex-direction: column; gap: 9px; }
.candidate-card { padding: 0 12px; border: 1px solid #edf0f4; border-left: 3px solid #659de1; border-radius: 9px; }
.candidate-card.team-kirmizi { border-left-color: #e55353; }
.candidate-card.team-turuncu { border-left-color: #646fc4; }
.candidate-header, .follower-row { display: flex; align-items: center; min-height: 53px; gap: 11px; }
.candidate-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #659de1; }
.team-kirmizi .candidate-dot { background: #e55353; }
.team-turuncu .candidate-dot { background: #646fc4; }
.candidate-title { flex: 1; min-width: 130px; }
.candidate-title strong, .candidate-title small { display: block; }
.candidate-title strong { color: #34465f; font-size: 11px; }
.candidate-title small { margin-top: 3px; color: #98a3b1; font-size: 9px; }
.candidate-empty { margin: 0 0 10px 28px; }
.candidate-followers { border-top: 1px solid #f0f2f5; }
.follower-row { position: relative; padding-left: 16px; min-height: 48px; }
.follower-branch { position: absolute; top: -1px; bottom: 24px; left: 4px; width: 10px; border-bottom: 1px solid #dfe5ed; border-left: 1px solid #dfe5ed; border-radius: 0 0 0 6px; }
.follower-row .avatar-soft { width: 27px; height: 27px; }
.candidate-assignment { display: inline-block; max-width: 210px; overflow: hidden; color: #63758b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.candidate-picker, .follower-picker { display: block; width: 100%; max-width: 100%; min-width: 0; height: 36px; padding-right: 22px; font-size: 9px; }
.source-row { display: block; margin: 3px 0 0 36px; color: #a0aaba; font-size: 8px; }
.details-cell { min-width: 155px; white-space: normal; }
.source-details summary { cursor: pointer; color: var(--blue); font-size: 9px; font-weight: 600; }
.source-details[open] { min-width: 260px; max-width: 550px; }
.source-fields { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 0 14px; max-height: 300px; overflow: auto; margin: 10px 0 0; padding: 5px 9px; border: 1px solid #e9edf2; border-radius: 8px; background: #fbfcfd; }
.source-fields > div { padding: 7px 0; border-bottom: 1px solid #edf0f4; }
.source-fields dt { color: #8794a5; font-size: 8px; font-weight: 600; }
.source-fields dd { margin: 3px 0 0; color: #455872; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }

@media (max-width: 1050px) {
  .sidebar { width: 210px; }
  .main-content { margin-left: 210px; padding: 0 25px 25px; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { width: 190px; padding-right: 12px; padding-left: 12px; }
  .main-content { margin-left: 190px; padding-right: 18px; padding-left: 18px; }
  .candidate-picker, .follower-picker { min-width: 195px; }
}
@media (max-width: 700px) {
  .sidebar { position: static; display: flex; flex-wrap: wrap; align-items: flex-start; width: auto; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid #e9edf2; }
  .brand-lockup { flex: 1 0 100%; padding: 0; }.brand-lockup .brand-mark { width: 36px; height: 36px; }
  .side-label, .sidebar-note { display: none; }
  .nav-item { flex: 1 1 auto; justify-content: center; gap: 6px; padding: 9px 7px; font-size: 10px; }
  .nav-tree { flex: 1 1 auto; }
  .nav-tree-toggle { justify-content: center; }
  .nav-tree-content { max-height: 35vh; padding-left: 4px; }
  .nav-candidate > summary { min-height: 40px; padding: 11px 20px 11px 10px; font-size: 11px; }
  .nav-subitem { min-height: 40px; font-size: 10px; }
  .sidebar-bottom { flex: 1 0 100%; }
  .sidebar-bottom > .nav-item { justify-content: center; }
  .sidebar-user { position: static; flex: 1 0 100%; align-items: center; padding: 10px 2px 0; }
  .sidebar-user .avatar { width: 30px; height: 30px; }
  .sidebar-user .user-meta { display: block; }
  .main-content { margin: 0; padding: 0 14px 20px; }
  .topbar { min-height: 68px; }.topbar-actions { gap: 0; }.topbar-user-name { display: none; }
  .welcome-row { align-items: flex-start; gap: 10px; }.welcome-row h2 { font-size: 16px; }.welcome-row p { max-width: 230px; font-size: 10px; }
  .today-chip { padding: 7px 8px; white-space: nowrap; font-size: 9px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat-card { min-height: 118px; padding: 13px; }.stat-icon { top: 11px; right: 11px; width: 25px; height: 25px; }
  .admin-grid { gap: 10px; }.admin-grid .panel { padding: 14px; }
  .form-row { grid-template-columns: 1fr; }
  .team-panel { padding: 14px 12px 5px; }.team-row { gap: 7px; }.team-name { min-width: 80px; }.team-count { width: auto; font-size: 9px; }.progress-cell { width: 100px; gap: 5px; }.progress-cell small { width: 45px; font-size: 8px; }
  .voter-heading { align-items: flex-start; gap: 10px; padding: 14px 12px; }.voter-heading-actions { width: 100%; flex-wrap: nowrap; }.search-form { flex: 1; width: auto; min-width: 0; }
  .voter-panel .table-wrap { overflow: visible; }
  .voter-panel table, .voter-panel tbody { display: block; width: 100%; }
  .voter-panel thead { display: none; }
  .voter-panel tbody tr:not(:has(.empty-state)) { display: block; margin: 0 9px 10px; padding: 5px 11px; border: 1px solid #e9edf2; border-radius: 10px; background: #fff; }
  .voter-panel tbody tr:not(:has(.empty-state)) td { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 9px 0; border: 0; border-bottom: 1px solid #f0f2f5; white-space: normal; overflow-wrap: anywhere; }
  .voter-panel tbody tr:not(:has(.empty-state)) td::before { content: attr(data-label); color: #8a97a7; font-size: 9px; font-weight: 600; }
  .voter-panel tbody tr:not(:has(.empty-state)) td:first-child { display: block; padding-top: 11px; }
  .voter-panel tbody tr:not(:has(.empty-state)) td:first-child::before { content: none; }
  .voter-panel tbody tr:not(:has(.empty-state)) td:last-child { border: 0; }
  .voter-panel tbody tr:has(.empty-state) { display: block; }
  .voter-panel tbody tr:has(.empty-state) td { display: block; padding: 25px 12px; border: 0; white-space: normal; }
  .candidate-picker, .follower-picker { min-width: 0; }
  .details-cell .source-details[open] { min-width: 0; max-width: 100%; }
  .details-cell details { width: 100%; }
  .text-button { min-height: 36px; padding-right: 11px; padding-left: 11px; }
  .live-controls { justify-content: flex-start; }
  .live-status { text-align: left; }
  .refresh-button { min-height: 40px; }
  .legend-row { min-height: 34px; }
  .voted-candidate-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .team-row { flex-wrap: wrap; }
  .auth-card { padding: 28px 23px; }
  .auth-card:has(.login-brand) { padding: 39px 24px 42px; }
  .auth-card:has(.login-brand) > .login-brand { font-size: clamp(19px, 6.3vw, 26px); white-space: nowrap; }
  .auth-card:has(.login-brand) > .login-tagline { margin-bottom: 24px; }
  .auth-card:has(.login-brand) input, .auth-card:has(.login-brand) .button-primary { min-height: 52px; height: 52px; }
  .compact-form input, .compact-form select { min-height: 44px; height: 44px; font-size: 13px; }
  .compact-form label { gap: 6px; font-size: 11px; }
  .compact-form .button { min-height: 44px; font-size: 11px; }
  .pagination { width: 100%; justify-content: space-between; gap: 6px; }
  .pagination a { min-height: 42px; padding: 0 12px; font-size: 11px; }
  .table-foot { padding-right: 12px; padding-left: 12px; line-height: 1.5; }
  .election-panel { padding: 14px; }
  .election-chart { flex-direction: column; gap: 17px; }
  .pie-chart { width: 155px; height: 155px; }
  .pie-hole { width: 91px; height: 91px; }
  .candidate-header, .follower-row { flex-wrap: wrap; gap: 6px 8px; padding: 8px 0; }
  .candidate-title { min-width: 135px; }
  .progress-cell { width: 120px; }
  .team-count { font-size: 8px; }
  .source-fields { grid-template-columns: 1fr; }
  .voter-bottom-grid { grid-template-columns: 1fr; }
  .voter-references { border-top: 1px solid #e8edf3; border-left: 0; }
  .voter-references { border-top: 1px solid #e8edf3; border-left: 0; }
  .phone-edit-form { flex-wrap: wrap; }
  .phone-edit-form input { width: min(190px, 100%); }
  .users-panel { padding: 14px 10px; }
  .users-panel .table-wrap { overflow: visible; }
  .users-panel table, .users-panel tbody { display: block; width: 100%; }
  .users-panel thead { display: none; }
  .users-panel tbody tr { display: block; margin: 0 0 10px; padding: 5px 11px; border: 1px solid #e9edf2; border-radius: 10px; }
  .users-panel tbody td { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 8px; min-width: 0; padding: 9px 0; border: 0; border-bottom: 1px solid #f0f2f5; white-space: normal; overflow-wrap: anywhere; }
  .users-panel tbody td::before { content: attr(data-label); color: #8a97a7; font-size: 9px; font-weight: 600; }
  .users-panel tbody td:last-child { border: 0; }
  .username-update-form { grid-template-columns: minmax(0, 1fr) auto; min-width: 0; width: 100%; }
  .username-update-form input { min-width: 0; }
  .password-reset-form { grid-template-columns: 1fr; min-width: 0; }
  .password-reset-form .button { justify-self: start; }
  .delete-user-form .button { min-height: 42px; }
}
@media (max-width: 400px) {
  .main-content { padding-right: 10px; padding-left: 10px; }
  .stats-grid { gap: 7px; }
  .stat-card { min-height: 112px; padding: 11px; }
  .stat-value { font-size: 22px; }
  .welcome-row h2 { font-size: 15px; }
  .today-chip { gap: 4px; padding: 7px 6px; font-size: 8px; }
  .voter-heading { flex-direction: column; }
  .voter-heading-actions { width: 100%; flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; }
  .search-form { flex: 1; width: auto; }
  .view-toggle-button { padding: 0 6px; font-size: 8px; }
  .candidate-header .progress-cell { width: 105px; }
  .voted-candidate-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users-panel tbody td { grid-template-columns: minmax(70px, 30%) minmax(0, 1fr); }
  .username-update-form input,
  .password-reset-form input { min-width: 0; max-width: 100%; }
  .password-reset-form .button { justify-self: stretch; max-width: 100%; padding: 6px; white-space: normal; line-height: 1.25; }
}

@media (max-width: 1400px) {
  .voter-panel .table-wrap,
  .users-panel .table-wrap { overflow: hidden; }
  .voter-panel table,
  .voter-panel tbody,
  .users-panel table,
  .users-panel tbody { display: block; width: 100%; }
  .voter-panel thead,
  .users-panel thead { display: none; }
  .voter-panel tbody tr:not(:has(.empty-state)),
  .users-panel tbody tr {
    display: block;
    min-width: 0;
    margin: 0 0 10px;
    padding: 5px 11px;
    border: 1px solid #e9edf2;
    border-radius: 10px;
    background: #fff;
  }
  .voter-panel tbody tr:not(:has(.empty-state)) td,
  .users-panel tbody td {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid #f0f2f5;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .voter-panel tbody tr:not(:has(.empty-state)) td::before,
  .users-panel tbody td::before {
    content: attr(data-label);
    color: #8a97a7;
    font-size: 9px;
    font-weight: 600;
  }
  .voter-panel tbody tr:not(:has(.empty-state)) td:first-child {
    display: block;
    padding-top: 11px;
  }
  .voter-panel tbody tr:not(.voter-detail-row):not(:has(.empty-state)) td:first-child {
    border-left: 0;
    border-radius: 0;
  }
  .voter-panel tbody tr:not(:has(.empty-state)) td:first-child::before { content: none; }
  .voter-panel tbody tr:not(:has(.empty-state)) td:last-child,
  .users-panel tbody td:last-child { border: 0; }
  .voter-panel tbody tr.voter-detail-row { margin-top: -8px; }
  .voter-panel tbody tr.voter-detail-row td { display: block; padding: 9px; border: 0; }
  .voter-panel tbody tr.voter-detail-row td::before { content: none; }
  .voter-bottom-grid { grid-template-columns: 1fr; }
  .phone-edit-form { flex-wrap: wrap; }
  .phone-edit-form input { width: min(190px, 100%); }
  .voter-panel tbody tr:has(.empty-state),
  .users-panel tbody tr:has(.empty-inline) { display: block; }
  .voter-panel tbody tr:has(.empty-state) td,
  .users-panel tbody tr:has(.empty-inline) td { display: block; padding: 25px 12px; border: 0; }
  .candidate-picker, .follower-picker { width: 100%; min-width: 0; }
  .details-cell details,
  .details-cell .source-details[open] { width: 100%; min-width: 0; max-width: 100%; }
  .username-update-form { grid-template-columns: minmax(0, 1fr) auto; min-width: 0; width: 100%; }
  .username-update-form input { min-width: 0; }
  .password-reset-form { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .password-reset-form .button { justify-self: start; }
  .voter-panel tbody tr:not(.voter-detail-row):not(:has(.empty-state)) {
    margin: 0;
    border: 2px solid var(--navy);
    border-bottom: 0;
    border-radius: 11px 11px 0 0;
  }
  .voter-panel tbody tr.voter-detail-row {
    margin: -1px 0 12px;
    padding: 0 11px 8px;
    border: 2px solid var(--navy);
    border-top: 0;
    border-radius: 0 0 11px 11px;
    background: #fff;
  }
  .voter-panel tbody tr.voter-detail-row > td {
    padding: 9px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .voter-panel tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td {
    border: 0;
    border-bottom: 1px solid #e8edf3;
  }
  .voter-panel tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td:last-child {
    border-bottom: 0;
  }
}

.voter-panel[data-list-view="summary"] .table-wrap,
.voter-panel[data-list-view="summary"] table,
.voter-panel[data-list-view="summary"] tbody { display: block; width: 100%; }
.voter-panel[data-list-view="summary"] thead,
.voter-panel[data-list-view="summary"] tbody tr.voter-detail-row { display: none; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) {
  display: grid;
  grid-template-columns: minmax(0, calc((100% - 36px) / 3)) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 0 12px;
  border: 2px solid var(--navy);
  border-radius: 11px;
  background: #fff;
}
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td {
  display: none !important;
  border: 0;
}
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td:first-child {
  display: block !important;
  grid-column: 1;
  grid-row: 1;
  padding: 12px 0;
  border: 0;
}
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td.phone-data-cell {
  display: flex !important;
  grid-column: 3;
  grid-row: 1;
  justify-content: flex-end;
  padding: 12px 0;
  border: 0;
  text-align: right;
}
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td.action-cell {
  display: flex !important;
  grid-column: 4;
  grid-row: 1;
  justify-content: flex-start;
  padding: 12px 0;
  border: 0;
}
.voter-panel[data-list-view="summary"] .action-cell .attendance-options { justify-content: flex-start; flex-wrap: nowrap; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td.phone-data-cell { flex-direction: column; align-items: flex-end; gap: 4px; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td.phone-data-cell::before { content: attr(data-label); display: block; color: #8a97a7; font-size: 9px; font-weight: 600; }
.voter-panel[data-list-view="summary"] .phone-editor { align-items: flex-end; }
.voter-panel[data-list-view="summary"] .voter-cell .avatar,
.voter-panel[data-list-view="summary"] .source-row { display: none; }
.voter-panel[data-list-view="summary"] .voter-cell strong { flex: 1; font-size: 12px; }
.summary-expand-toggle { display: none; }
.voter-panel .summary-expand-toggle {
  display: inline-grid;
  order: -1;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #dfe7f2;
  border-radius: 7px;
  color: var(--navy);
  background: #f7f9fc;
}
.summary-expand-toggle span { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.summary-expand-toggle[aria-expanded="true"] span { transform: translateY(2px) rotate(225deg); }
.voter-panel[data-list-view="summary"] tbody tr:has(.empty-state) { display: block; }
.voter-panel[data-list-view="summary"] tbody tr:has(.empty-state) td { display: block; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 11px 11px 0 0;
  border-bottom: 0;
}
/* Açılan satır detaylı görünümle aynı: başlık, ardından etiketli alt alta satırlar */
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded > td:first-child {
  grid-column: 1;
  grid-row: auto;
  padding: 12px 0 9px;
}
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded > td:not(:first-child) {
  display: grid !important;
  grid-column: 1;
  grid-row: auto;
  grid-template-columns: 105px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid #e8edf3;
  text-align: left;
}
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded > td:not(:first-child)::before {
  content: attr(data-label);
  display: block;
  color: #8a97a7;
  font-size: 9px;
  font-weight: 600;
}
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded .voter-cell .avatar { display: grid; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded .source-row { display: block; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded .phone-editor,
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded .phone-line { align-items: flex-start; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded .ballot-box { display: none; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded .action-cell .attendance-options { justify-content: flex-start; }
.voter-panel[data-list-view="summary"] tbody tr.is-expanded + tr.voter-detail-row {
  display: block;
  margin: -2px 0 10px;
  padding: 0 12px 10px;
  border: 2px solid var(--navy);
  border-top: 0;
  border-radius: 0 0 11px 11px;
  background: #fff;
}
.voter-panel[data-list-view="summary"] tbody tr.is-expanded + tr.voter-detail-row > td {
  display: block !important;
  padding: 9px 0;
  border: 0;
  background: transparent;
}

@media (max-width: 700px) {
  .voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)),
  .voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-expanded { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td:first-child,
  .voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td.action-cell,
  .voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td.phone-data-cell { grid-column: 1; grid-row: auto; justify-content: flex-start; padding: 8px 0; text-align: left; }
  .voter-panel[data-list-view="summary"] .action-cell .attendance-options { justify-content: flex-start; flex-wrap: wrap; }
  .voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td.phone-data-cell { align-items: flex-start; }
  .voter-panel[data-list-view="summary"] .phone-line { align-items: flex-start; }
  .voter-panel[data-list-view="summary"] .phone-editor { align-items: flex-start; }
}
.representative-cell { min-width: 180px; color: #5f6f86; font-size: 10px; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }

/* Detaylı görünümde kapatılan kart: notlar/referanslar gizlenir, kart başlıkta kapanır */
.voter-panel[data-list-view="detailed"] tbody tr.is-collapsed + tr.voter-detail-row { display: none; }
.voter-panel[data-list-view="detailed"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-collapsed > td { border-bottom: 2px solid var(--navy); }
.voter-panel[data-list-view="detailed"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-collapsed > td:first-child { border-radius: 11px 0 0 11px; }
@media (max-width: 1400px) {
  .voter-panel[data-list-view="detailed"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-collapsed { margin-bottom: 12px; border-bottom: 2px solid var(--navy); border-radius: 11px; }
  .voter-panel[data-list-view="detailed"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-collapsed > td:not(:first-child) { display: none; }
  .voter-panel[data-list-view="detailed"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)).is-collapsed > td:first-child { border: 0; border-radius: 0; }
}

/* Özet görünüm sağ bölüm: solda Sandık No (2 satır), sağda Telefon / numara / Güncelle (3 satır) */
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)):not(.is-expanded) > td.phone-data-cell {
  display: grid !important;
  grid-template-columns: auto auto;
  grid-template-areas: "label ballot" "phone ballot" "update ballot";
  align-items: center;
  justify-content: start;
  text-align: left;
  column-gap: 12px;
  row-gap: 3px;
}
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)):not(.is-expanded) > td.phone-data-cell::before { grid-area: label; justify-self: start; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)):not(.is-expanded) .phone-editor,
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)):not(.is-expanded) .phone-line { display: contents; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)):not(.is-expanded) .ballot-box { display: flex; flex-direction: column; grid-area: ballot; align-self: center; justify-self: start; gap: 3px; text-align: left; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)):not(.is-expanded) .ballot-box-label { color: #8a97a7; font-size: 9px; font-weight: 600; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)):not(.is-expanded) .ballot-box-number { color: var(--blue); font-size: 13px; font-weight: 700; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)):not(.is-expanded) .phone-current { grid-area: phone; justify-self: start; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)):not(.is-expanded) .phone-edit { grid-area: update; justify-self: start; }
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td.representative-cell {
  display: block !important;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
}
.voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)):not(.is-expanded) > td.representative-cell::before { content: none; }
@media (max-width: 700px) {
  .voter-panel[data-list-view="summary"] tbody tr:not(.voter-detail-row):not(:has(.empty-state)) > td.representative-cell { grid-column: 1; grid-row: auto; padding: 8px 0; }
}

/* Pasta grafiğin solunda durum adetleri */
.chart-status-summary { display: grid; flex: 0 0 auto; align-content: center; gap: 8px; min-width: 150px; min-height: 176px; margin: 0; padding: 0; list-style: none; }
.chart-status-summary li { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 6px 0 6px 11px; border-left: 4px solid var(--status-color); }
.chart-status-summary span { color: color-mix(in srgb, var(--status-color) 70%, #2b2b2b); font-size: 12px; font-weight: 700; }
.chart-status-summary strong { color: color-mix(in srgb, var(--status-color) 70%, #2b2b2b); font: 800 20px Manrope, sans-serif; }

/* Takipçi kartlarında durum adetleri */
.voted-follower-card ul.follower-status-counts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 0 0 8px; color: inherit; }
.follower-status-counts li { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 2px 0 2px 7px; border-left: 3px solid var(--status-color); color: color-mix(in srgb, var(--status-color) 70%, #2b2b2b); font-size: 10px; font-weight: 700; }
.follower-status-counts strong { font: 800 12px Manrope, sans-serif; }
.follower-status-counts li.is-current { background: color-mix(in srgb, var(--status-color) 12%, transparent); border-radius: 0 4px 4px 0; }

/* Grafik ve durum sayıları sağdaki liste uzayıp sayfa kaydırılsa da görünür kalır */
.election-chart > .chart-status-summary,
.election-chart > .pie-chart { position: sticky; top: var(--chart-sticky-top, 100px); }
@media (max-width: 700px) {
  .election-chart > .chart-status-summary,
  .election-chart > .pie-chart { position: static; }
}

/* Ekip yapısı: takipçiye basınca seçmen ayrıntıları açılır */
.follower-details > summary { cursor: pointer; list-style: none; }
.follower-details > summary::-webkit-details-marker { display: none; }
.follower-details > summary:hover { background: #f8fafd; }
.follower-chevron { margin-left: 4px; color: #9aa5b4; font-size: 15px; transition: transform .15s; }
.follower-details[open] .follower-chevron { transform: rotate(90deg); }
.follower-detail-body { margin: 0 0 10px 54px; padding: 10px 12px; border: 1px solid #edf0f4; border-radius: 8px; background: #fbfcfe; }
.follower-voter-list { display: grid; gap: 2px; margin: 0 0 8px; padding: 0; list-style: none; }
.follower-voter-list li { display: grid; grid-template-columns: minmax(0, 1fr) 110px 90px; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid #f0f2f5; font-size: 10px; }
.follower-voter-name { min-width: 0; color: #34465f; font-weight: 600; overflow-wrap: anywhere; }
.follower-voter-phone { color: #687991; }
.follower-voter-status { justify-self: start; padding: 3px 9px; border-radius: 999px; color: color-mix(in srgb, var(--status-color) 70%, #2b2b2b); background: color-mix(in srgb, var(--status-color) 22%, #fff); font-size: 9px; font-weight: 700; }
.follower-detail-link { color: var(--blue-dark); font-size: 10px; font-weight: 700; }
@media (max-width: 700px) {
  .follower-detail-body { margin-left: 16px; }
  .follower-voter-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .follower-voter-phone { grid-column: 1; }
}

/* Grafik kırılımında takipçi adı, takipçinin seçmen listesine gider */
.voted-follower-link { color: inherit; text-decoration: none; }
.voted-follower-link:hover { color: var(--blue-dark); text-decoration: underline; }
.voted-follower-link::after { content: ' ›'; color: #9aa5b4; }
