#mti2-app{font-family:Arial,sans-serif;max-width:100%;font-size:14px;color:#26313a;background:#fff;border:1px solid #dfe5e9;border-radius:12px;overflow:hidden;box-shadow:0 3px 14px rgba(31,45,61,.06);box-sizing:border-box}
#mti2-app *{box-sizing:border-box}
.mti2-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;background:#f0f3e6;padding:18px 18px 14px}
.mti2-head h2{margin:0 0 6px;font-size:25px;line-height:1.2}
.mti2-subtitle{font-weight:700}
.mti2-controls{display:flex;gap:12px}
.mti2-controls label{font-size:12px;font-weight:700}
.mti2-controls select{display:block;margin-top:4px;padding:8px 28px 8px 9px;border:1px solid #cbd2d8;border-radius:6px;background:#fff}
.mti2-toolbar{padding:12px 16px;border:1px solid #e0e5e8;border-top:0;display:flex;gap:12px;align-items:center;background:#fff}
.mti2-toolbar button,.mti2-add-row button,#mti2-import-btn,.mti2-modal-actions button{border:0;border-radius:7px;padding:9px 13px;background:#233c5c;color:#fff;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.mti2-toolbar button:hover,.mti2-add-row button:hover,#mti2-import-btn:hover,.mti2-modal-actions button:hover{filter:brightness(.96)}
#mti2-status{font-size:12px;color:#667}
.mti2-legend{display:flex;flex-wrap:wrap;gap:8px 14px;padding:11px 16px;border:1px solid #e0e5e8;border-top:0;background:#fbfcfa}
.mti2-legend span{display:flex;align-items:center;gap:5px;white-space:nowrap}
.mti2-chip{display:inline-flex;align-items:center;justify-content:center;min-width:23px;height:23px;padding:0 4px;border-radius:4px;font-size:12px}
.mti2-chip.i{background:#d9b3c5}.mti2-chip.fn{background:#c7b7e8}

.mti2-table-wrap{height:520px;overflow:auto;border:1px solid #d8dde1;border-top:0;position:relative;background:#fff;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}
.mti2-table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:auto;min-width:0}
.mti2-table col.mti2-col-name{width:190px}
.mti2-table col.mti2-col-day{width:46px}
.mti2-table col.mti2-col-total,.mti2-table col.mti2-col-ot{width:100px}
.mti2-table th,.mti2-table td{border-right:1px solid #fff;border-bottom:1px solid #fff;text-align:center;padding:0!important;box-sizing:border-box;overflow:hidden}

.mti2-table thead th{position:sticky;top:0;z-index:20;height:76px;background:#f0f3e6;color:#4d565d;font-weight:700;box-shadow:0 1px 0 rgba(0,0,0,.08)}
.mti2-table thead th span{display:block;font-size:11px;height:34px;padding-top:9px;color:#5f6870;line-height:1}
.mti2-table thead th b{display:block;background:#632517;color:#fff;height:42px;line-height:42px;font-size:13px}

.mti2-name-head,.mti2-name{position:sticky;left:0;z-index:25;text-align:left!important;background:#f0f3e6!important;padding:8px 10px!important}
.mti2-table thead .mti2-name-head{z-index:40}
.mti2-name strong{display:block;font-size:13px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
.mti2-name small{display:none!important}

.mti2-total-head,.mti2-ot-head,.mti2-total{position:sticky;z-index:30;background:#f0f3e6!important;font-weight:700}
.mti2-total-head{right:100px;line-height:1.2;font-size:12px}
.mti2-ot-head{right:0;line-height:1.15}
.mti2-table tbody td:nth-last-child(2){position:sticky;right:100px;z-index:15;background:#f0f3e6!important}
.mti2-table tbody td:nth-last-child(1){position:sticky;right:0;z-index:15;background:#f0f3e6!important}

.mti2-table tbody td{height:60px;background:#fff}
.mti2-table tbody tr:nth-child(even) td:not(:nth-last-child(-n+2)){background:#f7f8f8}
.mti2-base-row td,.mti2-base-row .mti2-name{background:#e9efd9!important}
.mti2-base-row{font-weight:600}
.mti2-base-row .mti2-day{box-shadow:inset 0 0 0 1px rgba(70,90,50,.06)}
.mti2-table tbody tr:hover td:not(:nth-last-child(-n+2)){background:#f1f5f8}
.mti2-table tbody tr:hover .mti2-name{background:#eef3e5!important}
.mti2-total{font-size:14px;text-align:center!important;cursor:default}

.mti2-day{display:inline-flex;align-items:center;justify-content:center;width:38px;height:40px;border:0;border-radius:5px;font-weight:700;cursor:pointer;font-size:13px;position:relative;transition:transform .08s ease,filter .08s ease}
.mti2-day:hover{filter:brightness(.96);transform:scale(1.04)}
.mti2-day:focus-visible{outline:3px solid #233c5c;outline-offset:1px}
.mti2-day small{display:block;font-size:7px;line-height:8px;position:absolute;bottom:2px}
.mti2-d{background:#d8e1f1}.mti2-p{background:#11a8dc;color:#fff}.mti2-s{background:#e99a91}.mti2-r{background:#e5c19f}.mti2-k{background:#b8d29c}.mti2-f{background:#f6c94f}.mti2-t{background:#e34a3b;color:#fff}.mti2-i{background:#d9b3c5}.mti2-fn{background:#c7b7e8}

.mti2-hscroll{display:none!important}
.mti2-help{font-size:12px;color:#69747c;padding:10px 2px}

.mti2-modal{position:fixed;inset:0;background:rgba(0,0,0,.58);z-index:999999;display:flex;align-items:center;justify-content:center;padding:15px}
.mti2-modal[hidden]{display:none}
.mti2-modal-box{background:#fff;border-radius:12px;max-width:650px;width:100%;max-height:90vh;overflow:auto;padding:16px;box-shadow:0 15px 45px rgba(0,0,0,.3)}
.mti2-modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.mti2-modal-head h3{margin:0}
.mti2-modal-head button{border:0;background:none;font-size:25px;cursor:pointer}
.mti2-code-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.mti2-choice{display:flex;align-items:center;gap:12px;border:1px solid #d5dce1;border-radius:8px;padding:12px;text-align:left;background:#fff;cursor:pointer}
.mti2-choice b{width:27px;height:27px;border-radius:4px;display:flex;align-items:center;justify-content:center}
.mti2-choice.selected{outline:3px solid #233c5c}
.mti2-choice.mti2-inherit{grid-column:1/-1;background:#f0f3e6}
.mti2-choice.mti2-d{background:#d8e1f1;color:#111}
.mti2-choice.mti2-p{background:#11a8dc;color:#fff}
.mti2-choice.mti2-s{background:#e99a91;color:#111}
.mti2-choice.mti2-r{background:#e5c19f;color:#111}
.mti2-choice.mti2-k{background:#b8d29c;color:#111}
.mti2-choice.mti2-f{background:#f6c94f;color:#111}
.mti2-choice.mti2-t{background:#e34a3b;color:#fff}.mti2-choice.mti2-i{background:#d9b3c5;color:#111}.mti2-choice.mti2-fn{background:#c7b7e8;color:#111}.mti2-choice.mti2-p{background:#11a8dc!important;color:#fff!important}.mti2-choice.mti2-t{background:#e34a3b!important;color:#fff!important}
.mti2-ot-wrap{margin-top:15px}
.mti2-ot-wrap input{margin-left:10px;padding:8px;width:100px}
.mti2-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
.mti2-modal-actions .primary{background:#233c5c}
.mti2-add-row{display:flex;gap:8px}
.mti2-add-row input{flex:1;padding:9px;border:1px solid #ccd4da;border-radius:5px}
#mti2-import{width:100%;min-height:130px;margin-top:12px;padding:10px;border:1px solid #ccd4da;border-radius:5px;box-sizing:border-box}
#mti2-import-btn{margin-top:8px}
.mti2-employee-list{margin-top:15px;border-top:1px solid #e0e5e8}
.mti2-emp-item{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #e7ebee}
.mti2-emp-item.inactive{opacity:.5}
.mti2-toggle{border:1px solid #ccd4da;background:#fff;border-radius:4px;padding:6px 8px;cursor:pointer}

@media(max-width:700px){
 .mti2-head{align-items:flex-start;flex-direction:column}
 .mti2-controls{width:100%}
 .mti2-controls label{flex:1}
 .mti2-controls select{width:100%}
 .mti2-table-wrap{height:60vh}
 .mti2-total-head{right:100px}
 .mti2-table tbody td:nth-last-child(2){right:100px}
}
.mti2-recurring{display:flex!important;align-items:center;gap:7px;margin-top:12px;font-size:13px;font-weight:600;cursor:pointer}.mti2-recurring input{margin:0}.mti2-deadline{margin-top:10px;padding:10px 12px;background:#f4f6ef;border:1px solid #dce3d3;border-radius:7px}.mti2-deadline label{display:flex;align-items:center;gap:10px;font-weight:600}.mti2-deadline input{padding:7px;border:1px solid #cbd2d8;border-radius:5px;background:#fff}.mti2-deadline small{display:block;margin-top:6px;color:#667;font-size:11px}
