/* RoKeep · gaya global. Nilai diambil langsung dari file desain (design/*.dc.html). */

@font-face { font-family: 'Be Vietnam Pro'; font-weight: 400; font-display: swap; src: url(/fonts/bvp-400.woff2) format('woff2'), url(/fonts/bvp-ext-400.woff2) format('woff2'); }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 500; font-display: swap; src: url(/fonts/bvp-500.woff2) format('woff2'), url(/fonts/bvp-ext-500.woff2) format('woff2'); }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 600; font-display: swap; src: url(/fonts/bvp-600.woff2) format('woff2'), url(/fonts/bvp-ext-600.woff2) format('woff2'); }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 700; font-display: swap; src: url(/fonts/bvp-700.woff2) format('woff2'), url(/fonts/bvp-ext-700.woff2) format('woff2'); }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 800; font-display: swap; src: url(/fonts/bvp-800.woff2) format('woff2'), url(/fonts/bvp-ext-800.woff2) format('woff2'); }

:root {
  --indigo: #1F2F5C; --indigo-gelap: #16224A; --tint: #E4E7F2;
  --latar: #F1F1EE; --kartu: #FFFFFF; --garis: #D9D8D2; --garis-input: #CDCBC3;
  --abu: #E6E5DF; --abu2: #EDECE8;
  --teks: #17181C; --redup: #5B5A55; --teks2: #4A4944;
  --amber: #E08A2E;
  --tunggu-bg: #F8E6CC; --tunggu: #8A4A0B; --tunggu-tua: #5A3006; --tunggu-garis: #E9CFA3;
  --ok-bg: #DCEBDD; --ok: #1F5A2A;
  --bahaya: #A3361F; --bahaya-bg: #FBE9E5; --bahaya-bg2: #F6DDD6; --bahaya-tua: #8A2412;
  --font: 'Be Vietnam Pro', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--latar); color: var(--teks); font-family: var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
button, input, select, textarea { font-family: inherit; }
a { color: #1F2F5C; }
a:hover { color: #16224A; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

/* ---- Kontrol form seragam (disalin persis dari blok <style> desain) ---- */
input[type=checkbox],input[type=radio]{-webkit-appearance:none!important;appearance:none!important;width:22px!important;height:22px!important;min-width:22px;margin:0!important;flex:none;border:2px solid #7C84A3;background:#fff center/14px no-repeat;border-radius:7px;cursor:pointer;vertical-align:middle;box-sizing:border-box;accent-color:#1F2F5C}
input[type=radio]{border-radius:50%}
input[type=checkbox]:checked{background-color:#1F2F5C;border-color:#1F2F5C;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")}
input[type=radio]:checked{border-color:#1F2F5C;background:#1F2F5C;box-shadow:inset 0 0 0 4px #fff}
input:disabled{opacity:.45;cursor:not-allowed}
select{-webkit-appearance:none;appearance:none;padding-right:34px!important;background-color:#fff!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B5A55' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 10px center!important;background-size:18px!important}

/* ---- Input teks ---- */
.medan { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.medan label, .label { font-size: 13px; font-weight: 600; }
.inp { height: 52px; border: 1.5px solid var(--garis-input); border-radius: 12px; padding: 0 16px; font-size: 16px; background: #fff; color: var(--teks); width: 100%; min-width: 0; }
.inp:focus, select:focus { outline: 2px solid var(--indigo); outline-offset: 1px; }
.inp-48 { height: 48px; padding: 0 14px; font-size: 15px; }
.inp-44 { height: 44px; padding: 0 12px; font-size: 14px; }
.inp.salah { border-color: var(--bahaya); }
.ket { font-size: 12px; line-height: 1.5; color: var(--redup); }
.ket-salah { font-size: 12px; line-height: 1.5; color: var(--bahaya); font-weight: 600; }
.cek { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.cek input { margin-top: 0 !important; }

/* ---- Tombol ---- */
.btn { height: 44px; padding: 0 18px; border-radius: 10px; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; border: 1.5px solid var(--garis-input); background: #fff; color: var(--teks); cursor: pointer; }
.btn:hover { color: var(--teks); background: #FAFAF8; }
.btn-utama { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn-utama:hover { background: var(--indigo-gelap); color: #fff; }
.btn-kecil { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-tolak { background: var(--bahaya-bg); border-color: var(--bahaya); color: var(--bahaya); }
.btn-tolak:hover { background: #F6DDD6; color: var(--bahaya); }
.btn-merah { background: var(--bahaya); border-color: var(--bahaya); color: #fff; }
.btn-merah:hover { background: #8A2412; color: #fff; }
.btn-hp { height: 48px; border-radius: 14px; background: #fff; border: 1px solid var(--garis); color: var(--teks); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; text-decoration: none; padding: 0 18px; cursor: pointer; width: 100%; }
.btn-hp-utama { background: var(--indigo); border-color: var(--indigo); color: #fff; font-size: 16px; }
.btn-hp-utama:hover { color: #fff; background: var(--indigo-gelap); }
.btn[disabled], .btn-hp[disabled] { opacity: .55; cursor: wait; }
.tautan { background: none; border: 0; padding: 0; color: var(--indigo); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---- Kartu, pil, tabel ---- */
.kartu { background: #fff; border: 1px solid var(--garis); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kartu-hp { background: #fff; border: 1px solid var(--garis); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kartu-judul { font-size: 16px; font-weight: 700; }
.kartu-amber { background: var(--tunggu-bg); border-color: var(--tunggu-garis); color: var(--tunggu-tua); }
.pil { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.pil-hijau { background: var(--ok-bg); color: var(--ok); }
.pil-amber { background: var(--tunggu-bg); color: var(--tunggu); }
.pil-merah { background: var(--bahaya-bg2); color: var(--bahaya-tua); }
.pil-netral { background: var(--abu); color: var(--teks2); }
.tbl-bungkus { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--redup); font-size: 12px; font-weight: 600; padding: 8px 10px; }
.tbl td { padding: 12px 10px; border-top: 1px solid var(--garis); vertical-align: middle; }
.baris-info { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.baris-info > :first-child { color: var(--redup); }
.baris-info > :last-child { font-weight: 600; text-align: right; }
.info-biru { display: flex; gap: 12px; background: var(--tint); border-radius: 14px; padding: 14px 16px; font-size: 13px; line-height: 1.5; color: var(--teks); }
.banner-amber { display: flex; gap: 12px; background: var(--tunggu-bg); border-radius: 14px; padding: 14px 16px; font-size: 13px; line-height: 1.6; color: var(--tunggu-tua); }
.pesan-salah { background: var(--bahaya-bg); color: var(--bahaya-tua); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.pesan-ok { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; line-height: 1.5; }

/* ---- Logo ---- */
.logo-tile { flex: none; background: var(--indigo); display: flex; align-items: center; justify-content: center; }

/* ---- Keadaan: memuat / kosong / gagal ---- */
@keyframes sk { 0% { opacity: .5 } 50% { opacity: 1 } 100% { opacity: .5 } }
.sk { background: var(--abu); border-radius: 8px; animation: sk 1.4s infinite; }
.keadaan { align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 200px; }
.keadaan-judul { font-size: 16px; font-weight: 700; }
.keadaan-teks { font-size: 14px; color: var(--redup); max-width: 340px; line-height: 1.5; }

/* ---- Panel admin desktop ---- */
.adm { min-height: 100vh; display: flex; background: var(--latar); }
.adm-side { flex: 0 0 240px; width: 240px; background: #fff; border-right: 1px solid var(--garis); padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.adm-merek { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; }
.adm-merek b { font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }
.adm-pilih { display: flex; flex-direction: column; gap: 4px; padding: 0 4px 8px; }
.adm-pilih label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; color: var(--redup); }
.adm-pilih select { height: 44px; border: 1.5px solid var(--indigo); border-radius: 12px; padding: 0 10px; font-size: 14px; font-weight: 700; color: var(--teks); width: 100%; }
.adm-nav { padding: 11px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--redup); text-decoration: none; display: flex; align-items: center; gap: 10px; min-height: 42px; }
.adm-nav:hover { background: #F6F6F3; color: var(--teks); }
.adm-nav.aktif { background: var(--tint); color: var(--indigo-gelap); font-weight: 700; }
.adm-nav .lencana { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--bahaya); color: #fff; padding: 2px 7px; border-radius: 999px; }
.adm-kaki { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; border-top: 1px solid var(--garis); }
.avatar { border-radius: 50%; background: var(--tint); color: var(--indigo-gelap); font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.adm-main { flex: 1 1 auto; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.kepala-hal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.kepala-hal h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.kepala-hal .sub { font-size: 15px; color: var(--redup); margin-top: 6px; line-height: 1.5; }
.aksi-hal { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--garis); margin-top: -8px; }
.tabs a { padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--redup); border-bottom: 3px solid transparent; text-decoration: none; margin-bottom: -1px; }
.tabs a.aktif { font-weight: 700; color: var(--indigo-gelap); border-bottom-color: var(--indigo); }
.grid-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--garis); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat .l { font-size: 13px; color: var(--redup); }
.stat .n { font-size: 24px; font-weight: 800; }
.stat .k { font-size: 12px; color: var(--redup); }

/* ---- Panel admin HP ---- */
.hp { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--latar); }
.hp-isi { flex: 1; padding: 28px 16px 96px; display: flex; flex-direction: column; gap: 12px; }
.hp-kepala { display: flex; align-items: center; gap: 10px; }
.hp-kepala .judul { font-weight: 800; font-size: 18px; }
.hp-kepala .subjudul { font-size: 12px; color: var(--redup); }
.hp-pilih { flex: 1; min-width: 0; position: relative; min-height: 42px; display: flex; flex-direction: column; justify-content: center; }
.hp-pilih select { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.hp-kembali { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; text-decoration: none; min-height: 42px; margin: -12px 0; align-self: flex-start; }
.hp-nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(68px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--garis); background: #fff; display: grid; grid-template-columns: repeat(5, 1fr); z-index: 20; }
.hp-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; font-size: 11px; font-weight: 600; color: var(--redup); }
.hp-nav a.aktif { color: var(--indigo); }
.hp-bagian { font-size: 11px; font-weight: 700; letter-spacing: .6px; color: var(--redup); margin-top: 2px; }
.hp-daftar { background: #fff; border: 1px solid var(--garis); border-radius: 16px; padding: 0 14px; display: flex; flex-direction: column; }
.hp-daftar a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 10px 0; border-top: 1px solid var(--garis); text-decoration: none; color: var(--teks); font-size: 14px; font-weight: 600; }
.hp-daftar a:first-child { border-top: 1px solid var(--garis); }
.hp-baris { display: flex; justify-content: space-between; font-size: 14px; padding: 10px 0; border-top: 1px solid var(--garis); gap: 10px; }

/* ---- Layar HP karyawan / login ---- */
.layar-hp { min-height: 100vh; min-height: 100dvh; max-width: 480px; margin: 0 auto; padding: 36px 24px 20px; display: flex; flex-direction: column; gap: 16px; }

/* ---- Dialog ---- */
.dialog-latar { position: fixed; inset: 0; background: rgba(23, 24, 28, .45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.dialog { background: #fff; border-radius: 18px; padding: 22px; width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dialog h2 { font-size: 18px; font-weight: 800; }
.dialog-tombol { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 760px) {
  .dialog-latar { align-items: flex-end; padding: 0; }
  .dialog { border-radius: 18px 18px 0 0; max-height: 90vh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .dialog-tombol { display: grid; grid-template-columns: 1fr 1fr; }
  .dialog-tombol .btn { height: 48px; border-radius: 14px; font-size: 15px; }
}

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--teks); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 60; max-width: calc(100vw - 32px); }

/* ---- Master di HP: bilah atas + menu bawah; tabel jadi kartu per baris ---- */
.mm-bar, .mm-nav { display: none; }
@media (max-width: 760px) {
  .adm-master { flex-direction: column; }
  .adm-master .adm-side { display: none; }
  .mm-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 15; background: #fff; border-bottom: 1px solid var(--garis); padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .mm-judul { flex: 1; min-width: 0; font-weight: 800; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mm-lencana { font-size: 10px; font-weight: 800; letter-spacing: .8px; background: #17181C; color: #fff; padding: 3px 7px; border-radius: 6px; }
  .mm-nav { display: grid; grid-template-columns: repeat(5, 1fr); }
  .mm-nav .mm-lainnya { border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; color: var(--redup); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
  .mm-nav .mm-lainnya.aktif { color: var(--indigo); }
  .adm-master .adm-main { padding: 16px 16px calc(92px + env(safe-area-inset-bottom)); gap: 16px; }
  .adm-master .grid-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .adm-master .stat { min-width: 0; padding: 14px; }
  .adm-master .stat .pil { white-space: normal; }
  .adm-master .kepala-hal h1 { display: none; }
  .adm-master .kartu:has(> .tbl-bungkus), .adm-master .kartu:has(.tbl-bungkus) { background: none; border: 0; padding: 0; box-shadow: none; }
  .adm-master .kartu { padding: 16px; }
  .adm-master input, .adm-master textarea, .adm-master select { font-size: 16px; }
  .adm-master .btn { min-height: 44px; }
  .adm-master .btn-kecil { min-height: 40px; padding: 0 14px; }
  .adm-master .tbl-bungkus { overflow: visible; }
  .adm-master .tbl { min-width: 0 !important; display: block; }
  .adm-master .tbl tbody, .adm-master .tbl tr { display: block; }
  .adm-master .tbl tr:first-child:has(th) { display: none; }
  .adm-master .tbl tr { border: 1px solid var(--garis); border-radius: 14px; padding: 6px 14px; margin-bottom: 12px; background: #fff; }
  .adm-master .tbl td { display: flex; justify-content: space-between; align-items: center; gap: 14px; border-top: 0; padding: 8px 0; text-align: right !important; white-space: normal !important; }
  .adm-master .tbl td + td { border-top: 1px solid var(--garis); }
  .adm-master .tbl td::before { content: attr(data-l); flex: none; font-size: 12px; font-weight: 600; color: var(--redup); text-align: left; max-width: 45%; }
  .adm-master .tbl td[data-l=""]::before { display: none; }
  .adm-master .tbl td[data-l=""] { justify-content: flex-end; }
  .adm-master .tbl td[data-l=""] > div { flex-wrap: wrap; justify-content: flex-end; }
  .adm-master .tbl td:first-child { display: block; text-align: left !important; font-size: 16px; padding: 10px 0; }
  .adm-master .tbl td:first-child::before { display: none; }
}

/* Tautan di dalam kalimat: area ketuk diperbesar tanpa mengubah tata letak */
.tautan-ketuk { font-weight: 700; display: inline-block; padding: 13px 0; margin: -13px 0; line-height: 16px; }

.tbl-rapat td, .tbl-rapat th { white-space: nowrap; }
.kepala-peran { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--redup); cursor: pointer; min-height: 28px; }
.kepala-peran:hover { color: var(--indigo); text-decoration: underline; }
.kartu-hp > div[style*="border-top"]:first-child { border-top: 0 !important; }

@media (max-width: 760px) { .btn-kecil { height: 44px; } }
