body{font-family:Arial,sans-serif;margin:0;background:#f5f7fa;color:#182230}.wrap{max-width:1500px;margin:auto;padding:16px}.narrow{max-width:460px;margin-top:8vh}.top,.card,.panel{background:#fff;border:1px solid #e4e7ec;border-radius:12px}.top{padding:14px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.card,.panel{padding:14px;margin-top:12px}.grid,.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.twocol{display:grid;grid-template-columns:1fr 1fr;gap:12px}.toolbar,.bar{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}input,select,button,.button,textarea{box-sizing:border-box;padding:8px 10px;border:1px solid #d0d5dd;border-radius:8px;background:#fff}.narrow input{width:100%;margin:6px 0}.primary,.button,button{font-weight:700;cursor:pointer}.badge{padding:5px 9px;border-radius:999px;font-weight:700;font-size:12px}.ok{background:#e8f7ee;color:#18794e}.bad{background:#fff1f0;color:#b42318}.warn{background:#fff6e5;color:#a15c00}.role{background:#eef4ff;color:#3538cd}.muted{color:#667085}.error{color:#b42318}.inline{display:inline}.filterhelp{font-size:12px;color:#667085;margin-bottom:8px}.tablebox{overflow:auto;max-height:66vh}table{border-collapse:collapse;width:100%;min-width:1000px;font-size:12px}th,td{border-bottom:1px solid #eaecf0;padding:7px;text-align:left;white-space:nowrap}th{background:#f9fafb;position:sticky;top:0;cursor:pointer}.filters th{top:30px}.filters input{width:100%;min-width:100px;padding:5px;font-size:11px}.aginggrid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:8px}.aginggrid>div{background:#f9fafb;border-radius:8px;padding:8px}a{color:#175cd3;text-decoration:none}@media(max-width:900px){.grid,.stats,.twocol,.aginggrid{grid-template-columns:1fr 1fr}}

/* Management UI */
#menu button.active{
    background:#1f4e79;
    color:#fff;
    border-color:#1f4e79;
    font-weight:700;
}

.drillrow{
    cursor:pointer;
}

.drillrow:hover{
    background:#eef5fb;
}

.agecurrent{
    background:#eef8f0;
}

.age130{
    background:#fff8db;
}

.age3060{
    background:#fff1d6;
}

.age6090{
    background:#ffe3cc;
}

.age90{
    background:#ffe0e0;
    font-weight:700;
}

#backPartyBtn{
    font-weight:700;
}

/* Excel-style column filter */
.thwrap{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:5px;
    white-space:nowrap;
}

.thtitle{
    cursor:pointer;
    flex:1;
}

.filterarrow{
    border:0;
    background:transparent;
    padding:2px 4px;
    font-size:10px;
    cursor:pointer;
    color:#667085;
}

.filterarrow:hover{
    background:#e8eef5;
    border-radius:4px;
}

.filterarrow.filtered{
    color:#1f4e79;
    font-weight:700;
}

.colmenu{
    position:absolute;
    z-index:9999;
    width:290px;
    max-width:calc(100vw - 20px);
    background:#fff;
    border:1px solid #cfd6df;
    border-radius:8px;
    box-shadow:0 8px 25px rgba(0,0,0,.18);
    padding:8px;
    font-size:13px;
}

.colmenu-sort{
    padding:7px 8px;
    cursor:pointer;
    border-radius:5px;
}

.colmenu-sort:hover{
    background:#eef5fb;
}

.colmenu-sep{
    border-top:1px solid #e5e7eb;
    margin:6px 0;
}

.colmenu-search{
    width:100%;
    box-sizing:border-box;
    padding:7px;
    border:1px solid #cfd6df;
    border-radius:5px;
    margin-bottom:6px;
}

.colmenu-actions{
    display:flex;
    gap:6px;
    margin-bottom:6px;
}

.colmenu-actions button,
.colmenu-footer button{
    padding:5px 9px;
    cursor:pointer;
}

.colmenu-values{
    max-height:260px;
    overflow:auto;
    border:1px solid #e5e7eb;
    border-radius:5px;
    padding:4px;
}

.colmenu-item{
    display:flex;
    align-items:flex-start;
    gap:7px;
    padding:5px;
    cursor:pointer;
}

.colmenu-item:hover{
    background:#f3f6fa;
}

.colmenu-item input{
    margin-top:2px;
}

.colmenu-footer{
    display:flex;
    justify-content:flex-end;
    gap:6px;
    margin-top:8px;
}

.colmenu-note{
    padding:6px;
    color:#667085;
    font-size:11px;
}

.colmenu-empty{
    padding:10px;
    color:#667085;
}

