
/* ===== DEBUG MARKER ===== */
:root {
    --primary: #2563eb;
    --primary-soft: #e8f1ff;
    --bg: #f5f7fb;
    --card: #ffffff;
    --border: #e5e7eb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --space-xs: 6px;
    --space-sm: 10px;
    --space-md: 16px;
    --space-lg: 24px;
}
/* ===== MENU ICON STYLE ===== */
.sidebar-header {
    height: 40px;
    padding: var(--app-safe-area-top, 28px) 16px 0;
    display: flex;
    top: 10px;
    align-items: flex-start;
    justify-content: space-between;
}

.booth-empty-state,
.bd-loading-state {
    margin: 16px 0;
    padding: 18px 20px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.booth-empty-inline {
    padding: 18px 0;
    color: #64748b;
    font-weight: 700;
}

.booth-form-message {
    margin: 0 0 10px;
    padding: 12px 16px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #991b1b;
    font-weight: 700;
}

.bd-chart-row-live {
    grid-template-columns: minmax(0, 1fr);
}

.role-badge {
    background: #e6f0ff;
    color: #0d74f2;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.mvm-photo-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-top: 4px;
}

.pending-tag--delete {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.sidebar-logo {
    display: block;
    margin: 12px auto 0;
    width: 120px;
    border-radius: 50%;
}

.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

    .login-logo img {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        object-fit: cover;
    }

.logo-title {
    font-weight: 600;
    margin-top: 5px;
}

.login-footer {
    margin-top: 15px;
    font-size: 13px;
    color: #777;
}

.password-input {
    position: relative;
}

    .password-input .form-input {
        padding-right: 40px;
    }

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.menu-item {
    display: flex;
    align-items: center;
/*    gap: 10px;*/
}

.menu-icon {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

body {
    margin: 0;
    background: #f5f5f5 !important;
}

/* ===== MOBILE ROOT ===== */
.mobile-page {
    padding-bottom: 80px;
    font-family: system-ui;
}

.main-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    flex-shrink: 0;
}

.page-scroll {
    flex: 1;
    overflow-y: auto;
}

.app-startup-loader {
    min-height: calc(100dvh - 64px);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 18px;
    padding: 24px;
    color: #0f172a;
    background:
        radial-gradient(circle at 50% 36%, rgba(37, 99, 235, .12), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.app-startup-orbit {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f6b6f, #2563eb);
    box-shadow: 0 18px 42px rgba(37, 99, 235, .24);
    animation: app-loader-pulse 1.45s ease-in-out infinite;
}

.app-startup-orbit::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: #fff;
}

.app-startup-orbit::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(37, 99, 235, .18);
    border-top-color: #2563eb;
    animation: app-loader-spin .8s linear infinite;
}

.app-startup-orbit span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0f6b6f;
    transform-origin: 0 0;
    animation: app-loader-dot 1.2s ease-in-out infinite;
}

.app-startup-orbit span:nth-child(1) {
    transform: rotate(0deg) translate(38px);
}

.app-startup-orbit span:nth-child(2) {
    animation-delay: .12s;
    transform: rotate(120deg) translate(38px);
    background: #2563eb;
}

.app-startup-orbit span:nth-child(3) {
    animation-delay: .24s;
    transform: rotate(240deg) translate(38px);
    background: #22c55e;
}

.app-startup-text {
    display: grid;
    gap: 5px;
    text-align: center;
}

.app-startup-text strong {
    font-size: 18px;
    letter-spacing: .08em;
}

.app-startup-text small {
    color: #64748b;
    font-size: 13px;
}

@keyframes app-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes app-loader-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

@keyframes app-loader-dot {
    0%, 100% {
        opacity: .5;
    }

    50% {
        opacity: 1;
    }
}

.mp-page-scroll {
    position: relative;
    height: calc(100vh - 60px);
    overflow-y: auto;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    background: var(--background);
}

.page-container {
    width: 100%;
    max-width: 100%;
}

.page-container {
    display: flex;
    flex-direction: column;
    /*    overflow:hidden;*/
    /*    height: 100vh;*/
    max-width: 1200px;
    padding: 15px 20px;
    margin: 0 auto;
}

.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    padding-bottom: 120px; /* space for ActionFooter */
    -webkit-overflow-scrolling: touch;
}

.page-content {
    padding-bottom: 120px; /* space for ActionFooter */
}

.page-container--locked {
    overflow: hidden !important;
}

.page-content--locked {
    overflow: hidden !important;
    touch-action: none;
    overscroll-behavior: contain;
}

.footer-spacer {
    height: 72px; /* keeps layout clean */
}
/* Shell */
.app-shell {
    display: flex;
    height: 100vh;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    background: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-top-hero {
    position: relative;
    background-color: #f3eeff;
    background-image: url('/images/sidebar.png');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 125%;
    /*    padding: 10px 14px 20px;*/
    min-height: calc(267px + var(--app-safe-area-top, 28px));
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #eef2f7;
}

@media (min-width: 769px) {
    .sidebar-top-hero {
        background-size: 115%;
    }
}

.hero-user-name {
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 800;
    color: #1f2937;
    margin: 2px 0 8px;
    text-transform: uppercase;
}

.side-menu.open {
    transform: translateX(0);
}

.sidebar-scroll-area {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
}

    .sidebar-scroll-area::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-scroll-area::-webkit-scrollbar-thumb {
        background: #d0d0d0;
        border-radius: 4px;
    }

@media (max-width: 768px) {
    .side-menu {
        width: 240px;
    }
}

/* Member Add V3 UI */
.member-add-v3 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 12px 96px;
    display: grid;
    gap: 12px;
}

.member-add-v3 .member-add-v3-section {
    border: 1px solid #e9ecf4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.member-add-v3 .member-add-v3-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 6px;
}

.member-add-v3 .member-add-v3-step {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, #7c3aed, #5b6cff);
}

.member-add-v3 .member-add-v3-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.member-add-v3 .member-add-v3-head p {
    margin: 1px 0 0;
    font-size: 12px;
    color: #64748b;
}

.member-add-v3 .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 6px 12px 12px;
}

.member-add-v3 .tab-bar {
    margin: 0 12px 8px;
}

.member-add-v3 .form-input,
.member-add-v3 .form-select,
.member-add-v3 select.form-select {
    border: 1px solid #d8dfeb;
    border-radius: 10px;
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    background: #fff;
}

.member-add-v3 label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.member-add-v3 .photo-panel {
    padding: 0 12px 12px;
}

.member-add-v3 .photo-box {
    border: 1px dashed #c7d2fe;
    border-radius: 12px;
    padding: 12px;
    background: #fafbff;
}

.member-add-v3 .member-add-v3-photo-box {
    border: 1px dashed #c7d2fe;
    background: #fbfaff;
}

.member-add-v3 .member-add-v3-upload-box {
    position: relative;
    min-height: 122px;
    border: 2px dashed #cdbdff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fcfbff;
    cursor: pointer;
    padding: 14px;
    overflow: hidden;
}

.member-add-v3 .member-add-v3-upload-box.is-processing {
    cursor: wait;
}

.public-photo-loader-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 8px;
    align-content: center;
    background: rgba(255, 255, 255, 0.82);
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    backdrop-filter: blur(2px);
}

.public-photo-loader-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid #e6e0ff;
    border-top-color: #6d4cff;
    animation: spin 0.8s linear infinite;
}

.member-add-v3 .member-add-v3-upload-placeholder {
    text-align: center;
    color: #6b7280;
    display: grid;
    gap: 3px;
    justify-items: center;
}

.member-add-v3 .member-add-v3-upload-placeholder i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #efe7ff;
    color: #6d4cff;
    display: grid;
    place-items: center;
    font-size: 16px;
}

.member-add-v3 .member-add-v3-upload-placeholder strong {
    font-size: 15px;
    color: #374151;
    font-weight: 700;
}

.member-add-v3 .member-add-v3-upload-placeholder span {
    font-size: 12px;
    color: #8b93a7;
}

.member-add-v3 .member-add-v3-upload-placeholder small {
    font-size: 12px;
    color: #9aa3b2;
}

.web-camera-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.58);
}

.web-camera-modal {
    width: min(94vw, 520px);
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.web-camera-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px 12px;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
}

.web-camera-close {
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 22px;
    line-height: 1;
}

.web-camera-video {
    width: 100%;
    max-height: 58vh;
    background: #0f172a;
    border-radius: 14px;
    object-fit: cover;
}

.web-camera-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.web-camera-actions .c-btn {
    min-width: 92px;
}

.web-camera-actions .web-camera-cancel {
    background: #ef4444;
    color: #fff;
}

.web-camera-actions .web-camera-switch {
    background: #eef2ff;
    color: #2563eb;
}

@media (max-width: 520px) {
    .web-camera-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    .web-camera-modal {
        width: 100%;
        border-radius: 18px;
    }

    .web-camera-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .web-camera-actions .c-btn {
        min-width: 0;
    }
}

.member-add-wizard-status {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid #e9ecf4;
    border-radius: 14px;
    background: #fff;
}

/* ===== VOTER & BOOTH CONTROL LIST PAGE CSS ===== */
.vbc-panel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #0f5fd1;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.vbc-panel-link:hover {
    background: #dbeafe;
    color: #084fb3;
}

.vbc-list-page {
    padding-bottom: 24px;
}

.vbc-list-hero {
    margin-bottom: 16px;
}

.vbc-access-list-panel {
    overflow: hidden;
}

.vbc-list-head {
    gap: 14px;
    align-items: flex-start;
}

.vbc-list-tools {
    display: grid;
    grid-template-columns: minmax(220px, 360px) 150px auto;
    gap: 10px;
    align-items: center;
}

.vbc-list-tools select {
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    padding: 0 12px;
    font-weight: 700;
}

.vbc-access-list {
    display: grid;
    gap: 12px;
}

.vbc-access-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.vbc-access-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
}

.vbc-access-main > div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.vbc-access-main strong,
.vbc-access-main small {
    overflow-wrap: anywhere;
}

.vbc-access-meta {
    display: grid;
    gap: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    min-width: 130px;
}

@media (max-width: 980px) {
    .vbc-list-tools,
    .vbc-access-row {
        grid-template-columns: 1fr;
    }

    .vbc-access-meta {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .vbc-panel-link {
        width: 100%;
        justify-content: center;
    }

    .vbc-list-tools {
        width: 100%;
    }

    .vbc-access-row {
        padding: 12px;
    }
}

.member-add-form-progress {
    grid-column: 1 / -1;
    display: grid;
    gap: 7px;
    padding: 5px 4px 7px;
}

.member-add-form-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.member-add-form-progress-top strong {
    color: #1f2937;
    font-size: 12px;
}

.member-add-form-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eef7;
}

.member-add-form-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e 0%, #2563eb 100%);
    transition: width 0.2s ease;
}

.member-add-wizard-step {
    min-width: 0;
    min-height: 52px;
    border: 1px solid #e5eaf3;
    border-radius: 10px;
    background: #fbfcff;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.member-add-wizard-step.active {
    border-color: #7c5cff;
    background: #f3efff;
    color: #4f35d7;
}

.member-add-wizard-step.complete {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #16803b;
}

.member-add-wizard-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    background: #eef2ff;
    color: #6d4cff;
    font-size: 12px;
}

.member-add-wizard-step.active .member-add-wizard-dot {
    background: #6d4cff;
    color: #fff;
}

.member-add-wizard-step.complete .member-add-wizard-dot {
    background: #22c55e;
    color: #fff;
}

.member-add-wizard-section-hidden {
    display: none !important;
}

.member-add-wizard-section-active {
    display: block;
}

.member-add-v3 .member-add-back-btn {
    background: #f8fafc;
    color: #334155;
}

.member-add-v3 .member-add-v3-toggle-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.member-add-v3 .member-add-v3-toggle-row label {
    margin-bottom: 0;
}

.member-add-v3 .member-add-v3-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
    flex: 0 0 auto;
}

.member-add-v3 .member-add-v3-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.member-add-v3 .member-add-v3-toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color 0.2s ease;
}

.member-add-v3 .member-add-v3-toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.member-add-v3 .member-add-v3-toggle input:checked + .member-add-v3-toggle-slider {
    background: #2563eb;
}

.member-add-v3 .member-add-v3-toggle input:checked + .member-add-v3-toggle-slider::before {
    transform: translateX(20px);
}

.member-voter-details-panel {
    display: grid;
    gap: 14px;
}

.member-family-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.member-voter-header-status {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.member-voter-status-chip {
    min-width: 54px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #dbeafe;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 900;
    white-space: nowrap;
}

.member-voter-status-chip span {
    font-size: 11px;
    line-height: 1;
    color: #64748b;
}

.member-voter-status-chip strong {
    font-size: 15px;
    line-height: 1;
    color: #111827;
}

.member-voter-status-chip.present {
    border-color: #bbf7d0;
    background: #ecfdf5;
}

.member-voter-status-chip.absent {
    border-color: #fecdd3;
    background: #fff1f2;
}

.member-voter-count-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 8px;
    width: 100%;
}

.member-voter-count-row label {
    min-width: 0;
    display: grid;
    gap: 4px;
    margin: 0;
}

.member-voter-count-row span {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
}

.member-voter-count-row input {
    width: 100%;
    height: 38px;
    border: 1px solid #dbeafe;
    border-radius: 9px;
    background: #f8fafc;
    color: #111827;
    font-size: 16px;
    font-weight: 900;
    text-align: center;
    outline: none;
}

.member-voter-count-row input:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.member-voter-count-row label:first-child input {
    border-color: #bbf7d0;
    background: #ecfdf5;
}

.member-voter-count-row label:nth-child(2) input {
    border-color: #fecdd3;
    background: #fff1f2;
}

.member-voter-details-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.member-voter-details-top h4 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
}

.member-voter-details-top p,
.member-voter-picker-modal .modal-header p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.member-voter-add-btn {
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.member-voter-selected-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #d9e4f2;
    border-radius: 10px;
    background: #ffffff;
}

.member-voter-selected-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #2563eb;
    flex: 0 0 auto;
}

.member-voter-selected-card strong,
.member-voter-selected-card span {
    display: block;
    min-width: 0;
}

.member-voter-selected-card strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.member-voter-selected-card span {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.member-voter-count-grid,
.member-voter-presence-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.member-voter-count-grid label,
.member-voter-presence-grid > div {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.member-voter-count-grid span,
.member-voter-presence-grid span {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.member-voter-presence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-voter-choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.member-voter-choice-row button {
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
    color: #334155;
    font-weight: 900;
    cursor: pointer;
}

.member-voter-choice-row button.active {
    border-color: #22c55e;
    background: #dcfce7;
    color: #166534;
}

.member-voter-choice-row button.active.muted {
    border-color: #f87171;
    background: #fee2e2;
    color: #991b1b;
}

.member-voter-picker-modal {
    width: min(720px, 94vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.member-voter-picker-modal .modal-header p {
    margin-top: 4px;
}

.member-voter-picker-search {
    position: relative;
}

.member-voter-picker-search i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #64748b;
}

.member-voter-picker-search .form-input {
    padding-left: 40px;
}

.member-voter-picker-list {
    min-height: 260px;
    margin-top: 12px;
    border: 1px dashed #bfdbfe;
    border-radius: 12px;
    background: #f8fbff;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 10px;
    overflow: auto;
}

.member-voter-picker-list:has(.member-voter-picker-empty) {
    place-items: center;
}

.member-voter-picker-empty {
    max-width: 360px;
    padding: 26px 18px;
    text-align: center;
    color: #64748b;
    display: grid;
    gap: 8px;
    justify-items: center;
}

.member-voter-picker-empty i {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #2563eb;
    font-size: 18px;
}

.member-voter-picker-empty strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.member-voter-picker-empty span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.member-voter-picker-item {
    width: 100%;
    min-width: 0;
    border: 1px solid #dbe7fb;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}

.member-voter-picker-item.selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

.member-voter-picker-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #2563eb;
}

.member-voter-picker-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.member-voter-picker-main strong,
.member-voter-picker-main small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-voter-picker-main strong {
    font-size: 14px;
    font-weight: 800;
}

.member-voter-picker-main small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.member-voter-picker-main .member-voter-picker-extra {
    color: #475569;
    font-weight: 600;
}

.member-voter-picker-check {
    color: #2563eb;
    display: grid;
    place-items: center;
}

.member-voter-picker-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
    border-top: 1px solid #e2e8f0;
}

.member-voter-picker-actions button {
    min-height: 42px;
}

.member-voter-top-bar {
    align-items: stretch;
}

.member-voter-grid-scroll {
    min-height: 52px;
}

.member-grid-header.member-voter-grid-row,
.member-card-grid.member-voter-grid-row {
    grid-template-columns: 36px 40px minmax(180px, 1.45fr) minmax(120px, 0.95fr) minmax(110px, 0.85fr) minmax(130px, 0.8fr) minmax(150px, 1fr) minmax(150px, 1fr);
}

.member-voter-grid-row > div {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-voter-row-check {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
}

.member-voter-present-toggle {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    width: 112px;
    border: 1px solid #dbe7fb;
    border-radius: 999px;
    overflow: hidden;
    background: #f8fafc;
}

.member-voter-present-toggle button {
    border: 0;
    min-height: 30px;
    padding: 0 12px;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.member-voter-present-toggle button.active {
    background: #22c55e;
    color: #fff;
}

.member-voter-present-toggle button.active.muted {
    background: #ef4444;
    color: #fff;
}

.member-voter-location-select {
    width: 100%;
    min-height: 34px;
    border: 1px solid #d5e3f5;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    padding: 0 9px;
    outline: none;
}

.member-voter-location-select:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.member-voter-location-select:focus {
    border-color: #2f6df6;
    box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.12);
}

.member-voter-summary-row {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #dbe7fb;
    border-radius: 8px;
    background: #f8fbff;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.member-voter-summary-row > div {
    min-height: 48px;
    border-radius: 8px;
    background: #fff;
    display: grid;
    place-items: center;
    gap: 2px;
}

.member-voter-summary-row span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.member-voter-summary-row strong {
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
}

@media (max-width: 640px) {
    .member-voter-top-bar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .member-voter-top-bar .search-box {
        grid-column: 1 / -1;
        width: 100%;
    }

    .member-voter-top-bar .add-btn,
    .member-voter-top-bar .btn-edit,
    .member-voter-top-bar .btn-delete {
        width: 100%;
        min-width: 0;
        height: 42px;
        margin: 0;
    }

    .member-voter-grid-scroll {
        display: grid;
        gap: 8px;
        overflow-x: hidden;
    }

    .member-grid-header.member-voter-grid-row {
        display: none;
    }

    .member-card-grid.member-voter-grid-row {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) auto;
        grid-template-areas:
            "check name present"
            "no epic mobile"
            "state state state"
            "city city city";
        align-items: center;
        gap: 8px 10px;
        padding: 10px;
        border-radius: 10px;
        background: #fff8e8;
    }

    .member-card-grid.member-voter-grid-row > div {
        min-width: 0;
        overflow: visible;
        white-space: normal;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(1) {
        grid-area: check;
        display: grid;
        place-items: center;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(2) {
        grid-area: no;
        color: #64748b;
        font-size: 12px;
        font-weight: 800;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(2)::before {
        content: "No ";
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(3) {
        grid-area: name;
        color: #0f172a;
        font-size: 14px;
        font-weight: 900;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(4) {
        grid-area: epic;
        color: #334155;
        font-size: 12px;
        font-weight: 800;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(4)::before {
        content: "EPIC: ";
        color: #64748b;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(5) {
        grid-area: mobile;
        color: #334155;
        font-size: 12px;
        font-weight: 800;
        text-align: right;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(6) {
        grid-area: present;
        justify-self: end;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(7),
    .member-card-grid.member-voter-grid-row > div:nth-child(8) {
        display: grid;
        gap: 4px;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(7) {
        grid-area: state;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(8) {
        grid-area: city;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(7)::before,
    .member-card-grid.member-voter-grid-row > div:nth-child(8)::before {
        color: #475569;
        font-size: 11px;
        font-weight: 900;
        line-height: 1;
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(7)::before {
        content: "State";
    }

    .member-card-grid.member-voter-grid-row > div:nth-child(8)::before {
        content: "City";
    }

    .member-voter-present-toggle {
        width: 104px;
    }

    .member-voter-present-toggle button {
        min-height: 28px;
        padding: 0 8px;
        font-size: 11px;
    }

    .member-voter-location-select {
        min-height: 36px;
        font-size: 12px;
    }

    .member-voter-summary-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 8px;
    }

    .member-voter-summary-row > div {
        min-height: 44px;
    }
}

@media (min-width: 421px) and (max-width: 640px) {
    .member-card-grid.member-voter-grid-row {
        grid-template-columns: 28px minmax(0, 1fr) auto;
        grid-template-areas:
            "check name present"
            "no epic mobile"
            "state state state"
            "city city city";
    }
}

@media (max-width: 640px) {
    .member-grid-scroll.member-voter-grid-scroll {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    .member-grid-scroll.member-voter-grid-scroll .member-card-grid.member-voter-grid-row {
        width: 100%;
        max-width: 100%;
        min-width: 0 !important;
    }
}

.member-add-v3 .member-add-close-btn {
    background: #ef4444;
    color: #fff;
}

.member-add-v3 .member-add-actions .btn-group:has(.member-add-back-btn) .save-btn,
.member-add-v3 .member-add-actions .btn-group:has(.member-add-back-btn) .cancel-btn {
    min-width: 0;
    flex: 1 1 0;
}

.member-add-v3 .member-add-actions .btn-group:has(.member-add-back-btn) .save-btn {
    max-width: 150px;
}

@media (max-width: 420px) {
    .member-add-v3 .member-add-actions .btn-group {
        gap: 8px;
    }

    .member-add-v3 .member-add-actions .save-btn,
    .member-add-v3 .member-add-actions .cancel-btn {
        height: 40px;
        padding: 0 10px;
        font-size: 13px;
    }
}

@media (max-width: 520px) {
    .member-add-v3 .member-add-actions {
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        margin: 10px 0 6px;
    }

    .member-add-v3 .member-add-actions .btn-group {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 8px;
        width: 100%;
    }

    .member-add-v3 .member-add-actions .member-add-action-btn {
        width: 100%;
        min-width: 0;
        max-width: none !important;
        height: 42px;
        padding: 0;
        border-radius: 10px;
        overflow: hidden;
    }

    .member-add-v3 .member-add-actions .member-add-action-btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .member-add-v3 .member-add-actions .member-add-action-btn i {
        font-size: 16px;
    }
}

.member-add-lookup-modal {
    width: min(92vw, 420px);
    max-height: min(78vh, 560px);
    overflow: hidden;
}

.member-add-lookup-modal .modal-body {
    display: grid;
    gap: 10px;
}

.member-add-lookup-list {
    max-height: min(52vh, 380px);
    overflow-y: auto;
    border: 1px solid #e5eaf3;
    border-radius: 10px;
    background: #fff;
}

.member-add-lookup-item {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
    color: #1f2937;
    text-align: left;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.member-add-lookup-item--stacked {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.member-add-lookup-item--stacked small {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}
    /* Role lookup subtitle only */
    .member-add-lookup-item--stacked span {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: #0f172a;
        line-height: 20px;
    }

    .member-add-lookup-item--stacked small {
        display: block;
        margin-top: 2px;
        font-size: 11px;
        font-weight: 500;
        color: #64748b;
        line-height: 15px;
    }
.member-add-lookup-item:last-child {
    border-bottom: 0;
}

.member-add-lookup-item:hover,
.member-add-lookup-item:focus {
    background: #f5f8ff;
    outline: none;
}

.anti-member-village-lookup-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.anti-member-village-type-pill {
    max-width: 100%;
    width: fit-content;
    display: inline-block;
    padding: 3px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anti-member-village-name {
    max-width: 100%;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.village-lookup-item-with-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.village-lookup-type-pill {
    max-width: 100%;
    width: fit-content;
    display: inline-block;
    padding: 3px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.village-lookup-name {
    max-width: 100%;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voter-excel-field-picker-modal {
    width: min(94vw, 520px);
}

.voter-excel-field-picker-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.voter-excel-field-picker-tools button {
    height: 34px;
    border: 1px solid #d6e0ee;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 800;
}

.voter-excel-field-picker-tools span {
    margin-left: auto;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.voter-excel-field-list {
    max-height: min(50vh, 420px);
}

.voter-excel-field-item {
    display: grid;
    grid-template-columns: 0 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.voter-excel-field-item input {
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.voter-excel-field-item.selected {
    background: #eff6ff;
}

.voter-excel-field-item.locked {
    background: #f0fdf4;
    cursor: not-allowed;
}

.voter-excel-field-check {
    width: 24px;
    height: 24px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: #ffffff;
    font-size: 12px;
}

.voter-excel-field-item.selected .voter-excel-field-check {
    background: #2563eb;
    border-color: #2563eb;
}

.voter-excel-field-item.locked .voter-excel-field-check {
    background: #16a34a;
    border-color: #16a34a;
}

.voter-excel-required-pill {
    align-self: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.voter-excel-field-info {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.voter-excel-field-info strong,
.voter-excel-field-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-excel-field-info strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
}

.voter-excel-field-info small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .member-add-lookup-modal {
        width: 94vw;
        max-height: 74vh;
    }

    .member-add-lookup-list {
        max-height: 46vh;
    }
}

.member-add-v3 .member-add-actions {
    background: #fff;
    border: 1px solid #e9ecf4;
    border-radius: 12px;
    padding: 10px;
}

.member-add-v3 .member-add-actions .btn-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.member-add-v3 .save-btn,
.member-add-v3 .cancel-btn {
    min-width: 130px;
    height: 42px;
    border-radius: 10px;
    font-weight: 700;
}

.member-add-v3 .member-add-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.member-add-v3 .member-add-action-btn i {
    flex: 0 0 auto;
    font-size: 14px;
}

@media (max-width: 900px) {
    .member-add-v3 .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .member-add-v3 {
        padding: 8px 8px 92px;
    }

    .member-add-v3 .form-grid {
        grid-template-columns: 1fr;
    }

    .member-add-v3 .member-add-actions .btn-group {
        justify-content: space-between;
    }

.member-add-v3 .save-btn,
.member-add-v3 .cancel-btn {
    flex: 1 1 0;
    min-width: 0;
}
}

/* Member Add V3 responsive hardening */
.member-add-v3 {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding-bottom: calc(128px + env(safe-area-inset-bottom));
}

.member-add-v3,
.member-add-v3 * {
    box-sizing: border-box;
    min-width: 0;
}

.member-add-v3 .form-grid > div,
.member-add-v3 .tab-content > div {
    min-width: 0;
}

.member-add-v3 .form-input,
.member-add-v3 .form-select,
.member-add-v3 input,
.member-add-v3 select,
.member-add-v3 textarea {
    width: 100%;
    max-width: 100%;
}

.member-add-v3 .tab-bar {
    overflow-x: auto;
    scrollbar-width: none;
}

.member-add-v3 .tab-bar::-webkit-scrollbar {
    display: none;
}

.member-add-v3 .btn-group {
    width: 100%;
}

@media (max-width: 1024px) {
    .member-add-v3 {
        padding: 10px 10px calc(124px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 640px) {
    .member-add-v3 {
        padding: 8px 8px calc(118px + env(safe-area-inset-bottom));
    }

    .member-add-wizard-status {
        grid-template-columns: repeat(5, 96px);
        overflow-x: auto;
        scrollbar-width: none;
        padding: 7px;
    }

    .member-add-wizard-status::-webkit-scrollbar {
        display: none;
    }

    .member-add-wizard-step {
        min-height: 46px;
        font-size: 11px;
    }

    .member-add-form-progress {
        min-width: 100%;
    }

    .member-add-v3 .member-add-v3-head {
        padding: 10px 10px 6px;
    }

    .member-add-v3 .member-add-v3-head h3 {
        font-size: 15px;
        line-height: 1.2;
    }

    .member-add-v3 .member-add-v3-head p {
        font-size: 11px;
    }

    .member-family-title-wrap {
        gap: 8px;
        flex: 1 1 auto;
        min-width: 0;
    }

    .member-family-title-wrap > div {
        min-width: 0;
    }

    .member-family-title-wrap h3,
    .member-family-title-wrap p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .member-voter-header-status {
        flex: 0 0 auto;
        gap: 5px;
    }

    .member-voter-status-chip {
        min-width: 44px;
        height: 28px;
        padding: 0 7px;
        gap: 5px;
    }

    .member-voter-status-chip span {
        font-size: 10px;
    }

    .member-voter-status-chip strong {
        font-size: 13px;
    }

    .member-voter-count-row {
        gap: 6px;
        margin: 8px 0 7px;
    }

    .member-voter-count-row span {
        font-size: 10px;
    }

    .member-voter-count-row input {
        height: 34px;
        border-radius: 8px;
        font-size: 14px;
    }

    .member-add-v3 label {
        font-size: 12px;
    }

    .member-add-v3 .form-input,
    .member-add-v3 .form-select,
    .member-add-v3 select.form-select {
        height: 40px;
        font-size: 13px;
    }

    .member-voter-details-top,
    .member-voter-selected-card {
        align-items: stretch;
    }

    .member-voter-details-top {
        flex-direction: column;
    }

    .member-voter-add-btn {
        width: 100%;
        justify-content: center;
    }

    .member-voter-count-grid,
    .member-voter-presence-grid,
    .member-voter-picker-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-voter-picker-modal {
        width: calc(100vw - 24px);
        max-height: 86vh;
    }

    .member-voter-picker-list {
        min-height: 220px;
    }
}

@media (max-width: 520px) {
    .member-voter-picker-modal {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        max-height: calc(100dvh - 56px);
        border-radius: 14px;
    }

    .member-voter-picker-modal .modal-header {
        padding: 14px 16px;
        gap: 10px;
    }

    .member-voter-picker-modal .modal-header h4 {
        font-size: 20px;
        line-height: 1.15;
    }

    .member-voter-picker-modal .modal-header p {
        max-width: calc(100vw - 116px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .member-voter-picker-modal .modal-body {
        min-width: 0;
        padding: 14px;
        overflow: hidden;
    }

    .member-voter-picker-search .form-input {
        height: 42px;
        font-size: 14px;
        padding-left: 38px;
    }

    .member-voter-picker-list {
        width: 100%;
        min-width: 0;
        min-height: 0;
        max-height: calc(100dvh - 300px);
        margin-top: 12px;
        padding: 8px;
        gap: 8px;
        overflow-x: hidden;
    }

    .member-voter-picker-item {
        min-width: 0;
        grid-template-columns: 34px minmax(0, 1fr) 18px;
        gap: 8px;
        padding: 9px 8px;
        border-radius: 9px;
    }

    .member-voter-picker-avatar {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 13px;
    }

    .member-voter-picker-main {
        min-width: 0;
        gap: 2px;
    }

    .member-voter-picker-main strong {
        font-size: 13px;
        line-height: 1.2;
    }

    .member-voter-picker-main small {
        font-size: 11px;
        line-height: 1.2;
    }

    .member-voter-picker-check {
        font-size: 12px;
    }

    .member-voter-picker-actions {
        padding: 10px 14px 12px;
        gap: 8px;
    }

    .member-voter-picker-actions button {
        min-height: 44px;
        border-radius: 8px;
    }
}

@media (max-width: 380px) {
    .member-voter-picker-modal {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
    }

    .member-voter-picker-modal .modal-body {
        padding: 12px;
    }

    .member-voter-picker-list {
        max-height: calc(100dvh - 286px);
        padding: 6px;
    }

    .member-voter-picker-item {
        grid-template-columns: 30px minmax(0, 1fr) 14px;
        gap: 7px;
        padding: 8px 7px;
    }

    .member-voter-picker-avatar {
        width: 30px;
        height: 30px;
    }
}

.app-header {
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 15px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.menu-btn {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}
/* Main content */
.main-content {
    flex: 1;
    transition: margin-left 0.25s ease;
}

.main-content {
    position: relative;
    z-index: 1;
}
/* Shift content when menu opens */
.app-shell.menu-open .main-content {
    margin-left: 260px;
}


/* HEADER */
.mobile-header {
    padding: 14px;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

    .mobile-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
    }




.search-box {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #ccc;
}

.add-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: orange;
    color: white;
    border: none;
}

.view-btn {
    background-color: #17a2b8;
}

.view-btn,
.edit-btn,
.delete-btn {
    flex: 1; /* equal width */
    border: none;
    padding: 14px;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
    padding: 12px 24px;
    min-width: 120px;
    font-size: 15px;
    border-radius: 10px;
}

.edit-btn {
    background: #2f80ed;
}

.delete-btn {
    background: #eb5757;
}

/* LIST */
.list-card {
    background: #ffffff;
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 12px;
    /* IMPORTANT */
    border: 2px solid transparent;
    box-sizing: border-box;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

    /* FORCE hover visibility */
    .list-card.selectable:hover {
        border-color: #0d74f2 !important;
        box-shadow: 0 0 0 2px rgba(47, 128, 237, 0.25);
        transform: scale(1.02);
    }

    .list-card.selected {
        border-color: #0a93fa;
        box-shadow: 0 0 0 2px rgba(47, 128, 237, 0.35);
    }


.action-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 8px 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: center;
    gap: 16px;
    min-height: 56px;
}

.count {
    background: #eee;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 12px;
}

.tabs {
    display: inline-flex; /* instead of flex */
    margin: 8px;
    background: #f1f1f1;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.tab {
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    border-radius: 6px;
    white-space: nowrap;
}

    .tab.active {
        background: #007bff;
        color: white;
    }

@media (max-width: 768px) {
    .tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 6px;
    }

    .tab {
        flex: 0 0 auto;
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    .card-details {
        padding: 12px;
        border-radius: 12px;
    }

    .title {
        font-size: 15px;
        font-weight: 600;
    }

    .sub {
        font-size: 13px;
        color: #6b7280;
    }
}

@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-start;
        padding: 8dvh 10px;
    }

    .modal-box {
        width: 100%;
        max-width: 420px;
        max-height: calc(100dvh - 16dvh);
        border-radius: 16px;
    }

    .modal-body {
        overflow-y: auto;
        flex: 1;
    }
}

.btn-group {
    display: flex;
    gap: 16px;
    justify-content: center;
}


/* Backdrop */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
}
/* Bottom sheet container */
/* ===== MOBILE KEYBOARD SAFE BOTTOM SHEET ===== */

.bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    padding: 16px;
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    margin: 0 auto;
    /* IMPORTANT FIX */
    max-height: 90dvh; /* dynamic viewport height */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .bottom-sheet select {
        width: 100%;
        padding: 12px 14px;
        margin-bottom: 10px;
        border-radius: 10px;
        border: 1px solid #dcdcdc;
        font-size: 14px;
        background: #ffffff;
        outline: none;
    }

        .bottom-sheet select:focus {
            border-color: #2f80ed;
        }

/* Field with inline action */
.field-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.field-addon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

/* Title */
.bottom-sheet h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
}

/* Inputs */
.bottom-sheet input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
    outline: none;
}

    .bottom-sheet input:focus {
        border-color: #2f80ed;
    }

/* Action buttons wrapper */
.sheet-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* Buttons */
.save-btn,
.cancel-btn {
    flex: 1;
    padding: 12px 24px;
    min-width: 120px;
    font-size: 15px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

/* Save */
.save-btn {
    background: #2f80ed;
    color: #ffffff;
}

/* Cancel */
.cancel-btn {
    background: #eb5757;
    color: #ffffff;
}

/* Mobile-safe spacing */
@media (max-width: 768px) {

    /* Reduce menu width */
    /*.side-menu {
        transform: translateX(-100%);
        width: 220px;
    }*/



    /* Make menu overlay instead */
    /*.side-menu {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
    }*/

    /* Optional backdrop for clarity */
    .menu-backdrop {
        display: block;
    }
}

.load-more {
    display: block;
    margin: 16px auto;
    padding: 12px 10px;
    min-width: 160px;
    background: #f2f2f2;
    color: #333333;
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

    .load-more:hover {
        background: #e6e6e6;
    }

    .load-more:active {
        transform: scale(0.98);
    }

/* ===== DASHBOARD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

    .dashboard-card:hover {
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    }

    .dashboard-card h4,
    .dashboard-card .dashboard-title {
        margin: 0 0 6px;
        font-size: 15px;
        font-weight: 600;
        color: #111827;
    }

    .dashboard-card p,
    .dashboard-card .dashboard-subtitle {
        margin: 0;
        font-size: 13px;
        color: #6b7280;
    }

.dashboard-card-wide {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .dashboard-card-wide {
        grid-column: span 1;
    }
}


/* Menu button */
.menu-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    margin-right: 12px;
}

/* Sidebar */
/*.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1000;
}*/

/* Visible */
/*.side-menu.open {
        transform: translateX(0);
    }*/

/* Backdrop */
.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1100;
}

    .menu-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }

.menu-section {
    margin-bottom: 10px;
}

.menu-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    padding: 10px 18px;
    text-transform: uppercase;
}

.menu-item {
    padding: 10px 16px;
    margin: 4px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

    /* Hover */
    .menu-item:hover {
        background: #f1f5f9;
    }

    /* Selected */
    .menu-item.active {
        background: #e8f1ff;
        color: #2563eb;
        font-weight: 600;
    }

.menu-item-expandable {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .menu-item-expandable > span {
        display: inline-flex;
        align-items: center;
    }

.menu-expand-icon {
    font-size: 12px;
    color: #64748b;
    margin-left: 8px;
}

/* ===== MASTER DROPDOWN ===== */

.master-card {
    cursor: pointer;
}

.master-dropdown {
    grid-column: span 2;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    animation: fadeSlide 0.15s ease;
}

.master-item {
    padding: 12px 12px;
    border: none;
    background: #f1f5f9;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
}

    .master-item:hover {
        background: #e8f1ff;
        color: #2563eb;
    }

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .master-dropdown {
        grid-column: span 1;
    }

    .page-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .photo-section {
        grid-template-columns: 1fr;
    }
}
/* ===== GENDER FIELD ===== */

.gender-group {
    display: flex;
    gap: 24px;
    margin: 8px 0 12px; /* aligns with input spacing */
}

.gender-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px; /* visually matches input padding */
    border-radius: 10px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    word-break: normal;
    white-space: nowrap;
}

    /* Radio itself */
    .gender-option input[type="radio"] {
        margin: 0; /* remove browser defaults */
        accent-color: #0985fc;
    }

    /* Optional: hover feedback */
    .gender-option:hover {
        background: #f1f5f9;
    }


label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}


.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

    .checkbox-row span {
        min-width: 0;
    }

/* Make tab-bar scrollable horizontally on mobile */
.tab-bar {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    gap: 6px;
    padding-bottom: 4px;
}

    /* Hide scrollbar on Chrome/Safari */
    .tab-bar::-webkit-scrollbar {
        display: none;
    }

/* Prevent tabs from shrinking */
.tab {
    flex-shrink: 0;
    white-space: nowrap;
}

.tab {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 600;
}

    .tab.active {
        background: #e8f1ff;
        color: #2563eb;
    }

.photo-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.photo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

    .photo-box .c-btn .c1-btn {
        margin-top: 8px;
        padding: 6px 12px;
        font-size: 12px;
        width: auto; /* prevent full stretch */
        display: inline-block;
    }

.photo-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    width: 100%;
}

.photo-upload-box {
    width: 260px;
    height: 220px;
    border: 2px dashed #b9c3d1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f7f9fc;
}

.photo-panel {
    padding-bottom: 80px; /* adjust based on footer height */
}

@media (max-width: 768px) {
    .photo-box {
        padding-bottom: 20px;
        gap: 2px;
    }

    .photo-upload-box {
        height: auto;
        min-height: 200px;
    }

    .photo-preview {
        max-height: 180px;
        width: 100%;
        object-fit: contain;
    }

    .c-btn .c1-btn {
        width: 100%;
        display: block;
    }
}

.photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

input[type="number"],
input[type="email"],
input[type="text"],
input[type="date"] {
    font-size: 16px;
}

.secondary-btn {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-size: 13px;
    font-weight: 600;
}

.form-grid > div,
.photo-section > div {
    min-width: 0;
}

input, select, textarea {
    max-width: 100%;
    box-sizing: border-box;
}

.field-row > *,
.checkbox-row > *,
.gender-group > * {
    min-width: 0;
}

.field-row input,
.field-row select {
    flex: 1 1 auto;
    width: 100%;
}

label {
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 768px) {
    .app-shell {
        display: block;
        width: 100%;
    }

    .main-content {
        width: 100%;
        max-width: 100%;
    }

    .list-card {
        transform: none !important;
    }

    .page-container .page-content {
        overflow-y: auto;
        max-width: 100%;
        margin: 0;
        padding: 12px;
        padding-bottom: 30px; /* space for ActionFooter */
    }

    .vertical-form .form-grid {
        grid-template-columns: 1fr !important;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .photo-section {
        grid-template-columns: 1fr;
    }

    .tab-bar {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .photo-panel {
        overflow: visible;
        grid-template-columns: 1fr;
    }
}
/* ===== FORM CONTROLS (MOBILE SAFE) ===== */

.form-input,
.form-select {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    font-size: 16px; /* REQUIRED for mobile */
    line-height: 1.4;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    box-sizing: border-box;
    appearance: none; /* IMPORTANT */
    -webkit-appearance: none;
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='gray' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px;
}

input[type="number"] {
    -moz-appearance: textfield;
}

    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }


.occupation-inline {
    display: flex;
    gap: 6px;
    align-items: center;
}

.a-btn {
    height: 38px;
    width: 38px;
    font-size: 18px;
    border-radius: 12px;
    background: orange;
    color: white;
    border: none;
}

.add-occupation-box {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.top-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.search-box {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.add-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: orange;
    border: none;
    font-size: 22px;
    color: #fff;
}

.member-grid-scroll {
    width: 100%;
    overflow-x: auto; /* IMPORTANT */
}

.member-grid-header,
.member-card-grid {
    display: grid;
    grid-template-columns: 40px 1.2fr 1.2fr 1.2fr 1.2fr 1.2fr 1.2fr 1.2fr;
    gap: 2px;
    padding: 6px;
    align-items: center;
}

.member-card-g {
    display: grid;
    grid-template-columns: 40px 150px 1.2fr;
    gap: 2px;
    padding: 6px;
    align-items: center;
}

.member-grid-header {
    font-weight: 600;
    background: #f4f4f4;
    border-radius: 8px;
}

.member-card-grid {
    margin-top: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.member-card-g {
    margin-top: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    white-space: nowrap;
}


.btn-edit {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
}

.btn-delete {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    z-index: 999;
}

.modal-large {
    width: 90%;
    max-width: 1200px;
    height: 90%;
    background: white;
    border-radius: 10px;
    overflow: auto;
}

.modal-body {
    padding: 20px;
}

.modal-box {
    background: #fff;
    width: 470px;
    max-width: 92%;
    max-height: 90dvh; /* dynamic viewport */
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 14px 18px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

.modal-body {
    padding: 16px;
    display: grid;
    flex: 1;
    grid-template-columns: 1fr;
    overflow-y: auto;
    gap: 10px;
}

    .modal-body input {
        padding: 8px;
        border-radius: 8px;
        border: 1px solid #ccc;
    }

.modal-footer {
    position: sticky;
    bottom: 0;
    background: white;
    justify-content: flex-end;
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eee;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
}

.btn-secondary {
    background: #e5e7eb;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .modal-box {
        max-height: 95vh;
        width: 95%;
        border-radius: 16px;
    }
}

@media (max-width:768px) {

    .modal-box {
        transition: transform 0.25s ease;
    }

        .modal-box.keyboard-open {
            transform: translateY(-120px);
        }
}

@media (max-width:768px) {

    .modal-overlay {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: flex-start; /* move modal upward instead of exact center */
        justify-content: center;
        padding: 8dvh 10px; /* top/bottom breathing room that adapts to keyboard */
    }

    .modal-box {
        width: 100%;
        max-width: 420px;
        max-height: calc(100dvh - 16dvh); /* shrink when keyboard reduces viewport */
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        overflow-y: auto; /* body scrolls if space reduces */
        flex: 1;
        padding-bottom: 8px;
    }

    .modal-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 6px;
    }
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        padding-bottom: 10px;
    }

    .member-grid-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .member-grid-header,
    .member-card-grid {
        min-width: 750px; /* ONLY for mobile */
    }

    .member-card-g {
        min-width: 750px; /* ONLY for mobile */
    }
}

@media (max-width: 600px) {

    .top-bar {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .btn-edit,
    .btn-delete {
        grid-column: span 1;
    }

    .btn-edit,
    .btn-delete {
        width: 100%;
    }

    .btn-edit {
        grid-column: 1;
    }

    .btn-delete {
        grid-column: 2;
    }
}

.checkbox-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

.other-grid {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 1.2fr 1.2fr;
    gap: 20px;
    align-items: end;
}

.vehicle-type .checkbox-group {
    display: flex;
    gap: 18px;
    margin-top: 6px;
}

.vehicle-type label {
    font-weight: 500;
}

@media (max-width: 768px) {
    .other-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-type .checkbox-group {
        gap: 14px;
    }
}

.radio-group {
    display: flex;
    gap: 18px;
    margin-top: 6px;
    align-items: center;
}

.two-column-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}

.pradhan-community-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pradhan-add-v3 .caste-tab {
    padding: 0 12px 12px;
}

.pradhan-add-v3 .top-bar {
    align-items: stretch;
    gap: 8px;
}

.pradhan-add-v3 .search-box {
    min-width: 0;
}

.pradhan-add-v3 .photo-panel {
    padding: 6px 12px 12px;
}

.pradhan-add-v3 .photo-box {
    margin: 0;
}

.pradhan-add-v3 .member-grid-scroll {
    overflow-x: auto;
}

.pradhan-add-v3 .pradhan-candidate-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 48px minmax(96px, auto) minmax(96px, auto);
    align-items: stretch;
}

.pradhan-add-v3 .pradhan-candidate-toolbar .add-btn,
.pradhan-add-v3 .pradhan-candidate-toolbar .btn-edit,
.pradhan-add-v3 .pradhan-candidate-toolbar .btn-delete {
    min-width: 0;
}

.pradhan-add-v3 .pradhan-candidate-grid-row > div {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* One row: Label + Field */
.field-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 46px;
}

/* Label styling */
.field-label {
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
    text-align: right; /* optional, WinForms-style */
}

/* Control width/height WITHOUT touching .form-input */
.field-control {
    height: 42px;
    padding-top: 8px;
    padding-bottom: 8px;
}

@media (max-width: 768px) {

    /* Top search + buttons */
    .caste-tab .top-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .caste-tab .search-box {
        flex: 1 1 100%;
    }

    .caste-tab .add-btn,
    .caste-tab .btn-edit,
    .caste-tab .btn-delete {
        flex: 1;
        min-width: 0;
    }

    /* Table horizontal scroll */
    .caste-tab .member-grid-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .caste-tab .member-grid-header,
    .caste-tab .member-card-grid {
        min-width: 750px;
    }

    .member-card-g {
        min-width: 750px;
    }

    /* Modal mobile spacing */
    .caste-tab .modal-box {
        width: 95%;
        max-height: 90vh;
    }

    /* Modal buttons full width */
    .caste-tab .modal-footer {
        flex-direction: column;
    }

        .caste-tab .modal-footer button {
            width: 100%;
        }
}

@media (max-width: 768px) {

    /* Prevent footer overlap only in caste tab */
    .caste-tab {
/*        padding-bottom: 90px;*/
    }

        /* Top bar layout */
        .caste-tab .top-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .caste-tab .search-box {
            flex: 1 1 100%;
        }

        .caste-tab .add-btn,
        .caste-tab .btn-edit,
        .caste-tab .btn-delete {
            flex: 1;
        }

        /* Table scroll */
        .caste-tab .member-grid-scroll {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .caste-tab .member-grid-header,
        .caste-tab .member-card-grid {
            min-width: 720px;
        }

    .member-card-g {
        min-width: 720px;
    }
}
/* Mobile */
@media (max-width: 768px) {
    .two-column-form {
        grid-template-columns: 1fr;
    }

    .pradhan-community-grid {
        grid-template-columns: 1fr;
    }

    .pradhan-add-v3 .top-bar {
        display: grid;
        grid-template-columns: 1fr auto auto auto;
    }

    .pradhan-add-v3 .top-bar .search-box {
        grid-column: 1 / -1;
    }

    .pradhan-add-v3 .btn-edit,
    .pradhan-add-v3 .btn-delete,
    .pradhan-add-v3 .add-btn {
        min-width: 0;
        width: 100%;
    }

    .pradhan-add-v3 .pradhan-candidate-toolbar {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 8px;
    }

    .pradhan-add-v3 .pradhan-candidate-toolbar .search-box {
        grid-column: 1 / -1;
        width: 100%;
    }

    .pradhan-add-v3 .pradhan-candidate-toolbar .add-btn,
    .pradhan-add-v3 .pradhan-candidate-toolbar .btn-edit,
    .pradhan-add-v3 .pradhan-candidate-toolbar .btn-delete {
        width: 100%;
        height: 42px;
    }

    .pradhan-add-v3 .pradhan-candidate-grid-scroll {
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .pradhan-add-v3 .member-grid-header.pradhan-candidate-grid-row {
        display: grid !important;
        min-width: 760px !important;
    }

    .pradhan-add-v3 .member-card-grid.pradhan-candidate-grid-row {
        display: grid;
        grid-template-columns: 40px 120px 120px 120px 120px 120px 120px !important;
        gap: 8px;
        min-width: 760px !important;
        padding: 10px;
        align-items: start;
    }

    .pradhan-add-v3 .member-card-grid.pradhan-candidate-grid-row > div {
        white-space: nowrap;
        overflow-wrap: normal;
        border-radius: 8px;
    }

    .pradhan-add-v3 .member-card-grid.pradhan-candidate-grid-row > div::before {
        display: none;
        color: #64748b;
        font-size: 11px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .pradhan-add-v3 .member-card-grid.pradhan-candidate-grid-row > div:nth-child(1)::before { content: "Sr."; }
    .pradhan-add-v3 .member-card-grid.pradhan-candidate-grid-row > div:nth-child(2)::before { content: "Name"; }
    .pradhan-add-v3 .member-card-grid.pradhan-candidate-grid-row > div:nth-child(3)::before { content: "Gram Sabha"; }
    .pradhan-add-v3 .member-card-grid.pradhan-candidate-grid-row > div:nth-child(4)::before { content: "Village"; }
    .pradhan-add-v3 .member-card-grid.pradhan-candidate-grid-row > div:nth-child(5)::before { content: "Is Member"; }
    .pradhan-add-v3 .member-card-grid.pradhan-candidate-grid-row > div:nth-child(6)::before { content: "Votes Got"; }
    .pradhan-add-v3 .member-card-grid.pradhan-candidate-grid-row > div:nth-child(7)::before { content: "Total Votes"; }

    .field-row {
        grid-template-columns: 1fr;
    }

    .field-label {
        text-align: left;
    }
}

.member-card-grid.selected {
    background: #fff8e1;
    border: 1px solid #f59e0b;
}

.member-card-g.selected {
    background: #fff8e1;
    border: 1px solid #f59e0b;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-container {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.login-wrapper {
    width: 100%;
    min-height: 100%;
    width: 100%;
    max-width: 400px;
    padding-bottom: 120px; /* space for keyboard */
}

.login-btn {
    width: 100%;
    height: 44px;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    text-align: center;
    margin-bottom: 15px;
}

    .login-logo img {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        object-fit: cover;
    }

.logo-title {
    font-weight: 600;
    margin-top: 6px;
}

.login-card {
    width: 360px;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

    .login-card h2 {
        margin-bottom: 16px;
        text-align: center;
    }

.login-field {
    margin-bottom: 12px;
}

.login-error {
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 10px;
}

.login-btn {
    width: 100%;
}

.login-footer {
    margin-top: 14px;
    font-size: 13px;
    color: #666;
}
/*@media (max-width:768px) {

    .login-container {
        align-items: flex-start;
        padding-top: 40px;
    }

    .login-card {
        margin-top: 60px;
    }
}*/
/* Remove position:fixed on mobile - this is what breaks in MAUI WebView */
@media (max-width: 768px) {
    .login-container {
        min-height: 100dvh; /* dvh = dynamic viewport height, shrinks with keyboard */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 20px;
        overflow-y: auto; /* allows scroll when keyboard pushes content */
        -webkit-overflow-scrolling: touch;
    }

    .login-wrapper {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 40px; /* breathing room above keyboard */
    }

    .login-card {
        width: 90%;
        max-width: 360px;
        background: #fff;
        border-radius: 16px;
        padding: 20px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.2);
        margin-top: 20px;
    }
}

.status-message {
    padding: 10px 14px;
    border-radius: 8px;
    margin: 10px;
    font-size: 14px;
}

    .status-message.success {
        background: #ecfdf5;
        color: #065f46;
    }

    .status-message.error {
        background: #fef2f2;
        color: #991b1b;
    }

.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
}


.sheet-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sheet-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.status-message.success {
    color: green;
}

.status-message.error {
    color: red;
}

.toast-message {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    min-width: 260px;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    animation: slideIn .25s ease-out;
}

    .toast-message.success {
        background: #e8f9f0;
        color: #0f5132;
        border-left: 4px solid #198754;
    }

    .toast-message.error {
        background: #fdecea;
        color: #842029;
        border-left: 4px solid #dc3545;
    }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input.hide-zero:placeholder-shown {
    color: transparent;
}

/* This ensures when the user types, it becomes visible again */
input.hide-zero:not(:placeholder-shown) {
    color: inherit;
}
/* ===== MAUI MOBILE NORMALIZATION ===== */

html {
    -webkit-text-size-adjust: 100%;
}

.bottom-sheet:focus-within {
    max-height: 70dvh;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

#app {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.action-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

/*.bottom-sheet {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}*/
/* Mobile Sidebar Behavior */
@media (max-width: 768px) {

    /*    .side-menu {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }*/

    .side-menu.open {
        transform: translateX(0);
    }

    .app-shell.menu-open .main-content {
        margin-left: 0; /* prevent desktop push */
    }

    .menu-mobile-header {
        display: flex;
        justify-content: flex-end;
        padding: 10px;
        border-bottom: 1px solid #eee;
    }

    .menu-close-btn {
        background: none;
        font-size: 20px;
        cursor: pointer;
    }
}

.menu-title-small {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

/* Close button */
/* Sidebar container should be relative so the button can anchor to it */
/* Sidebar container */




/* Close button aligned to top-right */
.sidebar-user {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding: 8px 10px;
    flex-direction: column;
    gap: 8px;
}

.menu-close-btn {
    position: absolute;
    top: calc(10px + var(--app-safe-area-top, 28px));
    right: 12px;
    z-index: 1300;
    cursor: pointer;
    border: none;
    background: transparent;
    /*    border-radius: 8px;*/
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
    /* Hover effect */
    .menu-close-btn:hover {
        background: #e2e8f0;
    }
/* Menu icon spacing */
.menu-icon {
    margin-right: 8px;
    width: 18px;
}

@media (max-width: 768px) {

    /* ----- Global Reset Fixes ----- */

    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    * {
        max-width: 100%;
    }

    .page-container {
        padding: 12px 14px;
    }

    .page-content {
        padding-bottom: 80px;
    }

    /* ----- Sidebar becomes overlay ----- */
    /* Header layout */
    .app-header {
        display: flex;
        align-items: center;
        gap: 14px;
        height: 50px;
        padding: 0 14px;
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
    }
    /* Toggle button */
    .menu-btn {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 8px;
        background: #f1f5f9;
        color: #374151;
        font-size: 18px;
        cursor: pointer;
    }

        /* Hover */
        .menu-btn:hover {
            background: #e2e8f0;
        }

    /* App title */
    .app-title {
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.3px;
        margin: 0;
    }

    /*    .app-title {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
    }*/
    /*    .side-menu {
        width: 240px;
    }*/

    .app-shell.menu-open .main-content {
        margin-left: 0; /* Remove desktop push */
    }

    /* ----- Dashboard ----- */

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-card,
    .dashboard-card-wide {
        grid-column: span 1 !important;
    }

    /* ----- Forms ----- */

    .two-column-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 6px;
        min-height: auto;
    }

    .field-label {
        text-align: left;
        font-size: 13px;
    }

    .field-control {
        height: 44px;
    }

    .form-input,
    .form-select {
        height: 44px;
        font-size: 16px;
    }

    /* ----- Gender & Radio Groups ----- */

    .gender-group,
    .radio-group,
    .checkbox-group {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* ----- Photo Section ----- */

    .photo-section,
    .photo-panel {
        grid-template-columns: 1fr;
    }

    .photo-placeholder {
        height: 140px;
    }

    /* ----- Member Grid (Horizontal Scroll Safe) ----- */

    .member-grid-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .member-grid-header,
    .member-card-grid {
        min-width: 900px; /* smaller than before */
    }

    .member-card-g {
        min-width: 900px; /* smaller than before */
    }

    /* ----- Cards ----- */

    .list-card {
        transform: none !important; /* Disable scale on tap devices */
        padding: 12px;
    }

        .list-card.selectable:hover {
            transform: none;
        }

    .view-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

        .view-row label {
            width: 110px;
            font-size: 13px;
            color: #666;
        }

    .view-value {
        flex: 1;
        padding: 8px 10px;
        background: #f5f5f5;
        border-radius: 6px;
        border: 1px solid #ddd;
        font-size: 14px;
    }

    button,
    .add-btn,
    .a-btn,
    .btn-edit,
    .btn-delete,
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
    }

    .btn-edit,
    .btn-delete {
        padding: 6px 12px;
    }

    /* ----- Bottom Sheet ----- */
    /*
    .bottom-sheet {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 14px;
    }*/

    .bottom-sheet input,
    .bottom-sheet select {
        height: 44px;
    }

    /* ----- Modal ----- */

    .modal-box {
        width: 95%;
        max-height: 90vh;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* ----- Tabs Scrollable ----- */

    .tab-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        flex: 0 0 auto;
    }

    /* ----- Other Grid Fix ----- */

    .other-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}
/* ===== TOP BAR FIX ===== */

.top-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap; /* allow wrapping */
}

.search-box {
    flex: 1 1 180px; /* allow shrink */
    min-width: 0; /* prevent overflow */
}

.btn-edit,
.btn-delete {
    white-space: nowrap; /* prevent text breaking */
}

/* Mobile adjustment */
@media (max-width: 600px) {

    .top-bar {
        flex-wrap: wrap;
    }

    .search-box {
        flex: 1 1 100%;
    }

    .add-btn,
    .btn-edit,
    .btn-delete {
        flex: 1 1 calc(33.33% - 6px);
        min-width: 0;
    }
}
/* ===== DASHBOARD ICON STYLE ===== */

.dashboard-icon {
    font-size: 28px;
    margin-bottom: 10px;
    color: #2563eb;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
}

    .dashboard-card i {
        transition: transform 0.2s ease;
    }

    .dashboard-card:hover i {
        transform: scale(1.1);
    }
/* ===== DASHBOARD STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}


.stat-icon {
    font-size: 22px;
    color: #3b82f6;
}

.stat-number {
    font-size: 20px;
    font-weight: 600;
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 80px;
    padding: 18px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.quick-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 80px;
    padding: 14px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: 0.2s;
}

    .quick-card:hover {
        background: #eef2ff;
    }

@media (max-width: 768px) {

    .quick-grid {
        grid-auto-rows: auto;
        gap: 12px;
    }

    .quick-card {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 16px;
        height: auto;
        /* makes it square */
    }

        .quick-card i {
            font-size: 22px;
            margin-bottom: 6px;
        }

        .quick-card span {
            font-size: 12px;
        }
}

.mvm-field-changed {
    background-color: #fff3cd;
    border-left: 4px solid #ff9800;
    padding-left: 6px;
}

.mvm-old {
    color: #999;
    text-decoration: line-through;
}

.mvm-new {
    color: #2ecc71;
    font-weight: 600;
}

.mvm-arrow {
    margin: 0 8px;
}
/* ── OVERLAY ── */
.mvm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.legend-box {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #fff3cd;
    border-left: 4px solid #ff9800;
    margin-right: 6px;
}
/* ── DIALOG ── */
.mvm-dialog {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
}

/* ── HEADER ── */
.mvm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

    .mvm-header h4 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: #1a1a2e;
    }

.mvm-close {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

    .mvm-close:hover {
        background: #f5f5f5;
    }

/* ── BODY ── */
.mvm-body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
}

.mvm-loading {
    text-align: center;
    padding: 40px 0;
    color: #888;
    font-size: 0.9rem;
}

.mvm-section {
    margin-bottom: 8px;
}

.mvm-array-card {
    margin-top: 14px;
}





.mvm-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 6px;
}

/* ── CARD ── */
.mvm-card {
    background: #f9f9fb;
    border: 1px solid #ebebf0;
    border-radius: 10px;
    padding: 12px 14px;
}

.mvm-card1 {
    background: #f9f9fb;
    border: 1px solid #ebebf0;
    border-radius: 10px;
    padding: 10px 1px;
}

.mvm-list-item {
    margin-bottom: 8px;
}

@media (max-width: 768px) {

    /*    .mvm-grid-2 {
        grid-template-columns: 1fr ;
    }*/

    .mvm-full-width {
        grid-column: 1;
    }

    .mvm-dialog {
        width: 95%;
        height: 95%;
        margin: auto;
        border-radius: 8px;
    }

    .mvm-body {
        max-height: calc(95vh - 60px);
        overflow-y: auto;
    }

    .mvm-list-table {
        min-width: 600px;
        font-size: 0.7rem;
    }

        .mvm-list-table th,
        .mvm-list-table td {
            padding: 4px 6px;
        }

    .mvm-field {
        display: flex;
        flex-direction: column;
    }
}
/* ── PROFILE ROW ── */
.mvm-profile-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.mvm-avatar {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}

.mvm-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: #e8eaf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.mvm-profile-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

/* ── GRID ── */
.mvm-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px 18px;
    align-items: center;
}

.mvm-grid-21 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 6px 12px;
    align-items: center;
}




.mvm-span-2 {
    grid-column: span 2;
}

/* ── FIELD ── */
.mvm-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mvm-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mvm-value {
    font-size: 0.85rem;
    color: #1a1a2e;
    font-weight: 500;
    word-break: break-word;
}

.mvm-bold {
    font-weight: 700;
}

/* ── BADGE ── */
.mvm-badge-active {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 2px;
}

/* ── QR ── */
.mvm-qr-box {
    display: flex;
    justify-content: center;
    padding: 16px;
}

.mvm-qr {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

/* ── FOOTER ── */
.mvm-footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.mvm-close-btn {
    width: 100%;
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

    .mvm-close-btn:hover {
        background: #c62828;
    }

/* ── MOBILE ── */
@media (max-width: 768px) {
    .mvm-dialog {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
    }

    .mvm-overlay {
        align-items: flex-end;
        padding: 0;
    }

    /*    .mvm-profile-row {
        flex-direction: column;
        
    }

    .mvm-profile-grid {
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }*/


}

@media (max-width: 768px) {
    /*    .mvm-grid-2 {
        grid-template-columns: 1fr;
    }*/

    /*    .mvm-profile-grid {
        grid-template-columns: 1fr;
    }*/

    .mvm-span-2 {
        grid-column: span 1;
    }
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-icon-btn {
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
    color: #555;
}

    .view-icon-btn:hover {
        color: #007bff;
    }
/* ── CASTE TABLE ── */
.vvm-table-header,
.vvm-table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 4px;
    padding: 6px 14px;
    font-size: 0.78rem;
}

.vvm-table-row-g {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 6px 14px;
    font-size: 0.78rem;
}

.vvm-table-header {
    background: #ebebf0;
    border-radius: 8px 8px 0 0;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}

.vvm-table-row, .vvm-table-row-g {
    background: #f9f9fb;
    border-bottom: 1px solid #ebebf0;
    color: #1a1a2e;
}

    .vvm-table-row:last-child, .vvm-table-row-g:last-child {
        border-bottom: none;
        border-radius: 0 0 8px 8px;
    }

    .vvm-table-row:nth-child(even), .vvm-table-row-g:nth-child(even) {
        background: #f3f3f7;
    }

.mvm-badge-inactive {
    display: inline-block;
    background: #fce4e4;
    color: #c62828;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 2px;
}

@media (max-width: 400px) {
    .vvm-table-header,
    .vvm-table-row {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        font-size: 0.72rem;
    }
        /* hide Yuva column on very small screens */
        .vvm-table-header span:nth-child(4),
        .vvm-table-row span:nth-child(4) {
            display: none;
        }

    .vvm-table-row-g {
        grid-template-columns: 2fr 1fr;
        font-size: 0.72rem;
    }
        /* hide Yuva column on very small screens */

        .vvm-table-row-g span:nth-child(4) {
            display: none;
        }
}
/* Role badge in sidebar */
/* Sidebar profile section */
.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    margin-bottom: 8px;
}

/* Profile image */
.sidebar-logo {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    display: block;
    margin: 10px auto 8px auto;
    object-fit: cover;
    border: 3px solid #dbeafe;
    box-shadow: 0 0 0 3px #6366f1;
}

/* Role badge */
.role-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 12px;
    margin-bottom: 6px;
}

/* Username */
.user-name-label {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
}

/* Role colors */
.role-1 {
    background: #7c3aed;
    color: white;
}

.role-2 {
    background: #0b42f6;
    color: white;
}

.role-3 {
    background: #1eb907;
    color: white;
}

.c-btn {
    background-color: #f44336;
    position: relative;
    width: 100px;
    color: #fff;
    border: none;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.c1-btn {
    background-color: #0a0ffe;
    position: relative;
    width: 100px;
    color: #fff;
    border: none;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.role-4 {
    background: #ea580c;
    color: white;
}
/* Welcome banner */
.welcome-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #ddd;
}

.custom-btn {
    background: #666;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
}

.role-chip {
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.welcome-text {
    font-size: 1rem;
    color: var(--text);
}


/* Pending cards */
.pending-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    padding: 2px 7px;
    border-radius: 8px;
    margin-left: 8px;
    vertical-align: middle;
}

.pending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.pending-card {
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: 0.2s ease;
}

    .pending-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    }

/* Header */
.pc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pc-module-badge {
    background: #eef2ff;
    color: #4f46e5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.pc-status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Status colors */
.s-pending {
    background-color: #fff7ed;
    color: #ea580c;
}

.s-approved {
    background-color: #ecfdf5;
    color: #059669;
}

.s-rejected {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Body */
.pc-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.pc-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: 13px;
}

.pc-row-time {
    white-space: nowrap;
    min-width: 0;
}

.pc-row-time span {
    white-space: nowrap;
}

    .pc-row i {
        color: #6b7280;
        width: 16px;
    }

.pc-person-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    grid-column: 1 / -1;
}

    .pc-person-details .pc-row span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

/* Actions */
/*.pc-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}*/
.pc-actions {
    display: grid;
    grid-template-columns: 100px 100px 100px;
    align-content: center;
    gap: 8px;
    margin-top: 10px;
}
    /* Buttons */
    .pc-actions button {
        border: none;
        border-radius: 8px;
        padding: 8px 14px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: 0.2s ease;
    }

        .pc-actions button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

@media (max-width: 768px) {
    .pc-actions {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        margin-top: 10px;
    }

        .pc-actions button {
            padding: 8px;
            font-size: 12px;
            border-radius: 8px;
            justify-content: center;
        }
}
/* Approve */
.btn-approve {
    background-color: #10b981;
    color: white;
}

    .btn-approve:hover {
        background-color: #059669;
    }

/* Reject */
.btn-reject {
    background-color: #ef4444;
    color: white;
}

    .btn-reject:hover {
        background-color: #dc2626;
    }

/* Edit */
.btn-edit {
    background-color: #3b82f6;
    color: white;
}

    .btn-edit:hover {
        background-color: #2563eb;
    }

/* Card border accents by status */
.status-pending {
    border-left: 4px solid #f97316;
}

.status-approved {
    border-left: 4px solid #10b981;
}

.status-rejected {
    border-left: 4px solid #ef4444;
}

.pending-card {
    border-radius: 10px;
    padding: 12px;
    background: var(--card-bg);
    border-left: 4px solid #94a3b8;
}

    .pending-card.status-pending {
        border-left-color: #f59e0b;
    }

    .pending-card.status-rejected {
        border-left-color: #ef4444;
    }

    .pending-card.status-approved {
        border-left-color: #22c55e;
        opacity: 0.65;
    }

.pending-card-header {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.pending-module {
    font-weight: 700;
    font-size: 0.85rem;
}

.pending-op {
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #334155;
}

.op-delete {
    background: #fee2e2;
    color: #991b1b;
}

.op-insert {
    background: #dcfce7;
    color: #166534;
}

.op-update {
    background: #dbeafe;
    color: #1e40af;
}

.pending-status-chip {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.status-pending1 .pending-status-chip {
    background: #fef3c7;
    color: #92400e;
}

.status-rejected .pending-status-chip {
    background: #fee2e2;
    color: #991b1b;
}

.status-approved .pending-status-chip {
    background: #dcfce7;
    color: #166534;
}

.pending-card-body {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 6px;
}

.pending-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-approve {
    background: #2f80ed;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-reject {
    background: #eb5757;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.8rem;
    cursor: pointer;
}

    .btn-approve:disabled, .btn-reject:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.approve-all-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.btn-approve-all {
    background: #6c4cff;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

    .btn-approve-all:disabled {
        opacity: 0.5;
    }

.pending-badge {
    background: orange;
    color: #fff;
    border-radius: 50px;
    padding: 2px 8px;
    font-size: 12px;
    margin-left: 6px;
}
/* ── Hero ─────────────────────────────────────────────────────────── */
.mp-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.mp-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.mp-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #94a3b8;
}

.mp-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.mp-nickname {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 6px;
}

.mp-code-chip, .mp-village-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    background: #f1f5f9;
    padding: 3px 9px;
    border-radius: 10px;
    color: #475569;
    margin-right: 6px;
    margin-top: 4px;
}

/* ── Sections ─────────────────────────────────────────────────────── */
.mp-section {
    margin-bottom: 16px;
}

.mp-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.mp-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.mp-list-item {
    margin-bottom: 10px;
}

/* ── Grid ─────────────────────────────────────────────────────────── */
.mp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
}

.mp-span-2 {
    grid-column: span 2;
}

/* ── Field ────────────────────────────────────────────────────────── */
.mp-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mp-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mp-value {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
}

.mp-bold {
    font-weight: 700;
}

.mp-sensitive {
    font-family: monospace;
    letter-spacing: 0.08em;
}

.mp-icon-sm {
    font-size: 0.75rem;
    color: #64748b;
}

/* ── Volunteer badge ──────────────────────────────────────────────── */
.mp-volunteer-badge {
    background: #dcfce7;
    color: #166534;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ── QR ───────────────────────────────────────────────────────────── */
.mp-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mp-qr {
    width: 160px;
    height: 160px;
    border-radius: 10px;
}

.mp-qr-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ── States ───────────────────────────────────────────────────────── */
.mp-loading, .mp-error {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mp-error {
    color: #ef4444;
}
/* ── Pending card ──────────────────────────────────────────────── */
.pending-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    border-left: 4px solid #94a3b8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

    .pending-card.status-pending {
        border-left-color: #f59e0b;
    }

    .pending-card.status-approved {
        border-left-color: #22c55e;
        opacity: 0.7;
    }

    .pending-card.status-rejected {
        border-left-color: #ef4444;
        opacity: 0.7;
    }

.pending-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.pending-module-chip {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #334155;
}

.mod-member {
    background: #dbeafe;
    color: #1e40af;
}

.mod-village {
    background: #dcfce7;
    color: #166534;
}

.mod-grampradhan {
    background: #fef3c7;
    color: #92400e;
}

.pending-op {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 600;
}

.op-insert {
    background: #dcfce7;
    color: #166534;
}

.op-update {
    background: #dbeafe;
    color: #1e40af;
}

.op-delete {
    background: #fee2e2;
    color: #991b1b;
}

.pending-status-chip {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 10px;
}

.status-pending1 .pending-status-chip {
    background: #fef3c7;
    color: #92400e;
}

.status-approved .pending-status-chip {
    background: #dcfce7;
    color: #166534;
}

.status-rejected .pending-status-chip {
    background: #fee2e2;
    color: #991b1b;
}

.pending-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
    gap: 8px;
    flex-wrap: wrap;
}

.pending-time {
    color: #94a3b8;
}

.pending-reviewed {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 6px;
}

.pending-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-approve {
    flex: 1;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 0;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-reject {
    flex: 1;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 0;
    font-size: 0.8rem;
    cursor: pointer;
}

    .btn-approve:disabled, .btn-reject:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

/* ── Filter bar ─────────────────────────────────────────────────── */
.pl-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.pl-filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-chip {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: var(--card-bg);
    color: #64748b;
    cursor: pointer;
}

    .filter-chip.active {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }

    .filter-chip.s-pending.active {
        background: #f59e0b;
        border-color: #f59e0b;
    }

    .filter-chip.s-approved.active {
        background: #22c55e;
        border-color: #22c55e;
    }

    .filter-chip.s-rejected.active {
        background: #ef4444;
        border-color: #ef4444;
    }

/* ── Summary counts ─────────────────────────────────────────────── */
.pl-summary {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.pl-count-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 10px;
}

    .pl-count-chip.s-pending {
        background: #fef3c7;
        color: #92400e;
    }

    .pl-count-chip.s-approved {
        background: #dcfce7;
        color: #166534;
    }

    .pl-count-chip.s-rejected {
        background: #fee2e2;
        color: #991b1b;
    }

/* ── Approve all / section header ───────────────────────────────── */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

.section-title {
    font-weight: 600;
    font-size: 16px;
}

.btn-view-all {
    background: none;
    border: none;
    color: #4f46e5;
    cursor: pointer;
    font-size: 15px;
}

.approve-all-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.btn-approve-all {
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .btn-approve-all:disabled {
        opacity: 0.5;
    }

/* ── Toast ──────────────────────────────────────────────────────── */
.pl-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideUp 0.3s ease;
}

.toast-success {
    background: #22c55e;
    color: #fff;
}

.toast-error {
    background: #ef4444;
    color: #fff;
}

.booth-refresh-toast {
    position: fixed;
    top: calc(18px + var(--app-safe-area-top, 0px));
    right: 18px;
    z-index: 9999;
    max-width: min(420px, calc(100vw - 28px));
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    animation: boothToastIn 0.32s cubic-bezier(.2,.85,.25,1) both;
}

.booth-refresh-toast.toast-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.booth-refresh-toast.toast-error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.booth-refresh-toast i {
    font-size: 17px;
}

.booth-refresh-toast.is-closing {
    animation: boothToastOut 0.28s ease-in both;
}

@keyframes boothToastIn {
    from {
        opacity: 0;
        transform: translateX(115%) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes boothToastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(115%) scale(.96);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ── Empty / loading states ─────────────────────────────────────── */
.empty-pending, .loading-row {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pending-badge {
    background: #f59e0b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 6px;
}

.pending-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    border-left: 4px solid #f59e0b;
}

.pending-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

@media (max-width: 480px) {
    .pending-card {
        margin: 10px 12px;
        padding: 14px;
    }

    .btn-view {
        width: 70px;
    }

    .pending-actions {
        gap: 8px;
    }
}

@media (max-width: 600px) {

    .page-container {
        max-width: 100%;
        margin: 0;
        padding: 10px;
        box-sizing: border-box;
    }

    .pending-list {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .pending-card {
        width: 100%;
        padding: 14px;
        margin: 0;
        border-radius: 14px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .pending-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .pending-info {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 6px;
        font-size: 14px;
    }

        .pending-info span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    .pending-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        width: 100%;
    }

        .pending-actions button {
            flex: 1;
            min-width: 0;
            padding: 10px;
            font-size: 14px;
        }

    /* Prevent horizontal scroll in MAUI */
    body {
        overflow-x: hidden;
    }

    * {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .pending-actions {
        flex-direction: column;
    }
}

.pending-left {
    display: flex;
    gap: 8px;
}

.module-chip {
    background: #eef2ff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
}

.operation-chip {
    background: #ecfeff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
}

.status-chip {
    background: #fef3c7;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.pending-meta {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 12px;
}

.meta-item {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
}

.pending-actions {
    display: flex;
    gap: 10px;
}

.approve-btn {
    flex: 1;
    background: #2f80ed;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 8px;
}

.reject-btn {
    flex: 1;
    background: #eb5757;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 8px;
}

.reviewed-info {
    color: #6b7280;
    font-size: 13px;
}

.user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.user-name {
    font-weight: 600;
}

.user-role {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    margin-top: 4px;
}



.btn-edit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px;
}

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px;
}

.mvm-field-changed {
    background-color: #fff8e1;
    border-left: 3px solid #f59e0b;
    padding-left: 8px;
    border-radius: 4px;
}

    .mvm-field-changed .mvm-label::after {
        content: " ✏️";
        font-size: 11px;
    }
/*.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
}

    .modal-box input, .modal-box select {
        width: 100%;
        margin-bottom: 10px;
        padding: 8px;
    }*/

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right {
    display: flex;
    align-items: center;
}

.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .logout-btn:hover {
        background: #dc2626;
    }


@media (max-width: 768px) {
    .stats-grid,
    .quick-grid {
        grid-auto-rows: auto;
    }
}

@media (max-width: 480px) {
    .stats-grid,
    .quick-grid {
        grid-template-columns: 1fr;
    }

    @media (max-width: 480px) {
        .stat-number {
            font-size: 18px;
        }

        .stat-label {
            font-size: 12px;
        }
    }

    @media (max-width: 480px) {
        .welcome-banner {
            flex-direction: column;
            align-items: flex-start;
        }
    }

    @media (max-width: 480px) {
        .page-container {
            padding: 12px;
        }
    }

    .crop-modal {
        width: 95%;
        max-width: 400px;
    }

    .crop-image {
        width: 100%;
        max-height: 60vh;
        object-fit: contain;
    }

    .photo-actions {
        display: flex;
        gap: 8px;
        margin-top: 8px;
        flex-wrap: wrap;
        position: relative;
        z-index: 2;
    }
}

@media (max-width: 600px) {
    .crop-modal {
        width: 95%;
        height: auto;
    }

    .crop-image {
        max-height: 50vh;
    }

    .photo-actions button {
        flex: 1;
        position: relative;
        z-index: 3;
        touch-action: manipulation;
    }
}

.mvm-full-width {
    grid-column: 1 / -1;
}

.mvm-table-wrapper {
    overflow-x: auto;
    margin-top: 4px;
}

.mvm-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    table-layout: fixed;
}

    .mvm-list-table th {
        background: #f0f4f8;
        padding: 6px 10px;
        font-weight: 600;
        color: #555;
        border: 1px solid #dde3ea;
        white-space: nowrap;
    }

    .mvm-list-table td {
        padding: 5px 10px;
        border: 1px solid #dde3ea;
        color: #333;
    }

    .mvm-list-table th,
    .mvm-list-table td {
        text-align: center;
    }

        .mvm-list-table th:first-child,
        .mvm-list-table td:first-child {
            text-align: left;
        }

    .mvm-list-table tbody tr:nth-child(even) {
        background: #f9fbfc;
    }

    .mvm-list-table th:first-child,
    .mvm-list-table td:first-child {
        width: 140px;
    }

.mvm-full-width {
    grid-column: 1 / -1;
    margin-top: 6px;
}

    .mvm-full-width .mvm-label {
        font-weight: 600;
        margin-bottom: 4px;
        display: block;
    }

.mvm-array-card {
    gap: 8px;
    margin-top: 12px;
}

.mvm-photo-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.mvm-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border-tertiary);
}

/* Container to hold both the row of buttons and the info text */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 12px 4px;
    width: 100%;
}

.pagination-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px; /* Modern squircle look */
    background: #ffffff;
    color: #0d74f2; /* Dark slate gray for better contrast */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother animation */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* Subtle depth */
}

    /* Hover State */
    .page-btn:hover:not(:disabled) {
        background: #f8faff;
        border-color: #4f6ef7;
        color: #4f6ef7;
        transform: translateY(-1px); /* Slight lift effect */
        box-shadow: 0 4px 8px rgba(79, 110, 247, 0.15); /* Colored shadow on hover */
    }

    /* Active/Current Page State */
    .page-btn.active {
        background: #0d74f2;
        border-color: #0d74f2;
        color: #ffffff;
        font-weight: 600;
        pointer-events: none; /* Prevents clicking the active page */
        box-shadow: 0 4px 10px rgba(79, 110, 247, 0.3);
    }

    /* Disabled State */
    .page-btn:disabled {
        background: #f9fafb;
        color: #9ca3af;
        border-color: #f3f4f6;
        cursor: not-allowed;
        box-shadow: none;
        transform: none;
    }

/* Ellipsis */
.page-ellipsis {
    display: flex;
    align-items: flex-end; /* Aligns the dots lower for better typography */
    justify-content: center;
    padding: 0 4px;
    height: 38px;
    color: #9ca3af;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    padding-bottom: 8px; /* Balances the dots visually */
}

/* Info Text */
.pagination-info {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
}

/* Focus State for Accessibility */
.page-btn:focus-visible {
    outline: 2px solid #4f6ef7;
    outline-offset: 2px;
}





.view-icon-btn {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.list-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px;
}

.card-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-details .title {
    font-weight: 500;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-details .sub {
    font-size: 13px;
    color: #666;
}

/* ===== PENDING CARD MOBILE FIX (MAUI) ===== */
@media (max-width: 768px) {

    .pending-card {
        width: 100%;
        box-sizing: border-box;
        margin: 8px 0;
        padding: 12px;
    }

    .pending-card-body {
        flex-direction: column;
        gap: 6px;
        font-size: 13px;
    }

    .pending-card-actions,
    .pc-actions {
        flex-direction: column;
        width: 100%;
    }

        .pending-card-actions button,
        .pc-actions button {
            width: 100%;
        }

    /* Prevent container cropping in MAUI */
    .page-container {
        min-height: 500px;
        height: auto;
        overflow: visible;
    }

    .page-content {
        overflow-y: auto;
    }
}

.village-search {
    position: relative;
}

.member-add-lookup-search-row,
.village-search-with-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: center;
}

.member-add-lookup-search-row {
    margin-bottom: 10px;
}

.member-add-lookup-search-row .form-input,
.village-search-with-add .form-input {
    min-width: 0;
}

.member-add-lookup-add-btn {
    width: 42px;
    height: 42px;
    border: 1px solid #7db7ff;
    border-radius: 8px;
    background: #2f80ed;
    color: #ffffff;
    display: inline-grid;
    place-items: center;
    box-shadow: 0 8px 18px rgba(47, 128, 237, 0.18);
    cursor: pointer;
}

.member-add-lookup-add-btn:hover {
    background: #1d6fe0;
}

.village-dropdown {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
}

.village-item {
    padding: 6px;
    cursor: pointer;
}

    .village-item:hover {
        background: #f0f0f0;
    }

.vvm-table-header {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    font-weight: 600;
    background: #e9e3e3;
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 10px;
}

.vvm-table-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.vvm-table-row-g {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

    .vvm-table-row:nth-child(even), .vvm-table-row-g:nth-child(even) {
        background: #fafafa;
    }

    .vvm-table-row span:nth-child(5),
    .vvm-table-row-g span:nth-child(3),
    .vvm-table-header span:nth-child(5) {
        grid-column: auto;
    }
/* ===== REGISTRATION LINKS MODAL ===== */

.link-modal {
    width: 520px;
    max-width: 95%;
}

.link-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #f9fafb;
    transition: 0.15s ease;
}

    .link-card:hover {
        background: #f1f5f9;
        border-color: #cbd5f5;
    }

.link-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #374151;
}

.link-url {
    font-size: 12px;
    background: #ffffff;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    word-break: break-all;
    margin-bottom: 8px;
    color: #111827;
}

.link-actions {
    display: flex;
    gap: 8px;
}

/* Copy button */
.copy-btn {
    flex: 1;
    background: #e5e7eb;
    color: #111827;
    border: none;
    padding: 6px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

    .copy-btn:hover {
        background: #d1d5db;
    }

/* Share button */
.share-btn {
    flex: 1;
    background: #2563eb;
    color: white;
    border: none;
    padding: 6px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

    .share-btn:hover {
        background: #1d4ed8;
    }

.link-card.admin {
    border-left: 4px solid #2563eb;
}

.link-card.editor {
    border-left: 4px solid #16a34a;
}

.link-card.viewer {
    border-left: 4px solid #ea580c;
}

.role-banner {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
}

.role-tabs {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.tab {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 13px;
}

    .tab.active {
        background: #0d74f2;
        color: white;
        border-color: #0d74f2;
    }

.note-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.serial {
    width: 20px;
    font-weight: bold;
}

.add-btn {
    margin-top: 8px;
}

.remove-btn {
    background: #e74c3c;
    color: white;
}
/*.point-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.serial {
    width: 20px;
    font-weight: bold;
}*/

.add-btn {
    margin-top: 6px;
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 4px 8px;
}
/* Replace your existing .point-row rule with this */
.point-row-first {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
}

.point-row,
.point-row-first {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
}

    /* Serial badge - fixed small size */
    .point-row .serial,
    .point-row-first .serial {
        width: 28px;
        min-width: 28px;
        height: 28px;
        background: #e8f1ff;
        color: #2563eb;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 13px;
        flex-shrink: 0;
    }

    /* Input takes most of the space */
    .point-row .form-input,
    .point-row-first .form-input {
        flex: 1 1 0;
        min-width: 0;
    }

    /* Delete button - fixed narrow width */
    .point-row .btn-delete {
        flex-shrink: 0;
        width: 70px; /* ← fixed narrow width */
        padding: 6px 0;
        font-size: 12px;
        white-space: nowrap;
        border-radius: 8px;
        background: #ef4444;
        color: white;
        border: none;
        font-weight: 600;
        min-height: 36px;
        text-align: center;
    }

    /* Add (+) button - fixed narrow width */
    .point-row-first .add-btn {
        flex-shrink: 0;
        width: 44px; /* ← fixed narrow width */
        height: 36px;
        border-radius: 8px;
        background: #22c55e;
        color: white;
        border: none;
        font-size: 20px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

/* Point label in first row */
.point-label {
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    min-width: 60px;
}

.point-row-first .point-label {
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}


.point-row {
    display: flex; /* ← flex, NOT grid */
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
}

@media (max-width: 780px) {
    .point-row,
    .point-row-first {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
    }

        .point-row .serial,
        .point-row-first .serial {
            width: 24px !important;
            min-width: 24px !important;
            max-width: 24px !important;
            height: 24px !important;
            font-size: 11px !important;
            flex-shrink: 0 !important;
        }

        .point-row .form-input,
        .point-row-first .form-input {
            flex: 1 1 0 !important;
            min-width: 0 !important;
            max-width: unset !important;
            width: auto !important;
            height: 36px !important;
            font-size: 14px !important;
            padding: 6px 8px !important;
        }

        .point-row .btn-delete {
            flex: 0 0 60px !important; /* ← flex-basis instead of width */
            width: 60px !important;
            min-width: 60px !important;
            max-width: 60px !important;
            padding: 6px 0 !important;
            font-size: 11px !important;
            min-height: 36px !important;
        }

        /* THIS is the key fix - add-btn was stretching */
        .point-row-first .add-btn,
        button.add-btn {
            flex: 0 0 36px !important; /* ← stops it from growing */
            width: 36px !important;
            min-width: 36px !important;
            max-width: 36px !important;
            height: 36px !important;
            font-size: 18px !important;
            padding: 0 !important;
            border-radius: 8px !important;
        }
}
/*
.app-header {
    position: relative;
    z-index: 1100;
}
*/
.serial {
    background: #f0f0f0;
    padding: 6px;
    text-align: center;
    border-radius: 4px;
    font-weight: 600;
}
/* Photo wrapper sits in the grid as a natural cell, spanning 1 col and 2 rows */
.mvm-photo-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    grid-row: span 2; /* takes 2 field rows of height */
}

.mvm-avatar {
    width: 88px;
    height: 88px;
    border-radius: var(--border-radius-md);
    object-fit: cover;
    border: 0.5px solid var(--color-border-tertiary);
}

/* On very small screens, make photo full-width above fields */
@media (max-width: 480px) {
    .mvm-photo-wrapper {
        grid-column: 1 / -1;
        grid-row: span 1;
        justify-content: center;
    }

    .mvm-avatar {
        width: 72px;
        height: 72px;
    }
}

.photo-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
    color: #555;
    font-size: 14px;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #ddd;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Habits modal spacing + dropdown visibility */
.modal-box.habit-modal {
    max-width: 560px;
}

    .modal-box.habit-modal .habit-modal-body {
        padding-bottom: 84px;
    }

    .modal-box.habit-modal .habit-modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 14;
        background: #fff;
        border-top: 1px solid #e5e7eb;
    }

    .modal-box.habit-modal .village-dropdown {
        z-index: 25;
    }

/* Habits table readability in member view modals */
.vvm-table-habits-header,
.vvm-table-habits-row {
    grid-template-columns: minmax(110px, 0.9fr) minmax(0, 2.1fr);
    align-items: start;
}

    .vvm-table-habits-row span:last-child {
        white-space: pre-wrap;
        line-height: 1.35;
        word-break: break-word;
    }

@media (max-width: 768px) {
    .modal-box.habit-modal {
        width: min(94vw, 560px);
        max-height: 86vh;
        display: flex;
        flex-direction: column;
    }

        .modal-box.habit-modal .habit-modal-body {
            overflow-y: auto;
            padding-bottom: 104px;
        }

    .vvm-table-habits-header,
    .vvm-table-habits-row {
        grid-template-columns: minmax(88px, 0.85fr) minmax(0, 2.15fr);
    }
}
/* WEB */
.duplicate-table-wrapper {
    overflow-x: hidden;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.duplicate-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .duplicate-table th,
    .duplicate-table td {
        padding: 6px 8px;
        font-size: 13px;
        border-bottom: 1px solid #e5e7eb;
        vertical-align: top;
        word-break: normal;
    }

        .duplicate-table th:nth-child(1),
        .duplicate-table td:nth-child(1) {
            width: 20%;
        }


        .duplicate-table th:nth-child(2),
        .duplicate-table td:nth-child(2) {
            width: 10%;
        }

        .duplicate-table th:nth-child(3),
        .duplicate-table td:nth-child(3) {
            width: 30%;
            /*            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;*/
        }

        .duplicate-table th:nth-child(4),
        .duplicate-table td:nth-child(4) {
            width: 40%;
        }

.duplicate-action-buttons {
    display: flex;
    gap: 4px;
}

.duplicate-action-btn {
    flex: 1;
    min-height: 28px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    font-size: 11px; /* ↓ smaller */
    border-radius: 6px;
    white-space: nowrap;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
}

    .duplicate-action-btn.same.active {
        background: #2563eb;
        border-color: #2563eb;
        color: #fff;
    }

    .duplicate-action-btn.create.active {
        background: #f59e0b;
        border-color: #f59e0b;
        color: #fff;
    }

.duplicate-selected-text {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
}

/* MOBILE */
@media (max-width: 768px) {
    .modal-box {
        width: 94%;
        max-height: 88dvh;
    }

    .duplicate-table,
    .duplicate-table thead,
    .duplicate-table tbody,
    .duplicate-table tr,
    .duplicate-table th,
    .duplicate-table td {
        display: block;
        width: 100% !important;
    }

        .duplicate-table thead {
            display: none;
        }

        .duplicate-table tr {
            padding: 12px;
            border-bottom: 1px solid #e5e7eb;
        }

        .duplicate-table td {
            display: grid;
            grid-template-columns: 95px 1fr;
            gap: 8px;
            padding: 7px 0;
            border-bottom: none;
            font-size: 13px;
        }

            .duplicate-table td::before {
                font-weight: 700;
                color: #374151;
            }

            .duplicate-table td:nth-child(1)::before {
                content: "Name";
            }

            .duplicate-table td:nth-child(2)::before {
                content: "Source";
            }

            .duplicate-table td:nth-child(3)::before {
                content: "Type";
            }

            .duplicate-table td:nth-child(4)::before {
                content: "Connected";
            }

            .duplicate-table td:nth-child(5)::before {
                content: "Action";
            }

    .duplicate-action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .duplicate-action-btn {
        min-height: 40px;
        font-size: 12px;
        padding: 7px 6px;
    }

    .duplicate-selected-text {
        grid-column: 2;
        margin-top: 4px;
    }
}

.mp-candidate-card {
    border-left: 4px solid #155a9c;
}

    .mp-candidate-card .mp-value {
        word-break: break-word;
    }

@media (max-width: 640px) {
    .mp-candidate-card {
        grid-template-columns: 1fr;
    }

        .mp-candidate-card .mp-span-2 {
            grid-column: span 1;
        }
}

@media (max-width: 768px) {

    .mvm-profile-row {
        flex-direction: column;
        align-items: stretch; /* important */
    }

    .mvm-profile-grid {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .mvm-field,
    .mvm-value,
    .mvm-label {
        text-align: left;
    }
}
/* ===== MOBILE SPACING FIX ===== */
@media (max-width: 768px) {

    /* Fix 1: Remove excessive gap between field rows */
    .form-grid .field-row,
    .two-column-form .field-row,
    .form-column .field-row {
        margin-bottom: 6px !important;
        min-height: 38px;
    }

    /* Fix 2: Remove dead space before action footer */
    .page-content {
        padding-bottom: 70px !important; /* was 120px — just enough to clear footer */
    }

    .page-container .page-content {
        padding-bottom: 70px !important;
    }

    /* Fix 3: Tighten the list-card padding so cards don't add extra space */
    .list-card {
        padding: 10px 12px;
        margin-bottom: 8px;
    }

    /* Fix 4: Remove gap between form columns (they're stacked on mobile) */
    .two-column-form {
        gap: 0 !important;
    }

    .form-column {
        gap: 0 !important;
    }
}

.event-card {
    border-left: 4px solid #2f80ed;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 12px;
    padding: 12px;
}

.event-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.event-title {
    margin-top: 6px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.35;
}

.event-date-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 0.92rem;
}

.event-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
}

/* ===== DAILY GREETINGS CENTER ===== */
.daily-greetings-page {
    padding: 1rem;
    background: #f5f7fb;
    min-height: 100%;
}

.daily-header,
.daily-actions,
.daily-list {
    padding: 1rem;
    margin-bottom: 0.9rem;
}

.daily-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.daily-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.stat-box {
    background: #f8faff;
    border: 1px solid #dde5f2;
    border-radius: 12px;
    padding: 0.55rem;
    text-align: center;
}

    .stat-box strong {
        display: block;
        color: #2f4472;
        font-size: 1rem;
    }

    .stat-box span {
        font-size: 0.78rem;
        color: #6b7790;
    }

.daily-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.daily-list h3 {
    margin: 0 0 0.8rem;
    font-size: 1rem;
}

.daily-item {
    border: 1px solid #e2e8f3;
    border-radius: 12px;
    padding: 0.65rem;
    background: #fff;
    margin-bottom: 0.6rem;
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    cursor: pointer;
}

    .daily-item.active {
        border-color: #9db3e0;
        box-shadow: 0 0 0 2px rgba(98, 122, 177, 0.12);
    }

.daily-tags {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-end;
}

.status-pill {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
}

.status-pending1 {
    background: #fff4da;
    color: #996e10;
}

.status-generated {
    background: #e9f3ff;
    color: #2f5d99;
}

.status-shared {
    background: #e6f7ea;
    color: #237447;
}

@media (min-width: 980px) {
    .daily-grid {
        grid-template-columns: 0.95fr 1.05fr;
    }
}

.status-done {
    background: #e8f8ee;
    color: #177a3f;
    border-color: #b7e7c8;
}

.status-pending1 {
    background: #fff6e9;
    color: #a56208;
    border-color: #f0d2a2;
}

/* ===== DAILY GREETINGS CENTER (REFERENCE MATCH) ===== */
.dgc-page {
    background: #f3f4f8;
    min-height: 100%;
    padding: 14px 12px 22px;
    font-weight: 500;
}

.dgc-topbar {
    background: #fff;
    border-radius: 24px 24px 14px 14px;
    padding: 14px 12px;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    margin-bottom: 10px;
}

.dgc-top-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #13214e;
}

.dgc-icon-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: #eff0fa;
    color: #1b2a53;
    font-size: 18px;
    display: grid;
    place-items: center;
}

.dgc-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 18px 16px 14px;
    background: linear-gradient(120deg, #6f59ea 0%, #8c6cf0 42%, #b18cf5 100%);
    color: #fff;
}

.dgc-hero h2 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.15;
    font-weight: 500;
}

.dgc-hero p {
    margin: 0 0 14px;
    font-size: 12px;
    opacity: 0.95;
    max-width: 230px;
    font-weight: 500;
}

.dgc-gift {
    position: absolute;
    right: 20px;
    top: 0px;
    width: 110px;
    height: auto;
    filter: drop-shadow(0 12px 20px rgba(52, 31, 114, 0.35));
}

.dgc-confetti::before,
.dgc-confetti::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: 0.35;
}

.dgc-confetti::before {
    width: 170px;
    height: 170px;
    right: -30px;
    top: -50px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
}

.dgc-confetti::after {
    width: 130px;
    height: 130px;
    right: 22px;
    top: 30px;
    background: radial-gradient(circle, rgba(255,209,118,0.35) 0%, transparent 72%);
}

.dgc-date-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dgc-date-grid label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 500;
}

.dgc-select-wrap {
    position: relative;
}

.dgc-field-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.dgc-field-icon i {
    color: #6979a6;
    font-size: 14px;
}

.dgc-select {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: none;
    background: #fff;
    color: #1f2d54;
    font-size: 13px;
    padding: 0 10px 0 34px;
    font-weight: 500;
}

.dgc-fetch-btn {
    width: 100%;
    margin-top: 12px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(90deg, #5030ed 0%, #6842f0 100%);
    color: #fff;
    height: 56px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.dgc-fetch-btn:disabled {
    opacity: 0.7;
}

.dgc-status {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.96;
    font-weight: 500;
}

.dgc-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.dgc-tab {
    border: none;
    border-radius: 16px;
    height: 72px;
    background: #fff;
    color: #1b2850;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    gap: 4px;
    font-weight: 500;
}

.dgc-tab-icon {
    font-size: 16px;
}

.dgc-tab:nth-child(1) .dgc-tab-icon { color: #8a73f1; }
.dgc-tab:nth-child(2) .dgc-tab-icon { color: #3f8cff; }
.dgc-tab:nth-child(3) .dgc-tab-icon { color: #2db36d; }
.dgc-tab:nth-child(4) .dgc-tab-icon { color: #ff5aa8; }
.dgc-tab:nth-child(5) .dgc-tab-icon { color: #ff8f2c; }
.dgc-tab.active .dgc-tab-icon { color: #ffffff; }

.dgc-tab.active {
    color: #fff;
    background: linear-gradient(140deg, #8f7df5 0%, #6f55ef 100%);
}

.dgc-search-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.dgc-search-box {
    height: 50px;
    background: #fff;
    border: 1px solid #dee3f3;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    padding-right: 8px;
}

.dgc-search-icon {
    text-align: center;
}

.dgc-search-icon i {
    color: #7f8db2;
}

.dgc-search-box input {
    border: none;
    outline: none;
    font-size: 12px;
    color: #1f2c53;
    width: 100%;
    background: transparent;
}

.dgc-filter-btn {
    border: 1px solid #dde2f0;
    border-radius: 12px;
    background: #fff;
    color: #7786a9;
    font-weight: 700;
}

.dgc-filter-btn i {
    color: #7786a9;
}

.dgc-list-wrap {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #ebedf5;
    padding: 12px;
}

.dgc-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dgc-list-head h3 {
    margin: 0;
    font-size: 16px;
    color: #14214a;
    font-weight: 500;
}

.dgc-list-head span {
    color: #6248f0;
    font-weight: 500;
    font-size: 12px;
}

.dgc-empty {
    min-height: 320px;
    border: 1px solid #edf0f7;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fdfdff 100%);
}

.dgc-empty-cake {
    width: 170px;
    height: auto;
}

.dgc-empty-gift,
.dgc-empty-balloon {
    position: absolute;
}

.dgc-empty-gift {
    left: 26%;
    top: 38%;
    width: 54px;
    height: auto;
}

.dgc-empty-balloon {
    right: 27%;
    top: 31%;
    font-size: 32px;
}

.dgc-empty h4 {
    margin: 10px 0 6px;
    color: #17234e;
    font-size: 14px;
    font-weight: 500;
}

.dgc-empty p {
    margin: 0;
    max-width: 230px;
    color: #65759d;
    font-size: 12px;
    font-weight: 500;
}

.dgc-upcoming-btn {
    margin-top: 12px;
    border: 2px solid #8f78f3;
    background: #fff;
    color: #5e48ea;
    border-radius: 12px;
    height: 44px;
    padding: 0 18px;
    font-weight: 500;
}

.dgc-member-list {
    display: grid;
    gap: 8px;
}

.dgc-member-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid #edf0f6;
    background: #fff;
}

.dgc-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dcc8ff, #a98df5);
    color: #1f2650;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
}

.dgc-avatar-img {
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 10px rgba(32, 41, 82, 0.12);
    background: #f7f8fd;
}

.dgc-member-name {
    font-size: 14px;
    font-weight: 500;
    color: #15224b;
    line-height: 1.2;
}

.dgc-member-meta {
    margin-top: 2px;
    font-size: 12px;
    color: #5d6788;
    display: flex;
    gap: 9px;
}

.dgc-meta-occasion {
    color: #644df0;
    font-weight: 500;
}

.dgc-member-phone {
    margin-top: 2px;
    font-size: 12px;
    color: #293a67;
    font-weight: 500;
}

.dgc-member-actions {
    display: grid;
    gap: 6px;
    justify-items: end;
}

.dgc-action-whatsapp,
.dgc-action-telegram {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    display: grid;
    place-items: center;
    text-decoration: none;
}

.dgc-action-view {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 12px;
    background: #eef2ff;
    color: #4c56c7;
    display: grid;
    place-items: center;
}

.dgc-action-whatsapp {
    background: #e7f9ee;
    color: #1ca751;
}

.dgc-action-telegram {
    background: #f0ebff;
    color: #6f57f0;
}

.dgc-pill {
    min-width: 64px;
    text-align: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
}

.dgc-pill.sent {
    background: #e6f8eb;
    color: #188d45;
}

.dgc-pill.pending {
    background: #fff3df;
    color: #cb840e;
}

.dgc-pagination {
    margin-top: 10px;
}

.dgc-bottom-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dgc-preview-btn,
.dgc-sendall-btn {
    height: 48px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #d7dff3;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.dgc-preview-btn {
    background: #fff;
    color: #5d4fe4;
}

.dgc-sendall-btn {
    border: none;
    color: #fff;
    background: linear-gradient(90deg, #8a79f2 0%, #6a4eef 100%);
}

.dgc-preview-modal {
    width: min(92vw, 420px);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
}

.dgc-preview-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 14px 10px;
    border-bottom: 1px solid #e8ecf4;
}

.dgc-preview-modal-head h4 {
    margin: 0;
    font-size: 16px;
    color: #1f2a4f;
    font-weight: 600;
}

.dgc-modal-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: #f2f4fb;
    color: #5f6c8f;
}

.dgc-preview-modal-body {
    padding: 12px 14px;
}

.dgc-preview-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e2a4f;
}

.dgc-preview-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #65739a;
}

.dgc-preview-modal-body p {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #334163;
}

.dgc-preview-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 14px 14px;
}

.dgc-preview-close-btn,
.dgc-preview-send-btn {
    height: 40px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.dgc-preview-close-btn {
    border: 1px solid #d8def0;
    background: #fff;
    color: #46557f;
}

.dgc-preview-send-btn {
    border: none;
    color: #fff;
    background: linear-gradient(90deg, #8a79f2 0%, #6a4eef 100%);
}

.dgc-sendall-modal {
    width: min(560px, calc(100vw - 28px));
    border-radius: 14px;
    padding: 12px;
    max-height: calc(100vh - 26px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dgc-sendall-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dgc-sendall-head h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1b2450;
}

.dgc-sendall-progress {
    margin-top: 8px;
    font-size: 0.86rem;
    color: #5c678f;
}

.dgc-sendall-member {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e4e8f7;
    border-radius: 10px;
    background: #f9faff;
}

.dgc-sendall-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e2754;
}

.dgc-sendall-meta {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.88rem;
    color: #4a5684;
}

.dgc-sendall-preview-wrap {
    margin-top: 10px;
}

.dgc-sendall-preview-card {
    margin: 0;
    max-width: 100%;
}

.dgc-sendall-preview-card .premium-letter {
    margin-top: 10px;
}

.dgc-preview-date-line {
    margin: 2px 0 10px;
    font-size: 0.88rem;
    color: #5b6793;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dgc-sendall-preview-card h2 {
    font-size: 1.75rem;
}

.dgc-sendall-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 8px;
}

.dgc-sendall-openchat {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid #cfe8da;
    background: #ebf9f0;
    color: #118a4c;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

@media (max-width: 640px) {
    .dgc-sendall-modal {
        max-height: calc(100vh - 14px);
    }

    .dgc-sendall-preview-wrap {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 360px);
        padding-right: 2px;
    }

    .dgc-sendall-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* ===== GREETINGS CENTER (LATEST) ===== */
.greetings-page {
    min-height: 100%;
    padding: 1.25rem 1rem 2.2rem;
    color: #27324a;
}

    .greetings-page .decor,
    .greetings-page .logo-wrap {
        display: none;
    }

    .greetings-page .glass-card {
        background: #ffffff;
        border: 1px solid #e5eaf2;
        border-radius: 20px;
        box-shadow: 0 12px 28px rgba(39, 50, 74, 0.08);
    }

    .greetings-page .hero-card {
        text-align: center;
        padding: 1.2rem 1rem;
        margin-bottom: 0.95rem;
    }

    .greetings-page .hero-badge {
        background: #eef3ff;
        color: #3a568c;
    }

    .greetings-page .hero-card h1 {
        color: #253553;
    }

    .greetings-page .hero-card p,
    .greetings-page .section-subtitle {
        color: #66758f;
    }

    .greetings-page .content-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .greetings-page .form-card,
    .greetings-page .preview-card {
        padding: 1.05rem;
    }

    .greetings-page .preview-card {
        background: linear-gradient(145deg, #f2f7ff 0%, #efe9ff 45%, #ffeef1 100%);
        border: 1px solid #e4dcf5;
    }

.preview-logo-wrap {
    display: flex;
    justify-content: right;
    margin-bottom: 0.55rem;
}

/*.preview-logo {
    width: 74px;
    height: 74px;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px rgba(71, 73, 120, 0.22);
}*/

.greetings-page .icon-row {
    margin-top: 0.6rem;
}

.greetings-page .celebration-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, #4d7fd6, #705ac7);
    + box-shadow: 0 8px 16px rgba(69, 66, 136, 0.24);
}

.greetings-page .occasion-pill {
    background: rgba(255, 255, 255, 0.65);
    color: #533d86;
}

.greetings-page .premium-letter {
    border-radius: 16px;
    border: 1px solid #e8e2f2;
    background: rgba(255, 255, 255, 0.92);
}

.greetings-page .share-row {
    grid-template-columns: 1fr;
}

.greetings-page .share-link-btn {
    background: #edf2ff;
    color: #3c5c95;
    border: 1px solid #d5deef;
}

    .greetings-page .share-link-btn i {
        margin-right: 0.35rem;
    }

.greetings-preview-page {
    min-height: 100vh;
    padding: 1rem;
}

.greetings-preview-actions {
    max-width: 680px;
    margin: 0.9rem auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.greetings-preview-close-btn,
.greetings-preview-send-btn {
    border: 1px solid #cfd4eb;
    border-radius: 14px;
    min-height: 44px;
    font-size: 0.95rem;
    font-weight: 600;
}

.greetings-preview-close-btn {
    background: #fff;
    color: #243056;
}

.greetings-preview-send-btn {
    border: none;
    background: linear-gradient(105deg, #6f59ff 0%, #5b3bf4 52%, #6f59ff 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
}

.checkbox-field {
    margin-top: -2px;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #33425f;
    font-weight: 600;
}

.preview-card,
.preview-standalone {
    position: relative;
    overflow: hidden;
}

.preview-ribbon {
    position: absolute;
    top: -18px;
    right: -46px;
    width: 160px;
    height: 56px;
    background: linear-gradient(135deg, #6d7bd6, #a05cba);
    transform: rotate(32deg);
    opacity: 0.35;
}

.preview-balloons {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.balloon {
    position: absolute;
    width: 26px;
    height: 32px;
    border-radius: 50% 50% 45% 45%;
    opacity: 0.75;
    animation: float-soft 3.2s ease-in-out infinite;
}

    .balloon::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 30px;
        width: 1px;
        height: 24px;
        background: rgba(80, 88, 120, 0.35);
    }

    .balloon.b1 {
        top: 16px;
        left: 12px;
        background: linear-gradient(180deg, #ffd57a, #f3b65e);
    }

    .balloon.b2 {
        top: 28px;
        left: 54px;
        background: linear-gradient(180deg, #9db6ff, #7f95e5);
        animation-delay: 0.6s;
    }

    .balloon.b3 {
        top: 74px;
        left: 32px;
        background: linear-gradient(180deg, #f8a6b7, #dc8094);
        animation-delay: 1.1s;
    }

.member-social-panel {
    margin: 0.2rem 0 0.8rem;
    border: 1px solid #e0d9ef;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.6rem 0.75rem;
    font-size: 0.84rem;
    color: #445271;
    display: grid;
    gap: 0.25rem;
}

@keyframes float-soft {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.preview-standalone {
    max-width: 680px;
    margin: 0 auto;
    padding: 1rem;
    background: linear-gradient(145deg, #f2f7ff 0%, #efe9ff 45%, #ffeef1 100%);
    border: 1px solid #e4dcf5;
    border-radius: 20px;
    box-shadow: 0 14px 30px rgba(45, 54, 82, 0.1);
}

@media (min-width: 980px) {
    .greetings-page {
        padding: 1.35rem 1.2rem 2.4rem;
    }

        .greetings-page .content-grid {
            grid-template-columns: 1.03fr 0.97fr;
        }
}

.greetings-page {
    min-height: 100%;
    padding: 1.25rem 1rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.decor {
    position: absolute;
    border-radius: 999px;
    opacity: 0.5;
    pointer-events: none;
}

.decor-left {
    left: -110px;
    top: 90px;
    width: 320px;
    height: 320px;
    background: radial-gradient( circle at 30% 35%, rgba(15,145,255,0.25) 0%, rgba(106,46,255,0.18) 50%, transparent 72% );
}

.decor-right {
    right: -120px;
    top: 280px;
    width: 360px;
    height: 360px;
    background: radial-gradient( circle at 30% 30%, rgba(255,57,57,0.20) 0%, rgba(106,46,255,0.16) 55%, transparent 74% );
}

.logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.app-logo {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 14px 32px rgba(106,46,255,0.20);
}

.glass-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(90,55,160,0.10);
}

.hero-card {
    text-align: center;
    padding: 1.4rem 1.2rem 1.2rem;
    margin-bottom: 1rem;
}

.hero-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 0.38rem 1rem;
    background: linear-gradient( 120deg, rgba(15,145,255,0.15), rgba(106,46,255,0.16), rgba(255,57,57,0.14) );
    color: #5c2eff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-card h1 {
    margin: 0.55rem 0 0.25rem;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    color: #241c45;
    font-weight: 800;
}

.hero-card p {
    margin: 0 auto;
    max-width: 720px;
    color: var(--ink-soft);
    line-height: 1;
}

.icon-row {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.7rem;
}

.celebration-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient( 145deg, #0f91ff, #6a2eff );
    box-shadow: 0 10px 24px rgba(106,46,255,0.28);
    animation: soft-lift 2.8s ease-in-out infinite;
}

    .celebration-icon:nth-child(2) {
        background: linear-gradient( 145deg, #6a2eff, #ff3939 );
    }

    .celebration-icon:nth-child(3) {
        background: linear-gradient( 145deg, #ff3939, #ff6a6a );
    }

    .celebration-icon:nth-child(4) {
        background: linear-gradient( 145deg, #0f91ff, #ff3939 );
    }

.content-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.form-card,
.preview-card {
    padding: 1.15rem;
}

    .form-card h2,
    .preview-card h2 {
        margin: 0;
        /*color: #2f215f;*/
        /*        font-size: 1.14rem;*/
        /*font-weight: 750;*/
    }

.section-subtitle {
    margin: 0.25rem 0 1rem;
    /*    font-size: 0.9rem;*/
    color: var(--ink-soft);
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    margin-bottom: 0.9rem;
}

    .field-group label {
        /*        font-size: 0.88rem;*/
        color: #4f3f7d;
        font-weight: 650;
    }

.form-control {
    border: 1px solid #e5dbff;
    border-radius: 14px;
    padding: 0.76rem 0.9rem;
    color: #2a214d;
    background: rgba(255,255,255,0.88);
    transition: all 0.25s ease;
}

    .form-control:focus {
        outline: none;
        border-color: #6a2eff;
        box-shadow: 0 0 0 4px rgba(106,46,255,0.14);
    }

.textarea-control {
    min-height: 100px;
    resize: vertical;
}

.send-btn {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 0.92rem 1rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient( 112deg, #0f91ff 0%, #6a2eff 48%, #ff3939 100% );
    box-shadow: 0 14px 30px rgba(106,46,255,0.34);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

    .send-btn:hover {
        transform: translateY(-2px);
        filter: brightness(1.03);
        box-shadow: 0 18px 34px rgba(106,46,255,0.40);
    }

.send-icon {
    margin-right: 0.42rem;
}

.share-row {
    margin-top: 0.9rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.share-btn {
    text-decoration: none;
    text-align: center;
    border-radius: 14px;
    padding: 0.7rem 0.6rem;
    font-size: 0.84rem;
    font-weight: 650;
    transition: all 0.2s ease;
}

    .share-btn:hover {
        transform: translateY(-1px);
    }

.whatsapp {
    background: linear-gradient( 135deg, rgba(15,145,255,0.10), rgba(106,46,255,0.10) );
    color: #5a31d6;
}

.email {
    background: linear-gradient( 135deg, rgba(106,46,255,0.12), rgba(255,57,57,0.10) );
    color: #d43255;
}

.occasion-pill {
    margin: 0.7rem 0 0.85rem;
    display: inline-flex;
    border-radius: 999px;
    padding: 0.38rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #5b2dff;
    background: linear-gradient( 120deg, rgba(15,145,255,0.12), rgba(106,46,255,0.16), rgba(255,57,57,0.12) );
}

.premium-letter {
    border-radius: 18px;
    padding: 1rem;
    border: 1px solid #ece4ff;
    background: linear-gradient( 155deg, #ffffff 0%, #fcf8ff 52%, #fff5f5 100% );
}

    .premium-letter p {
        margin: 0 0 0.75rem;
        line-height: 1.6;
        color: #43385f;
    }

.dear-line {
    color: #4026aa;
    font-weight: 750;
}

.custom-line {
    font-style: italic;
    color: #6b57aa;
}

.signature {
    margin-bottom: 0;
    font-weight: 650;
}

.success-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 16px;
    border-left: 5px solid #6a2eff;
    padding: 0.82rem 1rem;
    background: linear-gradient( 135deg, #ffffff, #faf5ff );
    box-shadow: 0 18px 34px rgba(106,46,255,0.16);
}

.sparkle {
    font-size: 1.2rem;
    color: #6a2eff;
}

.success-toast .text {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

    .success-toast .text span {
        font-size: 0.84rem;
        color: #756d8e;
    }

@media (min-width: 980px) {
    .greetings-page {
        padding: 1.45rem 1.35rem 2.7rem;
    }

    .content-grid {
        grid-template-columns: 1.04fr 0.96fr;
    }
}

@media (max-width: 480px) {
    .share-row {
        grid-template-columns: 1fr;
    }
}

@keyframes soft-lift {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.hero-badge,
.occasion-pill {
    background: linear-gradient( 120deg, rgba(15, 145, 255, 0.09), rgba(106, 46, 255, 0.08), rgba(255, 57, 57, 0.07) );
    color: #59458f;
}

.celebration-icon {
    background: linear-gradient(145deg, #4d8ff7, #6556d9);
    box-shadow: 0 8px 18px rgba(88, 74, 180, 0.22);
}

    .celebration-icon:nth-child(2) {
        background: linear-gradient(145deg, #8a63d2, #d94f7a);
    }

    .celebration-icon:nth-child(3) {
        background: linear-gradient(145deg, #e86b6b, #f08a7a);
    }

    .celebration-icon:nth-child(4) {
        background: linear-gradient(145deg, #5f8fd8, #c85f73);
    }

.whatsapp {
    background: linear-gradient( 135deg, rgba(15, 145, 255, 0.08), rgba(106, 46, 255, 0.08) );
    color: #4f3cc8;
}

.email {
    background: linear-gradient( 135deg, rgba(106, 46, 255, 0.09), rgba(255, 57, 57, 0.08) );
    color: #9e3b65;
}

.share-btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.98);
}

.whatsapp:hover {
    background: linear-gradient( 135deg, rgba(15, 145, 255, 0.13), rgba(106, 46, 255, 0.12) );
    color: #3f2db4;
}

.email:hover {
    background: linear-gradient( 135deg, rgba(106, 46, 255, 0.13), rgba(255, 57, 57, 0.11) );
    color: #883052;
}

/* ===== GREETINGS CENTER OVERRIDE (CURRENT) ===== */


.greetings-page .decor,
.greetings-page .logo-wrap {
    display: none !important;
}

.greetings-page .preview-card,
.greetings-preview-page .preview-standalone {
    background: linear-gradient(145deg, #f2f7ff 0%, #efe9ff 45%, #ffeef1 100%) !important;
    /*        background: linear-gradient(145deg, #f2f7ff 0%, #efe9ff 45%, #ffeef1 100%) !important;*/
    border: 1px solid #e4dcf5 !important;
}

.greetings-page .share-row {
    grid-template-columns: 1fr !important;
}

.greetings-page .share-link-btn {
    background: #edf2ff !important;
    color: #3c5c95 !important;
    border: 1px solid #d5deef !important;
}

.preview-logo-wrap {
    display: flex;
    justify-content: right;
    margin-bottom: 0.55rem;
}

.preview-logo {
    width: 100px;
    height: 100px;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px rgba(71, 73, 120, 0.22);
}

.greetings-preview-page {
    min-height: 100vh;
    padding: 1rem;
}

.bottom-ribbon {
    width: 90%;
    height: 4px;
    border-radius: 999px;
    margin: 0.6rem auto 0;
    background: linear-gradient(90deg,#b99aff,#ffa4c0,#7fb6ff,#ffd97a);
    opacity: 0.52;
}
/*.greetings-preview-page {
    min-height: 100vh;
    padding: 2.5rem 1rem 1rem;
    background: linear-gradient(145deg, #fff8df 0%, #ffe9bd 45%, #fff3d4 100%) !important;
}*/

.preview-standalone {
    max-width: 680px;
    margin: 2rem auto 0;
    padding: 1.6rem 1.2rem 1.3rem;
    background: linear-gradient(145deg, #fff7dc 0%, #ffe6b3 48%, #fff1c7 100%) !important;
    border: 1px solid #f1cf8b !important;
}

.preview-logo-wrap {
    margin-top: 0.8rem;
    margin-bottom: 0.9rem;
}

/*.preview-logo {
    width: 92px;
    height: 92px;
    border-radius: 22px;
}*/

.premium-letter {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.88);
}

    .premium-letter p {
        line-height: 1.7;
    }

/* Member view modal UI refresh */
.mvm2-shell {
    display: grid;
    gap: 14px;
}

.mvm2-hero {
    position: relative;
    border-radius: 14px;
    padding: 16px;
    background: linear-gradient(130deg, #032f9b 0%, #1448c9 55%, #2f63df 100%);
    color: #fff;
}

.mvm2-verified {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #4cc164;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
}

.mvm2-hero-grid {
    display: grid;
    grid-template-columns: 126px 1fr;
    gap: 16px;
    align-items: center;
    margin-top: 8px;
}

.mvm2-avatar, .mvm2-avatar-placeholder {
    width: 126px;
    height: 126px;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,.95);
    object-fit: cover;
}

.mvm2-avatar-placeholder {
    display: grid;
    place-items: center;
    font-size: 42px;
    font-weight: 700;
    background: #2f63df;
    color: #fff;
}

.mvm2-hero-info {
    display: grid;
    gap: 7px;
}

.mvm2-member-badge {
    width: fit-content;
    background: #3b73f1;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
}

.mvm2-name {
    font-size: 20px;
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mvm2-code, .mvm2-phone, .mvm2-location {
    font-size: 15px;
    line-height: 1.3;
}

    .mvm2-phone i, .mvm2-location i {
        width: 14px;
        margin-right: 6px;
    }

.mvm2-action-card {
    background: #fff;
    border: 1px solid #ebedf2;
    border-radius: 14px;
    padding: 6px 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.mvm2-action-btn {
    border: 0;
    background: transparent;
    color: #1f2433;
    border-radius: 8px;
    padding: 10px 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: none;
}

    .mvm2-action-btn i {
        margin-right: 6px;
    }

    .mvm2-action-btn + .mvm2-action-btn {
        border-left: 1px solid #eceff5;
    }

.mvm2-action-btn--call i {
    color: #16a34a;
}

.mvm2-action-btn--wa i {
    color: #22c55e;
}

.mvm2-action-btn--edit i {
    color: #2563eb;
}

.mvm2-action-btn--delete i {
    color: #ef4444;
}

.mvm2-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.mvm2-head {
    list-style: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #1d2740;
    padding: 11px 16px;
    background: linear-gradient(90deg, #f7f8fb 0%, #ffffff 100%);
    border-bottom: 1px solid #edf0f5;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
}

    .mvm2-head::-webkit-details-marker {
        display: none;
    }

    .mvm2-head i {
        margin-right: 10px;
    }

    .mvm2-head::after {
        content: "\f078";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        font-size: 13px;
        color: #475569;
        transition: transform .2s ease;
        margin-left: 10px;
    }

.mvm2-accordion[open] > .mvm2-head::after {
    transform: rotate(180deg);
}

.mvm2-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mvm2-subtitle {
    grid-column: 1 / 2;
    color: #7b8496;
    font-size: 12px;
    font-weight: 400;
    padding-left: 30px;
    line-height: 1.2;
}

.mvm2-head-blue {
    color: #2254db;
}

.mvm2-head-purple {
    color: #6f43c0;
}

.mvm2-head-orange {
    color: #ef6c00;
}

.mvm2-head-green {
    color: #218a45;
}

.mvm2-grid-card {
    padding: 12px 14px 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-radius: 0 0 12px 12px;
}

    .mvm2-grid-card > div {
        border-right: 1px solid #edf0f5;
        border-bottom: 1px solid #edf0f5;
        padding: 12px;
        min-height: 74px;
        display: grid;
        gap: 4px;
        align-content: center;
    }

        .mvm2-grid-card > div:nth-child(3n) {
            border-right: 0;
        }

        .mvm2-grid-card > div label {
            color: #7b8496;
            font-size: 12px;
        }

        .mvm2-grid-card > div span {
            color: #1d2435;
            font-size: 13px;
            font-weight: 500;
        }

.mvm2-voter-empty {
    margin: 12px 14px 14px;
    padding: 18px;
    border: 1px dashed #cfe0ff;
    border-radius: 10px;
    background: #f8fbff;
    color: #667085;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.mvm2-voter-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px 0;
}

.mvm2-voter-summary > div {
    border: 1px solid #e5edfb;
    border-radius: 8px;
    background: #f8fbff;
    padding: 8px 10px;
    text-align: center;
}

.mvm2-voter-summary span {
    display: block;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
}

.mvm2-voter-summary strong {
    display: block;
    margin-top: 3px;
    color: #111827;
    font-size: 16px;
    font-weight: 800;
}

.mvm2-voter-table {
    margin: 12px 14px 14px;
    overflow-x: auto;
    border: 1px solid #e5edfb;
    border-radius: 10px;
}

.mvm2-voter-header,
.mvm2-voter-row {
    display: grid;
    grid-template-columns: 44px minmax(170px, 1.3fr) minmax(120px, .9fr) minmax(100px, .8fr) minmax(92px, .7fr) minmax(120px, .9fr) minmax(120px, .9fr);
    min-width: 820px;
    align-items: center;
}

.mvm2-voter-header {
    background: #f3f6fb;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
}

.mvm2-voter-header span,
.mvm2-voter-row span {
    padding: 10px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mvm2-voter-row {
    border-top: 1px solid #edf2fb;
    color: #182230;
    font-size: 13px;
    font-weight: 500;
}

.mvm2-voter-row b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
}

.mvm2-voter-row b.present {
    background: #e8f8ef;
    color: #139a55;
}

.mvm2-voter-row b.absent {
    background: #fff0f1;
    color: #e53950;
}

.mvm2-close {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #2c5be9 0%, #326dff 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.pradhan-view-v2 .pradhan-view-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pradhan-view-v2 .pradhan-view-actions .mvm2-action-btn {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    text-decoration: none;
}

.pradhan-view-candidate-table {
    overflow-x: auto;
}

.pradhan-view-candidate-row {
    grid-template-columns: 48px minmax(150px, 1.4fr) minmax(120px, 1fr) minmax(96px, .75fr) minmax(96px, .75fr);
    min-width: 610px;
}

@media (max-width: 768px) {
    .mvm2-hero {
        padding: 12px;
        border-radius: 12px;
    }

    .mvm2-hero-grid {
        grid-template-columns: 74px 1fr;
        gap: 12px;
        margin-top: 6px;
    }

    .mvm2-avatar, .mvm2-avatar-placeholder {
        width: 74px;
        height: 74px;
        border-width: 3px;
    }

    .mvm2-verified {
        top: 10px;
        left: 10px;
        font-size: 11px;
        padding: 4px 10px;
    }

    .mvm2-member-badge {
        font-size: 12px;
        padding: 3px 10px;
    }

    .mvm2-name {
        font-size: 17px;
        font-weight: 700;
        line-height: 1.12;
    }

    .mvm2-code, .mvm2-phone, .mvm2-location { 
        font-size: 12px;
        line-height: 1.25;
    }

        .mvm2-phone i, .mvm2-location i {
            width: 12px;
            margin-right: 5px;
        }

    .mvm2-action-card {
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
        padding: 4px 6px;
    }

    .mvm2-action-btn {
        font-size: 0;
        padding: 10px 0;
        border-radius: 8px;
        text-align: center;
    }

        .mvm2-action-btn i {
            margin-right: 0;
            font-size: 18px;
            line-height: 1;
        }

    .mvm2-head {
        font-size: 11px;
        font-weight: 600;
        padding: 10px 12px;
    }

    .mvm2-title-wrap {
        gap: 6px;
    }

        .mvm2-title-wrap i {
            font-size: 12px;
        }

    .mvm2-subtitle {
        font-size: 10px;
        padding-left: 24px;
    }

    .mvm2-head::after {
        font-size: 11px;
    }

    .mvm2-grid-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .mvm2-grid-card > div {
            padding: 10px;
            min-height: 66px;
        }

            .mvm2-grid-card > div label {
                font-size: 11px;
            }

            .mvm2-grid-card > div span {
                font-size: 12px;
                font-weight: 500;
            }

            .mvm2-grid-card > div:nth-child(3n) {
                border-right: 1px solid #edf0f5;
            }

            .mvm2-grid-card > div:nth-child(2n) {
                border-right: 0;
            }

    .mvm2-close {
        font-size: 14px;
        padding: 9px 14px;
        border-radius: 10px;
    }

    .pradhan-view-v2 .pradhan-view-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

        .pradhan-view-v2 .pradhan-view-actions .mvm2-action-btn {
            grid-auto-flow: row;
            min-height: 42px;
        }

    .pradhan-view-candidate-row {
        min-width: 580px;
    }
}

/* Members list UI refresh */
.member-list-v2 {
    display: grid;
    gap: 10px;
    min-height: 0;
}

.member-list-v2--alpha {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 10px;
    height: calc(100dvh - var(--app-header-content-height, 58px) - var(--app-footer-height, 0px) - 18px);
    min-height: 0;
    overflow: hidden;
}

    .member-list-v2 .list-container {
        padding: 0 2px !important;
        gap: 14px !important;
    }

    .member-list-v2 .card-row {
        align-items: flex-start !important;
    }

    .member-list-v2 .card-content {
        width: 100%;
    }

.member-alpha-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 8px;
    align-items: stretch;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.member-alpha-list {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -webkit-overflow-scrolling: touch;
}

.member-list-v2 .pagination-row {
    position: static !important;
    justify-content: center;
    gap: 4px;
    margin: 10px 0 4px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.member-list-v2 .pagination-pages {
    gap: 4px;
    flex-wrap: nowrap;
}

.member-list-v2 .page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 13px;
}

.member-list-v2 .pagination-info {
    margin: 0 0 4px;
    font-size: 11px;
    line-height: 1.2;
}

.member-alpha-list::-webkit-scrollbar {
    width: 4px;
}

.member-alpha-list::-webkit-scrollbar-track {
    background: transparent;
}

.member-alpha-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.member-alpha-rail {
    position: relative;
    display: grid;
    grid-template-rows: repeat(26, minmax(0, 1fr));
    align-items: center;
    justify-items: center;
    width: 24px;
    height: 100%;
    min-height: 0;
    padding: 6px 3px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
    overflow: hidden;
    z-index: 20;
    --alpha-pad: 6px;
    --alpha-selector-height: 16px;
    --alpha-ratio: 0;
}

.member-alpha-rail__selector {
    position: absolute;
    left: 50%;
    top: calc(var(--alpha-pad) + ((100% - (var(--alpha-pad) * 2) - var(--alpha-selector-height)) * var(--alpha-ratio)));
    width: 18px;
    height: var(--alpha-selector-height);
    border-radius: 999px;
    background: rgba(47, 128, 237, 0.16);
    border: 1px solid rgba(47, 128, 237, 0.26);
    transform: translateX(-50%);
    transition: top 120ms ease;
    pointer-events: none;
    z-index: 1;
}

.member-alpha-rail__letter {
    position: relative;
    z-index: 2;
    width: 18px;
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    padding: 0;
    cursor: pointer;
}

.member-alpha-rail__letter.active {
    color: #1d4ed8;
    font-weight: 900;
}

.member-alpha-rail__letter:disabled {
    color: #b8c4d4;
    cursor: default;
    opacity: 1;
}

.member-alpha-rail__letter:not(:disabled):hover {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.08);
}

.member-v2-topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.member-v2-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.voter-location-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
}

.voter-location-select i {
    color: #64748b;
    font-size: 12px;
}

.voter-location-empty {
    min-height: 96px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-weight: 800;
    border: 1px dashed #b9d5ff;
    border-radius: 10px;
    margin: 8px;
    background: #f8fbff;
}

.member-v2-search-wrap .member-v2-search-icon,
.member-v2-search-wrap > .fa-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #93a0b5;
    font-size: 13px;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}

.member-v2-search {
    width: 100%;
    height: 44px;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    padding: 0 10px 0 34px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
}

.member-v2-search-wrap--mode .member-v2-search {
    padding-right: 52px;
}

.member-v2-search-mode-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    color: #64748b;
    background: transparent;
    cursor: pointer;
    z-index: 2;
}

.member-v2-search-mode-btn i {
    position: static;
    transform: none;
    color: inherit;
    font-size: 14px;
}

.member-v2-search-mode-btn:hover,
.member-v2-search-mode-btn.active {
    color: #2563eb;
    background: #eff6ff;
}

.member-search-mode-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: #fff;
    border: 1px solid #e1e7f0;
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
    padding: 10px;
    z-index: 1300;
}

.member-v2-filter-btn {
    height: 44px;
    border: 1px solid #6951ff;
    color: #5d46e8;
    background: #f8f7ff;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 600;
}

.member-v2-filter-wrap {
    position: relative;
    flex: 0 0 auto;
    z-index: 1250;
}

.member-v2-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.member-v2-select-list-btn {
    height: 44px;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
    border-radius: 12px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    min-width: 144px;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-v2-select-list-btn.active {
    color: #ffffff;
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.member-v2-select-list-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-select-empty-card {
    min-height: 320px;
    border: 1px dashed #bfdbfe;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 26px;
    color: #0f172a;
}

.member-select-empty-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.member-select-empty-card p {
    margin: 0;
    max-width: 460px;
    color: #64748b;
    font-weight: 700;
    line-height: 1.45;
}

.member-select-empty-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-grid;
    place-items: center;
    color: #2563eb;
    background: #dbeafe;
    font-size: 24px;
}

.member-area-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(15, 23, 42, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.member-area-picker-modal {
    width: min(760px, 100%);
    max-height: min(86dvh, 760px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.member-area-picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid #e5edf7;
}

.member-area-picker-head h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    color: #0f172a;
}

.member-area-picker-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-weight: 700;
}

.member-area-picker-close {
    width: 40px;
    height: 40px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    display: inline-grid;
    place-items: center;
    font-size: 16px;
}

.member-area-picker-body {
    padding: 18px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.member-area-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.member-area-field--wide {
    grid-column: 1 / -1;
}

.member-area-field label {
    font-size: 13px;
    font-weight: 900;
    color: #172554;
}

.member-area-field input,
.member-area-field select {
    width: 100%;
    height: 44px;
    border: 1px solid #cbd8ea;
    border-radius: 12px;
    padding: 0 12px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
}

.member-area-select-control {
    width: 100%;
    height: 44px;
    border: 1px solid #cbd8ea;
    border-radius: 12px;
    padding: 0 12px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}

.member-area-select-control span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-area-select-control i {
    color: #64748b;
    flex: 0 0 auto;
}

.member-area-select-control:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.member-area-select-control:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.member-area-select-control:disabled i {
    color: #94a3b8;
}

.member-area-field input:disabled,
.member-area-field select:disabled {
    background: #f1f5f9;
    color: #64748b;
}

.member-area-search {
    width: 100%;
    height: 44px;
    border: 1px solid #cbd8ea;
    border-radius: 12px;
    padding: 0 12px;
    margin-bottom: 4px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 800;
    outline: 0;
}

.member-area-search:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.member-area-village-list {
    max-height: 280px;
    overflow: auto;
    border: 1px solid #dbe7f7;
    border-radius: 14px;
    padding: 8px;
    background: #f8fbff;
}

.member-area-village-item {
    width: 100%;
    min-height: 58px;
    border: 1px solid #dbe7f7;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    color: #0f172a;
    text-align: left;
    overflow: hidden;
}

.member-area-village-item > span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.member-area-village-item:last-child {
    margin-bottom: 0;
}

.member-area-village-item strong,
.member-area-village-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-area-village-item small {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.member-area-count-pill {
    flex: 0 0 auto;
    max-width: 112px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-area-village-item i {
    flex: 0 0 auto;
    color: #93a4ba;
}

.member-area-village-item.active {
    border-color: #2563eb;
    background: #eff6ff;
}

.member-area-village-item.active .member-area-count-pill {
    background: #dbeafe;
    border-color: #93c5fd;
}

.member-area-village-item.active i {
    color: #2563eb;
}

.member-area-empty {
    border: 1px dashed #bfdbfe;
    border-radius: 12px;
    padding: 28px 12px;
    text-align: center;
    color: #64748b;
    font-weight: 900;
}

.member-area-picker-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid #e5edf7;
    background: #ffffff;
}

.member-area-picker-footer--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.member-area-cancel-btn,
.member-area-clear-btn,
.member-area-apply-btn {
    height: 46px;
    border: 0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 900;
}

.member-area-cancel-btn {
    background: #f1f5f9;
    color: #0f172a;
}

.member-area-clear-btn {
    background: #ef4444;
    color: #ffffff;
}

.member-area-apply-btn {
    background: #2563eb;
    color: #ffffff;
}

.member-area-apply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.member-area-lookup-overlay {
    position: fixed;
    inset: 0;
    z-index: 5020;
    background: rgba(15, 23, 42, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.member-area-lookup-modal {
    width: min(470px, 100%);
    max-height: min(76dvh, 620px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.member-area-lookup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e5edf7;
}

.member-area-lookup-head h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    color: #0f172a;
}

.member-area-lookup-body {
    padding: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.member-area-choice-list {
    max-height: none;
    min-height: 180px;
    flex: 1 1 auto;
}

@media (max-width: 640px) {
    .member-search-mode-dropdown {
        width: min(240px, calc(100vw - 42px));
        right: 0;
    }

    .member-v2-search-mode-btn {
        right: 5px;
    }

    .member-v2-topbar {
        grid-template-columns: 1fr;
    }

    .member-v2-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .member-v2-toolbar-actions > * {
        flex: 1 1 0;
    }

    .member-v2-select-list-btn,
    .member-v2-filter-btn {
        width: 100%;
        min-width: 0;
        font-size: 13px;
        padding-inline: 10px;
    }

    .member-area-picker-overlay {
        align-items: center;
        justify-content: center;
        padding: 14px;
    }

    .member-area-picker-modal {
        width: min(520px, 100%);
        max-height: calc(100dvh - 28px - env(safe-area-inset-bottom));
        border-radius: 16px;
    }

    .member-area-picker-head {
        padding: 14px;
    }

    .member-area-picker-head h3 {
        font-size: 19px;
    }

    .member-area-picker-body {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .member-area-village-list {
        max-height: 36dvh;
    }

    .member-area-picker-footer {
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
        gap: 8px;
    }

    .member-area-cancel-btn,
    .member-area-clear-btn,
    .member-area-apply-btn {
        height: 44px;
        font-size: 14px;
    }

    .member-area-lookup-overlay {
        align-items: center;
        justify-content: center;
        padding: 14px;
    }

    .member-area-lookup-modal {
        width: min(470px, 100%);
        max-height: calc(100dvh - 28px - env(safe-area-inset-bottom));
        border-radius: 16px;
    }

    .member-area-lookup-head {
        padding: 14px;
    }

    .member-area-lookup-head h3 {
        font-size: 19px;
    }

    .member-area-lookup-body {
        padding: 14px;
    }
}

.pending-list-v2 {
    margin-bottom: 16px;
}

.pending-v2-topbar {
    margin: 0 0 14px;
}

.pending-v2-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
}

.pending-v2-icon-btn {
    width: 44px;
    min-width: 44px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

.pending-filter-dropdown {
    width: 224px;
}

.member-stats-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.member-filter-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin: 8px 0 0;
    padding: 8px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.member-filter-loader-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #2563eb;
    flex: 0 0 auto;
}

.member-stats-row:has(> .member-stat-card:nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.member-stats-row:has(> .member-stat-card:nth-child(4)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.member-stat-card {
    background: #ffffff;
    border: 1px solid #edf0f6;
    border-radius: 14px;
    padding: 10px;
}

.member-stat-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.member-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.member-stat-value {
    font-size: 32px;
    line-height: 1;
    font-weight: 700;
    color: #1f2937;
    text-align: left;
}

.member-stat-label {
    font-size: 12px;
    margin-top: 4px;
    color: #64748b;
    font-weight: 600;
    text-align: left;
}

.member-stat-all {
    background: #eef4ff;
}

.member-stat-member {
    background: #eefcf3;
}

.member-stat-anti {
    background: #fff1f2;
}

.member-stat-editor {
    background: #fff8e6;
}

.member-stat-admin {
    background: #f4efff;
}

.member-stat-all .member-stat-icon {
    background: #dbeafe;
    color: #2563eb;
}

.member-stat-member .member-stat-icon {
    background: #dcfce7;
    color: #16a34a;
}

.member-stat-anti .member-stat-icon {
    background: #fee2e2;
    color: #ef4444;
}

.member-stat-editor .member-stat-icon {
    background: #fef3c7;
    color: #b7791f;
}

.member-stat-admin .member-stat-icon {
    background: #ede9fe;
    color: #6d28d9;
}

.member-role-tabs {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 12px;
    overflow: hidden;
    gap: 0;
}

    .member-role-tabs .tab {
        border-radius: 0;
        flex: 1;
        margin: 0;
        text-align: center;
        font-size: 14px;
        padding: 10px 6px;
        border: 0;
        border-right: 1px solid #edf0f6;
    }

        .member-role-tabs .tab:last-child {
            border-right: 0;
        }

        .member-role-tabs .tab.active {
            background: linear-gradient(90deg, #5b49ef 0%, #6a46ff 100%);
            color: #fff !important;
        }

.leader-role-tabs {
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    align-self: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
}

    .leader-role-tabs .tab {
        flex: 0 0 auto;
        min-width: 58px;
        white-space: nowrap;
        padding: 9px 14px;
    }

.leader-list-v2 .member-v2-topbar {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.leader-list-v2 .member-v2-search-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.leader-filter-wrap {
    position: relative;
    flex: 0 0 auto;
    z-index: 1252;
}

.leader-filter-btn {
    width: 48px;
    height: 44px;
    border: 1px solid #6d4aff;
    border-radius: 12px;
    background: #ffffff;
    color: #5b49ef;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    box-shadow: 0 6px 16px rgba(91, 73, 239, 0.12);
}

    .leader-filter-btn.active {
        background: #5b49ef;
        color: #ffffff;
    }

.leader-filter-dropdown {
    right: 0;
    width: 260px;
    max-height: 360px !important;
    overflow-y: auto !important;
}

.leader-stats-shell {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 8px;
}

.leader-stats-row {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    padding: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .leader-stats-row::-webkit-scrollbar {
        display: none;
    }

    .leader-stats-row .member-stat-card {
        flex: 0 0 180px;
        min-width: 180px;
        scroll-snap-align: start;
    }

.leader-stats-arrow {
    width: 34px;
    height: 34px;
    border: 1px solid #bfdbfe;
    border-radius: 50%;
    background: #ffffff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

@media (max-width: 640px) {
    .leader-filter-btn {
        width: 48px;
        height: 42px;
    }

    .leader-filter-dropdown {
        width: min(250px, calc(100vw - 42px));
    }

    .leader-stats-shell {
        grid-template-columns: 30px minmax(0, 1fr) 30px;
        gap: 6px;
    }

    .leader-stats-row .member-stat-card {
        flex-basis: 118px;
        min-width: 118px;
        padding: 8px 6px;
    }

    .leader-stats-row .member-stat-head {
        gap: 6px;
    }

    .leader-stats-row .member-stat-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .leader-stats-row .member-stat-value {
        font-size: 20px;
    }

    .leader-stats-row .member-stat-label {
        font-size: 10px;
        line-height: 1.15;
    }
}

.member-type-filter-box {
    max-width: 440px;
}

.member-role-tabs--sheet {
    margin-top: 4px;
}

.member-filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    max-width: 88vw;
    background: #ffffff;
    border: 1px solid #e6e9f2;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(20, 27, 45, 0.16);
    padding: 8px 0 6px;
    z-index: 1251;
    pointer-events: auto;
    max-height: none !important;
    overflow: hidden !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

    .member-filter-dropdown::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
        display: none !important;
    }

.member-filter-dropdown-title {
    font-size: 16px;
    font-weight: 600;
    color: #262b36;
    margin: 0;
    padding: 8px 12px 10px;
    border-bottom: 1px solid #edf1f8;
}

.member-filter-section-title {
    padding: 12px 12px 7px;
    border-top: 1px solid #edf1f8;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.member-filter-item {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    border: 0 !important;
    outline: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    padding: 11px 12px !important;
    text-align: left !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
}

    .member-filter-item + .member-filter-item {
        border-top: 1px solid #f1f4f9;
    }

    .member-filter-item.active {
        background: #f5f3ff;
        color: #5b49ef;
        font-weight: 600;
    }

    .member-filter-item i {
        font-size: 12px;
    }

.member-filter-item--danger {
    color: #dc2626 !important;
    border-top: 1px solid #fee2e2 !important;
}

.member-list-filter-dropdown {
    max-height: min(390px, calc(100vh - 210px)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
    -ms-overflow-style: auto !important;
}

    .member-list-filter-dropdown::-webkit-scrollbar {
        width: 6px !important;
        height: 6px !important;
        display: block !important;
    }

    .member-list-filter-dropdown::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 999px;
    }

@media (max-width: 640px) {
    .member-list-filter-dropdown {
        max-height: 300px !important;
    }
}

.leader-list-v2 .leader-filter-dropdown {
    width: 280px;
    max-width: min(88vw, 280px);
    max-height: min(380px, calc(100vh - 190px)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
    -ms-overflow-style: auto !important;
}

    .leader-list-v2 .leader-filter-dropdown::-webkit-scrollbar {
        width: 6px !important;
        height: 6px !important;
        display: block !important;
    }

    .leader-list-v2 .leader-filter-dropdown::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 999px;
    }

.leader-list-v2 .member-filter-item {
    gap: 10px;
}

    .leader-list-v2 .member-filter-item span:first-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .leader-list-v2 .member-filter-item span:last-child {
        flex: 0 0 auto;
        margin-left: auto;
    }

.leader-list-v2 .member-filter-dropdown-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leader-list-v2 .member-v2-actions {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100%;
}

.leader-list-v2 .member-v2-action-icon {
    width: 100% !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    aspect-ratio: auto !important;
    box-sizing: border-box !important;
}

    .leader-list-v2 .member-v2-action-icon i {
        width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 14px;
    }

@media (max-width: 768px) {
    .leader-list-v2 .member-v2-actions {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    .leader-list-v2 .member-v2-action-icon {
        height: 34px !important;
        min-height: 34px !important;
        border-radius: 9px !important;
    }
}

.page-scroll:has(.leader-filter-open) {
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

    .page-scroll:has(.leader-filter-open)::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
        display: none !important;
    }

.main-content:has(.leader-filter-open) {
    overflow: hidden !important;
}

body.leader-filter-scroll-locked,
.main-content.leader-filter-scroll-locked,
.page-scroll.leader-filter-scroll-locked,
.page-content.leader-filter-scroll-locked {
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

    body.leader-filter-scroll-locked::-webkit-scrollbar,
    .main-content.leader-filter-scroll-locked::-webkit-scrollbar,
    .page-scroll.leader-filter-scroll-locked::-webkit-scrollbar,
    .page-content.leader-filter-scroll-locked::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
        display: none !important;
    }

.leader-filter-open,
.leader-list-v2 .leader-filter-dropdown {
    overscroll-behavior: contain;
}

    .member-filter-item--danger i {
        color: #dc2626 !important;
    }

.member-filter-hit-area {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 1240;
    pointer-events: auto;
    touch-action: none;
    overscroll-behavior: none;
}

/* Lock page scroll while filter dropdown is open */
.main-content:has(.member-filter-dropdown) {
    overflow: hidden !important;
}

    .main-content:has(.member-filter-dropdown) > .page-scroll {
        overflow: hidden !important;
    }

.member-list-v2 .list-card {
    border-radius: 16px;
    border: 1px solid #e9edf4;
    padding: 12px 12px;
    margin-bottom: 0;
}

.member-v2-card-wrap {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 10px;
    align-items: start;
}

.member-v2-type-1 {
    border-left: 4px solid #2d7ff9;
    padding-left: 8px;
}

.member-v2-type-2 {
    border-left: 4px solid #ef4444;
    padding-left: 8px;
}

.member-v2-type-3 {
    border-left: 4px solid #22c55e;
    padding-left: 8px;
}

.member-v2-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #dbe3ef;
    margin-top: 4px;
}

.member-v2-avatar-button {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    align-self: flex-start;
    cursor: pointer;
    line-height: 0;
    border-radius: 50%;
}

.member-v2-avatar-button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}

.member-v2-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.member-photo-preview-overlay {
    z-index: 1400;
}

.member-photo-preview-modal {
    position: relative;
    width: min(92vw, 520px);
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.member-photo-preview-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
}

.member-photo-preview-title {
    padding: 4px 42px 14px 4px;
    color: #111827;
    font-size: 16px;
    font-weight: 800;
}

.member-photo-preview-stage {
    width: 100%;
    max-height: min(74vh, 620px);
    overflow: hidden;
    border-radius: 14px;
    background: #f8fafc;
    touch-action: none;
    user-select: none;
}

.member-photo-preview-img {
    display: block;
    width: 100%;
    max-height: min(74vh, 620px);
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

.member-photo-preview-fallback {
    display: grid;
    place-items: center;
    width: min(68vw, 260px);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 92px;
    font-weight: 900;
}

.member-v2-details {
    min-width: 0;
    padding-top: 3px;
}

.member-v2-head-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    column-gap: 6px;
    margin-top: 4px;
}

.member-v2-body-row {
    grid-column: 1 / -1;
    margin-top: 2px;
    padding-left: 2px;
}

.member-v2-title-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    column-gap: 6px;
    row-gap: 1px;
}

.member-v2-badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.member-v2-verified {
    font-size: 10px;
    font-weight: 700;
    color: #16a34a;
}

.member-v2-name {
    grid-column: 1 / 4;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    line-height: 1.2;
    margin-top: 4px;
}

.member-v2-more-btn {
    align-self: start;
    border: 0;
    background: transparent;
    color: #64748b;
    width: 26px;
    height: 26px;
    border-radius: 50%;
}

.member-v2-sub {
    font-size: 12px;
    color: #475569;
    line-height: 1.2;
    margin-top: 1px;
}

    .member-v2-sub i {
        width: 12px;
        margin-right: 5px;
        color: #334155;
    }

.event-candidate-member-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    vertical-align: middle;
}

.member-v2-support {
    margin-top: 8px;
}

.member-v2-support-head {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
}

.member-v2-support-track {
    height: 5px;
    background: #edf1f7;
    border-radius: 999px;
    margin-top: 4px;
    overflow: hidden;
}

.member-v2-support-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.member-v2-support-fill-1 {
    background: #22c55e;
}

.member-v2-support-fill-2 {
    background: #ef4444;
}

.member-v2-actions {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-content: end;
    gap: 6px;
    align-items: center;
}

.member-v2-actions--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.member-v2-actions--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-v2-actions--head {
    margin-top: 0;
    display: flex;
    grid-template-columns: none;
    justify-content: flex-end;
    gap: 6px;
}

    .member-v2-actions--head .member-v2-action-icon {
        width: 28px;
        min-width: 28px;
        height: 28px;
    }

.member-v2-actions--userlist {
    position: absolute;
    top: 10px;
    right: 10px;
    align-self: auto;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.userlist-v2-card {
    position: relative;
}

    .userlist-v2-card .member-v2-head-row {
        grid-template-columns: 1fr;
    }

    .userlist-v2-card .member-v2-body-row {
        padding-right: 44px;
    }

.member-v2-action-icon {
    width: 100%;
    height: 34px;
    min-width: 0;
    border-radius: 9px;
    border: 1px solid #d8efe0;
    background: #effbf3;
    color: #15a34a;
    display: grid;
    place-items: center;
    text-decoration: none;
    padding: 0;
    box-sizing: border-box;
}

    .member-v2-action-icon i {
        display: inline-block;
        width: 16px;
        height: 16px;
        font-size: 14px;
        line-height: 16px;
        text-align: center;
        vertical-align: middle;
        transform: none;
    }

/* Member add page actions inside form (not fixed footer) */
.member-add-actions {
    position: static !important;
    bottom: auto !important;
    width: 100%;
    margin: 14px 0 10px;
    padding: 0 2px;
    z-index: auto;
    background: transparent;
}

    .member-add-actions .btn-group {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .member-add-actions .save-btn,
    .member-add-actions .cancel-btn {
        width: auto;
    }

    .member-add-actions .save-btn {
        margin-left: auto;
    }

.member-v2-view-btn {
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #5b49ef 0%, #6a46ff 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.member-v2-action-icon--edit {
    border-color: #dbeafe;
    background: #eff6ff;
    color: #2563eb;
}

.member-v2-action-icon--delete {
    border-color: #fee2e2;
    background: #fff1f2;
    color: #ef4444;
}

.member-v2-action-icon--view {
    border-color: #ddd6fe;
    background: linear-gradient(90deg, #5b49ef 0%, #6a46ff 100%);
    color: #ffffff;
}

.member-v2-fab {
    position: fixed;
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(135deg, #2f71ff 0%, #3157d8 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(44, 93, 242, 0.35);
    display: grid;
    place-items: center;
    z-index: 1202;
}

    .member-v2-fab i {
        font-size: 18px;
        line-height: 1;
    }

    .member-v2-fab span {
        font-size: 10px;
        font-weight: 600;
        margin-top: -10px;
    }

/* Religion list specific cleanup */
.religion-list-page .member-v2-card-wrap {
    grid-template-columns: 1fr;
    gap: 0;
}

.religion-list-page .member-v2-avatar {
    width: 58px;
    height: 58px;
    margin-top: 0;
    border: 0;
    box-shadow: none;
}

.religion-list-page .member-v2-title-row {
    display: block;
}

.religion-list-page .member-v2-name {
    display: block;
    margin-top: 4px;
}

.religion-list-page .member-v2-actions--compact {
    gap: 8px;
}

.religion-list-page .member-v2-action-icon {
    width: 62px;
    height: 34px;
    border-radius: 8px;
}

    .religion-list-page .member-v2-action-icon i {
        font-size: 12px;
    }

.caste-list-page .member-v2-card-wrap {
    grid-template-columns: 1fr;
    gap: 0;
    position: relative;
}

.caste-list-page .member-v2-title-row {
    display: block;
    padding-right: 120px;
}

.caste-list-page .member-v2-name {
    display: block;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.caste-list-page .member-v2-actions--compact {
    display: inline-flex;
    grid-template-columns: none;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    position: absolute;
    top: 8px;
    right: 10px;
    margin-top: 0;
}

.caste-list-page .member-v2-action-icon {
    width: 31px;
    height: 33px;
    border-radius: 8px;
}

    .caste-list-page .member-v2-action-icon i {
        font-size: 12px;
    }

.relation-list-page .member-v2-card-wrap,
.occupation-list-page .member-v2-card-wrap,
.ration-list-page .member-v2-card-wrap,
.gramsabha-list-page .member-v2-card-wrap,
.eventdesc-list-page .member-v2-card-wrap {
    grid-template-columns: 1fr;
    gap: 0;
}

.relation-list-page .member-v2-title-row,
.occupation-list-page .member-v2-title-row,
.ration-list-page .member-v2-title-row,
.gramsabha-list-page .member-v2-title-row,
.eventdesc-list-page .member-v2-title-row {
    display: block;
}

.relation-list-page .member-v2-name,
.occupation-list-page .member-v2-name,
.ration-list-page .member-v2-name,
.gramsabha-list-page .member-v2-name,
.eventdesc-list-page .member-v2-name {
    display: block;
    margin-top: 4px;
}

.relation-list-page .member-v2-actions--compact,
.occupation-list-page .member-v2-actions--compact,
.ration-list-page .member-v2-actions--compact,
.gramsabha-list-page .member-v2-actions--compact,
.eventdesc-list-page .member-v2-actions--compact {
    gap: 8px;
}

.relation-list-page .member-v2-action-icon,
.occupation-list-page .member-v2-action-icon,
.ration-list-page .member-v2-action-icon,
.gramsabha-list-page .member-v2-action-icon,
.eventdesc-list-page .member-v2-action-icon {
    width: 62px;
    height: 34px;
    border-radius: 8px;
}

    .relation-list-page .member-v2-action-icon i,
    .occupation-list-page .member-v2-action-icon i,
    .ration-list-page .member-v2-action-icon i,
    .gramsabha-list-page .member-v2-action-icon i,
    .eventdesc-list-page .member-v2-action-icon i {
        font-size: 12px;
    }

.village-list-page .member-v2-card-wrap {
    grid-template-columns: 1fr;
    gap: 0;
}

.village-list-page .village-list-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.village-list-page .member-v2-search-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.village-list-page .village-type-filter-wrap {
    position: relative;
    flex: 0 0 auto;
    z-index: 120;
}

.village-list-page .village-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: transparent;
}

.village-list-page .village-filter-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #cfe0ff;
    border-radius: 12px;
    background: #ffffff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.village-list-page .village-filter-btn.active {
    background: #eff6ff;
    border-color: #93c5fd;
}

.village-list-page .village-filter-btn span {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.village-list-page .village-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 121;
    width: 188px;
    padding: 8px;
    border: 1px solid #dbe7f7;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .16);
}

.village-list-page .village-filter-menu button {
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #10213d;
    text-align: left;
    padding: 0 10px;
    font-weight: 800;
}

.village-list-page .village-filter-menu button:hover,
.village-list-page .village-filter-menu button.active {
    background: #eff6ff;
    color: #1d4ed8;
}

.village-list-page .member-v2-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.village-list-page .member-v2-name {
    display: inline-block;
    min-width: 0;
    max-width: min(46vw, 320px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.village-list-page .village-type-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: min(42vw, 260px);
    min-width: 0;
    padding: 3px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.village-list-page .member-v2-actions--compact {
    gap: 8px;
    margin-top: 14px;
    top: 22px !important;
}

.village-list-page .member-v2-action-icon {
    width: 62px;
    height: 34px;
    border-radius: 8px;
}

    .village-list-page .member-v2-action-icon i {
        font-size: 12px;
    }

@media (max-width: 640px) {
    .village-list-page .village-list-topbar {
        gap: 8px;
        overflow: visible;
    }

    .village-list-page .village-type-filter-wrap {
        position: relative;
        z-index: 120;
    }

    .village-list-page .village-filter-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        border-color: #f59e0b;
        color: #f59e0b;
    }

    .village-list-page .village-filter-btn span {
        display: none;
    }

    .village-list-page .village-filter-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: 188px !important;
        min-width: 188px;
        max-width: calc(100vw - 28px);
        max-height: 284px;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 121;
    }

    .village-list-page .village-filter-menu button {
        min-height: 42px;
        font-size: 15px;
    }

    .village-list-page .member-v2-title-row {
        padding-right: 104px !important;
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .village-list-page .member-v2-name {
        flex: 0 1 auto;
        max-width: 96px;
    }

    .village-list-page .village-type-pill {
        flex: 0 1 auto;
        width: fit-content;
        max-width: 118px;
        padding: 2px 8px;
        font-size: 10px;
    }

    .village-list-page .member-v2-actions--compact {
        top: 34px !important;
        right: 10px;
        gap: 7px;
    }

    .village-list-page .member-v2-sub {
        display: block;
        max-width: calc(100vw - 150px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .village-list-page .member-v2-support-head span {
        max-width: 62%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Unified top-right compact actions for all master list cards */
.religion-list-page .member-v2-card-wrap,
.caste-list-page .member-v2-card-wrap,
.relation-list-page .member-v2-card-wrap,
.occupation-list-page .member-v2-card-wrap,
.ration-list-page .member-v2-card-wrap,
.gramsabha-list-page .member-v2-card-wrap,
.eventdesc-list-page .member-v2-card-wrap,
.village-list-page .member-v2-card-wrap,
.location-master-page .member-v2-card-wrap {
    position: relative;
    grid-template-columns: 1fr;
    gap: 0;
}

/* Village Voter Analytics Dashboard */
.vvd-page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 80px;
}

.vvd-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 30px;
    border: 1px solid #cfe0ff;
    border-radius: 18px;
    background: linear-gradient(105deg, #e8fff5 0%, #edf4ff 48%, #fff3df 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.vvd-kicker {
    display: block;
    margin-bottom: 8px;
    color: #245bff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.vvd-hero h2 {
    margin: 0;
    color: #07111f;
    font-size: 28px;
    font-weight: 900;
}

.vvd-hero p {
    margin: 8px 0 0;
    color: #46566d;
    font-weight: 600;
}

.vvd-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.vvd-primary,
.vvd-light {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 900;
}

.vvd-primary {
    color: #fff;
    background: linear-gradient(135deg, #2674ff, #7c35e8);
    box-shadow: 0 14px 24px rgba(79, 70, 229, .22);
}

.vvd-light {
    color: #19366e;
    background: rgba(255, 255, 255, .84);
    border: 1px solid #d3e1f7;
}

.vvd-filter-panel {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    border: 1px solid #e6ecf5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

.vvd-filter-panel label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.vvd-filter-panel label span,
.vvd-metric span,
.vvd-panel-head span {
    color: #34435a;
    font-size: 11px;
    font-weight: 900;
}

.vvd-filter-panel select,
.vvd-filter-panel input {
    width: 100%;
    height: 42px;
    border: 1px solid #d9e4f2;
    border-radius: 8px;
    padding: 0 12px;
    color: #0f172a;
    background: #fbfdff;
    font-weight: 700;
    outline: none;
}

.vvd-search-box {
    position: relative;
    min-width: 0;
}

.vvd-search-box input {
    padding-right: 36px;
}

.vvd-search-box i {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #9aa8ba;
    font-size: 13px;
}

.vvd-metric-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
}

.vvd-metric {
    position: relative;
    min-height: 118px;
    overflow: hidden;
    border: 1px solid #edf1f7;
    border-radius: 12px;
    padding: 22px 18px 18px;
    background: #fff;
    text-align: left;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

button.vvd-metric {
    cursor: pointer;
}

.vvd-metric strong {
    display: block;
    margin-top: 12px;
    color: #2563eb;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
}

.vvd-metric small {
    display: block;
    max-width: none;
    margin-top: 0;
    color: #455a75;
    font-weight: 700;
    line-height: 1.35;
}

.vvd-status-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.vvd-status-grid article {
    min-width: 0;
    min-height: 70px;
    padding: 8px 10px 8px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    background: #f8fbff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.vvd-status-grid small {
    min-width: 0;
    color: #718097;
    font-size: 11px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvd-status-grid strong {
    min-width: 0;
    color: #27364c;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.3;
}

.vvd-status-grid i {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 15px;
    color: #64748b;
    background: #eef4ff;
}

.vvd-metric-icon {
    position: static;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ef4444;
    background: rgba(99, 102, 241, .10);
    font-size: 15px;
}

.vvd-metric.active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(145deg, #3f8cff 0%, #7f5dff 100%);
}

.vvd-metric.active span,
.vvd-metric.active strong,
.vvd-metric.active small {
    color: #fff;
}

.vvd-metric.active .vvd-metric-icon {
    color: #fff;
    background: rgba(255, 255, 255, .18);
}

.vvd-metric.support .vvd-metric-icon {
    color: #11a969;
    background: rgba(16, 185, 129, .14);
}

.vvd-status-grid .active {
    color: #fff;
    background: linear-gradient(145deg, #4c86ff, #7561f5);
}

.vvd-status-grid .active small,
.vvd-status-grid .active strong {
    color: #fff;
}

.vvd-status-grid .active i {
    color: #fff;
    background: rgba(255, 255, 255, .2);
}

.vvd-status-grid .support i {
    color: #11a969;
    background: rgba(16, 185, 129, .14);
}

.vvd-status-grid .opposition i {
    color: #f97316;
    background: rgba(249, 115, 22, .15);
}

.vvd-status-grid .follow i {
    color: #3b82f6;
    background: rgba(59, 130, 246, .14);
}

.vvd-status-grid .voted i {
    color: #08a9b7;
    background: rgba(20, 184, 166, .15);
}

.vvd-status-grid .weak i {
    color: #ef4444;
    background: rgba(239, 68, 68, .14);
}

.vvd-metric.opposition .vvd-metric-icon {
    color: #f97316;
    background: rgba(249, 115, 22, .15);
}

.vvd-metric.follow .vvd-metric-icon {
    color: #3b82f6;
    background: rgba(59, 130, 246, .14);
}

.vvd-metric.voted .vvd-metric-icon {
    color: #08a9b7;
    background: rgba(20, 184, 166, .15);
}

.vvd-metric.weak .vvd-metric-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, .14);
}

.vvd-metric.support strong,
.vvd-table-row .green {
    color: #16a34a;
}

.vvd-metric.support span {
    color: #16a34a;
}

.vvd-metric.opposition strong,
.vvd-table-row .red {
    color: #ef4444;
}

.vvd-metric.opposition span {
    color: #f97316;
}

.vvd-metric.follow strong,
.vvd-table-row .purple {
    color: #7c3aed;
}

.vvd-metric.follow span {
    color: #2563eb;
}

.vvd-metric.voted strong {
    color: #0891b2;
}

.vvd-metric.voted span {
    color: #0891b2;
}

.vvd-metric.weak strong {
    color: #e11d48;
}

.vvd-metric.weak span {
    color: #e11d48;
}

.vvd-main-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
    gap: 22px;
}

.vvd-report-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.vvd-panel {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 22px;
    border: 1px solid #e5ebf4;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.vvd-panel.wide {
    grid-column: auto;
}

.vvd-panel:nth-child(5) {
    grid-column: 1 / -1;
}

.vvd-panel-body {
    min-width: 0;
    max-height: 410px;
    overflow: auto;
    padding-right: 2px;
    scrollbar-width: thin;
}

.vvd-panel-body-table {
    max-height: 310px;
    overflow: auto;
}

.vvd-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.vvd-panel-head h3 {
    margin: 5px 0 0;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

.vvd-panel-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 14px;
}

.vvd-panel-icon.purple {
    color: #7c3aed;
    background: rgba(124, 58, 237, .12);
}

.vvd-table {
    display: grid;
    gap: 0;
    min-width: 620px;
}

.vvd-table-row {
    display: grid;
    grid-template-columns: 1.6fr .65fr .65fr .7fr .7fr .7fr;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 0;
    border-radius: 0;
    padding: 14px 16px;
    background: #f8fbff;
    color: #172033;
    font-weight: 700;
    text-align: left;
}

.vvd-table-row:first-child {
    border-radius: 12px 12px 0 0;
}

.vvd-table-row:last-child {
    border-radius: 0 0 12px 12px;
}

button.vvd-table-row {
    cursor: pointer;
}

.vvd-table-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvd-table-row.head {
    background: #eef4ff;
    color: #53657a;
    font-size: 12px;
    text-transform: uppercase;
}

.vvd-donut-wrap {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

.vvd-donut {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.vvd-donut::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: #fff;
}

.vvd-donut strong,
.vvd-donut span {
    position: relative;
    z-index: 1;
}

.vvd-donut strong {
    color: #0f172a;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.vvd-donut span {
    position: absolute;
    left: 50%;
    top: calc(50% + 34px);
    transform: translateX(-50%);
    margin-top: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.vvd-legend,
.vvd-booth-list,
.vvd-stack {
    display: grid;
    gap: 10px;
}

.vvd-legend span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #415066;
    font-weight: 700;
}

.vvd-legend b {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.vvd-legend .yes {
    background: #10b981;
}

.vvd-legend .no {
    background: #ef4444;
}

.vvd-legend .pending {
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

.vvd-booth-list button,
.vvd-alert-card,
.vvd-follow-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fbff;
    color: #111827;
}

.vvd-booth-list button {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 16px;
    width: 100%;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.vvd-row-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.vvd-row-icon.blue {
    color: #2563eb;
    background: #dbeafe;
}

.vvd-row-icon.orange {
    color: #f97316;
    background: #ffedd5;
}

.vvd-row-icon.purple {
    color: #7c3aed;
    background: #ede9fe;
}

.vvd-row-arrow {
    color: #64748b;
    font-size: 12px;
}

.vvd-booth-list strong,
.vvd-alert-card strong,
.vvd-follow-card strong {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.vvd-booth-list small,
.vvd-alert-card span,
.vvd-follow-card span,
.vvd-follow-card small {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.vvd-booth-list button > span {
    min-width: 74px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #26364d;
    background: #eef4ff;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.vvd-alert-card b {
    min-width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #f97316;
}

.vvd-inline-view {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #7c3aed;
    background: #ede9fe;
}

.vvd-follow-card {
    display: grid;
    grid-template-columns: 44px minmax(160px, 1fr) minmax(120px, .7fr) minmax(100px, .7fr) auto;
    align-items: center;
    flex-direction: initial;
}

.vvd-follow-card button {
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    padding: 0 16px;
    color: #fff;
    background: linear-gradient(135deg, #6d5dfc, #8b3ff0);
    font-size: 12px;
    font-weight: 900;
}

.vvd-follow-card strong,
.vvd-follow-card span {
    display: block;
}

.vvd-follow-card > strong {
    grid-column: 2;
    grid-row: 1;
}

.vvd-follow-card > span {
    grid-column: 2;
    grid-row: 2;
}

.vvd-follow-card > small {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.vvd-follow-card > button {
    grid-column: 5;
    grid-row: 1 / span 2;
}

.vvd-rank-list {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.vvd-rank-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-left: 4px solid #2563eb;
    border-radius: 12px;
    background: #f8fbff;
}

.vvd-rank-badge {
    position: relative;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    font-size: 13px;
    font-weight: 900;
}

.vvd-rank-badge i {
    font-size: 17px;
}

.vvd-rank-badge span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -42%);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(15, 23, 42, .28);
}

.vvd-rank-card.rank-gold {
    border-left-color: #f59e0b;
    background: linear-gradient(90deg, rgba(245, 158, 11, .12), #f8fbff 42%);
}

.vvd-rank-card.rank-gold .vvd-rank-badge {
    background: linear-gradient(135deg, #fbbf24, #f97316);
}

.vvd-rank-card.rank-silver {
    border-left-color: #94a3b8;
    background: linear-gradient(90deg, rgba(148, 163, 184, .16), #f8fbff 42%);
}

.vvd-rank-card.rank-silver .vvd-rank-badge {
    background: linear-gradient(135deg, #cbd5e1, #64748b);
}

.vvd-rank-card.rank-bronze {
    border-left-color: #b45309;
    background: linear-gradient(90deg, rgba(180, 83, 9, .13), #f8fbff 42%);
}

.vvd-rank-card.rank-bronze .vvd-rank-badge {
    background: linear-gradient(135deg, #d97706, #92400e);
}

.vvd-rank-card.rank-last {
    border-left-color: #ef4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, .12), #f8fbff 42%);
}

.vvd-rank-card.rank-last .vvd-rank-badge {
    background: linear-gradient(135deg, #fb7185, #dc2626);
}

.vvd-rank-card div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.vvd-rank-card strong,
.vvd-rank-card span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvd-rank-card strong {
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}

.vvd-rank-card span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.vvd-rank-card em {
    min-width: 52px;
    padding: 8px 10px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eef4ff;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.vvd-voter-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .48);
}

.vvd-voter-modal {
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.vvd-voter-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 22px;
    border-bottom: 1px solid #e6edf7;
}

.vvd-voter-modal-head span {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.vvd-voter-modal-head h3 {
    max-width: 540px;
    margin: 5px 0 0;
    color: #111827;
    font-size: 20px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvd-voter-modal-head p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.vvd-voter-modal-head button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #334155;
    background: #f1f5f9;
}

.vvd-voter-modal-list {
    max-height: calc(100vh - 190px);
    overflow: auto;
    padding: 18px;
    display: grid;
    gap: 10px;
    background: #fbfdff;
}

.vvd-voter-modal-list .vvc-select-row {
    margin: 0;
}

@media (max-width: 900px) {
    .vvd-page {
        width: min(100% - 28px, 560px);
        padding: 24px 0 94px;
    }

    .vvd-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 24px;
    }

    .vvd-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-content: stretch;
    }

    .vvd-actions .vvd-primary {
        grid-column: 1 / -1;
    }

    .vvd-filter-panel,
    .vvd-main-grid,
    .vvd-report-grid {
        grid-template-columns: 1fr;
    }

    .vvd-metric-grid,
    .vvd-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vvd-panel {
        padding: 16px;
    }

    .vvd-panel:nth-child(5) {
        grid-column: auto;
    }

    .vvd-panel-body {
        max-height: 430px;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .vvd-panel-body-table {
        max-height: 330px;
    }

    .vvd-table {
        min-width: 680px;
    }

    .vvd-booth-list,
    .vvd-stack,
    .vvd-rank-list {
        min-width: 560px;
    }

    .vvd-booth-list button,
    .vvd-alert-card,
    .vvd-follow-card,
    .vvd-rank-card {
        min-width: 560px;
    }

    .vvd-donut-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .vvd-follow-card {
        grid-template-columns: 40px minmax(170px, 1fr) minmax(140px, .8fr) auto;
    }

    .vvd-follow-card > strong {
        grid-column: 2;
    }

    .vvd-follow-card > span {
        grid-column: 2;
    }

    .vvd-follow-card > small {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .vvd-follow-card > button {
        grid-column: 4;
        grid-row: 1 / span 2;
        padding: 0 12px;
    }
}

.religion-list-page .member-v2-title-row,
.caste-list-page .member-v2-title-row,
.relation-list-page .member-v2-title-row,
.occupation-list-page .member-v2-title-row,
.ration-list-page .member-v2-title-row,
.gramsabha-list-page .member-v2-title-row,
.eventdesc-list-page .member-v2-title-row,
.village-list-page .member-v2-title-row,
.location-master-page .member-v2-title-row {
    padding-right: 120px;
}

.religion-list-page .member-v2-name,
.caste-list-page .member-v2-name,
.relation-list-page .member-v2-name,
.occupation-list-page .member-v2-name,
.ration-list-page .member-v2-name,
.gramsabha-list-page .member-v2-name,
.eventdesc-list-page .member-v2-name,
.village-list-page .member-v2-name,
.location-master-page .member-v2-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.religion-list-page .member-v2-actions--compact,
.caste-list-page .member-v2-actions--compact,
.relation-list-page .member-v2-actions--compact,
.occupation-list-page .member-v2-actions--compact,
.ration-list-page .member-v2-actions--compact,
.gramsabha-list-page .member-v2-actions--compact,
.eventdesc-list-page .member-v2-actions--compact,
.village-list-page .member-v2-actions--compact,
.location-master-page .member-v2-actions--compact {
    position: absolute;
    top: 8px;
    right: 10px;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.religion-list-page .member-v2-action-icon,
.caste-list-page .member-v2-action-icon,
.relation-list-page .member-v2-action-icon,
.occupation-list-page .member-v2-action-icon,
.ration-list-page .member-v2-action-icon,
.gramsabha-list-page .member-v2-action-icon,
.eventdesc-list-page .member-v2-action-icon,
.village-list-page .member-v2-action-icon,
.location-master-page .member-v2-action-icon {
    width: 31px;
    height: 33px;
}

.location-master-page .member-v2-body-row {
    padding-right: 120px;
}

.location-master-title {
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.location-master-field {
    display: block;
    min-width: 0;
    white-space: normal;
}

.location-master-label {
    font-weight: 700;
    color: #0f172a;
}

.location-master-value {
    color: #334155;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .religion-list-page .list-container {
        padding: 0 4px !important;
        gap: 12px !important;
    }

    .religion-list-page .list-card {
        padding: 14px 12px;
    }
}

.member-list-v2 .view-icon-btn {
    display: none;
}

@media (max-width: 768px) {
    .member-list-v2 {
        gap: 8px;
    }

    .member-list-v2--alpha {
        height: calc(100dvh - var(--app-header-height, 84px) - var(--app-footer-height, 64px) - env(safe-area-inset-bottom) - 10px);
        gap: 8px;
    }

    .member-alpha-shell {
        grid-template-columns: minmax(0, 1fr) 22px;
        gap: 6px;
    }

    .member-alpha-rail {
        width: 20px;
        padding: 5px 2px;
        --alpha-pad: 5px;
        --alpha-selector-height: 14px;
    }

    .member-alpha-rail__selector {
        width: 16px;
    }

    .member-alpha-rail__letter {
        width: 16px;
        font-size: 7px;
        font-weight: 900;
    }

    .member-stat-value {
        font-size: 22px;
    }

    .member-stat-label {
        font-size: 11px;
    }

    .member-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .member-stats-row:has(> .member-stat-card:nth-child(3)) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .member-stats-row:has(> .member-stat-card:nth-child(4)) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .member-stats-row:has(> .member-stat-card:nth-child(3)) .member-stat-card {
        padding: 8px 6px;
    }

    .member-stats-row:has(> .member-stat-card:nth-child(3)) .member-stat-head {
        gap: 6px;
    }

    .member-stats-row:has(> .member-stat-card:nth-child(3)) .member-stat-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .member-stats-row:has(> .member-stat-card:nth-child(3)) .member-stat-value {
        font-size: 20px;
    }

    .member-stats-row:has(> .member-stat-card:nth-child(3)) .member-stat-label {
        font-size: 10px;
        line-height: 1.15;
    }

    .member-role-tabs .tab {
        font-size: 12px;
        padding: 9px 4px;
    }

    .leader-role-tabs {
        width: 100%;
        border-radius: 10px;
    }

        .leader-role-tabs .tab {
            flex: 0 0 auto;
            min-width: 56px;
            padding: 8px 10px;
            font-size: 11px;
        }

    .member-list-v2 .list-card {
        padding: 10px 10px;
    }

    .member-list-v2 .list-container {
        gap: 12px !important;
    }

    .member-list-v2 .pagination-row {
        margin: 8px 0 3px;
        gap: 3px;
    }

    .member-list-v2 .pagination-pages {
        gap: 3px;
    }

    .member-list-v2 .page-btn {
        min-width: 30px;
        height: 30px;
        padding: 0 7px;
        border-radius: 8px;
        font-size: 12px;
    }

    .member-list-v2 .pagination-info {
        font-size: 10.5px;
    }

    .member-v2-card-wrap {
        grid-template-columns: 62px 1fr;
        gap: 8px;
    }

    .member-v2-avatar {
        width: 54px;
        height: 54px;
        margin-top: 7px;
    }

    .member-v2-details {
        padding-top: 2px;
    }

    .member-v2-name {
        font-size: 14px;
    }

    .member-v2-filter-btn {
        padding: 0 12px;
        font-size: 14px;
    }

    .member-v2-view-btn {
        font-size: 12px;
    }

    .member-v2-fab {
        right: 10px;
        width: 70px;
        height: 70px;
    }
}

/* Mobile bottom footer navigation */
.app-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    background: #ffffff;
    border-top: 1px solid #e8ebf2;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}

.app-bottom-nav__item {
    border: 0;
    background: transparent;
    text-decoration: none;
    color: #64748b;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 6px 2px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

    .app-bottom-nav__item i {
        font-size: 15px;
        line-height: 1;
    }

    .app-bottom-nav__item.active {
        color: #1d4ed8;
        background: #eef4ff;
    }

.app-bottom-nav__more {
    cursor: pointer;
}

@media (max-width: 768px) {
    .app-bottom-nav {
        padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
        align-items: center;
    }

    .app-bottom-nav__item {
        width: 44px;
        height: 44px;
        justify-self: center;
        padding: 0;
        gap: 0;
        border-radius: 14px;
    }

    .app-bottom-nav__item span {
        display: none !important;
    }

    .app-bottom-nav__item i {
        font-size: 17px;
    }
}

.page-scroll-with-footer {
    padding-bottom: 96px !important;
}

@media (min-width: 769px) {
    .app-bottom-nav {
        display: none;
    }
}

/* Final header scroll fix */
.main-content {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .main-content .app-header {
        position: sticky !important;
        top: 0;
        z-index: 1300;
        flex-shrink: 0;
    }

    .main-content .page-scroll {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

/* Global safe spacing when fixed header/footer are active */
.page-scroll-with-footer {
    padding-bottom: calc(74px + env(safe-area-inset-bottom)) !important;
}

    .page-scroll-with-footer .page-content,
    .page-scroll-with-footer.page-content {
        padding-bottom: calc(74px + env(safe-area-inset-bottom)) !important;
    }

@media (max-width: 768px) {
    .main-content {
        position: relative;
    }

        .main-content .app-header {
            position: fixed !important;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1300;
        }

        .main-content .page-scroll {
            margin-top: 50px; /* mobile header height */
        }
}

/* Unified mobile shell spacing fix (final authority) */
:root {
    --app-header-content-height: 58px;
    --app-safe-area-top: max(env(safe-area-inset-top), 28px);
    --app-header-height: calc(var(--app-header-content-height) + var(--app-safe-area-top));
    --app-footer-height: 64px;
}

@media (max-width: 768px) {
    .main-content {
        height: 100dvh !important;
        min-height: 100dvh !important;
        overflow: hidden !important;
    }

        .main-content > .app-header {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            z-index: 1300 !important;
            height: var(--app-header-height) !important;
            padding-top: var(--app-safe-area-top) !important;
            box-sizing: border-box !important;
        }

        .main-content > .page-scroll {
            flex: 1 1 auto !important;
            min-height: 0 !important;
            overflow-y: auto !important;
            margin-top: 0 !important;
            padding-top: var(--app-header-height) !important;
        }

    .app-bottom-nav {
        height: calc(var(--app-footer-height) + env(safe-area-inset-bottom)) !important;
        padding-top: 6px !important;
        padding-bottom: calc(6px + env(safe-area-inset-bottom)) !important;
    }

    /* Prevent extra blank scroll on short pages (e.g. 1 card lists) */
    .page-container > .footer-spacer {
        display: none !important;
        height: 0 !important;
    }

    .page-scroll-with-footer {
        padding-bottom: calc(var(--app-footer-height) + env(safe-area-inset-bottom)) !important;
    }

        .page-scroll-with-footer .page-content,
        .page-scroll-with-footer.page-content {
            padding-bottom: 0 !important;
        }

        /* Keep page action footer visible above bottom app nav */
        .page-scroll-with-footer .action-footer,
        .main-content .action-footer {
            bottom: calc(var(--app-footer-height) + env(safe-area-inset-bottom)) !important;
            z-index: 1302 !important;
        }
}
/* Dashboard V3 */
.dash-v3 {
    display: grid;
    gap: 14px;
}

.report-coming-soon {
    min-height: calc(100dvh - 180px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    padding: 32px 20px;
}

.report-coming-soon__icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg,#7c3aed,#2563eb);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.22);
    font-size: 28px;
}

.report-coming-soon__eyebrow {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.report-coming-soon h1 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
}

.report-coming-soon__copy {
    max-width: 320px;
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.report-coming-soon__button {
    margin-top: 10px;
    border: 0;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.report-coming-soon__button:active {
    transform: translateY(1px);
}

.dash-v3-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 12px;
}

.dash-v3-stat {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

.dash-v3-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
}

.dash-v3-stat-members .dash-v3-stat-icon {
    background: linear-gradient(135deg,#7c3aed,#4f46e5);
}

.dash-v3-stat-village .dash-v3-stat-icon {
    background: linear-gradient(135deg,#3b82f6,#2563eb);
}

.dash-v3-stat-leader .dash-v3-stat-icon {
    background: linear-gradient(135deg,#22c55e,#16a34a);
}

.dash-v3-stat-pending .dash-v3-stat-icon {
    background: linear-gradient(135deg,#fb923c,#f97316);
}

.dash-v3-stat-title {
    font-size: 12px;
    color: #667085;
}

.dash-v3-stat-value {
    font-size: 21px;
    line-height: 1;
    font-weight: 500;
    color: #0f172a;
}

.dash-v3-stat-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.dash-v3-booth-details {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    padding: 14px;
}

.dash-v3-booth-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dash-v3-booth-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    line-height: 1.15;
    font-weight: 800;
}

.dash-v3-booth-head span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.dash-v3-booth-loading {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    margin: 0 !important;
    color: #2563eb !important;
}

.dash-v3-booth-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.dash-v3-member-voter-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dash-v3-booth-card {
    min-width: 0;
    min-height: 92px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 1px solid #e8ecf4;
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
}

.dash-v3-booth-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
}

.dash-v3-booth-card span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.dash-v3-booth-card strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 20px;
    line-height: 1;
    font-weight: 500;
}

.dash-v3-booth-card.booths .dash-v3-booth-icon {
    background: linear-gradient(135deg,#6366f1,#4f46e5);
}

.dash-v3-booth-card.total .dash-v3-booth-icon {
    background: linear-gradient(135deg,#0ea5e9,#2563eb);
}

.dash-v3-booth-card.male .dash-v3-booth-icon {
    background: linear-gradient(135deg,#22c55e,#16a34a);
}

.dash-v3-booth-card.female .dash-v3-booth-icon {
    background: linear-gradient(135deg,#f472b6,#ec4899);
}

.dash-v3-booth-card.deleted .dash-v3-booth-icon {
    background: linear-gradient(135deg,#f97316,#ef4444);
}

.dash-v3-booth-card.third .dash-v3-booth-icon {
    background: linear-gradient(135deg,#a855f7,#7c3aed);
}

.dash-v3-booth-card.member-total .dash-v3-booth-icon {
    background: linear-gradient(135deg,#06b6d4,#0284c7);
}

.dash-v3-booth-card.member-male .dash-v3-booth-icon {
    background: linear-gradient(135deg,#38bdf8,#2563eb);
}

.dash-v3-booth-card.member-female .dash-v3-booth-icon {
    background: linear-gradient(135deg,#fb7185,#db2777);
}

.dash-v3-booth-card.member-third .dash-v3-booth-icon {
    background: linear-gradient(135deg,#c084fc,#9333ea);
}

.dash-v3-booth-card.voter-total .dash-v3-booth-icon {
    background: linear-gradient(135deg,#14b8a6,#0f766e);
}

.dash-v3-booth-card.voter-present .dash-v3-booth-icon {
    background: linear-gradient(135deg,#22c55e,#15803d);
}

.dash-v3-booth-card.voter-absent .dash-v3-booth-icon {
    background: linear-gradient(135deg,#f59e0b,#ea580c);
}

.dash-v3-booth-error {
    margin-top: 10px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
}

.dash-v3-panels {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dash-v3-panel {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    padding: 12px;
}

.dash-v3-panel-head {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.dash-v3-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.dash-v3-chart-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
}

    .dash-v3-chart-legend span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .dash-v3-chart-legend i {
        width: 10px;
        height: 3px;
        border-radius: 3px;
        display: inline-block;
    }

    .dash-v3-chart-legend .lg-members {
        background: #7c3aed;
    }

    .dash-v3-chart-legend .lg-villages {
        background: #3b82f6;
    }

    .dash-v3-chart-legend .lg-leaders {
        background: #22c55e;
    }

.dash-v3-range-select {
    border: 1px solid #e7eaf1;
    background: #fff;
    color: #64748b;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    outline: none;
    min-width: 108px;
}

.dash-v3-chart-wrap {
    height: 210px;
}

.dash-v3-chart-svg {
    width: 100%;
    height: 100%;
    display: block;
}

    .dash-v3-chart-svg .grid line {
        stroke: #edf1f7;
        stroke-width: 1;
    }

    .dash-v3-chart-svg .axis line {
        stroke: #e4eaf3;
        stroke-width: 1;
    }

    .dash-v3-chart-svg .village-fill {
        fill: url(#ovFill);
    }

    .dash-v3-chart-svg .member-fill {
        fill: url(#ovMemberFill);
    }

    .dash-v3-chart-svg .leader-fill {
        fill: url(#ovLeaderFill);
    }

    .dash-v3-chart-svg .village-line,
    .dash-v3-chart-svg .member-line,
    .dash-v3-chart-svg .leader-line {
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .dash-v3-chart-svg .village-line {
        stroke: #3b82f6;
        stroke-width: 2.2;
    }

    .dash-v3-chart-svg .member-line {
        stroke: #7c3aed;
        stroke-width: 1.8;
    }

    .dash-v3-chart-svg .leader-line {
        stroke: #22c55e;
        stroke-width: 1.8;
    }

    .dash-v3-chart-svg .tick-text text {
        fill: #8a94a6;
        font-size: 10px;
        font-weight: 500;
    }

.dash-v3-ring-wrap {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
}

.dash-v3-ring-donut {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.dash-v3-ring-inner {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    text-align: center;
}

    .dash-v3-ring-inner strong {
        display: block;
        font-size: 40px;
        line-height: 1;
        color: #334155;
        font-weight: 800;
    }

    .dash-v3-ring-inner span {
        display: block;
        font-size: 12px;
        color: #64748b;
        font-weight: 600;
        margin-top: 2px;
    }

.dash-v3-ring-legend {
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: #334155;
}

    .dash-v3-ring-legend span {
        width: 10px;
        height: 10px;
        border-radius: 2px;
        display: inline-block;
        margin-right: 6px;
    }

    .dash-v3-ring-legend b {
        margin-left: 6px;
        font-weight: 600;
        color: #475569;
    }

.l-pending {
    background: #fb923c;
}

.l-approved {
    background: #22c55e;
}

.l-rejected {
    background: #ef4444;
}

.dash-v3-quick {
    background: #f8f7ff;
    border: 1px solid #e5e2ff;
    border-radius: 14px;
    padding: 10px;
}

.dash-v3-quick-head {
    font-size: 14px;
    font-weight: 700;
    color: #312e81;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-v3-quick-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
}

.dash-v3-quick-item {
    border: 1px solid #e8ecf4;
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    gap: 10px;
    text-align: left;
    align-items: center;
}

    .dash-v3-quick-item i {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background: #eef2ff;
        color: #4f46e5;
    }

    .dash-v3-quick-item strong {
        display: block;
        font-size: 14px;
        color: #111827;
    }

    .dash-v3-quick-item span {
        display: block;
        font-size: 12px;
        color: #64748b;
    }

.dash-v3-pending-table-wrap {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    padding: 8px;
    overflow: auto;
}

.dash-v3-pending-card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

    .dash-v3-pending-card-list .pending-card {
        width: 100%;
        margin: 0;
    }

.dash-v3-pending-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

    .dash-v3-pending-table th {
        text-align: left;
        font-size: 12px;
        color: #64748b;
        padding: 8px;
        border-bottom: 1px solid #eef2f7;
    }

    .dash-v3-pending-table td {
        font-size: 13px;
        color: #334155;
        padding: 10px 8px;
        border-bottom: 1px solid #f1f5f9;
    }

.pv-badge {
    background: #ede9fe;
    color: #6d28d9;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
}

.pv-status {
    background: #ffedd5;
    color: #c2410c;
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
}

.pv-actions {
    display: flex;
    gap: 6px;
}

    .pv-actions .approve-btn, .pv-actions .reject-btn, .pv-actions .btn-view {
        padding: 6px 10px;
        border-radius: 8px;
        font-size: 12px;
        border: 0;
    }

    .pv-actions .btn-view {
        background: #eef2f7;
        color: #334155;
    }

@media (max-width: 1180px) {
    .dash-v3-booth-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .dash-v3-stats {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .dash-v3-booth-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-v3-panels {
        grid-template-columns: 1fr;
    }

    .dash-v3-quick-grid {
        grid-template-columns: 1fr;
    }

    .dash-v3-chart-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-v3-chart-wrap {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .dash-v3-booth-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dash-v3-booth-details {
        padding: 12px;
    }

    .dash-v3-booth-card {
        min-height: 104px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px;
        padding: 10px;
        align-items: center;
    }

    .dash-v3-booth-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 14px;
    }

    .dash-v3-booth-card span {
        font-size: 10px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .dash-v3-booth-card strong {
        font-size: 18px;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }
}

/* Keep modals above page controls such as list filter buttons/dropdowns. */
.modal-overlay {
    z-index: 4000 !important;
}

.modal-overlay .modal-box {
    position: relative;
    z-index: 4001;
}

/* ===== Login V2 final styling ===== */
.login-container {
    min-height: 100dvh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f4f6fa;
    overflow-y: auto;
    box-sizing: border-box;
}

.login-wrapper {
    width: min(100%, 390px);
    max-width: 390px;
    min-height: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    margin: 0 0 -34px;
    position: relative;
    z-index: 2;
}

    .login-logo img {
        width: 88px;
        height: 88px;
        border-radius: 50%;
        object-fit: cover;
        border: 4px solid #ffffff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    }

.login-card {
    width: 100%;
    min-height: 510px;
    padding: 78px 32px 0;
    background: #ffffff;
    border: 1px solid #edf1f7;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    overflow: hidden;
    position: relative;
}

.login-heading {
    text-align: center;
    margin-bottom: 26px;
}

    .login-heading h2 {
        margin: 0;
        color: #172033;
        font-size: 24px;
        line-height: 1.15;
        font-weight: 800;
    }

    .login-heading p {
        margin: 8px 0 0;
        color: #7b8798;
        font-size: 14px;
    }

.login-field {
    margin-bottom: 14px;
}

    .login-field label {
        display: block;
        margin-bottom: 7px;
        color: #1f2937;
        font-size: 12px;
        font-weight: 700;
    }

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .login-input-wrap > i:first-child {
        position: absolute;
        left: 14px;
        color: #64748b;
        font-size: 15px;
        z-index: 1;
    }

    .login-input-wrap .form-input {
        width: 100%;
        height: 44px;
        padding: 0 42px 0 42px;
        border: 1px solid #d7dee9;
        border-radius: 10px;
        background: #ffffff;
        color: #172033;
        font-size: 14px;
        outline: none;
        transition: border-color .18s ease, box-shadow .18s ease;
    }

        .login-input-wrap .form-input:focus {
            border-color: #2f6bea;
            box-shadow: 0 0 0 3px rgba(47, 107, 234, 0.12);
        }

.password-input .form-input {
    padding-right: 44px;
}

.password-toggle {
    right: 14px;
    color: #6b7280;
    font-size: 15px;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 18px;
    font-size: 12px;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    user-select: none;
}

    .remember-me input {
        width: 14px;
        height: 14px;
        accent-color: #2463eb;
    }

.login-options a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
}

.login-btn {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d66f2, #1557e8);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 42px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.login-card-bottom {
    position: relative;
    min-height: 160px;
    margin: 26px -32px 0;
    padding-top: 2px;
}

.login-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #7b8798;
    font-size: 12px;
    position: relative;
    z-index: 2;
}

    .login-divider span {
        width: 54px;
        height: 1px;
        background: #e4e9f1;
    }

.login-shield {
    width: 44px;
    height: 44px;
    margin: 18px auto 0;
    border: 1px solid #2f6bea;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #2563eb;
    background: rgba(255, 255, 255, 0.82);
    position: relative;
    z-index: 2;
}

.login-building {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    width: 100%;
    height: 132px;
    object-fit: cover;
    object-position: center bottom;
    pointer-events: none;
    opacity: 0.9;
}

.login-footer {
    margin-top: 14px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 480px) {
    .login-container {
        align-items: flex-start;
        padding: 14px;
        background: #eef1f6;
    }

    .login-wrapper {
        width: 100%;
        max-width: 100%;
        padding-bottom: 22px;
    }

    .login-card {
        min-height: calc(70px);
        padding: 74px 22px 0;
        border-radius: 14px;
    }

    .login-heading h2 {
        font-size: 22px;
    }

    .login-card-bottom {
        margin-left: -22px;
        margin-right: -22px;
    }
}

/* Village Add wizard UI */
.village-add-v3 .member-add-wizard-status {
    margin-bottom: 14px;
}

.village-add-v3 .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.village-add-v3 .form-input[readonly] {
    cursor: pointer;
    background: #fff;
}

.village-add-caste-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.village-add-caste-toolbar .search-box {
    width: 100%;
    min-width: 0;
    flex: 0 1 auto;
}

.village-add-caste-toolbar .add-btn {
    width: 48px;
    min-width: 48px;
    flex: 0 0 48px;
}

.village-add-caste-grid {
    width: 100%;
    overflow-x: auto;
}

.village-add-caste-grid .member-grid-header,
.village-add-caste-grid .member-card-grid {
    grid-template-columns: 44px minmax(120px, 1.4fr) repeat(4, minmax(100px, 1fr)) 48px;
    min-width: 700px;
}

.village-add-caste-grid .member-card-grid .form-input {
    width: 76px;
    min-width: 76px;
    height: 34px;
    padding: 6px 8px;
    font-size: 13px;
}

.village-caste-row-action {
    display: flex;
    align-items: center;
    justify-content: center;
}

.village-caste-delete-icon {
    width: 34px;
    height: 34px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff1f2;
    color: #ef4444;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.village-caste-delete-icon:hover {
    background: #fee2e2;
}

.village-add-caste-modal .modal-body {
    display: grid;
    gap: 12px;
}

.village-add-caste-options-list {
    max-height: min(42vh, 320px);
}

.village-add-caste-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    text-align: left;
}

.village-add-caste-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    justify-self: start;
    accent-color: #3b82f6;
}

.village-add-caste-option-name {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.village-add-actions {
    position: static;
    padding: 14px 0 6px;
    background: transparent;
    box-shadow: none;
}

.village-add-actions .btn-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.village-add-actions .save-btn,
.village-add-actions .cancel-btn {
    min-width: 118px;
    height: 46px;
}

@media (max-width: 720px) {
    .village-add-v3 .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .village-add-caste-toolbar {
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 8px;
        display: grid;
        width: 100%;
        align-items: center;
    }

    .village-add-caste-toolbar .search-box {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        min-width: 0;
        max-width: 87%;
        flex: 0 1 auto;
        min-height: 40px;
    }

    .village-add-caste-toolbar .add-btn {
        grid-column: 2;
        grid-row: 1;
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        flex: 0 0 44px;
        min-height: 40px;
    }

    .village-add-caste-toolbar .btn-edit,
    .village-add-caste-toolbar .btn-delete {
        min-height: 42px;
    }

    .village-add-caste-grid {
        overflow-x: visible;
        display: grid;
        gap: 10px;
    }

    .village-add-caste-grid .member-grid-header {
        display: none;
    }

    .village-add-caste-grid .member-card-grid {
        position: relative;
        min-width: 0;
        width: 100%;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        padding: 10px;
        margin-top: 0;
        border: 1px solid #dbeafe;
        border-left: 4px solid #2f7df6;
        border-radius: 14px;
        background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
        padding-right: 46px;
    }

    .village-add-caste-grid .member-card-grid > div:nth-child(1) {
        grid-row: 1 / span 3;
        width: 28px;
        height: 28px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: #eef5ff;
        color: #2563eb;
        font-size: 12px;
        font-weight: 800;
        align-self: start;
    }

    .village-add-caste-grid .member-card-grid > div:nth-child(2) {
        grid-column: 2 / -1;
        padding-right: 18px;
        min-width: 0;
        font-size: 14px;
        font-weight: 800;
        color: #111827;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .village-add-caste-grid .member-card-grid > div:nth-child(n+3) {
        min-width: 0;
        display: grid;
        gap: 4px;
    }

    .village-add-caste-grid .member-card-grid > div:nth-child(3)::before {
        content: "Male";
    }

    .village-add-caste-grid .member-card-grid > div:nth-child(4)::before {
        content: "Female";
    }

    .village-add-caste-grid .member-card-grid > div:nth-child(5)::before {
        content: "Present";
    }

    .village-add-caste-grid .member-card-grid > div:nth-child(6)::before {
        content: "Total";
    }

    .village-add-caste-grid .member-card-grid > div:nth-child(7) {
        position: absolute;
        top: 10px;
        right: 10px;
        display: block;
    }

    .village-add-caste-grid .member-card-grid .village-caste-delete-icon {
        width: 30px;
        height: 30px;
        border-radius: 9px;
        font-size: 12px;
        box-shadow: 0 5px 12px rgba(239, 68, 68, 0.12);
    }

    .village-add-caste-grid .member-card-grid > div:nth-child(n+3)::before {
        color: #64748b;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        text-transform: uppercase;
        letter-spacing: .02em;
    }

    .village-add-caste-grid .member-card-grid .form-input {
        width: 100%;
        min-width: 0;
        height: 34px;
        border-radius: 9px;
        background: #fff;
        font-size: 12px;
    }

    .village-add-actions .btn-group {
        gap: 8px;
    }

    .village-add-actions .save-btn,
    .village-add-actions .cancel-btn {
        min-width: 0;
        flex: 1 1 0;
        height: 42px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .village-add-v3 {
        padding-left: 10px;
        padding-right: 10px;
    }

    .village-add-actions .btn-group {
        gap: 6px;
    }
}

/* Pending request view styled like member view */
.pending-view-v2 .mvm-body {
    background: #fff;
}

.pending-view-v2-hero {
    margin-bottom: 0;
}

.pending-view-v2-hero-grid {
    grid-template-columns: 96px 1fr;
}

.pending-view-v2-avatar {
    width: 96px;
    height: 96px;
    border-width: 4px;
}

.pending-view-v2-avatar-img {
    display: block;
    object-fit: cover;
    background: #fff;
}

.caste-category-select {
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    color: #667085;
    background: #fff;
}

.caste-category-select i {
    color: #98a2b3;
    font-size: 12px;
}

.pending-view-v2-section,
.pending-view-v2-details .mvm-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    margin: 0;
}

.pending-view-v2-details {
    display: grid;
    gap: 12px;
}

.pending-view-v2-details > .mvm-section {
    display: grid;
    gap: 0;
}

.pending-view-v2 .mvm-section-title {
    list-style: none;
    font-size: 16px;
    font-weight: 600;
    color: #1d2740;
    padding: 11px 16px;
    background: linear-gradient(90deg, #f7f8fb 0%, #ffffff 100%);
    border-bottom: 1px solid #edf0f5;
    letter-spacing: 0;
    text-transform: none;
}

.pending-view-v2-details > .mvm-section:nth-of-type(1) > .mvm-section-title {
    color: #2254db;
}

.pending-view-v2-details > .mvm-section:nth-of-type(2) > .mvm-section-title {
    color: #6f43c0;
}

.pending-view-v2-details > .mvm-section:nth-of-type(3) > .mvm-section-title {
    color: #ef6c00;
}

.pending-view-v2-details > .mvm-section:nth-of-type(4) > .mvm-section-title {
    color: #218a45;
}

.pending-view-v2 .mvm-card,
.pending-view-v2 .mvm-card1 {
    padding: 12px 14px 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 0;
    border-radius: 0 0 12px 12px;
    background: #fff;
}

.pending-view-v2 .mvm-field {
    border-right: 1px solid #edf0f5;
    border-bottom: 1px solid #edf0f5;
    padding: 12px;
    min-height: 74px;
    display: grid;
    gap: 4px;
    align-content: center;
}

.pending-view-v2 .mvm-field:nth-child(3n) {
    border-right: 0;
}

.pending-view-v2 .mvm-label {
    color: #7b8496;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.pending-view-v2 .mvm-value {
    color: #1d2435;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
}

.pending-view-v2 .mvm-field-changed {
    background: #fff8e1;
    border-left: 3px solid #f59e0b;
}

.pending-view-v2-legend {
    display: none;
}

.pending-view-v2 .mvm-photo-wrapper {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 10px;
    border-right: 0;
}

.pending-view-v2 .mvm-avatar {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    object-fit: cover;
}

.pending-view-v2 .vvm-table-header,
.pending-view-v2 .vvm-table-row,
.pending-view-v2 .mvm-table-wrapper {
    margin: 0 14px 12px;
}

.pending-view-v2 .mvm-list-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.pending-view-v2 .mvm-list-table th,
.pending-view-v2 .mvm-list-table td {
    border: 1px solid #edf0f5;
    padding: 10px;
    font-size: 12px;
    color: #1d2435;
}

@media (max-width: 768px) {
    .pending-view-v2-hero-grid {
        grid-template-columns: 74px 1fr;
    }

    .pending-view-v2-avatar {
        width: 74px;
        height: 74px;
        border-width: 3px;
    }

    .pending-view-v2 .mvm-card,
    .pending-view-v2 .mvm-card1 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 10px 12px 12px;
    }

    .pending-view-v2 .mvm-field {
        padding: 10px;
        min-height: 66px;
    }

    .pending-view-v2 .mvm-field:nth-child(3n) {
        border-right: 1px solid #edf0f5;
    }

    .pending-view-v2 .mvm-field:nth-child(2n) {
        border-right: 0;
    }

    .pending-view-v2 .mvm-section-title {
        font-size: 12px;
        padding: 10px 12px;
    }

    .pending-view-v2 .mvm-label {
        font-size: 11px;
    }

    .pending-view-v2 .mvm-value {
        font-size: 12px;
    }
}

/* Pending view accordion behavior */
.pending-view-v2 .pending-view-v2-head,
.pending-view-v2 .mvm-section-title {
    cursor: pointer;
}

.pending-view-v2 .mvm-section-title {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
}

.pending-view-v2 .mvm-section-title::after {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 13px;
    color: #475569;
    transition: transform .2s ease;
}

.pending-view-v2 .pending-view-v2-collapsible:not(.pending-view-v2-collapsed) > .mvm-section-title::after {
    transform: rotate(180deg);
}

.pending-view-v2 .pending-view-v2-collapsed > :not(.mvm-section-title) {
    display: none !important;
}

.required-label::after {
    content: " *";
    color: #ef4444;
    font-weight: 700;
}

.validation-focus-error {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18) !important;
    border-radius: 10px;
}
.event-photo-upload-box {
    display: grid;
    gap: 10px;
}

.event-photo-picker {
    position: relative;
    min-height: 118px;
    border: 1.5px dashed #8b5cf6;
    border-radius: 16px;
    background: linear-gradient(135deg, #fbfaff 0%, #eef5ff 100%);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    padding: 18px;
    color: #1f2a44;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.event-photo-picker:hover {
    border-color: #2563eb;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .12);
    transform: translateY(-1px);
}

.event-photo-picker input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.event-photo-picker-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #6d5dfc;
    background: rgba(109, 93, 252, .13);
    font-size: 18px;
}

.event-photo-picker-title {
    font-size: 14px;
    font-weight: 700;
}

.event-photo-picker-subtitle {
    font-size: 12px;
    color: #667085;
    text-align: center;
}

.event-photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
}

.event-photo-preview-grid--view {
    margin-top: 12px;
}

.event-photo-preview-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #dbe5f4;
}

.event-photo-clear-btn {
    width: fit-content;
    padding-inline: 18px;
}

.event-view-modal {
    max-width: 560px;
    border-radius: 18px;
    overflow: hidden;
}

.event-view-modal .modal-body {
    padding: 16px;
    background: #fff;
}

.event-view-v2 {
    display: grid;
    gap: 14px;
}

.event-view-hero {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #173fb8 0%, #3369ee 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.event-view-avatar {
    width: 82px;
    height: 82px;
    border: 4px solid rgba(255,255,255,.85);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 34px;
    background: rgba(255,255,255,.14);
}

.event-view-hero-info {
    min-width: 0;
}

.event-view-hero-info h3 {
    margin: 8px 0 8px;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 800;
    word-break: break-word;
}

.event-view-hero-info p {
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.25;
}

.event-view-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: rgba(255,255,255,.22);
}

.event-view-status.status-pending1 {
    background: #22c55e;
}

.event-view-status.status-done {
    background: #16a34a;
}

.event-view-section {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.event-view-section-title {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    font-weight: 800;
    font-size: 15px;
    color: #2254db;
    background: linear-gradient(90deg, #f7f9ff 0%, #ffffff 100%);
    border-bottom: 1px solid #edf0f5;
}

.event-view-section-photo .event-view-section-title {
    color: #6f43c0;
}

.event-view-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px;
}

.event-view-field {
    min-height: 72px;
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 11px;
    border-right: 1px solid #edf0f5;
    border-bottom: 1px solid #edf0f5;
}

.event-view-field:nth-child(3n) {
    border-right: 0;
}

.event-view-field span {
    color: #7b8496;
    font-size: 12px;
    font-weight: 600;
}

.event-view-field strong {
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
    word-break: break-word;
}

@media (max-width: 560px) {
    .event-view-modal {
        max-width: calc(100vw - 22px);
    }

    .event-view-hero {
        grid-template-columns: 70px 1fr;
        padding: 14px;
    }

    .event-view-avatar {
        width: 68px;
        height: 68px;
        font-size: 28px;
        border-width: 3px;
    }

    .event-view-hero-info h3 {
        font-size: 16px;
    }

    .event-view-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 10px;
    }

    .event-view-field,
    .event-view-field:nth-child(3n) {
        border-right: 1px solid #edf0f5;
    }

    .event-view-field:nth-child(2n) {
        border-right: 0;
    }
}

/* Booth dummy UI */
.booth-page {
    min-height: 100%;
    background: #f7f8fb;
    padding: 18px 18px 32px;
    color: #151823;
}

.booth-page--excel {
    height: calc(100dvh - 58px);
    min-height: 0;
    padding: 18px;
    overflow: hidden;
    box-sizing: border-box;
}

.booth-page--excel .voter-excel-workbook {
    height: 100%;
    min-height: 0;
    max-height: 100%;
}

.booth-shell,
.booth-form-shell {
    width: 100%;
    margin: 0 auto;
}

.booth-shell {
    max-width: min(1540px, calc(100vw - 36px));
}

.booth-form-shell {
    max-width: 1180px;
}

.booth-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.booth-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.booth-title-wrap h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 500;
}

.booth-total-pill {
    border: 1px solid #c7dcff;
    color: #1d5fbf;
    background: #ffffff;
    border-radius: 9px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.booth-primary-btn,
.booth-save-btn {
    border: 0;
    border-radius: 8px;
    background: #2f80ed;
    color: #ffffff;
    min-height: 44px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(47, 128, 237, 0.22);
}

.booth-add-icon-btn {
    width: 46px;
    min-width: 46px;
    padding: 0;
    gap: 4px;
}

.booth-refresh-icon-btn {
    width: 46px;
    min-width: 46px;
    padding: 0;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

.booth-refresh-icon-btn:hover:not(:disabled) {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1d4ed8;
}

.booth-refresh-icon-btn:disabled {
    cursor: wait;
    opacity: 0.75;
}

.booth-refresh-icon-btn.is-loading i {
    animation: boothRefreshSpin 0.85s linear infinite;
}

.booth-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.booth-excel-icon-btn {
    width: 46px;
    min-width: 46px;
    padding: 0;
    gap: 4px;
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #107c41;
    box-shadow: 0 8px 18px rgba(16, 124, 65, 0.14);
}

.booth-excel-icon-btn:hover {
    background: #dcfce7;
    border-color: #22c55e;
    color: #107c41;
}

.booth-excel-loader-screen {
    min-height: calc(100vh - 74px);
    display: grid;
    place-items: center;
    padding: 24px;
    background: #f5f7fb;
}

.booth-excel-loader-card {
    min-width: 260px;
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 28px 32px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    color: #172033;
}

.booth-excel-loader-card strong {
    font-size: 15px;
    font-weight: 800;
}

.booth-excel-loader-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: boothExcelSpin 0.85s linear infinite;
}

@keyframes boothExcelSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes boothRefreshSpin {
    to {
        transform: rotate(360deg);
    }
}

.booth-add-icon-btn .fa-plus {
    font-size: 13px;
}

.booth-add-icon-btn .fa-vote-yea {
    font-size: 16px;
}

.booth-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.booth-stat-card {
    position: relative;
    min-height: 94px;
    border: 1px solid #e5e7ee;
    border-radius: 10px;
    background: #ffffff;
    padding: 18px;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
    overflow: hidden;
}

.booth-stat-card span {
    display: block;
    color: #596073;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 12px;
}

.booth-stat-card strong {
    font-size: 27px;
    line-height: 1;
    font-weight: 500;
}

.booth-stat-icon {
    position: absolute;
    right: 18px;
    bottom: 20px;
    font-size: 30px;
    animation: boothIconFloat 2.8s ease-in-out infinite;
}

.booth-stat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 23px;
}

.booth-purple { color: #6f42c1; }
.booth-blue { color: #2563eb; }
.booth-red { color: #ef4444; }
.booth-stat-avatar.booth-blue { background: #eff6ff; }
.booth-stat-avatar.booth-red { background: #fff1f2; }
.booth-dark { color: #1f2937; }
.booth-green { color: #169a58; }

.booth-panel,
.booth-analytics-panel,
.booth-form-shell {
    border: 1px solid #e4e6ee;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
}

.booth-panel {
    padding: 18px;
    margin-bottom: 20px;
}

.booth-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.booth-panel-tools {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: 0;
}

.booth-filter-bar {
    flex: 1;
    max-width: 900px;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(190px, 240px) 42px;
    align-items: center;
    gap: 10px;
}

.booth-search-wrap {
    position: relative;
    min-width: 0;
}

.booth-search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 14px;
}

.booth-search-wrap input,
.booth-village-filter {
    width: 100%;
    height: 42px;
    border: 1px solid #d7e0ee;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.booth-search-wrap input {
    padding: 0 14px 0 40px;
}

.booth-village-filter {
    padding: 0 12px;
}

.booth-village-filter-button,
.booth-lookup-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}

.booth-village-filter-button span,
.booth-lookup-select span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booth-village-filter-button i,
.booth-lookup-select i {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 12px;
}

.booth-search-wrap input:focus,
.booth-village-filter:focus {
    border-color: #7db7ff;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.12);
}

.booth-clear-filter {
    width: 42px;
    height: 42px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #ef4444;
    display: grid;
    place-items: center;
}

.booth-panel-head h3,
.booth-analytics-panel h3,
.booth-form-section h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.booth-view-toggle {
    display: inline-flex;
    border: 1px solid #e2d8df;
    border-radius: 8px;
    overflow: hidden;
}

.booth-view-toggle button {
    height: 42px;
    padding: 0 14px;
    border: 0;
    background: #ffffff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.booth-view-toggle button.active {
    background: #eaf4ff;
    color: #1d5fbf;
    box-shadow: inset 0 0 0 1px #8fc5ff;
}

.booth-card-carousel {
    position: relative;
    padding: 0 54px 28px;
}

.booth-card-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 2px 2px 12px;
}

.booth-card-grid::-webkit-scrollbar {
    display: none;
}

.booth-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #93c5fd #eef6ff;
    padding: 2px 2px 14px;
}

.booth-card-list::-webkit-scrollbar {
    height: 8px;
}

.booth-card-list::-webkit-scrollbar-track {
    background: #eef6ff;
    border-radius: 999px;
}

.booth-card-list::-webkit-scrollbar-thumb {
    background: #93c5fd;
    border-radius: 999px;
}

.booth-card {
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: 240px;
    position: relative;
    border: 1px solid #e4e6ee;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
    scroll-snap-align: start;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.booth-card-list .booth-card {
    min-width: 980px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 180px;
    align-items: stretch;
}

.booth-card-list .booth-card-top {
    min-height: 100%;
    border-radius: 8px 0 0 8px;
}

.booth-card-list .booth-card-body {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 0.9fr 1fr 0.7fr;
    grid-template-rows: auto auto;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
}

.booth-card-list .booth-card-body label,
.booth-card-list .booth-card-body p {
    margin-bottom: 0;
}

.booth-card-list .booth-card-body label {
    margin-bottom: 6px;
}

.booth-card-list .booth-card-body label:nth-of-type(1),
.booth-card-list .booth-card-body p:nth-of-type(1) {
    grid-column: 1;
}

.booth-card-list .booth-card-body label:nth-of-type(2),
.booth-card-list .booth-card-body p:nth-of-type(2) {
    grid-column: 2;
}

.booth-card-list .booth-card-body label:nth-of-type(3),
.booth-card-list .booth-card-body p:nth-of-type(3) {
    grid-column: 3;
}

.booth-card-list .booth-card-body label:nth-of-type(4),
.booth-card-list .booth-card-body p:nth-of-type(4) {
    grid-column: 4;
}

.booth-card-list .booth-card-body label:nth-of-type(5),
.booth-card-list .booth-card-body p:nth-of-type(5) {
    grid-column: 5;
}

.booth-card-list .booth-card-body label {
    grid-row: 1;
}

.booth-card-list .booth-card-body p {
    grid-row: 2;
}

.booth-card-list .booth-detail-link {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0 20px;
    border-top: 0;
    border-left: 1px solid #e8eaf0;
    align-self: stretch;
}

.booth-carousel-arrow {
    position: absolute;
    top: 46%;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 1px solid #bfdbfe;
    border-radius: 50%;
    background: #ffffff;
    color: #1d5fbf;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

.booth-carousel-arrow:hover {
    background: #eaf4ff;
}

.booth-carousel-left {
    left: 8px;
}

.booth-carousel-right {
    right: 8px;
}

.booth-carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    min-height: 18px;
}

.booth-carousel-dots button {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: #bfdbfe;
    padding: 0;
    transition: width 0.2s ease, background 0.2s ease;
}

.booth-carousel-dots button.active {
    width: 22px;
    background: #2f80ed;
}

.booth-pagination-row {
    justify-content: flex-start;
    margin-top: 16px;
}

.booth-pagination-info {
    text-align: left;
    margin-top: 8px;
}

.booth-card:hover {
    transform: translateY(-4px);
    border-color: #cfd8e8;
    box-shadow: 0 18px 34px rgba(17, 24, 39, 0.12);
}

.booth-card-top {
    position: relative;
    min-height: 84px;
    padding: 16px 16px 14px;
    color: #ffffff;
}

.booth-card-top span {
    display: block;
    font-size: 13px;
    font-weight: 800;
}

.booth-card-top strong {
    display: block;
    margin-top: 4px;
    font-size: 25px;
    line-height: 1;
    font-weight: 500;
}

.booth-number-text {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booth-card-top i {
    position: absolute;
    right: 16px;
    top: 20px;
    font-size: 22px;
    animation: boothStarPulse 2.6s ease-in-out infinite;
}

.booth-card-green .booth-card-top { background: linear-gradient(135deg, #1d9b55, #0d7a3e); }
.booth-card-blue .booth-card-top { background: linear-gradient(135deg, #1d66b3, #0e4b91); }
.booth-card-orange .booth-card-top { background: linear-gradient(135deg, #63b3ff, #2f80ed); }
.booth-card-purple .booth-card-top { background: linear-gradient(135deg, #93c5fd, #60a5fa); }

.booth-card-body {
    padding: 15px 16px 6px;
}

.booth-card-body label {
    display: block;
    color: #687083;
    font-size: 12px;
    font-weight: 800;
    margin: 0 0 4px;
}

.booth-card-body p {
    margin: 0 0 14px;
    color: #171b26;
    font-size: 14px;
    line-height: 1.28;
    font-weight: 500;
}

.booth-lookup-modal .member-add-lookup-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.booth-lookup-modal .member-add-lookup-item i {
    width: 18px;
    color: #2563eb;
    text-align: center;
}

.booth-detail-link {
    width: calc(100% - 32px);
    min-height: 48px;
    margin: 0 16px 14px;
    border: 0;
    border-top: 1px solid #e8eaf0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 900;
}

.booth-card-list-modern {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    padding: 2px 0 14px;
    gap: 20px;
}

.booth-card-list-modern .booth-modern-card,
.booth-card-list.booth-card-list-modern .booth-card.booth-modern-card {
    min-width: 0;
    width: 100%;
    display: block;
    border: 1px solid #e4e9f2;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
}

.booth-card-list-modern .booth-modern-card:hover,
.booth-card-list.booth-card-list-modern .booth-card.booth-modern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.booth-card-list-modern .booth-modern-card-top,
.booth-card-list.booth-card-list-modern .booth-modern-card .booth-modern-card-top {
    min-height: 64px;
    border-radius: 0;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.booth-card-list-modern .booth-modern-card-top strong,
.booth-card-list.booth-card-list-modern .booth-modern-card .booth-modern-card-top strong {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 900;
}

.booth-card-list-modern .booth-modern-card-top i,
.booth-card-list.booth-card-list-modern .booth-modern-card .booth-modern-card-top i {
    position: static;
    flex: 0 0 auto;
    font-size: 23px;
    animation: boothStarPulse 2.6s ease-in-out infinite;
}

.booth-modern-card-body {
    padding: 18px;
}

.booth-modern-location {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 900;
}

.booth-modern-location i {
    width: 20px;
    font-size: 19px;
    text-align: center;
}

.booth-modern-location span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.booth-modern-location-muted {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    margin-top: 6px;
}

.booth-modern-location-muted i {
    font-size: 15px;
}

.booth-modern-divider {
    height: 1px;
    background: #edf0f5;
    margin: 17px 0;
}

.booth-modern-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.booth-modern-stat {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.booth-modern-stat:nth-child(odd) {
    border-right: 1px solid #edf0f5;
    padding-right: 14px;
}

.booth-modern-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 15px;
}

.booth-modern-stat-green {
    color: #109457;
    background: #eafaf2;
}

.booth-modern-stat-blue {
    color: #2674e8;
    background: #eef5ff;
}

.booth-modern-stat-blue .fa-female {
    color: #fb4b69;
}

.booth-modern-stat label {
    display: block;
    margin: 0 0 5px;
    color: #667085;
    font-size: 12px;
    line-height: 1.1;
    font-weight: 900;
}

.booth-modern-stat strong {
    display: block;
    min-width: 0;
    color: #111827;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 500;
}

.booth-modern-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 800;
}

.booth-modern-footer > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.booth-modern-detail {
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font: inherit;
    font-weight: 900;
}

.booth-modern-detail i {
    font-size: 16px;
}

@media (max-width: 1320px) {
    .booth-card-list-modern {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .booth-card-list-modern {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .booth-card-list-modern {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 2px 0 12px;
    }

    .booth-card-list-modern .booth-modern-card-top {
        min-height: 66px;
        padding: 17px 20px;
    }

    .booth-card-list-modern .booth-modern-card-top strong {
        font-size: 17px;
    }

    .booth-modern-card-body {
        padding: 20px;
    }

    .booth-modern-location {
        font-size: 15px;
    }

    .booth-modern-stats {
        gap: 16px 18px;
    }

    .booth-modern-stat {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
    }

    .booth-modern-stat:nth-child(odd) {
        padding-right: 14px;
    }

    .booth-modern-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .booth-modern-stat strong {
        font-size: 15px;
    }

    .booth-modern-footer {
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .booth-modern-card-body {
        padding: 18px;
    }

    .booth-modern-stats {
        gap: 14px;
    }

    .booth-modern-stat {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .booth-modern-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .booth-modern-stat label {
        font-size: 11px;
    }

    .booth-modern-stat strong {
        font-size: 15px;
    }
}

.booth-text-green { color: #16824a; }
.booth-text-blue { color: #175ca5; }
.booth-text-orange { color: #1d5fbf; }
.booth-text-purple { color: #2563eb; }
.booth-bg-green { background: #179957; }
.booth-bg-blue { background: #1d66b3; }
.booth-bg-orange { background: #63b3ff; }
.booth-bg-purple { background: #93c5fd; }

.booth-analytics-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1.15fr) minmax(320px, 1.15fr) minmax(280px, 0.9fr);
    padding: 20px;
    overflow: visible;
    animation: boothFadeLift 0.7s ease both;
}

.booth-ratio-box,
.booth-voter-box,
.booth-top-box {
    min-width: 0;
    padding: 0 clamp(14px, 1.4vw, 22px);
}

.booth-ratio-box,
.booth-voter-box {
    border-right: 1px solid #e5e7ee;
}

.booth-ratio-content {
    display: grid;
    grid-template-columns: minmax(112px, 130px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-height: 170px;
}

.booth-donut {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#1f6db4 0 var(--male), #d92868 var(--male) calc(var(--male) + var(--female)), #d1d5db 0);
    position: relative;
    box-shadow: 0 12px 28px rgba(31, 109, 180, 0.14);
    animation: boothDonutSettle 0.55s ease-out both;
}

.booth-donut::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #eef2f7;
}

.booth-legend {
    display: grid;
    gap: 16px;
    font-size: 13px;
    color: #253044;
}

.booth-legend div {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    align-items: center;
    gap: 9px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.male { background: #1f6db4; }
.legend-dot.female { background: #d92868; }
.legend-dot.other { background: #9ca3af; }

.booth-bar-chart {
    height: clamp(180px, 18vw, 220px);
    display: grid;
    grid-template-columns: repeat(5, minmax(42px, 1fr));
    align-items: end;
    justify-content: stretch;
    gap: clamp(8px, 1.6vw, 24px);
    border-left: 1px solid #e5e7ee;
    border-bottom: 1px solid #e5e7ee;
    margin-top: 14px;
    padding: 18px clamp(8px, 1.3vw, 18px) 0;
    position: relative;
    isolation: isolate;
    min-width: 0;
    overflow: hidden;
}

.booth-bar-chart::before,
.booth-bar-chart::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed #e7eaf2;
    z-index: -1;
}

.booth-bar-chart::before {
    bottom: 50%;
}

.booth-bar-chart::after {
    bottom: 75%;
}

.booth-bar-item {
    height: 100%;
    display: grid;
    grid-template-rows: 24px 1fr 28px;
    align-items: end;
    justify-items: center;
    min-width: 0;
}

.booth-bar-item > strong {
    align-self: start;
    color: #1d5fbf;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.booth-bar {
    display: block;
    width: 22px;
    min-height: 8px;
    border-radius: 6px 6px 0 0;
    transform-origin: bottom;
    animation: boothBarGrow 1s cubic-bezier(.2,.8,.2,1) both, boothBarBreathe 2.8s ease-in-out infinite;
    box-shadow: 0 8px 16px rgba(47, 128, 237, 0.16);
}

.booth-bar-item:nth-child(2) .booth-bar { animation-delay: 0.12s, 1.12s; }
.booth-bar-item:nth-child(3) .booth-bar { animation-delay: 0.24s, 1.24s; }
.booth-bar-item:nth-child(4) .booth-bar { animation-delay: 0.36s, 1.36s; }

.booth-bar-item label {
    margin-top: 9px;
    color: #31394a;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 999px;
    background: #eef6ff;
    padding: 6px 8px;
}

.booth-trophy-row {
    min-height: 140px;
    display: flex;
    align-items: center;
    gap: 22px;
    position: relative;
}

.booth-trophy-row i {
    position: relative;
    width: 70px;
    height: 70px;
    display: inline-grid;
    place-items: center;
    color: #f5a524;
    font-size: 58px;
    filter: drop-shadow(0 12px 16px rgba(245, 165, 36, 0.28));
}

.booth-trophy-row::before {
    content: "\2605";
    position: absolute;
    left: 35px;
    top: 44%;
    z-index: 1;
    transform: translate(-50%, -48%);
    color: #ffffff;
    font-size: 18px;
    text-shadow: 0 1px 3px rgba(130, 78, 0, 0.38);
}

.booth-trophy-row strong,
.booth-trophy-row span {
    display: block;
    color: #151823;
}

.booth-trophy-row strong {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 12px;
}

.booth-trophy-row span,
.booth-top-details {
    font-size: 16px;
    font-weight: 500;
}

.booth-top-details {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.booth-top-details div {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 10px;
    align-items: start;
}

.booth-top-details span {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.booth-top-details strong {
    color: #151823;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.booth-top-five-list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.booth-top-five-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 8px 12px;
    border: 1px solid #d8e1ef;
    border-radius: 8px;
    background: #f8fbff;
}

.booth-top-trophy {
    width: 38px;
    height: 38px;
    border-radius: 0;
    display: grid;
    place-items: center;
    position: relative;
    background: transparent !important;
    box-shadow: none;
}

.booth-top-trophy i {
    position: absolute;
    left: 3px;
    bottom: 1px;
    font-size: 24px;
    line-height: 1;
    color: currentColor;
    text-shadow: 0 1px 0 #d98616;
}

.booth-top-trophy b {
    position: absolute;
    left: 25px;
    bottom: 0;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid #fff;
    background: #111827;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    z-index: 3;
}

.booth-top-trophy.diamond {
    color: #f6ad2f;
}

.booth-top-trophy.diamond::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 10px;
    width: 15px;
    height: 15px;
    transform: rotate(45deg);
    border-radius: 1px;
    background: linear-gradient(135deg, #dbf8ff 0 35%, #7fe1f5 35% 58%, #2fb6d3 58% 100%);
    border: 2px solid #fff;
    box-shadow: 0 3px 8px rgba(47, 128, 237, .24);
    z-index: 2;
}

.booth-top-trophy.diamond::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 23px;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, .75) 49% 54%, transparent 55% 100%);
    z-index: 3;
}

.booth-top-trophy.gold {
    color: #f5a623;
}

.booth-top-trophy.silver {
    color: #94a3b8;
}

.booth-top-trophy.bronze {
    color: #c7772f;
}

.booth-top-trophy.platinum {
    color: #38bdf8;
}

.booth-top-five-item strong,
.booth-top-five-item small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booth-top-five-item strong {
    color: #151823;
    font-size: 13px;
    font-weight: 900;
}

.booth-top-five-item small {
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.booth-top-five-item em {
    color: #1d5fbf;
    font-size: 15px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

/* Booth details dummy UI */
.booth-detail-page {
    min-height: 100%;
    background: #f7f8fb;
    padding: 22px 18px 36px;
    color: #151823;
}

.booth-detail-shell {
    width: 100%;
    max-width: min(1540px, calc(100vw - 36px));
    margin: 0 auto;
}

.bd-header,
.bd-title-card,
.bd-card-head,
.bd-title-meta,
.bd-header-actions,
.bd-map-actions,
.bd-tabs {
    display: flex;
    align-items: center;
}

.bd-header {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.bd-header h2,
.bd-title-main h1,
.bd-card h3,
.bd-note-box h3 {
    margin: 0;
    color: #111827;
    font-weight: 500;
}

.bd-header h2 {
    font-size: 25px;
    line-height: 1.2;
    margin-bottom: 5px;
}

.bd-header-actions {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.bd-back-btn,
.bd-edit-btn,
.bd-more-btn,
.bd-small-primary,
.bd-light-btn,
.bd-map-actions a,
.bd-link-footer {
    border-radius: 7px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bd-back-btn {
    min-height: 40px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d5fbf;
    padding: 0 16px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.bd-edit-btn,
.bd-small-primary {
    border: 0;
    background: #2f80ed;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(47, 128, 237, 0.18);
}

.bd-edit-btn {
    min-height: 40px;
    padding: 0 16px;
}

.bd-more-btn {
    width: 42px;
    height: 40px;
    border: 1px solid #e4e7ef;
    background: #ffffff;
    color: #334155;
}

.bd-title-card,
.bd-stat-card,
.bd-card,
.bd-note-box {
    border: 1px solid #e3e6ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
}

.bd-title-card {
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.bd-title-main h1 {
    font-size: 30px;
    line-height: 1.1;
    margin-bottom: 9px;
    max-width: min(620px, 62vw);
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.bd-booth-number {
    display: inline-block;
    max-width: min(360px, 44vw);
    vertical-align: bottom;
}

.bd-title-meta {
    gap: 12px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.bd-status-pill,
.bd-inactive-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 24px;
    padding: 0 12px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.bd-status-pill {
    background: #dcfce7;
    color: #16824a;
}

.bd-inactive-pill {
    background: #fee2e2;
    color: #dc2626;
}

.bd-status-pill.small,
.bd-inactive-pill {
    min-height: 22px;
    padding: 0 10px;
    font-size: 11px;
}

.bd-mini-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(96px, 1fr));
    gap: 30px;
}

.bd-mini-meta span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 5px;
}

.bd-mini-meta strong {
    color: #1d5fbf;
    font-size: 13px;
    font-weight: 900;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bd-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.bd-stat-card {
    position: relative;
    min-height: 92px;
    padding: 18px;
    overflow: hidden;
}

.bd-stat-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 12px;
}

.bd-stat-card strong {
    color: #111827;
    font-size: 27px;
    line-height: 1;
    font-weight: 500;
}

.bd-stat-card i {
    position: absolute;
    right: 18px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 23px;
}

.bd-purple { color: #2563eb; background: #eaf4ff; }
.bd-blue { color: #2563eb; background: #eff6ff; }
.bd-red { color: #ef4444; background: #fff1f2; }
.bd-green { color: #16a34a; background: #ecfdf5; }

.bd-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.bd-card {
    padding: 20px;
}

.bd-card h3,
.bd-note-box h3 {
    font-size: 18px;
    line-height: 1.2;
    margin-bottom: 18px;
}

.bd-info-list {
    display: grid;
}

.bd-info-list > div {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 42px;
    border-bottom: 1px solid #edf0f5;
}

.bd-info-list > div:last-child {
    border-bottom: 0;
}

.bd-info-list span,
.bd-field-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.bd-info-list strong {
    color: #111827;
    font-size: 13px;
    line-height: 1.28;
    font-weight: 900;
    min-width: 0;
}

.bd-info-list small {
    color: #475569;
    font-size: 11px;
}

.bd-person-row strong {
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 9px;
    align-items: center;
}

.bd-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7, #dbeafe);
    border: 1px solid #e2e8f0;
    color: #1d5fbf;
    display: inline-grid;
    place-items: center;
    font-size: 10px;
    font-weight: 900;
    flex: 0 0 auto;
}

.bd-map-frame {
    position: relative;
    height: 235px;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid #e3e6ee;
    background: #eef2f7;
    margin-bottom: 16px;
}

.bd-map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: saturate(0.92) contrast(0.98);
}

.bd-map-pin {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #1d5fbf;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 900;
    text-shadow: 0 1px 0 #ffffff;
    pointer-events: none;
}

.bd-coordinate-box {
    min-height: 42px;
    border: 1px solid #e3e6ee;
    border-radius: 7px;
    margin: 8px 0 14px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

.bd-coordinate-box i {
    color: #64748b;
}

.bd-map-actions {
    gap: 10px;
}

.bd-map-actions a {
    min-height: 38px;
    flex: 1;
    border: 1px solid #c7dcff;
    color: #1d5fbf;
    background: #ffffff;
    text-decoration: none;
    font-size: 12px;
}

.bd-strength-card {
    display: grid;
    align-content: start;
}

.bd-strength-ring {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 4px auto 20px;
    background: conic-gradient(#22a65a 0 var(--strength), #f59e0b var(--strength) calc(var(--strength) + 5%), #3b82f6 0);
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: 0 12px 28px rgba(34, 166, 90, 0.16);
}

.bd-strength-ring::after {
    content: "";
    position: absolute;
    inset: 26px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #eef2f7;
}

.bd-strength-ring div {
    position: relative;
    z-index: 1;
    text-align: center;
}

.bd-strength-ring strong {
    display: block;
    color: #111827;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
}

.bd-strength-ring span {
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.bd-strength-legend,
.bd-chart-legend {
    display: grid;
    gap: 15px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.bd-strength-legend div,
.bd-chart-legend div {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 9px;
    align-items: center;
}

.bd-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.bd-dot.green { background: #22a65a; }
.bd-dot.blue { background: #3b82f6; }
.bd-dot.orange { background: #f59e0b; }
.bd-dot.red { background: #ef4444; }
.bd-dot.gray { background: #94a3b8; }

.bd-good-note {
    margin-top: 22px;
    border: 1px solid #c8f2d6;
    background: #eefdf3;
    border-radius: 7px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #166534;
    font-size: 12px;
    font-weight: 900;
}

.bd-good-note i {
    font-size: 22px;
}

.bd-chart-row {
    display: grid;
    grid-template-columns: 1.05fr 1.05fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.bd-voter-summary {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    align-items: center;
}

.bd-voter-donut {
    width: 138px;
    height: 138px;
    border-radius: 50%;
    background: conic-gradient(#3b82f6 0 var(--male), #ef4444 var(--male) calc(var(--male) + var(--female)), #cbd5e1 0);
    display: grid;
    place-items: center;
    position: relative;
}

.bd-voter-donut::after {
    content: "";
    position: absolute;
    inset: 34px;
    border-radius: 50%;
    background: #ffffff;
}

.bd-voter-donut div {
    position: relative;
    z-index: 1;
    text-align: center;
}

.bd-voter-donut span,
.bd-voter-donut strong {
    display: block;
    color: #111827;
    font-weight: 900;
}

.bd-voter-donut span {
    font-size: 12px;
}

.bd-voter-donut strong {
    font-size: 26px;
    line-height: 1.1;
}

.bd-age-chart {
    height: 210px;
    display: grid;
    grid-template-columns: repeat(5, minmax(42px, 1fr));
    align-items: end;
    gap: 18px;
    border-left: 1px solid #e5e7ee;
    border-bottom: 1px solid #e5e7ee;
    padding: 18px 8px 0 18px;
    position: relative;
}

.bd-age-chart::before,
.bd-age-chart::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 8px;
    border-top: 1px solid #eef2f7;
}

.bd-age-chart::before { top: 45px; }
.bd-age-chart::after { top: 105px; }

.bd-age-item {
    height: 170px;
    display: grid;
    grid-template-rows: 22px 1fr 24px;
    justify-items: center;
    align-items: end;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
}

.bd-age-bar {
    width: 25px;
    border-radius: 6px 6px 0 0;
    animation: boothBarGrow 0.8s cubic-bezier(.2,.8,.2,1) both;
}

.bd-age-bar.orange { background: #f97316; }
.bd-age-bar.purple { background: #7c3aed; }
.bd-age-bar.green { background: #22c55e; }
.bd-age-bar.blue { background: #3b82f6; }
.bd-age-bar.sky { background: #38bdf8; }

.bd-election-table,
.bd-member-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.bd-election-table th,
.bd-election-table td,
.bd-member-table th,
.bd-member-table td {
    padding: 11px 8px;
    border-bottom: 1px solid #edf0f5;
    text-align: left;
    color: #334155;
    font-weight: 800;
}

.bd-election-table th,
.bd-member-table th {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.bd-tabs {
    gap: 4px;
    border-bottom: 1px solid #e3e6ee;
    margin: 6px 0 18px;
    overflow-x: auto;
}

.bd-tabs button {
    min-height: 50px;
    padding: 0 20px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}

.bd-tabs button.active {
    color: #1d5fbf;
    border-bottom-color: #2f80ed;
    background: #eaf4ff;
}

.bd-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.bd-card-head {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.bd-card-head h3 {
    margin-bottom: 0;
}

.bd-small-primary {
    min-height: 36px;
    padding: 0 14px;
    font-size: 12px;
}

.bd-light-btn {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #c7dcff;
    background: #eaf4ff;
    color: #1d5fbf;
    font-size: 12px;
}

.bd-member-table td:first-child {
    display: flex;
    align-items: center;
    gap: 9px;
}

.bd-link-footer {
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    border: 0;
    border-top: 1px solid #edf0f5;
    background: #ffffff;
    color: #1d5fbf;
}

.bd-activity-list {
    display: grid;
    gap: 2px;
}

.bd-activity-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f5;
}

.bd-activity-item:last-child {
    border-bottom: 0;
}

.bd-activity-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 17px;
}

.bd-activity-icon.green { background: #dcfce7; color: #16a34a; }
.bd-activity-icon.purple { background: #eaf4ff; color: #2563eb; }
.bd-activity-icon.blue { background: #dbeafe; color: #2563eb; }
.bd-activity-icon.orange { background: #ffedd5; color: #f97316; }

.bd-activity-item strong {
    display: block;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
}

.bd-activity-item p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.bd-activity-item small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.55;
    text-align: right;
    font-weight: 800;
}

.bd-note-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
    background: #fffaf0;
    border-color: #fde6b2;
}

.bd-note-box > i {
    color: #d97706;
    font-size: 26px;
    margin-top: 3px;
}

.bd-note-box h3 {
    margin-bottom: 8px;
}

.bd-note-box p {
    margin: 0 0 10px;
    color: #334155;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 800;
}

.bd-note-box small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.bd-photo-gallery-card {
    margin-bottom: 18px;
}

.bd-photo-empty {
    min-height: 88px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    background: #f8fafc;
}

.bd-photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.bd-photo-gallery-item {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.bd-photo-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}

.bd-photo-gallery-item:hover img {
    transform: scale(1.04);
}

@media (max-width: 1200px) {
    .bd-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bd-overview-grid,
    .bd-chart-row {
        grid-template-columns: 1fr;
    }

    .bd-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .booth-detail-page {
        padding: 14px 10px 24px;
    }

    .booth-detail-shell {
        max-width: 100%;
    }

    .bd-header,
    .bd-title-card {
        align-items: stretch;
        flex-direction: column;
    }

    .bd-header-actions {
        justify-content: flex-start;
    }

    .bd-back-btn,
    .bd-edit-btn {
        flex: 1 1 140px;
    }

    .bd-title-main h1 {
        font-size: 25px;
        max-width: 100%;
    }

    .bd-booth-number {
        max-width: 54vw;
    }

    .bd-mini-meta,
    .bd-stat-grid {
        grid-template-columns: 1fr;
    }

    .bd-voter-summary {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .bd-info-list > div {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 10px 0;
    }

    .bd-activity-item {
        grid-template-columns: 42px 1fr;
    }

    .bd-activity-item small {
        grid-column: 2;
        text-align: left;
    }
}

@keyframes boothFadeLift {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes boothIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes boothStarPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.12) rotate(7deg);
    }
}

@keyframes boothDonutSettle {
    from {
        opacity: 0.86;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes boothBarGrow {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

@keyframes boothBarBreathe {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.13);
    }
}

.booth-form-shell {
    overflow: hidden;
}

.booth-form-title {
    height: 56px;
    background: #2f80ed;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    font-size: 22px;
    font-weight: 900;
}

.booth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.booth-form-column:first-child {
    border-right: 1px solid #e5e7ee;
}

.booth-form-section {
    padding: 18px 20px 22px;
    border-bottom: 1px solid #e5e7ee;
}

.booth-form-section h3 {
    margin-bottom: 18px;
}

.booth-field-label {
    display: block;
    margin: 14px 0 7px;
    color: #313849;
    font-size: 13px;
    font-weight: 900;
}

.booth-field-label.required::after {
    content: " *";
    color: #ef4444;
}

.booth-input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #e0e4ec;
    border-radius: 7px;
    background: #ffffff;
    color: #202636;
    font-size: 15px;
    padding: 0 13px;
    outline: none;
}

.booth-input:focus {
    border-color: #8fc5ff;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

.booth-two-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.booth-map-row {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 18px;
}

.booth-map-btn,
.booth-cancel-btn {
    min-height: 42px;
    border: 1px solid #8fc5ff;
    border-radius: 7px;
    background: #ffffff;
    color: #1d5fbf;
    font-weight: 900;
}

.booth-additional-section {
    min-height: 300px;
}

.booth-slider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.booth-slider-head .booth-field-label {
    margin-bottom: 9px;
}

.booth-slider-head strong {
    color: #313849;
    font-weight: 900;
}

.booth-range {
    width: 100%;
    accent-color: #2f80ed;
}

.booth-range-readonly {
    cursor: not-allowed;
    opacity: 0.82;
}

.booth-auto-strength-note {
    margin-top: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.booth-add-v3 .booth-pick-map-btn {
    border: 1px solid #8fc5ff;
    background: #ffffff;
    color: #1d5fbf;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.google-map-pin-icon {
    position: relative;
    width: 22px;
    height: 22px;
    display: inline-block;
    flex: 0 0 auto;
    background: conic-gradient(from 210deg, #34a853 0 26%, #fbbc05 0 42%, #ea4335 0 63%, #a142f4 0 78%, #4285f4 0 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 5px rgba(66, 133, 244, 0.18);
}

.google-map-pin-icon::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #ffffff;
}

.booth-add-v3 .booth-slider-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.booth-add-v3 .booth-slider-row label {
    margin-bottom: 6px;
}

.booth-add-v3 .booth-slider-row strong {
    color: #1d5fbf;
    font-size: 14px;
    font-weight: 900;
}

.booth-add-v3 .booth-remarks-field {
    grid-column: 1 / -1;
}

.booth-add-v3 .booth-photo-upload-field {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
}

.booth-photo-upload-head {
    display: block;
}

.booth-photo-upload-head label {
    margin: 0;
}

.booth-photo-upload-head p,
.booth-photo-message {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.booth-photo-add-btn {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: #2f80ed;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(47, 128, 237, 0.18);
}

.booth-photo-add-btn:disabled {
    cursor: not-allowed;
    background: #94a3b8;
    box-shadow: none;
}

.booth-photo-dropzone {
    min-height: 132px;
    border: 2px dashed #9fc8ff;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 55%, #f4fff8 100%);
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.booth-photo-dropzone:hover {
    border-color: #2f80ed;
    box-shadow: 0 12px 26px rgba(47, 128, 237, 0.12);
    transform: translateY(-1px);
}

.booth-photo-dropzone.is-disabled {
    cursor: not-allowed;
    opacity: .72;
}

.booth-photo-dropzone.is-processing {
    cursor: wait;
    opacity: .82;
}

.booth-photo-processing {
    margin: -4px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.booth-photo-drop-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #eaf4ff;
    color: #1d5fbf;
    display: grid;
    place-items: center;
    font-size: 19px;
}

.booth-photo-dropzone strong {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
}

.booth-photo-dropzone span,
.booth-photo-dropzone small {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.booth-photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 96px);
    gap: 10px;
    justify-content: start;
    align-items: start;
}

.booth-photo-source-modal {
    max-width: 360px;
    width: 92%;
}

.booth-photo-source-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 6px;
}

.booth-photo-source-btn {
    min-height: 92px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
    color: #1f3b63;
    display: grid;
    place-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
}

.booth-photo-source-btn i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eaf4ff;
    color: #1d5fbf;
    display: grid;
    place-items: center;
    font-size: 17px;
}

.booth-photo-source-btn:active {
    transform: scale(.98);
}

.booth-photo-source-btn:disabled {
    cursor: not-allowed;
    opacity: .62;
    transform: none;
}

.booth-photo-preview-card {
    position: relative;
    width: 96px;
    height: 96px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.booth-photo-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.booth-photo-preview-card button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 12px;
}

.booth-add-v3 .booth-incharge-section-head {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.booth-incharge-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.booth-incharge-add-btn {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #2f80ed;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(47, 128, 237, 0.18);
}

.booth-incharge-add-btn:active {
    transform: scale(.98);
}

.booth-incharge-selected-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    padding: 0 12px 12px;
}

.booth-incharge-selected-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.booth-incharge-selected-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eaf4ff;
    color: #1d5fbf;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 900;
}

.booth-incharge-selected-info {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.booth-incharge-selected-info strong,
.booth-incharge-selected-info span,
.booth-incharge-selected-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booth-incharge-selected-info strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.booth-incharge-selected-info span {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.booth-incharge-selected-info small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.booth-incharge-selected-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.booth-incharge-main-btn,
.booth-incharge-remove-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

.booth-incharge-main-btn {
    background: #e2e8f0;
    color: #64748b;
}

.booth-incharge-main-btn.active {
    background: #fef3c7;
    color: #b45309;
}

.booth-incharge-remove-btn {
    background: #fee2e2;
    color: #dc2626;
}

.booth-incharge-member-modal {
    width: min(94vw, 520px);
}

.booth-incharge-search-row {
    grid-template-columns: minmax(0, 1fr);
}

.booth-incharge-lookup-state {
    min-height: 96px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    padding: 16px;
}

.booth-incharge-member-item small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .booth-add-v3 .booth-incharge-section-head {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .booth-incharge-title {
        width: 100%;
    }

    .booth-incharge-add-btn {
        width: 100%;
    }

    .booth-incharge-selected-grid {
        grid-template-columns: 1fr;
        padding: 0 10px 10px;
    }

    .booth-incharge-selected-card {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        padding: 9px;
    }

    .booth-incharge-selected-avatar {
        width: 38px;
        height: 38px;
    }

    .booth-add-v3 .booth-photo-upload-field {
        gap: 10px;
    }

    .booth-photo-dropzone {
        min-height: 122px;
        padding: 14px 10px;
        gap: 3px;
    }

    .booth-photo-drop-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .booth-photo-dropzone strong {
        font-size: 14px;
    }

    .booth-photo-dropzone span,
    .booth-photo-dropzone small {
        font-size: 11px;
        line-height: 1.35;
    }

    .booth-photo-preview-grid {
        grid-template-columns: repeat(auto-fill, 82px);
        gap: 8px;
    }

    .booth-photo-preview-card {
        width: 82px;
        height: 82px;
    }

    .booth-photo-source-modal {
        width: min(340px, calc(100vw - 28px));
    }

    .booth-photo-source-actions {
        gap: 10px;
    }

    .booth-photo-source-btn {
        min-height: 84px;
    }
}

.booth-add-v3 .booth-remarks-input {
    min-height: 96px;
    padding-top: 12px;
    resize: vertical;
}

.booth-map-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, 0.62);
    display: grid;
    place-items: center;
    padding: 18px;
}

.booth-map-modal {
    width: min(1040px, calc(100vw - 28px));
    max-height: min(88dvh, 820px);
    overflow: auto;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.38);
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}

.booth-map-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #e6eaf1;
    flex: 0 0 auto;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 5;
}

.booth-map-modal-head h3 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 900;
}

.booth-map-modal-head p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.booth-map-icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #ffffff;
    color: #334155;
    display: grid;
    place-items: center;
}

.booth-map-tools {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f7;
    flex: 0 0 auto;
}

.booth-map-search {
    min-height: 44px;
    border: 1px solid #d7deea;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 36px 1fr 100px;
    align-items: center;
    overflow: hidden;
    background: #ffffff;
}

.booth-map-search i {
    color: #64748b;
    justify-self: center;
}

.booth-map-search input {
    height: 100%;
    border: 0;
    outline: 0;
    font-size: 14px;
    min-width: 0;
}

.booth-map-search button,
.booth-map-tool-btn {
    border: 0;
    background: #2f80ed;
    color: #ffffff;
    font-weight: 900;
}

.booth-map-search button {
    height: 100%;
}

.booth-map-search button:disabled,
.booth-map-tool-btn:disabled {
    opacity: 0.65;
}

.booth-map-tool-btn {
    min-height: 44px;
    border-radius: 8px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.booth-map-canvas {
    height: 440px;
    background: #e9eef6;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    touch-action: pan-x pan-y;
}

.booth-google-map-frame {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.booth-map-overlay-controls {
    position: absolute;
    inset: 0;
    z-index: 12;
    display: none;
    pointer-events: none;
}

.booth-map-type-toggle,
.booth-map-zoom-stack button {
    pointer-events: auto;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.96);
    color: #1f2937;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.booth-map-type-toggle {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 86px;
    height: 68px;
    padding: 0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    overflow: hidden;
    display: grid;
    grid-template-rows: 1fr auto;
}

.booth-map-type-thumb {
    display: block;
    min-height: 46px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.28) 0 24%, transparent 25% 100%),
        radial-gradient(circle at 20% 18%, rgba(255,255,255,0.35) 0 8%, transparent 9%),
        radial-gradient(circle at 76% 64%, rgba(64, 92, 56, 0.72) 0 18%, transparent 19%),
        linear-gradient(140deg, #425f3d 0%, #65724c 38%, #8b7e53 62%, #2f6b72 100%);
}

.booth-map-type-toggle.is-satellite .booth-map-type-thumb {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.22) 0 24%, transparent 25% 100%),
        linear-gradient(90deg, rgba(59, 130, 246, 0.26) 0 2px, transparent 2px 22px),
        linear-gradient(0deg, rgba(59, 130, 246, 0.22) 0 2px, transparent 2px 22px),
        linear-gradient(135deg, #dbeafe 0%, #dcfce7 44%, #bbf7d0 100%);
}

.booth-map-type-label {
    display: grid;
    min-height: 22px;
    place-items: center;
    padding: 3px 6px;
    background: rgba(255, 255, 255, 0.98);
    color: #1f2937;
    line-height: 1;
    box-shadow: 0 -1px 0 rgba(15, 23, 42, 0.12);
}

.booth-map-zoom-stack {
    position: absolute;
    right: 14px;
    top: 14px;
    display: grid;
    gap: 8px;
}

.booth-map-zoom-stack button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
    display: grid;
    place-items: center;
}

.booth-map-coordinate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #eef2f7;
    align-items: end;
}

.booth-map-coordinate-grid label {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-size: 12px;
    font-weight: 900;
}

.booth-map-status {
    margin: 0 20px 12px;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
}

.booth-map-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px 20px;
    border-top: 1px solid #eef2f7;
    background: #ffffff;
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 5;
}

.booth-map-actions .save-btn,
.booth-map-actions .cancel-btn {
    min-width: 150px;
}

.booth-validation-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(15, 23, 42, 0.52);
    display: grid;
    place-items: center;
    padding: 18px;
}

.booth-validation-modal {
    width: min(460px, calc(100vw - 32px));
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.34);
}

.booth-validation-modal-head {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 22px 22px 18px;
    align-items: flex-start;
}

.booth-validation-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: #2f80ed;
    box-shadow: 0 10px 24px rgba(47, 128, 237, 0.28);
}

.booth-validation-modal h3 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 900;
}

.booth-validation-modal p {
    margin: 8px 0 0;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.booth-validation-actions {
    display: flex;
    justify-content: flex-end;
    padding: 14px 22px 20px;
    border-top: 1px solid #eef2f7;
}

.booth-validation-actions .save-btn {
    min-width: 112px;
}

@media (max-width: 720px) {
    .booth-map-modal-overlay {
        padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
        place-items: stretch;
        align-items: stretch;
    }

    .booth-map-modal {
        width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 10px;
    }

    .booth-map-modal-head {
        padding: 14px 18px;
        align-items: center;
    }

    .booth-map-modal-head h3 {
        font-size: clamp(18px, 5.4vw, 24px);
        line-height: 1.15;
    }

    .booth-map-modal-head p {
        font-size: clamp(12px, 3.4vw, 15px);
        line-height: 1.45;
    }

    .booth-map-icon-btn {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        font-size: 18px;
    }

    .booth-map-tools,
    .booth-map-coordinate-grid {
        grid-template-columns: 1fr;
        padding: 12px 18px;
        gap: 12px;
    }

    .booth-map-search {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        min-height: 50px;
    }

    .booth-map-search button {
        grid-column: auto;
        width: 82px;
        min-height: 100%;
        padding: 0 12px;
        font-size: 14px;
    }

    .booth-map-canvas {
        height: clamp(255px, 42dvh, 420px);
    }

    .booth-map-overlay-controls {
        display: block;
    }

    .booth-map-actions {
        flex-direction: column-reverse;
        padding: 12px 18px max(18px, env(safe-area-inset-bottom));
    }

    .booth-map-actions .save-btn,
    .booth-map-actions .cancel-btn,
    .booth-map-tool-btn {
        width: 100%;
        min-height: 48px;
        font-size: 15px;
    }

    .booth-map-type-toggle {
        left: 10px;
        bottom: 10px;
        width: 76px;
        height: 62px;
        font-size: 11px;
        border-radius: 8px;
    }

    .booth-map-type-thumb {
        min-height: 41px;
    }

    .booth-map-zoom-stack {
        right: 10px;
        top: 10px;
        gap: 7px;
    }

    .booth-map-zoom-stack button {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        font-size: 22px;
    }
}

@media (max-width: 420px) {
    .booth-map-modal-overlay {
        padding: 0;
    }

    .booth-map-modal {
        width: 100vw;
        max-height: 100dvh;
        border-radius: 0;
    }
}

.booth-textarea {
    min-height: 78px;
    padding-top: 12px;
    resize: vertical;
}

.booth-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    padding: 18px 20px 22px;
}

.booth-cancel-btn,
.booth-save-btn {
    min-width: 150px;
}

@media (max-width: 1180px) {
    .booth-analytics-panel {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 18px 0;
    }

    .booth-top-box {
        grid-column: 1 / -1;
        border-top: 1px solid #e5e7ee;
        padding-top: 18px;
    }

    .booth-top-five-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .booth-stat-grid,
    .booth-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .booth-analytics-panel {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .booth-top-box {
        grid-column: auto;
    }

    .booth-panel-head,
    .booth-panel-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .booth-filter-bar {
        max-width: none;
    }

    .booth-view-toggle {
        align-self: flex-end;
    }

    .booth-card-grid .booth-card {
        flex-basis: calc((100% - 20px) / 2);
        min-width: 0;
    }

    .booth-card-list .booth-card {
        min-width: 900px;
    }

    .booth-form-column:first-child,
    .booth-ratio-box,
    .booth-voter-box {
        border-right: 0;
    }

    .booth-ratio-box,
    .booth-voter-box {
        border-bottom: 1px solid #e5e7ee;
    }

    .booth-ratio-box,
    .booth-voter-box,
    .booth-top-box {
        padding: 18px 4px;
    }

    .booth-top-five-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .booth-page {
        padding: 14px 10px 24px;
    }

    .booth-page-head,
    .booth-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .booth-page-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 10px;
    }

    .booth-title-wrap {
        grid-column: 1;
        grid-row: 1 / span 2;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: center;
        gap: 8px;
    }

    .booth-title-wrap h2 {
        grid-column: 1;
        grid-row: 1;
    }

    .booth-head-actions {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }

    .booth-add-icon-btn,
    .booth-excel-icon-btn {
        width: 46px;
    }

    .booth-total-pill {
        grid-column: 1;
        grid-row: 2;
        justify-self: stretch;
        min-width: 0;
        padding-inline: 10px;
        text-align: center;
    }

    .booth-panel-tools,
    .booth-filter-bar {
        align-items: stretch;
    }

    .booth-filter-bar {
        grid-template-columns: 1fr 42px;
    }

    .booth-village-filter {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .booth-clear-filter {
        grid-column: 2;
        grid-row: 1;
    }

    .booth-search-wrap {
        grid-column: 1;
    }

    .booth-title-wrap h2 {
        font-size: 24px;
    }

    .booth-stat-grid,
    .booth-analytics-panel,
    .booth-form-grid,
    .booth-two-fields,
    .booth-map-row,
    .booth-ratio-content {
        grid-template-columns: 1fr;
    }

    .booth-card-grid {
        gap: 12px;
        padding-inline: 1px;
    }

    .booth-card-carousel {
        padding-left: 40px;
        padding-right: 40px;
        padding-bottom: 14px;
    }

    .booth-card-grid .booth-card {
        flex-basis: 100%;
        min-width: 0;
    }

    .booth-card-list .booth-card {
        min-width: 820px;
        grid-template-columns: 210px minmax(430px, 1fr) 160px;
    }

    .booth-card-list .booth-card-body {
        gap: 12px;
        padding: 16px;
    }

    .booth-carousel-arrow {
        width: 34px;
        height: 34px;
        top: 44%;
    }

    .booth-carousel-left {
        left: 3px;
    }

    .booth-carousel-right {
        right: 3px;
    }

    .booth-view-toggle,
    .booth-view-toggle button,
    .booth-form-actions,
    .booth-cancel-btn,
    .booth-save-btn {
        width: 100%;
    }

    .booth-carousel-dots {
        gap: 4px;
        min-height: 8px;
        bottom: 8px;
    }

    .booth-carousel-dots button {
        width: 4px;
        height: 10px;
        border-radius: 999px;
    }

    .booth-carousel-dots button.active {
        width: 12px;
    }

    .booth-form-actions {
        flex-direction: column-reverse;
    }

    .booth-ratio-box,
    .booth-voter-box,
    .booth-top-box {
        padding: 18px 0;
    }

    .booth-analytics-panel {
        padding: 14px;
    }

    .booth-ratio-content {
        justify-items: center;
        text-align: left;
    }

    .booth-donut {
        width: 112px;
        height: 112px;
    }

    .booth-donut::after {
        inset: 26px;
    }

    .booth-legend {
        width: 100%;
        gap: 12px;
    }

    .booth-legend div {
        grid-template-columns: 12px minmax(0, 1fr) auto;
    }

    .booth-bar-chart {
        height: 178px;
        gap: 7px;
        padding-inline: 6px;
    }

    .booth-bar {
        width: 18px;
    }

    .booth-bar-item > strong {
        font-size: 11px;
    }

    .booth-bar-item label {
        max-width: 52px;
        padding: 5px 6px;
        font-size: 11px;
    }

    .booth-top-five-item {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        padding: 8px 10px;
    }

    .booth-top-five-item em {
        font-size: 13px;
    }
}


.app-copy-toast {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 99999;
    min-width: 280px;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    border: 1px solid #e5e7eb;
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
    transition: all 0.22s ease;
    pointer-events: none;
}

    .app-copy-toast.show {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

.app-copy-toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 18px;
}

.app-copy-toast-success .app-copy-toast-icon {
    background: #dcfce7;
    color: #16a34a;
}

.app-copy-toast-error .app-copy-toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

.app-copy-toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .app-copy-toast-content strong {
        font-size: 14px;
        font-weight: 800;
        color: #0f172a;
    }

    .app-copy-toast-content span {
        font-size: 13px;
        color: #64748b;
    }
.voter-list-page {
    max-width: 1180px;
    margin: 0 auto;
}

@media (min-width: 641px) {
    .voter-list-page .member-v2-topbar {
        grid-template-columns: minmax(320px, 1fr) auto auto auto auto auto;
    }

    .voter-list-page .member-v2-search-wrap {
        min-width: 0;
    }

    .voter-list-page .voter-station-filter-button {
        background: #2563eb;
        border-color: #2563eb;
        color: #ffffff;
    }
}

.voter-station-filter-button {
    height: 44px;
    min-width: 150px;
    max-width: 260px;
    padding: 0 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 900;
    cursor: pointer;
}

.voter-station-filter-button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-station-filter-button.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.voter-supporter-filter-dropdown {
    right: 0;
    top: calc(100% + 8px);
    min-width: 230px;
}

.voter-station-empty {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

.voter-station-empty strong {
    color: #111827;
    font-size: 16px;
}

    .voter-station-empty span {
        color: #000000;
    }

.voter-station-empty button {
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.voter-station-empty button span {
    color: #ffffff;
}

.voter-station-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.56);
}

.voter-station-modal,
.voter-station-modal *,
.voter-station-modal *::before,
.voter-station-modal *::after {
    box-sizing: border-box;
}

.voter-station-modal {
    width: min(560px, calc(100vw - 28px));
    max-height: min(760px, calc(100dvh - 36px));
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.voter-station-modal-head {
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.voter-station-modal-head h3 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 900;
}

.voter-station-modal-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.voter-station-modal-head button {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
}

.voter-station-modal-search {
    margin: 14px 18px;
    height: 42px;
    border: 1px solid #d1dbe8;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    color: #64748b;
}

.voter-station-modal-search i {
    text-align: center;
}

.voter-station-modal-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
    font-weight: 700;
}

.voter-station-modal-list {
    min-height: 180px;
    min-width: 0;
    overflow: auto;
    padding: 0 18px 14px;
    display: grid;
    gap: 8px;
    align-content: start;
}

.voter-station-state {
    min-height: 120px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-weight: 800;
}

.voter-station-option {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
}

.voter-station-option.selected {
    border-color: #2563eb;
    background: #eff6ff;
}

.voter-station-check {
    width: 28px;
    height: 28px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #ffffff;
    color: #2563eb;
}

.voter-station-option.selected .voter-station-check {
    background: #2563eb;
    color: #ffffff;
}

.voter-station-info {
    min-width: 0;
    max-width: 100%;
}

.voter-station-info strong,
.voter-station-info small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-station-info strong {
    color: #111827;
    font-size: 14px;
    font-weight: 500;
}

.voter-station-info small {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.voter-station-part {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.voter-station-modal-actions {
    padding: 14px 18px 18px;
    border-top: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.voter-station-modal-actions button {
    min-width: 0;
    height: 42px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.voter-station-clear {
    background: #ef4444;
}

.voter-station-apply {
    background: #2563eb;
}

.voter-search-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2250;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.56);
}

.voter-search-modal,
.voter-search-modal * {
    box-sizing: border-box;
}

.voter-search-modal {
    width: min(1120px, calc(100vw - 36px));
    height: auto;
    max-height: min(820px, calc(100dvh - 36px));
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.voter-search-modal-head {
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.voter-search-modal-head h3 {
    margin: 0;
    color: #111827;
    font-size: 21px;
    font-weight: 900;
}

.voter-search-modal-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.voter-search-modal-head button {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
}

.voter-search-tabs {
    padding: 14px 18px 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
}

.voter-search-tab {
    min-width: 0;
    min-height: 42px;
    border: 1px solid #bfdbfe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 8px 12px;
    background: #eff6ff;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.voter-search-tab:first-child {
    border-radius: 8px 0 0 8px;
}

.voter-search-tab:last-child {
    border-radius: 0 8px 8px 0;
}

.voter-search-tab--epic {
    background: #fff4dc;
    border-color: #f59e0b;
}

.voter-search-tab--details {
    background: #dbeafe;
    border-color: #2563eb;
}

.voter-search-tab--mobile {
    background: #dcfce7;
    border-color: #22c55e;
}

.voter-search-tab.active {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
}

.voter-search-tab i {
    font-size: 16px;
}

.voter-search-tab span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-search-modal-body {
    min-height: 0;
    overflow: auto;
    padding: 8px 18px 14px;
    display: grid;
    gap: 14px;
    align-content: start;
}

.voter-search-section {
    border: 1px solid #d1dbe8;
    border-radius: 10px;
    padding: 18px;
    position: relative;
    background: #ffffff;
}

.voter-search-section-title {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 8px;
    background: #ffffff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.voter-search-section-divider {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: -2px 4px 2px;
    color: rgba(100, 116, 139, 0.62);
    font-size: 12px;
    font-weight: 800;
    text-transform: lowercase;
}

.voter-search-section-divider::before,
.voter-search-section-divider::after {
    content: "";
    height: 1px;
    background: rgba(148, 163, 184, 0.42);
}

.voter-search-section-divider span {
    opacity: 0.72;
}

.voter-search-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.voter-search-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.voter-search-grid-wide {
    grid-column: 1 / -1;
}

.voter-search-grid label {
    min-width: 0;
    display: grid;
    gap: 7px;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

.voter-search-required {
    color: #ef4444;
    font-style: normal;
    font-weight: 900;
}

.voter-search-grid input,
.voter-search-grid select {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 1px solid #d1dbe8;
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: #111827;
    outline: 0;
    font-weight: 700;
}

.voter-search-grid input:focus,
.voter-search-grid select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.voter-area-select-control {
    height: 42px;
    border-radius: 8px;
    font-weight: 700;
}

.voter-search-area-note {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 8px;
    background: rgba(254, 242, 242, 0.78);
    color: #991b1b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.voter-search-area-note.ready {
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(240, 253, 244, 0.9);
    color: #166534;
}

.voter-search-results {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.voter-search-results-head {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.voter-search-results-head strong {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
}

.voter-search-results-head span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.voter-search-empty {
    min-height: 92px;
    margin: 12px;
    border: 1px dashed #bfdbfe;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #64748b;
    text-align: center;
    font-weight: 900;
}

.voter-search-result-list {
    max-height: 240px;
    overflow: auto;
    padding: 10px 12px;
    display: grid;
    gap: 8px;
}

.voter-search-result-item {
    width: 100%;
    min-width: 0;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
}

.voter-search-result-item:hover,
.voter-search-result-item:focus {
    border-color: #2563eb;
    background: #eff6ff;
    outline: none;
}

.voter-search-result-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #2563eb;
    color: #ffffff;
    font-weight: 900;
}

.voter-search-result-item span:nth-child(2) {
    min-width: 0;
}

.voter-search-result-item strong,
.voter-search-result-item small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-search-result-item strong {
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}

.voter-search-result-item small {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.voter-search-result-item i {
    color: #2563eb;
}

.voter-search-modal-actions {
    padding: 14px 18px 18px;
    border-top: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #ffffff;
}

.voter-search-modal-actions button {
    min-width: 0;
    height: 42px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.voter-search-clear {
    background: #ef4444;
}

.voter-search-apply {
    background: #2563eb;
}

@media (max-width: 920px) {
    .voter-search-modal {
        width: min(760px, calc(100vw - 28px));
    }

    .voter-search-tabs {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .voter-search-tab,
    .voter-search-tab:first-child,
    .voter-search-tab:last-child {
        border-radius: 8px;
        justify-content: flex-start;
    }

    .voter-search-grid {
        grid-template-columns: 1fr;
    }
}

.voter-pdf-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.56);
}

.voter-pdf-modal,
.voter-pdf-modal * {
    box-sizing: border-box;
}

.voter-pdf-modal {
    width: min(1180px, calc(100vw - 36px));
    height: min(820px, calc(100dvh - 36px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}

.voter-pdf-modal-head {
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.voter-pdf-modal-head h3 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 900;
}

.voter-pdf-modal-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.voter-pdf-modal-head button {
    width: 36px;
    height: 36px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
}

.voter-pdf-modal-body {
    min-height: 0;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: #f8fafc;
}

.voter-pdf-list {
    min-height: 0;
    overflow: auto;
    padding: 14px;
    display: grid;
    gap: 10px;
    align-content: start;
    border-right: 1px solid #e5e7eb;
    background: #ffffff;
}

.voter-pdf-option {
    width: 100%;
    min-width: 0;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #ffffff;
    color: #111827;
    text-align: left;
    cursor: pointer;
}

.voter-pdf-option i {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #fee2e2;
    color: #dc2626;
}

.voter-pdf-option span {
    min-width: 0;
}

.voter-pdf-option strong,
.voter-pdf-option small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-pdf-option strong {
    font-size: 13px;
    font-weight: 900;
}

.voter-pdf-option small {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.voter-pdf-option.active {
    border-color: #2563eb;
    background: #eff6ff;
}

.voter-pdf-frame-wrap {
    min-width: 0;
    min-height: 0;
    padding: 12px;
    overflow: hidden;
}

.voter-pdf-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    display: block;
}

.voter-pdf-empty {
    height: 100%;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-weight: 800;
}

.voter-pdf-modal-actions {
    padding: 12px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.voter-pdf-modal-actions a,
.voter-pdf-modal-actions button {
    height: 40px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.voter-pdf-modal-actions a {
    background: #2563eb;
}

.voter-pdf-modal-actions button {
    background: #ef4444;
}

@media (max-width: 640px) {
    .voter-station-modal-overlay {
        display: flex;
        align-items: stretch;
        justify-content: center;
        place-items: unset;
        padding: calc(84px + env(safe-area-inset-top)) 10px calc(74px + env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .voter-station-modal {
        width: min(100%, calc(100vw - 20px));
        height: 100%;
        max-height: none;
        min-height: 0;
        border-radius: 16px;
        grid-template-rows: auto auto minmax(0, 1fr) auto;
    }

    .voter-station-modal-head {
        padding: 10px 14px;
        gap: 8px;
    }

    .voter-station-modal-head h3 {
        font-size: 18px;
        line-height: 1.2;
    }

    .voter-station-modal-head p {
        font-size: 12px;
        line-height: 1.35;
    }

    .voter-station-modal-search {
        margin: 10px 14px;
        height: 42px;
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .voter-station-modal-list {
        min-height: 0;
        overflow: auto;
        padding: 0 14px 10px;
        gap: 6px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .voter-station-option {
        grid-template-columns: 30px minmax(0, 1fr) minmax(44px, auto);
        gap: 8px;
        padding: 8px 9px;
    }

    .voter-station-check {
        width: 26px;
        height: 26px;
    }

    .voter-station-info strong {
        font-size: 13px;
        line-height: 1.25;
    }

    .voter-station-info small {
        font-size: 11px;
        line-height: 1.2;
    }

    .voter-station-part {
        justify-self: end;
        max-width: 58px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .voter-station-modal-actions {
        padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
        gap: 10px;
        background: #ffffff;
    }

    .voter-search-modal-overlay {
        display: flex;
        align-items: stretch;
        justify-content: center;
        place-items: unset;
        padding: calc(84px + env(safe-area-inset-top)) 10px calc(74px + env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .voter-search-modal {
        width: min(100%, calc(100vw - 20px));
        height: 100%;
        max-height: none;
        min-height: 0;
        border-radius: 16px;
    }

    .voter-search-modal-head {
        padding: 10px 14px;
        gap: 8px;
    }

    .voter-search-modal-head h3 {
        font-size: 18px;
        line-height: 1.2;
    }

    .voter-search-modal-head p {
        font-size: 12px;
        line-height: 1.35;
    }

    .voter-search-modal-head button {
        width: 38px;
        height: 38px;
    }

    .voter-search-tabs {
        grid-template-columns: 1fr;
        padding: 8px 12px;
        gap: 6px;
    }

    .voter-search-tab,
    .voter-search-tab:first-child,
    .voter-search-tab:last-child {
        min-height: 38px;
        border-radius: 8px;
        justify-content: flex-start;
        font-size: 12px;
        line-height: 1.2;
    }

    .voter-search-tab span {
        white-space: normal;
    }

    .voter-search-modal-body {
        padding: 8px 12px 14px;
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .voter-search-section {
        padding: 16px 12px 12px;
    }

    .voter-search-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .voter-search-grid input,
    .voter-search-grid select {
        height: 40px;
    }

    .voter-search-results-head {
        padding: 10px 12px;
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .voter-search-empty {
        min-height: 74px;
        margin: 8px;
        padding: 12px;
        line-height: 1.35;
    }

    .voter-search-result-list {
        max-height: 34vh;
        padding: 8px;
        gap: 6px;
    }

    .voter-search-result-item {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        padding: 8px;
    }

    .voter-search-result-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .voter-search-result-item strong {
        font-size: 13px;
    }

    .voter-search-result-item small {
        font-size: 11px;
    }

    .voter-search-modal-actions {
        padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
        gap: 10px;
    }

    .voter-pdf-modal-overlay {
        padding: 10px;
        align-items: center;
    }

    .voter-pdf-modal {
        width: min(100%, calc(100vw - 20px));
        height: calc(100dvh - 72px);
        max-height: calc(100dvh - 72px);
        border-radius: 10px;
    }

    .voter-pdf-modal-head {
        padding: 12px 14px;
    }

    .voter-pdf-modal-head h3 {
        font-size: 18px;
        line-height: 1.2;
    }

    .voter-pdf-modal-head p {
        font-size: 12px;
        line-height: 1.35;
    }

    .voter-pdf-modal-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        min-height: 0;
        overflow: hidden;
    }

    .voter-pdf-list {
        grid-auto-flow: column;
        grid-auto-columns: minmax(210px, 1fr);
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px;
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .voter-pdf-frame-wrap {
        padding: 10px;
        min-height: 0;
        overflow: hidden;
    }

    .voter-pdf-frame-wrap iframe {
        height: 100%;
        min-height: 0;
    }

    .voter-pdf-modal-actions {
        padding: 10px;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .voter-pdf-modal-actions a,
    .voter-pdf-modal-actions button {
        min-width: 0;
        padding: 0 10px;
        height: 40px;
        font-size: 13px;
    }
}

.voter-list-page--excel {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 18px;
    background: #f5f5f5;
    overflow: hidden;
}

.voter-list-page--excel .voter-excel-workbook {
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

.voter-stats-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.voter-stat-female {
    background: #fff1f2;
}

.voter-stat-female .member-stat-icon {
    background: #ffe4e6;
    color: #fb3f55;
}

.voter-excel-toggle {
    width: 46px;
    height: 46px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    background: #eff6ff;
    color: #2563eb;
    font-size: 17px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.voter-excel-toggle:hover,
.voter-excel-toggle.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.voter-excel-toggle--excel {
    background: #ecfdf5;
    border-color: #86efac;
    color: #107c41;
    box-shadow: 0 8px 20px rgba(16, 124, 65, 0.12);
}

.voter-excel-toggle--excel:hover,
.voter-excel-toggle--excel.active {
    background: #dcfce7;
    border-color: #22c55e;
    color: #107c41;
}

.voter-excel-brand-icon {
    position: relative;
    width: 25px;
    height: 25px;
    display: inline-block;
}

.voter-excel-brand-sheet {
    position: absolute;
    inset: 2px 1px 1px 7px;
    border-radius: 4px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.18) 50%, transparent 50%),
        linear-gradient(180deg, #33c481 0 35%, #21a366 35% 70%, #107c41 70% 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.voter-excel-brand-tile {
    position: absolute;
    left: 1px;
    top: 6px;
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: linear-gradient(135deg, #107c41, #0b5f2f);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    font-family: Arial, sans-serif;
    box-shadow: 2px 2px 5px rgba(6, 78, 35, 0.28);
}

.voter-excel-workbook {
    width: min(100vw, 100%);
    height: calc(100vh - 84px);
    min-height: 620px;
    display: grid;
    grid-template-rows: auto auto auto auto 1fr auto;
    overflow: hidden;
    border: 1px solid #1f2937;
    background: #f3f4f6;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.voter-excel-titlebar {
    height: 34px;
    display: grid;
    grid-template-columns: max-content minmax(180px, 1fr) max-content;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    background: #111827;
    color: #fff;
}

.voter-excel-titlebar,
.voter-excel-tabs,
.voter-excel-ribbon,
.voter-excel-formula,
.voter-excel-footer {
    overscroll-behavior-x: contain;
}

.voter-excel-titlebar::-webkit-scrollbar,
.voter-excel-tabs::-webkit-scrollbar,
.voter-excel-ribbon::-webkit-scrollbar,
.voter-excel-formula::-webkit-scrollbar,
.voter-excel-footer::-webkit-scrollbar {
    height: 6px;
}

.voter-excel-titlebar::-webkit-scrollbar-thumb,
.voter-excel-tabs::-webkit-scrollbar-thumb,
.voter-excel-ribbon::-webkit-scrollbar-thumb,
.voter-excel-formula::-webkit-scrollbar-thumb,
.voter-excel-footer::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.68);
}

.voter-excel-quick {
    display: flex;
    gap: 6px;
}

.voter-excel-quick button,
.voter-excel-close-dark {
    width: 26px;
    height: 26px;
    border: 0;
    display: inline-grid;
    place-items: center;
    background: transparent;
    color: #e5e7eb;
}

.voter-excel-book-title {
    min-width: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-excel-tabs {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 34px;
    padding: 0 14px;
    background: #1f2937;
    color: #f9fafb;
    font-size: 13px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.voter-excel-tabs span {
    height: 100%;
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid transparent;
}

.voter-excel-tabs span.active {
    border-bottom-color: #fff;
    font-weight: 800;
}

.voter-excel-autosum {
    position: relative;
    height: 100%;
    display: inline-flex;
    align-items: center;
}

.voter-excel-export {
    position: relative;
    height: 100%;
    display: inline-flex;
    align-items: center;
}

.voter-excel-autosum-button,
.voter-excel-export-button,
.voter-excel-pdf-button {
    height: 100%;
    border: 0;
    border-bottom: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    background: transparent;
    color: #f9fafb;
    font-size: 13px;
}

.voter-excel-autosum-button:hover,
.voter-excel-autosum-button:focus-visible,
.voter-excel-export-button:hover,
.voter-excel-export-button:focus-visible,
.voter-excel-pdf-button:hover,
.voter-excel-pdf-button:focus-visible {
    background: rgba(255,255,255,0.08);
    outline: 0;
}

.voter-excel-global-search {
    margin-left: auto;
    width: min(420px, 38vw);
    height: 26px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5e1;
}

.voter-excel-global-search i {
    text-align: center;
    font-size: 11px;
}

.voter-excel-global-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.voter-excel-global-search input::placeholder {
    color: #94a3b8;
}

.voter-excel-global-search button {
    width: 24px;
    height: 22px;
    border: 0;
    border-radius: 5px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    cursor: pointer;
}

.voter-excel-autosum-menu,
.voter-excel-export-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 20;
    width: 238px;
    padding: 6px 0;
    border: 1px solid #111827;
    background: #2f2f2f;
    box-shadow: 0 12px 26px rgba(0,0,0,0.28);
}

.voter-excel-export-menu {
    width: 260px;
}

.voter-excel-autosum-menu button,
.voter-excel-export-menu button {
    width: 100%;
    min-height: 30px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    padding: 0 14px;
    background: transparent;
    color: #fff;
    font-size: 13px;
    text-align: left;
}

.voter-excel-export-menu button {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    column-gap: 10px;
    padding: 9px 14px;
}

.voter-excel-export-menu button small {
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
}

.voter-excel-autosum-menu button span,
.voter-excel-export-menu button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-excel-autosum-menu button:hover,
.voter-excel-autosum-menu button:focus-visible,
.voter-excel-export-menu button:hover,
.voter-excel-export-menu button:focus-visible {
    background: #3f3f46;
    outline: 0;
}

.voter-excel-ribbon {
    min-height: 86px;
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    background: #2b2f36;
    border-bottom: 1px solid #111827;
}

.voter-ribbon-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: max-content;
    padding: 0 10px;
    border-right: 1px solid rgba(255,255,255,0.18);
}

.voter-ribbon-group button,
.voter-ribbon-group select {
    height: 30px;
    border: 1px solid #4b5563;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 9px;
    background: #374151;
    color: #fff;
    font-size: 12px;
}

.voter-ribbon-group button.active {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #0f172a;
}

.voter-ribbon-font select:first-child {
    width: 130px;
}

.voter-ribbon-group button.strong {
    font-weight: 900;
}

.voter-ribbon-group button.italic {
    font-style: italic;
}

.voter-ribbon-group button.underline {
    text-decoration: underline;
}

.voter-excel-formula {
    display: grid;
    grid-template-columns: 82px 42px 1fr;
    align-items: center;
    min-height: 34px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    background: #f9fafb;
    border-bottom: 1px solid #cfd6df;
}

.voter-name-box,
.voter-formula-prefix {
    height: 100%;
    display: grid;
    place-items: center;
    border-right: 1px solid #cfd6df;
    color: #1f2937;
    font-size: 13px;
    font-weight: 700;
}

.voter-formula-prefix {
    font-style: italic;
}

.voter-excel-formula input {
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0 10px;
    background: #fff;
    color: #111827;
    outline: 0;
    font-size: 13px;
}

.voter-excel-sheet-shell {
    min-height: 0;
    overflow: auto;
    background: #fff;
    contain: layout paint style;
}

.voter-excel-row-loader {
    position: sticky;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    border-top: 1px solid #dbe4ef;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.voter-excel-row-loader button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 8px 12px;
    font-weight: 800;
    cursor: pointer;
}

.voter-excel-row-loader button:hover {
    background: #dbeafe;
}

.voter-excel-sheet {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-family: Calibri, Arial, sans-serif;
    font-size: 13px;
    contain: layout paint;
}

.voter-excel-sheet th,
.voter-excel-sheet td {
    height: 26px;
    border-right: 1px solid #d1d5db;
    border-bottom: 1px solid #d1d5db;
}

.voter-excel-row-spacer th,
.voter-excel-row-spacer td,
.voter-excel-col-spacer,
.voter-excel-heading-spacer {
    padding: 0;
    background: #ffffff;
    border-right: 0;
    contain: strict;
    pointer-events: none;
}

.voter-excel-heading-spacer {
    position: sticky;
    top: 26px;
    z-index: 2;
    background: #e5e7eb;
}

.voter-excel-col-spacer {
    background: #ffffff;
}

.voter-corner-cell,
.voter-row-number,
.voter-column-letter {
    background: #202124;
    color: #f3f4f6;
    text-align: center;
    font-weight: 500;
    position: sticky;
    z-index: 4;
}

.voter-corner-cell {
    top: 0;
    left: 0;
    width: 46px;
}

.voter-column-letter {
    top: 0;
    min-width: 136px;
    width: 136px;
}

.voter-row-number {
    left: 0;
    width: 46px;
}

.voter-row-number-selectable {
    cursor: pointer;
    user-select: none;
}

.voter-row-number.selected {
    background: #0f172a;
    color: #ffffff;
}

.voter-excel-heading {
    position: sticky;
    top: 26px;
    z-index: 3;
    min-width: 136px;
    width: 136px;
    padding: 0;
    background: #e5e7eb;
    color: #111827;
    text-align: left;
    font-weight: 800;
    overflow: visible;
    white-space: nowrap;
}

.voter-excel-heading-inner {
    position: relative;
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 26px;
    align-items: center;
    gap: 4px;
    padding: 0 4px 0 8px;
}

.voter-excel-heading-inner > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-excel-heading-filter {
    width: 24px;
    height: 22px;
    border: 0;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: transparent;
    color: #64748b;
    font-size: 11px;
    cursor: pointer;
}

.voter-excel-heading-filter:hover,
.voter-excel-heading-filter:focus-visible,
.voter-excel-heading-filter.active {
    background: #dbeafe;
    color: #2563eb;
    outline: 0;
}

.voter-column-letter.voter-excel-frozen-column,
.voter-excel-heading.voter-excel-frozen-column,
.voter-excel-cell.voter-excel-frozen-column {
    position: sticky;
    z-index: 8;
    box-shadow: 1px 0 0 #cbd5e1;
}

.voter-column-letter.voter-excel-frozen-column {
    z-index: 14;
    background: #202124;
}

.voter-excel-heading.voter-excel-frozen-column {
    z-index: 13;
    background: #e5e7eb;
}

.voter-excel-cell.voter-excel-frozen-column {
    z-index: 7;
    background: #ffffff;
}

.voter-excel-sheet--table tbody tr:nth-child(even) .voter-excel-cell.voter-excel-frozen-column {
    background: #f8fafc;
}

.voter-excel-cell.voter-excel-frozen-column.selected,
.voter-excel-cell.voter-excel-frozen-column:focus-within {
    z-index: 15;
}

.voter-excel-column-filter-menu {
    z-index: 99998;
    width: 270px;
    max-width: calc(100vw - 30px);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
}

.voter-excel-filter-backdrop {
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.voter-excel-filter-modal {
    width: min(520px, calc(100vw - 28px));
    max-height: min(620px, calc(100vh - 36px));
    display: flex;
}

.voter-excel-filter-modal .voter-excel-column-filter-menu {
    position: static;
    width: 100%;
    max-width: 100%;
    max-height: inherit;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
}

.voter-excel-column-filter-title {
    min-height: 42px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.voter-excel-column-filter-title strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.voter-excel-column-filter-title button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: #111827;
    cursor: pointer;
}

.voter-excel-column-filter-search {
    margin: 10px;
    height: 36px;
    border: 1px solid #d1dbe8;
    border-radius: 7px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    color: #64748b;
}

.voter-excel-column-filter-search i {
    text-align: center;
}

.voter-excel-column-filter-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
}

.voter-excel-column-filter-tools {
    padding: 0 10px 8px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.voter-excel-column-filter-tools button {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.voter-excel-column-filter-values {
    max-height: 320px;
    overflow: auto;
    padding: 0 10px 10px;
    display: grid;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
}

.voter-excel-column-filter-value {
    min-width: 0;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.voter-excel-column-filter-value input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.voter-excel-column-filter-value span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-excel-column-filter-actions {
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.voter-excel-column-filter-actions button {
    height: 34px;
    border: 0;
    border-radius: 7px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.voter-excel-column-filter-clear {
    background: #ef4444;
}

.voter-excel-column-filter-apply {
    background: #2563eb;
}

@media (max-width: 640px) {
    .voter-excel-filter-backdrop {
        align-items: flex-start;
        padding: 92px 14px calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .voter-excel-filter-modal {
        width: 100%;
        max-height: calc(100vh - 188px - env(safe-area-inset-bottom, 0px));
    }

    .voter-excel-filter-modal .voter-excel-column-filter-menu {
        border-radius: 12px;
    }

    .voter-excel-filter-modal .voter-excel-column-filter-values {
        max-height: none;
        min-height: 140px;
    }

    .voter-excel-filter-modal .voter-excel-column-filter-actions {
        position: sticky;
        bottom: 0;
    }
}

.voter-excel-cell {
    position: relative;
    min-width: 136px;
    width: 136px;
    background: #fff;
    contain: layout paint style;
}

.voter-excel-cell input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0 6px;
    background: transparent;
    color: #111827;
    outline: 0;
    font: inherit;
    text-align: inherit;
    -webkit-tap-highlight-color: transparent;
    caret-color: transparent;
    cursor: default;
    user-select: none;
}

.voter-excel-cell.excel-editing input {
    caret-color: auto;
    cursor: text;
    user-select: text;
}

.voter-excel-cell.excel-readonly {
    background: #f1f5f9;
}

.voter-excel-cell.excel-readonly input {
    color: #475569;
    background: #f1f5f9;
    cursor: not-allowed;
}

.voter-excel-cell.excel-row-highlight,
.voter-row-number.excel-row-highlight {
    background: #fffbeb;
}

.voter-excel-cell.excel-row-highlight input {
    color: #7c2d12;
    font-weight: 700;
}

.voter-excel-cell.excel-row-error,
.voter-row-number.excel-row-error {
    background: #fee2e2;
}

.voter-excel-cell.excel-row-error input {
    color: #991b1b;
    font-weight: 800;
}

.booth-locked-field:disabled,
button.booth-locked-field:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
    opacity: 1;
}

.voter-excel-cell.range-selected {
    background: #eefdf5;
}

.voter-excel-cell.selected,
.voter-excel-cell:focus-within {
    box-shadow: inset 0 0 0 2px #217346;
    z-index: 2;
}

.voter-excel-cell.fill-range {
    background: #ecfdf5;
}

.voter-excel-cell.excel-bold input {
    font-weight: 800;
}

.voter-excel-cell.excel-italic input {
    font-style: italic;
}

.voter-excel-cell.excel-underline input {
    text-decoration: underline;
}

.voter-excel-cell.excel-wrap {
    height: 44px;
}

.voter-excel-cell.excel-wrap input {
    white-space: normal;
    text-overflow: clip;
}

.voter-excel-cell.excel-fill {
    background: #fef3c7;
}

.voter-excel-cell.excel-border {
    box-shadow: inset 0 0 0 1px #111827;
}

.voter-excel-sheet--table tbody tr:nth-child(even) .voter-excel-cell {
    background: #f8fafc;
}

.voter-excel-sheet--table .voter-excel-heading {
    background: #217346;
    color: #fff;
}

.voter-fill-handle {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 8px;
    height: 8px;
    border: 1px solid #fff;
    background: #217346;
    cursor: crosshair;
    z-index: 5;
    padding: 0;
}

.voter-fill-handle:hover,
.voter-fill-handle:focus-visible {
    outline: 1px solid #217346;
    box-shadow: 0 0 0 2px rgba(33, 115, 70, 0.15);
}

.voter-fill-handle::before,
.voter-fill-handle::after {
    display: none;
}

.voter-fill-handle::before {
    width: 8px;
    height: 2px;
}

.voter-fill-handle::after {
    width: 2px;
    height: 8px;
}

.voter-excel-inline-suggestion {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: #9ca3af;
    font: inherit;
    line-height: 26px;
    text-align: left;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    pointer-events: none;
}

.voter-excel-inline-suggestion::after {
    display: none;
}

.voter-excel-inline-prefix {
    visibility: hidden;
}

.voter-excel-cell.excel-wrap .voter-excel-inline-suggestion {
    line-height: 22px;
    white-space: normal;
}

.voter-excel-footer {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    min-height: 34px;
    padding: 0 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    background: #1f2937;
    color: #e5e7eb;
    font-size: 12px;
}

.voter-excel-footer-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
    white-space: nowrap;
    color: #e5e7eb;
    font-weight: 700;
}

.voter-excel-footer-loader button {
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.voter-excel-footer-loader button:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

.voter-sheet-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.voter-sheet-tabs button {
    height: 28px;
    min-width: 42px;
    border: 0;
    border-radius: 0;
    background: #2b2f36;
    color: #e5e7eb;
    font-weight: 700;
}

.voter-sheet-tabs button.active {
    background: #fff;
    color: #217346;
    border-top: 3px solid #217346;
}

.voter-sheet-tabs .voter-add-row-button {
    width: auto;
    min-width: 86px;
    gap: 6px;
    padding: 0 10px;
    border-radius: 2px;
    background: #ecfdf5;
    color: #166534;
}

.voter-excel-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.48);
}

.voter-excel-add-row-modal {
    width: min(920px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.26);
}

.voter-excel-add-row-modal--compact {
    width: min(420px, 100%);
    grid-template-rows: auto auto auto;
}

.voter-excel-message-modal {
    width: min(380px, calc(100vw - 32px));
    border-radius: 12px;
    padding: 22px;
    display: grid;
    gap: 12px;
    justify-items: center;
    background: #fff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.26);
    text-align: center;
}

.voter-excel-message-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fee2e2;
    color: #dc2626;
    font-size: 18px;
}

.voter-excel-message-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.voter-excel-message-modal h3 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 800;
}

.voter-excel-message-modal p {
    margin: 0;
    color: #475569;
    font-size: 14px;
}

.voter-excel-message-modal button {
    min-width: 110px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

.voter-excel-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.voter-excel-modal-head h3 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 800;
}

.voter-excel-modal-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.voter-excel-modal-close {
    width: 34px;
    height: 34px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    background: #fff;
    color: #334155;
}

.voter-excel-add-row-count {
    display: grid;
    grid-template-columns: 140px minmax(120px, 220px);
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #eef2f7;
}

.voter-excel-add-row-count label,
.voter-excel-add-row-grid span {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.voter-excel-add-row-count input,
.voter-excel-add-row-grid input {
    width: 100%;
    height: 40px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    padding: 0 11px;
    color: #111827;
    outline: 0;
}

.voter-excel-add-row-count input:focus,
.voter-excel-add-row-grid input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.voter-excel-add-row-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 20px 20px;
    overflow: auto;
}

.voter-excel-add-row-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.voter-excel-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px 20px 18px;
    border-top: 1px solid #e5e7eb;
}

.voter-excel-modal-actions button {
    height: 44px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-weight: 800;
}

.voter-excel-modal-cancel {
    background: #ef4444;
}

.voter-excel-modal-ok {
    background: #2563eb;
}

.voter-excel-save-confirm {
    width: min(420px, calc(100vw - 32px));
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.voter-excel-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px 20px 18px;
    border-top: 1px solid #e5e7eb;
}

.voter-excel-confirm-actions button {
    height: 42px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.voter-excel-save-loader {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.44);
}

.voter-excel-save-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: min(340px, calc(100vw - 32px));
    padding: 18px 20px;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.26);
}

.voter-excel-save-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: boothExcelSpin 0.85s linear infinite;
    flex: 0 0 auto;
}

.voter-card-list {
    display: grid;
    gap: 14px;
}

.voter-card-wrap {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
    align-items: start;
    border-left: 4px solid #2f80ed;
    padding: 16px;
}

.voter-card-wrap--pending,
.booth-card--pending {
    background: #fffbeb;
    border-color: #f59e0b;
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.16);
}

.pending-inline-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.voter-card-avatar,
.voter-avatar-placeholder {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #2f80ed;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    border: 3px solid #dbeafe;
}

.voter-card-main {
    min-width: 0;
}

.voter-badge {
    background: #eaf2ff;
    color: #145dcc;
}

.voter-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 18px;
    margin-top: 12px;
}

.voter-card-grid label,
.voter-view-shell label {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 3px;
}

.voter-card-grid span {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-card-progress {
    margin-top: 14px;
}

.voter-card-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
}

.voter-card-progress-head span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-card-progress-head strong {
    flex: 0 0 auto;
    color: #0f172a;
}

.voter-card-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef7;
}

.voter-card-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.2s ease;
}

.voter-card-progress--good .voter-card-progress-head span {
    color: #15803d;
}

.voter-card-progress--good .voter-card-progress-fill {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.voter-card-progress--warning .voter-card-progress-head span {
    color: #b45309;
}

.voter-card-progress--warning .voter-card-progress-fill {
    background: linear-gradient(90deg, #f59e0b, #ea580c);
}

.voter-card-progress--danger .voter-card-progress-head span {
    color: #dc2626;
}

.voter-card-progress--danger .voter-card-progress-fill {
    background: linear-gradient(90deg, #fb7185, #ef4444);
}

.voter-card-actions {
    margin-top: 14px;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.voter-empty-state {
    padding: 18px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-weight: 700;
}

.voter-pagination-row {
    margin-top: 16px;
}

.voter-view-dialog {
    max-width: 560px;
}

.voter-view-hero {
    background: linear-gradient(135deg, #1842bc, #3169e6);
}

.voter-add-v3 {
    padding-bottom: 86px;
}

@media (max-width: 900px) {
    .voter-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .voter-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .voter-list-page {
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: hidden;
        padding-inline: 10px;
        width: 100%;
    }

    .voter-list-page .member-v2-topbar {
        box-sizing: border-box;
        gap: 8px;
        grid-template-columns: minmax(0, 1fr) repeat(4, 42px);
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .voter-list-page .member-v2-search-wrap {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .voter-list-page .voter-station-filter-button {
        grid-column: 1;
        min-width: 0;
        max-width: none;
        overflow: hidden;
        padding-inline: 10px;
        width: 100%;
    }

    .voter-list-page .voter-station-filter-button span {
        min-width: 0;
    }

    .voter-list-page .voter-excel-toggle {
        width: 42px;
        min-width: 42px;
        max-width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
    }

    .voter-supporter-filter-wrap {
        grid-column: 2;
        min-width: 0;
    }

    .voter-supporter-filter-dropdown {
        right: -92px;
        width: min(260px, calc(100vw - 32px));
        min-width: 0;
    }

    .voter-list-page--excel {
        top: 84px;
        bottom: calc(64px + env(safe-area-inset-bottom));
        padding: 0;
    }

    .voter-excel-workbook {
        height: calc(100dvh - 84px - 64px - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 84px - 64px - env(safe-area-inset-bottom));
        min-height: 0;
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        border-left: 0;
        border-right: 0;
    }

    .voter-excel-titlebar {
        grid-template-columns: max-content minmax(150px, 1fr) max-content;
        min-width: 0;
    }

    .voter-excel-tabs {
        height: 40px;
        min-height: 40px;
        gap: 6px;
        overflow-x: hidden;
        flex-wrap: nowrap;
        padding: 0 8px;
    }

    .voter-excel-global-search {
        order: 0;
        flex: 1 1 128px;
        width: auto;
        min-width: 0;
        margin-left: 0;
        height: 28px;
    }

    .voter-excel-tabs span.active {
        flex: 0 0 auto;
    }

    .voter-excel-pdf-button {
        flex: 0 0 auto;
        padding: 0 6px;
        white-space: nowrap;
    }

    .voter-excel-global-search input {
        font-size: 11px;
    }

    .voter-excel-ribbon {
        min-height: 72px;
        padding: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .voter-ribbon-group {
        flex: 0 0 auto;
        padding: 0 6px;
    }

    .voter-ribbon-group button,
    .voter-ribbon-group select {
        height: 28px;
        font-size: 11px;
    }

    .voter-excel-formula {
        grid-template-columns: 64px 34px minmax(220px, 1fr);
    }

    .voter-excel-formula input {
        min-width: 220px;
    }

    .voter-excel-footer {
        grid-template-columns: max-content max-content max-content;
        justify-content: space-between;
        gap: 16px;
        min-height: 38px;
        padding: 0 10px;
        text-align: left;
        white-space: nowrap;
    }

    .voter-excel-footer-loader {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .voter-excel-footer-loader button {
        width: auto;
        min-width: max-content;
        flex: 0 0 auto;
    }

    .voter-excel-add-row-modal {
        max-height: calc(100vh - 24px);
        border-radius: 10px;
    }

    .voter-excel-modal-head {
        padding: 15px;
    }

    .voter-excel-add-row-count {
        grid-template-columns: 1fr;
        padding: 12px 15px;
    }

    .voter-excel-add-row-grid {
        grid-template-columns: 1fr;
        padding: 14px 15px;
    }

    .voter-excel-modal-actions {
        padding: 12px 15px 15px;
    }

    .voter-column-letter,
    .voter-excel-heading,
    .voter-excel-cell {
        min-width: 118px;
        width: 118px;
    }

    .voter-corner-cell,
    .voter-row-number {
        width: 38px;
    }

    .voter-stats-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .voter-stats-row .member-stat-card {
        min-height: 70px;
        padding: 10px;
    }

    .voter-stats-row .member-stat-value {
        font-size: 20px;
    }

    .voter-card-wrap {
        grid-template-columns: 52px 1fr;
        gap: 10px;
        padding: 12px;
    }

    .voter-card-avatar,
    .voter-avatar-placeholder {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .voter-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 12px;
    }

    .voter-card-grid label {
        font-size: 11px;
    }

    .voter-card-grid span {
        font-size: 12px;
    }

    .voter-card-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 380px) {
    .voter-list-page {
        padding-inline: 8px;
    }

    .voter-list-page .member-v2-topbar {
        gap: 7px;
        grid-template-columns: minmax(0, 1fr) repeat(4, 38px);
    }

    .voter-list-page .voter-excel-toggle {
        height: 40px;
        min-height: 40px;
        max-width: 38px;
        min-width: 38px;
        width: 38px;
    }

    .voter-list-page .voter-station-filter-button {
        height: 40px;
        padding-inline: 8px;
    }

    .voter-list-page .voter-excel-brand-icon {
        transform: scale(0.9);
    }
}


.voter-fill-color-wrap {
    position: relative;
    display: inline-flex;
}

.voter-fill-current {
    width: 10px;
    height: 4px;
    display: inline-block;
    margin-left: 4px;
    border: 1px solid rgba(255,255,255,0.45);
}

.voter-fill-color-wrap {
    position: relative;
    display: inline-flex;
    overflow: visible;
}

.voter-fill-color-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    width: 188px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(5, 28px);
    gap: 6px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.voter-fill-color-swatch {
    width: 28px;
    height: 28px;
    min-height: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

    .voter-fill-color-swatch:hover {
        outline: 2px solid #217346;
        outline-offset: 1px;
    }

.voter-fill-no-color {
    grid-column: 1 / -1;
    height: 30px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #f8fafc;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.voter-ribbon-group,
.voter-ribbon-font {
    overflow: visible !important;
}

.voter-excel-tabs {
    position: relative;
    z-index: 30;
    overflow: visible !important;
}

.voter-excel-autosum-menu,
.voter-excel-export-menu {
    z-index: 99999 !important;
}

@media (min-width: 641px) {
    .voter-excel-ribbon {
        overflow: visible !important;
    }
}

@media (max-width: 640px) {
    .voter-excel-ribbon {
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }

    .voter-excel-tabs {
        height: 40px !important;
        min-height: 40px !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        padding: 0 8px !important;
        overflow: hidden !important;
    }

    .voter-excel-tabs > .active,
    .voter-excel-tabs > .voter-excel-pdf-button {
        flex: 0 0 auto !important;
    }

    .voter-excel-tabs > .voter-excel-global-search {
        order: 0 !important;
        flex: 1 1 120px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-left: 0 !important;
        height: 28px !important;
    }
}

/* Voter report dashboard */
.voter-report-page {
    --report-accent: #2563eb;
    --report-soft-accent: #60a5fa;
    --report-accent-bg: #eff6ff;
    width: 100%;
    min-height: calc(100vh - 76px);
    padding: 18px;
    background: #f5f7fb;
}

.voter-report-page.report-theme-booth {
    --report-accent: #2563eb;
    --report-soft-accent: #22c55e;
    --report-accent-bg: #eff6ff;
}

.voter-report-page.report-theme-village {
    --report-accent: #059669;
    --report-soft-accent: #38bdf8;
    --report-accent-bg: #ecfdf5;
}

.voter-report-page.report-theme-panchayat {
    --report-accent: #0891b2;
    --report-soft-accent: #22c55e;
    --report-accent-bg: #ecfeff;
}

.voter-report-page.report-theme-ageGroup {
    --report-accent: #ca8a04;
    --report-soft-accent: #fb7185;
    --report-accent-bg: #fefce8;
}

.voter-report-page.report-theme-master {
    --report-accent: #7c3aed;
    --report-soft-accent: #f59e0b;
    --report-accent-bg: #f5f3ff;
}

.voter-report-page.report-theme-house {
    --report-accent: #ea580c;
    --report-soft-accent: #14b8a6;
    --report-accent-bg: #fff7ed;
}

.voter-report-page.report-theme-religion {
    --report-accent: #0f766e;
    --report-soft-accent: #8b5cf6;
    --report-accent-bg: #f0fdfa;
}

.voter-report-page.report-theme-category {
    --report-accent: #be185d;
    --report-soft-accent: #f97316;
    --report-accent-bg: #fdf2f8;
}

.voter-report-page.report-theme-mismatch {
    --report-accent: #dc2626;
    --report-soft-accent: #f97316;
    --report-accent-bg: #fef2f2;
}

.voter-report-page.report-theme-report1 {
    --report-accent: #2563eb;
    --report-soft-accent: #14b8a6;
    --report-accent-bg: #eff6ff;
}

.voter-report-page.report-theme-duplicate {
    --report-accent: #9333ea;
    --report-soft-accent: #f43f5e;
    --report-accent-bg: #faf5ff;
}

.voter-report-page.report-theme-senior {
    --report-accent: #0f766e;
    --report-soft-accent: #0ea5e9;
    --report-accent-bg: #f0fdfa;
}

.voter-report-page.report-theme-young {
    --report-accent: #16a34a;
    --report-soft-accent: #3b82f6;
    --report-accent-bg: #f0fdf4;
}

.voter-report-page.report-theme-genderRatio {
    --report-accent: #db2777;
    --report-soft-accent: #8b5cf6;
    --report-accent-bg: #fdf2f8;
}

.voter-report-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
}

.voter-report-header,
.voter-report-context-card,
.voter-report-filter-panel,
.voter-report-table-card,
.voter-report-panel,
.voter-report-insight {
    background: #fff;
    border: 1px solid #dbe5f2;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.voter-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border-radius: 18px 18px 10px 10px;
}

.voter-report-header > div:first-child {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.voter-report-back,
.voter-report-icon-btn,
.voter-report-filter-head button {
    border: 1px solid #dbe8fb;
    background: #fff;
    color: #1d4ed8;
    cursor: pointer;
}

.voter-report-back {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex: 0 0 auto;
}

.voter-report-title-group {
    min-width: 0;
    overflow: hidden;
}

.voter-report-title-group h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
    color: #111827;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-report-title-group p {
    margin: 4px 0 0;
    color: #64748b;
    font-weight: 700;
    font-size: 13px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.voter-report-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.voter-report-icon-btn {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.voter-report-icon-btn.active {
    color: #fff;
    border-color: #2563eb;
    background: #2563eb;
}

.voter-report-icon-btn.disabled,
.voter-report-icon-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.voter-report-export {
    position: relative;
}

.voter-report-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 150px;
    padding: 8px;
    background: #fff;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    z-index: 5;
}

.voter-report-menu button {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 9px;
    color: #111827;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
}

.voter-report-menu button:hover {
    background: #eff6ff;
}

.voter-report-export-scope-modal {
    width: min(460px, calc(100vw - 28px));
    background: #fff;
    border: 1px solid #dbe5f2;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    overflow: hidden;
}

.voter-report-export-scope-list {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.voter-report-export-scope-list button {
    width: 100%;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.voter-report-export-scope-list button:hover,
.voter-report-export-scope-list button:focus-visible {
    border-color: #2563eb;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
    outline: none;
}

.voter-report-export-scope-list button:disabled,
.voter-report-picker-head button:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.voter-report-export-error {
    margin: 14px 18px 0;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #b91c1c;
    background: #fef2f2;
    font-size: 12px;
    font-weight: 800;
}

.voter-report-export-progress {
    margin: 14px 18px 0;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
}

.voter-report-export-progress > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 900;
}

.voter-report-export-progress strong,
.voter-report-export-progress span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-report-export-progress-track {
    height: 8px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbeafe;
}

.voter-report-export-progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transition: width 0.2s ease;
}

.voter-report-export-scope-list span {
    grid-row: span 2;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    background: #eff6ff;
    font-size: 18px;
}

.voter-report-export-scope-list strong,
.voter-report-export-scope-list small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-report-export-scope-list strong {
    color: #111827;
    font-size: 16px;
    font-weight: 900;
}

.voter-report-export-scope-list small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.voter-report-filter-panel {
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
}

.voter-report-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.voter-report-filter-head strong {
    display: block;
    color: #111827;
    font-size: 16px;
}

.voter-report-filter-head span {
    display: block;
    color: #64748b;
    font-weight: 700;
    font-size: 12px;
}

.voter-report-filter-head button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.voter-report-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.voter-report-filter-grid label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-weight: 800;
    font-size: 12px;
}

.voter-report-filter-grid input,
.voter-report-filter-grid select,
.voter-report-search input {
    width: 100%;
    border: 1px solid #cfe0f5;
    background: #fff;
    border-radius: 10px;
    min-height: 40px;
    padding: 0 12px;
    outline: none;
}

.voter-report-filter-grid input:focus,
.voter-report-filter-grid select:focus,
.voter-report-search input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.voter-report-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.voter-report-clear-btn,
.voter-report-apply-btn,
.voter-report-load-row button {
    min-height: 42px;
    border-radius: 10px;
    border: 0;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.voter-report-clear-btn {
    background: #ef4444;
}

.voter-report-apply-btn,
.voter-report-load-row button {
    background: #2563eb;
}

.voter-report-loading,
.voter-report-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #334155;
    font-weight: 900;
    background: #fff;
    border: 1px solid #dbe5f2;
    border-radius: 16px;
}

.voter-report-loading span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid #bfdbfe;
    border-top-color: #2563eb;
    animation: voter-report-spin 0.7s linear infinite;
    margin-bottom: 8px;
}

@keyframes voter-report-spin {
    to {
        transform: rotate(360deg);
    }
}

.voter-report-context-card {
    display: grid;
    grid-template-columns: 62px repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
}

.voter-report-location-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--report-accent-bg, #dbeafe);
    color: var(--report-accent, #2563eb);
    font-size: 22px;
}

.voter-report-context-card span,
.voter-report-stat-card span,
.voter-report-table-head span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.voter-report-context-card strong {
    display: block;
    margin-top: 3px;
    color: #111827;
    font-size: 15px;
}

.voter-report-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.voter-report-stat-card {
    border-radius: 16px;
    border: 1px solid #dbe5f2;
    min-height: 112px;
    padding: 14px;
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    gap: 5px;
    position: relative;
    overflow: hidden;
}

.voter-report-stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.9), transparent 32%);
    pointer-events: none;
}

.voter-report-stat-card i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 17px;
    position: relative;
}

.voter-report-stat-card strong {
    font-size: 27px;
    line-height: 1;
    color: #111827;
    position: relative;
}

.voter-report-stat-card.total {
    background: #f4f8ff;
}

.voter-report-stat-card.total i {
    background: #dbeafe;
    color: #2563eb;
}

.voter-report-stat-card.male {
    background: #f2fff8;
}

.voter-report-stat-card.male i {
    background: #dcfce7;
    color: #16a34a;
}

.voter-report-stat-card.female {
    background: #fff5fa;
}

.voter-report-stat-card.female i {
    background: #ffe4ef;
    color: #ec4899;
}

.voter-report-stat-card.other {
    background: #fbf7ff;
}

.voter-report-stat-card.other i {
    background: #ede9fe;
    color: #7c3aed;
}

.voter-report-dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 12px;
    margin-bottom: 12px;
}

.voter-report-panel {
    border-radius: 16px;
    padding: 16px;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.voter-report-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--report-accent, #2563eb), var(--report-soft-accent, #60a5fa));
}

.voter-report-bars-panel {
    grid-column: 1 / -1;
}

.voter-report-panel h2 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 16px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voter-report-panel h2::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--report-accent, #2563eb);
    box-shadow: 0 0 0 5px var(--report-accent-bg, #eff6ff);
}

.voter-report-donut-wrap {
    display: grid;
    place-items: center;
    min-height: 250px;
}

.voter-report-donut {
    position: relative;
    width: min(210px, 70vw);
    height: min(210px, 70vw);
    min-width: 168px;
    min-height: 168px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #111827;
    box-shadow: 0 16px 32px rgba(59, 130, 246, 0.12);
}

.voter-report-donut::after {
    content: "";
    position: absolute;
    inset: 58px;
    border-radius: 50%;
    background: #fff;
}

.voter-report-donut span,
.voter-report-donut small {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
}

.voter-report-donut span {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 900;
    line-height: 1;
    max-width: 84px;
    overflow-wrap: anywhere;
}

.voter-report-donut small {
    margin-top: 0;
    color: #64748b;
    font-weight: 800;
    font-size: 11px;
    line-height: 1.1;
    max-width: 82px;
}

.voter-report-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #475569;
    font-weight: 800;
    font-size: 12px;
}

.voter-report-legend i,
.voter-report-ratio-row i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 6px;
}

.voter-report-legend .male,
.voter-report-ratio-row .male,
.voter-report-bar-track .male {
    background: #4ade80;
}

.voter-report-legend .female,
.voter-report-ratio-row .female,
.voter-report-bar-track .female {
    background: #f472b6;
}

.voter-report-legend .other,
.voter-report-ratio-row .other,
.voter-report-bar-track .other {
    background: #8b5cf6;
}

.voter-report-ratio-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
    color: #334155;
    font-weight: 800;
}

.voter-report-ratio-highlight {
    margin-top: 16px;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, var(--report-accent-bg, #eff6ff), #fff);
    border-radius: 12px;
    padding: 14px;
    color: var(--report-accent, #2563eb);
}

.voter-report-ratio-highlight span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.voter-report-ratio-highlight strong {
    font-size: 30px;
    margin-right: 10px;
}

.voter-report-bars {
    display: grid;
    gap: 10px;
}

.voter-report-bar-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 76px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #334155;
    font-weight: 800;
}

.voter-report-bar-track {
    height: 14px;
    border-radius: 999px;
    background: #edf2f7;
    overflow: hidden;
}

.voter-report-bar-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.voter-report-insight {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--report-accent-bg, #ecfdf5), #f8fafc);
    margin-bottom: 12px;
}

.voter-report-insight-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--report-accent, #059669);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.voter-report-insight strong {
    display: block;
    color: var(--report-accent, #047857);
}

.voter-report-insight span {
    display: block;
    color: #334155;
    font-weight: 700;
    font-size: 13px;
}

.voter-report-insight > i {
    color: var(--report-accent, #10b981);
    font-size: 26px;
}

.voter-report-dashboard-grid--summary {
    grid-template-columns: 1.12fr 0.88fr;
    align-items: stretch;
}

.voter-report-panel--gender-mix {
    min-height: 300px;
}

.voter-report-panel--population,
.voter-report-panel--gauge,
.voter-report-panel--share,
.voter-report-panel--insights,
.voter-report-panel--highlights {
    min-height: 0;
}

.voter-report-donut-wrap--mix {
    min-height: 214px;
}

.voter-report-legend--percent {
    justify-content: space-around;
    gap: 10px;
}

.voter-report-legend--percent span {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 86px;
}

.voter-report-legend--percent strong {
    display: block;
    color: var(--report-accent, #2563eb);
}

.voter-report-panel--population {
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.voter-report-people-list {
    display: grid;
    gap: 14px;
}

.voter-report-people-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    align-items: center;
    gap: 12px;
}

.voter-report-people-icons {
    display: grid;
    grid-template-columns: repeat(12, 22px);
    gap: 4px;
    min-width: 0;
}

.voter-report-people-icons i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e8eef7;
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1;
}

.voter-report-people-row.male .voter-report-people-icons i.active {
    background: #dcfce7;
    color: #16a34a;
}

.voter-report-people-row.female .voter-report-people-icons i.active {
    background: #fce7f3;
    color: #ec4899;
}

.voter-report-people-row.other .voter-report-people-icons i.active {
    background: #ede9fe;
    color: #7c3aed;
}

.voter-report-people-meta {
    display: grid;
    gap: 2px;
    justify-items: end;
    color: #64748b;
    font-weight: 800;
    font-size: 12px;
}

.voter-report-people-meta strong {
    color: #0f172a;
    font-size: 15px;
}

.voter-report-balance-note {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: var(--report-accent-bg, #eff6ff);
    color: #334155;
    font-weight: 800;
    font-size: 12px;
}

.voter-report-balance-note i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--report-accent, #2563eb);
    background: #fff;
}

.voter-report-gauge {
    --gauge-value: 0;
    min-height: 178px;
    display: grid;
    place-items: center;
    position: relative;
    padding-top: 12px;
}

.voter-report-gauge-arc {
    width: min(224px, 100%);
    aspect-ratio: 2 / 1;
    border-radius: 999px 999px 0 0;
    background:
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.96) 0 48%, transparent 49%),
        conic-gradient(from 270deg at 50% 100%,
            #22c55e 0 42deg,
            #a3e635 42deg 68deg,
            #facc15 68deg 94deg,
            #fb923c 94deg 122deg,
            #f43f5e 122deg 150deg,
            #7c3aed 150deg 180deg,
            transparent 180deg 360deg);
    position: relative;
    overflow: hidden;
    filter: drop-shadow(0 14px 22px rgba(37, 99, 235, 0.16));
}

.voter-report-gauge-arc::after {
    content: "";
    position: absolute;
    inset: 18px 18px 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at 50% 80%, rgba(226, 232, 240, 0.8), transparent 36%),
        linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    box-shadow: inset 0 6px 16px rgba(15, 23, 42, 0.06);
}

.voter-report-gauge-arc::before {
    content: "\f24e";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 50%;
    bottom: 18px;
    width: 28px;
    height: 28px;
    transform: translateX(-50%);
    z-index: 2;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #64748b;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    font-size: 11px;
}

.voter-report-gauge-needle {
    position: absolute;
    width: 4px;
    height: 80px;
    bottom: 64px;
    left: 50%;
    transform-origin: 50% 100%;
    transform: translateX(-50%) rotate(calc((var(--gauge-value) * 1.8deg) - 90deg));
    border-radius: 999px;
    background: linear-gradient(180deg, #ef4444, #fb7185);
    box-shadow: 0 3px 10px rgba(244, 63, 94, 0.34);
}

.voter-report-gauge strong {
    position: absolute;
    bottom: 32px;
    color: #2563eb;
    font-size: 30px;
    line-height: 1;
}

.voter-report-gauge span {
    position: absolute;
    bottom: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.voter-report-share-stack {
    height: 26px;
    border-radius: 999px;
    background: #e8eef7;
    overflow: hidden;
    display: flex;
}

.voter-report-share-stack i {
    display: block;
    min-width: 0;
}

.voter-report-share-stack .male {
    background: #4ade80;
}

.voter-report-share-stack .female {
    background: #f472b6;
}

.voter-report-share-stack .other {
    background: #8b5cf6;
}

.voter-report-share-labels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.voter-report-share-labels span {
    display: grid;
    gap: 4px;
    color: #64748b;
    font-weight: 800;
    font-size: 12px;
}

.voter-report-share-labels i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.voter-report-share-labels .male {
    background: #4ade80;
}

.voter-report-share-labels .female {
    background: #f472b6;
}

.voter-report-share-labels .other {
    background: #8b5cf6;
}

.voter-report-share-labels strong {
    color: #111827;
}

.voter-report-mini-list,
.voter-report-highlight-list {
    display: grid;
    gap: 10px;
}

.voter-report-mini-item,
.voter-report-highlight-list div {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.voter-report-mini-item i,
.voter-report-highlight-list i {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
}

.voter-report-mini-item span,
.voter-report-highlight-list span {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.voter-report-mini-item.success {
    background: #ecfdf5;
    color: #059669;
}

.voter-report-mini-item.danger {
    background: #fff1f2;
    color: #e11d48;
}

.voter-report-mini-item.info {
    background: #eff6ff;
    color: #2563eb;
}

.voter-report-highlight-list div {
    grid-template-columns: minmax(0, 1fr) auto;
}

.voter-report-highlight-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.voter-report-highlight-list strong {
    color: #2563eb;
    font-size: 17px;
    text-align: right;
}

.voter-report-footnote {
    margin: -2px 0 12px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.voter-report-table-card {
    border-radius: 16px;
    padding: 14px;
}

.voter-report-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.voter-report-table-head strong {
    display: block;
    color: #111827;
    font-size: 17px;
}

.voter-report-search {
    position: relative;
    width: min(100%, 360px);
}

.voter-report-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.voter-report-search input {
    padding-left: 34px;
}

.voter-report-table-scroll {
    overflow: auto;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
}

.voter-report-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.voter-report-table th,
.voter-report-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.voter-report-table th {
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
}

.voter-report-table td {
    color: #111827;
    font-weight: 700;
    font-size: 13px;
}

.voter-report-load-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    color: #334155;
    font-weight: 800;
    font-size: 13px;
}

.voter-report-load-row button {
    padding: 0 16px;
}

.voter-report-empty--compact {
    min-height: 110px;
    box-shadow: none;
}

.voter-report-select-state {
    min-height: 260px;
    padding: 24px;
    gap: 8px;
}

.voter-report-select-state > i {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #2563eb;
    font-size: 22px;
}

.voter-report-select-state strong {
    color: #111827;
    font-size: 18px;
}

.voter-report-select-state span {
    color: #64748b;
    font-weight: 800;
    max-width: 520px;
}

.voter-report-select-state button {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-weight: 900;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.voter-report-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    background: rgba(15, 23, 42, 0.56);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px;
}

.voter-report-picker-modal {
    width: min(100%, 560px);
    max-height: min(760px, calc(100dvh - 36px));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.34);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
}

.voter-report-picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.voter-report-picker-head h3 {
    margin: 0;
    color: #111827;
    font-size: 22px;
    line-height: 1.1;
}

.voter-report-picker-head p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.voter-report-picker-head button {
    width: 40px;
    height: 40px;
    border: 1px solid #dbe5f2;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
}

.voter-report-picker-search {
    position: relative;
    padding: 14px 18px 10px;
}

.voter-report-picker-search i {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-35%);
    color: #64748b;
}

.voter-report-picker-search input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cfe0f5;
    border-radius: 10px;
    padding: 0 12px 0 38px;
    outline: none;
    font-weight: 800;
}

.voter-report-picker-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.voter-report-picker-list {
    min-height: 0;
    overflow: auto;
    padding: 0 18px 14px;
    display: grid;
    align-content: start;
    gap: 8px;
}

.voter-report-picker-state {
    min-height: 120px;
    border: 1px dashed #bfd5f3;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-weight: 900;
}

.voter-report-picker-option {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #dbe5f2;
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
}

.voter-report-picker-option.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.voter-report-picker-check {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    display: grid;
    place-items: center;
    color: #2563eb;
    background: #fff;
}

.voter-report-picker-option.selected .voter-report-picker-check {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.voter-report-picker-info {
    min-width: 0;
}

.voter-report-picker-info strong,
.voter-report-picker-info small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-report-picker-info strong {
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}

.voter-report-picker-info small {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.voter-report-picker-meta {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.voter-report-picker-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

@media (max-width: 900px) {
    .voter-report-page {
        padding: 10px;
    }

    .voter-report-header {
        align-items: flex-start;
    }

    .voter-report-title-group h1 {
        font-size: 18px;
    }

    .voter-report-title-group p {
        font-size: 12px;
    }

    .voter-report-filter-grid,
    .voter-report-context-card,
    .voter-report-stat-grid,
    .voter-report-dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .voter-report-dashboard-grid {
        align-items: stretch;
    }

    .voter-report-donut-wrap {
        min-height: 220px;
    }

    .voter-report-location-icon {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .voter-report-page {
        padding: 8px;
    }

    .voter-report-shell {
        width: 100%;
    }

    .voter-report-header {
        border-radius: 14px;
        position: relative;
        overflow: visible;
        z-index: 30;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }

    .voter-report-header > div:first-child {
        width: 100%;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
    }

    .voter-report-title-group h1 {
        font-size: 19px;
        line-height: 1.15;
    }

    .voter-report-title-group p {
        font-size: 11px;
        line-height: 1.25;
        -webkit-line-clamp: 2;
    }

    .voter-report-actions,
    .voter-report-export {
        position: relative;
    }

    .voter-report-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .voter-report-icon-btn span {
        display: none;
    }

    .voter-report-icon-btn {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 0;
        justify-content: center;
    }

    .voter-report-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: 138px;
        min-width: 138px;
        max-width: calc(100vw - 28px);
        padding: 8px;
        border-radius: 12px;
        z-index: 2300;
    }

    .voter-report-menu button {
        min-height: 38px;
        padding: 9px 8px;
        gap: 8px;
        font-size: 13px;
        white-space: nowrap;
        justify-content: flex-start;
        overflow: visible;
    }

    .voter-report-menu button i {
        width: 16px;
        text-align: center;
        flex: 0 0 auto;
    }

    .voter-report-filter-grid,
    .voter-report-context-card,
    .voter-report-stat-grid,
    .voter-report-dashboard-grid,
    .voter-report-filter-actions {
        grid-template-columns: 1fr;
    }

    .voter-report-context-card {
        gap: 10px;
    }

    .voter-report-stat-card {
        min-height: 92px;
    }

    .voter-report-stat-card strong {
        font-size: 24px;
    }

    .voter-report-donut-wrap {
        min-height: 188px;
    }

    .voter-report-donut {
        width: min(176px, 62vw);
        height: min(176px, 62vw);
        min-width: 148px;
        min-height: 148px;
    }

    .voter-report-donut::after {
        inset: 42px;
    }

    .voter-report-donut span {
        font-size: 22px;
        max-width: 70px;
    }

    .voter-report-donut small {
        font-size: 10px;
        max-width: 72px;
    }

    .voter-report-legend {
        gap: 8px;
        font-size: 11px;
    }

    .voter-report-bar-row {
        grid-template-columns: 58px minmax(0, 1fr) 54px;
        gap: 8px;
        font-size: 11px;
    }

    .voter-report-ratio-highlight strong {
        font-size: 25px;
    }

    .voter-report-insight {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .voter-report-insight > i {
        display: none;
    }

    .voter-report-table-head {
        display: grid;
    }

    .voter-report-search {
        width: 100%;
    }

    .voter-report-load-row {
        flex-direction: column;
    }

    .voter-report-picker-overlay {
        align-items: stretch;
        justify-content: center;
        padding: calc(84px + env(safe-area-inset-top)) 10px calc(74px + env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .voter-report-picker-modal {
        width: min(100%, calc(100vw - 20px));
        height: 100%;
        max-height: none;
        min-height: 0;
        border-radius: 16px;
        grid-template-rows: auto auto minmax(0, 1fr) auto;
    }

    .voter-report-picker-head {
        padding: 12px 14px;
        gap: 8px;
    }

    .voter-report-picker-head h3 {
        font-size: 19px;
    }

    .voter-report-picker-head p {
        font-size: 12px;
        line-height: 1.35;
    }

    .voter-report-picker-search {
        padding: 10px 14px;
    }

    .voter-report-picker-search i {
        left: 28px;
        transform: translateY(-50%);
    }

    .voter-report-picker-list {
        min-height: 0;
        overflow: auto;
        padding: 0 14px 10px;
        gap: 7px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .voter-report-picker-option {
        grid-template-columns: 34px minmax(0, 1fr) minmax(54px, auto);
        gap: 8px;
        padding: 8px 9px;
    }

    .voter-report-picker-actions {
        padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
        gap: 10px;
    }
}
.voter-search-page {
    min-height: calc(100dvh - 72px);
    padding: 24px 16px;
    display: grid;
    place-items: start center;
    background: #f6f8fc;
}

.voter-search-page-card {
    width: min(1120px, 100%);
    max-height: none;
}

.voter-search-card-results {
    width: min(1120px, 100%);
    margin-top: 16px;
}

.voter-search-card-results .voter-search-results-head {
    border: 1px solid #dbe3ef;
    border-radius: 10px 10px 0 0;
}

.voter-search-card-results .voter-search-empty {
    margin: 0;
    min-height: 120px;
    border-radius: 0 0 10px 10px;
    background: #ffffff;
}

.voter-search-voter-card-list {
    margin-top: 12px;
}

.voter-search-result-list--page {
    max-height: 360px;
}

@media (max-width: 640px) {
    .voter-search-page {
        min-height: calc(100dvh - 80px);
        padding: 12px;
    }

    .voter-search-page-card {
        width: 100%;
        max-height: calc(100dvh - 104px);
    }

    .voter-search-card-results {
        width: 100%;
        margin-top: 12px;
    }

    .voter-search-card-results .voter-search-results-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding: 10px 12px;
    }

    .voter-search-result-list--page {
        max-height: 240px;
    }
}

/* Report dashboard visual refresh */
.voter-report-page {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.98)),
        repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.12) 0 1px, transparent 1px 74px),
        repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.10) 0 1px, transparent 1px 74px);
    padding: 22px;
}

.voter-report-shell {
    width: min(100%, 1260px);
}

.voter-report-header {
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 22px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95)),
        linear-gradient(90deg, rgba(37, 99, 235, 0.09), rgba(34, 197, 94, 0.08));
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.voter-report-title-group h1 {
    font-size: 24px;
    letter-spacing: 0;
}

.voter-report-title-group p {
    max-width: 620px;
    line-height: 1.35;
}

.voter-report-back,
.voter-report-icon-btn {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.voter-report-back:hover,
.voter-report-icon-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}

.voter-report-icon-btn.active,
.voter-report-apply-btn,
.voter-report-load-row button {
    border-color: transparent;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.voter-report-context-card {
    grid-template-columns: 66px repeat(4, minmax(0, 1fr));
    border-radius: 20px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
        linear-gradient(90deg, rgba(14, 165, 233, 0.08), rgba(236, 72, 153, 0.06));
}

.voter-report-location-icon {
    border-radius: 18px;
    background: linear-gradient(135deg, var(--report-accent-bg, #eff6ff), #fff);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08), 0 12px 20px rgba(15, 23, 42, 0.08);
}

.voter-report-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.voter-report-stat-card {
    min-height: 124px;
    border-radius: 20px;
    border-color: rgba(203, 213, 225, 0.72);
    background: #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
    isolation: isolate;
}

.voter-report-stat-card::before {
    inset: auto 12px 12px 12px;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--report-accent, #2563eb), var(--report-soft-accent, #14b8a6));
    opacity: 0.78;
}

.voter-report-stat-card i {
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.voter-report-dashboard-grid--summary {
    grid-template-columns: minmax(280px, 1.08fr) minmax(280px, 1fr) minmax(240px, 0.8fr);
    grid-auto-flow: dense;
    gap: 14px;
}

.voter-report-panel {
    border-radius: 20px;
    border-color: rgba(203, 213, 225, 0.72);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.97));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
}

.voter-report-panel--gender-mix,
.voter-report-panel--population {
    grid-row: span 2;
}

.voter-report-panel--highlights {
    grid-column: span 2;
}

.voter-report-panel h2 {
    font-size: 15px;
    letter-spacing: 0;
}

.voter-report-donut {
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.voter-report-people-row,
.voter-report-mini-item,
.voter-report-highlight-list div,
.voter-report-balance-note {
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #fff;
}

.voter-report-share-stack {
    height: 18px;
    padding: 3px;
    background: #eef2f7;
}

.voter-report-footnote {
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.voter-report-picker-modal {
    border-radius: 22px;
    border-color: rgba(203, 213, 225, 0.88);
}

.voter-report-select-btn {
    color: #0f766e;
    border-color: #99f6e4;
    background: linear-gradient(135deg, #f0fdfa, #ffffff);
}

.voter-report-selector-modal {
    width: min(760px, calc(100vw - 28px));
    max-height: min(720px, calc(100dvh - 28px));
    grid-template-rows: auto auto minmax(0, 1fr);
}

.voter-report-selector-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 8px 14px 14px;
    min-height: 0;
    max-height: none;
    overflow: auto;
    overscroll-behavior: contain;
    align-content: start;
}

.voter-report-selector-option {
    width: 100%;
    min-width: 0;
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    background: #fff;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.voter-report-selector-option:hover,
.voter-report-selector-option.selected {
    transform: translateY(-1px);
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
}

.voter-report-selector-option.selected {
    border-color: var(--report-accent, #2563eb);
}

.voter-report-selector-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    color: var(--report-accent, #2563eb);
    background: var(--report-accent-bg, #eff6ff);
}

.voter-report-selector-option .voter-report-picker-info {
    min-width: 0;
    overflow: hidden;
}

.voter-report-selector-option .voter-report-picker-info strong,
.voter-report-selector-option .voter-report-picker-info small {
    min-width: 0;
}

.voter-report-selector-option .voter-report-picker-info strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-report-selector-option .voter-report-picker-info small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.voter-report-selector-option .voter-report-picker-meta {
    justify-self: end;
    min-width: 18px;
    color: var(--report-accent, #2563eb);
}

@media (max-width: 1100px) {
    .voter-report-dashboard-grid--summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .voter-report-panel--gender-mix,
    .voter-report-panel--population {
        grid-row: auto;
    }

    .voter-report-panel--highlights {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .voter-report-page {
        padding: 12px;
    }

    .voter-report-header {
        border-radius: 18px;
    }

    .voter-report-context-card,
    .voter-report-stat-grid,
    .voter-report-dashboard-grid--summary {
        grid-template-columns: 1fr;
    }

    .voter-report-location-icon {
        width: 48px;
        height: 48px;
    }

    .voter-report-stat-card {
        min-height: 106px;
    }

    .voter-report-panel--highlights {
        grid-column: auto;
    }

    .voter-report-selector-list {
        grid-template-columns: 1fr;
        padding: 8px 10px 12px;
    }

    .voter-report-selector-option {
        grid-template-columns: 34px minmax(0, 1fr) 20px;
        gap: 8px;
        min-height: 54px;
        padding: 9px 10px;
        border-radius: 12px;
    }

    .voter-report-selector-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 11px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .voter-report-selector-overlay {
        padding: 10px;
        align-items: center;
    }

    .voter-report-selector-modal {
        width: min(100%, 380px);
        max-height: calc(100dvh - 20px - env(safe-area-inset-bottom));
        border-radius: 18px;
    }

    .voter-report-selector-modal .voter-report-picker-head {
        padding: 12px 12px 10px;
        align-items: center;
    }

    .voter-report-selector-modal .voter-report-picker-head h3 {
        font-size: 18px;
    }

    .voter-report-selector-modal .voter-report-picker-head p {
        font-size: 11px;
        line-height: 1.2;
        margin-top: 5px;
    }

    .voter-report-selector-modal .voter-report-picker-head button {
        width: 40px;
        height: 40px;
        flex: 0 0 auto;
    }

    .voter-report-selector-modal .voter-report-picker-search {
        padding: 10px 12px 8px;
    }

    .voter-report-selector-modal .voter-report-picker-search i {
        left: 25px;
        transform: translateY(-50%);
    }

    .voter-report-selector-modal .voter-report-picker-search input {
        min-height: 40px;
        border-radius: 9px;
        font-size: 13px;
    }

    .voter-report-selector-option .voter-report-picker-info small {
        -webkit-line-clamp: 1;
        font-size: 11px;
        line-height: 1.25;
    }

    .voter-report-selector-option .voter-report-picker-meta {
        font-size: 13px;
    }
}

.voter-report-page :where(h1, h2, h3, p, span, strong, small, b, button, input, label, div) {
    font-weight: 500 !important;
}

.voter-excel-sheet .voter-excel-frozen-column {
    position: static !important;
    left: auto !important;
    top: auto !important;
}

@media (max-width: 520px) {
    .member-add-v3 .member-add-actions .btn-group {
        display: grid !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 8px !important;
        width: 100%;
    }

    .member-add-v3 .member-add-actions .member-add-action-btn {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 42px !important;
        padding: 0 !important;
        border-radius: 10px;
    }

    .member-add-v3 .member-add-actions .member-add-action-btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .member-add-v3 .member-add-actions .member-add-action-btn i {
        display: inline-flex;
        font-size: 16px;
    }
}

.member-add-actions .member-add-action-btn,
.village-add-actions .member-add-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.member-add-actions .member-add-action-btn i,
.village-add-actions .member-add-action-btn i {
    flex: 0 0 auto;
    font-size: 14px;
}

@media (max-width: 640px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .page-container,
    .page-content,
    .member-add-v3,
    .village-add-v3,
    .voter-add-v3,
    .anti-member-page {
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .member-add-v3 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .member-add-v3 .member-add-v3-section,
    .member-add-v3 .photo-panel,
    .member-add-v3 .list-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    .member-add-v3 .form-grid,
    .village-add-v3 .form-grid,
    .voter-add-v3 .form-grid,
    .booth-form-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 12px !important;
    }

    .member-add-v3 .form-grid > div,
    .member-add-v3 .tab-content > div,
    .member-add-v3 .field-row {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .member-add-v3 .form-input,
    .member-add-v3 .form-select,
    .member-add-v3 input,
    .member-add-v3 select,
    .member-add-v3 textarea,
    .booth-form-grid input,
    .booth-form-grid select,
    .booth-form-grid textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .member-add-actions,
    .village-add-actions {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important;
        margin: 8px 0 0 !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    .member-add-actions .btn-group,
    .village-add-actions .btn-group {
        display: grid !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .member-add-actions .save-btn,
    .member-add-actions .cancel-btn,
    .village-add-actions .save-btn,
    .village-add-actions .cancel-btn {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow: hidden;
    }

    .member-add-actions .member-add-action-btn,
    .village-add-actions .member-add-action-btn {
        height: 42px !important;
        min-height: 42px !important;
        border-radius: 10px !important;
        gap: 0;
    }

    .member-add-actions .member-add-action-btn span,
    .village-add-actions .member-add-action-btn span {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        white-space: nowrap !important;
    }

    .member-add-actions .member-add-action-btn i,
    .village-add-actions .member-add-action-btn i {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 16px !important;
    }

}

@media (max-width: 520px) {
    .member-voter-picker-modal {
        width: calc(100vw - 18px) !important;
        max-width: calc(100vw - 18px) !important;
        max-height: calc(100dvh - 36px) !important;
    }

    .member-voter-picker-modal .modal-body {
        padding: 12px !important;
        min-height: 0;
    }

    .member-voter-picker-list {
        max-height: calc(100dvh - 292px) !important;
        min-height: 0 !important;
        padding: 8px !important;
        gap: 10px !important;
        align-content: start !important;
        grid-auto-rows: auto !important;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .member-voter-picker-item {
        grid-template-columns: 40px minmax(0, 1fr) 18px !important;
        align-items: start !important;
        min-height: 112px !important;
        height: auto !important;
        padding: 12px 10px !important;
        gap: 9px !important;
        overflow: visible !important;
        align-content: start !important;
    }

    .member-voter-picker-avatar {
        width: 38px !important;
        height: 38px !important;
        margin-top: 1px;
    }

    .member-voter-picker-main {
        min-width: 0 !important;
        gap: 5px !important;
        overflow: visible !important;
        align-content: start !important;
    }

    .member-voter-picker-main strong,
    .member-voter-picker-main small {
        max-width: 100%;
        line-height: 1.28 !important;
    }

    .member-voter-picker-main strong {
        font-size: 13.5px !important;
        white-space: nowrap !important;
    }

    .member-voter-picker-main small {
        font-size: 11px !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        display: block;
        word-break: break-word;
    }

    .member-voter-picker-main .member-voter-picker-extra {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-break: break-word;
    }

    .member-voter-picker-check {
        padding-top: 8px;
    }
}

@media (max-width: 380px) {
    .member-voter-picker-item {
        grid-template-columns: 36px minmax(0, 1fr) 14px !important;
        min-height: 118px !important;
        padding: 10px 8px !important;
    }

    .member-voter-picker-avatar {
        width: 34px !important;
        height: 34px !important;
    }
}

@media (max-width: 520px) {
    .member-voter-picker-modal {
        height: auto !important;
        max-height: calc(100dvh - 28px) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .member-voter-picker-modal .modal-header {
        flex: 0 0 auto !important;
    }

    .member-voter-picker-modal .modal-body {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .member-voter-picker-search {
        flex: 0 0 auto !important;
    }

    .member-voter-picker-list {
        flex: 1 1 auto !important;
        min-height: 220px !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    .member-voter-picker-actions {
        flex: 0 0 auto !important;
        position: static !important;
        background: #fff;
    }
}

@media (max-width: 640px) {
    .member-voter-picker-overlay {
        align-items: center !important;
        justify-content: center !important;
        padding: 10px !important;
        overflow: hidden !important;
    }

    .member-voter-picker-overlay .member-voter-picker-modal {
        width: min(100%, 390px) !important;
        max-width: calc(100vw - 20px) !important;
        height: calc(100dvh - 24px) !important;
        max-height: calc(100dvh - 24px) !important;
        margin: 0 !important;
        display: grid !important;
        grid-template-rows: auto minmax(0, 1fr) auto !important;
        overflow: hidden !important;
        border-radius: 14px !important;
    }

    .member-voter-picker-overlay .member-voter-picker-modal .modal-header {
        flex: 0 0 auto !important;
        padding: 14px 16px !important;
    }

    .member-voter-picker-overlay .member-voter-picker-modal .modal-body {
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow: hidden !important;
        display: grid !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
        gap: 12px !important;
        padding: 12px 14px !important;
    }

    .member-voter-picker-overlay .member-voter-picker-search {
        min-height: 42px !important;
    }

    .member-voter-picker-overlay .member-voter-picker-list {
        min-height: 0 !important;
        max-height: none !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 8px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        align-content: start !important;
        grid-auto-rows: max-content !important;
    }

    .member-voter-picker-overlay .member-voter-picker-item {
        min-height: 112px !important;
        height: auto !important;
        overflow: visible !important;
    }

    .member-voter-picker-overlay .member-voter-picker-actions {
        position: static !important;
        flex: 0 0 auto !important;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
        background: #fff !important;
        border-top: 1px solid #e2e8f0 !important;
    }
}


/* ===== VOTER & BOOTH CONTROL UI AND LIST CSS ===== */
.vbc-page {
        min-height: 100%;
        padding: 18px;
        background: #f6f8fb;
        color: #172033;
    }

    .vbc-hero {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: 16px;
        padding: 20px;
        border-radius: 8px;
        color: #fff;
        background: linear-gradient(135deg, #155e75, #15803d);
        box-shadow: 0 18px 40px rgba(21, 94, 117, .18);
    }

    .vbc-kicker {
        display: inline-block;
        margin-bottom: 7px;
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0;
        opacity: .84;
    }

    .vbc-hero h1 {
        margin: 0;
        font-size: 28px;
        line-height: 1.12;
        letter-spacing: 0;
    }

    .vbc-hero p {
        max-width: 620px;
        margin: 8px 0 0;
        color: rgba(255, 255, 255, .84);
    }

    .vbc-hero-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(84px, 1fr));
        gap: 10px;
        min-width: 320px;
    }

    .vbc-hero-stats div {
        padding: 14px;
        border: 1px solid rgba(255, 255, 255, .22);
        border-radius: 8px;
        background: rgba(255, 255, 255, .12);
    }

    .vbc-hero-stats span,
    .vbc-panel-head span,
    .vbc-user-card small,
    .vbc-check-list small,
    .vbc-pending-top small {
        display: block;
        font-size: 12px;
        color: #667085;
    }

    .vbc-hero-stats span {
        color: rgba(255, 255, 255, .72);
    }

    .vbc-hero-stats strong {
        display: block;
        margin-top: 4px;
        font-size: 24px;
    }

    .vbc-tabs {
        display: flex;
        gap: 8px;
        margin: 16px 0;
        overflow-x: auto;
    }

    .vbc-tabs button,
    .vbc-panel-head button,
    .vbc-selector-head button,
    .vbc-actions button,
    .vbc-review-row button {
        border: 0;
        border-radius: 8px;
        cursor: pointer;
        font-weight: 800;
        letter-spacing: 0;
    }

    .vbc-tabs button {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        min-height: 44px;
        padding: 0 14px;
        color: #344054;
        background: #fff;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
        white-space: nowrap;
    }

    .vbc-tabs button.active {
        color: #fff;
        background: #172033;
    }

    .vbc-tabs span {
        min-width: 22px;
        padding: 2px 7px;
        border-radius: 999px;
        color: #172033;
        background: #facc15;
        text-align: center;
    }

    .vbc-grid {
        display: grid;
        grid-template-columns: minmax(230px, 280px) minmax(0, 1.35fr) minmax(260px, .8fr);
        gap: 14px;
        align-items: start;
    }

    .vbc-panel,
    .vbc-access-denied,
    .vbc-message {
        border: 1px solid #e6eaf0;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
    }

    .vbc-panel {
        padding: 16px;
    }

    .vbc-panel-head {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: flex-start;
        margin-bottom: 14px;
    }

    .vbc-panel-head h2 {
        margin: 0;
        font-size: 17px;
        letter-spacing: 0;
    }

    .vbc-panel-head button {
        width: 38px;
        height: 38px;
        color: #155e75;
        background: #e6f6fb;
    }

    .vbc-search {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 42px;
        padding: 0 12px;
        border: 1px solid #d7dde7;
        border-radius: 8px;
        background: #f8fafc;
    }

    .vbc-search input,
    .vbc-form-grid input,
    .vbc-form-grid select,
    .vbc-remarks textarea,
    .vbc-filter-row select,
    .vbc-review-row input {
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: #172033;
        font-size: 14px;
    }

    .vbc-user-list,
    .vbc-check-list,
    .vbc-rule-list,
    .vbc-pending-list {
        display: grid;
        gap: 9px;
    }

    .vbc-user-list {
        max-height: 585px;
        margin-top: 12px;
        overflow: auto;
    }

    .vbc-user-card {
        display: flex;
        gap: 10px;
        align-items: center;
        width: 100%;
        padding: 10px;
        border: 1px solid #edf1f6;
        border-radius: 8px;
        text-align: left;
        background: #fff;
    }

    .vbc-user-card.active {
        border-color: #15803d;
        background: #effdf4;
    }

    .vbc-avatar {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        border-radius: 50%;
        color: #fff;
        background: #155e75;
        font-weight: 900;
    }

    .vbc-form-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .vbc-form-grid label,
    .vbc-remarks {
        display: grid;
        gap: 6px;
        min-width: 0;
    }

    .vbc-form-grid label span,
    .vbc-remarks span {
        font-size: 12px;
        font-weight: 800;
        color: #475467;
    }

    .vbc-form-grid input,
    .vbc-form-grid select,
    .vbc-remarks textarea {
        min-height: 42px;
        padding: 0 11px;
        border: 1px solid #d7dde7;
        border-radius: 8px;
        background: #fff;
    }

    .vbc-remarks textarea {
        min-height: 76px;
        padding-top: 10px;
        resize: vertical;
    }

    .vbc-permissions {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
        margin: 12px 0;
    }

    .vbc-permissions label {
        display: flex;
        align-items: center;
        gap: 7px;
        min-height: 38px;
        padding: 0 10px;
        border-radius: 8px;
        background: #f1f5f9;
        font-size: 13px;
        font-weight: 800;
    }

    .vbc-split-selectors {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 12px;
    }

    .vbc-selector-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    .vbc-selector-head button {
        padding: 6px 9px;
        color: #b42318;
        background: #fff1f0;
        font-size: 12px;
    }

    .vbc-search.compact {
        min-height: 38px;
        margin-bottom: 8px;
    }

    .vbc-check-list {
        max-height: 268px;
        overflow: auto;
        padding-right: 2px;
    }

    .vbc-check-list label {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 8px;
        row-gap: 2px;
        align-items: start;
        min-height: 48px;
        padding: 9px;
        border: 1px solid #edf1f6;
        border-radius: 8px;
        overflow-wrap: anywhere;
    }

    .vbc-check-list small {
        grid-column: 2;
    }

    .vbc-station-option {
        background: #fbfdff;
    }

    .vbc-actions,
    .vbc-review-row {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 9px;
        margin-top: 12px;
        flex-wrap: wrap;
    }

    .vbc-primary,
    .vbc-approve {
        color: #fff;
        background: #15803d;
    }

    .vbc-secondary {
        color: #155e75;
        background: #e6f6fb;
    }

    .vbc-reject {
        color: #fff;
        background: #b42318;
    }

    .vbc-actions button,
    .vbc-review-row button {
        min-height: 42px;
        padding: 0 14px;
    }

    .vbc-mini-pill,
    .vbc-rule-flags span,
    .vbc-status {
        display: inline-flex;
        align-items: center;
        min-height: 26px;
        padding: 0 9px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 900;
        white-space: nowrap;
    }

    .vbc-mini-pill {
        color: #155e75;
        background: #e6f6fb;
    }

    .vbc-empty {
        padding: 22px;
        border-radius: 8px;
        color: #667085;
        background: #f8fafc;
        text-align: center;
    }

    .vbc-rule-list article,
    .vbc-pending-card {
        padding: 12px;
        border: 1px solid #edf1f6;
        border-radius: 8px;
        background: #fff;
    }

    .vbc-rule-list article strong,
    .vbc-pending-top strong {
        display: block;
        font-size: 14px;
    }

    .vbc-rule-list article > div:first-child span {
        display: block;
        margin-top: 4px;
        color: #667085;
        font-size: 12px;
    }

    .vbc-rule-flags {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        margin-top: 10px;
    }

    .vbc-rule-flags span {
        color: #175cd3;
        background: #eff8ff;
    }

    .vbc-rule-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 12px;
    }

    .vbc-rule-actions button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 34px;
        padding: 0 11px;
        border: 0;
        border-radius: 8px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 900;
        letter-spacing: 0;
    }

    .vbc-delete {
        color: #991b1b;
        background: #fee2e2;
    }

    .vbc-edit-close {
        color: #344054;
        background: #f1f5f9;
    }

    .vbc-rule-actions button:disabled {
        cursor: not-allowed;
        opacity: .65;
    }

    .vbc-confirm-overlay {
        position: fixed;
        inset: 0;
        z-index: 1700;
        display: grid;
        place-items: center;
        padding: 18px;
        background: rgba(15, 23, 42, .54);
        animation: vbc-fade-in .18s ease-out both;
    }

    .vbc-confirm-modal {
        width: min(420px, 100%);
        padding: 22px;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 26px 70px rgba(15, 23, 42, .32);
        text-align: center;
        animation: vbc-confirm-in .22s ease-out both;
    }

    .vbc-confirm-icon {
        display: grid;
        place-items: center;
        width: 52px;
        height: 52px;
        margin: 0 auto 12px;
        border-radius: 50%;
        color: #991b1b;
        background: #fee2e2;
        font-size: 20px;
    }

    .vbc-confirm-modal h3 {
        margin: 0;
        font-size: 20px;
        letter-spacing: 0;
    }

    .vbc-confirm-modal p {
        margin: 8px 0 12px;
        color: #667085;
        font-size: 13px;
        line-height: 1.45;
    }

    .vbc-confirm-modal strong {
        display: block;
        overflow-wrap: anywhere;
        color: #172033;
        font-size: 14px;
    }

    .vbc-confirm-actions {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 18px;
    }

    .vbc-confirm-actions button {
        min-width: 112px;
        min-height: 42px;
        border: 0;
        border-radius: 8px;
        cursor: pointer;
        font-weight: 900;
    }

    @keyframes vbc-fade-in {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes vbc-confirm-in {
        from {
            opacity: 0;
            transform: translateY(12px) scale(.97);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .vbc-pending-head {
        align-items: center;
    }

    .vbc-filter-row {
        display: flex;
        gap: 8px;
    }

    .vbc-filter-row select {
        min-width: 145px;
        min-height: 40px;
        padding: 0 10px;
        border: 1px solid #d7dde7;
        border-radius: 8px;
        background: #fff;
    }

    .vbc-pending-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vbc-pending-top {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 7px 10px;
        align-items: center;
        margin-bottom: 12px;
    }

    .vbc-pending-top strong,
    .vbc-pending-top small {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .vbc-pending-top small {
        grid-column: 1 / -1;
    }

    .vbc-status {
        width: max-content;
        color: #92400e;
        background: #fef3c7;
    }

    .vbc-status.approved {
        color: #166534;
        background: #dcfce7;
    }

    .vbc-status.rejected {
        color: #991b1b;
        background: #fee2e2;
    }

    .vbc-review-row input {
        min-width: 190px;
        flex: 1 1 220px;
        min-height: 42px;
        padding: 0 12px;
        border: 1px solid #d7dde7;
        border-radius: 8px;
        background: #fff;
    }

    .vbc-lock-toggle {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 42px;
        padding: 0 12px;
        border-radius: 8px;
        background: #f1f5f9;
        color: #475467;
        cursor: pointer;
        font-size: 12px;
        font-weight: 900;
        user-select: none;
    }

    .vbc-lock-toggle input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .vbc-lock-toggle span {
        position: relative;
        width: 44px;
        height: 24px;
        border-radius: 999px;
        background: #cbd5e1;
        transition: background .18s ease;
    }

    .vbc-lock-toggle span::after {
        content: "";
        position: absolute;
        top: 3px;
        left: 3px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 2px 6px rgba(15, 23, 42, .22);
        transition: transform .18s ease;
    }

    .vbc-lock-toggle.active {
        color: #166534;
        background: #e8f7ee;
    }

    .vbc-lock-toggle.active span {
        background: #15803d;
    }

    .vbc-lock-toggle.active span::after {
        transform: translateX(20px);
    }

    .vbc-lock-toggle em {
        font-style: normal;
        white-space: nowrap;
    }

    .vbc-remark-save {
        color: #166534;
        background: #dcfce7;
    }

    .vbc-toast-zone {
        position: fixed;
        top: 82px;
        right: 18px;
        z-index: 1600;
        display: grid;
        gap: 10px;
        width: min(390px, calc(100vw - 28px));
        pointer-events: none;
    }

    .vbc-message {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        min-height: 54px;
        padding: 12px;
        border: 1px solid #d7dde7;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 18px 44px rgba(15, 23, 42, .2);
        pointer-events: auto;
        animation: vbc-toast-in .28s ease-out both;
    }

    .vbc-message span {
        min-width: 0;
        overflow-wrap: anywhere;
        font-size: 14px;
        font-weight: 700;
    }

    .vbc-message button {
        width: 30px;
        height: 30px;
        border: 0;
        border-radius: 8px;
        background: rgba(15, 23, 42, .06);
        color: inherit;
        cursor: pointer;
    }

    .vbc-access-denied {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 14px;
        padding: 13px 15px;
    }

    .vbc-message.success {
        color: #166534;
        border-color: #bbf7d0;
        background: #f0fdf4;
    }

    .vbc-message.error {
        color: #991b1b;
        border-color: #fecaca;
        background: #fff7f6;
    }

    .vbc-access-denied {
        color: #991b1b;
        background: #fff7f6;
    }

    @keyframes vbc-toast-in {
        from {
            opacity: 0;
            transform: translateY(-10px) scale(.98);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .vbc-view-overlay {
        position: fixed;
        inset: 0;
        z-index: 1200;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: rgba(15, 23, 42, .56);
    }

    .vbc-view-modal {
        display: flex;
        flex-direction: column;
        width: min(1180px, 100%);
        height: min(820px, calc(100dvh - 48px));
        min-height: min(620px, calc(100dvh - 48px));
        overflow: hidden;
        border-radius: 8px;
        background: #111827;
        box-shadow: 0 24px 70px rgba(15, 23, 42, .34);
    }

    .vbc-view-modal .voter-excel-workbook {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none;
    }

    .vbc-view-modal .voter-excel-titlebar {
        grid-template-columns: max-content minmax(0, 1fr) max-content;
    }

    .vbc-view-modal .voter-excel-book-title {
        min-width: 0;
        padding: 0 4px;
    }

    @media (max-width: 1180px) {
        .vbc-grid {
            grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
        }

        .vbc-current-panel {
            grid-column: 1 / -1;
        }

        .vbc-pending-list {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 780px) {
        .vbc-page {
            padding: 12px;
        }

        .vbc-hero,
        .vbc-panel-head,
        .vbc-pending-head {
            flex-direction: column;
        }

        .vbc-hero-stats,
        .vbc-grid,
        .vbc-form-grid,
        .vbc-split-selectors {
            grid-template-columns: 1fr;
        }

        .vbc-hero-stats {
            width: 100%;
            min-width: 0;
        }

        .vbc-hero h1 {
            font-size: 23px;
        }

        .vbc-permissions {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .vbc-user-list,
        .vbc-check-list {
            max-height: 320px;
        }

        .vbc-filter-row,
        .vbc-filter-row select,
        .vbc-actions button,
        .vbc-review-row button {
            width: 100%;
        }

        .vbc-review-row {
            justify-content: stretch;
        }

        .vbc-review-row input,
        .vbc-lock-toggle {
            width: 100%;
        }

        .vbc-view-overlay {
            inset: calc(84px + env(safe-area-inset-top)) 0 calc(64px + env(safe-area-inset-bottom));
            align-items: stretch;
            padding: 6px 8px 8px;
        }

        .vbc-view-modal {
            width: 100%;
            height: 100%;
            min-height: 0;
        }

        .vbc-view-modal .voter-excel-workbook {
            min-height: 0;
        }

        .vbc-view-modal .voter-excel-tabs {
            overflow: hidden !important;
        }

        .vbc-toast-zone {
            top: auto;
            right: 10px;
            bottom: 74px;
            left: 10px;
            width: auto;
        }
    }

    @media (max-width: 440px) {
        .vbc-hero-stats,
        .vbc-permissions {
            grid-template-columns: 1fr;
        }

        .vbc-tabs button {
            flex: 1 0 auto;
        }
    }

    .uc-page {
        min-height: 100%;
        padding: 18px;
        color: #182235;
        background:
            linear-gradient(180deg, #eef4ff 0, rgba(238, 244, 255, 0) 280px),
            #f5f7fb;
    }

    .uc-hero,
    .uc-panel {
        border: 1px solid #d8e1ee;
        border-radius: 8px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 16px 36px rgba(24, 34, 53, .08);
    }

    .uc-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
        align-items: stretch;
        gap: 16px;
        margin-bottom: 16px;
        padding: 18px;
    }

    .uc-kicker {
        color: #0f6b6f;
        font-size: 12px;
        font-weight: 900;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    .uc-hero h1 {
        margin: 4px 0 6px;
        font-size: 30px;
        line-height: 1.1;
        letter-spacing: 0;
    }

    .uc-hero p {
        max-width: 620px;
        margin: 0;
        color: #64748b;
        font-size: 14px;
    }

    .uc-hero-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .uc-hero-stats div {
        display: grid;
        align-content: center;
        gap: 4px;
        min-height: 78px;
        padding: 12px;
        border-radius: 8px;
        border: 1px solid #e6ebf3;
        background: #f8fbff;
    }

    .uc-hero-stats span,
    .uc-panel-head span,
    .uc-page-label small,
    .uc-user-card small {
        color: #64748b;
        font-size: 12px;
    }

    .uc-hero-stats strong {
        font-size: 26px;
        line-height: 1;
    }

    .uc-grid {
        display: grid;
        grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
        gap: 16px;
        align-items: start;
    }

    .uc-panel {
        padding: 14px;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .uc-panel-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
    }

    .uc-panel-head h2 {
        margin: 0 0 3px;
        font-size: 18px;
        letter-spacing: 0;
    }

    .uc-panel-head button,
    .uc-toolbar button,
    .uc-actions button,
    .uc-message button {
        border: 0;
        border-radius: 8px;
        cursor: pointer;
        font-weight: 900;
        letter-spacing: 0;
    }

    .uc-panel-head > button {
        width: 40px;
        height: 40px;
        color: #0f6b6f;
        background: #e8f7f5;
    }

    .uc-search {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 8px;
        min-height: 42px;
        margin-bottom: 12px;
        padding: 0 12px;
        border: 1px solid #d8e1ee;
        border-radius: 8px;
        background: #fff;
    }

    .uc-search input {
        width: 100%;
        min-width: 0;
        border: 0;
        outline: none;
        background: transparent;
    }

    .uc-user-list,
    .uc-permission-list {
        display: grid;
        gap: 10px;
        max-height: calc(100dvh - 255px);
        overflow: auto;
        overflow-x: hidden;
        padding-right: 4px;
        overscroll-behavior: contain;
    }

    .uc-user-card {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        width: 100%;
        padding: 10px;
        border: 1px solid #e5ebf3;
        border-radius: 8px;
        background: #fff;
        text-align: left;
        cursor: pointer;
        transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
    }

    .uc-user-card:hover {
        transform: translateY(-1px);
        border-color: #9fd4cf;
    }

    .uc-user-card.active {
        border-color: #0f6b6f;
        background: #edfafa;
    }

    .uc-user-card span:last-child,
    .uc-page-label span {
        min-width: 0;
    }

    .uc-user-card strong,
    .uc-page-label strong {
        display: block;
        overflow-wrap: anywhere;
    }

    .uc-avatar {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        color: #fff;
        background: linear-gradient(135deg, #0f6b6f, #2563eb);
        font-weight: 900;
    }

    .uc-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .uc-actions button,
    .uc-toolbar button {
        min-height: 38px;
        padding: 0 12px;
    }

    .uc-primary {
        color: #fff;
        background: #2563eb;
    }

    .uc-secondary,
    .uc-toolbar button {
        color: #344054;
        background: #eef2f7;
    }

    .uc-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 2px 0 8px;
        background: linear-gradient(180deg, #fff 70%, rgba(255, 255, 255, 0));
    }

    .uc-group {
        display: grid;
        gap: 8px;
    }

    .uc-group h3 {
        margin: 8px 0 0;
        color: #344054;
        font-size: 13px;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    .uc-permission-row {
        display: grid;
        grid-template-columns: minmax(190px, 1fr) minmax(440px, auto);
        gap: 12px;
        align-items: center;
        min-width: 0;
        padding: 12px;
        border: 1px solid #e5ebf3;
        border-radius: 8px;
        background: #fff;
        transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
    }

    .uc-permission-row.enabled {
        border-color: #8bd4ce;
        background: #f1fbfa;
        box-shadow: inset 3px 0 0 #0f6b6f;
    }

    .uc-page-label {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        min-width: 0;
    }

    .uc-page-label i {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 8px;
        color: #2563eb;
        background: #eef4ff;
        text-align: center;
    }

    .uc-switches {
        display: grid;
        grid-template-columns: repeat(4, minmax(92px, 1fr));
        gap: 8px;
        justify-content: stretch;
        min-width: 0;
    }

    .uc-switches label {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-sizing: border-box;
        min-height: 38px;
        min-width: 0;
        padding: 0 12px;
        border: 1px solid #dce5ef;
        border-radius: 8px;
        background: #f8fafc;
        color: #344054;
        font-size: 12px;
        font-weight: 900;
        white-space: nowrap;
        cursor: pointer;
        user-select: none;
    }

    .uc-switches input {
        width: 17px;
        height: 17px;
        accent-color: #0f6b6f;
    }

    .uc-empty,
    .uc-access-denied {
        border-radius: 8px;
        padding: 14px;
        color: #64748b;
        background: #f8fafc;
    }

    .uc-access-denied {
        display: flex;
        align-items: center;
        gap: 12px;
        color: #991b1b;
        background: #fff7f6;
    }

    .uc-toast-zone {
        position: fixed;
        top: 72px;
        right: 16px;
        z-index: 1600;
        display: grid;
        gap: 8px;
        width: min(320px, calc(100vw - 24px));
        pointer-events: none;
    }

    .uc-message {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        min-height: 42px;
        padding: 9px 10px;
        border: 1px solid #d8e1ee;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 14px 30px rgba(15, 23, 42, .18);
        pointer-events: auto;
        animation: uc-toast-in .24s ease-out both;
        font-size: 13px;
        line-height: 1.25;
    }

    .uc-message span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .uc-message.success {
        color: #14532d;
        border-color: #86efac;
        background: #dcfce7;
        box-shadow: 0 14px 30px rgba(22, 101, 52, .16);
    }

    .uc-message.error {
        color: #991b1b;
        border-color: #fecaca;
        background: #fff7f6;
    }

    .uc-message button {
        width: 28px;
        height: 28px;
        color: inherit;
        background: rgba(15, 23, 42, .06);
    }

    @keyframes uc-toast-in {
        from {
            opacity: 0;
            transform: translate3d(18px, -8px, 0) scale(.98);
        }

        to {
            opacity: 1;
            transform: translate3d(0, 0, 0) scale(1);
        }
    }

    @media (max-width: 980px) {
        .uc-grid {
            grid-template-columns: 1fr;
        }

        .uc-hero {
            grid-template-columns: 1fr;
        }

        .uc-hero-stats {
            min-width: 0;
        }

        .uc-user-list {
            max-height: 280px;
        }

        .uc-permission-list {
            max-height: none;
            overflow: visible;
            padding-right: 0;
        }
    }

    @media (max-width: 640px) {
        .uc-page {
            padding: 10px;
            background: #f5f7fb;
        }

        .uc-hero,
        .uc-panel {
            box-shadow: 0 10px 24px rgba(24, 34, 53, .07);
        }

        .uc-hero {
            padding: 14px;
        }

        .uc-hero h1 {
            font-size: 25px;
        }

        .uc-hero-stats {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 6px;
        }

        .uc-hero-stats div {
            min-height: 66px;
            padding: 9px;
        }

        .uc-hero-stats strong {
            font-size: 22px;
        }

        .uc-panel {
            padding: 12px;
        }

        .uc-panel-head {
            display: grid;
            grid-template-columns: 1fr auto;
        }

        .uc-permission-panel .uc-panel-head {
            grid-template-columns: 1fr;
        }

        .uc-actions,
        .uc-actions button {
            width: 100%;
        }

        .uc-permission-row {
            grid-template-columns: 1fr;
            gap: 10px;
            padding: 11px;
        }

        .uc-switches {
            justify-content: stretch;
            min-width: 0;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .uc-switches label {
            width: 100%;
            min-width: 0;
            justify-content: space-between;
        }

        .uc-toast-zone {
            top: 70px;
            right: 10px;
            bottom: auto;
            left: auto;
            width: min(300px, calc(100vw - 20px));
        }
    }

    @media (max-width: 390px) {
        .uc-hero-stats {
            grid-template-columns: 1fr;
        }

        .uc-panel-head {
            grid-template-columns: 1fr;
        }

        .uc-panel-head > button {
            width: 100%;
        }
    }

    .uc-grid--manager {
        grid-template-columns: minmax(260px, 320px) minmax(440px, 1.2fr) minmax(280px, .9fr);
    }

    .uc-mini-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 12px;
    }

    .uc-mini-actions button,
    .uc-panel-link,
    .uc-delete {
        border: 0;
        border-radius: 8px;
        cursor: pointer;
        font-weight: 900;
        letter-spacing: 0;
    }

    .uc-mini-actions button {
        min-height: 36px;
        color: #344054;
        background: #eef2f7;
    }

    .uc-user-card {
        grid-template-columns: auto auto minmax(0, 1fr);
    }

    .uc-user-card input[type="checkbox"] {
        width: 17px;
        height: 17px;
        accent-color: #0f6b6f;
    }

    .uc-mini-pill {
        align-self: flex-start;
        padding: 7px 10px;
        border-radius: 999px;
        color: #0f6b6f;
        background: #e8f7f5;
        font-size: 12px;
        font-weight: 900;
        white-space: nowrap;
    }

    .uc-builder-actions {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #e5ebf3;
    }

    .uc-panel-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 36px;
        padding: 0 10px;
        color: #2563eb;
        background: #eef4ff;
        text-decoration: none;
        white-space: nowrap;
    }

    .uc-rule-list,
    .uc-access-list {
        display: grid;
        gap: 10px;
    }

    .uc-rule-list article,
    .uc-access-row {
        display: grid;
        gap: 10px;
        padding: 12px;
        border: 1px solid #e5ebf3;
        border-radius: 8px;
        background: #fff;
    }

    .uc-rule-main,
    .uc-access-main {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        min-width: 0;
    }

    .uc-rule-main strong,
    .uc-rule-main span,
    .uc-access-main strong,
    .uc-access-main small {
        display: block;
        overflow-wrap: anywhere;
    }

    .uc-rule-main span,
    .uc-access-main small {
        color: #64748b;
        font-size: 12px;
    }

    .uc-rule-flags {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .uc-rule-flags span {
        padding: 5px 8px;
        border-radius: 999px;
        color: #0f6b6f;
        background: #e8f7f5;
        font-size: 11px;
        font-weight: 900;
    }

    .uc-rule-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .uc-rule-actions button {
        min-height: 34px;
        padding: 0 10px;
    }

    .uc-delete {
        color: #b42318;
        background: #fff1f0;
    }

    .uc-list-page {
        padding-bottom: 32px;
    }

    .uc-access-list-panel {
        max-width: 1180px;
        margin: 0 auto;
    }

    .uc-list-head,
    .uc-list-tools {
        align-items: center;
    }

    .uc-list-tools {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 8px;
        width: min(520px, 100%);
    }

    .uc-search.compact {
        min-width: 0;
        margin-bottom: 0;
    }

    .uc-list-tools button {
        width: 44px;
        min-width: 44px;
        padding: 0;
    }

    .uc-access-list .uc-rule-actions .uc-secondary {
        border: 0;
    }

    .uc-access-row {
        grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr) auto;
        align-items: center;
    }

    @media (max-width: 1320px) {
        .uc-grid--manager {
            grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
        }

        .uc-current-panel {
            grid-column: 1 / -1;
        }

        .uc-builder-panel .uc-permission-row {
            grid-template-columns: 1fr;
            align-items: stretch;
        }

        .uc-builder-panel .uc-switches {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            justify-content: stretch;
        }

        .uc-builder-panel .uc-switches label {
            min-width: 0;
            width: 100%;
        }

        .uc-builder-panel .uc-permission-list {
            max-height: min(560px, calc(100dvh - 280px));
            overflow: auto;
            padding-right: 4px;
        }
    }

    @media (max-width: 980px) {
        .uc-grid--manager,
        .uc-access-row {
            grid-template-columns: 1fr;
        }

        .uc-list-tools {
            width: 100%;
        }

        .uc-list-tools .uc-search {
            width: 100%;
        }
    }

    @media (max-width: 1120px) {
        .uc-grid--manager {
            grid-template-columns: 1fr;
        }

        .uc-users-panel,
        .uc-builder-panel,
        .uc-current-panel {
            grid-column: auto;
        }

        .uc-user-list {
            max-height: 320px;
        }
    }

    @media (max-width: 640px) {
        .uc-mini-actions {
            grid-template-columns: 1fr;
        }

        .uc-user-card {
            grid-template-columns: auto auto minmax(0, 1fr);
        }

        .uc-rule-actions,
        .uc-rule-actions button,
        .uc-panel-link {
            width: 100%;
        }

        .uc-panel-link {
            justify-content: center;
        }
    }

    @media (max-width: 760px) {
        .uc-permission-row {
            grid-template-columns: 1fr;
        }

        .uc-switches,
        .uc-builder-panel .uc-switches {
            justify-content: stretch;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .uc-switches label,
        .uc-builder-panel .uc-switches label {
            min-width: 0;
            width: 100%;
            padding: 0 10px;
        }

        .uc-builder-panel .uc-permission-list {
            max-height: min(520px, calc(100dvh - 300px));
            overflow: auto;
            padding-right: 4px;
        }
    }

    @media (max-width: 380px) {
        .uc-switches,
        .uc-builder-panel .uc-switches {
            grid-template-columns: 1fr;
        }
    }

    /* User Control visual refresh */
    .uc-page {
        padding: 20px;
        background:
            linear-gradient(180deg, #edf4ff 0, #f7f9fd 260px),
            #f7f9fd;
    }

    .uc-hero {
        grid-template-columns: 1fr;
        gap: 16px;
        border: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .uc-hero > div:first-child {
        display: none;
    }

    .uc-hero-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }

    .uc-hero-stats .uc-stat-card {
        position: relative;
        display: grid;
        align-content: start;
        min-height: 102px;
        overflow: hidden;
        border: 0;
        border-radius: 8px;
        padding: 16px;
        color: #fff;
        box-shadow: 0 16px 34px rgba(42, 73, 128, .14);
    }

    .uc-hero-stats .uc-stat-card::after {
        content: "";
        position: absolute;
        right: -22px;
        bottom: -28px;
        width: 96px;
        height: 96px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .18);
    }

    .uc-hero-stats .uc-stat-card span,
    .uc-hero-stats .uc-stat-card small {
        color: rgba(255, 255, 255, .88);
        font-size: 12px;
    }

    .uc-hero-stats .uc-stat-card strong {
        margin: 6px 0 8px;
        color: #fff;
        font-size: 28px;
        line-height: 1;
    }

    .uc-hero-stats .uc-stat-card > i {
        position: absolute;
        top: 18px;
        right: 18px;
        color: rgba(255, 255, 255, .9);
        font-size: 22px;
    }

    .uc-hero-stats .uc-stat-users {
        background: linear-gradient(135deg, #7057ff, #5b6ef5);
    }

    .uc-hero-stats .uc-stat-access {
        background: linear-gradient(135deg, #24a8f2, #347cf5);
    }

    .uc-hero-stats .uc-stat-selected {
        background: linear-gradient(135deg, #37c98b, #2abfba);
    }

    .uc-hero-stats .uc-stat-roles {
        background: linear-gradient(135deg, #ffe3ad, #ffc365);
        color: #1f2937 !important;
    }

    .uc-hero-stats .uc-stat-roles span,
    .uc-hero-stats .uc-stat-roles small,
    .uc-hero-stats .uc-stat-roles strong,
    .uc-hero-stats .uc-stat-roles > i {
        color: #1f2937;
    }

    .uc-grid--manager {
        grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
        align-items: start;
    }

    .uc-current-panel {
        grid-column: 1 / -1;
    }

    .uc-panel {
        border-color: #e6ebf3;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 14px 34px rgba(24, 34, 53, .08);
    }

    .uc-panel-head h2 {
        font-size: 17px;
    }

    .uc-panel-head > button {
        color: #276ef1;
        background: #eef4ff;
    }

    .uc-search {
        min-height: 44px;
        border-color: #d9e3f0;
        background: #fff;
    }

    .uc-mini-actions button,
    .uc-toolbar button,
    .uc-secondary {
        color: #344054;
        background: #f0f4f9;
    }

    .uc-mini-actions button:first-child,
    .uc-toolbar button:first-child {
        color: #4f46e5;
        background: #f2f1ff;
    }

    .uc-mini-actions button:last-child {
        color: #dc2626;
        border: 1px solid #fecaca;
        background: #fff7f7;
    }

    .uc-primary {
        background: linear-gradient(135deg, #4f8df7, #6d45f3);
        box-shadow: 0 10px 18px rgba(79, 70, 229, .18);
    }

    .uc-user-card {
        min-height: 64px;
        border-color: #e8eef6;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .035);
    }

    .uc-user-card.active {
        border-color: #8b5cf6;
        background: #fbfaff;
    }

    .uc-avatar {
        background: linear-gradient(135deg, #7c3aed, #1d7ef2);
        color: #fff !important;
        line-height: 1;
        text-align: center;
        flex: 0 0 auto;
        overflow: hidden;
    }

    .uc-rule-main .uc-avatar,
    .uc-access-main .uc-avatar {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        align-self: center;
    }

    .uc-builder-panel .uc-permission-list {
        max-height: min(640px, calc(100dvh - 305px));
        overflow: auto;
        overflow-x: hidden;
        padding-right: 4px;
    }

    .uc-permission-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
        border-color: #e8eef6;
        background: #fff;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .035);
    }

    .uc-permission-row.enabled {
        border-color: #d9d0ff;
        background: #fff;
        box-shadow: 0 8px 18px rgba(79, 70, 229, .07);
    }

    .uc-page-label i {
        color: #5b6ef5;
        background: #eff3ff;
    }

    .uc-switches,
    .uc-builder-panel .uc-switches {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .uc-switches label,
    .uc-builder-panel .uc-switches label {
        justify-content: center;
        min-height: 40px;
        border-color: #edf1f7;
        background: #fff;
        box-shadow: 0 4px 12px rgba(15, 23, 42, .035);
    }

    .uc-switches label.disabled,
    .uc-builder-panel .uc-switches label.disabled {
        color: #94a3b8;
        border-color: #e5e7eb;
        background: #f3f4f6;
        box-shadow: none;
        cursor: not-allowed;
        opacity: .72;
    }

    .uc-switches label.disabled i,
    .uc-builder-panel .uc-switches label.disabled i {
        color: #94a3b8 !important;
    }

    .uc-switches label:nth-child(1) i {
        color: #475569;
    }

    .uc-switches label:nth-child(2) i {
        color: #16a34a;
    }

    .uc-switches label:nth-child(3) i {
        color: #2563eb;
    }

    .uc-switches label:nth-child(4) i {
        color: #dc2626;
    }

    .uc-rule-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: 260px;
        overflow: auto;
        padding-right: 4px;
    }

    .uc-rule-list article {
        min-width: 0;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
    }

    .uc-rule-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .uc-rule-actions button {
        justify-content: center;
        border: 1px solid #dbe4f0;
        background: #fff;
    }

    .uc-rule-actions .uc-secondary {
        border-color: #cbd5e1;
        color: #1f2937;
        background: #fff;
    }

    .uc-access-list .uc-rule-actions .uc-secondary {
        border: 1px solid #cbd5e1;
        color: #1f2937;
        background: #fff;
    }

    .uc-rule-actions .uc-delete {
        border-color: #fecaca;
        color: #dc2626;
        background: #fff;
    }

    .uc-list-page .uc-hero {
        max-width: 1440px;
        margin: 0 auto 16px;
    }

    .uc-list-page .uc-access-list-panel {
        max-width: 1440px;
        border: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .uc-list-page .uc-list-head {
        align-items: center;
        padding: 16px;
        border: 1px solid #e6ebf3;
        border-radius: 8px;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 14px 34px rgba(24, 34, 53, .08);
    }

    .uc-list-page .uc-list-tools {
        width: min(620px, 100%);
    }

    .uc-list-page .uc-access-list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        margin-top: 14px;
    }

    .uc-list-page .uc-access-row {
        grid-template-columns: 1fr;
        align-items: stretch;
        min-width: 0;
        gap: 12px;
        padding: 14px;
        border-color: #e8eef6;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 12px 28px rgba(24, 34, 53, .07);
    }

    .uc-list-page .uc-rule-flags {
        min-height: 30px;
    }

    .uc-list-page .uc-rule-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .uc-list-page .uc-rule-actions button {
        min-height: 38px;
    }

    @media (max-width: 1220px) {
        .uc-hero-stats {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .uc-grid--manager {
            grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
        }

        .uc-rule-list {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .uc-list-page .uc-access-list {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (max-width: 860px) {
        .uc-grid--manager {
            grid-template-columns: 1fr;
        }

        .uc-users-panel,
        .uc-builder-panel,
        .uc-current-panel {
            grid-column: auto;
        }

        .uc-builder-panel .uc-permission-list {
            max-height: min(560px, calc(100dvh - 290px));
        }

        .uc-rule-list {
            grid-template-columns: 1fr;
            max-height: 360px;
        }

        .uc-list-page .uc-access-list {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 640px) {
        .uc-page {
            padding: 10px;
        }

        .uc-hero {
            margin-bottom: 10px;
        }

        .uc-hero-stats {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .uc-hero-stats .uc-stat-card {
            min-height: 88px;
            padding: 12px;
        }

        .uc-hero-stats .uc-stat-card strong {
            font-size: 24px;
        }

        .uc-hero-stats .uc-stat-card > i {
            top: 14px;
            right: 14px;
            font-size: 18px;
        }

        .uc-panel {
            padding: 12px;
        }

        .uc-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .uc-actions button {
            width: 100%;
        }

        .uc-toolbar {
            position: static;
        }

        .uc-switches,
        .uc-builder-panel .uc-switches {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .uc-switches label,
        .uc-builder-panel .uc-switches label {
            justify-content: center;
            gap: 6px;
            padding: 0 8px;
        }

        .uc-list-page .uc-list-head {
            display: grid;
            grid-template-columns: 1fr;
            gap: 12px;
            padding: 12px;
        }

        .uc-list-page .uc-list-tools {
            grid-template-columns: minmax(0, 1fr) 44px;
            width: 100%;
        }
    }

    @media (max-width: 420px) {
        .uc-hero-stats {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .uc-hero-stats .uc-stat-card {
            min-height: 84px;
            padding: 11px;
        }

        .uc-hero-stats .uc-stat-card span,
        .uc-hero-stats .uc-stat-card small {
            font-size: 11px;
        }

        .uc-hero-stats .uc-stat-card strong {
            font-size: 22px;
        }

        .uc-panel-head {
            grid-template-columns: 1fr auto;
        }

        .uc-permission-panel .uc-panel-head {
            grid-template-columns: 1fr;
        }

        .uc-mini-actions {
            grid-template-columns: 1fr;
        }

        .uc-rule-actions {
            grid-template-columns: 1fr;
        }
    }

    .uc-page,
    .uc-page h1,
    .uc-page h2,
    .uc-page h3,
    .uc-page strong,
    .uc-page small,
    .uc-page span,
    .uc-page p,
    .uc-page button,
    .uc-page input,
    .uc-page label,
    .uc-page a {
        font-weight: 500 !important;
    }

/* Location master view popup */
.master-view-modal {
    width: min(640px, calc(100vw - 28px));
    max-width: 640px;
    max-height: calc(100dvh - 24px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(32, 45, 73, .22);
}

.master-view-modal .modal-body {
    padding: 0;
    max-height: none;
    overflow: visible;
}

.master-view-modal .modal-footer {
    display: none;
}

.master-view-head {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 16px;
    min-height: 86px;
    padding: 16px 22px;
    background: linear-gradient(100deg, #74d6ef 0%, #a9c2ff 58%, #f0c6ff 100%);
}

.master-view-head-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 50%;
    color: #3478f6;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(38, 91, 175, .18);
    font-size: 24px;
}

.master-view-head h3 {
    margin: 0 0 4px;
    color: #071223;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.05;
}

.master-view-head p {
    margin: 0;
    color: rgba(7, 18, 35, .58);
    font-size: 14px;
    font-weight: 600;
}

.master-view-close {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #7c3dd5;
    background: rgba(255, 255, 255, .62);
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.master-view-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 22px;
    background: #ffffff;
}

.master-view-info {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.master-view-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 12px 14px;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(27, 39, 64, .04);
}

.master-view-card > div:last-child {
    display: grid;
    grid-template-columns: minmax(120px, .42fr) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.master-view-card-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 11px;
    font-size: 24px;
}

.master-view-card label {
    display: block;
    margin: 0;
    color: #626874;
    font-size: 13px;
    font-weight: 700;
}

.master-view-card strong {
    display: block;
    min-width: 0;
    color: #1c2535;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.2;
    text-align: right;
    overflow-wrap: anywhere;
}

.master-view-card-id .master-view-card-icon {
    color: #2277f6;
    background: #eaf6ff;
}

.master-view-card-id strong {
    color: #2f80ed;
}

.master-view-card-hi .master-view-card-icon {
    color: #40a656;
    background: #eaffeb;
}

.master-view-card-hi strong {
    color: #3f874b;
}

.master-view-card-en .master-view-card-icon {
    color: #ff9f1a;
    background: #fff7df;
}

.master-view-card-en strong {
    color: #ff8126;
}

.master-view-card-district .master-view-card-icon {
    color: #8b2ff7;
    background: #f5e9ff;
}

.master-view-card-type .master-view-card-icon {
    color: #16a3a8;
    background: #e8fbfb;
}

@media (max-width: 680px) {
    .master-view-modal {
        width: min(96vw, 640px);
    }

    .master-view-head {
        grid-template-columns: 48px minmax(0, 1fr) 38px;
        gap: 12px;
        min-height: 76px;
        padding: 14px 16px;
    }

    .master-view-head-icon {
        width: 48px;
        height: 48px;
        font-size: 21px;
    }

    .master-view-head h3 {
        font-size: 19px;
    }

    .master-view-head p {
        font-size: 12px;
    }

    .master-view-close {
        width: 34px;
        height: 34px;
        font-size: 24px;
    }

    .master-view-body {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
        max-height: calc(100dvh - 104px);
        overflow-y: auto;
    }

    .master-view-card {
        grid-template-columns: 54px minmax(0, 1fr);
        min-height: 72px;
    }

    .master-view-card > div:last-child {
        display: block;
    }

    .master-view-card label {
        margin: 0 0 6px;
    }

    .master-view-card strong {
        text-align: left;
    }

    .master-view-card strong {
        font-size: 17px;
    }
}
/* Village Level Voter Control */
.vvc-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 96px;
    color: #172033;
}

.vvc-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, #e8f7ff 0%, #f3e7ff 48%, #fff7df 100%);
    box-shadow: 0 18px 45px rgba(35, 91, 169, 0.13);
    border: 1px solid rgba(42, 117, 255, 0.12);
    margin-bottom: 18px;
}

.vvc-hero-dashboard {
    background: linear-gradient(135deg, #e8fff2 0%, #eaf1ff 50%, #fff1e4 100%);
}

.vvc-kicker {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 8px;
}

.vvc-hero h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    color: #08111f;
    font-weight: 900;
}

.vvc-hero p {
    margin: 7px 0 0;
    color: #5b6475;
    font-weight: 600;
}

.vvc-hero-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.vvc-primary-btn,
.vvc-ghost-btn,
.vvc-clear-btn,
.vvc-save-btn {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.vvc-primary-btn {
    background: linear-gradient(135deg, #1677ff, #7c3aed);
    color: #fff;
    box-shadow: 0 12px 25px rgba(79, 70, 229, .22);
}

.vvc-clear-btn {
    background: #fff;
    color: #475569;
    border: 1px solid #dbe4f0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .07);
}

.vvc-ghost-btn {
    background: rgba(255, 255, 255, .72);
    color: #1e3a8a;
    border: 1px solid rgba(37, 99, 235, .18);
}

.vvc-save-btn {
    min-height: 38px;
    background: #0f172a;
    color: #fff;
}

.vvc-primary-btn:disabled,
.vvc-clear-btn:disabled,
.vvc-save-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.vvc-filter-panel {
    display: grid;
    grid-template-columns: 190px minmax(240px, 1fr) auto;
    gap: 12px;
    align-items: end;
    background: #fff;
    border: 1px solid #e1e8f5;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.vvc-filter-panel-flow {
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) auto;
}

.vvc-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.vvc-stepper span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dbe5f2;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.vvc-stepper span.active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.vvc-stepper span.done {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

.vvc-filter-panel label,
.vvc-vote-grid label {
    display: grid;
    gap: 6px;
}

.vvc-filter-panel span,
.vvc-vote-grid span {
    font-size: 12px;
    color: #000000;
    font-weight: 700;
}

.vvc-filter-panel input,
.vvc-filter-panel select,
.vvc-search-row input,
.vvc-vote-grid input {
    width: 100%;
    border: 1px solid #d7e1ef;
    border-radius: 12px;
    min-height: 42px;
    padding: 0 12px;
    color: #172033;
    background: #fbfdff;
    outline: none;
}

.vvc-lookup-trigger {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d7e1ef;
    border-radius: 12px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #172033;
    background: #fbfdff;
    text-align: left;
    cursor: pointer;
}

.vvc-lookup-trigger:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
    outline: none;
}

.vvc-lookup-trigger:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.vvc-lookup-trigger span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
}

.vvc-lookup-trigger i {
    flex: 0 0 auto;
    color: #0f172a;
    font-size: 12px;
}

.vvc-filter-panel input:focus,
.vvc-filter-panel select:focus,
.vvc-search-row input:focus,
.vvc-vote-grid input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.vvc-mini-summary,
.vvc-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.vvc-mini-summary span,
.vvc-summary-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.vvc-mini-summary b,
.vvc-summary-card strong {
    color: #2563eb;
}

.vvc-summary-card {
    display: grid;
    gap: 8px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    appearance: none;
    font-family: inherit;
}

.vvc-summary-card:hover,
.vvc-summary-card.active {
    border-color: #3b82f6;
    box-shadow: 0 10px 26px rgba(37, 99, 235, .16);
}

.vvc-summary-card.active {
    background: #f8fbff;
}

.vvc-summary-card span {
    color: #637083;
    font-weight: 800;
    font-size: 13px;
}

.vvc-summary-card strong {
    font-size: 30px;
    line-height: 1;
}

.vvc-summary-card.support strong { color: #16a34a; }
.vvc-summary-card.opposition strong { color: #ef4444; }
.vvc-summary-card.follow strong { color: #7c3aed; }

.vvc-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e1e8f5;
    border-radius: 16px;
    padding: 0 14px;
    margin-bottom: 14px;
}

.vvc-search-row i {
    color: #64748b;
}

.vvc-search-row input {
    border: 0;
    box-shadow: none;
    padding-left: 0;
    background: transparent;
    outline: none;
}

.vvc-search-row input:focus {
    border-color: transparent;
    box-shadow: none;
    outline: none;
}

.vvc-voter-grid,
.vvc-dashboard-list {
    display: grid;
    gap: 14px;
}

.vvc-flow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    gap: 14px;
}

.vvc-panel {
    background: #fff;
    border: 1px solid #e1e8f5;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.vvc-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.vvc-panel-head span {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.vvc-panel-head h3 {
    margin: 3px 0 0;
    font-size: 18px;
    font-weight: 900;
}

.vvc-search-row-inline {
    width: min(320px, 100%);
    margin: 0;
}

.vvc-auto-selected-note {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 11px 13px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 800;
}

.vvc-auto-selected-note > i {
    color: #2563eb;
    flex: 0 0 auto;
}

.vvc-auto-selected-note span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvc-auto-selected-note b {
    color: #0f172a;
    font-weight: 900;
}

.vvc-auto-selected-note button {
    width: 38px;
    height: 34px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 12px;
    background: #4f46e5;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(79, 70, 229, .18);
}

.vvc-auto-selected-note button:disabled {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}

.vvc-select-list {
    display: grid;
    gap: 9px;
    max-height: 620px;
    overflow: auto;
    padding-right: 4px;
}

.vvc-select-row {
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    cursor: pointer;
}

.vvc-select-row > span {
    min-width: 0;
    flex: 1 1 auto;
}

.vvc-select-row.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.vvc-select-row strong,
.vvc-select-row small,
.vvc-select-row em {
    display: block;
}

.vvc-select-row strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvc-select-row small {
    color: #64748b;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvc-select-row > em {
    white-space: nowrap;
    font-style: normal;
    background: #fff;
    color: #2563eb;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
}

.vvc-voter-detail-grid {
    display: grid;
/*    grid-template-columns: repeat(2, minmax(0, 1fr));*/
/*    gap: 4px 10px;*/
    margin-top: 7px;
    min-width: 0;
}

.vvc-voter-detail-grid span {
    min-width: 0;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvc-voter-detail-grid b {
    color: #1e40af;
    font-weight: 900;
}

.vvc-voter-detail-grid .vvc-voter-relative {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vvc-voter-detail-grid .vvc-voter-relative b {
    flex: 0 0 auto;
}

.vvc-voter-detail-grid .vvc-voter-relative em {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
}

.vvc-selected-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.vvc-selected-box span {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.vvc-selected-box i {
    color: #2563eb;
}

.vvc-voter-list-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #dbe5f2;
    background: #f8fbff;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.vvc-voter-list-bar span,
.vvc-voter-list-bar strong {
    display: block;
}

.vvc-voter-list-bar span {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.vvc-voter-list-bar strong {
    margin-top: 2px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.vvc-voter-list-bar button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #4f46e5;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(79, 70, 229, .22);
}

.vvc-selected-voter-pop {
    display: grid;
    gap: 8px;
    max-height: 240px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    margin: -4px 0 14px;
}

.vvc-selected-voter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #edf2f7;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 12px;
}

.vvc-selected-voter-row strong,
.vvc-selected-voter-row small {
    display: block;
}

.vvc-selected-voter-row strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
}

.vvc-selected-voter-row small {
    color: #64748b;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
}

.vvc-selected-voter-row button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: #fff1f2;
    color: #ef4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vvc-status-pills-large button {
    padding: 10px 14px;
}

.vvc-remark {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.vvc-count-rule {
    margin: 10px 0 4px;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
}

.vvc-count-rule.ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.vvc-count-rule.warn {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.vvc-remark span {
    color: #5f6b7a;
    font-size: 12px;
    font-weight: 900;
}

.vvc-remark textarea {
    width: 100%;
    border: 1px solid #d7e1ef;
    border-radius: 12px;
    padding: 12px;
    outline: none;
    resize: vertical;
    background: #fbfdff;
}

.vvc-remark textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.vvc-voter-card,
.vvc-village-card {
    background: #fff;
    border: 1px solid #e1e8f5;
    border-left: 5px solid #94a3b8;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.vvc-voter-card.is-support { border-left-color: #22c55e; }
.vvc-voter-card.is-opposition { border-left-color: #ef4444; }
.vvc-voter-card.is-neutral { border-left-color: #f59e0b; }
.vvc-voter-card.is-follow { border-left-color: #8b5cf6; }
.vvc-voter-card.is-undecided { border-left-color: #64748b; }

.vvc-voter-top,
.vvc-village-head,
.vvc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vvc-village-head > div:first-child {
    min-width: 0;
}

.vvc-voter-top h3,
.vvc-village-head h3 {
    margin: 0;
    font-size: 17px;
    color: #07111f;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvc-voter-top p,
.vvc-village-head span {
    margin: 4px 0 0;
    color: #64748b;
    font-weight: 700;
}

.vvc-voter-top > span {
    white-space: nowrap;
    padding: 8px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
}

.vvc-voter-meta,
.vvc-village-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.vvc-voter-meta span,
.vvc-village-stats span {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #475569;
    background: #f8fafc;
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.vvc-voter-meta i {
    color: #2563eb;
}

.vvc-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.vvc-status-pills button {
    border: 1px solid #dbe5f2;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    cursor: pointer;
}

.vvc-status-pills button.active {
    background: #172033;
    border-color: #172033;
    color: #fff;
}

.vvc-vote-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.vvc-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: #334155;
    font-weight: 800;
}

.vvc-card-footer .vvc-save-btn {
    margin-top: 14px;
}

.vvc-message {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 800;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
}

.vvc-message.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.vvc-message.error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #dc2626;
}

.vvc-toast {
    position: fixed;
    top: 74px;
    right: 22px;
    z-index: 2200;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: min(420px, calc(100vw - 28px));
    border-radius: 14px;
    padding: 13px 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .2);
    animation: vvcToastIn .24s ease-out both;
}

.vvc-toast.success {
    background: #15803d;
}

.vvc-toast.error {
    background: #dc2626;
}

.vvc-toast.closing {
    animation: vvcToastOut .22s ease-in both;
}

.vvc-alert-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2350;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .42);
}

.vvc-alert-modal {
    width: min(360px, 100%);
    border-radius: 20px;
    background: #fff;
    padding: 24px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
}

.vvc-alert-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 24px;
}

.vvc-alert-modal h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 900;
}

.vvc-alert-modal p {
    margin: 0 0 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.vvc-alert-modal strong {
    display: block;
    color: #111827;
    font-size: 16px;
    font-weight: 900;
}

.vvc-alert-modal button {
    width: 100%;
    min-height: 42px;
    margin-top: 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #1677ff, #7c3aed);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.vvc-pdf-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
}

.vvc-pdf-modal {
    width: min(980px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
}

.vvc-auto-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
}

.vvc-auto-popup-modal {
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
}

.vvc-lookup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2520;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .42);
}

.vvc-lookup-modal {
    width: min(470px, 100%);
    max-height: min(540px, calc(100vh - 36px));
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .26);
}

.vvc-lookup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.vvc-lookup-head h3 {
    margin: 0;
    color: #1f2937;
    font-size: 25px;
    font-weight: 700;
}

.vvc-lookup-head button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
}

.vvc-lookup-search {
    padding: 16px 16px 12px;
}

.vvc-lookup-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfd6df;
    border-radius: 7px;
    padding: 0 10px;
    font-size: 14px;
    color: #111827;
    outline: none;
}

.vvc-lookup-search input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.vvc-lookup-list {
    margin: 0 16px 16px;
    border: 1px solid #dbe4ef;
    border-radius: 6px;
    overflow: auto;
    background: #fff;
}

.vvc-lookup-list button {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-bottom: 1px solid #edf2f7;
    background: #fff;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.vvc-lookup-list button:last-child {
    border-bottom: 0;
}

.vvc-lookup-list button:hover,
.vvc-lookup-list button.active {
    background: #eff6ff;
    color: #1d4ed8;
}

.vvc-lookup-list button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvc-lookup-list button i {
    flex: 0 0 auto;
    color: #2563eb;
}

.vvc-lookup-empty {
    padding: 18px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.vvc-auto-popup-list {
    display: grid;
    gap: 10px;
    padding: 16px;
    overflow: auto;
}

.vvc-auto-voter-card {
    min-width: 420px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 12px;
    border: 2px solid #2563eb;
    border-radius: 14px;
    background: #f8fbff;
    padding: 12px;
}

.vvc-auto-voter-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #2563eb;
    font-size: 17px;
}

.vvc-auto-voter-info {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.vvc-auto-voter-info strong,
.vvc-auto-voter-info small,
.vvc-auto-voter-info span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvc-auto-voter-info strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.vvc-auto-voter-info small,
.vvc-auto-voter-info span {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.vvc-auto-voter-info b {
    color: #1e40af;
    font-weight: 900;
}

.vvc-auto-voter-check {
    color: #2563eb;
    font-size: 16px;
    justify-self: center;
}

.vvc-pdf-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 22px;
    background: linear-gradient(135deg, #e0f2fe, #eef2ff 50%, #fff7ed);
}

.vvc-pdf-head span {
    display: block;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.vvc-pdf-head h3 {
    margin: 4px 0;
    color: #0f172a;
    font-size: 24px;
    font-weight: 900;
}

.vvc-pdf-head p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.vvc-pdf-head button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, .75);
    color: #475569;
    font-size: 16px;
}

.vvc-pdf-table-wrap {
    flex: 1 1 auto;
    overflow: auto;
    padding: 16px;
    background: #f8fafc;
}

.vvc-pdf-preview-table {
    width: 100%;
    min-width: 840px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
    color: #111827;
    font-size: 12px;
}

.vvc-pdf-preview-table th,
.vvc-pdf-preview-table td {
    border: 1px solid #cbd5e1;
    padding: 8px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.vvc-pdf-preview-table th {
    background: #eef2ff;
    color: #1e293b;
    font-weight: 900;
}

.vvc-print-checkbox {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #111827;
    border-radius: 3px;
    background: #fff;
}

.vvc-pdf-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

@keyframes vvcToastIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes vvcToastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.vvc-empty {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    padding: 28px;
    text-align: center;
    color: #64748b;
    font-weight: 800;
}

.vvc-village-head button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
}

.vvc-control-card {
    border-left-color: #94a3b8;
}

.vvc-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.vvc-card-actions-bottom {
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #edf2f7;
}

.vvc-card-actions button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vvc-card-actions .view {
    background: #ede9fe;
    color: #6d28d9;
}

.vvc-card-actions .vote-done {
    background: #ecfdf5;
    color: #16a34a;
}

.vvc-card-actions .download {
    background: #ecfeff;
    color: #0891b2;
}

.vvc-card-actions .edit {
    background: #eff6ff;
    color: #2563eb;
}

.vvc-card-actions .delete {
    background: #fff1f2;
    color: #ef4444;
}

.vvc-control-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.vvc-control-meta span {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #475569;
    background: #f8fafc;
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.vvc-control-meta i {
    color: #2563eb;
}

.vvc-view-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .42);
}

.vvc-view-modal {
    width: min(680px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
    padding: 18px;
}

.vvc-view-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.vvc-view-head span {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.vvc-view-head h3 {
    margin: 3px 0 0;
    font-size: 20px;
    font-weight: 900;
}

.vvc-view-head button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    color: #334155;
}

.vvc-view-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.vvc-view-grid div,
.vvc-view-voters {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
}

.vvc-view-grid span,
.vvc-view-voters span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.vvc-view-grid strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.vvc-view-inline-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.vvc-view-inline-action strong {
    margin-top: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.vvc-view-inline-action button {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6d28d9;
    background: #ede9fe;
    cursor: pointer;
}

.vvc-view-inline-action button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.vvc-view-voters {
    margin-top: 10px;
}

.vvc-view-voters p {
    margin: 6px 0 0;
    color: #0f172a;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.vvc-view-voter-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.vvc-view-voter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.vvc-view-voter-row strong {
    min-width: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.vvc-view-voter-row strong span {
    display: inline;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.vvc-view-voter-row strong b {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.vvc-view-voter-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.vvc-view-voter-text small {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.vvc-view-voter-row button {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6d28d9;
    background: #ede9fe;
    cursor: pointer;
}

.vvc-vote-done-modal {
    width: min(760px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
    padding: 18px;
}

.vvc-vote-done-list {
    display: grid;
    gap: 10px;
}

.vvc-vote-done-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
/*    gap: 12px;*/
    align-items: center;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #f8fafc;
/*    padding: 12px;*/
}

.vvc-vote-done-info {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
}

.vvc-vote-done-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #2563eb;
    font-size: 17px;
}

.vvc-vote-done-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.vvc-vote-done-text strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.vvc-vote-done-text small,
.vvc-vote-done-text span {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.vvc-vote-done-text strong,
.vvc-vote-done-text small,
.vvc-vote-done-text span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vvc-vote-done-checks {
    display: grid;
    grid-template-columns: repeat(2, 74px);
    gap: 8px;
}

.vvc-vote-done-checks label {
    height: 40px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.vvc-vote-done-checks input {
    width: 14px;
    height: 14px;
    accent-color: #2563eb;
}

.vvc-vote-done-checks label.yes.active {
    border-color: #86efac;
    background: #dcfce7;
    color: #15803d;
}

.vvc-vote-done-checks label.no.active {
    border-color: #fecaca;
    background: #fef2f2;
    color: #dc2626;
}

.vvc-meter {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin: 12px 0;
}

.vvc-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #2563eb);
}

@media (max-width: 860px) {
    .vvc-page {
        padding: 14px 10px 84px;
    }

    .vvc-hero,
    .vvc-filter-panel,
    .vvc-voter-top,
    .vvc-card-footer,
    .vvc-village-head {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .vvc-summary-grid,
    .vvc-mini-summary,
    .vvc-voter-meta,
    .vvc-village-stats,
    .vvc-vote-grid,
    .vvc-stepper,
    .vvc-flow-grid,
    .vvc-selected-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vvc-flow-grid {
        grid-template-columns: 1fr;
    }

    .vvc-control-meta,
    .vvc-view-grid {
        grid-template-columns: 1fr;
    }

    .vvc-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .vvc-auto-popup-backdrop {
        align-items: center;
        padding: 12px;
    }

    .vvc-auto-popup-list {
        max-height: calc(100vh - 190px);
        overflow: auto;
    }

    .vvc-search-row-inline {
        width: 100%;
    }

    .vvc-hero-actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .vvc-hero-actions .vvc-primary-btn {
        min-width: 0;
    }

    .vvc-hero-actions .vvc-clear-btn {
        min-width: 44px;
        padding: 0 12px;
    }

    .vvc-hero-actions .vvc-clear-btn span {
        display: none;
    }

    .vvc-control-card .vvc-village-head {
        align-items: flex-start;
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }

    .vvc-control-card .vvc-village-head > div:first-child {
        min-width: 0;
    }

    .vvc-control-card .vvc-village-head h3 {
        max-width: 145px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .vvc-control-card .vvc-card-actions {
        flex: 0 0 auto;
        gap: 6px;
        margin-left: auto;
    }

    .vvc-control-card .vvc-card-actions button {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 12px;
    }

    .vvc-control-card {
        display: flex;
        flex-direction: column;
    }

    .vvc-control-card .vvc-village-head {
        order: 1;
    }

    .vvc-control-card .vvc-control-meta {
        order: 2;
    }

    .vvc-control-card .vvc-village-stats {
        order: 3;
    }

    .vvc-control-card .vvc-card-actions-bottom {
        order: 4;
        width: 100%;
        justify-content: flex-end;
        margin: 12px 0 0;
    }

    .vvc-hero h2 {
        font-size: 24px;
    }

    .vvc-vote-done-card {
        grid-template-columns: 1fr;
    }

    .vvc-vote-done-grid {
/*        grid-template-columns: repeat(2, minmax(0, 1fr));*/
    }

    .vvc-vote-done-checks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .vvc-summary-grid,
    .vvc-mini-summary,
    .vvc-voter-meta,
    .vvc-village-stats {
        grid-template-columns: 1fr;
    }

    .vvc-vote-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vvc-stepper,
    .vvc-selected-box {
        grid-template-columns: 1fr;
    }

    .vvc-control-card .vvc-card-actions button {
        width: 50px;
        height: 30px;
    }

    .vvc-control-card .vvc-card-actions-bottom {
        justify-content: space-between;
        gap: 5px;
    }

    .vvc-control-card .vvc-village-head h3 {
        max-width: 118px;
    }

    .vvc-auto-selected-note {
        padding: 9px 10px;
        gap: 8px;
        font-size: 12px;
    }

    .vvc-auto-selected-note button {
        width: 34px;
        height: 32px;
    }

    .vvc-auto-voter-card {
        min-width: 360px;
        grid-template-columns: 38px minmax(0, 1fr) 26px;
        gap: 10px;
        padding: 10px;
    }

    .vvc-auto-voter-icon {
        width: 38px;
        height: 38px;
    }
}
.vvd-filter-panel {
    position: relative;
    padding-top: 42px;
}

.vvd-filter-header {
    position: absolute;
    top: 14px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #000000; 
}

    .vvd-filter-header i {
        font-size: 0.8rem;
    }

@media (max-width: 480px) {
    .voter-report-stat-card {
        min-height: 94px;
        padding: 12px 14px 16px;
        gap: 4px;
    }

    .voter-report-stat-card span,
    .voter-report-stat-card strong {
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .voter-report-stat-card i {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .voter-report-stat-card strong {
        font-size: clamp(22px, 8vw, 28px);
        line-height: 1.05;
    }

    .voter-report-panel {
        padding: 14px;
    }

    .voter-report-donut-wrap {
        min-height: 166px;
    }

    .voter-report-donut {
        width: min(152px, 56vw);
        height: min(152px, 56vw);
        min-width: 132px;
        min-height: 132px;
    }

    .voter-report-donut::after {
        inset: 38px;
    }

    .voter-report-donut span {
        max-width: 58px;
        font-size: clamp(19px, 7vw, 24px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .voter-report-donut small {
        max-width: 62px;
        font-size: 9px;
        line-height: 1.05;
    }

    .voter-report-people-row {
        grid-template-columns: minmax(0, 1fr) 58px;
        gap: 8px;
        align-items: center;
    }

    .voter-report-people-icons {
        min-width: 0;
        overflow: hidden;
    }

    .voter-report-people-meta {
        min-width: 0;
        text-align: right;
    }

    .voter-report-people-meta strong,
    .voter-report-people-meta span {
        display: block;
        max-width: 58px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .voter-report-gauge {
        min-height: 178px;
    }

    .voter-report-gauge strong {
        font-size: clamp(22px, 8vw, 30px);
        max-width: 82px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .voter-report-share-labels span,
    .voter-report-highlight-list strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
