@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

body{
    min-height:100vh;
    background:
    linear-gradient(
        135deg,
        #667eea 0%,
        #764ba2 100%
    );
    color:#1e293b;
    padding:30px;
}

#app{
    max-width:1600px;
    margin:auto;
}

/* =========================
   NAVBAR
========================= */

nav{
    display:flex;
    gap:12px;
    padding:14px;
    margin-bottom:25px;

    background:
    rgba(255,255,255,.9);

    backdrop-filter:blur(12px);

    border-radius:24px;

    box-shadow:
    0 15px 35px rgba(0,0,0,.08);
}

nav button{
    border:none;
    padding:14px 24px;
    border-radius:14px;

    background:
    linear-gradient(
        135deg,
        #6366f1,
        #4f46e5
    );

    color:#fff;
    font-weight:600;
    cursor:pointer;

    transition:.25s ease;
}

nav button:hover{
    transform:translateY(-3px);
    box-shadow:
    0 10px 20px rgba(99,102,241,.35);
}

/* =========================
   PAGE
========================= */

.stock-page{
    background:#fff;
    border-radius:28px;
    padding:35px;

    box-shadow:
    0 20px 60px rgba(15,23,42,.12);
}

.stock-page h2{
    font-size:38px;
    font-weight:800;
    color:#1e293b;
    margin-bottom:8px;
}

.stock-page p{
    color:#64748b;
    margin-bottom:30px;
}

/* =========================
   SUMMARY CARD
========================= */

.summary-grid{
    display:grid;
    grid-template-columns:
    repeat(auto-fit,minmax(240px,1fr));

    gap:20px;
    margin-bottom:30px;
}

.summary-card{
    position:relative;
    overflow:hidden;

    padding:25px;
    min-height:140px;

    border-radius:24px;
    color:#fff;

    transition:.3s ease;
}

.summary-card:hover{
    transform:translateY(-5px);
}

.summary-card:nth-child(1){
    background:
    linear-gradient(
        135deg,
        #3b82f6,
        #60a5fa
    );
}

.summary-card:nth-child(2){
    background:
    linear-gradient(
        135deg,
        #10b981,
        #34d399
    );
}

.summary-card:nth-child(3){
    background:
    linear-gradient(
        135deg,
        #f59e0b,
        #fbbf24
    );
}

.summary-card:nth-child(4){
    background:
    linear-gradient(
        135deg,
        #ef4444,
        #f87171
    );
}

.summary-card::before{
    content:'';
    position:absolute;

    width:120px;
    height:120px;

    right:-30px;
    top:-30px;

    border-radius:50%;

    background:
    rgba(255,255,255,.15);
}

.summary-card h3{
    font-size:14px;
    font-weight:500;
    opacity:.9;
}

.summary-card .value{
    font-size:40px;
    font-weight:800;
    margin-top:12px;
}

/* =========================
   CARD
========================= */

.card{
    background:#fff;

    border-radius:24px;

    margin-bottom:25px;

    overflow:hidden;

    border:1px solid #eef2ff;

    box-shadow:
    0 10px 30px rgba(15,23,42,.06);
}

.card-header{
    padding:20px 25px;

    font-size:16px;
    font-weight:700;

    background:
    linear-gradient(
        90deg,
        #f8fafc,
        #ffffff
    );

    border-bottom:
    1px solid #e2e8f0;
}

/* =========================
   FORM
========================= */

.form-area{
    padding:25px;

    display:grid;

    grid-template-columns:
    repeat(auto-fit,minmax(220px,1fr));

    gap:15px;
}

.form-area{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:18px;
    padding:25px;
}

.form-area label{
    display:block;
    margin-bottom:8px;
    font-size:13px;
    font-weight:600;
    color:#475569;
}

.form-area input,
.form-area select,
.form-area textarea{
    height:48px;
}

.form-area textarea{
    height:100px;
    resize:none;
}

.full-width{
    grid-column:1 / -1;
}

.form-action{
    padding:0 25px 25px;
    display:flex;
    gap:10px;
}

.filter-area{
    padding:25px;

    display:flex;
    flex-wrap:wrap;
    gap:15px;
}

input,
select,
textarea{
    width:100%;

    padding:14px 16px;

    border:
    1px solid #dbeafe;

    border-radius:14px;

    background:#fff;

    transition:.25s;
}

input:focus,
select:focus,
textarea:focus{
    outline:none;

    border-color:#6366f1;

    box-shadow:
    0 0 0 4px rgba(99,102,241,.12);
}

textarea{
    min-height:100px;
}

/* =========================
   BUTTON
========================= */

button{
    border:none;

    background:
    linear-gradient(
        135deg,
        #6366f1,
        #4f46e5
    );

    color:white;

    padding:13px 20px;

    border-radius:14px;

    cursor:pointer;

    font-weight:600;

    transition:.25s;
}

button:hover{
    transform:translateY(-2px);

    box-shadow:
    0 10px 20px rgba(99,102,241,.25);
}

/* =========================
   TABLE
========================= */

.table-wrapper{
    padding:20px;
    overflow-x:auto;
}

table{
    width:100%;
    border-collapse:collapse;
}

thead{
    background:
    linear-gradient(
        135deg,
        #6366f1,
        #4f46e5
    );

    color:#fff;
}

th{
    padding:16px;
    font-size:13px;
    letter-spacing:.5px;
    text-transform:uppercase;
}

td{
    padding:15px;
    border-bottom:
    1px solid #f1f5f9;
}

tbody tr{
    transition:.2s;
}

tbody tr:hover{
    background:#f8fafc;
}

/* =========================
   STATUS
========================= */

.status-aman,
.status-menipis,
.status-kosong{
    display:inline-block;
    padding:8px 14px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
}

.status-aman{
    background:#dcfce7;
    color:#166534;
}

.status-menipis{
    background:#fef3c7;
    color:#92400e;
}

.status-kosong{
    background:#fee2e2;
    color:#991b1b;
}

/* =========================
   MODAL
========================= */

.modal-overlay{
    position:fixed;
    inset:0;

    background:
    rgba(0,0,0,.5);

    display:flex;
    justify-content:center;
    align-items:center;

    z-index:9999;
}

.modal-content{
    background:#fff;

    width:95%;
    max-width:500px;

    border-radius:24px;

    padding:30px;

    box-shadow:
    0 20px 60px rgba(0,0,0,.2);
}

/* =========================
   MOBILE
========================= */

@media(max-width:768px){

    body{
        padding:12px;
    }

    nav{
        flex-wrap:wrap;
    }

    nav button{
        flex:1;
    }

    .stock-page{
        padding:20px;
    }

    .stock-page h2{
        font-size:28px;
    }

    .filter-area{
        flex-direction:column;
    }

    .summary-card .value{
        font-size:30px;
    }
}


/* ===============================
   TRACKING PROGRESS
================================ */

.tracking-progress{

    display:flex;
    justify-content:space-between;
    align-items:center;

    position:relative;

    padding:35px 50px;

}


.tracking-progress::before{

    content:'';

    position:absolute;

    top:65px;
    left:80px;
    right:80px;

    height:5px;

    background:#e2e8f0;

    border-radius:50px;

    z-index:0;

}


.progress-item{

    position:relative;

    z-index:1;

    text-align:center;

    flex:1;

}


.circle{

    width:65px;
    height:65px;

    background:#e2e8f0;

    margin:auto;

    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:28px;

    transition:.3s;

}


.progress-item p{

    margin-top:12px;

    font-weight:700;

    color:#64748b;

}



.progress-item.active .circle{

    background:linear-gradient(
        135deg,
        #4f46e5,
        #7c3aed
    );

    color:white;

    transform:scale(1.08);

    box-shadow:
    0 10px 25px rgba(79,70,229,.4);

}



.progress-item.active p{

    color:#4f46e5;

}






/* ===============================
   MODAL UPDATE STATUS
================================ */


.modal-bg{

    position:fixed;

    inset:0;

    background:rgba(15,23,42,.55);

    display:flex;

    justify-content:center;

    align-items:center;

    z-index:999;

}



.modal-box{

    width:450px;

    max-width:90%;

    background:white;

    padding:30px;

    border-radius:22px;

    box-shadow:
    0 20px 60px rgba(0,0,0,.25);

}



.modal-box h3{

    margin-bottom:20px;

}



.modal-box label{

    font-size:13px;

    font-weight:700;

    margin-top:15px;

    display:block;

}



.modal-box select,
.modal-box textarea{

    margin-top:8px;

}



.modal-box textarea{

    min-height:120px;

}

/* =========================
   DELIVERY TRACKING
========================= */

.tracking-progress{

    display:flex;
    justify-content:space-between;
    position:relative;

    padding:35px 80px;

}


/* garis dasar */

.tracking-progress::before{

    content:'';

    position:absolute;

    top:65px;

    left:18%;

    width:64%;

    height:5px;

    background:#e5e7eb;

    border-radius:20px;

}


/* garis aktif */

.tracking-progress::after{

    content:'';

    position:absolute;

    top:65px;

    left:18%;

    height:5px;

    width:var(--progress);

    background:#4f46e5;

    border-radius:20px;

    transition:.3s;

}



.progress-item{

    position:relative;

    flex:1;

    text-align:center;

    z-index:2;

}



.circle{

    width:60px;
    height:60px;

    margin:auto;

    border-radius:50%;

    background:#e5e7eb;

    display:flex;

    align-items:center;
    justify-content:center;

    font-size:25px;

}



.progress-item.active .circle{


    background:#4f46e5;

    color:white;


}



.progress-item p{


    margin-top:10px;

    font-weight:700;

    color:#94a3b8;


}



.progress-item.active p{


    color:#4f46e5;


}




@keyframes fade{

from{
opacity:0;
transform:translateY(10px);
}

to{
opacity:1;
transform:translateY(0);
}

}


/* ===============================
   PREVIEW CATATAN STATUS MODAL
================================ */

.preview-tooltip{

    position:fixed;

    background:white;

    min-width:230px;

    max-width:300px;

    padding:16px 18px;

    border-radius:14px;

    border-left:5px solid #4f46e5;

    box-shadow:
    0 15px 35px rgba(0,0,0,.15);

    z-index:99999;

    font-size:14px;

    pointer-events:none;

}



.preview-tooltip b{

    color:#4f46e5;

    display:block;

    margin-bottom:10px;

}



.preview-content{

    color:#555;

    line-height:1.5;

}



@keyframes previewShow{

    from{

        opacity:0;

        transform:
        translate(-50%,-40%);

    }


    to{

        opacity:1;

        transform:
        translate(-50%,-50%);

    }

}



.preview-tooltip b{

    display:block;

    color:#5147e8;

    margin-bottom:10px;

}



.preview-content{

    font-size:14px;

    color:#475569;

    line-height:1.5;

}







.preview-tooltip div{

    line-height:1.6;

    color:#475569;

}


.status-hover{

    position:relative;

    display:inline-block;

    cursor:pointer;

}


@keyframes modalPreview{


    from{

        opacity:0;

        transform:
        translateY(15px);

    }


    to{

        opacity:1;

        transform:
        translateY(0);

    }


}