:root{--primary:#075985;--primary2:#0c4a6e;--accent:#f97316;--bg:#f4f8fb;--card:#fff;--text:#0f172a;--muted:#64748b;--line:#dbe6ef;--ok:#059669;--danger:#dc2626;--warning:#d97706;--shadow:0 14px 36px rgba(15,23,42,.10)}
*{box-sizing:border-box}html,body{margin:0;padding:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--text);background:var(--bg)}body{min-height:100vh}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.hidden{display:none!important}.muted{color:var(--muted)}.center{text-align:center}.danger-text{color:var(--danger)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border:0;border-radius:12px;padding:.78rem 1.05rem;font-weight:750;cursor:pointer;transition:.18s ease;background:#e2e8f0;color:#0f172a}.btn:hover{transform:translateY(-1px);filter:brightness(.98)}.btn.primary{background:var(--primary);color:#fff}.btn.accent{background:var(--accent);color:#fff}.btn.success{background:var(--ok);color:#fff}.btn.danger{background:var(--danger);color:#fff}.btn.outline{background:#fff;border:1px solid var(--line)}.btn.sm{padding:.5rem .72rem;border-radius:9px;font-size:.88rem}.btn.lg{padding:1rem 1.35rem;font-size:1.05rem}.btn.block{width:100%}.btn[disabled]{opacity:.55;cursor:not-allowed;transform:none}
.input,.select,.textarea{width:100%;border:1px solid #cbd5e1;background:#fff;border-radius:11px;padding:.78rem .85rem;color:var(--text);outline:none;transition:.15s}.input:focus,.select:focus,.textarea:focus{border-color:#38bdf8;box-shadow:0 0 0 3px rgba(56,189,248,.17)}.textarea{min-height:100px;resize:vertical}.label{display:block;font-size:.88rem;font-weight:750;margin:0 0 .38rem}.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.form-group{margin-bottom:1rem}.help{font-size:.82rem;color:var(--muted);margin-top:.35rem}.required:after{content:" *";color:var(--danger)}
.alert{padding:.85rem 1rem;border-radius:12px;margin:0 0 1rem;border:1px solid}.alert.success{background:#ecfdf5;border-color:#a7f3d0;color:#065f46}.alert.error{background:#fef2f2;border-color:#fecaca;color:#991b1b}.alert.warning{background:#fffbeb;border-color:#fde68a;color:#92400e}.alert.info{background:#eff6ff;border-color:#bfdbfe;color:#1e40af}
.card{background:var(--card);border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 24px rgba(15,23,42,.05)}.card-pad{padding:1.15rem}.toolbar{display:flex;gap:.7rem;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:1rem}.toolbar .left,.toolbar .right{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
/* public voting - RK.ID soft modern scanner v1.2 */
.vote-body{
  --vote-bg:#eef4f7;
  --vote-card:#ffffff;
  --vote-ink:#162232;
  --vote-muted:#6d7e8e;
  --vote-line:#dbe5eb;
  --vote-primary:#4e7188;
  --vote-primary-deep:#3c5c70;
  --vote-soft:#e8f0f4;
  --vote-ok:#4e8069;
  background:
    radial-gradient(circle at 8% 4%,rgba(168,205,222,.28) 0,transparent 29%),
    radial-gradient(circle at 91% 16%,rgba(197,218,228,.30) 0,transparent 26%),
    linear-gradient(145deg,#f6f9fb 0%,var(--vote-bg) 52%,#edf3f6 100%);
  min-height:100vh;
  color:var(--vote-ink)
}
.vote-shell{min-height:100vh;display:flex;flex-direction:column}
.vote-top{
  min-height:72px;background:rgba(54,84,103,.96);color:#fff;display:flex;align-items:center;justify-content:space-between;
  padding:0 clamp(18px,4vw,58px);border-bottom:1px solid rgba(255,255,255,.10);
  box-shadow:0 8px 24px rgba(35,59,74,.10);backdrop-filter:blur(12px);position:relative;z-index:10
}
.brand-wrap{display:flex;align-items:center;gap:.78rem}.brand-logo{width:44px;height:44px;border-radius:14px;background:linear-gradient(145deg,#fff,#eef4f7);color:#466b82;display:grid;place-items:center;box-shadow:0 6px 16px rgba(17,34,45,.16),inset 0 1px 0 #fff;border:1px solid rgba(255,255,255,.72)}
.brand-logo svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.brand-text strong{display:block;letter-spacing:.035em;font-size:.94rem}.brand-text small{display:block;opacity:.76;margin-top:2px;font-size:.76rem}.vote-top .date{font-weight:650;opacity:.9;display:flex;align-items:center;gap:8px;font-size:.86rem}.header-location-dot{width:7px;height:7px;border-radius:50%;background:#b9d5c5;box-shadow:0 0 0 4px rgba(185,213,197,.13)}
.vote-main{width:min(1240px,94vw);margin:0 auto;padding:34px 0 42px;flex:1}.scan-page{display:flex;align-items:flex-start}.scan-shell-card{width:100%;display:grid;grid-template-columns:minmax(0,.88fr) minmax(480px,1.12fr);gap:30px;background:rgba(255,255,255,.82);border:1px solid rgba(211,224,232,.92);border-radius:28px;padding:clamp(24px,3.1vw,42px);box-shadow:0 22px 60px rgba(52,79,97,.09),0 3px 10px rgba(52,79,97,.04),inset 0 1px 0 rgba(255,255,255,.96);backdrop-filter:blur(12px);animation:scanCardIn .42s cubic-bezier(.2,.75,.3,1) both}
@keyframes scanCardIn{from{opacity:0;transform:translateY(10px) scale(.995)}to{opacity:1;transform:none}}
.scan-intro-panel{text-align:left;display:flex;flex-direction:column;justify-content:center;min-width:0;padding:4px 0}.scan-kicker{display:inline-flex;align-items:center;gap:8px;width:max-content;max-width:100%;padding:7px 10px;border-radius:999px;background:#edf4f7;border:1px solid #dde9ee;color:#587286;font-size:.72rem;font-weight:800;letter-spacing:.055em;text-transform:uppercase}.scan-kicker-icon{width:23px;height:23px;display:grid;place-items:center;border-radius:8px;background:#fff;color:#55788e;box-shadow:0 3px 8px rgba(50,76,93,.08)}.scan-kicker-icon svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.scan-intro-panel h1{font-size:clamp(2rem,4.2vw,3.35rem);line-height:1.02;letter-spacing:-.045em;margin:18px 0 12px;color:#182434}.scan-lead{font-size:clamp(.95rem,1.4vw,1.06rem);line-height:1.72;color:var(--vote-muted);margin:0 0 22px;max-width:580px}.camera-permission-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid #dbe6eb;background:linear-gradient(145deg,#fbfdfe,#f4f8fa);border-radius:17px;padding:13px 14px;box-shadow:0 7px 18px rgba(48,74,91,.045),inset 0 1px 0 #fff;transition:.22s}.camera-permission-card:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(48,74,91,.07),inset 0 1px 0 #fff}.permission-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#e9f1f5;color:#55758a;border:1px solid #dce8ed}.permission-icon svg{width:21px;height:21px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.permission-copy{min-width:0}.permission-copy strong{display:block;font-size:.88rem;color:#2e4352}.permission-copy small{display:block;color:#748492;margin-top:3px;line-height:1.45;font-size:.76rem}.permission-badge{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border-radius:999px;padding:6px 9px;font-size:.67rem;font-weight:800;border:1px solid}.permission-badge.waiting,.permission-badge.prompt{background:#f4f6f7;color:#6f7e89;border-color:#e2e7ea}.permission-badge.granted{background:#eef7f2;color:#527762;border-color:#d8e9df}.permission-badge.denied{background:#fff2f1;color:#a15e5b;border-color:#efd9d7}.permission-badge.unsupported{background:#f6f2ed;color:#8b7058;border-color:#e9dfd4}.scan-primary-actions{display:flex;gap:10px;align-items:center;margin-top:14px;flex-wrap:wrap}.btn.camera-primary,.btn.camera-secondary{border-radius:14px;min-height:48px;transition:transform .18s ease,box-shadow .18s ease,background .18s ease,border-color .18s ease}.btn.camera-primary{background:linear-gradient(180deg,#5d8096,#4a6d83);color:#fff;border:1px solid #45677b;box-shadow:0 8px 18px rgba(60,91,111,.19),inset 0 1px 0 rgba(255,255,255,.24)}.btn.camera-primary:hover{transform:translateY(-2px);box-shadow:0 12px 23px rgba(60,91,111,.24),inset 0 1px 0 rgba(255,255,255,.24);filter:none}.btn.camera-primary:active{transform:translateY(0);box-shadow:0 4px 10px rgba(60,91,111,.16)}.btn.camera-primary.is-loading{opacity:.72}.btn.camera-secondary{background:linear-gradient(180deg,#fff,#f6f9fa);color:#496577;border:1px solid #d5e0e6;box-shadow:0 5px 13px rgba(48,74,91,.07),inset 0 1px 0 #fff}.btn.camera-secondary:hover{transform:translateY(-1px);border-color:#bdcdd6;box-shadow:0 8px 16px rgba(48,74,91,.10);filter:none}.btn.camera-secondary.active{background:#edf4ef;color:#547563;border-color:#d3e4d9}.btn-inline-icon{width:20px;height:20px;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.permission-help{margin-top:12px;padding:11px 13px;border-radius:13px;background:#fff5f3;border:1px solid #efdcd8;color:#8c5651;font-size:.76rem;line-height:1.5}.permission-help strong{display:block;margin-bottom:2px}.scan-security-note{display:flex;align-items:flex-start;gap:8px;margin-top:12px;color:#7c8b97;font-size:.72rem;line-height:1.5}.scan-security-note svg{width:16px;height:16px;flex:0 0 auto;margin-top:1px;stroke:#6f8796;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.scan-security-note.security-warning{color:#a1605a}.manual-divider{display:flex;align-items:center;gap:10px;margin:21px 0 11px;color:#95a3ad;font-size:.69rem;text-transform:uppercase;letter-spacing:.055em}.manual-divider:before,.manual-divider:after{content:"";height:1px;background:#e2e9ed;flex:1}.modern-manual{margin:0;max-width:none;grid-template-columns:minmax(0,1fr) auto;gap:8px}.manual-input-wrap{position:relative;display:block}.manual-input-wrap svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;stroke:#8193a0;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.manual-input-wrap .input{padding-left:39px;min-height:48px;border-radius:14px;border-color:#d7e1e7;background:#fbfdfe;box-shadow:inset 0 1px 1px rgba(30,50,63,.02)}.manual-input-wrap .input:focus{border-color:#8fb0c2;box-shadow:0 0 0 3px rgba(109,151,174,.12);background:#fff}
.scanner-panel-modern{align-self:stretch;min-width:0;background:linear-gradient(145deg,#f5f8fa,#edf3f6);border:1px solid #dbe5eb;border-radius:22px;padding:14px;box-shadow:inset 0 1px 0 #fff,0 9px 24px rgba(48,74,91,.06)}.scanner-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 3px 12px}.scanner-panel-head>div{display:flex;flex-direction:column;gap:3px}.scanner-label{font-size:.64rem;letter-spacing:.09em;color:#8395a2;font-weight:850}.scanner-panel-head strong{font-size:.87rem;color:#324858}.camera-live-pill{display:inline-flex;align-items:center;gap:7px;padding:6px 9px;border-radius:999px;font-size:.68rem;font-weight:800;border:1px solid #dce4e8;background:#f7f9fa;color:#778691}.camera-live-pill i{width:7px;height:7px;border-radius:50%;background:#98a6af}.camera-live-pill.live{background:#edf7f2;color:#557965;border-color:#d6e8dd}.camera-live-pill.live i{background:#5f8a72;box-shadow:0 0 0 4px rgba(95,138,114,.10)}.camera-wrap.modern-camera{position:relative;aspect-ratio:16/10;border-radius:18px;overflow:hidden;background:linear-gradient(150deg,#162432,#213746);border:1px solid rgba(255,255,255,.72);box-shadow:0 13px 28px rgba(34,56,70,.15),inset 0 0 0 1px rgba(255,255,255,.05)}.camera-wrap.modern-camera video{width:100%;height:100%;object-fit:cover;display:block;position:relative;z-index:1}.camera-placeholder{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px;color:#d9e5eb;background:radial-gradient(circle at 50% 35%,rgba(104,146,169,.17),transparent 32%)}.camera-placeholder-icon{width:60px;height:60px;border-radius:19px;display:grid;place-items:center;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.13);box-shadow:0 9px 22px rgba(0,0,0,.10),inset 0 1px 0 rgba(255,255,255,.08);margin-bottom:12px}.camera-placeholder-icon svg{width:29px;height:29px;stroke:#d7e7ee;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.camera-placeholder strong{font-size:.92rem}.camera-placeholder small{color:#aabcc7;margin-top:4px;font-size:.72rem}.scan-frame.modern-frame{position:absolute;z-index:3;left:20%;right:20%;top:18%;bottom:18%;border:0;border-radius:18px;box-shadow:0 0 0 9999px rgba(17,32,43,.14);pointer-events:none}.modern-frame span{position:absolute;width:34px;height:34px}.modern-frame span:nth-child(1){left:0;top:0;border-left:3px solid rgba(238,248,252,.92);border-top:3px solid rgba(238,248,252,.92);border-radius:12px 0 0 0}.modern-frame span:nth-child(2){right:0;top:0;border-right:3px solid rgba(238,248,252,.92);border-top:3px solid rgba(238,248,252,.92);border-radius:0 12px 0 0}.modern-frame span:nth-child(3){right:0;bottom:0;border-right:3px solid rgba(238,248,252,.92);border-bottom:3px solid rgba(238,248,252,.92);border-radius:0 0 12px 0}.modern-frame span:nth-child(4){left:0;bottom:0;border-left:3px solid rgba(238,248,252,.92);border-bottom:3px solid rgba(238,248,252,.92);border-radius:0 0 0 12px}.scan-line.modern-line{position:absolute;z-index:4;left:24%;right:24%;height:2px;top:50%;background:linear-gradient(90deg,transparent,#91c5d9 18%,#c7e6f1 50%,#91c5d9 82%,transparent);box-shadow:0 0 12px rgba(145,197,217,.65);animation:modernScan 2.3s ease-in-out infinite;pointer-events:none}@keyframes modernScan{0%,100%{transform:translateY(-68px);opacity:.55}50%{transform:translateY(68px);opacity:1}}.scan-status.modern-status{display:flex;align-items:center;justify-content:center;gap:8px;margin:11px 2px 0;padding:10px 12px;border-radius:12px;color:#70818e;background:rgba(255,255,255,.72);border:1px solid #dce6eb;font-size:.75rem;font-weight:650;transition:.2s}.modern-status .status-dot{width:7px;height:7px;border-radius:50%;background:#9aa8b1;box-shadow:0 0 0 4px rgba(154,168,177,.10)}.modern-status.success{color:#557965;background:#f0f7f3;border-color:#d7e7dd}.modern-status.success .status-dot{background:#668c76;box-shadow:0 0 0 4px rgba(102,140,118,.10)}.modern-status.loading{color:#5f7381;background:#f0f5f7}.modern-status.loading .status-dot{background:#7798aa;animation:pulseDot 1s ease-in-out infinite}.modern-status.error{color:#955d59;background:#fff4f2;border-color:#efdcda}.modern-status.error .status-dot{background:#b46d68}@keyframes pulseDot{50%{opacity:.35;transform:scale(.75)}}.scan-notice{display:flex;align-items:flex-start;gap:11px;padding:14px;border-radius:15px;margin-top:8px}.scan-notice-icon{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;font-weight:900;flex:0 0 auto}.scan-notice strong,.scan-notice small{display:block}.scan-notice small{margin-top:3px;line-height:1.5}.warning-soft{background:#fff8ed;border:1px solid #eee0c8;color:#7d694b}.warning-soft .scan-notice-icon{background:#f4ead8;color:#8d714b}
/* keep voting pages coherent */
.hero-card{background:#fff;border-radius:22px;border:1px solid var(--line);box-shadow:var(--shadow);padding:clamp(22px,4vw,44px);text-align:center}.hero-card h1{font-size:clamp(1.8rem,4vw,3rem);margin:.2rem 0 .6rem;letter-spacing:-.03em}.hero-card p{max-width:720px;margin:.2rem auto 1.6rem;color:var(--muted);line-height:1.7}.scanner-box{margin:1rem auto 0;max-width:680px;border:1px solid #dbe6ec;border-radius:22px;background:#f8fbfc;padding:18px}.camera-wrap{position:relative;aspect-ratio:16/9;border-radius:16px;overflow:hidden;background:#0f172a}.camera-wrap video{width:100%;height:100%;object-fit:cover;display:block}.scan-frame{position:absolute;inset:16%;border:3px solid rgba(255,255,255,.92);border-radius:18px;box-shadow:0 0 0 9999px rgba(15,23,42,.2)}.scan-line{position:absolute;left:21%;right:21%;height:2px;top:50%;background:#8fc2d8;box-shadow:0 0 12px #8fc2d8;animation:scan 2s ease-in-out infinite}@keyframes scan{0%,100%{transform:translateY(-60px)}50%{transform:translateY(60px)}}.manual-entry{margin:16px auto 0;max-width:680px;display:grid;grid-template-columns:1fr auto;gap:.7rem}.scan-status{margin-top:.8rem;font-weight:700;color:var(--muted)}
.election-heading{text-align:center;margin:4px 0 24px}.election-heading h1{margin:.2rem 0;font-size:clamp(1.6rem,3vw,2.4rem)}.election-heading p{margin:.35rem 0;color:var(--muted)}.voter-banner{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#edf5f8;border:1px solid #d7e6ec;border-radius:16px;padding:12px 16px;margin-bottom:18px}.voter-banner strong{display:block}.voter-banner small{color:#527489}.candidate-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(205px,1fr));gap:18px}.candidate-card{position:relative;background:#fff;border:2px solid #dce8f1;border-radius:18px;overflow:hidden;box-shadow:0 8px 22px rgba(15,23,42,.06);cursor:pointer;transition:.2s}.candidate-card:hover{transform:translateY(-4px);border-color:#9dbbc9;box-shadow:0 14px 30px rgba(58,91,111,.13)}.candidate-photo{aspect-ratio:4/5;background:linear-gradient(135deg,#e6eef2,#e2e8f0);display:flex;align-items:center;justify-content:center;overflow:hidden}.candidate-photo img{width:100%;height:100%;object-fit:cover}.candidate-photo .placeholder{font-size:4rem}.candidate-info{padding:14px;text-align:center}.candidate-no{width:44px;height:44px;border-radius:50%;background:#607f91;color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.25rem;font-weight:900;margin:-35px auto 8px;position:relative;border:4px solid #fff}.candidate-info h3{margin:.25rem 0;font-size:1.05rem}.candidate-info p{font-size:.82rem;color:var(--muted);margin:.25rem 0;min-height:2.3em}.select-button{margin-top:.7rem;width:100%;background:#4e7188;color:#fff;border:0;border-radius:10px;padding:.7rem;font-weight:800}.candidate-card form{margin:0}.confirm-wrap{max-width:720px;margin:20px auto}.confirm-card{background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);overflow:hidden}.confirm-head{background:linear-gradient(110deg,#3d5e72,#53778d);color:#fff;text-align:center;padding:22px}.confirm-head h2{margin:.2rem}.confirm-body{padding:24px}.confirm-candidate{display:grid;grid-template-columns:180px 1fr;gap:24px;align-items:center}.confirm-candidate .candidate-photo{border-radius:18px}.confirm-name h2{font-size:1.8rem;margin:.35rem 0}.confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}.notice-box{padding:13px 15px;border-radius:12px;background:#fff8ed;border:1px solid #eee0c8;color:#80694a;font-size:.9rem;margin-top:16px}.success-panel{max-width:720px;margin:35px auto;text-align:center;background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);padding:clamp(25px,5vw,48px)}.success-icon{width:92px;height:92px;border-radius:50%;background:#e7f3ec;color:#527864;display:flex;align-items:center;justify-content:center;margin:0 auto 18px;font-size:3rem;font-weight:900}.success-panel h1{margin:.2rem 0}.success-panel p{color:var(--muted);line-height:1.6}.receipt{margin:22px auto 18px;max-width:440px;border:1px dashed #94a3b8;border-radius:14px;padding:18px;background:#fff}.receipt h3{margin:.1rem 0 .6rem}.receipt-grid{display:grid;grid-template-columns:120px 1fr;text-align:left;gap:.5rem;font-size:.9rem}.receipt-grid b{color:#475569}.success-actions{display:flex;justify-content:center;gap:.8rem;flex-wrap:wrap}
@media(max-width:1040px){.scan-shell-card{grid-template-columns:1fr;gap:22px}.scan-intro-panel{padding:0}.scanner-panel-modern{max-width:780px;width:100%;margin:0 auto}.scan-lead{max-width:720px}}
@media(max-width:620px){.vote-top{min-height:64px;padding:10px 14px}.vote-top .date{display:none}.brand-logo{width:42px;height:42px}.vote-main{padding:16px 0 25px;width:min(94vw,1240px)}.scan-shell-card{padding:18px 14px;border-radius:21px;gap:18px}.scan-intro-panel h1{font-size:2rem;margin-top:14px}.scan-lead{font-size:.9rem;margin-bottom:17px}.camera-permission-card{grid-template-columns:auto minmax(0,1fr);padding:11px}.permission-badge{grid-column:2;width:max-content}.scan-primary-actions{display:grid;grid-template-columns:1fr}.scan-primary-actions .btn{width:100%}.modern-manual{grid-template-columns:1fr}.modern-manual .btn{width:100%}.scanner-panel-modern{padding:10px;border-radius:18px}.camera-wrap.modern-camera{border-radius:14px;aspect-ratio:4/3}.scan-frame.modern-frame{left:15%;right:15%;top:16%;bottom:16%}.scanner-panel-head{padding:3px 3px 10px}.scanner-panel-head strong{font-size:.8rem}.camera-live-pill{font-size:.62rem}.manual-divider{margin-top:17px}.candidate-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.candidate-card{border-radius:14px}.candidate-info{padding:10px}.candidate-info p{display:none}.candidate-no{width:38px;height:38px;margin-top:-28px}.confirm-candidate{grid-template-columns:120px 1fr;gap:14px}.confirm-name h2{font-size:1.25rem}.confirm-actions{grid-template-columns:1fr}.voter-banner{align-items:flex-start;flex-direction:column}.receipt-grid{grid-template-columns:95px 1fr}}
/* admin - RK.ID soft semi-3D refresh v1.1 */
.admin-body{
  --admin-bg:#f1f4f8;
  --admin-surface:#ffffff;
  --admin-surface-2:#f8fafc;
  --admin-ink:#172033;
  --admin-muted:#718096;
  --admin-line:#dce3ec;
  --admin-primary:#365f7d;
  --admin-primary-2:#294d68;
  --admin-primary-soft:#eaf1f6;
  --admin-danger:#b95c61;
  --admin-ok:#3e7d64;
  --admin-shadow:0 10px 24px rgba(29,45,68,.07),0 2px 5px rgba(29,45,68,.04);
  --admin-shadow-hover:0 15px 32px rgba(29,45,68,.11),0 4px 9px rgba(29,45,68,.05);
  background:linear-gradient(180deg,#f5f7fa 0%,var(--admin-bg) 100%);
  color:var(--admin-ink);
}
.ui-icon,.nav-icon,.btn-svg,.note-icon,.preview-icon,.thumb-icon,.empty-icon{display:inline-block;flex:0 0 auto}
.ui-icon{width:20px;height:20px}.nav-icon{width:19px;height:19px}.btn-svg{width:17px;height:17px}.note-icon{width:17px;height:17px}.preview-icon{width:46px;height:46px}.thumb-icon{width:23px;height:23px}.empty-icon{width:36px;height:36px}
.admin-top{
  height:72px;background:linear-gradient(180deg,#182235 0%,#141d2d 100%);color:#fff;
  display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:40;
  border-bottom:1px solid rgba(255,255,255,.06);box-shadow:0 7px 22px rgba(15,23,42,.11)
}
.admin-brand{display:flex;align-items:center;gap:11px;min-width:0}.admin-brand-mark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,#426f90,#294e6a);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 7px 14px rgba(0,0,0,.15)}
.admin-brand-mark .ui-icon{width:20px;height:20px}.admin-top strong,.admin-top small{display:block}.admin-top strong{font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}.admin-top small{color:#9caec0;font-size:.72rem;margin-top:2px;letter-spacing:.02em}
.admin-user{display:flex;align-items:center;gap:.8rem;font-size:.88rem}.admin-user-name{color:#dce5ed}.status-pill{display:inline-flex;align-items:center;gap:7px;font-size:.67rem;font-weight:800;letter-spacing:.03em;border-radius:999px;padding:.42rem .67rem;border:1px solid rgba(255,255,255,.08);box-shadow:inset 0 1px 0 rgba(255,255,255,.06)}.status-pill i{width:7px;height:7px;border-radius:50%;display:block}.status-pill.open{background:rgba(43,104,77,.34);color:#d5f3e4}.status-pill.open i{background:#78c7a0;box-shadow:0 0 0 3px rgba(120,199,160,.12)}.status-pill.closed{background:rgba(128,53,58,.30);color:#f2d6d7}.status-pill.closed i{background:#d9898e;box-shadow:0 0 0 3px rgba(217,137,142,.10)}
.admin-shell{display:grid;grid-template-columns:238px minmax(0,1fr);min-height:calc(100vh - 72px)}
.admin-nav{background:linear-gradient(180deg,#182235 0%,#151e2e 100%);color:#b9c6d3;padding:17px 12px 14px;display:flex;flex-direction:column;justify-content:space-between;gap:18px;border-right:1px solid rgba(255,255,255,.035)}
.admin-nav-group{display:flex;flex-direction:column;gap:5px}.admin-nav a{position:relative;display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:12px;font-weight:650;font-size:.88rem;color:#aebdcb;transition:transform .18s ease,background .18s ease,color .18s ease,box-shadow .18s ease}.admin-nav a:hover{background:rgba(255,255,255,.055);color:#fff;transform:translateX(2px)}.admin-nav a.active{background:linear-gradient(145deg,rgba(76,120,151,.36),rgba(57,92,119,.25));color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 7px 16px rgba(0,0,0,.10)}.admin-nav a.active:before{content:"";position:absolute;left:-12px;width:3px;height:22px;border-radius:0 4px 4px 0;background:#7ea5c0}.admin-nav .logout-link{color:#d9b1b3}.admin-nav .logout-link:hover{background:rgba(155,75,81,.12);color:#f1d0d2}
.admin-main{padding:27px clamp(18px,2.4vw,34px) 42px;min-width:0;animation:adminFade .32s ease both}@keyframes adminFade{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.page-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.page-title h1{font-size:clamp(1.45rem,2vw,1.75rem);line-height:1.2;margin:0;color:#172033;letter-spacing:-.025em}.page-subtitle{font-size:.79rem;color:var(--admin-muted);margin-top:5px}
.admin-body .btn{border-radius:12px;padding:.72rem .98rem;font-weight:700;letter-spacing:-.01em;transition:transform .18s ease,box-shadow .18s ease,background .18s ease,border-color .18s ease,color .18s ease,filter .18s ease;box-shadow:0 3px 7px rgba(31,48,70,.07);border:1px solid transparent;min-height:42px}.admin-body .btn:hover{transform:translateY(-2px);filter:none;box-shadow:0 8px 16px rgba(31,48,70,.10)}.admin-body .btn:active{transform:translateY(0);box-shadow:0 2px 5px rgba(31,48,70,.07)}.admin-body .btn.primary{background:linear-gradient(180deg,#416f90 0%,var(--admin-primary) 100%);color:#fff;border-color:#315873;box-shadow:0 5px 11px rgba(54,95,125,.20),inset 0 1px 0 rgba(255,255,255,.18)}.admin-body .btn.primary:hover{background:linear-gradient(180deg,#477899 0%,#315976 100%)}.admin-body .btn.outline{background:linear-gradient(180deg,#fff,#f7f9fb);border-color:var(--admin-line);color:#405267;box-shadow:0 3px 7px rgba(31,48,70,.05),inset 0 1px 0 #fff}.admin-body .btn.outline:hover{border-color:#cbd5df;background:#fff;color:#27394d}.admin-body .btn.soft{background:linear-gradient(180deg,#f4f8fb,#eaf1f6);border-color:#d7e2eb;color:#3d617b}.admin-body .btn.danger,.admin-body .btn.danger-ghost{color:#a64e54}.admin-body .btn.danger{background:linear-gradient(180deg,#c86b70,#b2555a);border-color:#a94c52;color:#fff}.admin-body .btn.danger-ghost{background:#fff8f8;border-color:#ecd5d7}.admin-body .btn.danger-ghost:hover{background:#fff1f2;border-color:#debfc1}.admin-body .btn.success{background:linear-gradient(180deg,#4c8a70,#39765e);border-color:#326a55;color:#fff}.admin-body .btn.sm{min-height:35px;padding:.48rem .68rem;border-radius:10px;font-size:.80rem}.icon-label{white-space:nowrap}
.admin-body .input,.admin-body .select,.admin-body .textarea{border:1px solid #cfd8e2;background:linear-gradient(180deg,#fff,#fcfdfe);border-radius:12px;padding:.76rem .84rem;color:#263649;outline:none;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;box-shadow:inset 0 1px 2px rgba(15,23,42,.025)}.admin-body .input:hover,.admin-body .select:hover,.admin-body .textarea:hover{border-color:#bdc9d6}.admin-body .input:focus,.admin-body .select:focus,.admin-body .textarea:focus{border-color:#7196b0;background:#fff;box-shadow:0 0 0 3px rgba(73,112,143,.10)}.admin-body .label{color:#34465a;font-size:.82rem;font-weight:750}.admin-body .help{color:#8290a1}.admin-body .textarea{min-height:105px}
.admin-body .alert{display:flex;align-items:flex-start;gap:10px;padding:.82rem .95rem;border-radius:13px;margin:0 0 1rem;border:1px solid;font-size:.88rem;box-shadow:0 5px 14px rgba(31,48,70,.035);animation:alertIn .25s ease both}@keyframes alertIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}.alert-icon{display:grid;place-items:center;flex:0 0 auto;margin-top:1px}.alert-icon .ui-icon{width:18px;height:18px}.admin-body .alert.success{background:#f0f8f4;border-color:#cce4d7;color:#2f684f}.admin-body .alert.error{background:#fff4f4;border-color:#efcecf;color:#9f464b}.admin-body .alert.warning{background:#fff9ef;border-color:#ecdcb9;color:#87652d}.admin-body .alert.info{background:#f1f6fa;border-color:#d3e0e9;color:#3a607a}
.admin-body .card{background:linear-gradient(180deg,#fff 0%,#fcfdff 100%);border:1px solid var(--admin-line);border-radius:18px;box-shadow:var(--admin-shadow);transition:box-shadow .22s ease,transform .22s ease}.admin-body .card:hover{box-shadow:var(--admin-shadow-hover)}.admin-body .card-pad{padding:18px}.toolbar{display:flex;gap:.7rem;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:1rem}.toolbar .left,.toolbar .right{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}.toolbar-note{font-size:.84rem;color:var(--admin-muted);background:#f7f9fb;border:1px solid #e2e7ed;padding:8px 11px;border-radius:11px}.toolbar-note .note-icon{color:#66859c}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.stat-card{position:relative;overflow:hidden;background:linear-gradient(145deg,#fff,#f9fbfd);border:1px solid var(--admin-line);border-radius:17px;padding:17px;box-shadow:var(--admin-shadow);transition:transform .2s ease,box-shadow .2s ease}.stat-card:after{content:"";position:absolute;right:-26px;top:-32px;width:95px;height:95px;border-radius:50%;background:radial-gradient(circle,rgba(74,112,142,.09),rgba(74,112,142,0) 68%)}.stat-card:hover{transform:translateY(-2px);box-shadow:var(--admin-shadow-hover)}.stat-card .labelx{color:var(--admin-muted);font-size:.77rem;font-weight:700}.stat-card .value{font-size:1.75rem;font-weight:850;margin-top:.25rem;letter-spacing:-.03em}.stat-card .sub{font-size:.76rem;color:var(--admin-muted);margin-top:.3rem}.admin-grid2{display:grid;grid-template-columns:1.3fr .7fr;gap:16px}
.table-wrap{overflow:auto;border-radius:17px;background:#fff;border:1px solid var(--admin-line);box-shadow:var(--admin-shadow)}table.data{width:100%;border-collapse:collapse;min-width:720px}table.data th,table.data td{padding:13px 14px;border-bottom:1px solid #edf1f5;text-align:left;vertical-align:middle;font-size:.86rem}table.data th{background:linear-gradient(180deg,#fafbfd,#f5f8fa);color:#506276;font-size:.72rem;text-transform:uppercase;letter-spacing:.045em;position:sticky;top:0;z-index:1}table.data tbody tr{transition:background .16s ease}table.data tbody tr:hover td{background:#fafcff}table.data tbody tr:last-child td{border-bottom:0}.badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:.32rem .57rem;font-size:.70rem;font-weight:800;letter-spacing:.02em;border:1px solid transparent}.badge i{width:6px;height:6px;border-radius:50%;display:block}.badge.ok{background:#edf7f2;color:#347157;border-color:#d5e9de}.badge.ok i{background:#4d9271}.badge.no{background:#fff2f2;color:#a34c51;border-color:#f0d7d8}.badge.no i{background:#be676c}.badge.neutral{background:#f1f4f7;color:#607083;border-color:#e3e8ee}.badge.neutral i{background:#8795a4}.actions{display:flex;gap:.42rem;align-items:center;flex-wrap:wrap}.actions form{margin:0}.photo-thumb{width:48px;height:58px;border-radius:11px;object-fit:cover;background:#e8edf2;border:1px solid #dde4eb;box-shadow:0 4px 9px rgba(31,48,70,.08)}.photo-thumb-empty{display:grid;place-items:center;color:#8798a9;background:linear-gradient(145deg,#eef2f6,#e5ebf0)}.section-title{font-size:1.02rem;margin:0;color:#263649}.section-desc{font-size:.82rem;color:var(--admin-muted);margin:.35rem 0 0}.section-kicker{font-size:.66rem;font-weight:850;letter-spacing:.09em;color:#7890a3}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.icon-action{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;border:1px solid #e0e6ec;background:#fff;color:#738295;font-size:1.15rem;box-shadow:0 3px 8px rgba(31,48,70,.05);transition:.18s}.icon-action:hover{transform:translateY(-1px);color:#364a5e;border-color:#cbd6df;box-shadow:0 7px 13px rgba(31,48,70,.08)}
.progress{height:10px;background:#e7edf2;border-radius:999px;overflow:hidden;box-shadow:inset 0 1px 2px rgba(31,48,70,.06)}.progress>span{display:block;height:100%;background:linear-gradient(90deg,#4d7794,#365f7d);border-radius:inherit}.result-row{margin-bottom:14px}.result-head{display:flex;justify-content:space-between;gap:1rem;margin-bottom:5px;font-size:.88rem}
.qr-mini{width:90px;height:90px}.qr-card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.qr-card{background:#fff;border:1px solid #cbd5e1;border-radius:13px;padding:12px;display:grid;grid-template-columns:104px 1fr;gap:10px;align-items:center;break-inside:avoid;box-shadow:0 5px 12px rgba(31,48,70,.05)}.qr-card h3{margin:.1rem 0;font-size:.95rem}.qr-card p{margin:.2rem 0;font-size:.75rem;color:#475569}.qr-card .code{font-family:ui-monospace,monospace;font-size:.68rem;word-break:break-all}
.login-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 20% 15%,#385a73 0,transparent 34%),linear-gradient(145deg,#151f30,#263b50)}.login-box{width:min(420px,92vw);background:linear-gradient(180deg,#fff,#fbfcfd);border:1px solid rgba(255,255,255,.7);border-radius:22px;padding:27px;box-shadow:0 22px 56px rgba(0,0,0,.24),inset 0 1px 0 #fff}.login-box h1{margin:.1rem 0 .4rem}.login-box p{color:var(--muted);margin:.2rem 0 1.4rem}.empty{padding:30px;text-align:center;color:var(--admin-muted)}
/* Candidate page */
.candidate-form-card{margin-bottom:18px}.candidate-form-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:22px;align-items:start}.candidate-photo-panel{background:linear-gradient(145deg,#f8fafc,#f1f5f8);border:1px solid #e0e6ed;border-radius:16px;padding:13px;box-shadow:inset 0 1px 0 #fff}.photo-preview{aspect-ratio:4/5;width:100%;border-radius:13px;overflow:hidden;background:linear-gradient(145deg,#eaf0f5,#dfe7ed);display:grid;place-items:center;border:1px solid #d8e0e8;box-shadow:inset 0 1px 2px rgba(31,48,70,.05);margin-bottom:11px}.photo-preview img{width:100%;height:100%;object-fit:cover;display:block}.photo-preview-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#8595a5;font-size:.78rem}.upload-button{cursor:pointer}.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.candidate-fields{min-width:0}.switch-row{display:flex;align-items:center;gap:11px;padding:11px 12px;border:1px solid #e0e6ec;background:#fafcfd;border-radius:13px;margin:2px 0 16px;cursor:pointer}.switch-row input{position:absolute;opacity:0;pointer-events:none}.switch-ui{width:40px;height:23px;border-radius:999px;background:#c9d2db;position:relative;transition:.18s;flex:0 0 auto;box-shadow:inset 0 1px 2px rgba(31,48,70,.12)}.switch-ui:after{content:"";position:absolute;width:17px;height:17px;border-radius:50%;background:#fff;left:3px;top:3px;box-shadow:0 2px 5px rgba(31,48,70,.20);transition:.18s}.switch-row input:checked+.switch-ui{background:#5d806f}.switch-row input:checked+.switch-ui:after{transform:translateX(17px)}.switch-row span:last-child{display:flex;flex-direction:column;gap:2px}.switch-row strong{font-size:.82rem;color:#34465a}.switch-row small{font-size:.72rem;color:#8290a1}.form-actions{padding-top:2px}.candidate-table-wrap{animation:tableRise .32s ease both}@keyframes tableRise{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}.candidate-number{width:34px;height:34px;border-radius:11px;background:linear-gradient(145deg,#eef3f7,#e4ebf1);display:grid;place-items:center;font-weight:850;color:#3f6179;border:1px solid #d9e2ea;box-shadow:inset 0 1px 0 #fff}.candidate-name-cell{display:flex;flex-direction:column;gap:4px}.candidate-name-cell strong{font-size:.91rem;color:#243548}.candidate-name-cell small{font-size:.76rem;color:#7c8b9b;max-width:380px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.candidate-actions{min-width:250px}.empty-state{padding:46px 20px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:280px}.empty-state-icon{width:76px;height:76px;border-radius:22px;display:grid;place-items:center;color:#69879d;background:linear-gradient(145deg,#eff4f8,#e4ebf1);border:1px solid #dae3ea;box-shadow:inset 0 1px 0 #fff,0 8px 17px rgba(31,48,70,.07);margin-bottom:14px}.empty-state h2{font-size:1.08rem;margin:0;color:#304357}.empty-state p{max-width:460px;margin:7px auto 16px;color:#7a8999;font-size:.84rem}
.install-page{min-height:100vh;background:#eef3f7;padding:34px 14px}.install-box{max-width:820px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:22px;padding:26px;box-shadow:var(--shadow)}.install-box h1{margin-top:0}.install-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:22px}.install-step{padding:10px;background:#f1f5f9;border-radius:10px;text-align:center;font-size:.8rem;font-weight:750}
@media(max-width:1000px){.admin-shell{grid-template-columns:210px minmax(0,1fr)}.candidate-form-layout{grid-template-columns:180px minmax(0,1fr)}}
@media(max-width:900px){.admin-shell{grid-template-columns:1fr}.admin-nav{position:sticky;top:72px;z-index:30;display:flex;flex-direction:row;justify-content:flex-start;overflow-x:auto;white-space:nowrap;padding:9px 10px;gap:7px;box-shadow:0 8px 18px rgba(15,23,42,.10)}.admin-nav-group{display:flex;flex-direction:row;gap:5px}.admin-nav-bottom{margin-left:auto}.admin-nav a{padding:9px 11px}.admin-nav a.active:before{display:none}.admin-main{padding:18px 14px 34px}.stats-grid{grid-template-columns:repeat(2,1fr)}.admin-grid2{grid-template-columns:1fr}.candidate-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.qr-card-grid{grid-template-columns:repeat(2,1fr)}.candidate-form-layout{grid-template-columns:165px minmax(0,1fr)}}
@media(max-width:680px){.admin-top{height:64px;padding:0 12px}.admin-shell{min-height:calc(100vh - 64px)}.admin-nav{top:64px}.admin-user-name{display:none}.admin-top strong{max-width:48vw}.page-subtitle{display:none}.candidate-form-layout{grid-template-columns:1fr}.candidate-photo-panel{max-width:220px;width:100%;margin:0 auto}.candidate-toolbar{align-items:stretch}.candidate-toolbar .right{width:100%}.toolbar-note{justify-content:center;width:100%}.candidate-actions{min-width:0}.candidate-actions .icon-label span{display:none}.candidate-actions .btn{width:36px;height:36px;padding:0}.candidate-actions form{display:inline-flex}.section-head{margin-bottom:15px}}
@media(max-width:620px){.vote-top{height:auto;padding:12px 14px}.vote-top .date{display:none}.brand-logo{width:42px;height:42px}.vote-main{padding:16px 0 24px}.hero-card{padding:20px 14px;border-radius:18px}.manual-entry{grid-template-columns:1fr}.candidate-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.candidate-card{border-radius:14px}.candidate-info{padding:10px}.candidate-info p{display:none}.candidate-no{width:38px;height:38px;margin-top:-28px}.confirm-candidate{grid-template-columns:120px 1fr;gap:14px}.confirm-name h2{font-size:1.25rem}.confirm-actions{grid-template-columns:1fr}.voter-banner{align-items:flex-start;flex-direction:column}.stats-grid{grid-template-columns:1fr 1fr;gap:8px}.stat-card{padding:12px}.stat-card .value{font-size:1.4rem}.form-row{grid-template-columns:1fr}.qr-card-grid{grid-template-columns:1fr}.install-steps{grid-template-columns:1fr}.receipt-grid{grid-template-columns:95px 1fr}}
@media print{.no-print,.admin-top,.admin-nav,.toolbar,.page-title{display:none!important}.admin-shell{display:block}.admin-main{padding:0}.qr-card-grid{grid-template-columns:repeat(3,1fr);gap:8mm}.qr-card{box-shadow:none;border:1px solid #777;page-break-inside:avoid}.receipt{border:1px dashed #000}.success-actions,.vote-top{display:none!important}.success-panel{box-shadow:none;border:0;margin:0;padding:0}.vote-body{background:#fff}}

/* =========================================================
   RK.ID V1.4 — Responsive Surat Suara
   Memperbaiki card calon yang melebar saat jumlah calon sedikit.
   ========================================================= */

/* Heading surat suara dibuat lebih ringkas */
.election-heading{
  margin:2px auto 20px;
  max-width:760px;
}
.election-heading h1{
  font-size:clamp(1.65rem,2.6vw,2.45rem);
  letter-spacing:-.035em;
  line-height:1.08;
}
.election-heading p{
  font-size:clamp(.88rem,1.15vw,1rem);
  line-height:1.55;
}

/* Banner pemilih tidak terlalu tinggi */
.voter-banner{
  max-width:1180px;
  margin:0 auto 20px;
  padding:11px 15px;
  border-radius:15px;
  background:rgba(239,246,249,.92);
  border-color:#d7e5eb;
  box-shadow:0 6px 16px rgba(47,72,88,.035),inset 0 1px 0 rgba(255,255,255,.9);
}
.voter-banner strong{font-size:.94rem;color:#203243}
.voter-banner small{font-size:.78rem;color:#698091;margin-top:3px;display:block}

/*
 * Grid tidak lagi memakai 1fr penuh.
 * Maksimal ukuran kartu desktop dijaga agar foto tidak membesar berlebihan.
 */
.candidate-grid{
  width:100%;
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,280px));
  justify-content:center;
  align-items:start;
  gap:clamp(14px,1.8vw,22px);
}

/* Satu dan dua calon tetap berada di tengah, bukan memenuhi layar */
.candidate-grid.candidate-count-1{grid-template-columns:minmax(230px,300px)}
.candidate-grid.candidate-count-2{grid-template-columns:repeat(2,minmax(230px,290px))}
.candidate-grid.candidate-count-3{grid-template-columns:repeat(3,minmax(220px,280px))}
.candidate-grid.candidate-count-4{grid-template-columns:repeat(4,minmax(210px,270px))}

.candidate-card{
  width:100%;
  min-width:0;
  border:1px solid #dce6eb;
  border-radius:20px;
  background:linear-gradient(180deg,#fff 0%,#fbfcfd 100%);
  box-shadow:0 10px 26px rgba(47,72,88,.075),0 2px 7px rgba(47,72,88,.035),inset 0 1px 0 #fff;
  overflow:hidden;
  transform:translateZ(0);
  transition:transform .22s cubic-bezier(.2,.75,.25,1),box-shadow .22s ease,border-color .22s ease;
}
.candidate-card:hover{
  transform:translateY(-4px);
  border-color:#b9ced9;
  box-shadow:0 17px 34px rgba(47,72,88,.12),0 4px 10px rgba(47,72,88,.05),inset 0 1px 0 #fff;
}

/* Foto dibuat konsisten: portrait ringkas, fokus ke wajah/badan atas */
.candidate-card .candidate-photo{
  aspect-ratio:4/4.8;
  max-height:340px;
  background:linear-gradient(145deg,#edf3f6,#dfe9ee);
  border-bottom:1px solid #e5ecef;
}
.candidate-card .candidate-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center top;
  transition:transform .35s cubic-bezier(.2,.75,.25,1);
}
.candidate-card:hover .candidate-photo img{transform:scale(1.018)}

.candidate-info{
  padding:13px 14px 14px;
}
.candidate-no{
  width:42px;
  height:42px;
  margin:-34px auto 8px;
  font-size:1rem;
  border:4px solid #fff;
  background:linear-gradient(180deg,#607f91,#496b7f);
  box-shadow:0 6px 13px rgba(51,83,102,.18),inset 0 1px 0 rgba(255,255,255,.22);
}
.candidate-info h3{
  margin:.25rem 0 .15rem;
  font-size:1rem;
  line-height:1.28;
  color:#253747;
}
.candidate-info p{
  margin:.2rem 0 0;
  min-height:0;
  font-size:.76rem;
  line-height:1.45;
  color:#768796;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.select-button{
  margin-top:10px;
  padding:.68rem .8rem;
  border-radius:12px;
  font-size:.77rem;
  letter-spacing:.02em;
  background:linear-gradient(180deg,#587b90,#45687d);
  border:1px solid #426276;
  box-shadow:0 6px 13px rgba(58,89,108,.14),inset 0 1px 0 rgba(255,255,255,.20);
  transition:transform .18s ease,box-shadow .18s ease;
}
.candidate-card:hover .select-button{
  box-shadow:0 9px 16px rgba(58,89,108,.19),inset 0 1px 0 rgba(255,255,255,.20);
}

/* Halaman konfirmasi juga tidak membesarkan foto */
.confirm-wrap{max-width:760px}
.confirm-card{border-color:#dce6eb;box-shadow:0 18px 46px rgba(47,72,88,.095)}
.confirm-head{background:linear-gradient(135deg,#496b7f,#5b7d91);padding:18px 22px}
.confirm-head h2{font-size:clamp(1.05rem,2vw,1.35rem)}
.confirm-body{padding:22px}
.confirm-candidate{
  grid-template-columns:150px minmax(0,1fr);
  gap:22px;
}
.confirm-candidate .candidate-photo{
  aspect-ratio:4/5;
  max-height:190px;
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(145deg,#edf3f6,#dfe9ee);
  border:1px solid #dce6eb;
  box-shadow:0 8px 20px rgba(47,72,88,.08);
}
.confirm-candidate .candidate-photo img{
  width:100%;height:100%;object-fit:cover;object-position:center top;
}
.confirm-name h2{font-size:clamp(1.35rem,2.2vw,1.8rem);line-height:1.15}

/* Tablet */
@media (max-width:980px){
  .vote-main{width:min(94vw,920px);padding-top:24px}
  .candidate-grid,
  .candidate-grid.candidate-count-3,
  .candidate-grid.candidate-count-4{
    grid-template-columns:repeat(2,minmax(210px,280px));
  }
}

/* HP lebar / tablet portrait */
@media (max-width:620px){
  .vote-main{width:min(94vw,600px);padding-top:14px}
  .election-heading{margin-bottom:14px;padding:0 6px}
  .election-heading h1{font-size:1.55rem}
  .voter-banner{margin-bottom:14px;padding:10px 12px}

  .candidate-grid,
  .candidate-grid.candidate-count-1,
  .candidate-grid.candidate-count-2,
  .candidate-grid.candidate-count-3,
  .candidate-grid.candidate-count-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .candidate-card{border-radius:15px}
  .candidate-card .candidate-photo{aspect-ratio:4/5;max-height:none}
  .candidate-info{padding:9px 8px 10px}
  .candidate-no{width:34px;height:34px;margin:-27px auto 6px;border-width:3px;font-size:.84rem}
  .candidate-info h3{font-size:.86rem}
  .candidate-info p{display:none}
  .select-button{padding:.58rem .35rem;border-radius:9px;font-size:.66rem;margin-top:7px}

  .confirm-wrap{margin:10px auto}
  .confirm-body{padding:16px}
  .confirm-candidate{grid-template-columns:105px minmax(0,1fr);gap:13px}
  .confirm-candidate .candidate-photo{max-height:138px;border-radius:13px}
  .confirm-name h2{font-size:1.18rem}
}

/* HP kecil: tetap dua kolom selama masih nyaman */
@media (max-width:390px){
  .candidate-grid,
  .candidate-grid.candidate-count-1,
  .candidate-grid.candidate-count-2,
  .candidate-grid.candidate-count-3,
  .candidate-grid.candidate-count-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .candidate-info h3{font-size:.8rem}
  .select-button{font-size:.62rem}
}

/* =========================================================
   RK.ID V1.5 — Calm Motion UI
   Full public voting motion, calm modern palette, micro-interactions.
   ========================================================= */
.vote-body{
  --calm-bg:#f2f6f6;
  --calm-bg-2:#eaf1f2;
  --calm-card:#fbfdfd;
  --calm-ink:#22333d;
  --calm-muted:#71828b;
  --calm-line:#d9e4e5;
  --calm-primary:#607986;
  --calm-primary-2:#516d7a;
  --calm-primary-3:#455f6b;
  --calm-sage:#7f9a91;
  --calm-sage-deep:#6e8a80;
  --calm-soft:#edf3f3;
  --calm-lilac:#8d91a4;
  --calm-shadow:0 18px 50px rgba(45,67,77,.10),0 3px 12px rgba(45,67,77,.045);
  --calm-ease:cubic-bezier(.22,.82,.24,1);
  color:var(--calm-ink);
  background:
    radial-gradient(circle at 8% 3%,rgba(179,207,204,.24),transparent 28%),
    radial-gradient(circle at 92% 10%,rgba(181,199,210,.22),transparent 27%),
    radial-gradient(circle at 48% 102%,rgba(207,216,225,.20),transparent 33%),
    linear-gradient(145deg,#f7f9f9 0%,var(--calm-bg) 50%,var(--calm-bg-2) 100%);
  overflow-x:hidden;
}
.vote-body:before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;opacity:.42;
  background-image:linear-gradient(rgba(92,119,130,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(92,119,130,.025) 1px,transparent 1px);
  background-size:32px 32px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),transparent 80%);
}
.vote-top{
  background:rgba(69,95,107,.92);
  border-bottom:1px solid rgba(255,255,255,.12);
  box-shadow:0 10px 28px rgba(39,59,68,.10);
  transition:background .4s ease,box-shadow .4s ease;
}
.brand-logo{
  color:var(--calm-primary-2);
  box-shadow:0 7px 18px rgba(38,58,67,.14),inset 0 1px 0 rgba(255,255,255,.96);
  transition:transform .4s var(--calm-ease),box-shadow .4s var(--calm-ease);
}
.brand-wrap:hover .brand-logo{transform:translateY(-2px) rotate(-2deg);box-shadow:0 12px 24px rgba(38,58,67,.17),inset 0 1px 0 rgba(255,255,255,.96)}
.header-location-dot{background:#b7d2c8;animation:calmDot 2.4s ease-in-out infinite}
@keyframes calmDot{0%,100%{box-shadow:0 0 0 4px rgba(183,210,200,.12)}50%{box-shadow:0 0 0 7px rgba(183,210,200,.04)}}

/* Entrance & page transition */
.motion-page{opacity:0;transform:translateY(8px);transition:opacity .46s var(--calm-ease),transform .46s var(--calm-ease),filter .28s ease}
.motion-ready .motion-page{opacity:1;transform:none}
.soft-page-exit .motion-page{opacity:0;transform:translateY(6px);filter:blur(2px)}
.motion-surface{transition:transform .4s var(--calm-ease),box-shadow .4s var(--calm-ease),border-color .35s ease,opacity .35s ease}

/* Heading */
.election-heading{margin:0 auto 19px}
.eyebrow-pill{
  width:max-content;margin:0 auto 11px;padding:6px 10px 6px 7px;border-radius:999px;display:flex;align-items:center;gap:7px;
  background:rgba(238,244,244,.90);border:1px solid #d9e5e5;color:#5f7681;font-size:.69rem;font-weight:850;letter-spacing:.08em;text-transform:uppercase;
  box-shadow:0 5px 14px rgba(59,83,93,.045);animation:eyebrowIn .6s .1s var(--calm-ease) both
}
.eyebrow-icon{width:24px;height:24px;border-radius:8px;display:grid;place-items:center;background:#fff;color:#6f8a81;box-shadow:0 3px 8px rgba(65,89,99,.07)}
.eyebrow-icon svg{width:14px;height:14px;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
@keyframes eyebrowIn{from{opacity:0;transform:translateY(-5px) scale(.96)}to{opacity:1;transform:none}}
.election-heading h1{color:#263944;font-weight:900;letter-spacing:-.04em}
.election-heading p{color:#70818a;max-width:660px;margin:.45rem auto 0}

/* Voter banner */
.voter-banner-modern{background:rgba(248,251,251,.86);border:1px solid var(--calm-line);box-shadow:0 10px 28px rgba(48,72,82,.055),inset 0 1px 0 rgba(255,255,255,.96);backdrop-filter:blur(12px)}
.voter-identity{display:flex;align-items:center;gap:10px}
.voter-avatar{width:38px;height:38px;flex:0 0 auto;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,#f3f7f7,#e4eeee);color:#637e88;border:1px solid #dae6e7;box-shadow:0 6px 14px rgba(52,77,87,.06),inset 0 1px 0 #fff}
.voter-avatar svg{width:19px;height:19px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.qr-valid-badge{display:inline-flex;align-items:center;gap:6px!important;background:#edf6f1!important;color:#567a6b!important;border:1px solid #d5e9df!important;box-shadow:0 5px 12px rgba(72,106,91,.045)}
.qr-valid-badge svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* Candidate cards — soft 3D + press/select motion */
.candidate-grid{perspective:1100px}
.motion-candidate{
  --tilt-x:0deg;--tilt-y:0deg;--glow-x:50%;--glow-y:30%;
  opacity:0;transform:translateY(13px) scale(.985) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style:preserve-3d;
  transition:opacity .45s var(--calm-ease),transform .42s var(--calm-ease),box-shadow .42s var(--calm-ease),border-color .34s ease,filter .34s ease;
  transition-delay:var(--stagger,0ms);
}
.motion-ready .motion-candidate{opacity:1;transform:translateY(0) scale(1) rotateX(var(--tilt-x)) rotateY(var(--tilt-y))}
.candidate-card{
  border:1px solid #d9e4e5;
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,251,251,.98));
  box-shadow:0 12px 28px rgba(46,69,79,.075),0 2px 8px rgba(46,69,79,.035),inset 0 1px 0 #fff;
  position:relative;
}
.candidate-card:before{
  content:"";position:absolute;inset:0;z-index:2;pointer-events:none;opacity:0;border-radius:inherit;
  background:radial-gradient(circle at var(--glow-x) var(--glow-y),rgba(255,255,255,.64),transparent 30%);
  transition:opacity .3s ease
}
.candidate-card:hover:before{opacity:.7}
.candidate-card:hover{border-color:#c4d5d8;box-shadow:0 21px 42px rgba(47,70,80,.12),0 5px 13px rgba(47,70,80,.045),inset 0 1px 0 #fff}
.candidate-tap{all:unset;display:block;width:100%;cursor:pointer;position:relative;isolation:isolate;overflow:hidden;border-radius:inherit;-webkit-tap-highlight-color:transparent}
.candidate-card.is-pressed{transform:translateY(2px) scale(.982) rotateX(0deg) rotateY(0deg)!important;transition-duration:.12s!important}
.candidate-card .candidate-photo{background:linear-gradient(145deg,#eaf0f1,#dfe8e9);position:relative;overflow:hidden}
.candidate-card .candidate-photo img{filter:saturate(.94) contrast(.99);transition:transform .58s var(--calm-ease),filter .4s ease}
.candidate-card:hover .candidate-photo img{transform:scale(1.035);filter:saturate(1) contrast(1.01)}
.photo-glow{position:absolute;inset:0;background:linear-gradient(125deg,rgba(255,255,255,.20),transparent 38%,rgba(98,126,137,.07));opacity:.65;pointer-events:none;transition:opacity .35s ease}
.choice-selected-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:rgba(43,64,72,.44);backdrop-filter:blur(3px);color:#fff;font-size:.8rem;font-weight:850;letter-spacing:.08em;text-transform:uppercase;opacity:0;transform:scale(1.03);transition:opacity .28s ease,transform .45s var(--calm-ease);pointer-events:none}
.choice-check-bubble{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:rgba(245,250,248,.94);color:#6f9184;box-shadow:0 12px 30px rgba(29,49,55,.18);transform:scale(.45) rotate(-12deg);transition:transform .52s cubic-bezier(.18,1.35,.3,1)}
.choice-check-bubble svg{width:31px;height:31px;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:28;stroke-dashoffset:28}
.candidate-card.is-selected{z-index:4;border-color:#a9c4bb;box-shadow:0 26px 56px rgba(55,81,73,.16);transform:translateY(-7px) scale(1.025)!important;transition-delay:0ms!important}
.candidate-card.is-selected .candidate-photo img{transform:scale(1.055)}
.candidate-card.is-selected .choice-selected-overlay{opacity:1;transform:scale(1)}
.candidate-card.is-selected .choice-check-bubble{transform:scale(1) rotate(0)}
.candidate-card.is-selected .choice-check-bubble svg{animation:drawCheck .38s .2s ease forwards}
@keyframes drawCheck{to{stroke-dashoffset:0}}
.candidate-card.is-muted-choice{opacity:.52!important;filter:saturate(.65) blur(.2px);transform:scale(.965)!important;transition-delay:0ms!important}
.choice-is-transitioning .candidate-grid{pointer-events:none}
.candidate-info{position:relative;z-index:3}
.candidate-no{background:linear-gradient(180deg,#748d98,#5d7782);box-shadow:0 7px 16px rgba(54,80,91,.16),inset 0 1px 0 rgba(255,255,255,.25)}
.select-button{
  display:flex;align-items:center;justify-content:center;gap:8px;
  color:#f9fbfb;background:linear-gradient(180deg,#6d8792,#5b7480);border:1px solid #58717c;
  box-shadow:0 7px 15px rgba(60,83,92,.12),inset 0 1px 0 rgba(255,255,255,.18);
  text-transform:none;font-weight:780;letter-spacing:.005em;position:relative;overflow:hidden
}
.select-icon,.select-arrow{width:16px;height:16px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .35s var(--calm-ease)}
.select-arrow{margin-left:2px;width:15px}
.candidate-card:hover .select-arrow{transform:translateX(3px)}
.candidate-card:hover .select-icon{transform:rotate(-3deg) scale(1.06)}
.candidate-card.is-selected .select-button{background:linear-gradient(180deg,#789b8e,#65887b);border-color:#638478}
.tap-ripple{position:absolute;inset:auto;z-index:5;pointer-events:none}

/* General buttons */
.btn,.camera-primary,.camera-secondary{position:relative;overflow:hidden;isolation:isolate;transition:transform .26s var(--calm-ease),box-shadow .3s var(--calm-ease),background .3s ease,border-color .3s ease,color .3s ease,filter .3s ease!important}
.vote-body .btn.primary{background:linear-gradient(180deg,#68818d,#58717d);color:#fff;border:1px solid #536d79;box-shadow:0 8px 18px rgba(55,79,89,.14),inset 0 1px 0 rgba(255,255,255,.18)}
.vote-body .btn.accent{background:linear-gradient(180deg,#7f9a91,#6d8980);color:#fff;border:1px solid #68837a;box-shadow:0 8px 18px rgba(75,103,93,.14),inset 0 1px 0 rgba(255,255,255,.20)}
.vote-body .btn.outline{background:rgba(250,252,252,.94);border:1px solid #d7e2e3;color:#526871;box-shadow:0 7px 16px rgba(51,75,84,.05),inset 0 1px 0 rgba(255,255,255,.98)}
.vote-body .btn:hover,.camera-primary:hover,.camera-secondary:hover{transform:translateY(-2px);filter:none!important}
.vote-body .btn:active,.camera-primary:active,.camera-secondary:active{transform:translateY(1px) scale(.985)}
.btn-inline-icon{width:18px;height:18px;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.motion-ripple{position:absolute;width:12px;height:12px;border-radius:50%;background:rgba(255,255,255,.34);pointer-events:none;transform:translate(-50%,-50%) scale(0);animation:motionRipple .62s ease-out forwards;z-index:-1}
.btn.outline .motion-ripple,.camera-secondary .motion-ripple{background:rgba(92,121,132,.12)}
@keyframes motionRipple{to{transform:translate(-50%,-50%) scale(20);opacity:0}}

/* Confirm page */
.confirm-wrap{max-width:780px}
.confirm-card{border:1px solid #d9e4e5;background:rgba(252,254,254,.97);box-shadow:var(--calm-shadow)}
.confirm-head{position:relative;overflow:hidden;background:linear-gradient(135deg,#58727e,#6c858d);padding:22px 22px 20px}
.confirm-head:after{content:"";position:absolute;width:220px;height:220px;border-radius:50%;right:-90px;top:-130px;background:rgba(255,255,255,.07);animation:floatOrb 6s ease-in-out infinite}
@keyframes floatOrb{50%{transform:translate(-12px,14px) scale(1.06)}}
.confirm-head-icon{width:46px;height:46px;border-radius:15px;margin:0 auto 10px;display:grid;place-items:center;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.12);animation:confirmIconIn .65s .12s var(--calm-ease) both}
.confirm-head-icon svg{width:24px;height:24px;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@keyframes confirmIconIn{from{opacity:0;transform:translateY(-7px) scale(.78) rotate(-6deg)}to{opacity:1;transform:none}}
.confirm-head small{opacity:.78;letter-spacing:.12em;font-weight:850}.confirm-head h2{margin:.22rem 0 .3rem}.confirm-head p{margin:0;font-size:.82rem;opacity:.78}
.choice-preview-card{padding:12px;border-radius:19px;background:linear-gradient(145deg,#f8fbfb,#f2f6f6);border:1px solid #e0e8e8;box-shadow:0 9px 24px rgba(51,74,83,.045);transition:transform .45s var(--calm-ease),opacity .35s ease,filter .35s ease}
.confirm-photo-motion{position:relative;animation:confirmPhotoIn .65s .14s var(--calm-ease) both}
@keyframes confirmPhotoIn{from{opacity:0;transform:translateX(-14px) scale(.96)}to{opacity:1;transform:none}}
.confirmed-photo-badge{position:absolute;right:8px;bottom:8px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#eef7f2;color:#6b8d80;border:3px solid rgba(255,255,255,.94);box-shadow:0 7px 16px rgba(48,73,63,.13);animation:badgePop .56s .46s cubic-bezier(.17,1.35,.28,1) both}
.confirmed-photo-badge svg{width:18px;height:18px;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
@keyframes badgePop{from{opacity:0;transform:scale(.2) rotate(-15deg)}to{opacity:1;transform:none}}
.confirm-number-badge{display:inline-flex!important;align-items:center;gap:6px;background:#eef3f4!important;color:#607783!important;border:1px solid #dce6e7!important}
.confirm-number-badge svg{width:14px;height:14px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.choice-confirmed-row{display:flex;align-items:center;gap:8px;margin-top:10px;color:#72848b;font-size:.78rem;font-weight:650}
.choice-confirmed-dot{width:7px;height:7px;border-radius:50%;background:#85a69a;box-shadow:0 0 0 4px rgba(133,166,154,.11);animation:choiceDot 2.2s ease-in-out infinite}
@keyframes choiceDot{50%{box-shadow:0 0 0 7px rgba(133,166,154,.04)}}
.calm-notice{display:flex;align-items:flex-start;gap:11px;background:#f6f7f3;border:1px solid #e3e6dc;color:#677066;padding:12px 14px}
.calm-notice strong{display:block;color:#56625a;font-size:.86rem}.calm-notice small{display:block;line-height:1.5;margin-top:2px;color:#7d887f;font-size:.76rem}
.notice-modern-icon{width:34px;height:34px;flex:0 0 auto;border-radius:11px;display:grid;place-items:center;background:#fff;color:#788a7f;border:1px solid #e4e8e1;box-shadow:0 5px 12px rgba(78,92,82,.05)}
.notice-modern-icon svg{width:17px;height:17px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.confirm-actions{gap:10px}.confirm-actions form{margin:0}.back-choice-btn,.save-choice-btn{min-height:52px}
.button-loader{width:17px;height:17px;border:2px solid rgba(255,255,255,.34);border-top-color:#fff;border-radius:50%;display:none;animation:spinLoader .7s linear infinite}
@keyframes spinLoader{to{transform:rotate(360deg)}}
.save-choice-btn.is-saving .save-idle-icon{display:none}.save-choice-btn.is-saving .button-loader{display:inline-block}
.is-locking-choice .choice-preview-card{transform:scale(.985);filter:saturate(.88);opacity:.86}
.is-locking-choice .confirm-head-icon{animation:lockPulse .72s ease-in-out infinite alternate}
@keyframes lockPulse{to{transform:scale(1.07);background:rgba(255,255,255,.19)}}
.confirm-card.is-going-back{transform:translateX(-18px) scale(.985);opacity:.15;filter:blur(2px)}
.page-going-back .vote-top{opacity:.72;transition:opacity .3s ease}

/* Success */
.success-panel{position:relative;overflow:hidden;background:rgba(252,254,254,.96);border:1px solid #dae5e5;box-shadow:var(--calm-shadow)}
.success-icon{width:86px;height:86px;background:#edf6f1;color:#6d8f82;box-shadow:0 12px 28px rgba(70,100,88,.10),inset 0 1px 0 rgba(255,255,255,.95);animation:successIconIn .75s .08s cubic-bezier(.16,1.3,.3,1) both}
.success-icon svg{width:43px;height:43px;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@keyframes successIconIn{from{opacity:0;transform:scale(.45) rotate(-13deg)}to{opacity:1;transform:none}}
.success-check-icon svg{stroke-dasharray:30;stroke-dashoffset:30;animation:successCheckDraw .5s .42s ease forwards}
@keyframes successCheckDraw{to{stroke-dashoffset:0}}
.success-kicker{font-size:.69rem;letter-spacing:.12em;font-weight:850;color:#819098;margin-bottom:7px}
.success-orbit{position:absolute;width:150px;height:150px;left:50%;top:18px;transform:translateX(-50%);pointer-events:none}
.success-orbit span{position:absolute;width:7px;height:7px;border-radius:50%;background:#9bb8ad;left:50%;top:50%;opacity:.55;transform-origin:0 0;animation:orbitDot 3.8s linear infinite}
.success-orbit span:nth-child(2){background:#9fa9ba;animation-duration:4.8s;animation-delay:-1.3s}.success-orbit span:nth-child(3){background:#b0c3ca;animation-duration:5.6s;animation-delay:-2.1s}
@keyframes orbitDot{from{transform:rotate(0deg) translateX(68px)}to{transform:rotate(360deg) translateX(68px)}}
.modern-receipt{background:linear-gradient(180deg,#fbfdfd,#f5f9f9);border:1px solid #dbe6e6;border-radius:18px;box-shadow:0 10px 28px rgba(50,73,82,.055);text-align:left}
.receipt-title-row{display:flex;align-items:center;gap:11px;margin-bottom:14px}.receipt-title-row small{display:block;font-size:.65rem;color:#85949a;letter-spacing:.1em;font-weight:850}.receipt-title-row h3{margin:2px 0 0;color:#40545e;font-size:1rem}.receipt-title-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#eef4f4;color:#667f89;border:1px solid #dce7e7}.receipt-title-icon svg{width:19px;height:19px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.receipt-privacy{margin-top:14px;padding-top:12px;border-top:1px dashed #d5e0e0;display:flex;align-items:center;gap:8px;color:#7c8d93;font-size:.72rem}.receipt-privacy svg{width:16px;height:16px;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.error-icon{background:#f8eeee!important;color:#a46e6e!important}.neutral-icon{background:#eef3f5!important;color:#708894!important}
.calm-particle{position:absolute;left:50%;top:88px;width:7px;height:7px;border-radius:50%;background:#88a79b;pointer-events:none;opacity:0;--a:calc(var(--i)*36deg);animation:calmBurst 1.3s ease-out forwards;transform:translate(-50%,-50%) rotate(var(--a)) translateY(-8px)}
.calm-particle:nth-of-type(3n){background:#9aa8b8}.calm-particle:nth-of-type(4n){background:#b1c5ca}
@keyframes calmBurst{15%{opacity:.7}100%{opacity:0;transform:translate(-50%,-50%) rotate(var(--a)) translateY(-92px) scale(.4)}}

/* Scanner palette harmonization without changing camera logic */
.scan-shell-card{border-color:#d9e4e5!important;box-shadow:var(--calm-shadow)!important}
.scan-kicker{color:#5f7882!important;background:#edf3f4!important;border-color:#d9e5e6!important}
.scan-kicker-icon,.permission-icon,.camera-placeholder-icon{color:#657f89!important;background:#f7fafa!important}
.camera-permission-card{border-color:#dbe5e6!important;background:#f7fafa!important}
.permission-badge{background:#eef3f4!important;color:#697f88!important;border-color:#dbe5e6!important}
.camera-primary{background:linear-gradient(180deg,#6d8792,#5b7580)!important;border-color:#58717c!important;box-shadow:0 9px 19px rgba(58,82,91,.14)!important}
.camera-secondary{color:#58707a!important;border-color:#d5e0e1!important;background:#fafcfc!important}
.scanner-panel-modern{border-color:#d9e4e5!important;background:rgba(246,249,249,.82)!important;box-shadow:0 13px 30px rgba(50,74,83,.06)!important}
.modern-camera{background:linear-gradient(145deg,#1d3038,#263d47)!important}
.modern-line{background:linear-gradient(90deg,transparent,#8fc2c4,transparent)!important;box-shadow:0 0 12px rgba(143,194,196,.42)!important}
.camera-live-pill.active{background:#edf6f1!important;color:#648578!important;border-color:#d7e9df!important}

/* Mobile refinement */
@media(max-width:620px){
  .eyebrow-pill{font-size:.62rem;margin-bottom:8px}.eyebrow-icon{width:22px;height:22px}.voter-avatar{width:34px;height:34px;border-radius:10px}.qr-valid-badge{font-size:.68rem!important}
  .motion-candidate{transition-delay:calc(var(--stagger,0ms)*.35)}
  .candidate-card.is-selected{transform:translateY(-3px) scale(1.018)!important}
  .choice-check-bubble{width:48px;height:48px}.choice-check-bubble svg{width:26px;height:26px}
  .select-button{gap:5px}.select-icon{display:none}.select-arrow{width:13px}
  .confirm-head{padding:18px 14px 17px}.confirm-head-icon{width:40px;height:40px;border-radius:13px}.confirm-head p{font-size:.76rem}
  .choice-preview-card{padding:9px}.calm-notice{padding:10px 11px}.notice-modern-icon{width:31px;height:31px}
  .back-choice-btn,.save-choice-btn{min-height:48px;font-size:.9rem!important}
  .success-panel{padding:24px 16px}.success-icon{width:76px;height:76px}.success-icon svg{width:37px;height:37px}
}

@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}
  .motion-page,.motion-candidate{opacity:1!important;transform:none!important}
}

/* V1.5 micro-fix: preserve 3D tilt on hover and keep ripple above button paint */
.motion-ready .motion-candidate:hover{transform:translateY(-5px) scale(1.01) rotateX(var(--tilt-x)) rotateY(var(--tilt-y))}
.motion-ripple{z-index:0}
.btn-motion > *,.camera-primary > *,.camera-secondary > *{position:relative;z-index:1}
.candidate-tap > .motion-ripple{z-index:6}

/* =========================================================
   RK.ID V1.6 — flow reliability, anonymous receipt, kiosk UX
   ========================================================= */

/* Stop-camera PIN modal */
body.modal-open{overflow:hidden}
.camera-pin-modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:20px}
.camera-pin-backdrop{position:absolute;inset:0;background:rgba(20,34,42,.46);backdrop-filter:blur(8px);animation:pinBackdropIn .2s ease both}
.camera-pin-dialog{position:relative;width:min(420px,94vw);padding:26px;border-radius:24px;background:rgba(252,254,254,.98);border:1px solid rgba(217,229,231,.95);box-shadow:0 28px 75px rgba(31,49,59,.22),inset 0 1px 0 #fff;text-align:center;animation:pinDialogIn .3s cubic-bezier(.2,.8,.25,1) both}
@keyframes pinBackdropIn{from{opacity:0}to{opacity:1}}
@keyframes pinDialogIn{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}
.camera-pin-icon{width:54px;height:54px;border-radius:17px;margin:0 auto 12px;display:grid;place-items:center;background:#edf4f2;color:#66877b;border:1px solid #dbe8e3;box-shadow:0 8px 20px rgba(70,96,86,.08)}
.camera-pin-icon svg{width:28px;height:28px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.camera-pin-dialog h3{margin:0 0 7px;color:#273b45;font-size:1.18rem}.camera-pin-dialog p{margin:0 0 18px;color:#75858c;line-height:1.55;font-size:.88rem}
.camera-pin-input{text-align:center;letter-spacing:.18em;font-weight:800;font-size:1.1rem}
.camera-pin-error{margin-top:9px;padding:9px 11px;border-radius:11px;background:#fbefef;border:1px solid #efd4d4;color:#9a5656;font-size:.8rem}
.camera-pin-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:10px;margin-top:14px}

/* Anonymous success receipt */
.anonymous-receipt{max-width:360px;padding:18px 20px!important}
.receipt-qr-screen{display:grid;place-items:center;margin:10px auto 8px}.receipt-qr-screen canvas{border-radius:12px;box-shadow:0 6px 18px rgba(49,72,82,.08)}
.receipt-code-screen{text-align:center;font-weight:850;letter-spacing:.08em;color:#425963;font-size:.92rem;word-break:break-word}
.single-success-action{margin-top:14px}.print-next-btn{min-width:min(100%,330px);min-height:54px}
.print-ticket{display:none}

/* Admin settings — booth security */
.setting-check{display:flex;gap:.65rem;align-items:flex-start;margin-bottom:.55rem;color:#334155;font-size:.9rem}.setting-check input{margin-top:.2rem}.setting-help{margin:-.15rem 0 1rem}
.security-card-head{display:flex;gap:12px;align-items:flex-start;margin-bottom:14px}.security-card-icon{width:43px;height:43px;flex:0 0 auto;border-radius:13px;display:grid;place-items:center;background:#eef4f3;color:#647f78;border:1px solid #dde8e5}.security-card-icon .ui-icon{width:21px;height:21px}.small-text{font-size:.79rem}
.generated-pin-box{border:1px solid #d6e6df;background:linear-gradient(145deg,#f5faf7,#eef6f2);border-radius:15px;padding:15px;text-align:center;margin-bottom:13px}.generated-pin-box small{display:block;color:#72887f;font-weight:800;letter-spacing:.08em}.generated-pin-box strong{display:block;font-size:1.85rem;letter-spacing:.22em;color:#3f6456;margin:6px 0}.generated-pin-box span{display:block;color:#73837d;font-size:.78rem}
.camera-pin-status{display:flex;align-items:center;gap:8px;padding:11px 12px;border-radius:12px;background:#f7f9fa;border:1px solid #e2e8eb;color:#61717a;font-size:.84rem;margin-bottom:12px}.status-dot-admin{width:8px;height:8px;border-radius:50%;background:#b3bec3;box-shadow:0 0 0 4px rgba(179,190,195,.12)}.status-dot-admin.ready{background:#7da28f;box-shadow:0 0 0 4px rgba(125,162,143,.12)}.status-dot-admin.missing{background:#c3947b;box-shadow:0 0 0 4px rgba(195,148,123,.12)}
.security-inline-form{display:grid;grid-template-columns:1fr auto;gap:8px}.security-divider{display:flex;align-items:center;gap:10px;color:#9aa8ae;font-size:.73rem;text-transform:uppercase;margin:12px 0}.security-divider:before,.security-divider:after{content:"";height:1px;background:#e5ebee;flex:1}

/* Admin anonymous-receipt verifier */
.verify-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:18px;align-items:start}.verify-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}.verify-head p{margin:.25rem 0 0;line-height:1.55;font-size:.86rem}.verify-live-pill{display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:7px 10px;background:#f1f4f5;border:1px solid #e0e7ea;color:#728088;font-size:.72rem;font-weight:800;white-space:nowrap}.verify-live-pill i{width:7px;height:7px;border-radius:50%;background:#aeb9be}.verify-live-pill.active{background:#edf6f2;border-color:#d7e8df;color:#648176}.verify-live-pill.active i{background:#6f9b88;box-shadow:0 0 0 4px rgba(111,155,136,.12)}
.admin-camera-wrap{position:relative;overflow:hidden;border-radius:20px;background:linear-gradient(145deg,#1d3038,#263d47);aspect-ratio:16/10;border:1px solid #d6e1e5;box-shadow:0 12px 28px rgba(43,64,75,.12)}.admin-camera-wrap video{width:100%;height:100%;object-fit:cover;display:block}.admin-camera-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#d7e3e7;text-align:center;background:linear-gradient(145deg,#1d3038,#263d47)}.admin-camera-placeholder small{opacity:.7}.verify-placeholder-icon{width:42px;height:42px;stroke:currentColor}.admin-scan-corners{position:absolute;inset:15%;pointer-events:none}.admin-scan-corners span{position:absolute;width:34px;height:34px;border-color:#d6e6ea;border-style:solid}.admin-scan-corners span:nth-child(1){left:0;top:0;border-width:3px 0 0 3px;border-radius:10px 0 0 0}.admin-scan-corners span:nth-child(2){right:0;top:0;border-width:3px 3px 0 0;border-radius:0 10px 0 0}.admin-scan-corners span:nth-child(3){right:0;bottom:0;border-width:0 3px 3px 0;border-radius:0 0 10px 0}.admin-scan-corners span:nth-child(4){left:0;bottom:0;border-width:0 0 3px 3px;border-radius:0 0 0 10px}.admin-scan-line{position:absolute;left:20%;right:20%;top:50%;height:2px;background:linear-gradient(90deg,transparent,#92c3c4,transparent);box-shadow:0 0 10px rgba(146,195,196,.45);animation:adminScanLine 2.2s ease-in-out infinite}@keyframes adminScanLine{0%,100%{transform:translateY(-70px);opacity:.35}50%{transform:translateY(70px);opacity:1}}
.verify-controls{display:flex;gap:8px;margin-top:12px}.verify-controls .ui-icon{width:18px;height:18px}.verify-manual{display:grid;grid-template-columns:1fr auto;gap:8px}.verify-result-card{min-height:420px}.verify-empty{min-height:250px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#86949b;gap:6px}.verify-empty-icon{width:42px;height:42px;margin-bottom:6px;color:#9aabb2}.verify-empty strong{color:#586b74}.verify-empty span{font-size:.82rem}.verify-result{text-align:center;padding-top:14px}.verify-status-mark{width:66px;height:66px;border-radius:50%;margin:0 auto 12px;display:grid;place-items:center;font-size:1.9rem;font-weight:900}.verify-status-mark.valid{background:#eaf5ef;color:#5b8a74;border:1px solid #d4e8de}.verify-status-mark.invalid{background:#fbefef;color:#a66363;border:1px solid #efd7d7}.verify-status-title{font-size:1.22rem;font-weight:850;color:#324650}.verify-status-copy{margin:6px auto 16px;color:#75858d;line-height:1.5;font-size:.86rem;max-width:340px}.verify-meta{display:grid;grid-template-columns:1fr 1fr;gap:9px;text-align:left}.verify-meta>div{padding:11px 12px;border-radius:12px;background:#f7f9fa;border:1px solid #e3e9ec}.verify-meta small{display:block;color:#92a0a6;font-size:.62rem;letter-spacing:.08em;font-weight:850}.verify-meta strong{display:block;color:#465c66;font-size:.82rem;margin-top:3px;word-break:break-all}.verify-privacy-note{margin-top:16px!important;font-size:.81rem}

@media(max-width:900px){.verify-grid{grid-template-columns:1fr}.verify-result-card{min-height:unset}.verify-empty{min-height:180px}}
@media(max-width:620px){.camera-pin-actions,.security-inline-form,.verify-manual{grid-template-columns:1fr}.verify-meta{grid-template-columns:1fr}.verify-head{align-items:center}.anonymous-receipt{max-width:100%}}

/* Printing: anonymous code + QR only. No voter data, no candidate choice. */
@media print{
  @page{margin:0}
  html,body{background:#fff!important;width:auto!important;height:auto!important;min-height:0!important}
  body *{visibility:hidden!important}
  .print-ticket,.print-ticket *{visibility:visible!important}
  .print-ticket{display:block!important;position:absolute!important;left:0;top:0;width:100%;min-height:0;margin:0!important;padding:0!important;background:#fff!important}
  .print-ticket-inner{width:76mm;min-height:62mm;margin:0 auto;padding:5mm 4mm 4mm;text-align:center;color:#000;background:#fff}
  .print-ticket-title{font-size:10pt;font-weight:800;letter-spacing:.12em;margin-bottom:3mm}
  .print-ticket-qr{display:grid;place-items:center;margin:0 auto 2mm}.print-ticket-qr canvas{width:42mm!important;height:42mm!important;display:block}
  .print-ticket-code{font:800 10pt/1.25 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.06em;word-break:break-word}
}
