/* ==========================================================================
   AMI UNILAK — Tema aplikasi
   Dibangun di atas Bootstrap 4.6. Bagian "Kompatibilitas" di bawah menata
   ulang class lama (pcoded-*, card-block, btn-mini, m-b-*, dst.) supaya view
   lama tetap rapi tanpa perlu ditulis ulang.
   ========================================================================== */

:root {
    --ami-navy-900: #071a3d;
    --ami-navy-800: #0b2559;
    --ami-navy-700: #10347a;
    --ami-blue-600: #1d5bd8;
    --ami-blue-500: #2f6fed;
    --ami-blue-400: #5b8ff5;
    --ami-blue-100: #dde8fd;
    --ami-blue-50:  #eef4ff;
    --ami-sky-500:  #0ea5e9;
    --ami-gold-500: #f5b400;
    --ami-gold-100: #fff3cc;

    --ami-success: #16a34a;
    --ami-success-soft: #e3f6ea;
    --ami-danger: #dc2f45;
    --ami-danger-soft: #fde7ea;
    --ami-warning: #e89b00;
    --ami-warning-soft: #fff4d6;
    --ami-info: #0b8fd0;
    --ami-info-soft: #e0f3fc;

    --ami-bg: #f2f5fb;
    --ami-surface: #ffffff;
    --ami-surface-2: #f7f9fd;
    --ami-border: #e2e8f3;
    --ami-border-strong: #cfd8e8;
    --ami-text: #14213d;
    --ami-text-2: #3d4a66;
    --ami-muted: #6b7895;

    --ami-radius: 14px;
    --ami-radius-sm: 9px;
    --ami-shadow-sm: 0 1px 2px rgba(16, 38, 89, .06);
    --ami-shadow: 0 1px 2px rgba(16, 38, 89, .05), 0 6px 20px -8px rgba(16, 38, 89, .14);
    --ami-shadow-lg: 0 24px 48px -16px rgba(7, 26, 61, .35);
    --ami-ring: 0 0 0 3px rgba(47, 111, 237, .22);

    --ami-sidebar-w: 268px;
    --ami-sidebar-w-mini: 78px;
    --ami-topbar-h: 66px;
    --ami-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Dasar ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--ami-font);
    font-size: .9rem;
    color: var(--ami-text);
    background: var(--ami-bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--ami-blue-600); }
a:hover { color: var(--ami-navy-700); }
h1, h2, h3, h4, h5, h6 { color: var(--ami-text); font-weight: 700; letter-spacing: -.01em; }
.text-muted { color: var(--ami-muted) !important; }
::selection { background: var(--ami-blue-100); }
:focus-visible { outline: 2px solid var(--ami-blue-500); outline-offset: 2px; }

/* ==========================================================================
   Layout: sidebar + topbar + konten
   ========================================================================== */
.ami-app { min-height: 100vh; }

.ami-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 1040;
    width: var(--ami-sidebar-w);
    display: flex; flex-direction: column;
    color: #c9d6f2;
    background:
        radial-gradient(120% 60% at 0% 0%, rgba(91, 143, 245, .28) 0%, rgba(91, 143, 245, 0) 60%),
        linear-gradient(180deg, var(--ami-navy-800) 0%, var(--ami-navy-900) 100%);
    box-shadow: 1px 0 0 rgba(255, 255, 255, .04);
    transition: width .22s ease, transform .25s ease;
}

.ami-brand {
    display: flex; align-items: center; gap: .75rem;
    height: var(--ami-topbar-h); padding: 0 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    color: #fff; text-decoration: none; flex-shrink: 0;
}
.ami-brand:hover { color: #fff; text-decoration: none; }
.ami-brand img {
    width: 38px; height: 38px; object-fit: contain; flex-shrink: 0;
    background: #fff; border-radius: 11px; padding: 3px;
    box-shadow: 0 0 0 3px rgba(245, 180, 0, .35);
}
.ami-brand-text { line-height: 1.15; white-space: nowrap; overflow: hidden; }
.ami-brand-text strong { display: block; font-size: 1.05rem; letter-spacing: .02em; }
.ami-brand-text strong span { color: var(--ami-gold-500); }
.ami-brand-text small { font-size: .7rem; color: #9fb3dc; letter-spacing: .02em; }

.ami-nav { flex: 1; overflow-y: auto; padding: .75rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.ami-nav::-webkit-scrollbar { width: 6px; }
.ami-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 6px; }

.ami-nav-label {
    margin: 1.1rem .75rem .4rem; font-size: .66rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; color: #7f93bd; white-space: nowrap;
}
.ami-nav-label:first-child { margin-top: .35rem; }

.ami-nav-link {
    position: relative; display: flex; align-items: center; gap: .8rem; width: 100%;
    padding: .62rem .8rem; margin: 2px 0; border: 0; border-radius: 10px;
    background: transparent; color: #c9d6f2; font-size: .86rem; font-weight: 500;
    text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.ami-nav-link > .fa { width: 20px; font-size: 1.02rem; text-align: center; flex-shrink: 0; color: #8fa6d6; transition: color .15s ease; }
.ami-nav-link > span { overflow: hidden; text-overflow: ellipsis; }
.ami-nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.ami-nav-link:hover > .fa { color: #fff; }
.ami-nav-link.active {
    color: #fff; font-weight: 600;
    background: linear-gradient(90deg, rgba(47, 111, 237, .95), rgba(29, 91, 216, .85));
    box-shadow: 0 8px 18px -10px rgba(47, 111, 237, .9);
}
.ami-nav-link.active > .fa { color: #fff; }
.ami-nav-link.active::before {
    content: ""; position: absolute; left: -.75rem; top: 22%; bottom: 22%;
    width: 4px; border-radius: 0 4px 4px 0; background: var(--ami-gold-500);
}

.ami-nav-caret { margin-left: auto; font-size: .8rem; transition: transform .2s ease; }
.ami-nav-group.open > .ami-nav-link .ami-nav-caret { transform: rotate(90deg); }
.ami-nav-group.has-active > .ami-nav-link { color: #fff; }
.ami-nav-group.has-active > .ami-nav-link > .fa { color: var(--ami-gold-500); }
.ami-subnav { display: none; padding: .15rem 0 .35rem 1.15rem; margin-left: 1.05rem; border-left: 1px dashed rgba(255, 255, 255, .14); }
.ami-nav-group.open > .ami-subnav { display: block; }
.ami-subnav .ami-nav-link { padding: .48rem .75rem; font-size: .83rem; }
.ami-subnav .ami-nav-link::after {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: #6f86b8; order: -1; flex-shrink: 0; margin-right: .1rem;
}
.ami-subnav .ami-nav-link.active { background: rgba(255, 255, 255, .1); box-shadow: none; }
.ami-subnav .ami-nav-link.active::before { display: none; }
.ami-subnav .ami-nav-link.active::after { background: var(--ami-gold-500); }

.ami-sidebar-footer { padding: .85rem; border-top: 1px solid rgba(255, 255, 255, .07); flex-shrink: 0; }
.ami-sidebar-footer .ami-nav-link { color: #f6b3bd; }
.ami-sidebar-footer .ami-nav-link > .fa { color: #f08a99; }
.ami-sidebar-footer .ami-nav-link:hover { background: rgba(220, 47, 69, .16); color: #fff; }

/* Konten utama */
.ami-main { min-height: 100vh; margin-left: var(--ami-sidebar-w); display: flex; flex-direction: column; transition: margin-left .22s ease; min-width: 0; }

.ami-topbar {
    position: sticky; top: 0; z-index: 1030;
    height: var(--ami-topbar-h); display: flex; align-items: center; gap: .75rem;
    padding: 0 1.5rem;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--ami-border);
}
.ami-icon-btn {
    width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--ami-border); border-radius: 11px; background: var(--ami-surface);
    color: var(--ami-text-2); font-size: 1.05rem; cursor: pointer; flex-shrink: 0;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ami-icon-btn:hover { background: var(--ami-blue-50); color: var(--ami-blue-600); border-color: var(--ami-blue-100); }
.ami-topbar-title { min-width: 0; line-height: 1.2; }
.ami-topbar-title strong { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ami-topbar-title small { color: var(--ami-muted); font-size: .74rem; }
.ami-topbar-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }

.ami-role-chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .75rem;
    border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap;
    background: var(--ami-blue-50); color: var(--ami-blue-600); border: 1px solid var(--ami-blue-100);
}
.ami-role-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ami-gold-500); box-shadow: 0 0 0 3px rgba(245, 180, 0, .25); }

.ami-user-btn {
    display: flex; align-items: center; gap: .6rem; padding: .3rem .45rem .3rem .3rem;
    border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ami-text); cursor: pointer;
}
.ami-user-btn:hover, .ami-user-btn[aria-expanded="true"] { background: var(--ami-surface-2); border-color: var(--ami-border); }
.ami-avatar {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .82rem; color: #fff; letter-spacing: .02em;
    background: linear-gradient(135deg, var(--ami-blue-500), var(--ami-navy-700));
}
.ami-user-meta { line-height: 1.15; text-align: left; max-width: 180px; }
.ami-user-meta strong { display: block; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ami-user-meta small { color: var(--ami-muted); font-size: .72rem; }
.ami-user-menu { min-width: 240px; padding: .4rem; }
.ami-user-menu .dropdown-header { padding: .6rem .75rem .5rem; white-space: normal; }
.ami-user-menu .dropdown-header strong { display: block; color: var(--ami-text); font-size: .88rem; }
.ami-user-menu .dropdown-item, .ami-user-menu button.dropdown-item { display: flex; align-items: center; gap: .6rem; }
.ami-user-menu .dropdown-item .fa { width: 16px; text-align: center; color: var(--ami-muted); }

.ami-impersonate {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .6rem 1.5rem; font-size: .84rem;
    background: linear-gradient(90deg, var(--ami-gold-100), #fff8e1);
    border-bottom: 1px solid #f3dd94; color: #6b4e00;
}
.ami-impersonate form { margin: 0; }

.ami-content { flex: 1; padding: 1.5rem; min-width: 0; }
.ami-footer {
    padding: 1rem 1.5rem; font-size: .76rem; color: var(--ami-muted);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
}

.ami-backdrop {
    position: fixed; inset: 0; z-index: 1035; background: rgba(7, 26, 61, .45);
    opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}

/* Sidebar ringkas (desktop) */
@media (min-width: 992px) {
    .ami-sidebar-mini .ami-sidebar { width: var(--ami-sidebar-w-mini); }
    .ami-sidebar-mini .ami-main { margin-left: var(--ami-sidebar-w-mini); }
    .ami-sidebar-mini .ami-brand { justify-content: center; padding: 0; }
    .ami-sidebar-mini .ami-brand-text,
    .ami-sidebar-mini .ami-nav-label,
    .ami-sidebar-mini .ami-nav-link > span,
    .ami-sidebar-mini .ami-nav-caret { display: none; }
    .ami-sidebar-mini .ami-nav { padding: .75rem .9rem; }
    .ami-sidebar-mini .ami-nav-link { justify-content: center; padding: .7rem 0; }
    .ami-sidebar-mini .ami-nav-link.active::before { left: -.9rem; }
    .ami-sidebar-mini .ami-subnav { display: none !important; }
    .ami-sidebar-mini .ami-nav-group.has-active > .ami-nav-link {
        background: linear-gradient(90deg, rgba(47, 111, 237, .95), rgba(29, 91, 216, .85));
    }
    .ami-sidebar-mini .ami-nav-group.has-active > .ami-nav-link > .fa { color: #fff; }
}

/* Mobile: sidebar jadi off-canvas */
@media (max-width: 991.98px) {
    .ami-sidebar { transform: translateX(-100%); box-shadow: var(--ami-shadow-lg); }
    .ami-main { margin-left: 0; }
    .ami-sidebar-open .ami-sidebar { transform: translateX(0); }
    .ami-sidebar-open .ami-backdrop { opacity: 1; visibility: visible; }
    .ami-sidebar-open { overflow: hidden; }
    .ami-topbar { padding: 0 1rem; }
    .ami-content { padding: 1rem; }
    .ami-impersonate { padding: .6rem 1rem; }
    .ami-footer { padding: .75rem 1rem 1rem; }
}
@media (max-width: 575.98px) {
    .ami-user-meta, .ami-role-chip, .ami-topbar-title small { display: none; }
}

/* ==========================================================================
   Komponen Bootstrap (disegarkan)
   ========================================================================== */

/* Card */
.card {
    border: 1px solid var(--ami-border); border-radius: var(--ami-radius);
    background: var(--ami-surface); box-shadow: var(--ami-shadow); margin-bottom: 1.5rem;
}
.card > .card-header:first-child { border-radius: var(--ami-radius) var(--ami-radius) 0 0; }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--ami-border); }
.card-header:not([class*="bg-"]) { background: var(--ami-surface); }
.card-header h5, .card-header .card-title {
    margin: 0; font-size: 1rem; font-weight: 700; color: var(--ami-text);
    display: inline-flex; align-items: center; gap: .55rem;
}
.card-header:not([class*="bg-"]) > h5:first-child::before {
    content: ""; width: 4px; height: 1.05em; border-radius: 4px;
    background: linear-gradient(180deg, var(--ami-blue-500), var(--ami-sky-500));
}
.card-header span, .card-header small { color: var(--ami-muted); }
.card-body, .card-block { padding: 1.25rem; }
.card-footer { background: var(--ami-surface-2); border-top: 1px solid var(--ami-border); }

/* Tombol */
.btn {
    font-weight: 600; font-size: .84rem; border-radius: var(--ami-radius-sm);
    padding: .5rem 1rem; letter-spacing: .005em;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
/* Ikon & teks tombol tidak terpisah baris di kolom/tabel sempit */
.btn { white-space: nowrap; }
.btn-block, .ami-auth-card .btn { white-space: normal; }
.table td .btn + .btn, .table td .btn + form, .table td form + .btn, .table td form + form { margin-left: .2rem; }
.table td > .btn, .table td > form { margin-top: .15rem; margin-bottom: .15rem; }
.btn:focus, .btn.focus { box-shadow: var(--ami-ring); }
.btn .fa.ami-ico-gap { margin-right: .4rem; }
.btn-sm { padding: .36rem .75rem; font-size: .78rem; border-radius: 8px; }
.btn-lg { padding: .72rem 1.3rem; font-size: .95rem; border-radius: 12px; }
.btn-mini { padding: .28rem .55rem; font-size: .74rem; line-height: 1.4; border-radius: 7px; }
.btn-mini .fa { font-size: .82rem; }

.btn-primary { background: linear-gradient(180deg, var(--ami-blue-500), var(--ami-blue-600)); border-color: var(--ami-blue-600); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--ami-navy-700); border-color: var(--ami-navy-700); color: #fff; }
.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active { background: var(--ami-navy-800); border-color: var(--ami-navy-800); }
.btn-secondary { background: #e9eef7; border-color: #e9eef7; color: var(--ami-text-2); }
.btn-secondary:hover, .btn-secondary:focus { background: #dbe3f0; border-color: #dbe3f0; color: var(--ami-text); }
.btn-success { background: var(--ami-success); border-color: var(--ami-success); }
.btn-success:hover, .btn-success:focus { background: #12863d; border-color: #12863d; }
.btn-danger { background: var(--ami-danger); border-color: var(--ami-danger); }
.btn-danger:hover, .btn-danger:focus { background: #bd2338; border-color: #bd2338; }
.btn-warning { background: var(--ami-gold-500); border-color: var(--ami-gold-500); color: #3d2c00; }
.btn-warning:hover, .btn-warning:focus { background: #e0a500; border-color: #e0a500; color: #2b1f00; }
.btn-info { background: var(--ami-info); border-color: var(--ami-info); color: #fff; }
.btn-info:hover, .btn-info:focus { background: #0878b0; border-color: #0878b0; color: #fff; }
.btn-dark, .btn-inverse { background: var(--ami-navy-800); border-color: var(--ami-navy-800); color: #fff; }
.btn-dark:hover, .btn-inverse:hover, .btn-inverse:focus { background: var(--ami-navy-900); border-color: var(--ami-navy-900); color: #fff; }
.btn-light { background: var(--ami-surface-2); border-color: var(--ami-border); color: var(--ami-text-2); }
.btn-outline-primary { color: var(--ami-blue-600); border-color: var(--ami-blue-400); }
.btn-outline-primary:hover { background: var(--ami-blue-600); border-color: var(--ami-blue-600); }
.btn-link { color: var(--ami-blue-600); font-weight: 600; }

/* Form */
label, .col-form-label { font-weight: 600; font-size: .82rem; color: var(--ami-text-2); }
.form-control, .custom-select {
    border: 1px solid var(--ami-border-strong); border-radius: var(--ami-radius-sm);
    font-size: .88rem; color: var(--ami-text); background-color: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:not(textarea):not([multiple]):not([size]):not(.form-control-sm):not(.form-control-lg) { height: calc(1.5em + 1rem + 2px); padding: .5rem .8rem; }
.form-control:focus, .custom-select:focus { border-color: var(--ami-blue-400); box-shadow: var(--ami-ring); }
.form-control::placeholder { color: #9aa6bf; }
.form-control:disabled, .form-control[readonly] { background: var(--ami-surface-2); }
.form-control-sm { border-radius: 7px; }
.input-group-text { background: var(--ami-surface-2); border-color: var(--ami-border-strong); color: var(--ami-muted); }
.form-group { margin-bottom: 1.1rem; }
.custom-control-input:checked ~ .custom-control-label::before { background: var(--ami-blue-500); border-color: var(--ami-blue-500); }
.form-control-file { font-size: .85rem; }

/* Tabel */
.table { color: var(--ami-text); margin-bottom: 0; }
.table th, .table td { border-color: var(--ami-border); vertical-align: middle; padding: .7rem .8rem; }
.table thead th {
    background: #f1f5fc; color: var(--ami-text-2); border-bottom: 1px solid var(--ami-border-strong) !important;
    font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.table-bordered, .table-bordered th, .table-bordered td { border-color: var(--ami-border); }
.table-striped tbody tr:nth-of-type(odd) { background-color: #f8fafe; }
.table-hover tbody tr:hover, .table-striped tbody tr:hover { background-color: var(--ami-blue-50); }
.table-sm th, .table-sm td { padding: .45rem .55rem; }
.table .thead-dark th { background: var(--ami-navy-800); color: #fff; border-color: var(--ami-navy-700); }
.table .thead-light th { background: #f1f5fc; color: var(--ami-text-2); }
.table-responsive, .dt-responsive { border-radius: var(--ami-radius-sm); }

/* DataTables */
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label { font-weight: 500; color: var(--ami-muted); font-size: .82rem; }
div.dataTables_wrapper div.dataTables_filter input { border-radius: 999px; padding-left: .9rem; min-width: 200px; margin-left: .5rem; }
div.dataTables_wrapper div.dataTables_length select { border-radius: 8px; margin: 0 .35rem; }
div.dataTables_wrapper div.dataTables_length label { display: inline-flex; align-items: center; margin-bottom: 0; }
div.dataTables_wrapper div.dataTables_filter label { margin-bottom: 0; }
div.dataTables_wrapper div.dataTables_info { color: var(--ami-muted); font-size: .8rem; padding-top: 1rem; }
div.dataTables_wrapper div.dataTables_paginate { padding-top: .6rem; }
div.dataTables_wrapper .row:first-child { margin-bottom: .75rem; }
table.dataTable { border-collapse: collapse !important; }
table.dataTable.table-striped > tbody > tr.odd > * { box-shadow: inset 0 0 0 9999px rgba(29, 91, 216, .028); }
table.dataTable.table-hover > tbody > tr:hover > *,
table.dataTable.table-striped > tbody > tr:hover > * { box-shadow: inset 0 0 0 9999px rgba(29, 91, 216, .06); }
table.dataTable > tbody > tr.selected > * { box-shadow: inset 0 0 0 9999px rgba(29, 91, 216, .9); }
table.dataTable thead .sorting::before, table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before, table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::before, table.dataTable thead .sorting_desc::after { opacity: .25; }
table.dataTable thead .sorting_asc::before, table.dataTable thead .sorting_desc::after { opacity: .9; color: var(--ami-blue-500); }
div.dt-buttons { display: flex; flex-wrap: wrap; gap: .35rem; }
div.dt-buttons .btn, div.dt-buttons .dt-button { border-radius: 8px !important; font-size: .78rem; margin: 0 !important; }
div.dataTables_wrapper div.dataTables_processing {
    top: 50%; left: 50%; width: auto; margin: 0; transform: translate(-50%, -50%); z-index: 5;
    padding: .65rem 1.1rem; border: 1px solid var(--ami-border); border-radius: 999px;
    background: var(--ami-surface); box-shadow: var(--ami-shadow); color: var(--ami-blue-600); font-weight: 600; font-size: .82rem;
}
div.dataTables_wrapper div.dataTables_processing > div:last-child { display: none; }
table.dataTable td .rich-html { min-width: 260px; line-height: 1.55; }
@media (max-width: 767.98px) {
    div.dataTables_wrapper div.dataTables_filter label { display: flex; align-items: center; gap: .5rem; width: 100%; margin: 0; }
    div.dataTables_wrapper div.dataTables_filter input { flex: 1; min-width: 0; width: auto; margin-left: 0; }
}

/* Paginasi */
.page-link { color: var(--ami-blue-600); border-color: var(--ami-border); margin: 0 2px; border-radius: 8px !important; min-width: 34px; text-align: center; }
.page-link:hover { background: var(--ami-blue-50); border-color: var(--ami-blue-100); color: var(--ami-navy-700); }
.page-item.active .page-link { background: var(--ami-blue-500); border-color: var(--ami-blue-500); box-shadow: 0 6px 14px -8px rgba(47, 111, 237, .9); }
.page-item.disabled .page-link { color: #a9b3c8; }

/* Alert */
.alert { border: 1px solid transparent; border-left-width: 4px; border-radius: var(--ami-radius-sm); font-size: .86rem; padding: .8rem 1rem; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert-success { background: var(--ami-success-soft); border-color: #bfe8cf; border-left-color: var(--ami-success); color: #0f5c2c; }
.alert-danger { background: var(--ami-danger-soft); border-color: #f8c6ce; border-left-color: var(--ami-danger); color: #8a1426; }
.alert-warning { background: var(--ami-warning-soft); border-color: #f6e0a3; border-left-color: var(--ami-warning); color: #6b4800; }
.alert-info { background: var(--ami-info-soft); border-color: #bfe4f6; border-left-color: var(--ami-info); color: #075b85; }
.alert-primary { background: var(--ami-blue-50); border-color: var(--ami-blue-100); border-left-color: var(--ami-blue-500); color: var(--ami-navy-700); }
.alert-secondary { background: var(--ami-surface-2); border-color: var(--ami-border); border-left-color: var(--ami-muted); color: var(--ami-text-2); }

/* Badge */
.badge { font-weight: 600; padding: .38em .65em; border-radius: 999px; font-size: 72%; letter-spacing: .01em; }
.badge-primary { background: var(--ami-blue-500); }
.badge-success { background: var(--ami-success); }
.badge-danger { background: var(--ami-danger); }
.badge-warning { background: var(--ami-gold-500); color: #3d2c00; }
.badge-info { background: var(--ami-info); }
.badge-secondary { background: #8792aa; }
.badge-dark { background: var(--ami-navy-800); }
.badge-light { background: #eef2f8; color: var(--ami-text-2); }
.badge-soft-success { background: var(--ami-success-soft); color: #0f6a33; }
.badge-soft-warning { background: var(--ami-warning-soft); color: #7a5300; }
.badge-soft-danger { background: var(--ami-danger-soft); color: #9b1a2d; }
.badge-soft-secondary { background: #edf1f7; color: var(--ami-text-2); }
.badge-soft-primary { background: var(--ami-blue-50); color: var(--ami-blue-600); }

/* Modal, dropdown, nav */
.modal-content { border: 0; border-radius: 16px; box-shadow: var(--ami-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--ami-border); padding: 1rem 1.25rem; }
.modal-header .modal-title { font-weight: 700; font-size: 1.02rem; }
.modal-footer { border-top: 1px solid var(--ami-border); background: var(--ami-surface-2); border-radius: 0 0 16px 16px; }
.modal-backdrop.show { opacity: .45; background: var(--ami-navy-900); }
.dropdown-menu { border: 1px solid var(--ami-border); border-radius: 12px; box-shadow: var(--ami-shadow-lg); font-size: .86rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; color: var(--ami-text-2); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--ami-blue-50); color: var(--ami-navy-700); }
.dropdown-item.text-danger:hover { background: var(--ami-danger-soft); }
.nav-tabs { border-bottom-color: var(--ami-border); }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--ami-muted); font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--ami-blue-600); border-bottom-color: var(--ami-blue-500); background: transparent; }
.nav-pills .nav-link.active { background: var(--ami-blue-500); }
.progress { background: #e8edf6; border-radius: 999px; }
.progress-bar { background: linear-gradient(90deg, var(--ami-blue-500), var(--ami-sky-500)); }
.list-group-item { border-color: var(--ami-border); }
.list-group-item.active { background: var(--ami-blue-500); border-color: var(--ami-blue-500); }
.bg-primary { background-color: var(--ami-blue-500) !important; }
.text-primary { color: var(--ami-blue-600) !important; }
.border-primary { border-color: var(--ami-blue-500) !important; }
hr { border-top-color: var(--ami-border); }

/* Select2 */
.select2-container--bootstrap4 .select2-selection { border-color: var(--ami-border-strong); border-radius: var(--ami-radius-sm); }
.select2-container--bootstrap4.select2-container--focus .select2-selection { border-color: var(--ami-blue-400); box-shadow: var(--ami-ring); }
.select2-container--bootstrap4 .select2-results__option--highlighted { background: var(--ami-blue-500) !important; }
.select2-dropdown { border-color: var(--ami-border-strong); border-radius: var(--ami-radius-sm); overflow: hidden; }

/* ==========================================================================
   Kompatibilitas markup lama (Mega Able)
   ========================================================================== */
.pcoded-content { display: block; }
.pcoded-inner-content, .main-body, .page-wrapper, .page-body { padding: 0; margin: 0; }

.page-header { margin: 0 0 1.35rem; padding: 0; background: none; }
.page-header .page-block { padding: 0; }
.page-header .page-block > .row { row-gap: .5rem; }
.page-header-title h5 { margin: 0 0 .2rem; font-size: 1.45rem; font-weight: 800; color: var(--ami-text); letter-spacing: -.02em; }
.page-header-title p { color: var(--ami-muted); font-size: .86rem; }
.page-header .breadcrumb { justify-content: flex-end; }
.breadcrumb { background: transparent; padding: 0; margin: 0; font-size: .8rem; }
.breadcrumb-item a { color: var(--ami-muted); }
.breadcrumb-item a:hover { color: var(--ami-blue-600); text-decoration: none; }
.breadcrumb-item.active, .breadcrumb-item:last-child a { color: var(--ami-blue-600); font-weight: 600; }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; color: #a5b0c6; }
@media (max-width: 767.98px) {
    .page-header .breadcrumb { justify-content: flex-start; }
    .page-header-title h5 { font-size: 1.2rem; }
}

.card .card-header-right, .card-option { display: none !important; }
/* .table-border-style (gaya lama, dulu padding 0): kontrol DataTables & filter jadi menempel ke tepi kartu.
   Sekarang padding normal seperti card-block lain. */

/* Utilitas spasi & teks gaya lama */
.m-0 { margin: 0 !important; }
.m-b-0 { margin-bottom: 0 !important; } .m-b-5 { margin-bottom: 5px !important; } .m-b-10 { margin-bottom: 10px !important; }
.m-b-15 { margin-bottom: 15px !important; } .m-b-20 { margin-bottom: 20px !important; } .m-b-30 { margin-bottom: 30px !important; }
.m-t-0 { margin-top: 0 !important; } .m-t-5 { margin-top: 5px !important; } .m-t-10 { margin-top: 10px !important; }
.m-t-15 { margin-top: 15px !important; } .m-t-20 { margin-top: 20px !important; } .m-t-30 { margin-top: 30px !important; }
.m-r-5 { margin-right: 5px !important; } .m-r-10 { margin-right: 10px !important; }
.m-l-5 { margin-left: 5px !important; } .m-l-10 { margin-left: 10px !important; }
.p-0 { padding: 0 !important; } .p-10 { padding: 10px !important; } .p-15 { padding: 15px !important; } .p-20 { padding: 20px !important; }
.f-12 { font-size: 12px; } .f-14 { font-size: 14px; } .f-16 { font-size: 16px; } .f-18 { font-size: 18px; }
.f-20 { font-size: 20px; } .f-24 { font-size: 24px; } .f-28 { font-size: 28px; } .f-30 { font-size: 30px; } .f-40 { font-size: 40px; }
.f-w-400 { font-weight: 400; } .f-w-600 { font-weight: 600; } .f-w-700 { font-weight: 700; }
.text-c-blue { color: var(--ami-blue-500) !important; } .text-c-green { color: var(--ami-success) !important; }
.text-c-red { color: var(--ami-danger) !important; } .text-c-yellow { color: var(--ami-warning) !important; }
.text-c-purple { color: #7c4ddb !important; } .text-c-orange { color: #ea7a1c !important; }
.bg-c-blue { background: linear-gradient(135deg, var(--ami-blue-500), var(--ami-navy-700)) !important; color: #fff; }
.bg-c-green { background: linear-gradient(135deg, #22b45a, #12863d) !important; color: #fff; }
.bg-c-yellow { background: linear-gradient(135deg, #f8c632, #e89b00) !important; color: #fff; }
.bg-c-red { background: linear-gradient(135deg, #ef4f63, #bd2338) !important; color: #fff; }
.rich-html p { margin: .25rem 0; }
.rich-html ol, .rich-html ul { margin: .25rem 0 .25rem 1.25rem; }
.rich-html ol { list-style: decimal; }
.rich-html ol ol { list-style: decimal; }
.rich-html ol li::marker { content: counter(list-item) " "; }

/* ==========================================================================
   Halaman login
   ========================================================================== */
.ami-auth { min-height: 100vh; display: flex; background: var(--ami-bg); }
.ami-auth-hero {
    position: relative; flex: 1 1 54%; overflow: hidden; color: #fff;
    display: flex; flex-direction: column; justify-content: space-between; padding: 3rem 3.5rem;
    background:
        radial-gradient(70% 55% at 85% 10%, rgba(14, 165, 233, .45) 0%, rgba(14, 165, 233, 0) 70%),
        radial-gradient(60% 50% at 10% 95%, rgba(245, 180, 0, .16) 0%, rgba(245, 180, 0, 0) 65%),
        linear-gradient(150deg, var(--ami-blue-600) 0%, var(--ami-navy-800) 55%, var(--ami-navy-900) 100%);
}
.ami-auth-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 100%);
    mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 100%);
}
.ami-auth-hero > * { position: relative; }
.ami-auth-brand { display: flex; align-items: center; gap: .9rem; }
.ami-auth-brand img { width: 54px; height: 54px; object-fit: contain; background: #fff; border-radius: 14px; padding: 4px; box-shadow: 0 0 0 4px rgba(245, 180, 0, .35); }
.ami-auth-brand strong { display: block; font-size: 1rem; letter-spacing: .03em; }
.ami-auth-brand small { color: #b8c8ec; font-size: .78rem; }
.ami-auth-hero h1 { color: #fff; font-size: clamp(2rem, 3.2vw, 2.9rem); font-weight: 800; line-height: 1.12; letter-spacing: -.03em; margin: 0 0 1rem; }
.ami-auth-hero h1 span { color: var(--ami-gold-500); }
.ami-auth-hero p.lead { color: #c9d6f2; font-size: 1rem; max-width: 30rem; margin-bottom: 2rem; }
.ami-auth-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; max-width: 28rem; }
.ami-auth-steps li {
    display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px; font-size: .88rem; color: #e6edfb;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ami-auth-steps .fa {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .12); color: var(--ami-gold-500); font-size: 1rem;
}
.ami-auth-steps small { display: block; color: #9fb3dc; font-size: .76rem; }
.ami-auth-hero-foot { color: #8fa6d6; font-size: .78rem; }

.ami-auth-panel { flex: 1 1 46%; display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.ami-auth-card { width: 100%; max-width: 410px; }
.ami-auth-card .ami-auth-logo { display: none; width: 64px; height: 64px; margin-bottom: 1.25rem; }
.ami-auth-card h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .35rem; }
.ami-auth-card > p { color: var(--ami-muted); margin-bottom: 1.75rem; }
.ami-input-icon { position: relative; }
.ami-input-icon > .fa { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: #9aa6bf; pointer-events: none; }
.ami-input-icon .form-control { padding-left: 2.6rem !important; height: 48px !important; border-radius: 12px; }
.ami-input-icon .ami-eye {
    position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: 0; background: transparent; color: #8592ad; border-radius: 9px;
}
.ami-input-icon .ami-eye:hover { background: var(--ami-surface-2); color: var(--ami-blue-600); }
.ami-auth-card .btn-primary { height: 48px; border-radius: 12px; font-size: .95rem; box-shadow: 0 12px 24px -12px rgba(29, 91, 216, .8); }
.ami-auth-note { margin-top: 1.5rem; text-align: center; font-size: .82rem; color: var(--ami-muted); }

@media (max-width: 991.98px) {
    .ami-auth-hero { display: none; }
    .ami-auth {
        background:
            radial-gradient(90% 40% at 50% 0%, rgba(47, 111, 237, .14) 0%, rgba(47, 111, 237, 0) 70%),
            var(--ami-bg);
    }
    .ami-auth-card { background: var(--ami-surface); padding: 2rem 1.5rem; border-radius: 20px; border: 1px solid var(--ami-border); box-shadow: var(--ami-shadow); }
    .ami-auth-card .ami-auth-logo { display: block; }
}

/* ==========================================================================
   Cetak
   ========================================================================== */
@media print {
    .ami-sidebar, .ami-topbar, .ami-backdrop, .ami-impersonate, .ami-footer,
    .dataTables_length, .dataTables_filter, .dataTables_paginate, .dt-buttons { display: none !important; }
    .ami-main { margin-left: 0 !important; }
    .ami-content { padding: 0 !important; }
    body { background: #fff; }
    .card { box-shadow: none; border-color: #ccc; }
}

/* ==========================================================================
   Widget dashboard (hero, kartu statistik)
   ========================================================================== */
.hero-section {
    position: relative; overflow: hidden; color: #fff;
    padding: 1.75rem 2rem; margin-bottom: 1.5rem; border-radius: 20px;
    background:
        radial-gradient(60% 120% at 100% 0%, rgba(14, 165, 233, .45) 0%, rgba(14, 165, 233, 0) 60%),
        radial-gradient(40% 90% at 0% 100%, rgba(245, 180, 0, .22) 0%, rgba(245, 180, 0, 0) 70%),
        linear-gradient(135deg, var(--ami-blue-600) 0%, var(--ami-navy-800) 100%);
    box-shadow: 0 18px 36px -20px rgba(11, 37, 89, .7);
}
.hero-section::after {
    content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
    border-radius: 50%; border: 36px solid rgba(255, 255, 255, .06); pointer-events: none;
}
.hero-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .25rem; }
.hero-subtitle { color: #c9d6f2; font-size: .92rem; }
.hero-section .row { position: relative; z-index: 1; }

.soft-card {
    background: var(--ami-surface); border: 1px solid var(--ami-border); border-radius: var(--ami-radius);
    box-shadow: var(--ami-shadow); margin-bottom: 1.5rem; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.soft-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16, 38, 89, .05), 0 14px 30px -12px rgba(16, 38, 89, .22); }
.soft-card .card-header { background: transparent; }
.card-icon-bg {
    width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0; margin-right: 1rem;
    display: flex; align-items: center; justify-content: center; font-size: 1.45rem; color: #fff;
    box-shadow: 0 10px 20px -10px rgba(16, 38, 89, .55);
}
.bg-gradient-blue   { background: linear-gradient(135deg, var(--ami-blue-400), var(--ami-blue-600)) !important; color: #fff; }
.bg-gradient-green  { background: linear-gradient(135deg, #2bc46a, #12863d) !important; color: #fff; }
.bg-gradient-orange { background: linear-gradient(135deg, #ffc93d, #e89b00) !important; color: #fff; }
.bg-gradient-red    { background: linear-gradient(135deg, #f26b7c, #c92a40) !important; color: #fff; }
.bg-gradient-purple { background: linear-gradient(135deg, var(--ami-sky-500), var(--ami-navy-700)) !important; color: #fff; }
.progress-bar-custom { height: 8px; border-radius: 999px; background: #e8edf6; overflow: hidden; margin-top: .65rem; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ami-blue-500), var(--ami-sky-500)); }
.table-modern thead th { border-top: 0; }
.table-modern tbody td { padding: .9rem; }
@media (max-width: 767.98px) {
    .hero-section { padding: 1.35rem 1.25rem; border-radius: 16px; }
    .hero-title { font-size: 1.25rem; }
}

/* ==========================================================================
   Login SSO & pilih akun/peran
   ========================================================================== */
.ami-auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; color: var(--ami-muted); font-size: .78rem; }
.ami-auth-divider::before, .ami-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--ami-border); }
.ami-btn-sso { height: 48px; display: flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 12px; font-size: .92rem; }
.ami-btn-sso .fa { color: var(--ami-blue-600); }
.ami-akun-list { display: grid; gap: .75rem; }
.ami-akun {
    --tone: var(--ami-blue-600); --tone-soft: var(--ami-blue-50);
    position: relative; display: flex; align-items: flex-start; gap: 1rem; width: 100%; padding: 1rem 1.1rem 1rem 1.25rem; text-align: left;
    background: var(--ami-surface); border: 1px solid var(--ami-border); border-radius: 16px; cursor: pointer; overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 38, 89, .04);
    transition: border-color .15s ease, box-shadow .2s ease, transform .15s ease;
}
.ami-akun::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone); opacity: .85; }
.ami-akun--admin   { --tone: var(--ami-navy-700); --tone-soft: #e6ecf8; }
.ami-akun--auditor { --tone: var(--ami-sky-500);  --tone-soft: var(--ami-info-soft); }
.ami-akun--auditee { --tone: var(--ami-warning);  --tone-soft: var(--ami-gold-100); }
.ami-akun:hover, .ami-akun:focus-visible {
    border-color: var(--tone); outline: 0; transform: translateY(-2px);
    box-shadow: 0 14px 28px -16px rgba(16, 38, 89, .35), 0 0 0 3px var(--tone-soft);
}
.ami-akun:active { transform: translateY(0); }
.ami-akun-ikon {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--tone-soft); color: var(--tone); font-size: 1.25rem;
}
.ami-akun-info { flex: 1; min-width: 0; line-height: 1.35; }
.ami-akun-info strong { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; color: var(--ami-text); font-size: 1rem; font-weight: 700; }
.ami-akun-jenis {
    display: inline-block; margin-top: .3rem; padding: .15rem .55rem; border-radius: 999px;
    background: var(--tone-soft); color: #8a5a00; font-size: .74rem; font-weight: 700;
}
.ami-akun-ket { display: block; margin-top: .3rem; color: var(--ami-text-2); font-size: .8rem; }
.ami-akun-meta {
    display: block; margin-top: .45rem; padding-top: .45rem; border-top: 1px dashed var(--ami-border);
    color: var(--ami-muted); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ami-akun-meta .fa { width: 12px; text-align: center; opacity: .8; }
.ami-akun-meta span { margin: 0 .25rem; }
.ami-akun-go { align-self: center; color: var(--ami-border-strong); font-size: 1.5rem; transition: color .15s ease, transform .15s ease; }
.ami-akun:hover .ami-akun-go { color: var(--tone); transform: translateX(3px); }
.ami-akun-badge { font-size: .66rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: var(--ami-success-soft); color: var(--ami-success); }
.ami-akun.aktif { cursor: default; border-color: var(--ami-success); background: linear-gradient(0deg, rgba(22, 163, 74, .04), rgba(22, 163, 74, .04)), var(--ami-surface); transform: none; box-shadow: none; }
.ami-akun.aktif::before { background: var(--ami-success); }
.ami-akun.aktif .ami-akun-go { color: var(--ami-success); transform: none; }

.ami-pr-card { max-width: 460px; }
.ami-pr-eyebrow {
    display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .75rem; padding: .3rem .7rem; border-radius: 999px;
    background: var(--ami-blue-50); color: var(--ami-blue-600); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.ami-pr-aksi { display: flex; justify-content: center; align-items: center; gap: .5rem; margin-top: 1.5rem; }
.ami-pr-aksi .btn { border-radius: 10px; font-size: .85rem; font-weight: 600; }
.ami-pr-profil {
    display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; padding: 1rem 1.15rem; max-width: 30rem;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ami-pr-inisial {
    flex-shrink: 0; width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--ami-gold-500), #ffd65c); color: var(--ami-navy-900); font-size: 1.25rem; font-weight: 800;
}
.ami-pr-profil small { display: block; color: #b8c8ec; font-size: .78rem; }
.ami-pr-profil strong { display: block; color: #fff; font-size: 1.05rem; line-height: 1.3; }
.ami-pr-id { display: block; margin-top: .2rem; color: #c9d6f2; font-size: .78rem; }
@media (prefers-reduced-motion: reduce) {
    .ami-akun, .ami-akun-go { transition: none; }
    .ami-akun:hover, .ami-akun:hover .ami-akun-go { transform: none; }
}
.ami-btn-sso-utama { color: #fff; box-shadow: 0 12px 24px -12px rgba(29, 91, 216, .8); }
.ami-btn-sso-utama .fa { color: var(--ami-gold-500); }

/* Pemilih role akun (form pengguna) */
.ami-role-toggle { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .65rem; }
.ami-role-opsi { margin: 0; cursor: pointer; font-weight: 400; }
.ami-role-opsi input { position: absolute; opacity: 0; pointer-events: none; }
.ami-role-kartu {
    display: flex; align-items: center; gap: .8rem; height: 100%; padding: .8rem .95rem;
    border: 1px solid var(--ami-border-strong); border-radius: 12px; background: var(--ami-surface);
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.ami-role-kartu > .fa:first-child {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ami-blue-50); color: var(--ami-blue-600); font-size: 1rem;
}
.ami-role-kartu strong { display: block; font-size: .88rem; color: var(--ami-text); }
.ami-role-kartu small { display: block; font-size: .74rem; color: var(--ami-muted); line-height: 1.35; }
.ami-role-cek { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--ami-border-strong); color: transparent; font-size: .7rem; }
.ami-role-opsi:hover .ami-role-kartu { border-color: var(--ami-blue-400); }
.ami-role-opsi input:focus-visible + .ami-role-kartu { box-shadow: var(--ami-ring); }
.ami-role-opsi input:checked + .ami-role-kartu { border-color: var(--ami-blue-500); background: var(--ami-blue-50); }
.ami-role-opsi input:checked + .ami-role-kartu > .fa:first-child { background: var(--ami-blue-500); color: #fff; }
.ami-role-opsi input:checked + .ami-role-kartu .ami-role-cek { background: var(--ami-blue-500); border-color: var(--ami-blue-500); color: #fff; }
.select2-container--bootstrap4 .select2-selection--single { height: calc(1.5em + 1rem + 2px) !important; }
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered { line-height: calc(1.5em + 1rem) !important; padding-left: .8rem; }

/* ===== Analitik (Grafik Temuan & Status Temuan) ===== */
.ami-an-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.ami-an-toolbar .form-control { min-width: 220px; }
.ami-an-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .78rem; color: var(--ami-text-2); }
.ami-an-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; background: var(--c); vertical-align: -1px; }
.ami-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.ami-kpi {
    position: relative; overflow: hidden; padding: 1rem 1.1rem; background: var(--ami-surface);
    border: 1px solid var(--ami-border); border-radius: var(--ami-radius); box-shadow: var(--ami-shadow);
}
.ami-kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--ami-blue-500)); }
.ami-kpi-ikon {
    float: right; width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--c, var(--ami-blue-500)) 14%, transparent); color: var(--c, var(--ami-blue-500)); font-size: 1rem;
}
.ami-kpi small { display: block; color: var(--ami-muted); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ami-kpi strong { display: block; margin-top: .3rem; font-size: 1.65rem; font-weight: 800; line-height: 1.1; color: var(--ami-text); letter-spacing: -.02em; }
.ami-kpi .ami-kpi-sub { display: block; margin-top: .25rem; font-size: .76rem; color: var(--ami-text-2); }
.ami-kpi .ami-kpi-sub b { color: var(--c, var(--ami-blue-600)); }
.ami-chart { position: relative; height: 320px; }
.ami-chart-tinggi { height: auto; min-height: 320px; }
.ami-chart-kosong { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: .4rem; color: var(--ami-muted); font-size: .85rem; text-align: center; }
.ami-chart-kosong .fa { font-size: 1.6rem; opacity: .5; }
.ami-chart.kosong canvas { display: none; }
.ami-chart.kosong .ami-chart-kosong { display: flex; }
.ami-chart-catatan { margin: .6rem 0 0; font-size: .78rem; color: var(--ami-muted); }
.ami-donut-tengah { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-62%); text-align: center; pointer-events: none; }
.ami-donut-tengah strong { display: block; font-size: 1.9rem; font-weight: 800; color: var(--ami-text); line-height: 1; }
.ami-donut-tengah small { color: var(--ami-muted); font-size: .74rem; }
.ami-tabs-pill { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; background: var(--ami-surface-2); border: 1px solid var(--ami-border); border-radius: 10px; }
.ami-tabs-pill button { border: 0; background: transparent; padding: .35rem .8rem; border-radius: 7px; font-size: .78rem; font-weight: 600; color: var(--ami-text-2); }
.ami-tabs-pill button.aktif { background: var(--ami-surface); color: var(--ami-blue-600); box-shadow: 0 1px 3px rgba(16, 38, 89, .12); }
.ami-an-tabel td, .ami-an-tabel th { vertical-align: middle; font-size: .82rem; }
.ami-bar-mini { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #edf1f8; min-width: 120px; }
.ami-bar-mini span { display: block; height: 100%; }
