.tm-app{--accent:#0f6cbd;--accent-weak:#ebf3fc;--border:#e0e0e0;--line:#ededed;--muted:#616161;--text:#242424;--bg:#fff;--bg2:#fafafa;--wkend:#ece8e1;--today:#0f6cbd;--danger:#c50f1f;--ok:#107c10;
  position:relative;font-family:"Segoe UI","Segoe UI Web (West European)",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",sans-serif;font-size:14px;line-height:1.4;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:8px;overflow:hidden}
.tm-app *{box-sizing:border-box}
.tm-app button{font:inherit;color:inherit}
.tm-top{display:flex;align-items:center;gap:8px 20px;flex-wrap:wrap;padding:10px 16px;border-bottom:1px solid var(--border);background:var(--bg)}
.tm-title{font-size:18px;font-weight:600;letter-spacing:-.01em}
.tm-tabs{display:flex;gap:2px;flex-wrap:wrap}
.tm-tab{background:none;border:0;padding:7px 12px;border-radius:6px;cursor:pointer;color:var(--muted)}
.tm-tab:hover{background:var(--bg2);color:var(--text)}
.tm-tab.on{color:var(--accent);background:var(--accent-weak);font-weight:600}
.tm-status{margin-left:auto;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}
.tm-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--ok)}
.tm-dot.busy{background:#f7a400;animation:tm-pulse 1s infinite alternate}
@keyframes tm-pulse{to{opacity:.3}}
.tm-banner{padding:8px 16px;background:#fff8e1;border-bottom:1px solid #f3e2a9;font-size:13px}
.tm-bar{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center;padding:10px 16px}
.tm-bar.tm-nopad{padding:6px 0}
.tm-spacer{flex:1}
.tm-seg{display:inline-flex;border:1px solid var(--border);border-radius:6px;overflow:hidden;flex-wrap:wrap}
.tm-seg button{border:0;border-right:1px solid var(--border);background:var(--bg);padding:6px 11px;cursor:pointer}
.tm-seg button:last-child{border-right:0}
.tm-seg button:hover{background:var(--bg2)}
.tm-seg button.on{background:var(--accent);color:#fff}
.tm-nav{display:inline-flex;gap:4px;align-items:center}
.tm-btn{border:1px solid var(--border);background:var(--bg);border-radius:6px;padding:6px 11px;cursor:pointer;white-space:nowrap}
.tm-btn:hover{background:var(--bg2);border-color:#c7c7c7}
.tm-btn:disabled{opacity:.5;cursor:default}
.tm-btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.tm-btn.primary:hover{background:#115ea3}
.tm-ghost{border-color:transparent}
.tm-link{background:none;border:0;padding:0;color:var(--accent);cursor:pointer;text-align:left}
.tm-link:hover{text-decoration:underline}
.tm-input,.tm-select{border:1px solid #d1d1d1;border-radius:6px;padding:6px 8px;font:inherit;background:#fff;color:var(--text);min-width:0}
.tm-input:focus,.tm-select:focus,.tm-btn:focus-visible,.tm-gridwrap:focus-visible{outline:2px solid var(--accent);outline-offset:-1px}
.tm-num{width:76px;text-align:right}
.tm-bar input[type=search]{width:170px}
.tm-short{width:70px}
.tm-wide{width:260px}
.tm-area{width:100%;font-family:Consolas,monospace;font-size:12px}
.tm-period{display:flex;flex-direction:column;line-height:1.2;min-width:170px}
.tm-period small{color:var(--muted);font-size:12px}
.tm-palette{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:0 16px 10px}
.tm-hint{color:var(--muted);font-size:12px}
.tm-chip{border:1px solid rgba(0,0,0,.1);border-radius:999px;padding:2px 10px;font-size:12px;cursor:pointer;background:#fff;font-weight:600}
.tm-chip:hover{filter:brightness(.95)}
.tm-chip.tm-clear{background:#fff;font-weight:400}
.tm-chip.tm-we-key{background:var(--wkend);cursor:default;font-weight:400}
.tm-gridwrap{overflow:auto;max-height:calc(100vh - 240px);min-height:220px;border-top:1px solid var(--border);position:relative;outline:none}
.tm-loading,.tm-error,.tm-empty{padding:24px 16px;color:var(--muted)}
.tm-error{color:var(--danger)}
table.tm-grid{border-collapse:separate;border-spacing:0;font-size:12px}
.tm-grid th,.tm-grid td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:0 2px;height:30px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:0}
.tm-grid thead th{position:sticky;background:var(--bg2);z-index:2;font-weight:600;color:var(--muted);height:22px;font-size:11px}
.tm-grid thead tr.h1 th{top:0}
.tm-grid thead tr.h2 th{top:22px;font-weight:400}
.tm-grid thead tr.h3 th{top:44px;height:34px;line-height:1.15;color:var(--text)}
.tm-grid thead th.mo{text-align:left;padding-left:6px;color:var(--text)}
.tm-grid thead th.wk{text-align:left;padding-left:6px}
.tm-grid thead th.mo,.tm-grid thead th.wk{overflow:visible}
.tm-grid thead th.mo span,.tm-grid thead th.wk span{position:sticky;left:262px;display:inline-block}
.tm-grid thead th.we{background:var(--wkend)}
.tm-grid thead th.td{color:#fff;background:var(--today)}
.tm-grid .nm{position:sticky;left:0;z-index:1;background:var(--bg);text-align:left;padding:0 8px;width:200px;min-width:200px;max-width:200px;font-size:13px}
.tm-grid .lf{position:sticky;left:200px;z-index:1;background:var(--bg);width:56px;min-width:56px;max-width:56px;font-variant-numeric:tabular-nums;font-weight:600;border-right:1px solid var(--border)}
.tm-grid thead .cr{z-index:4;vertical-align:bottom;padding-bottom:6px;color:var(--text);font-size:12px}
.tm-grid thead .lf small{display:block;font-weight:400;color:var(--muted);font-size:10px}
.tm-grid .lf.neg{color:var(--danger)}
.tm-grid .cc{font-size:10px;color:var(--muted);border:1px solid var(--border);border-radius:4px;padding:0 3px;margin-left:4px}
.tm-grid tr.mine .nm{font-weight:600;box-shadow:inset 3px 0 0 var(--accent)}
.tm-grid tr.grp td{background:#f3f3f3;height:28px;border-bottom:1px solid var(--border)}
.tm-grid tr.grp td.nm{background:#f3f3f3;z-index:1}
.tm-grp{background:none;border:0;font-weight:600;cursor:pointer;padding:0;font-size:13px}
.tm-grp span{font-weight:400;color:var(--muted);margin-left:4px}
.tm-grid tr.cnt td{height:20px;font-size:10px;color:#8a0045;border-bottom:1px solid var(--border)}
.tm-grid tr.cnt td.nm{font-size:11px;color:var(--muted);font-weight:400}
.tm-grid td.c{cursor:cell;position:relative;font-weight:600;user-select:none}
.tm-grid td.c.we{background:var(--wkend)}
.tm-grid td.c.ro{cursor:default}
.tm-grid td.c.ph{font-weight:400;opacity:.9}
.tm-grid td.td{box-shadow:inset 1px 0 0 var(--today),inset -1px 0 0 var(--today)}
.tm-grid td.c.cm::after{content:"";position:absolute;top:0;right:0;border-style:solid;border-width:0 6px 6px 0;border-color:transparent #0f6cbd transparent transparent}
.tm-grid td.c.sel{background-image:linear-gradient(rgba(15,108,189,.22),rgba(15,108,189,.22))}
.tm-grid td.c.act{box-shadow:inset 0 0 0 2px var(--accent)}
.tm-grid.m-week td.c{width:118px;min-width:118px;max-width:118px}
.tm-grid.m-2week td.c{width:74px;min-width:74px;max-width:74px}
.tm-grid.m-month td.c{width:54px;min-width:54px;max-width:54px;font-size:11px}
.tm-grid.m-quarter td.c{width:24px;min-width:24px;max-width:24px;font-size:10px;padding:0}
.tm-grid.m-quarter thead tr.h3 th{font-weight:400;font-size:10px;padding:0}
.tm-grid.m-year td.c,.tm-grid.m-year tr.cnt td:not(.nm):not(.lf){width:7px;min-width:7px;max-width:7px;padding:0;border-right:0}
.tm-grid.m-year tr.pr td{height:22px}
.tm-grid.m-year thead th.mo{border-right:1px solid #c7c7c7}
.tm-grid.m-year td.td{box-shadow:inset 1px 0 0 var(--today)}
.tm-foot{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-height:38px;padding:8px 16px;border-top:1px solid var(--border);font-size:13px;background:var(--bg2)}
.tm-ph{color:#b0005a}
.tm-editor{position:absolute;z-index:20;width:280px;background:#fff;border:1px solid #c7c7c7;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.16);padding:10px;display:flex;flex-direction:column;gap:6px}
.tm-ed-h{font-size:12px;color:var(--muted)}
.tm-ed-k{font-size:11px;color:var(--muted)}
.tm-sugg{list-style:none;margin:0;padding:0;max-height:220px;overflow:auto}
.tm-sugg li{display:flex;align-items:center;gap:6px;padding:4px 6px;border-radius:4px;cursor:pointer;font-size:13px}
.tm-sugg li span:last-child{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-sugg li.hi,.tm-sugg li:hover{background:var(--accent-weak)}
.tm-sugg .sw{width:12px;height:12px;border-radius:3px;flex:none;border:1px solid rgba(0,0,0,.1)}
.tm-toast{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);background:#242424;color:#fff;padding:8px 14px;border-radius:6px;font-size:13px;z-index:30;max-width:90%;box-shadow:0 4px 12px rgba(0,0,0,.2)}
.tm-body{padding:0 16px 16px;overflow:auto}
.tm-pad{padding:0 8px}
.tm-table{border-collapse:collapse;width:100%;font-size:13px}
.tm-table th{text-align:left;font-weight:600;color:var(--muted);font-size:12px;border-bottom:1px solid var(--border);padding:8px 8px;position:sticky;top:0;background:var(--bg);z-index:1}
.tm-table td{border-bottom:1px solid var(--line);padding:5px 8px;vertical-align:middle}
.tm-table .n{text-align:right;font-variant-numeric:tabular-nums}
.tm-table tr.grp td{background:#f3f3f3;font-weight:600;padding:7px 8px}
.tm-table tr.grp span{font-weight:400;color:var(--muted)}
.tm-table tr.tot td{font-weight:600;background:var(--bg2)}
.tm-table tr.grand td{border-top:2px solid var(--border)}
.tm-table tr.mine td:first-child{box-shadow:inset 3px 0 0 var(--accent);font-weight:600}
.tm-table .neg{color:var(--danger)}
.tm-table .warn{color:#8a5a00}
.tm-table .z{color:#bdbdbd}
.tm-table tr.det td{background:#fbfbfb}
.tm-table input::placeholder{color:#9e9e9e}
.tm-hol .bar{width:140px}
.tm-meter{display:block;position:relative;height:8px;background:#ececec;border-radius:4px;overflow:hidden;min-width:100px;margin-top:6px}
.tm-meter i{position:absolute;left:0;top:0;bottom:0;background:#5b9a2f}
.tm-meter i.pl{background:#c4e59f}
.tm-ranges{margin:4px 0;padding-left:18px;columns:2;column-gap:32px}
.tm-ranges li{margin:2px 0}
.tm-ranges li.past{color:var(--muted)}
.tm-admin h3{font-size:15px;margin:20px 0 6px}
.tm-scroll{overflow:auto}
.tm-edit td{padding:3px 6px}
.tm-edit .tm-input{width:100%;min-width:90px}
.tm-edit .tm-num{width:80px;min-width:0}
.tm-edit .tm-short{width:70px;min-width:0}
.tm-edit .tm-wide{min-width:220px}
.tm-del{color:var(--danger)}
.tm-form{display:flex;flex-direction:column;gap:14px;max-width:560px;padding-top:4px}
.tm-form.wide{max-width:820px}
.tm-form label{display:flex;flex-direction:column;gap:4px;font-weight:600;font-size:13px}
.tm-form label small{font-weight:400;color:var(--muted)}
.tm-form label.tm-check{flex-direction:row;align-items:center;gap:8px;font-weight:400}
.tm-form p{margin:0}
.tm-inline{display:flex;gap:6px}
.tm-log{background:#f5f5f5;border-radius:6px;padding:10px;font-size:12px;max-height:240px;overflow:auto;white-space:pre-wrap}
.tm-setup{padding:24px 16px;max-width:640px}
.tm-setup h2{margin:0 0 8px;font-size:20px}
.tm-err{color:var(--danger)}
.tm-acct{display:flex;gap:10px;align-items:center}
.tm-pw pre{margin:6px 0 0;font-size:13px;user-select:all}
.tm-login,.tm-pwform{max-width:380px}
.tm-pwform h2{margin:0;font-size:20px}
.tm-ok{color:var(--ok)}
.tm-app code{background:#f3f3f3;border-radius:4px;padding:1px 5px;font-size:12px}
@media (max-width:640px){
  .tm-grid .nm{width:120px;min-width:120px;max-width:120px;font-size:12px}
  .tm-grid .lf{left:120px;width:44px;min-width:44px;max-width:44px}
  .tm-top,.tm-bar,.tm-palette,.tm-foot{padding-left:12px;padding-right:12px}
  .tm-ranges{columns:1}
  .tm-wide{width:180px}
}
