:root{font-family:Tomorrow,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:18px;line-height:1.5;font-weight:400;color:#213547;background-color:#fff}*{font-family:Tomorrow,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}body{margin:0;min-width:320px;min-height:100vh;font-family:Tomorrow,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}h1,h2,h3,h4,h5,h6,button,input,select,textarea{font-family:Tomorrow,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.candidate-list{display:flex;flex-direction:column}.candidate-item{display:flex;align-items:center;justify-content:space-between;padding:1.05rem 1.4rem;cursor:pointer;border-left:6px solid transparent;transition:all .15s}.candidate-item:hover{background-color:#f4f4f5}.candidate-item.selected{background-color:#3b82f61a;border-left-color:#3b82f6}.candidate-info{display:flex;align-items:center;gap:.7rem;min-width:0;flex:1}.party-badge{font-weight:700;font-size:1.225rem;line-height:1.75rem;opacity:.5;flex-shrink:0}.party-unknown{color:#4b5563}.candidate-name{font-weight:500;font-size:1.225rem;line-height:1.75rem;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.candidate-stats{display:flex;align-items:center;gap:.7rem;flex-shrink:0}.candidate-score{font-weight:500;font-size:1.225rem;line-height:1.75rem;color:#6b7280}.trend-icon{display:flex;align-items:center}.trend-icon.positive{color:#16a34a}.trend-icon.negative{color:#dc2626}.load-more-trigger{padding:1rem;text-align:center;min-height:40px}.load-more-trigger .loading-text{font-size:.875rem;color:#6b7280}.election-group{margin:.75rem;border:1px solid #e5e7eb;border-radius:12px;background:#fafafa;overflow:hidden}.election-group-header{padding:.75rem 1rem;font-weight:600;font-size:.875rem;color:#374151;background:#f3f4f6;border-bottom:1px solid #e5e7eb}.election-group-candidates{background:#fff}.election-group-candidates .candidate-item{border-left-width:4px}.election-group-candidates .candidate-item:last-child{border-bottom:none}.election-group-candidates .candidate-item:not(:last-child){border-bottom:1px solid #f3f4f6}.filter-container{position:relative}.filter-button{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border:1px solid #e5e7eb;border-radius:9999px;background:#fff;font-size:.875rem;font-weight:500;color:#374151;cursor:pointer;transition:all .15s}.filter-button:hover{background:#f9fafb;border-color:#d1d5db}.filter-button.active{background:#f3f4f6;border-color:#3b82f6;color:#111827}.filter-badge{background:#3b82f6;color:#fff;font-size:.75rem;font-weight:600;padding:.125rem .5rem;border-radius:9999px}.filter-option.selected{color:#111827;font-weight:500}.filter-container.compact .filter-button{gap:.4rem;padding:.4rem .8rem;font-size:.7rem}.filter-container.compact .filter-badge{font-size:.6rem;padding:.1rem .4rem}.filter-dropdown.compact{min-width:222px;border-radius:11px}.filter-dropdown.compact .filter-section{padding:.87rem 1.04rem}.filter-dropdown.compact .filter-section-title{gap:.43rem;font-size:.74rem;margin:0 0 .7rem}.filter-dropdown.compact .filter-option{padding:.61rem .7rem;border-radius:7px;font-size:.74rem}.filter-dropdown.compact .filter-option.checkbox-option{gap:.52rem}.filter-dropdown.compact .filter-divider-light{margin:.34rem 0}.filter-dropdown.compact .filter-footer{padding:.7rem 1.04rem}.filter-dropdown.compact .filter-summary{font-size:.65rem}.filter-dropdown.compact .filter-clear{font-size:.65rem;padding:.26rem .52rem;border-radius:4px}.candidate-detail{display:flex;flex-direction:column;gap:1.25rem}.detail-header{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:.75rem}.compare-button{display:flex;align-items:center;gap:.375rem;padding:.5rem .875rem;background:#fff;border:1px solid #e5e7eb;border-radius:8px;font-size:.875rem;font-weight:500;color:#374151;cursor:pointer;transition:all .15s ease}.compare-button:hover{background:#f9fafb;border-color:#d1d5db;box-shadow:0 1px 2px #0000000a}.header-info{display:flex;flex-direction:column;gap:.25rem}.name-row{display:flex;align-items:baseline;gap:.5rem}.detail-name{font-size:1.75rem;font-weight:700;margin:0;letter-spacing:-.02em}.party-label{font-size:1.25rem;font-weight:600;opacity:.6}.party-d{color:#2563eb}.party-r{color:#dc2626}.party-l{color:#eab308}.party-i{color:#9333ea}.party-other{color:#22c55e}.party-unknown{color:#6b7280}.detail-meta{color:#6b7280;margin:0;font-size:.9375rem;display:flex;align-items:center;flex-wrap:wrap;gap:0}.winner-badge{display:inline-block;margin-left:.5rem;padding:.125rem .5rem;border-radius:4px;font-size:.8125rem;font-weight:600}.winner-badge.won{background-color:#dcfce7;color:#166534}.winner-badge.lost{background-color:#fee2e2;color:#991b1b}.detail-stats-compact{display:flex;align-items:center}.stat-card-compact{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:.75rem 1.25rem;display:flex;flex-direction:column;gap:.25rem}.stat-label-small{font-size:.75rem;font-weight:500;color:#6b7280;text-transform:uppercase;letter-spacing:.025em}.stat-inline{display:flex;align-items:baseline;gap:.75rem}.stat-value-large{font-size:2rem;font-weight:700;color:#111827;letter-spacing:-.02em}.stat-change-inline{display:inline-flex;align-items:center;gap:.25rem;font-size:.9375rem;font-weight:600;padding:.25rem .5rem;border-radius:6px}.stat-change-inline.positive{color:#16a34a;background-color:#16a34a14}.stat-change-inline.negative{color:#dc2626;background-color:#dc262614}.stat-change-inline svg{flex-shrink:0}.chart-section{background:#fff;border-radius:16px;border:1px solid #e5e7eb;padding:1.5rem;box-shadow:0 1px 3px #0000000a,0 4px 12px #00000008}.chart-wrapper{position:relative}.chart-controls{display:flex;justify-content:space-between;align-items:center;margin-top:1.25rem;padding-top:1rem;border-top:1px solid #f3f4f6}.filter-container{position:relative;z-index:1000}.filter-button{display:flex;align-items:center;gap:.375rem;padding:.5rem .875rem;background:#fff;border:1px solid #e5e7eb;border-radius:8px;font-size:.875rem;font-weight:500;color:#374151;cursor:pointer;transition:all .15s ease}.filter-button:hover{background:#f9fafb;border-color:#d1d5db;box-shadow:0 1px 2px #0000000a}.filter-button.active{border-color:#3b82f6;color:#1d4ed8}.filter-badge{background:#dbeafe;color:#1d4ed8;font-size:.75rem;padding:.125rem .5rem;border-radius:9999px}.filter-dropdown{position:fixed;background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 9px 35px #00000026;min-width:278px;z-index:10000;overflow:hidden}.filter-section{padding:1.09rem 1.3rem}.filter-section-title{display:flex;align-items:center;gap:.54rem;font-size:.92rem;font-weight:700;color:#111827;margin:0 0 .87rem}.filter-section-title svg{color:#6b7280}.filter-options{display:flex;flex-direction:column;gap:0}.filter-option{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.76rem .87rem;background:none;border:none;border-radius:9px;font-size:.92rem;color:#374151;cursor:pointer;text-align:left;transition:all .15s}.filter-option:hover{background:#f3f4f6}.filter-option.selected{background:#eff6ff;color:#1d4ed8;font-weight:500}.filter-option.selected svg{color:#3b82f6}.filter-option.checkbox-option{justify-content:flex-start;gap:.65rem}.checkbox-icon{color:#d1d5db;flex-shrink:0}.checkbox-icon.checked{color:#111827}.filter-divider{height:1px;background:#e5e7eb;margin:0}.filter-divider-light{height:1px;background:#f3f4f6;margin:.43rem 0}.filter-footer{display:flex;align-items:center;justify-content:space-between;padding:.87rem 1.3rem}.filter-summary{font-size:.815rem;color:#6b7280}.filter-clear{font-size:.815rem;font-weight:500;color:#374151;background:none;border:none;cursor:pointer;padding:.33rem .65rem;border-radius:5px}.filter-clear:hover{background:#f3f4f6;color:#111827}.breakdown-toggle{display:flex;align-items:center;gap:.5rem;background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:.5rem .875rem}.breakdown-label{font-size:.875rem;font-weight:500;color:#6b7280}.switch{position:relative;display:inline-block;width:40px;height:22px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#d1d5db;transition:.2s ease;border-radius:22px}.slider:before{position:absolute;content:"";height:18px;width:18px;left:2px;bottom:2px;background-color:#fff;transition:.2s ease;border-radius:50%;box-shadow:0 1px 2px #0000001a}input:checked+.slider{background-color:#3b82f6}input:checked+.slider:before{transform:translate(18px)}.chart-container{width:100%;height:600px}.chart-container *:focus{outline:none}.chart-container svg{outline:none}.chart-container .recharts-wrapper,.chart-container .recharts-surface{outline:none}.custom-tooltip{background:#fff;border-radius:10px;padding:.875rem 1rem;box-shadow:0 4px 16px #0000001f,0 1px 3px #0000000f;border:1px solid rgba(0,0,0,.04)}.tooltip-date{font-weight:600;font-size:.9375rem;margin:0 0 .5rem;color:#111827}.tooltip-row{display:flex;align-items:center;gap:.5rem}.tooltip-bullet{width:12px;height:12px;background-color:#000;border-radius:50%}.tooltip-name{font-size:1rem;color:#374151}.tooltip-value{font-size:1rem;font-weight:700;color:#111827;margin-left:.5rem}.tooltip-change{font-size:.875rem;font-weight:500;font-family:monospace;padding:.25rem .5rem;border-radius:4px;margin-left:.5rem}.tooltip-change.positive{color:#16a34a;background-color:#16a34a1a}.tooltip-change.negative{color:#dc2626;background-color:#dc26261a}.tooltip-winner-badge{font-size:.625rem;font-weight:600;padding:.0625rem .25rem;border-radius:2px;margin-left:.25rem}.tooltip-winner-badge.won{background-color:#dcfce7;color:#166534}.tooltip-winner-badge.lost{background-color:#fee2e2;color:#991b1b}.tooltip-breakdown-content{display:flex;flex-direction:column;gap:.5rem}.compare-title{margin-bottom:.75rem}.compared-candidates{display:flex;flex-wrap:wrap;gap:.75rem}.compared-candidate-item{display:flex;align-items:center;gap:.375rem}.compared-color{width:.75rem;height:.75rem;border-radius:3px}.compared-name{font-weight:500;font-size:.9375rem}.compared-score{color:#6b7280;font-size:.875rem}.compared-winner-badge{font-size:.6875rem;font-weight:600;padding:.0625rem .3125rem;border-radius:3px;text-transform:uppercase}.compared-winner-badge.won{background-color:#dcfce7;color:#166534}.compared-winner-badge.lost{background-color:#fee2e2;color:#991b1b}.header-actions{display:flex;align-items:center;gap:.5rem}.exit-compare-button{display:flex;align-items:center;gap:.375rem;padding:.5rem .875rem;background:#fef2f2;border:1px solid #fecaca;border-radius:8px;font-size:.875rem;font-weight:500;color:#b91c1c;cursor:pointer;transition:all .15s ease;margin-top:1.75rem}.exit-compare-button:hover{background:#fee2e2;border-color:#fca5a5;box-shadow:0 1px 2px #b91c1c14}.view-race-button{display:flex;align-items:center;gap:.375rem;padding:.5rem .875rem;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;font-size:.875rem;font-weight:500;color:#166534;cursor:pointer;transition:all .15s ease}.view-race-button:hover{background:#dcfce7;border-color:#86efac;box-shadow:0 1px 2px #16653414}.breakdown-section{display:flex;flex-direction:column;gap:.75rem}.breakdown-categories{display:flex;align-items:center;gap:.5rem;padding:.5rem 0}.breakdown-radio{display:flex;align-items:center;gap:.25rem;padding:.375rem .75rem;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;font-size:.8125rem;font-weight:500;color:#374151;transition:all .15s ease;-webkit-user-select:none;user-select:none}.breakdown-radio:hover{background:#f3f4f6;border-color:#d1d5db}.breakdown-radio:has(input:checked){background:#eff6ff;border-color:#3b82f6;color:#1d4ed8}.breakdown-radio input[type=radio]{width:12px;height:12px;margin:0;cursor:pointer;accent-color:#3b82f6}.election-select-container{position:relative;width:100%}.election-select-trigger{display:flex;align-items:center;justify-content:space-between;width:100%;height:56px;padding:0 17px;background:#fff;border:1px solid #e5e7eb;border-radius:8px;font-size:1.225rem;color:#111827;cursor:pointer;transition:all .15s}.election-select-trigger:hover{border-color:#d1d5db}.election-select-trigger:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 4px #3b82f633}.election-select-value{flex:1;text-align:left}.election-select-icon{color:#6b7280;opacity:.5;transition:transform .15s}.election-select-icon.open{transform:rotate(180deg)}.election-select-content{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 6px 17px #0000001a;z-index:50;padding:6px;animation:selectFadeIn .15s ease-out}@keyframes selectFadeIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.election-select-item{display:flex;align-items:center;width:100%;padding:11px;background:none;border:none;border-radius:6px;font-size:1.225rem;color:#374151;cursor:pointer;text-align:left;transition:background-color .15s}.election-select-item:hover,.election-select-item.selected:hover{background-color:#f3f4f6}.election-select-item.selected{background-color:transparent}.election-select-check{display:flex;align-items:center;justify-content:center;width:34px;height:22px;margin-right:6px;color:#3b82f6}.home-container{display:flex;flex-direction:column;height:100vh;background-color:#f9fafb}.home-header{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:60px;background:#fff;border-bottom:1px solid #e5e7eb}.home-title{font-size:1.375rem;font-weight:700;margin:0}.logout-button{padding:.5rem 1rem;background:transparent;border:1px solid #e5e7eb;border-radius:4px;cursor:pointer;color:#666;font-size:.9375rem}.logout-button:hover{background:#f3f4f6}.home-main{display:flex;flex:1;overflow:hidden}.sidebar{width:476px;background:#fff;border-right:1px solid #e5e7eb;display:flex;flex-direction:column;overflow:hidden}.sidebar-header{padding:2.1rem;border-bottom:1px solid #e5e7eb}.election-select{width:100%;padding:.5rem .75rem;border:1px solid #e5e7eb;border-radius:6px;font-size:.875rem;background:#fff;cursor:pointer}.election-select:focus{outline:none;border-color:#3b82f6}.sidebar-search{padding:.75rem 1rem;border-bottom:1px solid #e5e7eb}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:.75rem;color:#9ca3af;pointer-events:none}.search-input{width:100%;padding:.625rem .75rem .625rem 2.5rem;border:1px solid #e5e7eb;border-radius:8px;font-size:.9375rem;color:#111827;background:#fff;transition:border-color .15s,box-shadow .15s}.search-input::placeholder{color:#9ca3af}.search-input:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.sidebar-options{padding:.75rem 1.5rem;border-bottom:1px solid #e5e7eb}.group-by-election-checkbox{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.9375rem;color:#374151;-webkit-user-select:none;user-select:none}.group-by-election-checkbox input[type=checkbox]{width:16px;height:16px;cursor:pointer;accent-color:#3b82f6}.group-by-election-checkbox:hover{color:#111827}.sidebar-content{flex:1;overflow-y:auto}.sidebar-title{font-size:1rem;font-weight:600;margin:0;padding:1rem 1.5rem;border-bottom:1px solid #e5e7eb}.content{flex:1;overflow:auto;padding:1.5rem}.empty-state{display:flex;align-items:center;justify-content:center;height:100%;color:#9ca3af}.loading-text{padding:1rem 1.5rem;color:#6b7280}.error-text{padding:1rem 1.5rem;color:#dc2626}.auth-container{display:flex;align-items:center;justify-content:center;min-height:100vh;background-color:#f5f5f5}.auth-card{background:#fff;padding:2rem;border-radius:8px;box-shadow:0 2px 10px #0000001a;width:100%;max-width:400px}.auth-title{font-size:1.5rem;font-weight:700;margin:0 0 .5rem;text-align:center}.auth-subtitle{color:#666;margin:0 0 1.5rem;text-align:center}.auth-form{display:flex;flex-direction:column;gap:1rem}.auth-input{padding:.75rem 1rem;border:1px solid #ddd;border-radius:4px;font-size:1rem}.auth-input:focus{outline:none;border-color:#333}.auth-button{padding:.75rem 1rem;background:#333;color:#fff;border:none;border-radius:4px;font-size:1rem;cursor:pointer}.auth-button:hover{background:#444}.auth-error{color:#e53e3e;margin:0;font-size:.875rem}.admin-container{display:flex;flex-direction:column;min-height:100vh;background-color:#f9fafb}.admin-header{display:flex;align-items:center;padding:0 1.5rem;height:60px;background:#fff;border-bottom:1px solid #e5e7eb}.admin-title{font-size:1.375rem;font-weight:700;margin:0}.admin-main{flex:1;padding:2rem}.admin-card{background:#fff;border-radius:12px;border:1px solid #e5e7eb;padding:2rem;max-width:600px}.card-title{font-size:1.25rem;font-weight:600;margin:0 0 1.5rem;color:#111827}.input-group{margin-bottom:1.5rem}.input-label{display:block;font-size:.875rem;font-weight:500;color:#374151;margin-bottom:.5rem}.input-field{width:100%;padding:.75rem 1rem;font-size:.9375rem;border:1px solid #d1d5db;border-radius:8px;outline:none;transition:border-color .15s,box-shadow .15s;box-sizing:border-box}.input-field:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.input-field::placeholder{color:#9ca3af}.import-button{padding:.75rem 1.5rem;background:#3b82f6;color:#fff;font-size:.9375rem;font-weight:500;border:none;border-radius:8px;cursor:pointer;transition:background-color .15s}.import-button:hover:not(:disabled){background:#2563eb}.import-button:disabled{background:#9ca3af;cursor:not-allowed}.error-message{margin-top:1rem;padding:.75rem 1rem;background:#fef2f2;border:1px solid #fecaca;border-radius:8px;color:#b91c1c;font-size:.875rem}.result-box{margin-top:1.5rem;padding:1rem;background:#f9fafb;border:1px solid #e5e7eb;border-radius:8px}.result-title{font-size:.875rem;font-weight:600;color:#374151;margin:0 0 .5rem}.result-content{margin:0;font-size:.8125rem;font-family:Monaco,Menlo,monospace;color:#4b5563;white-space:pre-wrap;word-break:break-all}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#root{width:100%;height:100vh}.loading{display:flex;align-items:center;justify-content:center;height:100vh;font-size:1rem;color:#666}
