/* ============================================================
   aset/style.css - Stylesheet Universal Silsilah Pongkapadang
   ============================================================
   File ini berisi CSS umum yang dipakai oleh semua modul.
   Tambahkan style baru di sini, jangan di file modul.
   ============================================================ */

.nav-fixed-top { position: fixed; top: 48px; left: 50%; transform: translateX(-50%); z-index: 99999; }
.btn-kembali-fixed { background: #2563eb; color: #ffffff; border: 1px solid #1d4ed8; padding: 4px 14px; border-radius: 12px; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(37,99,235,0.25); outline: none; }
.btn-kembali-fixed:hover { background: #1d4ed8; }

.card-detail { max-width: 650px; margin: 30px auto; background: #ffffff; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); overflow: hidden; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; border: 1px solid #e2e8f0; }
.card-header-custom { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); padding: 22px 25px; color: #ffffff; display: flex; justify-content: space-between; align-items: center; }
.card-header-custom h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: 0.3px; }
.badge-kode { background: rgba(255,255,255,0.2); padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: bold; border: 1px solid rgba(255,255,255,0.3); }
.card-header-kanan { display: flex; align-items: center; gap: 8px; }
.btn-tambah-anak { background: #22c55e; color: #ffffff; border: 1px solid #16a34a; padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; box-shadow: 0 2px 6px rgba(34,197,94,0.3); }
.btn-tambah-anak:hover { background: #16a34a; }
.card-body-custom { padding: 20px; }
.data-row { display: flex; align-items: flex-start; margin-bottom: 9px; }
.data-row:last-child { margin-bottom: 0; }

.data-label { width: 140px; min-width: 140px; font-size: 13px; color: #475569; font-weight: 600; padding-right: 10px; box-sizing: border-box; padding-top: 10px; }
.data-label.wajib { color: #b91c1c; }

.data-box {
    flex: 1;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: #0f172a;
    min-height: 38px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.5;
}
.box-highlight { background: #eff6ff; border-color: #bfdbfe; font-weight: 600; color: #1e40af; }
.box-danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; font-weight: 600; }

.form-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: #0f172a;
    height: 100%;
    text-transform: uppercase;
    font-family: inherit;
    resize: none;
    line-height: 1.5;
    word-break: break-word;
}

.form-input[readonly] { color: #94a3b8; cursor: not-allowed; }
.form-input[readonly]:focus { outline: none; }
.form-input.no-upper { text-transform: none; }

textarea.form-input { min-height: 36px; overflow: hidden; display: block; }

.input-tgl-group { display: flex; gap: 6px; align-items: center; width: 100%; flex-wrap: wrap; }
.input-tgl-part {
    padding: 6px 8px; font-size: 13px; font-weight: 700; text-align: center;
    border: 1px solid #cbd5e1; border-radius: 6px; outline: none;
    color: #0f172a; background: #ffffff;
    font-family: 'Courier New', monospace; letter-spacing: 1px;
    box-sizing: border-box; text-transform: none;
    min-width: 0;
}
.input-tgl-part:disabled { background: #f8fafc; color: #94a3b8; cursor: not-allowed; }
.input-tgl-dd, .input-tgl-mm { width: 48px; flex: 0 0 auto; }
.input-tgl-yyyy { flex: 1 1 60px; min-width: 50px; max-width: 100px; }
.input-tgl-sep { font-size: 15px; font-weight: 700; color: #475569; }
.input-tgl-part:focus { border-color: #2563eb; }

/* HP: tahun jangan kepotong */
@media (max-width: 420px) {
    .input-tgl-dd, .input-tgl-mm { width: 42px; }
    .input-tgl-part { font-size: 12.5px; padding: 6px 4px; letter-spacing: 0.5px; }
    .input-tgl-sep { font-size: 13px; }
}

.btn-cek-parent {
    background: #2563eb; color: #ffffff; border: none; border-radius: 6px;
    padding: 4px 10px; font-size: 14px; font-weight: 700; cursor: pointer;
    margin-left: 6px; flex-shrink: 0; display: flex; align-items: center;
    justify-content: center; min-width: 32px; height: 30px;
}
.btn-cek-parent:hover { background: #1d4ed8; }

.btn-mode {
    flex: 1;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    text-align: center;
    outline: none;
    transition: all 0.15s;
}
.btn-mode:hover { background: #f1f5f9; }
.btn-mode.aktif { background: #2563eb; color: #ffffff; border-color: #2563eb; }
.btn-mode:disabled { background: #f1f5f9; color: #cbd5e1; border-color: #e2e8f0; cursor: not-allowed; }
.btn-mode:disabled.aktif { background: #94a3b8; color: #ffffff; border-color: #94a3b8; }

.pesan-tolak-akses {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 6px;
    font-size: 12px;
    color: #991b1b;
    font-weight: 600;
    line-height: 1.4;
}
.pesan-tolak-akses .ikon-tolak { font-size: 14px; flex-shrink: 0; line-height: 1.4; }

.shaded-block { background: #f8fafc; border: 1px solid #e2e8f0; padding: 14px 16px; border-radius: 10px; margin-bottom: 14px; }
.shaded-block-audit { background: #f1f5f9; border: 1px solid #cbd5e1; padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; }

.shaded-block-audit .data-label { font-size: 12px; color: #64748b; width: 140px; min-width: 140px; }
.shaded-block-audit .data-box { font-size: 12px; color: #334155; border: none; background: transparent; padding: 0; min-height: auto; }

.pesan-wajib { font-size: 11px; color: #dc2626; font-weight: 600; margin-bottom: 6px; }

/* Info box penegas perubahan */
.info-perubahan-13 {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 12.5px;
    color: #1e40af;
    line-height: 1.5;
}
.info-perubahan-13 .ikon-info {
    font-size: 15px;
    flex-shrink: 0;
    line-height: 1.4;
}

.btn-balik-header svg,
.btn-balik-header svg * {
    pointer-events: none;
}

/* ============================================================
   BLOK: TABEL STATISTIK (dipakai modul apa saja yang butuh tabel)
   ============================================================ */
    .detail-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 650px;
        margin: 0 auto;
        padding: 4px;
        box-sizing: border-box;
    }

    .btn-kembali {
        display: inline-flex;
        align-items: center;
        padding: 6px 12px;
        background: #2b6cb0;
        color: #ffffff !important;
        text-decoration: none;
        border-radius: 6px;
        font-size: 12.5px;
        font-weight: 600;
        transition: background 0.15s ease;
    }
    .btn-kembali:hover {
        background: #2c5282;
    }

    .filter-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .detail-header-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
        color: #ffffff;
        padding: 12px 18px;
        border: none;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
    }

    .filter-judul {
        font-size: 14px;
        font-weight: 700;
        color: #ffffff;
        letter-spacing: 0.3px;
    }

    .filter-total {
        font-size: 11.5px;
        color: #718096;
    }

    .stat-box-group {
        background: #ffffff;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        border: 1px solid #e2e8f0;
        overflow: hidden;
    }

    .border-detail { border-top: 4px solid #3182ce; }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-compact {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
    }

    .table-compact th, .table-compact td {
        padding: 8px 10px;
        border-bottom: 1px solid #edf2f7;
    }

    .table-sortable thead th {
        background: #f8fafc;
        color: #4a5568;
        font-weight: 700;
        font-size: 12px;
        border-bottom: 2px solid #cbd5e0;
        user-select: none;
        white-space: nowrap;
        text-align: left;
    }
    .th-clickable {
        cursor: pointer;
    }
    .table-sortable thead th.th-clickable:hover {
        background: #edf2f7;
        color: #1a202c;
    }

    .sort-icon {
        font-size: 10px;
        color: #a0aec0;
        margin-left: 2px;
    }

    .th-no { width: 35px; text-align: center !important; cursor: default !important; }
    .th-nama { width: auto; }
    .th-sex { width: 40px; text-align: center !important; }
    .th-usia { width: 70px; text-align: right !important; }
    .th-kota { width: 140px; }

    .td-no { text-align: center; color: #718096; font-size: 12px; }
    .td-nama { text-align: left; }
    .nama-teks { font-weight: 600; color: #2d3748; }

    .row-clickable { cursor: pointer; transition: background 0.15s ease; }
    .row-clickable:hover, .row-clickable:active { background: #ebf8ff; }

    .td-center { text-align: center; }
    .td-num { text-align: right; font-variant-numeric: tabular-nums; }
    .td-kota { text-align: left; color: #4a5568; }

    .badge-sex {
        display: inline-block;
        padding: 1px 6px;
        border-radius: 4px;
        font-size: 11px;
        font-weight: 700;
    }
    .sex-l { background: #ebf8ff; color: #2b6cb0; }
    .sex-p { background: #fff5f5; color: #e53e3e; }

    .td-empty {
        text-align: center;
        padding: 25px;
        color: #a0aec0;
        font-style: italic;
    }

/* ============================================================
   BLOK: JEJAK PERUBAHAN DATA (tombol toggle di bawah card)
   ============================================================ */
.jejak-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.15s ease;
    user-select: none;
}
.jejak-toggle:hover {
    background: #ebf8ff;
    color: #2563eb;
}
.jejak-toggle #jejakIcon {
    transition: transform 0.2s ease;
    display: inline-block;
}
.jejak-toggle.aktif #jejakIcon {
    transform: rotate(180deg);
}