:root {
    --text-primary: #374151;
    --text-secondary: #6B7280;
}

body{
    font-family: Nunito Sans;
}

button, input, textarea, select {
    font-family: inherit;
}
.container-body {
    background-color: #F3F4F6;
}

.fw-400{
    font-weight: 400;
}
.fw-600{
    font-weight: 600;
}
.fw-700{
    font-weight: 700;
}

.text-primary{
    color : var(--text-primary);
}

.text-secondary{
    color : var(--text-secondary);
}

.nomp {
    margin: 0;
    padding: 0;
}

.nom{
    margin: 0;
}

.ml-auto{
    margin-left:auto;
}

.mb-12{
    margin-bottom:12px;
}
.mb-20{
    margin-bottom:20px;
}

.h-100{
    height: 100%;
}

.d-flex{
    display: flex;
}

.d-md-none {
    display: none !important;
}

@media (max-width: 768px) {
    .d-none {
        display: none !important;
    }
    
    .d-md-flex {
        display: none !important;
    }
    
    .d-md-none {
        display: block !important;
    }
}

.flex-column{
    flex-direction: column;
}

.d-none{
    display: none!important;
}

.d-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.align-items-center {
    align-items: center;
}

.justify-content-center{
    justify-content: center;
}
.btn{
    text-transform: none!important;
    border-radius: 6px!important;
    transition: all 0.2s ease;

}

.btn-primary {
    color: #FFF;
    background-color: #2979C3;
    border: 1px solid #2979C3;

    &:hover {
        background-color: #2164a2;
        border-color: #2164a2;
        color: #FFF;
    }

    &:active {
        background-color: #1a5082;
        border-color: #1a5082;
        transform: translateY(1px);
    }

    &:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(41, 121, 195, 0.3);
    }
}

.btn-secondary {
    color: #2979C3;
    background-color: #FFF;
    border: 1px solid #2979C3;

    &:hover {
        background-color: #f0f7ff;
        color: #2164a2;
        border-color: #2164a2;
    }

    &:active {
        background-color: #e1f0ff;
        color: #1a5082;
        border-color: #1a5082;
        transform: translateY(1px);
    }

    &:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(41, 121, 195, 0.3);
    }
}

.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; }

.hero-image {
    height: 200px;
    background-repeat: no-repeat;
    background-size: cover;
    /* background-color: #000; */
    background-position: center;
    color: #fff;
    font-size: 44px;
    font-weight: 700;
    line-height: 60.02px;
    letter-spacing: 0.02em;
}

.container-dokumen {
    padding: 30px 60px;

    &.hero-image{
        padding : 0 60px;
    }
}

.container-left{
    padding : 0 20px 0 0;
}

.container-right{
    padding : 0 0 0 20px;
}

.container-left > div:not(:last-child){
    margin-bottom: 32px;
}

.container-walidatas > div:not(:last-child),
.container-jenis-datas> div:not(:last-child),
.container-tabs > div:not(:last-child){
    margin-bottom: 12px;
}

.container-tabs{
    & .tab{
        border: 1px solid #D1D5DB;
        background-color: #FFF;
        border-radius: 8px;
        padding : 12px 16px;
        cursor: pointer;
        transition: all 0.2s ease-in-out; 

        & > img{
            width: 32px;
            height: 32px;
        }

        &:hover {
            background-color: #F9FAFB;
            border-color: #9CA3AF;
        }

        &.active {
            background-color: #F4FAFE;
            color: #217FC2;
            border-color: #217FC2;

            &:hover {
                background-color: #E6F4FE;
            }
        }
    }
}

.card-document{
    border-radius:12px;
    border : 1px solid #E5E7EB;
    background-color: #FFF;

    & .card-document-header{
        padding : 4px;
        height: 100%;
        width: 100%;
        & > div{
            background-color: #DFF2FE;
            border-top-left-radius: 8px;
            border-top-right-radius: 8px;
            padding : 12px;
        }
    }
    & .card-document-body{
        /* height: 100%; */
        width: 100%;
        max-height: 325px;
        height: auto;

        & > img{
            height: 100%;
            width: 100%;
        }
    }
    & .card-document-footer{
        height: 100%;
        width: 100%;
        /* background-color: blue; */

        padding : 12px 16px;

    }
}

.text-tabs{
    font-size : 1.1rem;
}
.text-title-tab{
    font-size : 1.5rem;
}
.text-last-updated{
    font-size : .9rem;
}
.text-judul-card{
    font-size : 1rem;
}
.text-ts-created{
    font-size : .8rem;
}



.container-search {
    padding: 10px 0;
    position: relative;

    #search {
        border-radius: 6px !important;
        font-size: medium;
        padding: 0 12px 0 40px !important;
        color: #374151 !important;
        background-color: #FFF !important; /* Sesuaikan warna background jika ingin putih (ganti #FFF) atau tetap biru */
        -webkit-appearance: none !important;
        appearance: none !important;

        &:read-only {
            background-color: #FFF !important;
        }

        &:-webkit-autofill {
            -webkit-box-shadow: 0 0 0 1000px #FFF inset !important;
            -webkit-text-fill-color: #FFF !important;
        }
    }

    & i {
        position: absolute;
        left: 10px;
        padding-top: 5px;
        cursor: pointer;
        color: #6B7280 !important;
    }
}

.filter-date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-date-range .label-date {
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

.input-date-wrapper {
    position: relative;
    display: inline-block;
    width: 230px;
}

.form-control-date {
    border: 1px solid #D0D3D9;
    border-radius: 8px;
    padding: 8px 36px 8px 14px; 
    font-size: 14px;
    color: var(--text-primary)!important;
    outline: none;
    background-color: #ffffff !important;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control-date:focus {
    border-color: #7f56d9;
}

.input-date-wrapper .input-icon-right {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--text-primary)!important;
    font-size: 18px;
    pointer-events: none;
}

#btn-reset-date {
    height: 32px;
    width: 32px;
    background-color: #2979C3;
    color: #FFF;
    padding: 0;
    border: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;

    &:hover {
        background-color: #2265a3;
    }

    &:focus,
    &:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(41, 121, 195, 0.3);
    }

    &:active,
    &.clicked {
        background-color: #1b5284;
        transform: scale(0.95);
    }
}

/* Netralkan struktur internal Flatpickr */
.flatpickr-calendar {
    max-width: 100vw;
    box-sizing: border-box;
    
    /* Jika di layar kecil dan ukurannya melebihi layar, aktifkan scroll horizontal */
    @media (max-width: 768px) {
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

.flatpickr-calendar.inline, 
.flatpickr-calendar.open {
    width: auto !important;
}

.flatpickr-months {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.flatpickr-months .flatpickr-month {
    background: transparent !important;
    color: rgba(0, 0, 0, 0.9) !important;
    fill: rgba(0, 0, 0, 0.9) !important;
    height: 40px !important;
    width: 100% !important;
    position: relative;
}

/* Biarkan Flatpickr mengatur posisi flex secara natural agar nama bulan & tahun tampil berdampingan */
.flatpickr-current-month {
    font-size: 100% !important;
    position: static !important; /* Jangan gunakan absolute agar tidak saling tumpuk */
    width: auto !important;
    left: auto !important;
    transform: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    padding-top: 6px !important;
}

.flatpickr-current-month .cur-month {
    font-family: inherit !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

/* Memastikan teks dropdown/static bulan terlihat jelas */
.flatpickr-current-month input.cur-month,
.flatpickr-current-month .numInputWrapper {
    display: inline-block !important;
}


.container-list-document {
    border-radius: 10px;
    border: 1px solid #D1D5DB;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    background-color: #ffffff;
}

.document-table {
    width: 100%;
    border-collapse: collapse;
}

.document-table thead {
    background-color: #F3F4F6;
    border-bottom: 1px solid #D1D5DB;
}

.document-table th {
    color: #217FC2;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 20px;
    background-color: #F3F4F6;
}

.document-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.9rem;
    color: #334155;
}

.document-table tbody tr:hover {
    background-color: #f8fafc;
}

.doc-name, .doc-period{
    font-size : 1rem;
}

.doc-meta{
    font-size: .9rem;
}

.doc-date{
    font-size: .8rem;
}

.table-footer {
    padding: 14px 20px;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.footer-info {
    font-size: .9rem;
    color: var(--text-primary);
    font-weight: 600;
}

.pagination {
    display: flex !important;
    align-items: center;
    justify-content: flex-end; 
    gap: 6px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100%; 
}

.pagination li {
    background-color: transparent !important;
    border-radius: 0 !important;
    float: none !important;
    height: auto !important;
    line-height: normal !important;
}

.pagination li.active {
    background-color: transparent !important;
}

.pagination li a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px !important;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    padding: 0 !important;
    line-height: 36px !important;
}

.pagination li.active a {
    background-color: #2979C3 !important;
    color: #ffffff !important;
}

.pagination li a:hover:not(.active) {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
}

.pagination li.disabled a {
    color: #cbd5e1 !important;
    cursor: default;
}

.pagination li.disabled a:hover {
    background-color: transparent !important;
}

.text-empty{
    color : #1F2937;
    font-weight: 700;
    font-size: 1.2rem;
}

.empty-state {
    text-align: center;
    width: 100%;
}

.empty-state-img {
    max-width: 120px;
    height: auto;
    margin-bottom: 8px;
}



@media only screen and (max-width: 576px) {
    .container-dokumen {
        padding: 6% 3%;
    }

    .container-left, .container-right{
        padding : 0;
    }

    .container-left{
        margin-bottom : 24px;
    }

    .container-right{
        border-top: 1px solid #D1D5DB;
        padding-top : 24px;
    }

    .input-date-wrapper{
        width: 200px;
    }
}

@media only screen and (max-width: 375px) {
    .container-dokumen {
        padding: 0 2%;
    }

    .container-tabs {
        grid-template-columns: repeat(4, minmax(min-content, max-content));
    }

    .tab-button {
        font-size: 0.7rem;
        font-weight: 600;
    }

    .text-ornamen {
        font-size: 0.7rem;
    }
}