/* CRM v230: owner-only daily salary / other expenses editing. Desktop and mobile. */
#k171-overlay .k230-expense-edit{
 cursor:pointer!important;appearance:none!important;background:rgba(38,105,166,.065)!important;
 border:1px dashed #8faecc!important;border-radius:8px!important;color:#14518a!important;
 font:inherit!important;font-weight:750!important;padding:5px 8px!important;
 min-width:76px!important;text-align:right!important;touch-action:manipulation!important;
}
#k171-overlay .k230-expense-edit::after{content:' ✎';font-size:.9em}
#k171-overlay .k230-expense-edit:focus-visible{outline:3px solid #4288df!important;outline-offset:2px}
#k171-overlay details.k171-panel:has(>summary:first-child){transition:none}
#k230-editor[hidden]{display:none!important}
#k230-editor{position:fixed!important;inset:0!important;z-index:2147483600!important;
 background:rgba(11,32,53,.65)!important;display:flex!important;align-items:center!important;
 justify-content:center!important;padding:16px!important;box-sizing:border-box!important;}
#k230-editor .k230-panel{max-height:calc(100dvh - 38px);overflow-y:auto;box-sizing:border-box;
 width:min(100%,500px);background:#fff;color:#183348;border-radius:15px;padding:20px;
 box-shadow:0 16px 48px #0003;display:flex;flex-direction:column;gap:14px;}
#k230-editor .k230-top{display:flex;justify-content:space-between;align-items:center;gap:8px;
 font-size:17px;line-height:1.4;color:#16395c}
#k230-editor .k230-top button{background:#eaf2f9;border:0;border-radius:9px;padding:8px 12px;font-size:19px;cursor:pointer}
#k230-editor label{display:flex;flex-direction:column;gap:7px;font-weight:700;font-size:13px;}
#k230-editor input{width:100%;box-sizing:border-box;padding:12px;border:1px solid #b9cad7;border-radius:9px;
 font-size:16px;color:#173954;background:#fff}
#k230-feedback{min-height:17px;font-size:12px;color:#4c6780;margin:0}
#k230-editor .k230-actions{display:flex;flex-wrap:wrap;gap:8px}
#k230-editor .k230-actions button{border:1px solid #c6d6e5;border-radius:9px;cursor:pointer;padding:10px 12px;
 font-weight:700;background:#f7fafc;color:#183c5d;flex:1 1 auto}
#k230-save{background:#2174bd!important;color:white!important}
#k230-zero{background:#fff0f0!important;color:#aa3030!important}
#k230-editor button:disabled{opacity:.45;cursor:default}
#k230-history{border-top:1px solid #dfebf4;padding-top:12px;font-size:12px;color:#536c7e}
#k230-history summary{cursor:pointer;font-weight:700;color:#2b537d}
#k230-history-content p{padding:6px 0;border-bottom:1px solid #e8eff3;margin:0}
@media(max-width:760px){
 #k171-overlay .k230-expense-edit{min-width:90px!important;min-height:40px!important;font-size:14px!important;}
 #k230-editor{align-items:flex-end!important;padding:0 0 max(8px,env(safe-area-inset-bottom))!important;}
 #k230-editor .k230-panel{width:100%;max-height:90dvh;border-radius:20px 20px 0 0;padding:18px 16px 24px;}
}

/* v231: discreet inline expense cells, like the clickable warehouse figures. */
#k171-overlay .k230-expense-edit{
  display:inline-block!important;cursor:pointer!important;appearance:none!important;
  background:transparent!important;border:0!important;border-radius:0!important;
  color:inherit!important;font:inherit!important;font-weight:inherit!important;
  padding:3px 0!important;margin:0!important;min-width:0!important;
  min-height:0!important;text-align:right!important;box-shadow:none!important;
  text-decoration:none!important;touch-action:manipulation!important;
}
#k171-overlay .k230-expense-edit::after{content:none!important}
#k171-overlay .k230-expense-edit:hover{color:#1b5794!important;text-decoration:underline dotted!important;text-underline-offset:3px!important}
#k171-overlay .k230-expense-edit:focus-visible{outline:2px solid #3283d7!important;outline-offset:3px!important;border-radius:3px!important}
#k171-overlay .k231-add-expense{padding:7px 4px 10px;font-size:12px;color:#345a76}
#k171-overlay .k231-add-trigger{background:none;border:0;padding:5px 2px;color:#2d638d;text-decoration:underline;cursor:pointer;font:inherit}
#k171-overlay .k231-add-controls[hidden]{display:none!important}
#k171-overlay .k231-add-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 0}
#k171-overlay .k231-add-controls input,#k171-overlay .k231-add-controls select{font:inherit;padding:7px 8px;border:1px solid #c4d5e4;border-radius:6px;background:#fff;color:#1c405f;max-width:100%}
#k171-overlay .k231-add-controls button{font:inherit;font-weight:650;background:#eef4fc;border:1px solid #bdd2e8;border-radius:6px;color:#1a5588;padding:8px;cursor:pointer}
@media(max-width:760px){
 #k171-overlay .k230-expense-edit{min-width:0!important;min-height:30px!important;font:inherit!important;padding:4px 0!important;background:transparent!important;border:0!important;}
 #k171-overlay .k231-add-controls{align-items:stretch;flex-direction:column}
}
