@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: url('fonts/MaterialIcons-Regular.ttf') format('truetype');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    white-space: nowrap;
    direction: ltr;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}
/* ========================================================================= */
/* VARIABLES & BASE STYLES */
/* ========================================================================= */
:root {
  --primary-color: #0b5394;
  --primary-dark: #061f3a;
  --secondary-color: #27ae60;
  --accent-color: #8e44ad;
  --warning-color: #f39c12;
  --danger-color: #ff4d4d;
  --bg-gradient: linear-gradient(135deg, #0b5394, #061f3a);
  --card-shadow: 0 8px 30px rgba(0,0,0,0.08);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Menyembunyikan scrollbar di Chrome, Safari, dan Edge */
::-webkit-scrollbar {
    display: none;
}

/* Menyembunyikan scrollbar di Firefox dan IE/Edge versi lama */
html, body {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #f4f6f9;
  color: #2c3e50;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 1. Menghilangkan efek perubahan warna (hover) pada semua tabel */
table tr:hover,
table tr:hover td,
table tr:hover th,
.table-hover tbody tr:hover { /* Menimpa class bawaan Bootstrap jika ada */
    background-color: transparent !important;
    background: inherit !important;
}

/* MEMBUAT SELURUH HEADER TABEL (TH) RATA TENGAH PRESISI */
table th,
.table th,
#tabelMasuk th {
    text-align: center !important;
    vertical-align: middle !important;
}

#bodyMasuk tr:hover,
#bodyMasuk tr:hover > td {
      background-color: transparent !important;
      background: none !important;
}
  
/* ========================================================================= */
/* HEADER STYLE */
/* ========================================================================= */
.header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  height: 65px;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  padding: 8px;
  border-radius: 50%;
}

.header-title {
  flex-grow: 1;
}

.header-title .h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-title .h2 {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 400;
  margin-top: 2px;
}

.header-meta {
  text-align: right;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ========================================================================= */
/* SIDEBAR STYLE (DESKTOP ONLY) */
/* ========================================================================= */
.sidebar {
  width: 220px;
  background: white;
  height: calc(100vh - 65px);
  position: fixed;
  top: 65px;
  left: 0;
  padding-top: 20px;
  box-shadow: 2px 0 15px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  z-index: 99;
  transition: var(--transition);
}

.sidebar-profile {
  text-align: center;
  padding: 15px;
  border-bottom: 1px solid #f1f2f6;
  margin-bottom: 15px;
}

.sidebar-profile .profile-icon {
  font-size: 56px;
  color: var(--primary-color);
}

.sidebar-profile .profile-name {
  color: #2c3e50;
  font-weight: 700;
  margin-top: 8px;
  font-size: 14px;
}

.sidebar-profile .profile-role {
  color: #7f8c8d;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar a {
  padding: 14px 24px;
  text-decoration: none;
  font-size: 14px;
  color: #57606f;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  font-weight: 600;
  border-left: 4px solid transparent;
}

.sidebar a:hover, .sidebar a.active {
  background: rgba(11, 83, 148, 0.05);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid #f1f2f6;
}

.btn-logout {
  padding: 12px;
  color: var(--danger-color);
  border-radius: 8px;
  background: rgba(255, 77, 77, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--danger-color);
  color: white;
}

/* ========================================================================= */
/* BOTTOM NAVIGATION BAR (MOBILE ONLY - DENGAN PROTEKSI STRICT) */
/* ========================================================================= */
.bottom-nav {
  display: none; /* Default tersembunyi sepenuhnya di desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 1000;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #a4b0be;
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  flex: 1;
  height: 100%;
  gap: 4px;
  transition: var(--transition);
}

.bottom-nav-item .material-icons {
  font-size: 24px;
  transition: var(--transition);
}

.bottom-nav-item:hover, .bottom-nav-item.active {
  color: var(--primary-color);
}

.bottom-nav-item.active .material-icons {
  transform: translateY(-2px);
}

/* ========================================================================= */
/* CONTENT LAYOUT & PAGES */
/* ========================================================================= */
.content {
  margin-top: 85px;
  margin-left: 220px !important;
  padding: 20px !important;
  min-height: calc(100vh - 65px);
  box-sizing: border-box;
  transition: var(--transition);
}

.page {
  display: none;
  animation: fadeIn 0.4s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================================================= */
/* CARDS & UI COMPONENTS */
/* ========================================================================= */
.card {
  background: white;
  color: #2c3e50;
  padding: 24px;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  border: 1px solid rgba(0,0,0,0.03);
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.col {
  display: flex;
  flex-direction: column;
}

/* STATS CARDS */
.rekap-kpi-card {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(0,0,0,0.02);
  transition: var(--transition);
}

.rekap-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.rekap-kpi-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.rekap-kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: #2c3e50;
}

.rekap-kpi-label {
  font-size: 12px;
  color: #7f8c8d;
  font-weight: 600;
  margin-top: 2px;
}

/* ========================================================================= */
/* TABLES (RESPONSIVE) */
/* ========================================================================= */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #f1f2f6;
  margin-top: 15px;
  background: white;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #f1f2f6;
}

th {
  background-color: #f8f9fa;
  font-weight: 700;
  color: #34495e;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  font-size: 13px;
  color: #2c3e50;
}

tr:hover {
  background-color: #fafbfc;
}

/* ========================================================================= */
/* FORMS & INPUTS */
/* ========================================================================= */
label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #34495e;
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e1e8ed;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 14px;
  transition: var(--transition);
  background-color: #f8f9fa;
  color: #2c3e50;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  background-color: white;
  box-shadow: 0 0 10px rgba(11, 83, 148, 0.15);
}

/*button {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: 1px solid #cfe2ff;
  padding: 10px 20px;
  border-radius: 8px;            
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none !important;
  transition: all 0.2s ease-in-out;
}*/

button:hover {
  /* Shadow halus dan lembut */
  box-shadow: 0 4px 12px rgba(11, 83, 148, 0.12) !important; 
  transform: translateY(-1px);    /* Mengangkat tombol 1px secara halus */
}

button:active {
  transform: translateY(0);
  box-shadow: none !important;
}

/* ========================================================================= */
/* LOGIN SCREEN - PERFECT VERTICAL & HORIZONTAL CENTER (ANTI-SCROLL) */
/* ========================================================================= */
.login-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  height: 100dvh; /* 👈 MENGGUNAKAN DYNAMIC VIEWPORT HEIGHT AGAR PRESISI DI HP */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gradient);
  z-index: 99999;
  padding: 20px;
  margin: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
  touch-action: none;
}

/* Memastikan kartu login tidak membawa margin bawaan desktop */
.login-card {
  margin: 0 auto !important; 
}

.login-card {
  background: white;
  padding: 40px 30px;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
  text-align: center;
  box-sizing: border-box;
}

/* ========================================================================= */
/* MODAL STYLE (RESPONSIVE) */
/* ========================================================================= */
.dispo-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.dispo-modal-content {
  background-color: white;
  padding: 24px;
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: modalSlideIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalSlideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.dispo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eef2f5;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.dispo-modal-header h3 {
  margin: 0;
  color: #0b5394;
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dispo-modal-close {
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dispo-modal-close:hover {
  color: #ff4d4d;
}

.dispo-form-group {
  margin-bottom: 16px;
  text-align: left;
}

.dispo-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.dispo-form-group select, .dispo-form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 13px;
}

.dispo-form-group textarea {
  resize: vertical;
  height: 100px;
}

.dispo-btn-submit {
  width: 100%;
  padding: 12px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dispo-btn-submit:hover {
  background-color: #218838;
}
/* Membuat semua tautan sidebar & bottom nav tetap memiliki kursor jari penunjuk meski tanpa href */
.sidebar a, .bottom-nav-item {
  cursor: pointer;
  user-select: none;
}

/* STYLE KHUSUS MODAL EDIT USER */
.edit-user-modal {
  display: none;
  position: fixed;
  z-index: 10005;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.edit-user-modal-content {
  background-color: white;
  padding: 24px;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: modalSlideIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

/* CONTAINER PASSWORD DENGAN FITUR TOGGLE MATA */
.password-toggle-container {
  position: relative;
  width: 100%;
}

.password-toggle-container input {
  width: 100%;
  padding-right: 40px; /* Ruang untuk ikon mata */
}

.password-toggle-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #7f8c8d;
  user-select: none;
  font-size: 20px;
}

.password-toggle-icon:hover {
  color: #2c3e50;
}

/* ========================================================================= */
/* TOMBOL-TOMBOL PREMIUM (FLEKSIBEL DENGAN IKON) */
/* ========================================================================= */
.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-premium .material-icons {
  font-size: 15px;
}

/* Variasi Warna Tombol Modern (Soft Background + Tegas) */
.btn-premium.blue { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.btn-premium.blue:hover { background: #dbeafe; }

.btn-premium.green { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.btn-premium.green:hover { background: #dcfce7; }

.btn-premium.red { background: #fef2f2; color: #991b1b; border-color: #fee2e2; }
.btn-premium.red:hover { background: #fee2e2; color: #7f1d1d; }

.btn-premium.gray { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.btn-premium.gray:hover { background: #edf2f7; }

.btn-premium.orange { background: #fffbeb; color: #9a3412; border-color: #fde68a; }
.btn-premium.orange:hover { background: #fef3c7; }

/* ========================================================================= */
/* SUPER CENTER WRAPPER (MEMATIKAN PENGARUH BOOTSTRAP/TEMPLATE LAIN) */
/* ========================================================================= */
.action-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important; 
  padding: 0 !important;
}

/* Reset margin pada tombol agar tidak ada jarak bawah yang tersembunyi */
.btn-premium {
  margin: 0 !important; 
  display: flex !important; /* Gunakan flex agar ikon & teks di dalam tombol juga lurus */
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 7px 7px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap !important;
}

.btn-premium .material-icons {
  font-size: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}


/* --- CSS DASAR MODAL UNTUK SEMUA LAYAR --- */
.simas-modal-backdrop {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.simas-modal-wrapper {
    background-color: #fff;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    overflow: hidden;
    box-sizing: border-box;
}

.simas-modal-header {
    background-color: #1e3a8a;
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.simas-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 16px;
}

.simas-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.simas-modal-body {
    padding: 20px;
}

.simas-info-surat-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
}

.info-row {
    margin-bottom: 4px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
}

.form-input-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background-color: #fff;
}

.form-input-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.clickable-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #fafafa;
    cursor: pointer;
    font-size: 14px;
}

.clickable-option input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.inline-text-group {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.input-line-dotted {
    flex: 1;
    border: none;
    border-bottom: 2px dotted #cbd5e1;
    outline: none;
    padding: 2px 5px;
    font-size: 14px;
    background: transparent;
}

.simas-audit-banner {
    background-color: #f0f4f8;
    border-left: 4px solid #1e3a8a;
    padding: 12px;
    border-radius: 4px;
    margin-top: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.banner-icon {
    font-size: 20px;
}

.banner-text {
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
}

.simas-modal-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-simas {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.btn-secondary {
    background-color: #94a3b8;
    color: white;
}

.btn-primary {
    background-color: #10b981;
    color: white;
}


/* ========================================================================= */
/* --- MEDIA SCREEN UNTUK PERANGKAT DESKTOP / LAPTOP (min-width: 769px) --- */
/* ========================================================================= */
@media screen and (min-width: 769px) {
    .simas-modal-wrapper {
        width: 80%;
        max-width: 850px;
    }
    
    .simas-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .radio-flex-group {
        display: flex;
        gap: 10px;
    }

    .radio-flex-group .clickable-option {
        flex: 1;
        justify-content: center;
    }

    .checkbox-vertical-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
}


/* ========================================================================= */
/* --- MEDIA SCREEN UNTUK PERANGKAT MOBILE / HP (max-width: 768px) --------- */
/* ========================================================================= */
@media screen and (max-width: 768px) {
    .simas-modal-wrapper {
        width: 95%;
        margin: 15px auto;
    }

    .simas-form-grid {
        display: block; /* Menumpuk ke bawah */
    }

    .grid-column {
        margin-bottom: 0;
    }

    .radio-flex-group {
        display: flex;
        flex-direction: column; /* Pilihan Sifat Surat menumpuk di HP agar lega */
        gap: 8px;
    }

    .checkbox-vertical-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .clickable-option {
        padding: 12px; /* Area sentuh jari lebih besar di HP */
    }

    .simas-modal-footer {
        flex-direction: column-reverse; /* Tombol menumpuk vertikal di HP */
    }

    .btn-simas {
        width: 100%; /* Tombol lebar penuh di HP agar mudah ditekan */
        text-align: center;
    }
}

@media (min-width: 769px) {
    /* ... style desktop Anda yang lain ... */

    .simas-pin-container {
        margin-top: 30px;
        padding: 20px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background-color: #f8fafc;
    }

    .simas-pin-title {
        margin: 0 0 20px 0;
        color: #b91c1c;
        font-size: 15px;
        font-weight: bold;
        display: flex;
        align-items: center;
        gap: 8px;
        border-bottom: 2px solid #fee2e2;
        padding-bottom: 10px;
    }

    .simas-pin-title .material-icons {
        font-size: 22px;
    }

    .simas-pin-group {
        margin-bottom: 16px;
    }

    /* DESKTOP: PIN Baru & Konfirmasi berjejer ke samping (2 kolom) */
    .simas-pin-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .simas-pin-label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #475569;
        margin-bottom: 8px;
    }

    .simas-pin-wrapper-input {
        position: relative;
    }

    .simas-pin-input {
        width: 100%;
        box-sizing: border-box;
        padding: 10px 40px 10px 14px;
        border: 1px solid #cbd5e1;
        border-radius: 6px;
        outline: none;
        background-color: #ffffff;
        transition: border-color 0.3s, box-shadow 0.3s;
    }

    .simas-pin-input:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .simas-pin-btn-mata {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        color: #94a3b8;
        font-size: 20px;
        user-select: none;
        transition: color 0.2s;
    }

    .simas-pin-btn-mata:hover {
        color: #64748b;
    }

    .simas-pin-note {
        margin: 12px 0 0 0;
        font-size: 12px;
        color: #64748b;
        font-style: italic;
    }
}

@media (max-width: 768px) {
    /* ... style mobile Anda yang lain ... */

    .simas-pin-container {
        margin-top: 20px;
        padding: 15px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background-color: #f8fafc;
        box-sizing: border-box;
    }

    .simas-pin-title {
        margin: 0 0 16px 0;
        color: #b91c1c;
        font-size: 14px;
        font-weight: bold;
        display: flex;
        align-items: center;
        gap: 8px;
        border-bottom: 2px solid #fee2e2;
        padding-bottom: 10px;
    }

    .simas-pin-title .material-icons {
        font-size: 20px;
    }

    .simas-pin-group {
        margin-bottom: 16px;
    }

    /* Memaksa elemen turun ke bawah dengan rapi di HP */
    .simas-pin-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .simas-pin-label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #475569;
        margin-bottom: 8px;
    }

    /* Wajib ada di mobile agar posisi ikon mata tidak hancur keluar kotak */
    .simas-pin-wrapper-input {
        position: relative;
        width: 100%;
    }

    .simas-pin-input {
        width: 100%;
        box-sizing: border-box;
        padding: 12px 40px 12px 14px;
        border: 1px solid #cbd5e1;
        border-radius: 6px;
        outline: none;
        background-color: #ffffff;
        font-size: 14px;
        transition: border-color 0.3s, box-shadow 0.3s;
    }

    .simas-pin-input:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    /* Mengunci posisi ikon mata tepat di tengah kanan input mobile */
    .simas-pin-btn-mata {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        color: #94a3b8;
        font-size: 20px;
        user-select: none;
    }

    .simas-pin-note {
        margin: 12px 0 0 0;
        font-size: 11px;
        color: #64748b;
        font-style: italic;
    }
}
/* =======================================
   3. RESPONSIVE MOBILE / HP (< 768px)
   ======================================= */
@media (max-width: 768px) {
    .tab-menu {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch; 
        padding-bottom: 15px;
        scrollbar-width: none; 
    }
    
    .tab-menu::-webkit-scrollbar {
        display: none; 
    }
    
    .tab-sub-btn {
        flex-shrink: 0 !important; 
        width: 100px !important;
        height: 80px !important;
        font-size: 11px !important;
    }
    
    .tab-sub-btn .material-icons {
        font-size: 24px !important;
    }
}


/*--PENGATURAN MEDIA SCREEN BY IRTO--*/
/* =========================================================================
   🖥️ MODE PC: TAMPILKAN DROPDOWN, SEMBUNYIKAN GRID MOBILE (min-width: 769px)
   ========================================================================= */
@media screen and (min-width: 769px) {

  .bottom-nav {
    display: none !important;
  }
 /* ========================================================================= */
/* ATURAN VISIBILITAS UTAMA PC (GANTI / TAMBAHKAN DI CSS GLOBAL) */
/* ========================================================================= */
.desktop-only { display: inline-block; }
.header-title .desktop-only, .header-meta.desktop-only { display: flex; }
.mobile-only-flex { display: none !important; }
.sidebar-overlay { display: none !important; 
    
}
  /* Siapkan ruang untuk tooltip pada elemen teks span */
.simas-tooltip {
  position: relative;
  cursor: pointer;
}

/* 1. KOTAK BALON UTAMA */
.simas-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 50%; /* Tepi bawah kotak berada persis di tengah (50%) */
  left: 50%;
  transform: translateX(-50%) translateY(0px);
  
  /* Desain Visual Premium */
  background-color: #1e293b;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: normal;
  text-align: center;
  
  /* Pengaturan dimensi pop-up */
  white-space: normal;
  width: max-content;
  max-width: 280px; 
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  
  /* Efek Animasi Tersembunyi */
  opacity: 0;
  pointer-events: none;
  transition: all 0.15s ease-in-out;
  z-index: 9999;
}

/* 2. EFEK PANAH MENYATU (Membentuk Speech Bubble) */
.simas-tooltip::before {
  content: "";
  position: absolute;
  top: 50%; /* Tepi atas panah bertemu presisi dengan tepi bawah kotak di titik 50% */
  left: 50%;
  transform: translateX(-50%) translateY(0px);
  
  /* Segitiga Solid Menghadap ke Bawah */
  border-width: 6px 6px 0 6px; /* Format: atas, kanan, bawah, kiri */
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
  
  /* Efek Animasi Tersembunyi */
  opacity: 0;
  pointer-events: none;
  transition: all 0.15s ease-in-out;
  z-index: 9999;
}

/* 3. EFEK KETIKA KURSOR MENYENTUH TEKS (Meluncur bersamaan tanpa celah) */
.simas-tooltip:hover::after,
.simas-tooltip:hover::before {
  opacity: 1;
  /* Keduanya menggunakan koordinat naik yang sama persis agar menempel seperti satu benda */
  transform: translateX(-50%) translateY(-8px); 
}
}

/* =========================================================================
   📱 ENGINE OPTIMASI MULTI-BUTTON GRID KARTU MOBILE (LAYAR HP <= 768px)
   ========================================================================= */
@media (max-width: 768px) {
  
  .table-responsive, div:has(> table), table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    border: none !important;
    background: transparent !important;
  }

  table:has(#bodyMasuk) thead,
  .kolom-aksi-pc,
  .wadah-aksi-pc {
    display: none !important;
  }

  #bodyMasuk {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 16px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  #bodyMasuk tr {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 16px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05) !important;
    box-sizing: border-box !important;
    position: relative !important;
    gap: 10px !important;
  }
  
  #bodyMasuk tr:hover {
    background: #ffffff !important;
  }

  #bodyMasuk tr td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
    white-space: normal !important;
  }

  #bodyMasuk tr td:nth-child(1) {
    display: inline-block !important;
    width: auto !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
  }
  #bodyMasuk tr td:nth-child(1)::before { content: "#"; }

  #bodyMasuk tr td:nth-child(2) {
    display: inline-block !important;
    width: auto !important;
    margin-left: 6px !important;
    font-size: 13px !important;
    color: #64748b !important;
  }

  #bodyMasuk tr td:nth-child(3) {
    padding-top: 8px !important;
    border-top: 1px solid #f1f5f9 !important;
  }

  #bodyMasuk tr td:nth-child(4)::before {
    content: "🏢 DARI:" !important;
    display: block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    margin-bottom: 2px !important;
  }

  #bodyMasuk tr td:nth-child(5) {
    max-width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word !important;
    line-height: 1.5 !important;
  }
  #bodyMasuk tr td:nth-child(5)::before {
    content: "✉️ PERIHAL:" !important;
    display: block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    margin-bottom: 2px !important;
  }

  /* CLASS PERMANEN: Bagian Penanggung Jawab */
  #bodyMasuk tr td.td-pj {
    padding-top: 6px !important;
    border-top: 1px dashed #e2e8f0 !important;
    margin-bottom: 4px !important;
  }
  #bodyMasuk tr td.td-pj:not(:has(span))::before {
    content: "👤 PJ: " !important;
    font-weight: 700 !important;
    color: #475569 !important;
  }

  /* CLASS PERMANEN: Baris Tombol File */
  #bodyMasuk tr td.td-file {
    border-top: 1px solid #e2e8f0 !important;
    padding-top: 12px !important;
    margin-top: 4px !important;
  }
  #bodyMasuk tr td.td-file a,
  #bodyMasuk tr td.td-file button {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 8px 12px !important;
  }

  /* CLASS PERMANEN: KUNCI GRID 2 KOLOM TOMBOL AKSI */
  #bodyMasuk tr td.td-aksi {
    margin-top: 4px !important;
    width: 100% !important;
    display: block !important;
  }

  #bodyMasuk tr td.td-aksi .wadah-aksi-mobile {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }

  #bodyMasuk tr td.td-aksi .wadah-aksi-mobile button,
  #bodyMasuk tr td.td-aksi .wadah-aksi-mobile a {
    width: 100% !important;
    max-width: 100% !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    padding: 10px 4px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    margin: 0 !important;
  }

  /* Tombol memanjang penuh ke bawah */
  #bodyMasuk tr td.td-aksi .wadah-aksi-mobile .tombol-full-mobile {
    grid-column: span 2 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* PROTEKSI NAVIGASI */
  .content { margin-left: 0 !important; padding: 15px !important; margin-bottom: 75px !important; }
  .bottom-nav.logged-in { display: flex !important; }
  input, select, textarea { font-size: 16px !important; }
  .header > div:last-child { display: none !important; }
  input[type="date"] { max-width: 280px; width: 100%; }
  #boxModalEdit { width: 90vw !important; max-height: 90vh !important; }
  .grid-tanggal { grid-template-columns: 1fr !important; }
  #boxModalEdit input[type="date"] { width: 100% !important; }
  input[type="date"]::before { content: "Pilih_Tanggal"; color: #a0aec0; margin-right: 0.5em; font-size: 16px; }
  input[type="date"]:focus::before, input[type="date"]:valid::before { content: "" !important; margin-right: 0px !important; }
  input[type="date"]::-webkit-calendar-picker-indicator { display: block !important; opacity: 0.6; cursor: pointer; 
  }
  
  /* ========================================================================= */
  /* BUNDEL CSS MOBILE FIX (MASUKKAN KE DALAM @media (max-width: 768px))       */
  /* ========================================================================= */
  
  /* Proteksi Visibilitas: Paksa Tombol Kiri & Kanan Muncul di Mobile */
  .desktop-only { display: none !important; }
  #btnHamburger, #headerActions { display: flex !important; }

  /* Seting Ulang Layout Flexbox Header di HP */
  .header {
    height: 65px !important;
    padding: 0 15px !important;
    z-index: 10000 !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box;
  }
  .header-title .h1 {
    font-size: 18px !important;
  }

  /* Backdrop Overlay Dimulai Tepat di Bawah Header Mobile */
  .sidebar-overlay {
    display: block !important;
    position: fixed;
    top: 65px !important;
    left: 0;
    width: 100vw;
    height: calc(100vh - 65px) !important;
    background: rgba(15, 23, 42, 0.5) !important;
    z-index: 9998 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Konstruksi Sidebar Mobile di Bawah Header */
  #appSidebar {
    display: flex !important;
    position: fixed !important;
    top: 65px !important; 
    height: calc(100vh - 65px) !important; 
    left: -300px !important; 
    z-index: 9999 !important; 
    padding-top: 10px !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 4px 4px 20px rgba(0,0,0,0.15) !important;
    width: 260px !important; 
    background: white !important;
  }
  
  #appSidebar.active {
    left: 0 !important;
  }

  .sidebar-profile {
    padding: 15px !important;
    margin-bottom: 10px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f2f6 !important;
  }
}

/*--SYLE PROFIL--*/
    .profil-grid-container {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }
    @media (min-width: 768px) {
      .profil-grid-container {
        flex-direction: row;
        align-items: flex-start;
      }
      .profil-kiri { width: 280px; flex-shrink: 0; }
      .profil-kanan { flex-grow: 1; }
    }
    .profil-box {
      background: #ffffff; border-radius: 12px;
      box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); padding: 24px;
      border: 1px solid rgba(0,0,0,0.03);
    }
    .img-bulat {
      width: 140px; height: 140px; border-radius: 50%; background: #f1f5f9;
      margin: 0 auto 16px auto; display: flex; align-items: center; justify-content: center;
      overflow: hidden; border: 4px solid #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    }
    .img-bulat img { width: 100%; height: 100%; object-fit: cover; }
    .img-bulat .material-icons { font-size: 70px; color: #cbd5e1; 
    }
    
/*--STYLE MODAL PERBAIKAN--*/
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; display:flex; align-items:center; justify-content:center; }
.modal-content { background:#fff; width:90%; max-width:640px; border-radius:6px; overflow:hidden; }
.modal-header, .modal-footer { padding:12px 16px; border-bottom:1px solid #eee; }
.modal-body { padding:16px; max-height:60vh; overflow:auto; }
.close-modal { background:none; border:0; font-size:20px; cursor:pointer; }
.alasan-content { white-space:pre-wrap; word-wrap:break-word; 
}