:root{--orange:#E8890A;--orange-dark:#C4730A;--orange-light:#FEF3E2;--teal:#2AACB8;--teal-dark:#1E8A95;--teal-light:#E2F6F8;--accent:#F5A030;--bg:#F7F8FA;--surface:#fff;--border:#E8EAF0;--border-soft:#F0F2F7;--text:#1A1C24;--text-muted:#6B7280;--text-faint:#B0B7C3;--success:#16A34A;--success-light:#DCFCE7;--danger:#DC2626;--danger-light:#FEE2E2;--warn:#D97706;--warn-light:#FEF3C7;--info:#2563EB;--info-light:#DBEAFE;--radius:10px;--radius-lg:16px;--shadow:0 1px 4px rgba(0,0,0,.06);--shadow-md:0 6px 24px rgba(0,0,0,.10)}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Nunito Sans',sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.6;min-height:100vh;display:flex}
a{text-decoration:none;color:inherit}
.mobile-appbar,.mobile-bottom-nav,.mobile-backdrop{display:none}

/* SIDEBAR */
.sidebar{width:234px;min-height:100vh;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;flex-shrink:0;position:sticky;top:0;height:100vh;overflow-y:auto}
.sidebar-brand{padding:18px 16px 14px;border-bottom:1px solid var(--border-soft)}
.brand-logo-row{display:flex;align-items:center;gap:10px}
.brand-icon{width:42px;height:42px;background:linear-gradient(135deg,var(--orange),var(--accent));border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.brand-icon svg{width:22px;height:22px}
.brand-name-top{font-family:'Nunito',sans-serif;font-size:16px;font-weight:800;color:var(--orange);line-height:1.1}
.brand-name-bot{font-family:'Nunito',sans-serif;font-size:14px;font-weight:700;color:var(--teal);line-height:1.1}
.brand-sub{font-size:10px;color:var(--text-muted);margin-top:7px;letter-spacing:.02em}
.sidebar-nav{flex:1;padding:8px}
.nav-section-label{font-size:10px;font-weight:700;letter-spacing:.08em;color:var(--text-faint);text-transform:uppercase;padding:8px 8px 4px}
.nav-item{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;color:var(--text-muted);font-size:13px;font-weight:500;transition:all .15s;margin-bottom:1px;width:100%;border:none;background:none;text-align:left;cursor:pointer;font-family:'Nunito Sans',sans-serif}
.nav-item:hover{background:var(--bg);color:var(--text)}
.nav-item.active{background:var(--orange-light);color:var(--orange-dark);font-weight:700}
.nav-item svg{width:15px;height:15px;flex-shrink:0}
.nav-divider{height:1px;background:var(--border-soft);margin:6px 8px}
.sidebar-footer{padding:12px 16px;border-top:1px solid var(--border-soft);display:flex;align-items:center;gap:8px}
.avatar{width:34px;height:34px;border-radius:50%;background:var(--orange);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;color:white;flex-shrink:0;font-family:'Nunito',sans-serif;overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover}
.user-name{font-size:12px;font-weight:700}
.user-role{font-size:10px;color:var(--text-muted)}

/* MAIN */
.main{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{height:54px;background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 24px;gap:12px;position:sticky;top:0;z-index:10}
.topbar-title{font-family:'Nunito',sans-serif;font-size:18px;font-weight:800;flex:1}
.topbar-actions{display:flex;gap:8px}
.content{padding:24px;flex:1}

/* HERO */
.hero{background:linear-gradient(120deg,var(--orange) 0%,var(--accent) 60%,var(--teal) 100%);border-radius:var(--radius-lg);padding:22px 24px;margin-bottom:20px;color:white;position:relative;overflow:hidden}
.hero-name{font-family:'Nunito',sans-serif;font-size:22px;font-weight:800}
.hero-sub{font-size:12px;opacity:.8;margin-top:2px}
.hero-stats{display:flex;gap:20px;margin-top:14px;flex-wrap:wrap}
.hero-stat-val{font-family:'Nunito',sans-serif;font-size:22px;font-weight:800;line-height:1}
.hero-stat-lbl{font-size:10px;opacity:.75;margin-top:2px}

/* CARDS */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px 20px;box-shadow:var(--shadow)}
.card-top-o{border-top:3px solid var(--orange)}
.card-top-t{border-top:3px solid var(--teal)}

/* STAT */
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}
.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;box-shadow:var(--shadow)}
.stat-card.bg-o{background:var(--orange);border-color:var(--orange)}
.stat-card.bg-t{background:var(--teal);border-color:var(--teal)}
.stat-label{font-size:11px;color:var(--text-muted);margin-bottom:4px;font-weight:600}
.stat-value{font-size:26px;font-weight:800;font-family:'Nunito',sans-serif;color:var(--text);line-height:1}
.stat-sub{font-size:11px;color:var(--text-faint);margin-top:3px}
.stat-card.bg-o .stat-label,.stat-card.bg-o .stat-value,.stat-card.bg-o .stat-sub,
.stat-card.bg-t .stat-label,.stat-card.bg-t .stat-value,.stat-card.bg-t .stat-sub{color:white}
.stat-card.bg-o .stat-label,.stat-card.bg-t .stat-label{opacity:.8}
.stat-card.bg-o .stat-sub,.stat-card.bg-t .stat-sub{opacity:.65}

/* LAYOUT */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
.flex{display:flex}.flex-1{flex:1}.items-center{align-items:center}.justify-between{justify-content:space-between}
.gap-8{gap:8px}.gap-12{gap:12px}
.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}
.divider{height:1px;background:var(--border-soft);margin:14px 0}
.text-muted{color:var(--text-muted)}.text-sm{font-size:12px}.text-xs{font-size:11px}.font-bold{font-weight:700}

/* TABLE */
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:13px}
th{font-size:10px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.07em;padding:8px 12px;border-bottom:1px solid var(--border);text-align:left;white-space:nowrap}
td{padding:10px 12px;border-bottom:1px solid var(--border-soft);vertical-align:middle}
tr:last-child td{border-bottom:none}
tr:hover td{background:var(--bg)}

/* BADGES */
.badge{display:inline-block;font-size:11px;font-weight:700;padding:2px 9px;border-radius:20px;white-space:nowrap;font-family:'Nunito',sans-serif}
.badge-green{background:var(--success-light);color:var(--success)}
.badge-amber{background:var(--warn-light);color:var(--warn)}
.badge-red{background:var(--danger-light);color:var(--danger)}
.badge-blue{background:var(--info-light);color:var(--info)}
.badge-gray{background:#F1F2F6;color:#6B7280}
.badge-orange{background:var(--orange-light);color:var(--orange-dark)}
.badge-teal{background:var(--teal-light);color:var(--teal-dark)}

/* FORMS */
.form-group{margin-bottom:14px}
.form-label{font-size:12px;font-weight:600;color:var(--text-muted);display:block;margin-bottom:4px}
.form-control{width:100%;padding:8px 11px;background:var(--bg);border:1px solid var(--border);border-radius:8px;font-size:13px;color:var(--text);font-family:'Nunito Sans',sans-serif;transition:border-color .15s}
.form-control:focus{outline:none;border-color:var(--orange);background:var(--surface)}
textarea.form-control{min-height:72px;resize:vertical}
select.form-control{cursor:pointer}

/* FILE UPLOAD */
.upload-area{border:2px dashed var(--border);border-radius:10px;padding:20px;text-align:center;cursor:pointer;transition:all .2s;background:var(--bg);position:relative}
.upload-area:hover{border-color:var(--orange);background:var(--orange-light)}
.upload-area input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.upload-area-icon{font-size:28px;margin-bottom:6px;opacity:.4}
.upload-area-txt{font-size:12px;color:var(--text-muted);font-weight:500}
.upload-area-sub{font-size:11px;color:var(--text-faint);margin-top:3px}

/* FOTO PREVIEW */
.foto-preview-wrap{position:relative;display:inline-block}
.foto-preview{width:100%;max-height:180px;object-fit:cover;border-radius:10px;border:1px solid var(--border);display:block}
.foto-preview-remover{position:absolute;top:6px;right:6px;background:var(--danger);color:white;border:none;border-radius:50%;width:22px;height:22px;font-size:13px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}

/* FICHA DO ELEITOR */
.ficha-wrap{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-md)}
.ficha-header{background:linear-gradient(120deg,var(--orange),var(--accent) 60%,var(--teal));padding:24px;display:flex;align-items:center;gap:20px;color:white}
.ficha-foto{width:90px;height:90px;border-radius:50%;border:3px solid rgba(255,255,255,.5);object-fit:cover;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}
.ficha-foto-placeholder{width:90px;height:90px;border-radius:50%;border:3px solid rgba(255,255,255,.4);background:rgba(255,255,255,.15);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ficha-foto-placeholder svg{width:44px;height:44px;opacity:.7}
.ficha-nome{font-family:'Nunito',sans-serif;font-size:20px;font-weight:800;line-height:1.2}
.ficha-sub{font-size:12px;opacity:.8;margin-top:3px}
.ficha-body{padding:20px}
.ficha-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ficha-campo{background:var(--bg);border-radius:8px;padding:10px 12px}
.ficha-campo-label{font-size:10px;font-weight:700;color:var(--text-faint);text-transform:uppercase;letter-spacing:.05em;margin-bottom:2px}
.ficha-campo-valor{font-size:13px;font-weight:600;color:var(--text)}
.ficha-section-title{font-family:'Nunito',sans-serif;font-size:14px;font-weight:800;margin:16px 0 10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:11px}

/* CARD ELEITOR (lista) */
.eleitor-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:14px 16px;display:flex;align-items:center;gap:14px;cursor:pointer;transition:all .15s;box-shadow:var(--shadow)}
.eleitor-card:hover{box-shadow:var(--shadow-md);border-color:var(--orange);transform:translateY(-1px)}
.eleitor-avatar{width:52px;height:52px;border-radius:50%;object-fit:cover;border:2px solid var(--border);flex-shrink:0;overflow:hidden;background:var(--bg);display:flex;align-items:center;justify-content:center}
.eleitor-avatar img{width:100%;height:100%;object-fit:cover}
.eleitor-avatar-inicial{font-family:'Nunito',sans-serif;font-size:18px;font-weight:800;color:var(--text-faint)}
.eleitor-info{flex:1;min-width:0}
.eleitor-nome{font-weight:700;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.eleitor-detalhe{font-size:12px;color:var(--text-muted);margin-top:2px}
.eleitor-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}

/* EQUIPE CARD */
.membro-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px;text-align:center;box-shadow:var(--shadow)}
.membro-foto{width:72px;height:72px;border-radius:50%;object-fit:cover;border:3px solid var(--orange-light);margin:0 auto 10px;display:block;overflow:hidden}
.membro-foto-placeholder{width:72px;height:72px;border-radius:50%;background:var(--orange-light);display:flex;align-items:center;justify-content:center;margin:0 auto 10px;font-family:'Nunito',sans-serif;font-size:22px;font-weight:800;color:var(--orange)}
.membro-nome{font-weight:700;font-size:14px}
.membro-cargo{font-size:12px;color:var(--text-muted);margin-top:2px}

/* DOC CHIP */
.doc-chip{display:inline-flex;align-items:center;gap:6px;background:var(--info-light);color:var(--info);border-radius:8px;padding:4px 10px;font-size:12px;font-weight:600;text-decoration:none;border:1px solid rgba(37,99,235,.2)}
.doc-chip:hover{background:#BFDBFE}
.doc-chip svg{width:13px;height:13px}
.img-thumb{width:48px;height:36px;object-fit:cover;border-radius:6px;border:1px solid var(--border);cursor:pointer}

/* BUTTONS */
.btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:1px solid var(--border);background:var(--surface);color:var(--text);font-family:'Nunito Sans',sans-serif;transition:all .15s}
.btn:hover{background:var(--bg)}
.btn-primary{background:var(--orange);border-color:var(--orange);color:white}
.btn-primary:hover{background:var(--orange-dark);border-color:var(--orange-dark)}
.btn-teal{background:var(--teal);border-color:var(--teal);color:white}
.btn-teal:hover{background:var(--teal-dark)}
.btn-danger{background:var(--danger);border-color:var(--danger);color:white}
.btn-sm{padding:5px 11px;font-size:12px}
.btn svg{width:13px;height:13px}

/* TOGGLE */
.toggle-wrap{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);margin-bottom:8px}
.toggle-wrap.disabled{opacity:.5}
.toggle-name{font-size:14px;font-weight:700}
.toggle-desc{font-size:12px;color:var(--text-muted);margin-top:2px}
.toggle{position:relative;width:44px;height:24px;flex-shrink:0}
.toggle input{opacity:0;width:0;height:0}
.toggle-slider{position:absolute;cursor:pointer;inset:0;background:#E5E7EB;border-radius:24px;transition:.3s}
.toggle-slider:before{content:'';position:absolute;width:18px;height:18px;left:3px;top:3px;background:white;border-radius:50%;transition:.3s}
.toggle input:checked+.toggle-slider{background:var(--orange)}
.toggle input:checked+.toggle-slider:before{transform:translateX(20px)}

/* PROGRESS */
.progress-bar{height:6px;background:var(--border);border-radius:3px;overflow:hidden;margin-top:4px}
.progress-fill{height:100%;border-radius:3px;transition:width .4s}

/* TIMELINE */
.timeline{display:flex;flex-direction:column}
.tl-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--border-soft)}
.tl-item:last-child{border-bottom:none}
.tl-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;margin-top:5px}
.tl-dot.o{background:var(--orange)}.tl-dot.t{background:var(--teal)}.tl-dot.g{background:var(--success)}.tl-dot.a{background:var(--warn)}.tl-dot.gr{background:#ADADAD}
.tl-title{font-size:13px;font-weight:600}
.tl-meta{font-size:11px;color:var(--text-muted);margin-top:1px}

/* SECTION HEADER */
.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.section-title{font-family:'Nunito',sans-serif;font-size:16px;font-weight:800}

/* KANBAN */
.kanban{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.kanban-col{background:var(--bg);border-radius:var(--radius);padding:10px}
.kanban-col-title{font-size:10px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.07em;margin-bottom:8px;display:flex;align-items:center;gap:6px}
.kanban-count{background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:1px 7px;font-size:10px}
.kanban-card{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:10px 12px;margin-bottom:6px}
.kanban-card-title{font-size:12px;font-weight:600;margin-bottom:4px;line-height:1.4}
.kanban-card-meta{font-size:11px;color:var(--text-muted)}

/* SEARCH */
.search-bar{display:flex;align-items:center;gap:8px;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:7px 11px}
.search-bar input{background:none;border:none;outline:none;flex:1;font-size:13px;color:var(--text);font-family:'Nunito Sans',sans-serif}

/* MODAL */
.modal-backdrop{display:none;position:fixed;inset:0;background:rgba(26,28,36,.5);z-index:50;align-items:center;justify-content:center;padding:20px}
.modal-backdrop.open{display:flex}
.modal{background:var(--surface);border-radius:var(--radius-lg);width:600px;max-width:100%;max-height:90vh;overflow-y:auto;box-shadow:var(--shadow-md)}
.modal-lg{width:800px}
.modal-header{padding:18px 20px 12px;border-bottom:1px solid var(--border-soft);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:var(--surface);z-index:1}
.modal-title{font-family:'Nunito',sans-serif;font-size:17px;font-weight:800}
.modal-close{background:none;border:none;cursor:pointer;color:var(--text-muted);font-size:22px;padding:2px 6px;border-radius:6px;line-height:1}
.modal-close:hover{background:var(--bg)}
.modal-body{padding:18px 20px}
.modal-footer{padding:12px 20px 16px;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--border-soft);position:sticky;bottom:0;background:var(--surface)}

/* ALERT */
.alert{padding:10px 14px;border-radius:8px;font-size:13px;font-weight:500;margin-bottom:16px}
.alert-success{background:var(--success-light);color:var(--success)}
.alert-danger{background:var(--danger-light);color:var(--danger)}

/* LIGHTBOX */
#lightbox{display:none;position:fixed;inset:0;background:rgba(0,0,0,.85);z-index:100;align-items:center;justify-content:center;cursor:zoom-out}
#lightbox.open{display:flex}
#lightbox img{max-width:90vw;max-height:90vh;border-radius:8px;object-fit:contain}

/* PROTO NUM */
.proto-num-pill{background:var(--orange-light);border:1px solid var(--orange);border-radius:8px;padding:6px 14px;text-align:right}
.proto-num-val{font-family:'Nunito',sans-serif;font-size:16px;font-weight:800;color:var(--orange)}
.proto-num-lbl{font-size:10px;color:var(--accent)}

/* TOAST */
#toast{position:fixed;bottom:24px;right:24px;background:var(--text);color:white;padding:10px 18px;border-radius:10px;font-size:13px;font-weight:600;z-index:200;transform:translateY(60px);opacity:0;transition:all .25s;pointer-events:none;font-family:'Nunito',sans-serif}
#toast.show{transform:none;opacity:1}

@media (max-width: 1024px){
.sidebar{width:210px}
.content{padding:18px}
.grid3{grid-template-columns:1fr 1fr}
.stat-grid{grid-template-columns:repeat(2,1fr)}
.kanban{grid-template-columns:1fr}
}

@media (max-width: 768px){
body{display:block}
body.mobile-menu-open{overflow:hidden}
.mobile-appbar{display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:60;padding:12px 14px;background:rgba(255,255,255,.92);backdrop-filter:blur(10px);border-bottom:1px solid var(--border)}
.mobile-menu-btn{width:42px;height:42px;border:none;border-radius:12px;background:var(--surface);box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;color:var(--text);cursor:pointer}
.mobile-menu-btn svg{width:20px;height:20px}
.mobile-appbar-title{font-family:'Nunito',sans-serif;font-size:16px;font-weight:800;line-height:1.1}
.mobile-appbar-sub{font-size:11px;color:var(--text-muted);margin-top:2px}
.mobile-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.38);z-index:69}
body.mobile-menu-open .mobile-backdrop{display:block}
.sidebar{width:min(82vw,320px);min-height:100vh;height:100vh;position:fixed;left:0;top:0;z-index:70;transform:translateX(-100%);transition:transform .25s ease;border-right:1px solid var(--border);border-bottom:none;box-shadow:var(--shadow-md)}
body.mobile-menu-open .sidebar{transform:translateX(0)}
.sidebar-nav{display:block;padding:12px}
.nav-section-label{display:block}
.nav-divider{display:block}
.sidebar-footer{display:flex}
.brand-sub{display:block}
.nav-item{flex:none;margin-bottom:4px;white-space:normal}
.main{width:100%}
.topbar{height:auto;padding:14px 16px;align-items:flex-start;flex-direction:column;top:67px}
.topbar-title{font-size:20px}
.topbar-actions{width:100%}
.topbar-actions .btn{width:100%;justify-content:center}
.content{padding:14px 14px 92px}
.grid2,.grid3,.stat-grid,.kanban,.ficha-grid{grid-template-columns:1fr}
.hero{padding:18px}
.hero-name{font-size:20px}
.hero-stats{gap:12px}
.card{padding:16px}
.section-header{align-items:flex-start;gap:10px;flex-direction:column}
.table-wrap{margin:0 -2px}
th,td{padding:8px 10px}
.ficha-header{padding:18px;flex-direction:column;align-items:flex-start}
.modal{width:100%}
.modal-body,.modal-header,.modal-footer{padding-left:14px;padding-right:14px}
#toast{left:14px;right:14px;bottom:14px;text-align:center}
.mobile-bottom-nav{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;position:fixed;left:10px;right:10px;bottom:10px;z-index:65;background:rgba(255,255,255,.96);border:1px solid var(--border);border-radius:18px;padding:8px;box-shadow:var(--shadow-md)}
.mobile-bottom-item{display:flex;align-items:center;justify-content:center;min-height:46px;border-radius:12px;font-size:11px;font-weight:700;color:var(--text-muted);padding:6px;text-align:center;background:none;border:none}
.mobile-bottom-item.active{background:var(--orange-light);color:var(--orange-dark)}
.mobile-bottom-more{cursor:pointer;font-family:'Nunito Sans',sans-serif}
}

@media (max-width: 520px){
.sidebar-brand{padding:14px 14px 10px}
.brand-name-top{font-size:15px}
.brand-name-bot{font-size:13px}
.brand-icon{width:38px;height:38px}
.hero-sub,.tl-meta,.text-sm,.text-xs{font-size:11px}
.btn,.btn-sm{width:100%;justify-content:center}
.eleitor-grid{grid-template-columns:1fr}
.eleitor-card{padding:12px}
.membro-card{padding:14px}
.mobile-bottom-nav{left:8px;right:8px;bottom:8px;gap:6px;padding:7px}
.mobile-bottom-item{min-height:44px;font-size:10px}
}

::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
