/* =========================================================
   MODUL
========================================================= */

.modul-wrapper{
    width:100%;
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    padding:20px;
    box-shadow:0 5px 20px rgba(15,23,42,.04);
}

/* =========================================================
   FILTER
========================================================= */

.modul-filter{
    display:flex;
    align-items:center;
    gap:10px;
    width:280px;
    margin-bottom:18px;
}

.modul-filter-icon{
    width:38px;
    height:38px;
    flex:0 0 38px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fef2f2;
    color:var(--primary);
    border-radius:10px;
    font-size:13px;
}

.modul-filter .form-select{
    width:100%;
    height:38px;
    padding:0 32px 0 10px;
    border:1px solid var(--border);
    border-radius:10px;
    background:#fff;
    color:#475569;
    font-size:13px;
    outline:none;
    box-shadow:none;
}

.modul-filter .form-select:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 2px rgba(220,38,38,.06);
}

/* =========================================================
   TABLE
========================================================= */

.modul-table{
    width:100% !important;
    margin:0 !important;
    font-size:13px;
    border-collapse:separate !important;
    border-spacing:0;
}

.modul-table thead th{
    padding:12px 10px;
    background:#f8fafc;
    color:#475569;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.4px;
    font-weight:700;
    border-top:1px solid #f1f5f9;
    border-bottom:1px solid var(--border);
    white-space:nowrap;
    vertical-align:middle;
}

.modul-table thead th:first-child{
    border-top-left-radius:8px;
}

.modul-table thead th:last-child{
    border-top-right-radius:8px;
}

.modul-table tbody td{
    padding:13px 10px;
    border-bottom:1px solid #f1f5f9;
    color:#475569;
    vertical-align:middle;
}

.modul-table tbody tr:last-child td{
    border-bottom:0;
}

.modul-table tbody tr:hover td{
    background:#fffafa;
}

/* =========================================================
   JUDUL MODUL
========================================================= */

.modul-title{
    display:flex;
    align-items:flex-start;
    gap:11px;
    min-width:280px;
}

.modul-icon{
    width:38px;
    height:38px;
    flex:0 0 38px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fef2f2;
    color:#b91c1c;
    border-radius:10px;
    font-size:17px;
}

.modul-title strong{
    display:block;
    color:#1f2937;
    font-size:13px;
    line-height:1.45;
    font-weight:700;
}

.modul-title small{
    display:block;
    max-width:500px;
    margin-top:3px;
    color:#64748b;
    font-size:11px;
    line-height:1.5;
}

/* =========================================================
   BADGE
========================================================= */

.modul-badge{
    display:inline-flex;
    align-items:center;
    padding:5px 9px;
    border-radius:7px;
    background:#f0f9ff;
    color:#0369a1;
    font-size:10px;
    font-weight:700;
    white-space:nowrap;
    line-height:1.2;
}

/* =========================================================
   FILE INFO
========================================================= */

.modul-file-info span{
    display:inline-flex;
    align-items:center;
    padding:4px 7px;
    border-radius:6px;
    background:#fef2f2;
    color:#b91c1c;
    font-size:9px;
    font-weight:800;
    line-height:1.2;
    white-space:nowrap;
}

.modul-file-info small{
    display:block;
    margin-top:3px;
    color:#94a3b8;
    font-size:9px;
    line-height:1.3;
}

/* =========================================================
   BUTTON
========================================================= */

.btn-modul{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    padding:7px 10px;
    border-radius:8px;
    background:var(--primary);
    color:#fff !important;
    text-decoration:none;
    font-size:11px;
    font-weight:700;
    white-space:nowrap;
    line-height:1.2;
    transition:.2s ease;
}

.btn-modul:hover{
    background:var(--primary-dark);
    color:#fff !important;
    transform:translateY(-1px);
}

/* =========================================================
   EMPTY
========================================================= */

.modul-empty{
    text-align:center;
    padding:50px 20px;
    color:#64748b;
}

.modul-empty i{
    font-size:42px;
    color:#cbd5e1;
}

.modul-empty h3{
    margin:10px 0 4px;
    color:#475569;
    font-size:16px;
}

.modul-empty p{
    margin:0;
    font-size:12px;
}

/* =========================================================
   DATATABLES
========================================================= */

.modul-wrapper .dataTables_wrapper{
    width:100%;
    font-size:11px;
}

/* TOP ROW */

.modul-wrapper .dataTables_wrapper > .row:first-child{
    display:flex;
    align-items:center;
    margin-bottom:12px;
}

.modul-wrapper .dataTables_length{
    margin:0;
}

.modul-wrapper .dataTables_length label{
    display:flex;
    align-items:center;
    gap:6px;
    margin:0;
    color:#64748b;
    font-size:10.5px;
    font-weight:500;
    white-space:nowrap;
}

.modul-wrapper .dataTables_length select{
    width:auto;
    min-width:65px;
    height:32px;
    margin:0 !important;
    padding:3px 25px 3px 8px;
    border:1px solid var(--border);
    border-radius:7px;
    background:#fff;
    color:#374151;
    font-size:11px;
    outline:none;
    box-shadow:none;
}

.modul-wrapper .dataTables_length select:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 2px rgba(220,38,38,.06);
}

/* SEARCH */

.modul-wrapper .dataTables_filter{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    margin:0;
}

.modul-wrapper .dataTables_filter label{
    display:flex;
    align-items:center;
    gap:6px;
    margin:0;
    color:#64748b;
    font-size:10.5px;
    font-weight:500;
    white-space:nowrap;
}

.modul-wrapper .dataTables_filter input{
    width:190px;
    height:32px;
    margin:0 !important;
    padding:4px 10px;
    border:1px solid var(--border);
    border-radius:7px;
    background:#fff;
    color:#374151;
    font-size:11px;
    outline:none;
    box-shadow:none;
    box-sizing:border-box;
}

.modul-wrapper .dataTables_filter input:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 2px rgba(220,38,38,.06);
}

.modul-wrapper .dataTables_filter input::placeholder{
    color:#9ca3af;
}

/* =========================================================
   DATATABLE TABLE AREA
========================================================= */

.modul-wrapper .dataTables_wrapper .table-responsive{
    width:100%;
    margin:0;
}

.modul-wrapper .dataTables_wrapper table{
    margin-bottom:0 !important;
}

/* =========================================================
   BOTTOM ROW
========================================================= */

.modul-wrapper .dataTables_wrapper > .row:last-child{
    display:flex;
    align-items:center;
    margin-top:12px;
}

.modul-wrapper .dataTables_info{
    padding-top:0 !important;
    color:#64748b;
    font-size:10.5px;
    line-height:30px;
}

.modul-wrapper .dataTables_paginate{
    padding-top:0 !important;
    margin:0 !important;
}

/* =========================================================
   PAGINATION - BOOTSTRAP 5
========================================================= */

.modul-wrapper .dataTables_paginate .pagination{
    display:flex !important;
    align-items:center;
    justify-content:flex-end;
    gap:3px;
    margin:0 !important;
    padding:0 !important;
}

.modul-wrapper .dataTables_paginate .page-item{
    margin:0 !important;
    padding:0 !important;
}

.modul-wrapper .dataTables_paginate .page-link{
    width:30px;
    height:30px;
    display:flex !important;
    align-items:center;
    justify-content:center;
    padding:0 !important;
    margin:0 !important;
    border:1px solid #e5e7eb !important;
    border-radius:6px !important;
    background:#fff !important;
    color:var(--primary) !important;
    font-size:11px !important;
    font-weight:500;
    line-height:1 !important;
    text-decoration:none !important;
    box-shadow:none !important;
}

.modul-wrapper .dataTables_paginate .page-link:hover{
    background:#fff5f5 !important;
    border-color:#f1caca !important;
    color:var(--primary) !important;
}

.modul-wrapper .dataTables_paginate .page-item.active .page-link{
    background:var(--primary) !important;
    border-color:var(--primary) !important;
    color:#fff !important;
}

.modul-wrapper .dataTables_paginate .page-item.disabled .page-link{
    background:#f9fafb !important;
    border-color:#e5e7eb !important;
    color:#c4c7cc !important;
    opacity:1;
}

/* Hilangkan style DataTables lama */

.modul-wrapper .dataTables_paginate .paginate_button{
    float:none !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
}

/* =========================================================
   MOBILE
========================================================= */

@media(max-width:767px){

    .modul-wrapper{
        padding:12px;
        border-radius:14px;
    }

    .modul-filter{
        width:100%;
        margin-bottom:12px;
    }

    .modul-filter-icon{
        flex:0 0 38px;
    }

    .table-responsive{
        margin:0 -2px;
    }

    .modul-table{
        min-width:850px !important;
    }

    .modul-table thead th,
    .modul-table tbody td{
        padding:10px 8px;
    }

    .modul-title{
        min-width:280px;
    }

    /* TOP DATATABLE */

    .modul-wrapper .dataTables_wrapper > .row:first-child{
        display:flex;
        flex-direction:column;
        align-items:stretch;
        gap:8px;
        margin-bottom:10px;
    }

    .modul-wrapper .dataTables_length,
    .modul-wrapper .dataTables_filter{
        width:100%;
    }

    .modul-wrapper .dataTables_length label{
        width:100%;
        justify-content:flex-start;
    }

    .modul-wrapper .dataTables_filter{
        justify-content:stretch;
    }

    .modul-wrapper .dataTables_filter label{
        width:100%;
        justify-content:space-between;
    }

    .modul-wrapper .dataTables_filter input{
        width:calc(100% - 40px);
        margin:0 !important;
    }

    /* BOTTOM DATATABLE */

    .modul-wrapper .dataTables_wrapper > .row:last-child{
        display:flex;
        flex-direction:column;
        align-items:stretch;
        gap:10px;
        margin-top:10px;
    }

    .modul-wrapper .dataTables_info{
        text-align:left;
        line-height:normal;
    }

    .modul-wrapper .dataTables_paginate{
        width:100%;
    }

    .modul-wrapper .dataTables_paginate .pagination{
        justify-content:flex-start;
        flex-wrap:wrap;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media(max-width:400px){

    .modul-wrapper{
        padding:10px;
    }

    .modul-wrapper .dataTables_filter input{
        width:calc(100% - 38px);
    }

    .modul-wrapper .dataTables_paginate .page-link{
        width:28px;
        height:28px;
        font-size:10px !important;
    }
}