/* =========================
   LAYOUT
========================= */

#main-content {
    max-width: 1040px;
    margin: 0 auto;
}

@media (max-width:576px){
    #main-content{
        max-width:100%;
    }
}

#ahsp-content{
    border-radius:12px;
}

#judul-ahsp{
    border-radius:8px;
}

/* =========================
   HEADER
========================= */

.h1-header{
    border-bottom:3px solid white;
}

#h-nama-ahsp,
#h-satuan-ahsp,
#h-kode-ahsp{
    width:100%;
    outline:none;
}

#h-nama-ahsp:focus,
#h-satuan-ahsp:focus,
#h-kode-ahsp:focus{
    background-color:rgba(255,255,255,0.15);
    border-radius:4px;
}

/* =========================
   STATUS HARSAT BOX
========================= */

.box-area-input{
    background:#f8f9fa;
    transition:0.2s ease-in-out;
}

.box-area-input:hover{
    box-shadow:0 4px 12px rgba(0,0,0,0.08);
}

.box-area-input legend{
    font-weight:600;
    font-size:1rem;
    padding:0 10px;
}

#box-tindakan{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
}

#klik-cek{
    padding:6px 18px;
    font-size:0.875rem;
    font-weight:500;
    background:#0d6efd;
    color:#fff !important;
    border-radius:6px;
    text-decoration:none;
    transition:0.2s;
}

#klik-cek:hover{
    background:#0b5ed7;
    transform:translateY(-1px);
    box-shadow:0 4px 10px rgba(13,110,253,0.3);
}

#target-cek-bahan{
    width:100%;
    margin-top:10px;
    font-size:0.9rem;
}

/* =========================
   TABLE
========================= */

.t-kode{width:3%}
.t-uraian{width:30%}
.t-satuan{width:8%}
.t-koef{width:10%}
.t-harga{width:7%}
.t-jum-harga{width:10%}
.t-ref-harga{width:10%}

#summary-qty{
    width:7%;
}

.hidden-form{
    display:none;
}

/* =========================
   INPUT STYLE
========================= */

table input,
table input.form-control{
    background:transparent !important;
    border:none;
    box-shadow:none;
    color:#000;
}

table input:focus{
    background:transparent !important;
    border-bottom:1px solid #999;
    box-shadow:none;
}

table input:disabled{
    background:transparent !important;
    color:#000;
}

/* =========================
   MOBILE
========================= */

@media (max-width:768px){

.card-body{
    padding:0 5px;
}

.judul-ahsp>h1{
    font-size:18px;
}

.h1-header{
    font-size:16px;
}

table{
    font-size:11px;
    min-width:800px;
}

.table-responsive{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

.t-kode{width:5%!important}
.t-uraian{width:30%!important;white-space:normal!important}
.t-satuan{width:5%!important}
.t-koef{width:5%!important}
.t-harga{width:5%!important}
.t-jum-harga{width:10%!important}
.t-reference{width:10%!important;font-size:10px}

.form-control-sm{
    padding:2px 4px;
    font-size:11px;
}

input{
    min-width:60px;
}

}

/* =========================
   DARK MODE (BOOSTER FIX)
========================= */

body.dark-mode table td,
body.dark-mode table th{
    color:#fff !important;
}

body.dark-mode table input{
    color:#fff !important;
}
body.dark-mode input::placeholder{
    color:#fff !important;
}

body.dark-mode table input:disabled{
    color:#ccc !important;
}

body.dark-mode .box-area-input{
    background:#1e1e1e !important;
}

body.dark-mode .h1-header{
    border-bottom:3px solid #fff;
}


    /* Styling khusus agar legend memotong garis border */
    .box-area-input {
        border: 1px solid #dee2e6 !important; /* Warna border standar Bootstrap */
        padding: 0 1.5rem 1.5rem 1.5rem !important;
        margin-top: 1rem;
    }

    .box-area-input legend {
        float: none;
        width: auto;
        padding: 0 10px;
        margin-bottom: 0;
        font-size: 1rem;
        text-transform: uppercase;
    }

    /* Warna Header Tabel sesuai Gambar */
    .th-summary {
        background-color: #5bc0de !important; /* Warna biru muda */
        color: black;
        text-align: center;
        vertical-align: middle;
        border: 1px solid #333 !important;
    }

    .td-summary {
        border: 1px solid #333 !important;
        vertical-align: middle;
    }
.icon-ht {
    transition: transform .4s ease;
}
.icon-ht:hover .t-kode {
    transform: scale(1.5);
    box-shadow: 0 50px 50px rgba(0,0,0,0.15) !important;
}
.btn {
    padding: 0 0.375rem;
}
.btn-login {
    padding:0.4rem 0.75rem;
}
.judul-ahsp { margin-bottom: 10px; }
        .box-header { min-width: 720px; }
        .label-header { font-size: 1rem; width: 140px; }
        input::placeholder {font-style: italic;}

        .login-required-modal .modal-content {
            border-radius: 18px;
            box-shadow: 0 16px 45px rgba(16, 24, 40, 0.18);
        }

        .login-required-modal-header {
            background: linear-gradient(120deg, #fff8e7 0%, #ffecc2 100%);
            padding: 1rem 1.2rem;
        }

        .login-required-modal-icon-wrap {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 193, 7, 0.18);
        }

        .login-required-modal-icon {
            color: #b26a00;
            font-size: 1rem;
        }

        .login-required-modal .modal-body {
            padding: 1rem 1.4rem 0.5rem;
        }

        .login-required-modal-cta {
            min-width: 145px;
            border: 0;
            box-shadow: 0 8px 18px rgba(13, 110, 253, 0.22);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .login-required-modal-cta:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 22px rgba(13, 110, 253, 0.28);
        }


        @media (max-width: 576px) {
            .label-header { font-size: 0.85rem; width: 110px; }
            .judul-ahsp { margin: 0; }

            .login-required-modal .modal-dialog {
                margin: 1rem;
            }

            .login-required-modal .modal-footer {
                display: grid;
                gap: 0.6rem;
                padding: 0 1.2rem 1.2rem;
            }

            .login-required-modal .modal-footer .btn {
                width: 100%;
            }
        }
        .field-warning-inline {
            display: block;
            width: 100%;
            max-width: 100%;
            margin-top: 0.25rem;
            color: #dc3545;
            font-size: 0.75rem;
            line-height: 1.2;
            white-space: nowrap;
            overflow-x: auto;
            overflow-y: hidden;
        }

        .field-warning-inline::-webkit-scrollbar {
            height: 4px;
        }
        body.dark-mode table td{
            color: #212529 !important;
        }
        body.dark-mode table th {
            color: #ffffff !important;
        }
        body.dark-mode table input {
            color: #000 !important;
        }
        body.dark-mode table input::placeholder {
            color: #6c757d !important;
        }
        body.dark-mode a .bi { 
            color: #0d6efd !important; 
        }