/* =========================================================
   SISTEM INFORMASI MANAJEMEN PERJALANAN DINAS
   SEKRETARIAT DPRD KOTA TANJUNGBALAI
========================================================= */

:root{
    --nav:#071827;
    --nav2:#0b2637;

    --green:#087f45;
    --green2:#0ca35a;
    --green-light:#e9f7f0;

    --bg:#f4f7f6;
    --line:#e2e8e6;

    --text:#17211d;
    --muted:#6d7974;

    --danger:#b93434;
    --warning:#d99118;
    --blue:#3579bd;

    --white:#ffffff;

    --shadow:
        0 4px 18px rgba(11,32,28,.05);
}


/* =========================================================
   RESET
========================================================= */

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    background:var(--bg);
    color:var(--text);

    font-size:14px;
}

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

button,
input,
select,
textarea{
    font-family:inherit;
}


/* =========================================================
   APP
========================================================= */

.app{
    display:flex;
    min-height:100vh;
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar{
    width:238px;

    background:
        linear-gradient(
            180deg,
            var(--nav),
            #06131f
        );

    color:#d9e6e2;

    position:fixed;

    inset:
        0 auto 0 0;

    padding:
        12px 12px 18px;

    overflow-y:auto;

    z-index:100;
}


/* =========================================================
   BRAND / LOGO SIDEBAR
========================================================= */

.brand{
    display:flex;
    align-items:center;

    gap:11px;

    padding:
        8px 8px 18px;

    border-bottom:
        1px solid #183446;

    margin-bottom:12px;
}

.brand-logo{
    width:52px;
    height:52px;

    flex:
        0 0 52px;

    display:flex;

    align-items:center;
    justify-content:center;
}

.brand-logo img{
    width:100%;
    height:100%;

    display:block;

    object-fit:contain;
}

.brand-text{
    min-width:0;
}

.brand-text strong{
    display:block;

    color:#ffffff;

    font-size:13px;
    font-weight:700;

    line-height:1.25;
}

.brand-text small{
    display:block;

    margin-top:4px;

    color:#8fb0a8;

    font-size:9px;
    font-weight:600;

    line-height:1.3;

    text-transform:uppercase;

    letter-spacing:.4px;
}


/* =========================================================
   SIDEBAR NAVIGATION
========================================================= */

.sidebar nav{
    display:flex;

    flex-direction:column;

    gap:4px;
}

.sidebar a,
.sidebar summary{
    display:block;

    padding:
        10px 12px;

    border-radius:7px;

    color:#d9e6e2;

    font-size:13px;

    cursor:pointer;

    list-style:none;

    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}

.sidebar summary::-webkit-details-marker{
    display:none;
}

.sidebar a:hover{
    background:
        rgba(255,255,255,.07);

    color:#ffffff;
}

.sidebar a.active{
    background:
        linear-gradient(
            135deg,
            var(--green),
            var(--green2)
        );

    color:#ffffff;

    box-shadow:
        0 4px 12px
        rgba(8,127,69,.22);
}

.sidebar details{
    margin:0;
}

.sidebar details summary{
    position:relative;

    padding-right:30px;
}

.sidebar details summary::after{
    content:"›";

    position:absolute;

    right:13px;
    top:50%;

    transform:
        translateY(-50%)
        rotate(90deg);

    font-size:17px;

    color:#8fb0a8;

    transition:
        transform .2s ease;
}

.sidebar details[open] summary::after{
    transform:
        translateY(-50%)
        rotate(-90deg);
}

.sidebar details a{
    display:block;

    padding:
        8px 12px 8px 30px;

    margin-top:2px;

    font-size:12px;

    color:#aabfba;
}


/* =========================================================
   MAIN
========================================================= */

.main{
    margin-left:238px;

    width:
        calc(100% - 238px);

    min-height:100vh;
}


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

.topbar{
    min-height:64px;

    background:#ffffff;

    color:var(--text);

    display:flex;

    align-items:center;
    justify-content:space-between;

    gap:20px;

    padding:
        0 24px;

    position:sticky;

    top:0;

    z-index:50;

    border-bottom:
        1px solid #e8edeb;

    box-shadow:
        0 2px 10px
        rgba(15,23,42,.035);
}


/* =========================================================
   USER PILL LAMA
   Tetap disediakan jika header lama masih menggunakannya
========================================================= */

.userpill{
    display:flex;

    gap:8px;

    align-items:center;

    font-size:13px;
}

.userpill span{
    color:#1ba66a;
}

.userpill small{
    padding-left:6px;

    color:#75847e;
}


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

.mobile-toggle{
    display:none;

    width:40px;
    height:40px;

    align-items:center;
    justify-content:center;

    border:
        1px solid #e0e7e4;

    border-radius:9px;

    background:#ffffff;

    color:#24352f;

    font-size:20px;

    cursor:pointer;
}

.mobile-toggle:hover{
    background:#f4f7f6;
}


/* =========================================================
   CONTENT
========================================================= */

.content{
    padding:24px;

    max-width:1450px;

    margin:auto;
}


/* =========================================================
   PAGE TITLE
========================================================= */

.page-title{
    display:flex;

    justify-content:space-between;

    align-items:flex-end;

    gap:12px;

    margin-bottom:18px;
}

.page-title h1{
    margin:0;

    font-size:24px;

    font-weight:700;

    color:#17211d;
}

.page-title p{
    margin:
        5px 0 0;

    color:var(--muted);

    font-size:13px;

    line-height:1.5;
}


/* =========================================================
   BUTTON
========================================================= */

.btn{
    display:inline-flex;

    align-items:center;
    justify-content:center;

    gap:6px;

    border:0;

    border-radius:8px;

    padding:
        10px 14px;

    background:var(--green);

    color:#ffffff;

    cursor:pointer;

    font-weight:600;

    font-size:13px;

    transition:
        background .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.btn:hover{
    background:var(--green2);

    transform:
        translateY(-1px);

    box-shadow:
        0 5px 12px
        rgba(8,127,69,.15);
}

.btn.secondary{
    background:#60706a;
}

.btn.secondary:hover{
    background:#4e5d58;
}

.btn.danger{
    background:#b93434;
}

.btn.danger:hover{
    background:#a32c2c;
}

.btn.light{
    background:#edf3f1;

    color:#20332d;

    border:
        1px solid #d6e0dd;
}

.btn.light:hover{
    background:#e3ece9;
}


/* =========================================================
   GRID
========================================================= */

.grid-4{
    display:grid;

    grid-template-columns:
        repeat(4,1fr);

    gap:14px;
}


/* =========================================================
   CARD
========================================================= */

.card{
    background:#ffffff;

    border:
        1px solid var(--line);

    border-radius:11px;

    padding:18px;

    box-shadow:
        var(--shadow);
}

.stat{
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.stat:hover{
    transform:
        translateY(-2px);

    box-shadow:
        0 8px 22px
        rgba(11,32,28,.07);
}

.stat b{
    font-size:26px;

    display:block;

    margin:
        6px 0;

    color:#15231e;
}

.stat small{
    color:var(--muted);
}


/* =========================================================
   PANEL
========================================================= */

.panel{
    background:#ffffff;

    border:
        1px solid var(--line);

    border-radius:11px;

    padding:18px;

    margin-top:15px;

    box-shadow:
        0 3px 13px
        rgba(11,32,28,.035);
}

.panel h3{
    margin:
        0 0 14px;

    font-size:16px;

    color:#1b2a25;
}


/* =========================================================
   TWO COLUMN
========================================================= */

.two{
    display:grid;

    grid-template-columns:
        1.4fr 1fr;

    gap:15px;
}


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

.table-wrap{
    overflow:auto;

    border-radius:8px;
}

table{
    width:100%;

    border-collapse:collapse;

    font-size:13px;
}

th,
td{
    padding:
        11px 10px;

    border-bottom:
        1px solid #edf0ef;

    text-align:left;

    white-space:nowrap;

    vertical-align:middle;
}

th{
    background:#f7faf9;

    color:#4a5954;

    font-size:12px;

    font-weight:700;
}

tbody tr{
    transition:
        background .15s ease;
}

tbody tr:hover{
    background:#fbfdfc;
}


/* =========================================================
   BADGE
========================================================= */

.badge{
    display:inline-block;

    padding:
        5px 8px;

    border-radius:99px;

    font-size:11px;

    font-weight:700;

    white-space:nowrap;
}

.badge.ok{
    background:#e5f6ec;
    color:#167342;
}

.badge.warn{
    background:#fff0d9;
    color:#9d6017;
}

.badge.info{
    background:#e4f0ff;
    color:#235f9b;
}

.badge.muted{
    background:#edf0ef;
    color:#66736e;
}


/* =========================================================
   FORM
========================================================= */

.form-grid{
    display:grid;

    grid-template-columns:
        repeat(2,1fr);

    gap:14px;
}

.field{
    display:flex;

    flex-direction:column;

    gap:6px;
}

.field.full{
    grid-column:
        1 / -1;
}

.field label{
    font-size:12px;

    font-weight:700;

    color:#4c5c56;
}

.field input,
.field select,
.field textarea{
    width:100%;

    border:
        1px solid #d5dfdc;

    border-radius:8px;

    padding:
        10px 11px;

    background:#ffffff;

    color:#26352f;

    font:inherit;

    outline:none;

    transition:
        border .18s ease,
        box-shadow .18s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus{
    border-color:var(--green);

    box-shadow:
        0 0 0 3px
        rgba(8,127,69,.08);
}

.field input::placeholder,
.field textarea::placeholder{
    color:#a1ada8;
}

.field textarea{
    min-height:100px;

    resize:vertical;
}


/* =========================================================
   ACTION BUTTON GROUP
========================================================= */

.actions{
    display:flex;

    gap:8px;

    flex-wrap:wrap;

    margin-top:15px;
}


/* =========================================================
   ALERT
========================================================= */

.alert{
    padding:
        12px 14px;

    border-radius:8px;

    margin-bottom:14px;

    font-size:13px;
}

.alert.success{
    background:#e6f7ed;

    color:#13663a;

    border:
        1px solid #c9ead6;
}

.alert.error{
    background:#fdeaea;

    color:#9f2d2d;

    border:
        1px solid #f4cccc;
}


/* =========================================================
   LOGIN PAGE
========================================================= */

.login-body{
    min-height:100vh;

    display:grid;

    place-items:center;

    padding:25px;

    background:
        radial-gradient(
            circle at top left,
            rgba(12,163,90,.09),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #edf5f1,
            #f9fbfa
        );
}


/* =========================================================
   LOGIN CARD
========================================================= */

.login-card{
    width:
        min(430px,92vw);

    background:#ffffff;

    border:
        1px solid #dce5e2;

    border-radius:16px;

    padding:
        30px;

    box-shadow:
        0 18px 50px
        rgba(13,54,42,.10);
}


/* =========================================================
   LOGIN LOGO
========================================================= */

.login-logo{
    text-align:center;

    margin-bottom:24px;
}

.login-logo img{
    width:125px;
    height:125px;

    display:block;

    object-fit:contain;

    margin:
        0 auto 14px;
}

.login-logo h1{
    margin:
        8px 0 4px;

    color:#17211d;

    font-size:17px;

    font-weight:800;

    line-height:1.4;

    letter-spacing:.15px;
}

.login-logo p{
    margin:0;

    color:#087f45;

    font-size:11px;

    font-weight:700;

    line-height:1.5;

    letter-spacing:.3px;
}


/* =========================================================
   LOGIN FORM
========================================================= */

.login-card .field{
    margin:
        12px 0;
}

.login-card .field label{
    color:#44554f;

    font-size:12px;
}

.login-card .field input{
    height:43px;

    padding:
        0 13px;

    border-radius:8px;
}

.login-actions{
    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:10px;

    margin-top:5px;

    font-size:12px;
}

.login-actions label{
    display:flex;

    align-items:center;

    gap:5px;

    color:#687770;

    cursor:pointer;
}

.login-actions label input{
    accent-color:var(--green);
}

.login-actions a{
    color:var(--green);

    font-weight:600;
}

.login-actions a:hover{
    text-decoration:underline;
}

.login-card .btn{
    width:100%;

    min-height:43px;

    margin-top:16px;

    background:
        linear-gradient(
            135deg,
            var(--green),
            var(--green2)
        );
}


/* =========================================================
   LOGIN HINT
========================================================= */

.hint{
    margin:
        15px 0 0;

    padding:10px;

    border-radius:7px;

    background:#f6faf8;

    color:#687770;

    font-size:11px;

    line-height:1.5;

    text-align:center;
}


/* =========================================================
   CHART
========================================================= */

.chart{
    height:250px;

    display:flex;

    align-items:flex-end;

    gap:9px;

    padding-top:20px;
}

.barwrap{
    flex:1;

    text-align:center;

    color:#6a7772;

    font-size:10px;
}

.bar{
    min-height:4px;

    background:
        linear-gradient(
            #0ca35a,
            #087f45
        );

    border-radius:
        5px 5px 0 0;

    transition:
        filter .18s ease;
}

.bar:hover{
    filter:brightness(1.1);
}


/* =========================================================
   RANK
========================================================= */

.rank{
    display:grid;

    gap:10px;
}

.rank div{
    display:flex;

    justify-content:space-between;

    gap:15px;

    border-bottom:
        1px dashed #e1e7e5;

    padding-bottom:8px;
}


/* =========================================================
   PHOTO GRID
========================================================= */

.photo-grid{
    display:flex;

    gap:8px;

    flex-wrap:wrap;
}

.photo-grid img{
    width:110px;
    height:85px;

    object-fit:cover;

    border-radius:8px;

    border:
        1px solid #ddd;
}


/* =========================================================
   FOOTER
========================================================= */

footer{
    text-align:center;

    color:#84918c;

    font-size:11px;

    padding:
        22px;
}


/* =========================================================
   TOOLBAR
========================================================= */

.toolbar{
    display:flex;

    gap:8px;

    flex-wrap:wrap;

    align-items:flex-end;
}

.toolbar .field{
    min-width:150px;
}


/* =========================================================
   PROFILE
========================================================= */

.profile{
    display:grid;

    grid-template-columns:
        120px 1fr;

    gap:18px;
}

.avatar{
    width:110px;
    height:110px;

    border-radius:50%;

    display:grid;

    place-items:center;

    background:#edf2f0;

    color:#50605a;

    font-size:48px;
}


/* =========================================================
   PRINT SHEET
========================================================= */

.print-sheet{
    background:#ffffff;

    max-width:900px;

    margin:
        0 auto;

    border:
        1px solid #ddd;

    padding:25px;
}

.print-head{
    text-align:center;

    border-bottom:
        2px solid #222;

    padding-bottom:10px;

    margin-bottom:14px;
}

.print-head h2,
.print-head h3{
    margin:3px;
}


/* =========================================================
   SIGNATURE
========================================================= */

.signature{
    margin-top:40px;

    display:flex;

    justify-content:flex-end;
}

.signature div{
    text-align:center;

    min-width:230px;
}

.signature .line{
    margin-top:65px;

    border-bottom:
        1px solid #333;
}


/* =========================================================
   NO PRINT
========================================================= */

.no-print{
}


/* =========================================================
   RESPONSIVE TABLET
========================================================= */

@media(max-width:1100px){

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

}


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

@media(max-width:900px){

    .sidebar{
        transform:
            translateX(-100%);

        transition:
            transform .2s ease;

        z-index:200;

        box-shadow:
            10px 0 30px
            rgba(0,0,0,.18);
    }

    .sidebar.show{
        transform:
            translateX(0);
    }

    .main{
        margin-left:0;

        width:100%;
    }

    .mobile-toggle{
        display:flex;
    }

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

    .content{
        padding:14px;
    }

    .topbar{
        padding:
            0 14px;
    }

    .page-title{
        align-items:flex-start;

        flex-direction:column;
    }

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

}


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

@media(max-width:600px){

    .login-body{
        padding:15px;
    }

    .login-card{
        width:100%;

        padding:
            25px 20px;

        border-radius:14px;
    }

    .login-logo img{
        width:105px;
        height:105px;
    }

    .login-logo h1{
        font-size:15px;
    }

    .login-logo p{
        font-size:10px;
    }

    .login-actions{
        font-size:11px;
    }

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

    .toolbar{
        flex-direction:column;

        align-items:stretch;
    }

    .toolbar .field{
        width:100%;

        min-width:0;
    }

    .toolbar .btn{
        width:100%;
    }

    .page-title h1{
        font-size:21px;
    }

}


/* =========================================================
   PRINT
========================================================= */

@media print{

    body{
        background:#ffffff;
    }

    .sidebar,
    .topbar,
    footer,
    .no-print{
        display:none !important;
    }

    .main{
        margin:0;

        width:100%;
    }

    .content{
        padding:0;

        max-width:none;
    }

    .print-sheet{
        border:0;

        max-width:none;

        padding:0;

        box-shadow:none;
    }

}