/* public/assets/css/mystyle.css */
body {
    font-family: 'Poppins', sans-serif; /* Berubah di sini */
    background-color: #f4f6f9;
    overflow: hidden; /* [TAMBAHAN] Mencegah seluruh halaman scroll */
    height: 100vh; /* Memastikan tinggi body tepat setinggi layar */
    margin: 0;
}

#wrapper {
    display: flex;
    width: 100vw;
    height: 100vh; /* [PENTING] Kunci tinggi wrapper agar tidak melebihi layar */
    position: relative;
    overflow: hidden; /* Menjaga agar tidak ada kebocoran scroll di wrapper */
}

/* Sidebar Styles */
#sidebar {
    width: 260px;
    background-color: #212529; /* Warna gelap elegan */
    color: #c2c7d0;
    flex-shrink: 0;
    transition:
        margin-left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    z-index: 1050;
}

.sidebar-brand {
    padding: 1.2rem 1rem;
    font-size: 1.2rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
    background: #1a1e21;
}

/* Jarak antar menu dipersempit */
.nav-sidebar .nav-link {
    color: #c2c7d0;
    padding: 0.6rem 1rem; /* Jarak atas-bawah diperkecil */
    border-radius: 0.375rem;
    margin: 0.1rem 0.8rem; /* Margin dipersempit */
    transition: 0.2s;
    display: flex;
    align-items: center;
    font-size: 0.9rem; /* Font sedikit disesuaikan */
}

/* Efek nyala biru untuk menu utama yang aktif */
.nav-sidebar .nav-link:hover,
.nav-sidebar .nav-item > .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.25); /* Bayangan halus */
}

.nav-sidebar .nav-icon {
    width: 25px;
    font-size: 1.05rem;
    margin-right: 10px;
    text-align: center;
    flex-shrink: 0; /* <--- Tambahkan ini agar ikon tidak mengecil */
}

/* Animasi Ikon Panah Dropdown */
.nav-link .arrow-icon {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}
.nav-link:not(.collapsed) .arrow-icon {
    transform: rotate(-180deg);
}

/* Styling Submenu yang Lebih Modern (Tree-line) */
.submenu-collapse {
    background-color: transparent; /* Hilangkan kotak abu-abu */
}

.submenu-nav {
    margin-left: 1.8rem; /* Indentasi ke dalam */
    border-left: 1px solid rgba(255, 255, 255, 0.1); /* Garis bantu hierarki */
    padding-left: 0.5rem;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
}

.submenu-nav .nav-link {
    padding: 0.4rem 1rem; /* Sangat rapat */
    margin: 0.1rem 0;
    font-size: 0.85rem;
    background-color: transparent !important; /* Jangan pakai kotak biru di sub */
    box-shadow: none !important;
    color: #adb5bd;
}

.submenu-nav .nav-link:hover {
    color: #fff;
}

.submenu-nav .nav-link.active {
    color: #fff;
    font-weight: 600;
}

/* Icon bullet (titik) super cantik di submenu */
.submenu-nav .nav-link .nav-icon {
    font-size: 0.4rem; /* Jadikan seperti titik */
    width: 15px;
    margin-right: 8px;
    color: #6c757d;
    transition: 0.3s;
    flex-shrink: 0; /* <--- Tambahkan ini agar ikon tidak mengecil */
}

.submenu-nav .nav-link:hover .nav-icon {
    color: #ced4da;
}

/* Titik biru membesar saat halaman aktif */
.submenu-nav .nav-link.active .nav-icon {
    color: #0d6efd;
    transform: scale(1.6);
}

/* Overlay Background untuk HP (Latar Hitam Transparan) */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    /* Animasi fade in/out yang mulus */
    transition:
        opacity 0.3s ease-in-out,
        visibility 0.3s ease-in-out;
}

#sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Main Content Wrapper */
#content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    z-index: 1;
    height: 100vh; /* Memastikan tinggi kontainer konten setinggi layar */
    overflow-y: auto; /* [TAMBAHAN] Membuat konten bisa di-scroll secara mandiri */
}

.navbar-light {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1.5rem;
}

/* Responsive Logic (HP & Tablet) */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed; /* Fixed agar menempel penuh saat di-scroll */
        height: 100%;
        left: 0;
        /* Geser ke kiri 100% dari lebarnya, animasi lebih mulus dari 'left' */
        transform: translateX(-100%);
    }

    #sidebar.show {
        transform: translateX(0); /* Kembalikan ke posisi normal */
    }
}

/* Desktop Collapse */
@media (min-width: 992px) {
    #sidebar.collapsed {
        margin-left: -260px;
    }
}

/* Utilities */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* --- NAVBAR BREADCRUMB STYLE --- */

/* Atur tinggi navbar agar pas untuk 2 baris teks */
.navbar-light {
    padding: 0.5rem 1.5rem !important;
    min-height: 65px;
}

.navbar-breadcrumb {
    font-size: 0.75rem; /* Ukuran lebih kecil dari judul */
    background: transparent;
    padding: 0;
}

.navbar-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: '\f105'; /* Ikon angle-right FontAwesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #ccc;
    /* padding: 0 6px; */
}

.navbar-breadcrumb .breadcrumb-item a {
    text-decoration: none;
    color: #6c757d; /* Warna abu-abu muted */
    transition: color 0.2s;
}

.navbar-breadcrumb .breadcrumb-item a:hover {
    color: #0d6efd; /* Highlight biru saat hover */
}

.navbar-breadcrumb .breadcrumb-item.active {
    color: #adb5bd;
    font-weight: 400;
}

/* Khusus link pertama (Home/Dashboard), beri ikon home jika mau */
.navbar-breadcrumb .breadcrumb-item:first-child a::before {
    content: '\f015';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 4px;
    font-size: 0.7rem;
}

.text-pre {
    white-space: pre-wrap; /* Preserve whitespace and wrap as needed */
    word-wrap: break-word; /* Break long words to prevent overflow */
}

/* select2 bootstrap 5 */

.form-floating > .select2-container,
.form-floating > select {
    height: calc(3.5rem + calc(var(--bs-border-width) * 2));
    min-height: calc(3.5rem + calc(var(--bs-border-width) * 2));
    line-height: 1.25;
}

.form-floating > .select2-container .select2-selection--single,
.form-floating > select {
    height: 100%;
    padding: 1rem 0.75rem;
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.select2-result-repository__description {
    color: var(--text-muted-color);
    font-size: 14px;
}
.select2-results__option--selected .select2-result-repository__description {
    color: var(--text-light);
}

/* * GLOBAL SEGMENTED CONTROL / PILL UI 
 * Letakkan di file CSS utama Anda agar bisa dipakai di semua form
 */

.status-filter {
    background-color: #f1f5f9;
    border-radius: 50rem;
    padding: 0.35rem;
    display: inline-flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.status-filter a {
    color: #64748b;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 50rem;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.status-filter a i {
    margin-right: 0.4rem;
    font-size: 1rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.status-filter a:hover:not(.active) {
    color: #334155;
    background-color: #e2e8f0;
}

.status-filter a.active {
    background-color: #ffffff;
    color: #0d6efd;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.status-filter a.active i {
    transform: scale(1.15);
}

/* ========================================================================= */
/* MASTER BLUEPRINT: TRANSACTION FORM STYLES                                 */
/* ========================================================================= */

.btn-dashed {
    border: 2px dashed #dee2e6;
    background-color: transparent;
    color: #6c757d;
    transition: all 0.2s ease-in-out;
}

.btn-dashed:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.input-transparent:focus {
    background-color: #fff !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    border-radius: 0.375rem;
}

/* Shared CRUD components and table theme. */
.crud-page {
    max-width: 1440px;
    margin: 0 auto;
    color: #243248;
}
.page-eyebrow {
    color: #718096;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    margin-bottom: 8px;
}
.crud-card {
    border: 1px solid #e5eaf1;
    border-radius: 16px;
    box-shadow: 0 4px 24px #20335405;
    overflow: hidden;
}
.crud-toolbar {
    padding: 24px;
    border-bottom: 1px solid #edf0f5;
}
.record-count {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 7px;
    background: #eef4ff;
    color: #326bd1;
    font-size: 0.75rem;
}
.crud-table-wrap {
    padding: 8px 24px 20px;
    overflow-x: auto;
}
main .table {
    font-size: 0.85rem;
}
main .table > thead > tr > th {
    color: #718096;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f8fafc;
    padding: 15px 12px;
}
main .table > tbody > tr > td {
    padding: 18px 12px;
    border-color: #edf0f5;
}
.cell-name {
    min-width: 160px;
}
.cell-description {
    max-width: 320px;
    min-width: 180px;
    white-space: normal;
    overflow-wrap: anywhere;
}
.status-badge {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 500;
}
.status-badge.is-active {
    background: #eaf8f0;
    color: #197449;
}
.status-badge.is-inactive {
    background: #eef1f5;
    color: #626c7a;
}
.crud-page .btn,
.crud-modal-content .btn {
    border-radius: 8px;
    padding: 10px 17px;
}
.crud-page .btn-sm {
    padding: 7px 10px;
    white-space: nowrap;
}
.crud-page .form-control,
.crud-page .form-select,
.crud-modal-content .form-control,
.crud-modal-content .form-select {
    min-height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    line-height: 1.5;
    border-color: #dce3ec;
    border-radius: 8px;
    font-size: 1rem;
}
.crud-page .form-select,
.crud-modal-content .form-select { padding-right: 2.25rem; }
.crud-modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
}
.crud-modal-content .modal-header,
.crud-modal-content .modal-body,
.crud-modal-content .modal-footer {
    padding: 24px;
}
.crud-modal-content .modal-header,
.crud-modal-content .modal-footer {
    border-color: #edf0f5;
}
.crud-modal-content .modal-footer {
    background: #f8fafc;
}
.form-status-box {
    background: #f8fafc;
    padding: 16px;
    border-radius: 10px;
}
.form-status-box .form-check-input {
    width: 2.5em;
    height: 1.35em;
    cursor: pointer;
}
.dt-container .dt-info,
.dt-container .dt-length {
    font-size: 0.75rem;
    color: #718096;
}
.crud-modal-content form {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
}
.crud-modal-content .modal-body {
    overflow-y: auto;
}
@media (max-width: 575px) {
    .crud-toolbar,
    .crud-table-wrap {
        padding: 16px;
    }
    .crud-toolbar > div,
    .crud-toolbar > div > div {
        width: 100%;
    }
    .crud-page header .crud-add {
        width: 100%;
    }
}

/* Shared table palette, including Bootstrap striped/dark table variants. */
main .table {
    --bs-table-bg: #fff;
    --bs-table-color: #243248;
    --bs-table-striped-bg: #fff;
    --bs-table-striped-color: #243248;
    --bs-table-hover-bg: #f4f7fc;
    --bs-table-hover-color: #243248;
    --bs-table-border-color: #edf0f5;
}
main .table thead {
    --bs-table-bg: #f8fafc;
    --bs-table-color: #718096;
    --bs-table-border-color: #edf0f5;
}

/* Reusable standalone form layout. */
.form-page { max-width: 820px; padding: 8px 0 24px; }
.form-back-link { display: inline-flex; align-items: center; gap: 9px; color: #637086; text-decoration: none; font-size: .8rem; margin-bottom: 24px; }
.form-back-link:hover { color: #0d6efd; }
.form-page-heading { margin-bottom: 24px; }
.form-page-heading h1 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 600; letter-spacing: -.035em; margin: 0 0 8px; }
.form-page-heading p { font-size: .85rem; color: #637086; margin: 0; line-height: 1.7; }
.form-card-heading { display: flex; align-items: center; gap: 14px; padding: 24px 32px; border-bottom: 1px solid #edf0f5; }
.form-section-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; color: #3970d5; background: #eef4ff; }
.form-card-heading h2 { font-size: .95rem; font-weight: 600; margin: 0 0 5px; }
.form-card-heading p { font-size: .75rem; color: #637086; margin: 0; line-height: 1.6; }
.form-card-body { padding: 28px 32px 32px; }
.form-field { margin-bottom: 26px; }
.form-card .form-label { font-size: .85rem; font-weight: 500; margin-bottom: 10px; }
.form-card .form-control { padding: .375rem .75rem; color: #243248; }
.form-card .form-select { padding: .375rem 2.25rem .375rem .75rem; color: #243248; }
.form-card .form-control::placeholder { color: #8792a3; font-weight: 400; }
.crud-modal-content .form-control:disabled,
.crud-modal-content .form-control[readonly] {
    color: #64748b;
    background-color: #edf0f4;
    border-color: #d5dce5;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
}
.sitename-coin-setting.is-locked {
    padding: 12px 12px 12px 36px;
    background-color: #edf0f4;
    border: 1px solid #d5dce5;
    border-radius: 8px;
    cursor: not-allowed;
}
.sitename-coin-setting.is-locked .form-check-label { color: #64748b; opacity: 1; cursor: not-allowed; }
.sitename-coin-setting.is-locked .form-check-input { cursor: not-allowed; opacity: 1; border-color: #aab5c4; }
.sitename-coin-setting.is-locked .form-check-input:checked { background-color: #94a3b8; border-color: #94a3b8; }
.sitename-coin-setting.is-locked .form-text { margin-bottom: 0; }
.form-card .form-control:focus,
.form-card .form-select:focus { border-color: #81a8ed; box-shadow: 0 0 0 3px #3b82f615; }
.form-card textarea.form-control { resize: vertical; line-height: 1.5; }
.form-card .form-control.is-invalid,
.form-card .form-select.is-invalid { border-color: var(--bs-danger); }
.form-field-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; }
.form-field-meta, .form-card .form-text, .form-required-note { font-size: .72rem; color: #6b778a; }
.form-optional { font-size: .68rem; font-weight: 400; color: #788496; margin-left: 6px; }
.form-status-panel { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #f8fafc; border: 1px solid #e9eef5; border-radius: 12px; padding: 18px 20px; }
.form-status-description .form-label { margin-bottom: 4px; }
.form-status-description p { font-size: .75rem; color: #637086; margin: 0; }
.form-status-control { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.form-status-control .form-check-input { width: 2.5em; height: 1.4em; cursor: pointer; margin-top: 0; }
.form-action-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 32px; background: #fafbfd; border-top: 1px solid #edf0f5; }
.form-actions { display: flex; gap: 10px; }
.form-actions .btn { min-height: 44px; font-size: .82rem; font-weight: 500; }
.form-actions .btn-outline-secondary { border-color: #dce3ec; background: #fff; color: #536177; }
.form-actions .btn-outline-secondary:hover { background: #edf1f7; }
@media (max-width: 575px) {
    .form-page { padding-top: 0; }
    .form-card-heading, .form-card-body { padding: 20px; }
    .form-status-panel { flex-wrap: wrap; padding: 16px; }
    .form-action-bar { padding: 16px 20px; flex-wrap: wrap; }
    .form-actions { width: 100%; }
    .form-actions .btn { flex: 1; }
    .form-back-link { margin-bottom: 18px; }
}

/* List pages share the same headings, surfaces and controls as forms. */
.list-page { padding: 8px 0 24px; }
.list-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.list-page-heading .crud-add { flex-shrink: 0; min-height: 44px; font-size: .82rem; font-weight: 500; }
.list-card-heading { padding: 24px 28px; }
.list-card-heading h2 { display: flex; align-items: center; }
.list-card-heading .record-count { font-size: .68rem; padding: 4px 8px; }
.list-filter-bar { display: flex; align-items: flex-end; gap: 18px; padding: 22px 28px; background: #fafbfd; border-bottom: 1px solid #edf0f5; }
.list-filter-bar .form-label { font-size: .75rem; font-weight: 500; color: #536177; margin-bottom: 8px; }
.list-search-field { flex: 1; max-width: 460px; min-width: 0; }
.list-status-field { width: 190px; }
.list-filter-bar .form-control, .list-filter-bar .form-select { color: #243248; background-color: #fff; }
.list-filter-bar .form-control::placeholder { color: #8792a3; }
.list-filter-bar .form-control:focus, .list-filter-bar .form-select:focus { border-color: #81a8ed; box-shadow: 0 0 0 3px #3b82f615; }
.search-input-wrap { position: relative; }
.search-input-wrap > i { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); font-size: .85rem; color: #8792a3; pointer-events: none; }
.search-input-wrap .form-control { padding-left: 40px; }
.list-page .crud-table-wrap { padding: 12px 28px 20px; }
.list-page .table { min-width: 780px; }
.table-row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.table-row-actions .btn { font-size: .75rem; min-height: 34px; }
.table-row-actions .btn-outline-primary { color: #3970d5; border-color: #dce7f8; background: #f5f8ff; }
.table-row-actions .btn-outline-primary:hover { color: #fff; background: #3970d5; border-color: #3970d5; }
.table-row-actions .btn-outline-danger { color: #b84c55; border-color: #f0dfe1; background: #fff; }
.table-row-actions .btn-outline-danger:hover { color: #fff; background: #b84c55; border-color: #b84c55; }
.list-page .dt-layout-row:last-child { padding-top: 14px; margin-top: 4px; }
.list-page .pagination { gap: 4px; margin-bottom: 0; }
.list-page .pagination .page-link { border: 1px solid #e5eaf1; border-radius: 7px; color: #637086; font-size: .75rem; min-width: 34px; min-height: 34px; text-align: center; }
.list-page .pagination .active .page-link { color: #fff; background: #3970d5; border-color: #3970d5; }
.list-page .pagination .disabled .page-link { color: #a5afbd; background: #fafbfd; }
@media (max-width: 575px) {
    .list-page { padding-top: 0; }
    .list-page-heading { align-items: stretch; flex-direction: column; gap: 18px; }
    .list-card-heading { padding: 20px; align-items: flex-start; }
    .list-filter-bar { padding: 18px 20px; flex-direction: column; align-items: stretch; gap: 14px; }
    .list-search-field, .list-status-field { width: 100%; max-width: none; }
    .list-page .crud-table-wrap { padding: 10px 20px 18px; }
}

/* Column search selector shared by list filters. */
.list-column-field { width: 210px; flex-shrink: 0; }
@media (max-width: 767px) {
    .list-filter-bar { flex-wrap: wrap; }
    .list-column-field, .list-status-field { flex: 1 1 180px; }
    .list-search-field { flex: 1 1 240px; }
}
@media (max-width: 575px) {
    .list-column-field, .list-status-field, .list-search-field { width: 100%; flex: auto; }
}

/* Shared popup form sizing, including short/mobile viewports. */
.crud-dialog { --bs-modal-width: 620px; }
.crud-dialog .form-action-bar { justify-content: space-between; }
.crud-dialog .modal-body { overscroll-behavior: contain; }
@media (max-width: 575px) {
    .crud-dialog { margin: 12px; }
    .crud-dialog .modal-header, .crud-dialog .modal-body, .crud-dialog .modal-footer { padding: 20px; }
    .crud-dialog .modal-title { font-size: 1.05rem; }
}

/* Bootstrap default control sizing, shared by popup and filter selects. */
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper { width: 100%; }
/* Bootstrap Tom Select uses the wrapper for the border and dropdown arrow. */
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper.form-select {
    padding: 0;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    min-height: 0;
    height: auto;
    background-color: #fff;
    box-shadow: none;
}
/* The wrapper supplies the two border pixels, so avoid adding them twice. */
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper.form-select .ts-control {
    min-height: calc(1.5em + .75rem);
}

:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper .ts-control {
    min-height: calc(1.5em + .75rem + 2px);
    padding: .375rem 2.25rem .375rem .75rem;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: #263449;
    font-size: 1rem;
    line-height: 1.5;
    align-items: center;
}
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper.focus {
    border-color: #86a9ee;
    box-shadow: 0 0 0 3px rgba(55, 105, 210, .12);
}
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper .ts-control input { font: inherit; min-width: 3rem; }
/* A long selected label must not turn a single select into a multiline input. */
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper.single .ts-control {
    flex-wrap: nowrap;
    min-width: 0;
    height: calc(1.5em + .75rem);
}
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper.single .ts-control > .item {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper.single .ts-control > input {
    width: 0;
    flex: 1 0 3rem;
}
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper .ts-control input::placeholder { color: #8a96a7; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper .ts-dropdown {
    border: 1px solid #e1e7ef;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(28, 45, 75, .14);
    overflow: hidden;
    margin-top: 6px;
    font: inherit;
}
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-dropdown-content { max-height: 220px; padding: 5px; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-dropdown .option { padding: 10px; border-radius: 7px; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-dropdown .active { background: #edf3ff; color: #2456a6; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .remote-select-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .remote-select-option span { overflow-wrap: anywhere; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .remote-select-option small { color: #8491a4; font-size: .72rem; flex-shrink: 0; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-dropdown .no-results,
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-dropdown .loading-more-results,
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-dropdown .no-more-results { padding: 12px; color: #7b8798; font-size: .8rem; text-align: center; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper.is-invalid { border-color: #dc3545; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper.disabled { background: #f2f5f8; opacity: .7; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .ts-wrapper .clear-button { color: #7b8798; font-size: 20px; }
:is(.crud-modal-content, .crud-search-panel, .crud-select-floating) .remote-select-status { margin-top: 6px; }


/* Portal remains inside its modal, outside the clipped modal-body. */
.crud-select-floating {
    position: fixed;
    height: 0;
    z-index: 1060;
    font-size: 1rem;
}
.crud-select-floating .ts-dropdown { width: 100%; }

/* Readable account identity in table cells. */
.cell-account { min-width: 230px; }
.account-summary { display: grid; gap: 6px; }
.account-owner { font-weight: 500; color: #243248; line-height: 1.4; }
.account-details { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; }
.account-bank { padding: 2px 7px; border-radius: 5px; background: #eef3fa; color: #456080; font-size: .7rem; font-weight: 600; white-space: nowrap; }
.account-number { color: #637086; font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.sidebar-group-panel { margin: 4px 14px 16px; padding: 13px; border: 1px solid #ffffff24; border-radius: 12px; background: #ffffff08; }
.sidebar-group-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: #bdcce3; font-size: .68rem; font-weight: 600; letter-spacing: .08em; }
.sidebar-group-heading label { margin: 0; }
.sidebar-group-panel p { font-size: .68rem; line-height: 1.5; color: #a3b4ce; margin: 8px 0 0; }
.sidebar-group-panel .ts-wrapper { width: 100%; min-width: 0; }
.sidebar-group-panel .ts-wrapper.form-select { padding: 0; height: auto; border: 1px solid #dce3ec; border-radius: 8px; background-color: #fff; box-shadow: none; }
.sidebar-group-panel .ts-control { flex-wrap: nowrap; min-width: 0; min-height: 36px; font-size: .85rem; color: #243248; padding: 8px 12px; }
.sidebar-group-panel .ts-control > .item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sidebar-group-panel .ts-control > input { min-width: 2rem; width: 0; flex: 1 0 2rem; }
.sidebar-group-panel #global-group-error { color: #ffc4bd; margin-top: 8px; }
#sidebar.collapsed .sidebar-group-panel { display: none; }

/* Spreadsheet import uses the shared form cards and standard control sizing. */
.import-dropzone { border: 1px dashed #b7c9e5; border-radius: 12px; padding: 2rem 1.25rem; text-align: center; background: #f8faff; transition: background .15s, border-color .15s; }
.import-dropzone.is-dragging { background: #eaf2ff; border-color: #2563eb; }
.import-dropzone .form-control { max-width: 480px; background-color: #fff; }
.import-dropzone h3 { font-size: 1.15rem; margin-top: 1rem; }
.import-file-icon { color: #2563eb; font-size: 2rem; }
.import-stat { border: 1px solid #e3eaf4; border-radius: 10px; padding: 1rem 1.25rem; }
.import-stat span { display: block; color: #71819a; font-size: .85rem; }
.import-stat strong { display: block; font-size: 1.65rem; margin-top: .25rem; }
.activity-summary { min-width: 240px; max-width: 580px; overflow-wrap: anywhere; line-height: 1.6; }
.activity-value { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 300px; }

/* Balance cards wrap by their available width, including when the sidebar is open. */
.balance-overview { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2rem; }
.balance-overview-choice { flex: 1 1 20rem; min-width: 0; }
.balance-overview-choice .ts-wrapper { width: 100%; min-width: 0; }
.balance-overview-summary { display: flex; flex: 1 1 25rem; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; min-width: 0; }
.balance-overview-amount { flex: 1 1 12rem; min-width: 0; }
.balance-overview-amount strong { display: block; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.4; }
.balance-overview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; max-width: 100%; }
.balance-overview-actions .btn { flex-shrink: 0; }

.report-summary-value { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* Role permissions use the shared form surface with room for the matrix. */
.role-form-page { max-width: 1100px; }
.role-permissions-title { font-size: .95rem; font-weight: 600; margin: 0 0 6px; }
.role-permission-table { border: 1px solid #e9eef5; border-radius: 12px; margin-top: 16px; }
.role-permission-table .table { font-size: .8rem; }
.role-permission-table thead th { background: #f8fafc; color: #536177; padding: 16px 12px; border-bottom: 1px solid #e9eef5; }
.role-permission-table td { padding: 14px 12px; border-color: #edf0f5; }
.role-permission-table .permission-row-parent td { background: #f8fafc; }
.role-permission-table .form-check-input { cursor: pointer; }

/* Give bank movements room for single-line identity and amount columns. */
#saldo-bank-modal .saldo-bank-mutasi-dialog {
    --bs-modal-width: 1800px;
    width: calc(100% - 32px);
    max-width: var(--bs-modal-width);
    margin-left: auto;
    margin-right: auto;
}
#saldo-bank-mutasi-table th,
#saldo-bank-mutasi-table td:not(:last-child) { white-space: nowrap; }
#saldo-bank-mutasi-table td:last-child {
    white-space: normal;
    overflow-wrap: anywhere;
    min-width: 260px;
    max-width: 420px;
}

/* Dashboard uses the same cards, headings and table surface as the module forms. */
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.dashboard-heading-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dashboard-date { color: #637086; font-size: .8rem; white-space: nowrap; }
.dashboard-tone-green { --dashboard-color: #18865c; --dashboard-tint: #eaf7f0; }
.dashboard-tone-red { --dashboard-color: #d54d57; --dashboard-tint: #fff0f1; }
.dashboard-tone-blue { --dashboard-color: #2563eb; --dashboard-tint: #edf3ff; }
.dashboard-tone-teal { --dashboard-color: #16889c; --dashboard-tint: #eaf7fa; }
.dashboard-tone-orange { --dashboard-color: #d47b26; --dashboard-tint: #fff5e9; }
.dashboard-tone-violet { --dashboard-color: #7954c7; --dashboard-tint: #f3effb; }
.dashboard-stat { padding: 22px 24px; border-top: 3px solid var(--dashboard-color); }
.dashboard-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.dashboard-stat h2 { margin: 0; font-size: .8rem; font-weight: 500; color: #637086; line-height: 1.6; }
.dashboard-stat-icon { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; background: var(--dashboard-tint); color: var(--dashboard-color); }
.dashboard-stat-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; min-width: 0; }
.dashboard-stat-value strong { color: #243248; font-size: clamp(1.4rem, 2vw, 1.8rem); font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.dashboard-stat-value span, .dashboard-stat p { color: #718096; font-size: .73rem; }
.dashboard-stat p { margin: 0; line-height: 1.7; }
.dashboard-panel .form-card-heading { align-items: flex-start; padding: 22px 24px; }
.dashboard-panel .form-section-icon { flex-shrink: 0; }
.dashboard-bars { padding: 24px; display: grid; gap: 22px; margin-top: auto; }
.dashboard-bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; font-size: .78rem; color: #536177; }
.dashboard-bar-label strong { color: var(--dashboard-color); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; text-align: right; }
.dashboard-bar-track { height: 10px; border-radius: 6px; background: #f0f3f8; overflow: hidden; }
.dashboard-bar-fill { height: 100%; border-radius: inherit; background: var(--dashboard-color); }
.dashboard-summary-table { font-size: .8rem; }
main .table.dashboard-summary-table > :is(thead, tbody, tfoot) > tr > :is(th, td) { padding: 17px 12px; border-color: #edf0f5; }
.dashboard-summary-table tbody th { font-weight: 500; white-space: nowrap; }
.dashboard-summary-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard-summary-table thead th { background: #f8fafc; color: #637086; font-weight: 500; }
.dashboard-summary-table tfoot { background: #f8fafc; font-weight: 600; }
.dashboard-type-dot { display: inline-block; height: 7px; width: 7px; margin-right: 10px; border-radius: 50%; background: var(--dashboard-color); }
.dashboard-member-activity { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 24px; gap: 8px; }
.dashboard-member-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #edf3ff; color: #2563eb; }
.dashboard-member-activity strong { color: #2563eb; font-size: 2.5rem; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; max-width: 100%; }
.dashboard-member-activity p { margin: 0; color: #637086; font-size: .78rem; }
.dashboard-footnote { margin: 20px 0 0; color: #718096; font-size: .72rem; line-height: 1.7; }
@media (max-width: 575.98px) {
    .dashboard-stat, .dashboard-panel .form-card-heading, .dashboard-bars { padding: 20px; }
    main .table.dashboard-summary-table > :is(thead, tbody, tfoot) > tr > :is(th, td) { padding: 14px 12px; }
}

/* Personal notification center: persistent operational alerts and readable account updates. */
.notification-bell { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #e8edf5; border-radius: 11px; color: #536177; background: #fff; font-size: 1rem; }
.notification-bell:hover, .notification-bell[aria-expanded="true"] { color: #2563eb; background: #edf3ff; border-color: #d9e5fc; }
.notification-badge { position: absolute; top: -5px; right: -6px; min-width: 18px; padding: 2px 4px; border: 2px solid #fff; border-radius: 20px; background: #d54d57; color: #fff; font-size: .6rem; line-height: 1.2; font-weight: 600; }
.notification-menu { width: 440px; max-width: calc(100vw - 24px); padding: 0; border: 1px solid #e5ebf4; border-radius: 16px; box-shadow: 0 16px 50px #1b2b4d20; overflow: hidden; }
.notification-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; border-bottom: 1px solid #edf0f5; }
.notification-heading h2 { margin: 0 0 6px; font-size: 1rem; font-weight: 600; color: #243248; }
.notification-heading p { margin: 0; font-size: .7rem; color: #718096; line-height: 1.6; }
.notification-icon-button { width: 34px; height: 34px; padding: 6px; flex-shrink: 0; color: #637086; border-radius: 9px; }
.notification-icon-button:hover { color: #2563eb; background: #edf3ff; }
.notification-tabs { display: flex; padding: 12px 16px; gap: 6px; border-bottom: 1px solid #edf0f5; }
.notification-tabs button { flex: 1; padding: 8px 4px; border: 0; border-radius: 8px; background: transparent; font-size: .72rem; color: #718096; font-weight: 500; white-space: nowrap; }
.notification-tabs button.is-active { color: #2563eb; background: #edf3ff; }
.notification-list { max-height: min(420px, 48vh); overflow-y: auto; overscroll-behavior: contain; }
.notification-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #edf0f5; }
.notification-item:last-child { border-bottom: 0; }
.notification-tone-info { --notification-color: #2563eb; --notification-tint: #edf3ff; }
.notification-tone-warning { --notification-color: #c78221; --notification-tint: #fff6e8; }
.notification-tone-danger { --notification-color: #d54d57; --notification-tint: #fff0f1; }
.notification-item-icon { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; color: var(--notification-color); background: var(--notification-tint); }
.notification-item-body { flex: 1; min-width: 0; }
.notification-item-title { display: flex; align-items: center; gap: 8px; }
.notification-item h3 { margin: 0 0 5px; color: #243248; font-size: .78rem; line-height: 1.6; font-weight: 600; overflow-wrap: anywhere; }
.notification-item p { margin: 0; color: #637086; font-size: .72rem; line-height: 1.7; overflow-wrap: anywhere; }
.notification-unread-dot { height: 7px; width: 7px; border-radius: 50%; background: #2563eb; flex-shrink: 0; }
.notification-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.notification-item-actions a, .notification-item-actions button { color: #2563eb; font-size: .7rem; font-weight: 500; background: none; border: 0; padding: 0; text-decoration: none; }
.notification-item-actions a:hover, .notification-item-actions button:hover { text-decoration: underline; }
.notification-item-actions time, .notification-read-label { color: #8995a8; font-size: .65rem; }
.notification-item.is-read .notification-item-icon { background: #f3f5f9; color: #8995a8; }
.notification-item.is-read h3 { font-weight: 500; color: #637086; }
.notification-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid #edf0f5; }
.notification-footer > .btn:first-child { color: #2563eb; font-size: .7rem; font-weight: 500; padding: 6px 4px; }
.notification-note { margin: 0; padding: 0 20px 16px; color: #8995a8; font-size: .64rem; line-height: 1.6; }
.notification-empty { padding: 36px 24px; text-align: center; color: #8995a8; }
.notification-empty > i { font-size: 1.6rem; margin-bottom: 14px; color: #b4c1d5; }
.notification-empty h3 { font-size: .8rem; font-weight: 500; color: #536177; }
.notification-empty p { font-size: .72rem; margin: 6px 0 0; }
.notification-error { margin: 12px 16px 0; padding: 10px 12px; border-radius: 8px; background: #fff5e9; color: #986221; font-size: .72rem; line-height: 1.6; }
#notification-settings { max-height: min(580px, 70vh); overflow-y: auto; padding: 20px; }
.notification-settings-intro h3 { color: #243248; font-size: .85rem; font-weight: 600; }
.notification-settings-intro p { color: #718096; font-size: .72rem; line-height: 1.7; margin-bottom: 20px; }
#notification-settings .form-label { font-size: .75rem; color: #536177; }
#notification-settings .form-text { font-size: .65rem; line-height: 1.6; }
#notification-settings .btn, #notification-settings .form-control, #notification-settings .input-group-text { font-size: .78rem; }
@media (max-width: 575.98px) {
    .notification-menu { position: fixed !important; top: 62px !important; right: 12px !important; left: 12px !important; width: auto; transform: none !important; }
    .notification-heading, .notification-item { padding: 16px; }
}

.member-message-popup .swal2-html-container { white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
