:root {
    --primary-color: #0f3d68;
    --accent-color: #1e88e5;
    --sidebar-width: 260px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: #f4f6f9;
}

/* --- LOGIN SPLIT SCREEN (MERAPAT TANPA JARAK) --- */
.login-wrapper {
    min-height: 100vh;
}

.login-info-side {
    background: linear-gradient(135deg, #092540 0%, #155799 100%);
    color: #ffffff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-side {
    background: #ffffff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- SIDEBAR KIRI RESPONSIF (IOS & ANDROID FRIENDLY) --- */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--primary-color);
    color: #ffffff;
    transition: margin-left 0.3s ease, transform 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.82);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 4px 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo-pb {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}


.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* --- KONTEN UTAMA (ANTI MELAR KE KANAN) --- */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: 100%;
    min-width: 0;
    padding: 20px;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.card,
.card-body,
.dataTables_wrapper {
    max-width: 100%;
    min-width: 0;
}

.table-responsive,
.dataTables_scrollBody {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.5rem;
}

/* --- TABEL DATABASE PEGAWAI --- */
#tablePegawai {
    width: 100%;
    font-size: 0.85rem;
    margin-bottom: 0 !important;
}

#tablePegawai th,
#tablePegawai td {
    padding: 0.55rem 0.65rem;
    vertical-align: middle;
}

#tablePegawai .col-nama {
    min-width: 170px;
    max-width: 220px;
}

#tablePegawai .col-nama > div,
#tablePegawai .col-nama > small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tablePegawai .col-opd {
    min-width: 150px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tablePegawai .col-aksi {
    white-space: nowrap;
    min-width: 108px;
    text-align: center;
}

#tablePegawai .btn-aksi {
    padding: 0.25rem 0.45rem;
    line-height: 1;
}

/* --- RESPONSIF LAYAR MOBILE (ANDROID & IOS) --- */
@media (max-width: 991.98px) {
    .sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
    }

    .sidebar.show {
        margin-left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 12px;
    }

    .login-info-side,
    .login-form-side {
        padding: 2rem 1.5rem;
    }
}

/* --- MENU KIRI LEBIH RINGKAS & DEGRADASI SOFT --- */
.sidebar {
    background: linear-gradient(180deg, #1b4965 0%, #2c6e91 55%, #4ea8de 100%) !important;
    font-size: 0.875rem;
}

.sidebar .nav-link {
    padding: 8px 14px;
    margin: 2px 10px;
    border-radius: 7px;
    font-size: 0.84rem;
    gap: 9px;
}

.sidebar .nav-link .fa-fw {
    width: 1rem;
    font-size: 0.82rem;
}

/* --- HALAMAN USUL PENDIDIKAN RAMPING & SOFT --- */
.usul-page-header {
    background: linear-gradient(135deg, #f0f7fc 0%, #e6f2fa 100%);
    border: 1px solid #d5e7f5;
    border-radius: 10px;
    padding: 12px 16px;
}

.usul-card-soft {
    border: 1px solid #e5eef5 !important;
    border-radius: 10px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fafcfe 100%);
}

.usul-card-soft .card-header {
    background: linear-gradient(90deg, #f4f9fd 0%, #ffffff 100%);
    border-bottom: 1px solid #e6eff7;
    padding: 9px 14px;
    font-size: 0.84rem;
}

.usul-card-soft .card-body {
    padding: 12px 14px;
}

/* Tombol sedikit dikecilkan agar ramping */
.btn-compact {
    padding: 0.28rem 0.62rem !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
}

.btn-aksi-sm {
    padding: 0.2rem 0.42rem !important;
    font-size: 0.75rem !important;
    line-height: 1.1 !important;
    border-radius: 5px !important;
}

/* Area grafik proporsional & ramping */
.chart-box-sm {
    position: relative;
    height: 215px;
    width: 100%;
}

/* Tabel usul lebih rapat & rapi */
#tableUsulPendidikan th,
#tableUsulPendidikan td {
    padding: 0.48rem 0.6rem;
    font-size: 0.82rem;
    vertical-align: middle;
}

/* --- JALUR ALUR MONITORING BERJENJANG --- */
.jenjang-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    position: relative;
}

.jenjang-step {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.2s ease;
    position: relative;
}

.jenjang-step .step-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.jenjang-step .step-title {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

.jenjang-step .step-sub {
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.25;
}

/* Kode Warna Tahap */
.jenjang-step.st-diajukan {
    background: #f0f9ff;
    border-color: #bae6fd;
}
.jenjang-step.st-diajukan .step-icon {
    background: #e0f2fe;
    color: #0284c7;
}

.jenjang-step.st-verifikasi {
    background: #fffbeb;
    border-color: #fde68a;
}
.jenjang-step.st-verifikasi .step-icon {
    background: #fef3c7;
    color: #d97706;
}

.jenjang-step.st-persetujuan {
    background: #eef2ff;
    border-color: #c7d2fe;
}
.jenjang-step.st-persetujuan .step-icon {
    background: #e0e7ff;
    color: #4f46e5;
}

.jenjang-step.st-selesai {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.jenjang-step.st-selesai .step-icon {
    background: #dcfce7;
    color: #16a34a;
}

.jenjang-step.st-perbaikan {
    background: #fff7ed;
    border-color: #fed7aa;
}
.jenjang-step.st-perbaikan .step-icon {
    background: #ffedd5;
    color: #ea580c;
}

.jenjang-step.st-ditolak {
    background: #fef2f2;
    border-color: #fecaca;
}
.jenjang-step.st-ditolak .step-icon {
    background: #fee2e2;
    color: #dc2626;
}

.jenjang-step.is-inactive {
    opacity: 0.45;
    background: #f8fafc;
    border-color: #e2e8f0;
}
.jenjang-step.is-inactive .step-icon {
    background: #e2e8f0;
    color: #64748b;
}

/* Mini jalur di baris tabel */
.mini-track {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.mini-node {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #94a3b8;
}
.mini-node.done-blue   { background: #e0f2fe; border-color: #7dd3fc; color: #0284c7; }
.mini-node.done-amber  { background: #fef3c7; border-color: #fcd34d; color: #d97706; }
.mini-node.done-indigo { background: #e0e7ff; border-color: #a5b4fc; color: #4f46e5; }
.mini-node.done-green  { background: #dcfce7; border-color: #86efac; color: #16a34a; }
.mini-node.done-orange { background: #ffedd5; border-color: #fdba74; color: #ea580c; }
.mini-node.done-red    { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }
.mini-arrow {
    font-size: 0.62rem;
    color: #94a3b8;
}

@media (max-width: 767.98px) {
    .jenjang-track {
        grid-template-columns: 1fr;
    }
}

