@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root{
  --primary:#124A34;
  --primary-deep:#0B3324;
  --primary-ink:#FFFFFF;
  --secondary:#33513F;
  --accent:#166F4C;
  --gold:#C99A02;
  --gold-ink:#4A3900;
  --bg:#F6F8F5;
  --fg:#0F1D16;
  --card:#FFFFFF;
  --muted:#EAF0EB;
  --muted-fg:#5B6E63;
  --border:#DEE7E0;
  --destructive:#DC2626;
  --success:#16A34A;
  --warning:#B45309;
  --radius:14px;
  --shadow-sm:0 1px 2px rgba(15,29,22,.07);
  --shadow-md:0 6px 20px -4px rgba(11,51,36,.18);
  --shadow-lg:0 20px 45px -12px rgba(11,51,36,.32);
}
*{box-sizing:border-box;}
html,body{min-height:100%;}
body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(201,154,2,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(18,74,52,.08), transparent 60%),
    var(--bg);
  color:var(--fg);
  font-family:'Source Sans 3', system-ui, sans-serif;
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,.font-head{font-family:'Lexend', system-ui, sans-serif;}
button,input,select{font-family:inherit;}
:focus-visible{outline:3px solid var(--accent); outline-offset:2px; border-radius:6px;}
@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important;}
}

.app{max-width:720px;margin:0 auto;padding:20px 16px 64px;}
.app.wide{max-width:1080px;}

.masthead{
  display:flex;align-items:center;gap:16px;padding:22px 18px;
  background-image:
    linear-gradient(135deg, rgba(11,51,36,.94), rgba(18,74,52,.86) 55%, rgba(11,51,36,.92)),
    url('img/kantor-bupati.webp');
  background-size:cover;
  background-position:center 62%;
  color:var(--primary-ink);border-radius:var(--radius);box-shadow:var(--shadow-md);
  position:relative;overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
}
.masthead::after{content:"";position:absolute;inset:0;background:radial-gradient(560px 220px at 92% -20%, rgba(201,154,2,.30), transparent 60%);pointer-events:none;}
.masthead::before{content:"";position:absolute;left:0;right:0;bottom:0;height:4px;background:linear-gradient(90deg,var(--gold),#8A6A01 50%,var(--gold));}
.seal{flex:0 0 auto;width:56px;height:56px;border-radius:50%;background:#fff;border:2px solid var(--gold);box-shadow:0 2px 10px rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;padding:5px;position:relative;z-index:1;}
.seal img{width:100%;height:100%;object-fit:contain;display:block;}
.eyebrow{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);font-weight:700;margin:0 0 3px;position:relative;z-index:1;}
.masthead h1{font-size:18px;margin:0;font-weight:700;line-height:1.32;position:relative;z-index:1;text-shadow:0 1px 3px rgba(0,0,0,.35);}
.masthead p{margin:4px 0 0;font-size:13px;opacity:.92;position:relative;z-index:1;}
@media (min-width:640px){
  .masthead{padding:28px 30px;}
  .seal{width:68px;height:68px;padding:6px;}
  .masthead h1{font-size:23px;}
}

.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:18px;margin-top:16px;}
@media (min-width:640px){.card{padding:24px;}}
.section-title{font-size:15px;font-weight:700;margin:0 0 4px;color:var(--primary);}
.section-hint{font-size:13px;color:var(--muted-fg);margin:0 0 16px;}

.cat-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
@media (min-width:560px){.cat-grid{grid-template-columns:repeat(3,1fr);}}
.cat-btn{display:flex;flex-direction:column;align-items:flex-start;gap:10px;text-align:left;padding:14px;border-radius:12px;border:1.5px solid var(--border);background:var(--card);cursor:pointer;min-height:44px;transition:border-color .18s ease, background .18s ease, transform .12s ease;}
.cat-btn:hover{border-color:var(--accent);}
.cat-btn:active{transform:scale(.98);}
.cat-btn[aria-pressed="true"]{border-color:var(--accent);background:#EEF6F1;box-shadow:0 0 0 3px rgba(22,111,76,.16);}
.cat-icon{width:38px;height:38px;border-radius:10px;background:var(--muted);color:var(--primary);display:flex;align-items:center;justify-content:center;flex:0 0 auto;}
.cat-btn[aria-pressed="true"] .cat-icon{background:var(--accent);color:#fff;}
.cat-icon svg{width:20px;height:20px;}
.cat-label{font-weight:700;font-size:14px;color:var(--fg);line-height:1.3;}
.cat-desc{font-size:12px;color:var(--muted-fg);}

.form-wrap{margin-top:20px;padding-top:20px;border-top:1px dashed var(--border);}
.field{margin-bottom:16px;}
.field label{display:block;font-size:13.5px;font-weight:600;margin-bottom:6px;color:var(--secondary);}
.field .req{color:var(--destructive);margin-left:2px;}
.field input,.field select{width:100%;padding:12px 14px;border-radius:10px;border:1.5px solid var(--border);font-size:16px;background:var(--bg);color:var(--fg);min-height:46px;transition:border-color .15s ease, background .15s ease;}
.field input:focus,.field select:focus{border-color:var(--accent);background:var(--card);}
.field .helper{font-size:12px;color:var(--muted-fg);margin-top:5px;}
.field.error input,.field.error select{border-color:var(--destructive);}
.field .error-msg{font-size:12.5px;color:var(--destructive);margin-top:5px;display:none;font-weight:600;}
.field.error .error-msg{display:block;}
.field-row{display:grid;gap:14px;}
@media (min-width:560px){.field-row.two{grid-template-columns:1fr 1fr;}}

.btn{appearance:none;border:0;cursor:pointer;font-weight:700;font-size:15px;border-radius:11px;padding:13px 20px;min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:filter .15s ease, transform .12s ease, opacity .15s ease;touch-action:manipulation;}
.btn:active{transform:scale(.98);}
.btn-primary{background:var(--primary);color:#fff;width:100%;}
.btn-primary:hover{filter:brightness(1.12);}
.btn-primary:disabled{opacity:.55;cursor:not-allowed;filter:none;}
.btn-ghost{background:var(--muted);color:var(--secondary);}
.btn-ghost:hover{background:#DCE3EC;}
.btn-outline{background:transparent;border:1.5px solid var(--border);color:var(--secondary);width:100%;}
.btn-outline:hover{border-color:var(--accent);color:var(--accent);}
.btn-danger{background:var(--destructive);color:#fff;}
.btn-danger:hover{filter:brightness(1.1);}
.btn svg{width:17px;height:17px;}
.spinner{width:17px;height:17px;border-radius:50%;border:2.5px solid rgba(255,255,255,.4);border-top-color:#fff;animation:spin .7s linear infinite;}
.spinner.dark{border:2.5px solid rgba(15,23,42,.18);border-top-color:var(--primary);}
@keyframes spin{to{transform:rotate(360deg);}}

.verify-box{border:1.5px dashed var(--border);border-radius:12px;padding:14px;margin-bottom:14px;}
.verify-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.verify-status{font-size:13px;font-weight:600;display:flex;align-items:center;gap:7px;}
.verify-status svg{width:16px;height:16px;flex:0 0 auto;}
.status-idle{color:var(--muted-fg);}
.status-loading{color:var(--accent);}
.status-ok{color:var(--success);}
.status-warn{color:var(--warning);}
.status-error{color:var(--destructive);}
.photo-preview{margin-top:12px;border-radius:10px;overflow:hidden;border:1.5px solid var(--border);max-width:260px;}
.photo-preview img{display:block;width:100%;height:auto;}

.privacy-note{display:flex;gap:8px;align-items:flex-start;margin-top:14px;padding:10px 12px;background:var(--muted);border-radius:10px;font-size:12.5px;color:var(--secondary);}
.privacy-note svg{width:15px;height:15px;flex:0 0 auto;margin-top:1px;color:var(--muted-fg);}

.success-wrap{text-align:center;padding:20px 10px 6px;}
.stamp{width:120px;height:120px;margin:0 auto 18px;position:relative;animation:stampDown .55s cubic-bezier(.2,1.6,.4,1) both;}
@keyframes stampDown{0%{transform:scale(2.6) rotate(-14deg);opacity:0;}55%{opacity:1;}75%{transform:scale(.94) rotate(-7deg);}100%{transform:scale(1) rotate(-7deg);opacity:1;}}
.stamp svg{width:100%;height:100%;}
.success-title{font-size:19px;font-weight:800;color:var(--primary);margin:0 0 6px;}
.success-name{font-size:15px;color:var(--fg);margin:0 0 2px;font-weight:600;}
.success-meta{font-size:13px;color:var(--muted-fg);margin:0 0 6px;}
.success-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:999px;font-size:12.5px;font-weight:700;margin-bottom:20px;}
.success-badge.ok{background:#DCFCE7;color:#166534;}
.success-badge.review{background:#FEF3C7;color:#92400E;}

.alert{padding:12px 14px;border-radius:10px;font-size:13.5px;font-weight:600;margin-top:14px;display:flex;gap:8px;align-items:flex-start;}
.alert svg{width:16px;height:16px;flex:0 0 auto;margin-top:1px;}
.alert-error{background:#FEF2F2;color:#991B1B;}
.alert-warn{background:#FFFBEB;color:#92400E;}
.alert-ok{background:#F0FDF4;color:#166534;}

.footer-link{text-align:center;margin-top:22px;}
.footer-link a{color:var(--muted-fg);font-size:12.5px;text-decoration:none;}
.footer-link a:hover{color:var(--accent);text-decoration:underline;}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
