:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #20242c;
  --muted: #677181;
  --line: #d9dee7;
  --brand: #0d6b61;
  --brand-2: #8a4b10;
  --warn: #9b2f21;
  --ok: #17633a;
  --shadow: 0 16px 40px rgba(30, 39, 52, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 4vw, 40px);
  background: #0f2f35;
  color: #fff;
}

.topbar-actions {
  display: inline-flex;
  align-items: end;
  gap: 10px;
}

.assembly-picker {
  min-width: 180px;
}

.assembly-picker span {
  color: #a9c9c6;
  font-size: 12px;
  font-weight: 800;
}

.assembly-picker select {
  min-height: 42px;
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.1);
  color: #fff;
}

.assembly-picker option {
  color: #20242c;
}

.eyebrow {
  margin: 0 0 4px;
  color: #a9c9c6;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
}

h2 {
  font-size: 18px;
}

main {
  width: min(1880px, 100%);
  margin: 0 auto;
  padding: 18px clamp(10px, 2vw, 24px) 36px;
}

.icon-button,
.close-button,
.topbar-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: inherit;
  cursor: pointer;
}

.topbar-button {
  width: auto;
  min-width: 118px;
  padding: 0 14px;
  font-weight: 800;
}

.logout-icon-button {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-grid article,
.priority-panel,
.worker-panel,
.booth-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary-grid article {
  min-height: 92px;
  padding: 16px;
  display: grid;
  align-content: space-between;
}

.summary-grid span,
label span,
.panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.summary-grid strong {
  font-size: 30px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 190px 190px 140px 140px 140px;
  gap: 12px;
  margin: 16px 0;
}

label {
  display: grid;
  gap: 6px;
}

label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.content-shell {
  display: grid;
  grid-template-columns: 210px minmax(1180px, 1fr);
  gap: 12px;
  align-items: start;
}

.priority-panel,
.worker-panel,
.booth-panel {
  padding: 16px;
}

.block-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.block-row,
.worker-card,
.booth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.block-row,
.worker-card {
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.block-row strong,
.worker-card strong {
  display: block;
  font-size: 14px;
}

.block-row span,
.worker-card span,
.worker-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.population-window-head {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.population-window-head span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.population-row {
  display: grid;
  gap: 1px;
  padding: 8px 10px;
}

.population-row strong {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 13px;
  line-height: 1.2;
}

.row-number {
  min-width: 16px;
  margin-right: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.population-row span {
  color: #1f6b4a;
  font-size: 12px;
  font-weight: 700;
}

.population-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.worker-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.mini-stats b {
  color: var(--text);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head.compact {
  margin-bottom: 10px;
}

.booth-list {
  display: grid;
  gap: 12px;
}

.booth-card,
.booth-main,
.panchayat-card {
  width: 100%;
  text-align: left;
}

.booth-card,
.panchayat-card {
  padding: 0;
  overflow: hidden;
}

.panchayat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.panchayat-head {
  padding: 13px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.panchayat-head h3 {
  margin: 0;
  font-size: 18px;
}

.polling-place-head {
  display: grid;
  gap: 9px;
}

.polling-place-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.polling-place-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panchayat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  min-height: 0;
}

.panchayat-two-column {
  display: grid;
  grid-template-columns: minmax(290px, .65fr) minmax(760px, 1.65fr);
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  background: #fbfcfd;
}

.polling-place-list,
.panchayat-fixed-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  align-self: start;
}

.panchayat-grid {
  overflow: hidden;
}

.polling-place-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  cursor: pointer;
}

.polling-place-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.polling-place-line:hover,
.polling-place-line:focus-visible {
  background: #f7fafb;
  outline: none;
}

.polling-place-line-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.polling-place-line-copy strong,
.polling-place-line-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.polling-place-line-copy strong {
  font-size: 13px;
}

.polling-place-line-copy span {
  color: var(--muted);
  font-size: 12px;
}

.booth-mini-list {
  display: grid;
  gap: 2px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
}

.polling-place-line-copy .booth-mini-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.booth-mini-list b {
  color: #344151;
  font-weight: 700;
}

.booth-address-line {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  padding: 7px 8px;
  background: #fbfcfd;
  cursor: pointer;
}

.booth-address-line:hover,
.booth-address-line:focus-visible {
  background: #f5f8fa;
  outline: none;
}

.booth-address-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.booth-address-copy strong {
  font-size: 14px;
}

.booth-address-copy span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booth-main {
  border: 0;
  background: transparent;
  padding: 11px 13px;
  cursor: pointer;
}

.booth-main:focus-visible {
  outline: 2px solid #a9c9c6;
  outline-offset: -2px;
}

.booth-row-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.25fr) repeat(4, minmax(170px, .7fr));
  align-items: start;
  gap: 14px;
}

.booth-info-column {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.booth-card h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.booth-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.booth-address-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 0;
}

.booth-address-row p {
  flex: 0 1 auto;
  min-width: 0;
}

.inline-map-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
}

.icon-link {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  background: #fff;
  text-decoration: none;
}

.icon-link:hover,
.icon-link:focus-visible {
  border-color: #a9c9c6;
  background: #eef7f5;
  outline: none;
}

.icon-link.whatsapp-link {
  color: #147d45;
}

.icon-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-link::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 4;
  min-width: max-content;
  max-width: 180px;
  border-radius: 6px;
  padding: 6px 8px;
  background: #1f2933;
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .14s ease, transform .14s ease;
}

.icon-link:hover::after,
.icon-link:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef2f5;
  color: #344151;
  font-size: 12px;
  font-weight: 700;
}

.pill.warn {
  background: #fae9e5;
  color: var(--warn);
}

.pill.ok {
  background: #e5f4eb;
  color: var(--ok);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #a9c9c6;
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--brand);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.detail-actions a:last-child {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.worker-strip {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 10px 13px;
  background: #fbfcfd;
}

.compact-workers {
  display: grid;
  gap: 4px;
}

.compact-scroll-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: #aeb8c4 transparent;
}

.compact-scroll-list::-webkit-scrollbar {
  width: 3px;
}

.compact-scroll-list::-webkit-scrollbar-track {
  background: transparent;
}

.compact-scroll-list::-webkit-scrollbar-thumb {
  background: #aeb8c4;
  border-radius: 999px;
}

.compact-worker-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 3px;
}

.compact-worker-line.has-number {
  grid-template-columns: auto minmax(0, 1fr);
}

.public-simple-line {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
}

.public-simple-line .pill {
  padding: 4px 8px;
  font-size: 11px;
}

.worker-list-number {
  color: #94a1ae;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  min-width: 11px;
  text-align: right;
}

.compact-worker-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.compact-worker-text strong,
.compact-worker-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-name-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
}

.compact-name-row strong {
  min-width: 0;
}

.workers-column:first-child .compact-worker-text small {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.compact-worker-text .issue-note,
.compact-worker-text .issue-subline,
.worker-copy .issue-note {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
}

.compact-worker-text strong {
  font-size: 12px;
}

.compact-worker-text small {
  color: var(--muted);
  font-size: 11px;
}

.compact-actions .icon-link {
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.compact-actions .icon-link svg {
  width: 13px;
  height: 13px;
}

.column-label-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fbfcfd;
  padding-bottom: 2px;
}

.column-actions {
  display: inline-flex;
  gap: 2px;
}

.micro-action {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--brand);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.micro-action:hover,
.micro-action:focus-visible {
  border-color: #a9c9c6;
  background: #eef7f5;
  outline: none;
}

.micro-action svg {
  width: 12px;
  height: 12px;
}

.copy-all-action {
  width: 26px;
  height: 26px;
}

.copy-all-action svg {
  width: 15px;
  height: 15px;
}

.micro-action::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 5;
  min-width: max-content;
  border-radius: 6px;
  padding: 5px 7px;
  background: #1f2933;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease;
}

.micro-action:hover::after,
.micro-action:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.record-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, .42);
}

.record-modal-card {
  width: min(760px, calc(100vw - 24px));
  max-height: min(760px, calc(100vh - 28px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.record-modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.record-modal-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.record-modal-close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.record-modal-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: auto;
  padding-right: 3px;
}

.record-modal-grid label {
  display: grid;
  gap: 4px;
}

.record-modal-grid label.wide {
  grid-column: 1 / -1;
}

.record-modal-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.record-modal-grid input,
.record-modal-grid select,
.record-modal-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  color: var(--text);
  font: inherit;
}

.record-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.record-modal-actions button {
  min-width: 92px;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.record-modal-actions .record-modal-cancel {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}


.role-modal-card {
  width: min(440px, calc(100vw - 24px));
}

.role-modal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-modal-grid .wide {
  grid-column: 1 / -1;
}

.role-modal-grid span small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  text-transform: none;
}

.char-limit-note {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
}

.char-limit-note.warn {
  color: var(--warn);
}

.role-modal-error {
  margin: 0;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 70;
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-toast.error {
  border-color: #f3b4ad;
  color: #b42318;
}

.compact-more {
  line-height: 1.1;
}

.status-zone {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 4px;
}

.workers-column {
  display: grid;
  gap: 3px;
  align-content: start;
  align-self: stretch;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-color: #cbd6df transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.workers-column::-webkit-scrollbar {
  width: 2px;
  background: #edf2f5;
}

.workers-column::-webkit-scrollbar-thumb {
  background: #9eabb8;
  border-radius: 999px;
}

.split-contact-column {
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.split-contact-section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 4px;
}

.split-contact-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 3px;
  padding-right: 2px;
  scrollbar-color: #cbd6df transparent;
  scrollbar-width: thin;
}

.split-contact-list::-webkit-scrollbar {
  width: 2px;
  background: #edf2f5;
}

.split-contact-list::-webkit-scrollbar-thumb {
  background: #9eabb8;
  border-radius: 999px;
}

.contacts-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.no-workers-mini {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.worker-strip.muted-strip {
  color: var(--muted);
  font-size: 13px;
}

.worker-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.worker-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.worker-copy strong,
.worker-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-copy strong {
  font-size: 13px;
}

.worker-copy small,
.more-workers,
.phone-missing {
  color: var(--muted);
  font-size: 12px;
}

.worker-actions {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 0;
}

.role-admin .editable-record {
  cursor: cell;
}

.role-admin .editable-record:hover .compact-worker-text strong {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.worker-actions .icon-link {
  width: 32px;
  height: 32px;
}

dialog {
  width: min(680px, calc(100vw - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(17, 24, 39, .42);
}

.detail-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 22px;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.detail-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 4px 0 0;
  min-height: 20px;
}

menu {
  margin: 0;
  padding: 0;
}

menu button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.admin-edit-section {
  display: none;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.is-admin .admin-edit-section {
  display: grid;
}

[hidden] {
  display: none !important;
}

.public-note {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.public-note span {
  color: var(--muted);
  font-size: 12px;
}

.role-public .content-shell {
  grid-template-columns: 1fr;
}

.role-public .summary-grid {
  display: none;
}

.role-public .priority-panel {
  display: none;
}

.role-public .assembly-picker {
  display: none;
}

.role-public .toolbar label.search,
.role-public .toolbar label:nth-of-type(2),
.role-public .toolbar label:nth-of-type(3),
.role-public .toolbar label:nth-of-type(4),
.role-public .toolbar label:nth-of-type(5) {
  display: none;
}

.role-public .toolbar {
  grid-template-columns: repeat(2, minmax(150px, 220px));
  justify-content: start;
}

.role-public .booth-row-grid {
  grid-template-columns: minmax(300px, 1fr) repeat(2, minmax(190px, .7fr));
}

.role-public .panchayat-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.role-public .panchayat-two-column {
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr);
}

.role-public .status-zone {
  display: none;
}

.public-local-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.public-local-grid section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.public-local-list {
  max-height: min(58vh, 520px);
}

.report-issue-button {
  min-width: 112px;
  border-color: var(--line);
  background: var(--brand);
  color: #fff;
}

.pending-issue-panel {
  border-color: #f0c5bd;
}

.pending-issue-list {
  display: grid;
  gap: 6px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}

.pending-issue-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.pending-issue-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.pending-issue-copy strong,
.pending-issue-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-issue-copy small {
  color: var(--muted);
  font-size: 11px;
}

.pending-issue-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.approve-action {
  color: var(--ok);
}

.reject-action {
  color: var(--warn);
}

@media (max-width: 1100px) {
  .panchayat-two-column,
  .role-public .panchayat-two-column {
    grid-template-columns: 1fr;
  }

  .panchayat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booth-address-line {
    grid-template-columns: minmax(180px, 1fr) auto;
  }
}

@media (max-width: 700px) {
  .panchayat-grid,
  .role-public .panchayat-grid,
  .booth-address-line,
  .polling-place-line {
    grid-template-columns: 1fr;
  }

  .booth-address-line {
    align-items: start;
  }

  .booth-address-line .inline-map-actions {
    justify-self: start;
  }

  .polling-place-line .inline-map-actions {
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar,
  .content-shell {
    grid-template-columns: 1fr;
  }

  .priority-panel {
    order: 2;
  }

  .worker-panel {
    order: 3;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.logout-page,
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--bg);
}

.logout-shell,
.login-shell {
  width: min(460px, 100%);
}

.logout-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.logout-card h1,
.login-card h1 {
  margin: 6px 0 8px;
  font-size: 28px;
}

.logout-card p:not(.eyebrow),
.login-card p:not(.eyebrow) {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.logout-signin,
.login-primary,
.login-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}

.logout-signin,
.login-primary {
  background: var(--brand);
  color: #fff;
}

.login-actions {
  display: grid;
  gap: 10px;
}

.login-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.login-form {
  display: grid;
  gap: 12px;
  text-align: left;
}

.login-form h1,
.login-form > .eyebrow {
  text-align: center;
}

.login-form label {
  display: grid;
  gap: 5px;
}

.login-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-form input,
.login-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  background: #fff;
  color: var(--text);
}

.login-form .login-primary {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.login-form .login-primary:disabled {
  opacity: .68;
  cursor: wait;
}

.login-error {
  margin: 0;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
}
