:root {
  --bg: #0F2027;
  --bg-glow: #1B3C46;
  --panel: rgba(22, 51, 61, 0.72);
  --border-gold: rgba(201, 162, 75, 0.35);
  --gold: #C9A24B;
  --gold-light: #E4C578;
  --text: #F4EFE6;
  --text-muted: #9FB3B0;
  --text-hint: #6F8A88;
  --field-bg: rgba(10, 26, 31, 0.6);
  --field-border: rgba(159, 179, 176, 0.3);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Work Sans', system-ui, sans-serif;
  background: radial-gradient(circle at 50% 20%, var(--bg-glow) 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

.brand-title {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--gold);
  letter-spacing: 0.3px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
}

.field-label {
  font-size: 13px;
  color: #C7D1CE;
  margin-bottom: 6px;
  display: block;
}

.field-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 4px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.field-input:focus {
  outline: none;
  border-color: var(--gold);
}

textarea.field-input {
  height: auto;
  padding: 10px 14px;
  resize: vertical;
}

.btn-gold {
  height: 46px;
  background: var(--gold);
  border: none;
  border-radius: 4px;
  color: #1B2E1F;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-gold:hover { background: var(--gold-light); }

.btn-ghost {
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.hint { font-size: 12px; color: var(--text-hint); }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data-table th, table.data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-gold);
}

table.data-table th {
  color: var(--text-muted);
  font-weight: 500;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-gold);
}

.container-narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px;
}

.error-box {
  background: rgba(226, 74, 74, 0.12);
  border: 1px solid rgba(226, 74, 74, 0.4);
  color: #F0A5A5;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
}

.anak-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

@media print {
  body {
    background: #ffffff !important;
    color: #1a1a1a !important;
  }
  .no-print, .topbar a, .btn-gold, .btn-ghost {
    display: none !important;
  }
  .panel {
    background: #ffffff !important;
    border: 1px solid #999 !important;
    box-shadow: none !important;
  }
  .brand-title {
    color: #333 !important;
  }
  .field-label, .hint {
    color: #444 !important;
  }
  .field-input {
    background: #fff !important;
    border: 1px solid #999 !important;
    color: #1a1a1a !important;
  }
}

/* ===== TEMA PILOTSUS (hijau-putih) ===== */
:root {
  --bg: #f5faf6;
  --bg-glow: #effaf1;
  --panel: #effaf1;
  --border-gold: #d9eadc;
  --gold: #379e4b;
  --gold-light: #2c8a3e;
  --text: #08100a;
  --text-muted: #5b675e;
  --text-hint: #848484;
  --field-bg: #ffffff;
  --field-border: #dddfea;
}
body {
  background: var(--bg) !important;
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
  line-height: 1.6;
}
a { color: var(--gold); font-weight: 600; }
a:hover { color: var(--gold-light); }
.brand-title { color: var(--gold) !important; font-weight: 800; letter-spacing: -0.5px; }

.topbar {
  background: #379e4b;
  border-bottom: none;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 14px rgba(8,16,10,.12);
}
.topbar, .topbar * { color: #ffffff !important; }
.topbar .brand-title { color: #ffffff !important; }
.topbar .btn-ghost { border-color: rgba(255,255,255,.7); background: transparent; }

.panel {
  background: var(--panel) !important;
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 0 6px 24px rgba(8,16,10,.06) !important;
  backdrop-filter: none !important;
  overflow-x: auto;
}

.field-label { color: var(--text) !important; font-weight: 600; }
.field-input {
  background: var(--field-bg) !important;
  border: 1px solid var(--field-border) !important;
  border-radius: 10px !important;
  color: var(--text) !important;
}
.field-input:focus { border-color: var(--gold) !important; box-shadow: 0 0 0 3px rgba(55,158,75,.15); }

.btn-gold {
  background: var(--gold) !important;
  color: #ffffff !important;
  border-radius: 25px !important;
  font-weight: 700;
  padding: 0 28px;
  box-shadow: 6px 6px 0 -1px #ffffff, 6px 6px 0 0 var(--gold);
  transition: .3s all;
}
.btn-gold:hover { background: var(--gold-light) !important; transform: translate(3px,3px); box-shadow: 0 0 0 0 #fff, 0 0 0 0 var(--gold); }
.btn-ghost {
  background: #ffffff;
  border: 1px solid var(--gold) !important;
  border-radius: 25px !important;
  color: var(--gold) !important;
  font-weight: 600;
  padding: 0 20px;
}

table.data-table { background: #ffffff; border-radius: 14px; overflow: hidden; }
table.data-table th { background: #379e4b; color: #ffffff !important; font-weight: 700; }
table.data-table td { border-bottom: 1px solid #eef2ef; }
table.data-table tr:nth-child(even) td { background: #f8fcf9; }

.error-box { background: #fdecec; border: 1px solid #f5b5b5; color: #b42318; border-radius: 10px; }
.hint { color: var(--text-hint); }

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .container-narrow { padding: 16px; }
  .panel { padding: 18px !important; border-radius: 18px !important; }
  table.data-table { font-size: 13px; }
  table.data-table th, table.data-table td { padding: 8px 10px; }
  .btn-gold { width: 100%; }
}

/* ===== Perbaikan kotak pilihan (select) di HP ===== */
select.field-input {
  -webkit-appearance: none;
  appearance: none;
  height: 50px;
  padding-right: 42px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23379e4b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
}
@media (max-width: 640px) {
  .field-input, select.field-input, textarea.field-input { font-size: 16px !important; }
  .field-input { height: 50px; }
}

/* ===== TEMA TOSKA-KUNING (seperti PIL OTSUS) ===== */
:root {
  --bg: #37919e;
  --panel: #ffffff;
  --border-gold: #f6e6b8;
  --gold: #ffc533;
  --gold-light: #ffb400;
  --text: #2a1d00;
  --text-muted: #6e4a00;
  --text-hint: #7a6a45;
  --field-bg: #ffffff;
  --field-border: #f0d58a;
}
body {
  background-color: #37919e !important;
  background-image: linear-gradient(#4a9ca8 1px, transparent 1px), linear-gradient(90deg, #4a9ca8 1px, transparent 1px) !important;
  background-size: 10px 10px !important;
  color: var(--text);
}
a { color: #9a5a00; }
a:hover { color: #6e3f00; }
.brand-title { color: var(--text) !important; }

.topbar { background: #ffffff !important; box-shadow: 0 4px 14px rgba(0,40,48,.15) !important; }
.topbar, .topbar * { color: #2a1d00 !important; }
.topbar .btn-ghost { border-color: #e8c35a !important; }

.panel {
  background: #ffffff !important;
  border-radius: 22px !important;
  box-shadow: 0 8px 22px rgba(0,40,48,.18) !important;
}
.field-input { border-color: #f0d58a !important; border-radius: 12px !important; }
.field-input:focus { border-color: #ffb400 !important; box-shadow: 0 0 0 3px rgba(255,197,51,.30) !important; }
select.field-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b86a00' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

.btn-gold {
  background: #ffc533 !important;
  color: #2a1d00 !important;
  font-weight: 800 !important;
  box-shadow: 0 5px 0 0 #e08e00 !important;
}
.btn-gold:hover { background: #ffb400 !important; transform: translateY(3px); box-shadow: 0 2px 0 0 #e08e00 !important; }
.btn-ghost { border-color: #e8c35a !important; color: #6e3f00 !important; }

table.data-table th { background: #ffc533 !important; color: #2a1d00 !important; }
table.data-table tr:nth-child(even) td { background: #fffaea !important; }

/* ===== BINGKAI HP DI KOMPUTER ===== */
@media (min-width: 760px) {
  html {
    background: #dfe5e8;
    background-image: radial-gradient(circle at 20% 20%, #eef2f4 0, #dfe5e8 60%) ;
    min-height: 100%;
  }
  body {
    max-width: 412px;
    height: calc(100vh - 48px);
    margin: 24px auto !important;
    overflow-y: auto;
    overflow-x: hidden;
    border: 12px solid #111518;
    border-radius: 44px;
    box-shadow: 0 30px 60px rgba(0,0,0,.28), 0 0 0 2px #2a3238;
    box-sizing: content-box;
    scrollbar-width: none;
  }
  body::-webkit-scrollbar { display: none; }
}

/* ===== TEMA APLIKASI SEPERTI e-sdkoperapoka1 (toska & emas) ===== */
:root {
  --bg: #f3f7f8;
  --panel: #ffffff;
  --border-gold: #dce8ea;
  --gold: #2f8f9d;
  --gold-light: #1f6f7b;
  --text: #1d2939;
  --text-muted: #5b6b78;
  --text-hint: #5b6b78;
  --field-bg: #ffffff;
  --field-border: #cfdfe2;
}
body {
  background-color: #f3f7f8 !important;
  background-image: none !important;
  color: #1d2939 !important;
}
a { color: #1f6f7b; }
a:hover { color: #12454d; }
.brand-title { color: #1f6f7b !important; }
.topbar { background: #2f8f9d !important; box-shadow: none !important; }
.topbar, .topbar * { color: #ffffff !important; }
.panel {
  background: #ffffff !important;
  border: 1px solid #dce8ea !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 18px rgba(31,111,123,.08) !important;
}
.field-label { color: #1d2939 !important; font-weight: 700 !important; }
.field-input { border: 1px solid #cfdfe2 !important; border-radius: 12px !important; color: #1d2939 !important; background-color: #ffffff !important; }
.field-input:focus { border-color: #2f8f9d !important; box-shadow: 0 0 0 3px rgba(47,143,157,.20) !important; }
select.field-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f6f7b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}
.btn-gold {
  background: #f2b632 !important;
  color: #2a1d00 !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 14px rgba(242,182,50,.35) !important;
}
.btn-gold:hover { background: #e5a81f !important; transform: none !important; }
.btn-ghost { border: 1px solid #cfdfe2 !important; color: #1f6f7b !important; border-radius: 999px !important; background: #ffffff !important; }
table.data-table th { background: #2f8f9d !important; color: #ffffff !important; }
table.data-table tr:nth-child(even) td { background: #f3f7f8 !important; }
.hint { color: #5b6b78 !important; }

/* ===== SUDUT BINGKAI HP MENGIKUTI LENGKUNGAN ===== */
@media (min-width: 760px) {
  html { height: 100%; overflow: hidden; }
  body {
    border-radius: 44px;
    clip-path: inset(0 round 44px);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    background-clip: padding-box;
  }
}
