:root{
    --dfi-navy-1:#061226;
    --dfi-navy-2:#0b1f3d;
    --dfi-navy-3:#123564;
    --dfi-navy-4:#1d4f8f;
    --dfi-gold-1:#cfa63a;
    --dfi-gold-2:#f1d27a;
    --dfi-gold-3:#9b7826;
    --dfi-white:#ffffff;
    --dfi-text:#0f172a;
    --dfi-text-soft:#475569;
    --dfi-muted:#94a3b8;
    --dfi-line:#e2e8f0;
    --dfi-card:#ffffff;
    --dfi-sidebar-text:#dbeafe;
    --dfi-sidebar-muted:#9fb6dd;
    --dfi-success:#166534;
    --dfi-success-bg:#dcfce7;
    --dfi-warning:#9a3412;
    --dfi-warning-bg:#ffedd5;
    --dfi-danger:#991b1b;
    --dfi-danger-bg:#fee2e2;
    --dfi-info:#1d4ed8;
    --dfi-info-bg:#dbeafe;
    --shadow-sm:0 8px 20px rgba(2,6,23,.08);
    --shadow-md:0 16px 40px rgba(2,6,23,.12);
    --shadow-lg:0 24px 60px rgba(2,6,23,.18);
    --radius-sm:14px;
    --radius-md:20px;
    --radius-lg:28px;
}

*{
    box-sizing:border-box;
}

html,body{
    margin:0;
    padding:0;
}

body{
    font-family:Inter,Segoe UI,Arial,sans-serif;
    color:var(--dfi-text);
    background:
        radial-gradient(circle at top left, rgba(241,210,122,.10), transparent 24%),
        radial-gradient(circle at bottom right, rgba(24,63,114,.12), transparent 24%),
        linear-gradient(135deg, #071325 0%, #0d2143 40%, #153661 100%);
    min-height:100vh;
}

a{
    color:inherit;
    text-decoration:none;
}

img{
    max-width:100%;
    display:block;
}

h1,h2,h3,h4,h5,h6{
    margin-top:0;
}

p{
    margin-top:0;
}

.muted{
    color:var(--dfi-text-soft);
}

.text-gold{
    color:var(--dfi-gold-1);
}

.badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:7px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    line-height:1;
    letter-spacing:.2px;
}

.badge-success{
    color:var(--dfi-success);
    background:var(--dfi-success-bg);
}

.badge-warning{
    color:var(--dfi-warning);
    background:var(--dfi-warning-bg);
}

.badge-danger{
    color:var(--dfi-danger);
    background:var(--dfi-danger-bg);
}

.badge-info{
    color:var(--dfi-info);
    background:var(--dfi-info-bg);
}

.app-shell{
    display:grid;
    grid-template-columns:290px 1fr;
    min-height:100vh;
}

.sidebar{
    position:sticky;
    top:0;
    height:100vh;
    padding:24px 20px;
    background:
        linear-gradient(180deg, rgba(5,15,35,.96), rgba(8,20,42,.98)),
        linear-gradient(135deg, rgba(241,210,122,.04), rgba(255,255,255,0));
    border-right:1px solid rgba(241,210,122,.12);
    box-shadow:inset -1px 0 0 rgba(255,255,255,.04);
    overflow-y:auto;
}

.sidebar::-webkit-scrollbar{
    width:8px;
}
.sidebar::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.10);
    border-radius:999px;
}

.brand{
    display:flex;
    align-items:center;
    gap:14px;
    padding:16px;
    border-radius:24px;
    margin-bottom:22px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.brand-logo{
    width:58px;
    height:58px;
    border-radius:18px;
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg, var(--dfi-gold-1), var(--dfi-gold-2));
    color:#111;
    font-weight:900;
    font-size:20px;
    box-shadow:0 10px 25px rgba(207,166,58,.25);
    overflow:hidden;
}

.brand-logo img{
    width:38px;
    height:38px;
    object-fit:contain;
}

.brand h1{
    margin:0;
    font-size:17px;
    line-height:1.25;
    color:#fff;
    font-weight:800;
    letter-spacing:.15px;
}

.brand p{
    margin:4px 0 0;
    color:var(--dfi-sidebar-muted);
    font-size:12px;
    line-height:1.5;
}

.nav{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.nav-link{
    position:relative;
    display:flex;
    align-items:center;
    min-height:48px;
    padding:12px 14px;
    border-radius:16px;
    color:var(--dfi-sidebar-text);
    border:1px solid transparent;
    transition:.22s ease;
    font-weight:700;
    font-size:14px;
    letter-spacing:.1px;
}

.nav-link:hover{
    background:rgba(255,255,255,.06);
    border-color:rgba(255,255,255,.08);
    transform:translateX(2px);
}

.nav-link.active{
    color:#fff;
    background:linear-gradient(135deg, rgba(207,166,58,.18), rgba(241,210,122,.08));
    border-color:rgba(241,210,122,.28);
    box-shadow:
        0 10px 24px rgba(0,0,0,.16),
        inset 0 1px 0 rgba(255,255,255,.06);
}

.nav-link.active::before{
    content:"";
    position:absolute;
    left:0;
    top:10px;
    bottom:10px;
    width:4px;
    border-radius:0 999px 999px 0;
    background:linear-gradient(180deg, var(--dfi-gold-1), var(--dfi-gold-2));
}

.main{
    padding:24px;
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    margin-bottom:20px;
    padding:20px 24px;
    border-radius:28px;
    background:rgba(255,255,255,.94);
    border:1px solid rgba(255,255,255,.55);
    box-shadow:var(--shadow-md);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
}

.topbar h2{
    margin:0;
    font-size:28px;
    font-weight:900;
    color:#0f172a;
    letter-spacing:.2px;
}

.topbar p{
    margin:6px 0 0;
    color:var(--dfi-text-soft);
    font-size:13px;
}

.userbox{
    display:flex;
    align-items:center;
    gap:14px;
    padding:10px 12px;
    border-radius:20px;
    background:linear-gradient(135deg, rgba(15,23,42,.03), rgba(15,23,42,.01));
    border:1px solid rgba(15,23,42,.06);
}

.userbox strong{
    color:#0f172a;
    font-size:14px;
}

.userbox span{
    color:var(--dfi-text-soft);
    font-size:12px;
}

.content{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.grid{
    display:grid;
    gap:20px;
}

.grid-2{
    grid-template-columns:repeat(2, minmax(0, 1fr));
}

.grid-3{
    grid-template-columns:repeat(3, minmax(0, 1fr));
}

.grid-4{
    grid-template-columns:repeat(4, minmax(0, 1fr));
}

.card{
    position:relative;
    background:rgba(255,255,255,.97);
    border:1px solid rgba(255,255,255,.7);
    border-radius:var(--radius-lg);
    padding:22px;
    box-shadow:var(--shadow-md);
    overflow:hidden;
}

.card::before{
    content:"";
    position:absolute;
    top:0;
    left:0;
    right:0;
    height:4px;
    background:linear-gradient(90deg, var(--dfi-gold-1), var(--dfi-gold-2));
    opacity:.85;
}

.card h3{
    margin:0 0 16px;
    font-size:18px;
    font-weight:900;
    color:#0f172a;
    letter-spacing:.15px;
}

.card-subtitle{
    margin-top:-8px;
    margin-bottom:16px;
    color:var(--dfi-text-soft);
    font-size:13px;
    line-height:1.6;
}

.stat-card{
    padding:22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98)),
        linear-gradient(135deg, rgba(241,210,122,.03), rgba(255,255,255,0));
}

.stat-title{
    color:var(--dfi-text-soft);
    font-size:13px;
    font-weight:700;
    letter-spacing:.25px;
    margin-bottom:10px;
}

.stat-value{
    color:#0f172a;
    font-size:30px;
    line-height:1.1;
    font-weight:900;
    margin-bottom:8px;
}

.stat-small{
    color:var(--dfi-muted);
    font-size:12px;
    line-height:1.5;
}

.table-wrap{
    width:100%;
    overflow:auto;
    border-radius:18px;
    border:1px solid var(--dfi-line);
}

.table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    min-width:720px;
}

.table thead th{
    position:sticky;
    top:0;
    z-index:1;
    padding:14px 14px;
    text-align:left;
    font-size:13px;
    font-weight:900;
    letter-spacing:.25px;
    color:#0f172a;
    background:linear-gradient(180deg, #f8fafc, #eef2f7);
    border-bottom:1px solid var(--dfi-line);
}

.table thead th:first-child{
    border-top-left-radius:16px;
}
.table thead th:last-child{
    border-top-right-radius:16px;
}

.table tbody td{
    padding:13px 14px;
    font-size:14px;
    line-height:1.55;
    color:#1e293b;
    border-bottom:1px solid #edf2f7;
    background:#fff;
    vertical-align:top;
}

.table tbody tr:nth-child(even) td{
    background:#fcfdff;
}

.table tbody tr:hover td{
    background:#f8fbff;
}

.table tbody tr:last-child td{
    border-bottom:none;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:44px;
    padding:10px 18px;
    border-radius:16px;
    border:none;
    cursor:pointer;
    font-weight:800;
    font-size:14px;
    letter-spacing:.2px;
    transition:.2s ease;
    text-decoration:none;
}

.btn:hover{
    transform:translateY(-1px);
}

.btn-primary{
    color:#1d1605;
    background:linear-gradient(135deg, var(--dfi-gold-1), var(--dfi-gold-2));
    box-shadow:0 14px 28px rgba(207,166,58,.24);
}

.btn-primary:hover{
    box-shadow:0 18px 32px rgba(207,166,58,.30);
}

.btn-outline{
    color:#0f172a;
    background:#fff;
    border:1px solid rgba(15,23,42,.12);
    box-shadow:0 6px 16px rgba(2,6,23,.05);
}

.btn-outline:hover{
    background:#f8fafc;
}

.btn-dark{
    color:#fff;
    background:linear-gradient(135deg, var(--dfi-navy-2), var(--dfi-navy-4));
    box-shadow:0 14px 30px rgba(11,31,61,.24);
}

.btn-danger{
    color:#fff;
    background:linear-gradient(135deg, #b91c1c, #ef4444);
    box-shadow:0 14px 30px rgba(185,28,28,.20);
}

.btn-sm{
    min-height:36px;
    padding:8px 14px;
    border-radius:12px;
    font-size:13px;
}

.form-grid{
    display:grid;
    gap:16px;
}

.form-row{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:16px;
}

.form-row-3{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:16px;
}

label{
    display:grid;
    gap:8px;
    font-size:14px;
    font-weight:800;
    color:#0f172a;
}

input,
select,
textarea{
    width:100%;
    border:1px solid #cbd5e1;
    background:#fff;
    color:#0f172a;
    border-radius:16px;
    outline:none;
    padding:12px 14px;
    font:inherit;
    transition:.2s ease;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}

input::placeholder,
textarea::placeholder{
    color:#94a3b8;
}

input:focus,
select:focus,
textarea:focus{
    border-color:rgba(207,166,58,.70);
    box-shadow:
        0 0 0 4px rgba(241,210,122,.18),
        inset 0 1px 0 rgba(255,255,255,.8);
}

textarea{
    min-height:110px;
    resize:vertical;
}

.alert{
    padding:14px 16px;
    border-radius:18px;
    font-size:14px;
    font-weight:700;
    line-height:1.6;
    border:1px solid transparent;
}

.alert-danger{
    color:var(--dfi-danger);
    background:var(--dfi-danger-bg);
    border-color:#fecaca;
}

.alert-success{
    color:var(--dfi-success);
    background:var(--dfi-success-bg);
    border-color:#bbf7d0;
}

.alert-warning{
    color:var(--dfi-warning);
    background:var(--dfi-warning-bg);
    border-color:#fed7aa;
}

.alert-info{
    color:var(--dfi-info);
    background:var(--dfi-info-bg);
    border-color:#bfdbfe;
}

.info-box{
    padding:16px 18px;
    border-radius:20px;
    border:1px dashed rgba(207,166,58,.32);
    background:linear-gradient(135deg, rgba(241,210,122,.12), rgba(255,255,255,.9));
    color:#1e293b;
    line-height:1.7;
}

code{
    display:inline-block;
    padding:2px 8px;
    border-radius:8px;
    background:#f8fafc;
    color:#b45309;
    font-weight:800;
}

.status-draft,
.status-pending{
    color:#92400e;
    background:#fef3c7;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    display:inline-flex;
}

.status-active,
.status-paid,
.status-approved,
.status-done,
.status-hadir{
    color:#166534;
    background:#dcfce7;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    display:inline-flex;
}

.status-overdue,
.status-rejected,
.status-cancelled,
.status-alpha{
    color:#991b1b;
    background:#fee2e2;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    display:inline-flex;
}

.status-partial,
.status-proses,
.status-telat,
.status-izin{
    color:#9a3412;
    background:#ffedd5;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    display:inline-flex;
}

.section-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
}

.section-title h3{
    margin:0;
}

.text-right{
    text-align:right;
}

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

.mb-0{margin-bottom:0}
.mb-1{margin-bottom:8px}
.mb-2{margin-bottom:12px}
.mb-3{margin-bottom:18px}
.mb-4{margin-bottom:24px}

.mt-0{margin-top:0}
.mt-1{margin-top:8px}
.mt-2{margin-top:12px}
.mt-3{margin-top:18px}
.mt-4{margin-top:24px}

@media (max-width: 1200px){
    .grid-4{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px){
    .app-shell{
        grid-template-columns:1fr;
    }

    .sidebar{
        position:relative;
        height:auto;
        border-right:none;
        border-bottom:1px solid rgba(241,210,122,.12);
    }

    .main{
        padding:18px;
    }

    .topbar{
        flex-direction:column;
        align-items:flex-start;
    }

    .userbox{
        width:100%;
        justify-content:space-between;
    }

    .grid-3,
    .grid-2{
        grid-template-columns:1fr;
    }

    .form-row,
    .form-row-3{
        grid-template-columns:1fr;
    }
}

@media (max-width: 640px){
    .main{
        padding:14px;
    }

    .topbar{
        padding:18px 16px;
        border-radius:22px;
    }

    .topbar h2{
        font-size:24px;
    }

    .card{
        padding:18px;
        border-radius:22px;
    }

    .stat-value{
        font-size:26px;
    }

    .grid-4{
        grid-template-columns:1fr;
    }

    .table{
        min-width:640px;
    }

    .brand{
        padding:14px;
    }

    .brand-logo{
        width:52px;
        height:52px;
        border-radius:16px;
    }

    .brand-logo img{
        width:34px;
        height:34px;
    }
}