: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; }
.voted-voter-link { color: inherit; text-decoration: none; }
.voted-voter-link:hover { color: var(--blue-dark); text-decoration: underline; }

/* Ekip yapısı: aday adını düzenleme */
.candidate-edit { margin-top: 4px; }
.candidate-edit > summary { display: inline-block; color: var(--blue-dark); cursor: pointer; font-size: 9px; font-weight: 700; list-style: none; }
.candidate-edit > summary::-webkit-details-marker { display: none; }
.candidate-edit > summary:hover { text-decoration: underline; }
.candidate-edit-form { display: flex; align-items: center; gap: 6px; margin: 6px 0 4px; }
.candidate-edit-form input { width: min(240px, 100%); min-width: 0; height: 34px; padding: 0 9px; font-size: 11px; }
.candidate-edit-form .button { min-height: 34px; padding: 0 11px; font-size: 10px; }

/* Sol menü: Seçmenler altındaki "Takipteki seçmenler" */
.nav-item-sub { margin-left: 14px; padding-top: 8px; padding-bottom: 8px; font-size: 11px; }
@media (max-width: 700px) {
  .nav-item-sub { margin-left: 0; }
}

/* Aday ekle, Takipçi ekle ve Yeni seçmen ekle tek satırda */
.admin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1300px) {
  .admin-grid .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 1050px) {
  .admin-grid { grid-template-columns: 1fr; }
}

/* Takipteki seçmen kartı: tıklanınca takipteki seçmenler listesi açılır */
.stat-card-link { color: inherit; text-decoration: none; }
.stat-card-link:hover { border-color: #c9daf3; box-shadow: 0 6px 18px #263b5810; }

/* Oy tahmini rengi: ok ile firma adı arasındaki daire ve renk menüsü */
.prediction-picker { position: relative; flex: 0 0 auto; }
.prediction-dot { display: block; width: 22px; height: 22px; border: 2px solid color-mix(in srgb, var(--prediction-color) 70%, #4b5563); border-radius: 50%; background: var(--prediction-color); cursor: pointer; list-style: none; }
.prediction-dot::-webkit-details-marker { display: none; }
.prediction-dot.is-empty { border: 2px dashed #b8c2cf; background: #fff; }
.prediction-dot[data-color="beyaz"] { border-color: #8a97a7; }
.prediction-dot:hover { box-shadow: 0 0 0 3px #659de133; }
.prediction-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; display: grid; grid-template-columns: repeat(4, 26px); gap: 8px; padding: 10px; border: 1px solid #e3e9f1; border-radius: 10px; background: #fff; box-shadow: 0 10px 28px #1e2f4a24; }
.prediction-swatch { width: 26px; height: 26px; padding: 0; border: 2px solid color-mix(in srgb, var(--prediction-color) 70%, #4b5563); border-radius: 50%; background: var(--prediction-color); cursor: pointer; }
.prediction-swatch[value="beyaz"] { border-color: #8a97a7; }
.prediction-swatch:hover { transform: scale(1.12); }
.prediction-swatch.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); }
.prediction-clear { grid-column: 1 / -1; min-height: 26px; padding: 0; border: 0; color: var(--blue-dark); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.prediction-clear:hover { text-decoration: underline; }

/* Sol menü: daha sık satır aralığı */
.side-label { padding: 6px 12px 4px; }
.nav-item { padding: 7px 12px; }
.nav-item-sub { padding-top: 5px; padding-bottom: 5px; }
.nav-tree { margin-top: 0; }
.nav-tree-content { padding-top: 0; }
.nav-candidate > summary { padding-top: 5px; padding-bottom: 5px; }
.nav-subitem { min-height: 26px; padding-top: 4px; padding-bottom: 4px; }

/* Kullanıcılar sayfası arama kutusu */
.users-panel .panel-heading { gap: 12px; }
.user-search { width: min(280px, 100%); }
.users-search-empty { margin: 10px 0 0; color: #8a97a7; font-size: 11px; }
.users-panel tbody tr[hidden] { display: none !important; }
@media (max-width: 700px) {
  .users-panel .panel-heading { flex-wrap: wrap; }
  .user-search { width: 100%; }
}

/* Seçmen listesinin üstünde oy tahmini renk dağılımı */
.prediction-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; padding: 11px 16px; border: 1px solid #e9edf2; border-radius: 11px; background: #fff; }
.prediction-summary-title { margin-right: 4px; color: #8a97a7; font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.prediction-chip { display: inline-flex; align-items: center; gap: 6px; color: #4a5c74; font-size: 11px; white-space: nowrap; }
.prediction-chip strong { color: var(--navy); font-size: 13px; }
.prediction-chip-dot { width: 14px; height: 14px; border: 2px solid color-mix(in srgb, var(--prediction-color) 70%, #4b5563); border-radius: 50%; background: var(--prediction-color); }
.prediction-chip[data-color="beyaz"] .prediction-chip-dot { border-color: #8a97a7; }
.prediction-chip.is-unset .prediction-chip-dot { border: 2px dashed #b8c2cf; background: #fff; }
.prediction-chip.is-zero { opacity: .45; }
a.prediction-chip { padding: 4px 8px; border-radius: 999px; text-decoration: none; }
a.prediction-chip:hover { background: #f1f5fb; }
a.prediction-chip.is-active { background: color-mix(in srgb, var(--prediction-color, #c9d3df) 22%, #fff); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--prediction-color, #b8c2cf) 75%, #4b5563); opacity: 1; }
a.prediction-chip.is-unset.is-active { background: #f4f6f9; box-shadow: inset 0 0 0 2px #b8c2cf; }
.prediction-clear-filter { margin-left: auto; color: var(--blue-dark); font-size: 11px; font-weight: 700; text-decoration: none; }
.prediction-clear-filter:hover { text-decoration: underline; }
/* Oy tahmini satırının sonundaki "Tümünü göster": rengarenk daire */
a.prediction-chip.is-all { margin-left: auto; }
.prediction-chip.is-all .prediction-chip-dot { border: 2px solid #fff; background: conic-gradient(#e53935, #f57c00, #f5c518, #2e9e5b, #1fbfb8, #3b82f6, #9aa5b1, #e53935); box-shadow: 0 0 0 1px #c3ccd8; }
a.prediction-chip.is-all.is-active { background: #eef3fb; box-shadow: inset 0 0 0 2px #9fb6d8; }
/* "Bekleniyor" yazısı Geldi ile aynı mavi; çizgi ve dilim açık gri */
.chart-status-summary li[data-status="bekleniyor"] span,
.chart-status-summary li[data-status="bekleniyor"] strong { color: color-mix(in srgb, #659de1 70%, #2b2b2b); }
.chart-status-summary li[data-status="bekleniyor"] { border-left-color: #cfd5de; }

/* Grafik açıklaması: renkli nokta yok; her durumda oy tahmini renk adetleri */
.chart-legend .legend-row { grid-template-columns: 1fr auto 40px; padding-left: 10px; }
.chart-legend .legend-dot { display: none; }
.legend-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.legend-predictions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
.legend-prediction { display: inline-flex; align-items: center; gap: 4px; }
.legend-prediction[hidden] { display: none; }
.legend-prediction strong { color: #4a5c74; font: 700 10px Manrope, sans-serif; }
.legend-prediction-dot { width: 10px; height: 10px; border: 1.5px solid color-mix(in srgb, var(--prediction-color) 70%, #4b5563); border-radius: 50%; background: var(--prediction-color); }
.legend-prediction[data-color="beyaz"] .legend-prediction-dot { border-color: #8a97a7; }
.legend-prediction.is-unset .legend-prediction-dot { border: 1.5px dashed #b8c2cf; background: #fff; }

/* Grafik solu: Geldi altında gelenlerin oy tahmini renkleri */
.chart-status-summary li { flex-wrap: wrap; }
.chart-status-summary .summary-colors { display: flex; flex: 0 0 100%; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; }
.chart-status-summary .summary-colors .legend-prediction,
.chart-status-summary .summary-colors .legend-prediction span { color: #4a5c74; font-size: 10px; font-weight: 600; }
.chart-status-summary .summary-colors .legend-prediction strong { color: var(--navy); font: 700 11px Manrope, sans-serif; }
.chart-status-summary .summary-colors .legend-prediction-dot { width: 10px; height: 10px; }

/* Sandık sandık grafikler */
.box-charts-toolbar { display: flex; justify-content: flex-start; margin-top: 14px; }
.box-charts-toggle { min-height: 34px; padding: 0 14px; border: 1px solid #d5e1f2; color: var(--blue-dark); background: #f4f8fd; font-size: 11px; font-weight: 700; }
.box-charts-toggle:hover { background: var(--blue-soft); }
.box-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 4px 0 18px; }
.box-charts[hidden] { display: none; }
.box-chart { padding: 14px 16px 16px; border: 1px solid #e9edf2; border-radius: 11px; background: #fbfcfe; }
.box-chart h3 { margin: 0 0 10px; color: var(--navy); font: 800 14px Manrope, sans-serif; text-align: center; }
.box-chart-body { display: flex; align-items: center; justify-content: center; gap: 18px; }
.box-chart .box-summary { min-width: 110px; min-height: 0; gap: 6px; }
.box-chart .box-summary li { padding: 4px 0 4px 9px; }
.box-chart .box-summary > li > span { font-size: 11px; }
.box-chart .box-summary > li > strong { font-size: 16px; }
.box-pie { width: 130px; height: 130px; }
.box-pie .pie-hole { width: 76px; height: 76px; }
.box-pie .pie-hole strong { font-size: 18px; }
@media (max-width: 1200px) {
  .box-charts { grid-template-columns: 1fr; }
}

/* Sol menü: Adaylar başta kapalı, tıklayınca açılır */
.nav-tree > summary { cursor: pointer; list-style: none; }
.nav-tree > summary::-webkit-details-marker { display: none; }
.nav-tree-toggle .nav-chevron { margin-left: auto; color: #9aa5b4; font-size: 17px; transition: transform .15s; }
.nav-tree[open] > .nav-tree-toggle .nav-chevron { transform: rotate(90deg); }
@media (max-width: 700px) {
  .nav-tree-toggle .nav-chevron { margin-left: 0; }
}

/* Sol üst: Berkay Bahar bloğu (sitenin mavisi, beyaz kalın dar yazı) */
.brand-lockup { display: block; padding: 2px 4px 22px; }
.brand-badge { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px 11px; border-radius: 8px; color: #fff; background: var(--blue); font-family: Anton, Impact, 'Arial Narrow', sans-serif; font-weight: 400; line-height: 1.05; text-align: center; text-transform: uppercase; }
.brand-badge-name { font-size: 30px; letter-spacing: .5px; }
.brand-badge-title { font-size: 14px; letter-spacing: .6px; }
.brand-badge-sub { font-size: 11.5px; letter-spacing: .9px; opacity: .92; }
@media (max-width: 700px) {
  .brand-lockup { flex: 1 0 100%; padding: 0; }
  .brand-badge { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 10px; }
  .brand-badge-name { font-size: 22px; }
  .auth-card:has(.login-brand) > .login-brand { white-space: normal; }
}

/* Üst bar: bildirim çanı (adın solunda) */
.topbar-user-row { display: flex; align-items: center; gap: 12px; }
.notification-bell { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid #e3e9f1; border-radius: 50%; color: #5d6f88; background: #fff; text-decoration: none; }
.notification-bell:hover, .notification-bell.is-active { color: var(--blue-dark); background: var(--blue-soft); }
.notification-badge { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid #f5f7fb; border-radius: 999px; color: #fff; background: #e53935; font: 700 10px/14px Manrope, sans-serif; text-align: center; }
.notification-badge[hidden] { display: none; }

/* Bildirimler sayfası */
.notifications-panel { padding: 17px 18px 18px; }
.notification-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.notification-item { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid #e9edf2; border-radius: 10px; background: #fff; }
.notification-item.is-new { border-color: #b9d0f0; background: #f4f8fd; }
.notification-ballot { display: grid; justify-items: center; padding: 6px 0; border-right: 1px solid #e9edf2; }
.notification-ballot small { color: #8a97a7; font-size: 9px; font-weight: 600; }
.notification-ballot strong { color: var(--blue); font: 800 18px Manrope, sans-serif; }
.notification-name { color: var(--navy); font-size: 13px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
a.notification-name:hover { color: var(--blue-dark); text-decoration: underline; }
.notification-representative { margin: 4px 0 0; color: #5f6f86; font-size: 11px; line-height: 1.5; }
.notification-meta { display: grid; justify-items: end; gap: 3px; color: #7b8796; font-size: 10px; white-space: nowrap; }
.notification-status { padding: 2px 9px; border-radius: 999px; color: #fff; background: var(--blue); font-size: 10px; font-weight: 700; }
.notification-new { color: #e53935; font-size: 10px; font-weight: 800; }
@media (max-width: 700px) {
  .notification-item { grid-template-columns: 70px minmax(0, 1fr); }
  .notification-meta { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; gap: 8px; }
}

/* Gol bildirimi: sağ altta beliren uyarı */
.goal-toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: min(360px, calc(100vw - 40px)); padding: 13px 16px; border-radius: 12px; color: #fff; background: var(--navy); box-shadow: 0 14px 36px #10203a40; font-size: 13px; font-weight: 700; text-decoration: none; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .25s, transform .25s; }
.goal-toast.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* Giriş: Beni hatırla */
.auth-card .remember-me { display: flex; flex-direction: row; align-items: center; gap: 9px; color: #9195a4; font-size: 13px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.auth-card .remember-me input { width: 18px; height: 18px; margin: 0; accent-color: #659de1; }
.auth-card .remember-me small { color: #6f7385; font-size: 11px; }

/* Çanın yanındaki hoparlör: ses hazır / tarayıcı engelliyor / kullanıcı kapattı */
.sound-toggle { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #e3e9f1; border-radius: 50%; color: #5d6f88; background: #fff; cursor: pointer; }
.sound-toggle:hover { color: var(--blue-dark); background: var(--blue-soft); }
.sound-toggle .sound-off { display: none; }
.sound-toggle[data-state="blocked"], .sound-toggle[data-state="muted"] { color: #9aa5b4; }
.sound-toggle[data-state="blocked"] { border-color: #f5c69a; color: #c56a14; background: #fff7ef; }
.sound-toggle[data-state="blocked"] .sound-on, .sound-toggle[data-state="muted"] .sound-on { display: none; }
.sound-toggle[data-state="blocked"] .sound-off, .sound-toggle[data-state="muted"] .sound-off { display: block; }
.sound-toggle[data-state="blocked"]::after { position: absolute; top: 1px; right: 1px; width: 9px; height: 9px; border: 2px solid #f5f7fb; border-radius: 50%; background: #f08a24; content: ''; animation: sound-pulse 1.6s ease-in-out infinite; }
@keyframes sound-pulse { 50% { opacity: .35; } }

/* Bildirimler sayfası: bu cihazda anlık bildirim */
.notifications-panel .panel-heading { flex-wrap: wrap; gap: 12px; }
.push-control { display: grid; justify-items: end; gap: 4px; max-width: 360px; }
.push-toggle { min-height: 36px; padding: 0 14px; border: 1px solid #d5e1f2; color: var(--blue-dark); background: #f4f8fd; font-size: 12px; font-weight: 700; }
.push-toggle.is-on { color: #5d6f88; background: #fff; }
.push-toggle:disabled { opacity: .6; cursor: default; }
.push-status { color: #7b8796; font-size: 10px; line-height: 1.45; text-align: right; }
@media (max-width: 700px) {
  .push-control { justify-items: start; max-width: none; }
  .push-status { text-align: left; }
}
.push-toggle[hidden] { display: none; }

/* Durum işaretleme yetkisi olmayan takipçiler */
.attendance-option:disabled[title] { cursor: not-allowed; opacity: .55; }
.attendance-locked { display: block; margin-top: 4px; color: #a2520c; font-size: 10px; font-weight: 600; }

/* Kullanıcı işlemleri: takım lideri */
.team-leader-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; color: #fff; background: var(--blue); font-size: 10px; font-weight: 700; vertical-align: middle; }
.team-leader-form { margin-top: 6px; }
.team-leader-form label { display: inline-flex; align-items: center; gap: 7px; color: #4a5c74; font-size: 11px; font-weight: 600; cursor: pointer; }
.team-leader-form input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }

/* Seçmen araması büyük harfle yazılır (placeholder normal kalır) */
.search-form input[name="q"] { text-transform: uppercase; }
.search-form input[name="q"]::placeholder { text-transform: none; }

/* İlk girişte "Gol bildirim sesi" izin penceresi */
.sound-consent { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: #0f1a2c80; }
.sound-consent-card { width: min(420px, 100%); padding: 26px 24px 22px; border-radius: 16px; background: #fff; box-shadow: 0 24px 60px #0f1a2c55; text-align: center; }
.sound-consent-icon { font-size: 42px; line-height: 1; }
.sound-consent-card h2 { margin: 10px 0 8px; color: var(--navy); font: 800 20px Manrope, sans-serif; }
.sound-consent-card p { margin: 0 0 18px; color: #5f6f86; font-size: 13px; line-height: 1.55; }
.sound-consent-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.sound-consent-actions .button { min-height: 42px; padding: 0 18px; font-size: 13px; }
.sound-consent-later { border: 1px solid #dfe5ee; color: #5d6f88; background: #fff; }

/* Görüntüleme: değiştirme tuşları soluk ve basılamaz, grafik ayrıntısı kapalı */
.view-only-tag { display: inline-block; margin: 0 0 4px; padding: 3px 10px; border-radius: 999px; color: #5d4a0c; background: #fff3cc; font-size: 11px; font-weight: 700; }
.view-only-badge { background: #8a97a7; }
.is-view-only .attendance-option,
.is-view-only .phone-edit > summary,
.is-view-only .notes-edit > summary,
.is-view-only .reference-add > summary,
.is-view-only .reference-edit > summary,
.is-view-only .reference-delete,
.is-view-only .prediction-dot,
.is-view-only .candidate-picker,
.is-view-only .follower-picker,
.is-view-only .bulk-save-button,
.is-view-only .chart-drilldown-toggle { pointer-events: none; opacity: .55; }
.is-view-only .prediction-dot { opacity: 1; }
.is-view-only [data-voted-drilldown] { display: none !important; }

/* Aday adının altındaki takım liderleri (yan menü ve Sandık katılımı ayrıntısı) */
.nav-candidate-text { display: flex; flex-direction: column; min-width: 0; }
.nav-team-leaders { overflow: hidden; color: #c58a14; font-size: 8.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.chart-team-leaders { display: block; color: #c58a14; font-size: 8.5px; font-weight: 700; }

/* Aday hesabında diğer adaylar menüde açılmaz; yalnızca adı ve seçmen sayısı görünür */
.nav-candidate-locked { display: flex; align-items: center; gap: 5px; padding: 8px 17px 8px 10px; color: #8a97a8; font-size: 10px; line-height: 1.35; cursor: default; }

/* Kullanıcı işlemleri: geçici yönetici */
.temp-admin-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.temp-admin-form select { height: 26px; padding: 0 6px; border: 1px solid #d9e1ec; border-radius: 6px; color: #4a5c74; background: #fff; font-size: 11px; }
.temp-admin-button { height: 26px; padding: 0 10px; border: 1px solid var(--blue); border-radius: 6px; color: var(--blue-dark); background: var(--blue-soft); font-size: 11px; font-weight: 700; cursor: pointer; }
.temp-admin-badge { margin-left: 0; background: #e08a1e; }

/* Gol kutusu: firma adı, temsil bilgisi, sandık numarası alt alta */
.goal-toast { display: flex; flex-direction: column; gap: 5px; max-width: min(420px, calc(100vw - 40px)); }
.goal-toast-title { font-size: 14px; font-weight: 800; }
.goal-toast-name { font-size: 13px; font-weight: 800; }
.goal-toast-representative { display: -webkit-box; overflow: hidden; color: #d7e2f3; font-size: 11.5px; font-weight: 500; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.goal-toast-ballot { color: #9cc3ff; font-size: 13px; font-weight: 800; }

/* Gol kutuları üst üste: en son gelen en altta */
.goal-toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; max-height: calc(100vh - 40px); overflow: hidden; pointer-events: none; }
.goal-toast-stack .goal-toast { position: static; }

/* Gol kutusu: tarayıcı sesi engellediğinde gösterilen not */
.goal-toast-muted { margin-top: 3px; padding: 6px 8px; border-radius: 8px; color: #10203a; background: #ffd27a; font-size: 11.5px; font-weight: 700; line-height: 1.35; }

/* Okunmamış bildirim varken zil yanar: kırmızı zil, yanıp sönen halka, ara ara sallanma */
.notification-bell.has-unread { border-color: #f3b2ab; color: #fff; background: #e5483b; box-shadow: 0 0 0 0 #e5483b80; animation: bell-glow 1.6s ease-out infinite; }
.notification-bell.has-unread svg { animation: bell-shake 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
.notification-bell.has-unread .notification-badge { color: #e5483b; background: #fff; box-shadow: 0 0 0 2px #e5483b; }
@keyframes bell-glow { 0% { box-shadow: 0 0 0 0 #e5483b80; } 70% { box-shadow: 0 0 0 10px #e5483b00; } 100% { box-shadow: 0 0 0 0 #e5483b00; } }
@keyframes bell-shake { 0%, 60%, 100% { transform: rotate(0); } 64% { transform: rotate(14deg); } 70% { transform: rotate(-12deg); } 76% { transform: rotate(8deg); } 82% { transform: rotate(-5deg); } }
@media (prefers-reduced-motion: reduce) { .notification-bell.has-unread, .notification-bell.has-unread svg { animation: none; } }

/* Gol kutusunun en altında "Geldi"ye basan kişinin adı */
.goal-toast-marker { padding-top: 5px; border-top: 1px solid #ffffff2e; color: #c9d6ea; font-size: 11.5px; font-weight: 600; }

/* Kullanıcı işlemleri: pasif kullanıcı */
tr.is-passive > td { opacity: .55; }
tr.is-passive > td:first-child { opacity: 1; }
.passive-badge { background: #8a97a8; }

/* Göstergeler: çok sayıda renk dolunca renk listeleri kutunun içinde alt satıra geçer, grafikleri itmez */
.election-chart > .chart-status-summary { flex: 0 1 280px; min-width: 150px; }
.election-chart > .chart-legend { flex: 1 1 360px; min-width: 0; }
.chart-status-summary .summary-colors { min-width: 0; }
.box-chart-body { min-width: 0; }
.box-chart-body { flex-wrap: wrap; }
.box-chart .box-summary { flex: 1 1 160px; min-width: 160px; }
.box-chart .box-summary > li > span, .box-chart .box-summary > li > strong { white-space: nowrap; }
.box-chart .box-pie { flex: 0 0 auto; }
.box-chart .summary-colors { gap: 3px 8px; }
.chart-legend .legend-row { min-width: 0; }
.chart-legend .legend-label { min-width: 0; }

/* Her sandık kutusunun altındaki Bekleniyor / Geldi satırları */
.box-legend { margin-top: 14px; border: 1px solid #e3e8ef; border-radius: 9px; background: #fff; overflow: hidden; }
.box-legend-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; align-items: center; gap: 8px; min-height: 34px; padding: 6px 10px; }
.box-legend-row + .box-legend-row { border-top: 1px solid #eef1f5; }
.box-legend-row .legend-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; color: #65758a; font-size: 10.5px; }
.box-legend-row > strong { color: #364a65; font: 800 12px Manrope, sans-serif; }
.box-legend-row > small { color: #98a3b1; font-size: 9px; text-align: right; }

/* Sandık altındaki satırlar tıklanır; ayrıntı satırların hemen altında açılır */
button.box-legend-row { width: 100%; border: 0; background: #fff; font: inherit; text-align: left; cursor: pointer; }
button.box-legend-row:hover, button.box-legend-row[aria-expanded="true"] { background: #f4f8ff; }
button.box-legend-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.box-drilldown { padding: 10px 0 2px; border-bottom: 0; }
.box-drilldown .voted-follower-results { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
/* Aday düğmeleri: ad sığmazsa harf harf bölünmez, düğmeler alt satıra geçer */
.voted-candidate-list { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.voted-candidate-button { display: grid; gap: 3px; align-content: center; overflow-wrap: break-word; }
.voted-candidate-button small { color: #7b8aa0; font-size: 8.5px; }
.box-charts { align-items: start; }
.box-chart .voted-follower-card h3 { margin: 0 0 6px; color: #34465f; font: 700 10px Manrope, sans-serif; text-align: left; }

/* Sandık ayrıntısı: aday adının altında renk adetleri; seçmen adlarının yanında renk dairesi */
.box-drilldown .voted-candidate-list { align-items: start; }
.box-candidate-item { display: grid; gap: 4px; min-width: 0; }
.box-candidate-colors { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.box-color-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px; border: 1px solid #e3e8ef; border-radius: 999px; color: #4a5c74; background: #fff; font: 700 9px Manrope, sans-serif; }
button.box-color-chip { cursor: pointer; }
button.box-color-chip:hover, button.box-color-chip[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); }
.box-color-dot, .voter-color-dot { flex: 0 0 auto; width: 9px; height: 9px; border: 1.5px solid color-mix(in srgb, var(--prediction-color, #fff) 70%, #4b5563); border-radius: 50%; background: var(--prediction-color, #fff); }
.box-color-chip.is-white .box-color-dot, .voter-color-dot.is-white { border-color: #8a97a7; }
.box-color-chip.is-unset .box-color-dot, .voter-color-dot.is-unset { border: 1.5px dashed #b8c2cf; background: #fff; }
.box-drilldown .voted-follower-card ul:not(.follower-status-counts) li { display: flex; align-items: flex-start; gap: 5px; }
.box-drilldown .voter-color-dot { margin-top: 2px; }

/* Gerçekleşen sonuçlar: sandık kutusunun başlığının altında ve sandıkların altında toplam */
.actual-results-toggle { min-height: 34px; padding: 0 14px; border: 1px solid #d9cdb5; color: #8a5a00; background: #fff8ea; font-size: 11px; font-weight: 700; }
.actual-results-toggle:hover { background: #fff1d4; }
.actual-results-toggle[aria-pressed="true"] { border-color: #e0a43a; color: #fff; background: #e09a2a; }
.actual-results { margin: 0 0 12px; padding: 10px 12px 9px; border: 1px solid #f0dcb4; border-radius: 9px; background: #fffaf0; }
.actual-results[hidden] { display: none; }
.actual-results h4 { margin: 0 0 8px; color: #8a5a00; font: 800 11px Manrope, sans-serif; letter-spacing: .02em; text-transform: uppercase; }
.actual-results ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.actual-results li { display: grid; grid-template-columns: 58px minmax(0, 1fr) 32px 42px; align-items: center; gap: 8px; }
.actual-label { color: #34465f; font-size: 11px; font-weight: 700; }
.actual-bar { height: 10px; overflow: hidden; border-radius: 999px; background: #efe7d6; }
.actual-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--list-color); }
.actual-results li.is-white .actual-bar > span { background: #fff; box-shadow: inset 0 0 0 1px #9aa5b1; }
.actual-results li > strong { color: var(--navy); font: 800 13px Manrope, sans-serif; text-align: right; }
.actual-results li > small { color: #8a97a8; font-size: 10px; text-align: right; }
.actual-results li.is-leader .actual-label::after { content: ' ★'; color: #e09a2a; }
.actual-results li.is-leader > strong { color: var(--list-color); }
.actual-totals { margin: 8px 0 0; color: #65758a; font-size: 10.5px; }
.actual-totals strong { color: var(--navy); }
.box-charts + .actual-results { margin: 0 0 18px; }
.box-charts + .actual-results ul { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 24px; }

/* Seçmen listesi: renk seçiliyken o rengin sandıklara göre adetleri */
.prediction-box-breakdown { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: -6px 0 14px; padding: 11px 18px; border: 1px solid color-mix(in srgb, var(--prediction-color) 35%, #e3e8ef); border-radius: 12px; background: color-mix(in srgb, var(--prediction-color) 7%, #fff); }
.prediction-box-breakdown[data-color="beyaz"], .prediction-box-breakdown[data-color="none"] { border-color: #e3e8ef; background: #fff; }
.prediction-box-title { display: inline-flex; align-items: center; gap: 7px; color: #34465f; font-size: 12px; font-weight: 800; }
.prediction-box-title .prediction-chip-dot { width: 12px; height: 12px; border: 1.5px solid color-mix(in srgb, var(--prediction-color) 70%, #4b5563); border-radius: 50%; background: var(--prediction-color); }
.prediction-box-item { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 11px; border: 1px solid #e3e8ef; border-radius: 999px; background: #fff; }
.prediction-box-item > span { color: #65758a; font-size: 11px; font-weight: 600; }
.prediction-box-item > strong { color: var(--navy); font: 800 14px Manrope, sans-serif; }
.prediction-box-item > small { color: #8a97a8; font-size: 10px; }
.prediction-box-item.is-total { border-color: #c9d6ea; background: #f4f8fd; }

a.prediction-box-item { text-decoration: none; cursor: pointer; }
a.prediction-box-item:hover { border-color: color-mix(in srgb, var(--prediction-color) 55%, #c9d6ea); }
a.prediction-box-item.is-active { border-color: color-mix(in srgb, var(--prediction-color) 75%, #34465f); box-shadow: 0 0 0 2px color-mix(in srgb, var(--prediction-color) 30%, transparent); }

/* Gol kutusu sağa itilerek kapatılabilir (dikey kaydırma sayfada kalır) */
.goal-toast { touch-action: pan-y; user-select: none; -webkit-user-drag: none; cursor: grab; }
.goal-toast:active { cursor: grabbing; }
