/* kelola-modal.css — form (modal) halaman Pengelolaan Data: ringkas & rapi.
   Dimuat paling akhir; memakai kelas kd-* sendiri supaya tidak bentrok dengan style lama. */

.kd-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: none; align-items: center; justify-content: center;
    padding: 16px; box-sizing: border-box;
    background: rgba(0, 60, 68, .45);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.kd-modal.show { display: flex; }
/* Di dalam iframe admin: posisi dihitung skrip (kelola-modal.js) agar muncul di area yang terlihat */
.kd-modal.kd-iframe { align-items: flex-start; }
.kd-modal.kd-iframe .kd-box { margin-top: var(--kd-top, 16px); }

.kd-box {
    width: 100%; max-width: 400px; box-sizing: border-box;
    max-height: calc(100vh - 32px); overflow-y: auto;
    background: #fff; border-radius: 18px; padding: 22px 24px 20px;
    box-shadow: 0 20px 50px rgba(0, 40, 48, .28);
    animation: kdMasuk .2s ease;
}
@keyframes kdMasuk { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.kd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.kd-icon {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
    background: #DFF2F3; color: #006B70; font-size: 19px;
    display: flex; align-items: center; justify-content: center;
}
.kd-icon.bahaya { background: #ffebee; color: #d32f2f; }
.kd-title { margin: 0; font-size: 17px; font-weight: 800; color: #073B49; line-height: 1.25; }

.kd-note { margin: -6px 0 14px; padding: 9px 12px; border-radius: 10px; background: #eaf7f6; color: #17666b; font-size: 12px; line-height: 1.45; }
.kd-note[hidden] { display: none; }
.kd-text { margin: -6px 0 6px; color: #426D7B; font-size: 13.5px; line-height: 1.5; }

.kd-field { margin: 0 0 12px; }
.kd-field label { display: block; margin-bottom: 5px; color: #1F5560; font-size: 12px; font-weight: 700; }
.kd-field input {
    width: 100%; box-sizing: border-box; padding: 10px 12px;
    border: 1px solid #d3e3e5; border-radius: 10px; background: #fff;
    font-size: 14px; font-weight: 500; font-family: inherit; color: #073B49; outline: none;
}
.kd-field input::placeholder { color: #9bb3b8; }
.kd-field input:focus { border-color: #008C91; box-shadow: 0 0 0 3px rgba(0, 140, 145, .14); }

.kd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kd-row.lebar-kiri { grid-template-columns: 1fr 110px; }

.kd-sub { margin: 14px 0 8px; font-size: 12px; font-weight: 800; color: #006B70; letter-spacing: .03em; }
.kd-sub:first-of-type { margin-top: 0; }

.kd-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.kd-actions button { cursor: pointer; font-size: 13.5px; }
.kd-actions .btn-batal { border: none; background: #D5EEF0; color: #006B70; }
.kd-actions .btn-bahaya { background: #d32f2f !important; box-shadow: 0 6px 16px rgba(211, 47, 47, .28) !important; }
.kd-actions.tengah { justify-content: center; }
.kd-actions.penuh button { width: 100%; }

@media (max-width: 480px) {
    .kd-box { padding: 18px 16px 16px; }
    .kd-row, .kd-row.lebar-kiri { grid-template-columns: 1fr; }
}

/* ---------- Daftar (tabel) lebih ringkas ---------- */
.password-card-title { margin-bottom: 16px; }
.password-card-title .btn-tambah-user { margin-left: auto; }
.user-row { grid-template-columns: 1fr auto !important; padding: 13px 16px; }
@media (max-width: 520px) {
    .password-card-title { flex-wrap: wrap; }
    .password-card-title .btn-tambah-user { margin-left: 0; width: 100%; justify-content: center; box-sizing: border-box; }
    .user-row { grid-template-columns: 1fr !important; }
}