:root{
    --primary:#2ec27e;
    --primary-dark:#199c61;
    --secondary:#7be0b0;
    --accent:#6ee7b7;
    --bg:#eef6f3;
    --card:rgba(255,255,255,.75);
    --border:rgba(255,255,255,.45);
    --text:#1e293b;
    --text-light:#64748b;
    --shadow:0 20px 50px rgba(15,23,42,.08);
    --radius:22px;
    --transition:.3s ease;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Inter',sans-serif;
    color:var(--text);
    background:linear-gradient(140deg,#f5fff9,#edf7ff,#f7fbff);
    min-height:100vh;
    overflow-x:hidden;
    position:relative;
}

.background{
    position:fixed;
    inset:0;
    z-index:-2;
    overflow:hidden;
}

.blur{
    position:absolute;
    border-radius:50%;
    filter:blur(100px);
    opacity:.45;
}

.blur-1{
    width:420px;
    height:420px;
    background:#6ee7b7;
    top:-120px;
    left:-80px;
}

.blur-2{
    width:480px;
    height:480px;
    background:#93c5fd;
    right:-150px;
    bottom:-150px;
}

.hero{
    padding:45px 25px 25px;
}

.hero-top{
    max-width:1280px;
    margin:auto;
}

.hero-title{
    display:flex;
    align-items:center;
    gap:22px;
    background:rgba(255,255,255,.7);
    backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.5);
    border-radius:28px;
    padding:28px 35px;
    box-shadow:var(--shadow);
}

.logo-box{
    width:78px;
    height:78px;
    border-radius:22px;
    background:linear-gradient(135deg,var(--primary),#58d89c);
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

.logo-box img{
    width:56px;
    height:56px;
    object-fit:contain;
}

.title-text h1{
    font-size:2rem;
    font-weight:800;
    color:#163a2c;
    margin-bottom:6px;
}

.title-text p{
    font-size:.97rem;
    color:var(--text-light);
}

.container{
    width:min(1280px,95%);
    margin:auto;
    display:flex;
    flex-direction:column;
    gap:28px;
    padding-bottom:50px;
}

.dashboard-card,
.content-card{
    background:var(--card);
    backdrop-filter:blur(18px);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}

.dashboard-card{
    padding:30px;
}

.dashboard-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    margin-bottom:28px;
}

.dashboard-header h2{
    font-size:1.4rem;
    margin-bottom:6px;
}

.dashboard-header span{
    color:var(--text-light);
    font-size:.92rem;
}

.year-box{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.year-box label{
    font-size:.82rem;
    color:var(--text-light);
    font-weight:600;
}

#yearFilter{
    width:170px;
}

.type-selector{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    gap:18px;
}

.type-btn{
    border:none;
    background:#fff;
    border-radius:20px;
    padding:22px;
    display:flex;
    align-items:center;
    gap:18px;
    cursor:pointer;
    transition:var(--transition);
    box-shadow:0 8px 25px rgba(0,0,0,.05);
    border:2px solid transparent;
}

.type-btn:hover{
    transform:translateY(-6px);
    border-color:var(--secondary);
    box-shadow:0 18px 40px rgba(46,194,126,.18);
}

.type-btn.active{
    background:linear-gradient(135deg,var(--primary),#55d59d);
    color:#fff;
}

.type-btn.active small{
    color:rgba(255,255,255,.9);
}

.type-btn .icon{
    width:58px;
    height:58px;
    border-radius:16px;
    background:rgba(46,194,126,.12);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.5rem;
    flex-shrink:0;
}

.type-btn.active .icon{
    background:rgba(255,255,255,.2);
}

.type-btn strong{
    display:block;
    font-size:1.05rem;
    margin-bottom:4px;
}

.type-btn small{
    color:var(--text-light);
    font-size:.85rem;
}

.content-card{
    padding:30px;
}

.content-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    margin-bottom:28px;
}

.content-header h2{
    margin-bottom:6px;
}

.content-header p{
    color:var(--text-light);
    font-size:.92rem;
}

button,
input,
select{
    font-family:'Inter',sans-serif;
}

button{
    cursor:pointer;
    transition:var(--transition);
}

.primary-btn,
.secondary-btn{
    border:none;
    border-radius:14px;
    padding:13px 22px;
    font-size:.92rem;
    font-weight:600;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

.primary-btn{
    color:#fff;
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    box-shadow:0 12px 25px rgba(46,194,126,.28);
}

.primary-btn:hover{
    transform:translateY(-3px);
    box-shadow:0 20px 35px rgba(46,194,126,.35);
}

.secondary-btn{
    background:#fff;
    color:var(--text);
    border:1px solid rgba(0,0,0,.08);
}

.secondary-btn:hover{
    transform:translateY(-3px);
    background:#f8fafc;
}

#btnTambah{
    display:none;
}

input,
select{
    width:100%;
    height:48px;
    border-radius:14px;
    border:1px solid rgba(0,0,0,.08);
    background:#fff;
    padding:0 16px;
    outline:none;
    transition:var(--transition);
    font-size:.92rem;
}

input:focus,
select:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(46,194,126,.15);
}
.list-container{
    display:flex;
    flex-direction:column;
    gap:16px;
}

@media (min-width:768px){

    .list-container{
        max-height:600px;
        overflow-y:auto;
        padding-right:8px;
    }

}
.list-item{
    background:#fff;
    border-radius:18px;
    padding:18px 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    border:1px solid rgba(0,0,0,.05);
    box-shadow:0 10px 30px rgba(15,23,42,.05);
    transition:var(--transition);
    animation:fadeUp .45s ease both;
}

.list-item:hover{
    transform:translateY(-5px);
    box-shadow:0 18px 35px rgba(46,194,126,.15);
    border-color:rgba(46,194,126,.3);
}

.list-item span{
    font-size:.95rem;
    font-weight:600;
    color:var(--text);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.list-item button{
    border:none;
    padding:10px 18px;
    border-radius:12px;
    color:#fff;
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    font-weight:600;
}

.list-item button:hover{
    transform:translateY(-2px);
}

.empty-state{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:70px 20px;
    text-align:center;
}

.empty-icon{
    width:90px;
    height:90px;
    border-radius:50%;
    background:linear-gradient(135deg,var(--primary),#69dfaa);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:2.2rem;
    color:#fff;
    margin-bottom:20px;
}

.empty-state h3{
    margin-bottom:10px;
}

.empty-state p{
    max-width:380px;
    color:var(--text-light);
    line-height:1.6;
}

.modal{
    position:fixed;
    inset:0;
    display:none;
    justify-content:center;
    align-items:flex-start;
    overflow-y:auto;
    padding:30px 20px;
    background:rgba(15,23,42,.45);
    backdrop-filter:blur(10px);
    z-index:999;
}

.modal-content{
    width:100%;
    max-width:760px;
    max-height:85vh;
    display:flex;
    flex-direction:column;
    background:rgba(255,255,255,.92);
    backdrop-filter:blur(20px);
    border-radius:28px;
    animation:pop .35s ease;
    box-shadow:0 25px 60px rgba(15,23,42,.18);
    overflow:hidden;
}
.modal-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    padding:28px 30px;
    border-bottom:1px solid rgba(0,0,0,.06);
}

.modal-header h2{
    margin-bottom:6px;
}

.modal-header p{
    color:var(--text-light);
}

.close-btn{
    width:42px;
    height:42px;
    border:none;
    border-radius:12px;
    background:#f1f5f9;
    font-size:18px;
}

.close-btn:hover{
    background:#e2e8f0;
}

.modal-body{
    padding:28px 30px;
    overflow-y:auto;
    flex:1;
}
.modal-body::-webkit-scrollbar{
    width:8px;
}

.modal-body::-webkit-scrollbar-track{
    background:transparent;
}

.modal-body::-webkit-scrollbar-thumb{
    background:#cbd5e1;
    border-radius:50px;
}

.modal-body::-webkit-scrollbar-thumb:hover{
    background:var(--primary);
}
@media (max-width:768px){

    .modal-content{
        max-height:92vh;
    }

}
.form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
}

.field{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.field.full{
    grid-column:1/-1;
}

.field label{
    font-size:.88rem;
    font-weight:600;
    color:var(--text-light);
}

.spa-group{
    display:flex;
    gap:15px;
    align-items:end;
    margin-bottom:24px;
}

.spa-group .field{
    flex:1;
}

.modal-footer{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    padding:24px 30px;
    border-top:1px solid rgba(0,0,0,.06);
}

.confirm-card{
    width:100%;
    max-width:430px;
    background:#fff;
    border-radius:26px;
    text-align:center;
    padding:40px;
    animation:pop .35s ease;
    box-shadow:0 25px 60px rgba(15,23,42,.2);
}

.confirm-icon{
    width:82px;
    height:82px;
    margin:auto;
    margin-bottom:20px;
    border-radius:50%;
    background:linear-gradient(135deg,var(--primary),#68ddab);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:2rem;
}

.confirm-card h2{
    margin-bottom:12px;
}

.confirm-card p{
    color:var(--text-light);
    line-height:1.7;
    margin-bottom:28px;
}

.confirm-action{
    display:flex;
    gap:12px;
}

.confirm-action button{
    flex:1;
}

.loading{
    position:fixed;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.72);
    backdrop-filter:blur(8px);
    z-index:9999;
}

.loader-card{
    background:#fff;
    border-radius:24px;
    padding:35px;
    text-align:center;
    box-shadow:0 20px 45px rgba(15,23,42,.15);
}

.loader-card p{
    margin-top:18px;
    font-weight:600;
    color:var(--text-light);
}

.spinner{
    width:58px;
    height:58px;
    margin:auto;
    border-radius:50%;
    border:5px solid rgba(46,194,126,.2);
    border-top-color:var(--primary);
    animation:spin .8s linear infinite;
}

.toast{
    position:fixed;
    right:25px;
    bottom:25px;
    background:#163a2c;
    color:#fff;
    padding:15px 22px;
    border-radius:14px;
    box-shadow:0 20px 40px rgba(0,0,0,.18);
    display:none;
    z-index:10000;
}

::-webkit-scrollbar{
    width:8px;
}

::-webkit-scrollbar-track{
    background:transparent;
}

::-webkit-scrollbar-thumb{
    background:#b8dcca;
    border-radius:50px;
}

::-webkit-scrollbar-thumb:hover{
    background:var(--primary);
}

@keyframes spin{
    to{
        transform:rotate(360deg);
    }
}

@keyframes pop{
    from{
        opacity:0;
        transform:scale(.9);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(18px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@media (max-width:900px){

    .dashboard-header,
    .content-header{
        flex-direction:column;
        align-items:stretch;
    }

    .form-grid{
        grid-template-columns:1fr;
    }

    .spa-group{
        flex-direction:column;
        align-items:stretch;
    }

    .modal-footer{
        flex-direction:column-reverse;
    }

    .confirm-action{
        flex-direction:column;
    }

    #yearFilter{
        width:100%;
    }

}

@media (max-width:640px){

    .hero{
        padding:20px 15px;
    }

    .hero-title{
        padding:22px;
        flex-direction:column;
        text-align:center;
    }

    .title-text h1{
        font-size:1.35rem;
    }

    .dashboard-card,
    .content-card{
        padding:20px;
    }

    .modal{
        padding:15px;
    }

    .modal-header,
    .modal-body,
    .modal-footer{
        padding:20px;
    }

    .list-item{
        flex-direction:column;
        align-items:flex-start;
    }

    .list-item button{
        width:100%;
    }

    .list-info{
        display:flex;
        align-items:center;
        gap:16px;
        flex:1;
        min-width:0;
    }
    
    .list-avatar{
        width:58px;
        height:58px;
        border-radius:16px;
        display:flex;
        align-items:center;
        justify-content:center;
        background:linear-gradient(135deg,var(--primary),#63dca7);
        color:#fff;
        font-size:1.4rem;
        flex-shrink:0;
        box-shadow:0 12px 24px rgba(46,194,126,.25);
    }
    
    .list-detail{
        display:flex;
        flex-direction:column;
        min-width:0;
    }
    
    .list-detail h4{
        margin:0;
        font-size:1rem;
        font-weight:700;
        color:var(--text);
        overflow:hidden;
        white-space:nowrap;
        text-overflow:ellipsis;
    }
    
    .list-detail span{
        margin-top:4px;
        font-size:.82rem;
        color:var(--text-light);
        font-weight:500;
    }
    
    .preview-btn{
        border:none;
        border-radius:12px;
        padding:11px 20px;
        font-size:.9rem;
        font-weight:600;
        color:#fff;
        background:linear-gradient(135deg,#3b82f6,#2563eb);
        transition:var(--transition);
        flex-shrink:0;
    }
    
    .preview-btn:hover{
        transform:translateY(-3px);
        box-shadow:0 14px 28px rgba(37,99,235,.28);
    }
    
    .preview-btn:active{
        transform:scale(.98);
    }
    
    @media (max-width:640px){
    
        .list-info{
            width:100%;
        }
    
        .preview-btn{
            width:100%;
            margin-top:12px;
        }
    
    }
}
@media (max-width:768px){

    .modal{
        padding:16px;
        align-items:flex-start;
    }

    .modal-content{
        margin:20px 0;
        max-height:none;
    }

}
