/* =========================================================
   COMPACT CLICKUP + GOJEK STYLE
   Replace file: assets/app.css
   Fokus:
   - input kecil, radius agak kotak
   - tombol kecil minimalis
   - card/table padat
   - sidebar clean
   - aksen hijau ala GOJEK
========================================================= */

:root{
    --bg:#f7f8fa;
    --surface:#ffffff;
    --surface-2:#f9fafb;
    --border:#e5e7eb;
    --border-2:#d1d5db;
    --text:#111827;
    --muted:#6b7280;
    --muted-2:#9ca3af;
    --primary:#00aa13;
    --primary-dark:#00880f;
    --primary-soft:#e8f8ea;
    --blue:#2563eb;
    --red:#ef4444;
    --orange:#f97316;
    --shadow:0 2px 8px rgba(17,24,39,.05);
    --shadow-hover:0 6px 18px rgba(17,24,39,.08);
    --radius:10px;
    --radius-sm:7px;
}

*{
    box-sizing:border-box;
}

html{
    -webkit-text-size-adjust:100%;
}

body{
    margin:0;
    font-family:Inter,Arial,sans-serif;
    background:var(--bg);
    color:var(--text);
    font-size:13px;
    line-height:1.45;
}

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

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

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

.sidebar{
    background:#fff;
    border-right:1px solid var(--border);
    min-height:100vh;
    position:sticky;
    top:0;
}

.sidebar-inner{
    height:100vh;
    display:flex;
    flex-direction:column;
    padding:14px 11px;
}

.brand-minimal{
    display:block;
    padding:3px 7px 14px;
    border-bottom:1px solid #eef0f3;
    margin-bottom:12px;
}

.brand-title{
    font-size:15px;
    line-height:1.2;
    font-weight:900;
    letter-spacing:-.3px;
    color:var(--text);
}

.brand-caption{
    margin-top:3px;
    font-size:10.5px;
    color:var(--muted-2);
    font-weight:700;
}

.menu-minimal{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.menu-minimal a{
    position:relative;
    display:flex;
    align-items:center;
    min-height:32px;
    padding:7px 9px;
    border-radius:8px;
    color:#4b5563;
    font-size:12.5px;
    font-weight:800;
    transition:.15s ease;
}

.menu-minimal a:hover{
    background:#f3f4f6;
    color:var(--text);
}

.menu-minimal a.active{
    background:var(--primary-soft);
    color:var(--primary-dark);
}

.menu-minimal a.active::before{
    content:"";
    position:absolute;
    left:0;
    top:8px;
    bottom:8px;
    width:3px;
    border-radius:999px;
    background:var(--primary);
}

.sidebar-section{
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid #eef0f3;
}

.sidebar-section-title{
    padding:0 7px 6px;
    font-size:10px;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:var(--muted-2);
    font-weight:900;
}

.sidebar-action{
    display:block;
    padding:7px 9px;
    border-radius:8px;
    font-size:12px;
    font-weight:800;
    color:#4b5563;
}

.sidebar-action:hover{
    background:#f3f4f6;
    color:var(--primary-dark);
}

.account-minimal{
    margin-top:auto;
    padding:10px;
    border:1px solid var(--border);
    border-radius:11px;
    background:#fafafa;
}

.account-name{
    font-size:12.5px;
    font-weight:900;
    color:var(--text);
    line-height:1.3;
}

.account-role{
    margin-top:3px;
    font-size:11px;
    font-weight:800;
    color:var(--primary-dark);
}

.account-company{
    margin-top:3px;
    font-size:11px;
    color:var(--muted);
    line-height:1.35;
}

.account-logout{
    display:inline-flex;
    margin-top:8px;
    font-size:11px;
    font-weight:900;
    color:var(--red);
}

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

.content{
    padding:18px;
    min-width:0;
}

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

.page-title{
    margin:0;
    font-size:22px;
    letter-spacing:-.5px;
    font-weight:950;
    line-height:1.15;
}

.page-subtitle{
    color:var(--muted);
    margin-top:4px;
    font-size:12.5px;
    line-height:1.45;
}

.actions{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    align-items:center;
}

/* =========================================================
   BUTTONS - SMALL CLICKUP STYLE
========================================================= */

.btn{
    border:1px solid transparent;
    border-radius:8px;
    padding:7px 10px;
    font-weight:850;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    font-size:12px;
    line-height:1.2;
    min-height:30px;
    transition:.15s ease;
    box-shadow:none;
    white-space:nowrap;
}

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

.btn-primary{
    background:var(--primary);
    border-color:var(--primary);
    color:#fff;
    box-shadow:0 3px 8px rgba(0,170,19,.18);
}

.btn-primary:hover{
    background:var(--primary-dark);
    border-color:var(--primary-dark);
}

.btn-danger{
    background:#fff;
    border-color:#fecaca;
    color:#dc2626;
}

.btn-danger:hover{
    background:#fef2f2;
}

.btn-light{
    background:#fff;
    border-color:var(--border);
    color:#374151;
}

.btn-light:hover{
    background:#f9fafb;
    border-color:var(--border-2);
}

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

.panel{
    background:#fff;
    border:1px solid var(--border);
    border-radius:12px;
    padding:13px;
    box-shadow:var(--shadow);
    margin-bottom:12px;
}

.panel h2{
    font-size:15px;
    margin:0 0 10px;
    letter-spacing:-.2px;
}

.grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

.grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.grid-3{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

.grid-4{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px;
}

.card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:12px;
    padding:12px;
    box-shadow:var(--shadow);
    display:flex;
    flex-direction:column;
    gap:8px;
}

.card:hover{
    box-shadow:var(--shadow-hover);
}

.card-head{
    display:flex;
    justify-content:space-between;
    gap:8px;
    align-items:center;
}

.code{
    font-size:10.5px;
    color:var(--muted);
    font-weight:900;
    margin-bottom:3px;
}

.name{
    font-size:15px;
    font-weight:950;
    letter-spacing:-.2px;
    line-height:1.25;
}

.detail{
    font-size:12px;
    color:var(--muted);
    line-height:1.45;
    min-height:auto;
}

/* =========================================================
   BADGES / STATUS
========================================================= */

.badges{
    display:flex;
    gap:5px;
    flex-wrap:wrap;
}

.badge{
    display:inline-flex;
    align-items:center;
    padding:4px 7px;
    border-radius:7px;
    font-size:10.5px;
    font-weight:900;
    line-height:1.2;
}

.gray{background:#f3f4f6;color:#4b5563}
.blue{background:#eff6ff;color:#1d4ed8}
.cyan{background:#ecfeff;color:#0e7490}
.orange{background:#fff7ed;color:#c2410c}
.green{background:#ecfdf5;color:#047857}
.red{background:#fef2f2;color:#b91c1c}

/* =========================================================
   STATS / METRICS
========================================================= */

.stat-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:12px;
    padding:13px;
    box-shadow:var(--shadow);
}

.stat-label{
    color:var(--muted);
    font-weight:800;
    font-size:11.5px;
    margin-bottom:5px;
}

.stat-value{
    font-size:24px;
    font-weight:950;
    letter-spacing:-.8px;
}

.stat-note{
    margin-top:4px;
    color:var(--muted-2);
    font-size:11px;
}

.metrics{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:6px;
}

.metric{
    background:#f9fafb;
    border:1px solid var(--border);
    border-radius:9px;
    padding:8px;
    text-align:center;
}

.metric b{
    display:block;
    font-size:15px;
    line-height:1.1;
}

.metric span{
    font-size:10px;
    color:var(--muted);
    font-weight:800;
}

/* =========================================================
   PROGRESS
========================================================= */

.progress{
    height:6px;
    background:#e5e7eb;
    border-radius:999px;
    overflow:hidden;
}

.progress>div{
    height:100%;
    background:var(--primary);
    border-radius:999px;
}

.small{
    font-size:11px;
    color:var(--muted);
    line-height:1.4;
}

.empty{
    padding:22px;
    text-align:center;
    background:#fff;
    border:1px dashed #cbd5e1;
    border-radius:12px;
    color:var(--muted);
    font-size:12px;
}

/* =========================================================
   FORM - SMALL INPUT GOJEK/CLICKUP STYLE
========================================================= */

.filter{
    display:grid;
    gap:8px;
}

.filter.cols-5{
    grid-template-columns:1fr 155px 155px 155px auto;
}

.filter.cols-6{
    grid-template-columns:1fr 145px 155px 155px 130px auto;
}

.form{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.field{
    display:flex;
    flex-direction:column;
    gap:5px;
}

label{
    font-size:11.5px;
    font-weight:900;
    color:#374151;
}

input,
select,
textarea{
    width:100%;
    font-size:12.5px;
    padding:8px 9px;
    border-radius:7px;
    border:1px solid #d1d5db;
    outline:none;
    background:#fff;
    color:var(--text);
    min-height:32px;
    transition:.15s ease;
}

select{
    cursor:pointer;
}

textarea{
    min-height:84px;
    resize:vertical;
    line-height:1.45;
}

input::placeholder,
textarea::placeholder{
    color:#9ca3af;
}

input:focus,
select:focus,
textarea:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(0,170,19,.10);
}

/* smaller native check/radio */
input[type="checkbox"],
input[type="radio"]{
    width:auto;
    min-height:auto;
    padding:0;
    accent-color:var(--primary);
}

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

.alert{
    padding:9px 10px;
    border-radius:9px;
    margin-bottom:10px;
    font-size:12.5px;
    font-weight:700;
}

.alert.err{
    background:#fef2f2;
    color:#b91c1c;
    border:1px solid #fecaca;
}

.alert.ok{
    background:#ecfdf5;
    color:#047857;
    border:1px solid #bbf7d0;
}

/* =========================================================
   TABLE - DENSE CLICKUP STYLE
========================================================= */

.table{
    width:100%;
    border-collapse:collapse;
    border-spacing:0;
    background:#fff;
    border:1px solid var(--border);
    border-radius:10px;
    overflow:hidden;
}

.table th{
    font-size:10.5px;
    color:var(--muted);
    text-align:left;
    text-transform:uppercase;
    letter-spacing:.05em;
    padding:8px 10px;
    background:#f9fafb;
    border-bottom:1px solid var(--border);
}

.table td{
    background:#fff;
    border-bottom:1px solid #eef0f3;
    padding:8px 10px;
    font-size:12px;
    vertical-align:top;
}

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

.table td:first-child,
.table td:last-child{
    border-left:0;
    border-right:0;
    border-radius:0;
}

.table tr:hover td{
    background:#fcfcfd;
}

/* =========================================================
   MEMBERS / CHECK CARDS
========================================================= */

.member-list{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}

.member{
    background:#f9fafb;
    border:1px solid var(--border);
    border-radius:999px;
    padding:5px 8px;
    font-weight:850;
    font-size:11.5px;
}

.check-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:7px;
}

.check-card{
    border:1px solid var(--border);
    background:#f9fafb;
    border-radius:9px;
    padding:8px;
    display:flex;
    gap:7px;
    align-items:flex-start;
    font-size:12px;
}

.check-card input{
    width:auto;
    margin-top:2px;
}

/* =========================================================
   DOCUMENTS / COMMENTS
========================================================= */

.doc{
    display:flex;
    justify-content:space-between;
    gap:8px;
    border:1px solid var(--border);
    background:#f9fafb;
    border-radius:10px;
    padding:9px;
    margin-bottom:7px;
}

.doc-title{
    font-weight:900;
    font-size:12.5px;
}

.doc-meta{
    font-size:11px;
    color:var(--muted);
    margin-top:2px;
}

.comment{
    border:1px solid var(--border);
    background:#fff;
    border-radius:11px;
    padding:10px;
    margin-bottom:8px;
}

.comment.reply{
    margin-left:18px;
    background:#f9fafb;
}

.comment-head{
    font-weight:950;
    font-size:12.5px;
}

.comment-meta{
    font-size:10.5px;
    color:var(--muted);
    margin-top:1px;
}

.comment-text{
    line-height:1.5;
    color:#374151;
    margin-top:7px;
    font-size:12.5px;
}

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

.footer-actions{
    display:flex;
    justify-content:flex-end;
    gap:7px;
    flex-wrap:wrap;
    border-top:1px solid var(--border);
    padding-top:11px;
}

/* =========================================================
   KANBAN - COMPACT
========================================================= */

.kanban{
    display:grid;
    grid-template-columns:repeat(5,minmax(230px,1fr));
    gap:10px;
    align-items:start;
    overflow-x:auto;
    padding-bottom:6px;
}

.kanban-col{
    background:#f9fafb;
    border:1px solid var(--border);
    border-radius:13px;
    padding:10px;
    min-height:68vh;
}

.kanban-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:8px;
    padding:0 2px;
}

.kanban-title{
    font-size:12.5px;
    font-weight:950;
    color:#374151;
}

.kanban-count{
    background:#fff;
    border:1px solid var(--border);
    border-radius:999px;
    padding:3px 7px;
    font-size:10.5px;
    font-weight:900;
    color:var(--muted);
}

.dropzone{
    min-height:60vh;
}

.task-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:10px;
    padding:10px;
    margin-bottom:8px;
    box-shadow:var(--shadow);
    cursor:pointer;
}

.task-card:hover{
    border-color:#86efac;
    box-shadow:0 6px 18px rgba(0,170,19,.10);
}

.task-title{
    font-size:12.5px;
    font-weight:950;
    line-height:1.3;
    margin-bottom:5px;
}

.task-meta{
    font-size:11px;
    color:var(--muted);
    line-height:1.35;
    margin-bottom:7px;
}

.toast{
    position:fixed;
    right:14px;
    bottom:14px;
    background:#111827;
    color:#fff;
    border-radius:10px;
    padding:9px 11px;
    font-size:12px;
    font-weight:900;
    box-shadow:0 16px 40px rgba(17,24,39,.22);
    display:none;
    z-index:99;
}

/* =========================================================
   TREE / POPUP SUPPORT FROM PROJECT DETAIL
========================================================= */

.tree-table{
    font-size:12px;
}

.tree-table th{
    padding:8px 10px !important;
}

.tree-table td{
    padding:8px 10px !important;
}

.tree-actions{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:5px;
    flex-wrap:wrap;
}

.tree-actions .btn,
.comment-count-btn{
    min-height:27px;
    padding:5px 8px;
    border-radius:7px;
    font-size:11px;
}

.assign-chip,
.member-bubble{
    border-radius:999px;
    padding:4px 7px;
    font-size:10.5px;
    font-weight:900;
}

.doc-pill{
    border-radius:7px;
    padding:4px 6px;
    font-size:11px;
    max-width:150px;
}

/* modal compact */
.modal-card{
    border-radius:12px !important;
}

.modal-head{
    margin-bottom:8px !important;
}

.modal-head h2{
    font-size:15px !important;
}

.modal-close{
    width:28px !important;
    height:28px !important;
    border-radius:7px !important;
}

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

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

    .sidebar{
        position:relative;
        min-height:auto;
        height:auto;
        border-right:0;
        border-bottom:1px solid var(--border);
    }

    .sidebar-inner{
        height:auto;
        padding:12px;
    }

    .menu-minimal{
        display:grid;
        grid-template-columns:repeat(3,1fr);
    }

    .account-minimal{
        margin-top:12px;
    }

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

    .filter.cols-5,
    .filter.cols-6{
        grid-template-columns:1fr 1fr;
    }

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

@media(max-width:640px){
    .content{
        padding:12px;
    }

    .topbar{
        flex-direction:column;
        margin-bottom:10px;
    }

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

    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .filter.cols-5,
    .filter.cols-6,
    .check-grid{
        grid-template-columns:1fr;
    }

    .page-title{
        font-size:19px;
    }

    .table{
        display:block;
        overflow-x:auto;
    }

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

    .btn{
        min-height:29px;
        padding:7px 9px;
        font-size:11.5px;
    }
}
