/* Readable department timesheet, using the active workspace palette. */
.ts-page{display:grid;gap:20px;min-width:0;font-size:16px}
.ts-toolbar{display:flex;align-items:end;flex-wrap:wrap;gap:16px;padding:20px;background:var(--surface);border:1px solid var(--line);border-radius:16px}
.ts-toolbar>label{display:grid;gap:8px;min-width:160px;margin:0;color:var(--ink);font-size:14px;font-weight:600}
.ts-toolbar .ts-department{min-width:240px;flex:1.15}.ts-toolbar .ts-search{flex:1;min-width:200px}
.ts-toolbar input,.ts-toolbar select{width:100%;height:46px;border:1px solid var(--line);border-radius:9px;padding:10px 12px;background:var(--surface);color:var(--ink);font-size:16px}
.ts-month-controls{display:flex;align-items:center;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
.ts-month-controls input{border:0;width:184px;min-width:0}.ts-month-controls .icon-btn{font-size:28px;flex-shrink:0;color:var(--muted)}
.ts-export{min-height:46px;white-space:nowrap}.ts-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.ts-summary>div{display:grid;gap:8px;border:1px solid var(--line);border-radius:13px;background:var(--surface);padding:18px 20px}
.ts-summary>div:first-child{background:var(--accent-soft);border-color:var(--accent-line)}
.ts-summary span{font-size:14px;color:var(--muted);line-height:1.4}.ts-summary strong{font-size:30px;color:var(--ink);font-weight:650;line-height:1.2;font-variant-numeric:tabular-nums}.ts-summary small{font-size:17px;font-weight:500;color:var(--muted)}
.ts-summary .ts-stat-note{font-size:12px;line-height:1.4}
.ts-sheet{min-width:0;overflow:hidden}.ts-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px}
.ts-eyebrow{display:block;color:var(--accent-text);font-size:14px;font-weight:600;margin-bottom:8px}.ts-sheet-heading h2{font-size:25px;line-height:1.3;font-weight:650;text-transform:capitalize;margin:0 0 8px}.ts-sheet-heading p{color:var(--muted);font-size:14px;margin:0;line-height:1.5}
.ts-selection-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 24px;background:var(--surface-soft);border-top:1px solid var(--line);color:var(--muted);font-size:14px;min-height:48px}
.ts-scroll{overflow:auto;max-height:65vh;min-height:170px;position:relative;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track);border-block:1px solid var(--line)}
body[data-theme] .ts-table,.ts-table{width:max-content;min-width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:16px;color:var(--ink)}
body[data-theme] .ts-table th,body[data-theme] .ts-table td,.ts-table th,.ts-table td{padding:7px 5px;min-width:58px;width:58px;height:66px;text-align:center;border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:16px;letter-spacing:0}
.ts-table thead th,body[data-theme] .ts-table thead th{position:sticky;top:0;z-index:3;background:var(--surface-soft);font-weight:650;height:62px}
.ts-table thead th small{display:block;margin-top:4px;color:var(--muted);font-size:12px;font-weight:500}.ts-table thead th>span{font-size:16px}
.ts-table .ts-name,body[data-theme] .ts-table .ts-name{position:sticky;left:0;z-index:2;text-align:left;min-width:285px;width:285px;max-width:285px;padding:12px 16px;box-shadow:2px 0 3px var(--shadow-color);border-right:2px solid var(--line);background:var(--surface)}
.ts-table thead .ts-name,body[data-theme] .ts-table thead .ts-name{z-index:5;background:var(--surface-soft)}
.ts-table thead .ts-name>span{vertical-align:middle}.ts-table thead .ts-name>input{margin-right:12px;vertical-align:middle}
.ts-person{display:flex;align-items:center;gap:12px}.ts-person>div{min-width:0}.ts-person .profile-link{font-size:16px;line-height:1.4;white-space:normal;text-align:left;font-weight:600}.ts-person span{display:block;font-size:12px;color:var(--muted);font-weight:400;line-height:1.4;margin-top:4px;white-space:normal}
.ts-page input[type=checkbox],.ts-bulk-options input[type=checkbox]{width:18px;height:18px;min-width:18px;accent-color:var(--accent);cursor:pointer}
.ts-table .ts-weekend,body[data-theme] .ts-table .ts-weekend{background:var(--surface-soft)}
.ts-table thead .ts-today,body[data-theme] .ts-table thead .ts-today{background:var(--accent-soft);color:var(--accent-text);box-shadow:inset 0 -3px var(--accent)}
.ts-table tbody tr:hover td,.ts-table tbody tr:hover .ts-name,body[data-theme] .ts-table tbody tr:hover td,body[data-theme] .ts-table tbody tr:hover .ts-name{background:var(--hover)}
.ts-table .ts-total,body[data-theme] .ts-table .ts-total{min-width:90px;width:90px;font-variant-numeric:tabular-nums;background:var(--surface-soft)}
.ts-cell{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;width:46px;min-height:46px;gap:1px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ink);font-size:16px;cursor:pointer;padding:4px}
.ts-cell strong{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.ts-cell small{font-size:11px;line-height:1.2;white-space:nowrap;color:inherit}.ts-cell.ts-empty{color:var(--muted);opacity:.65}
.ts-cell.ts-work{background:var(--accent-soft);color:var(--accent-text)}.ts-cell.ts-remote{background:var(--accent-soft);color:var(--accent-text);border:1px dashed var(--accent-line)}.ts-cell.ts-sick{background:var(--warning-soft);color:var(--warning);border-color:var(--warning-line)}.ts-cell.ts-unknown{border-color:var(--line);color:var(--muted)}
.ts-cell.ts-vacation{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent-line)}.ts-cell.ts-absence{background:var(--danger-soft);color:var(--danger);border-color:var(--danger-line)}
.ts-future .ts-cell:not(.ts-empty){background:transparent;border-style:dashed}.ts-planned-total{color:var(--muted)!important}
.ts-cell:hover,.ts-cell.ts-empty:hover{opacity:1;border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.ts-cell:focus-visible,.ts-page button:focus-visible,.ts-page input:focus-visible,.ts-page select:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px}
.ts-comment-dot{display:inline-block;width:5px;height:5px;background:var(--accent-text);border-radius:50%;flex-shrink:0}.ts-cell .ts-comment-dot{position:absolute;right:4px;top:4px}
.ts-legend{display:flex;flex-wrap:wrap;gap:16px 24px;align-items:center;padding:18px 24px;color:var(--muted);font-size:14px}.ts-legend>span{display:inline-flex;gap:8px;align-items:center}.ts-legend b{display:inline-flex;width:29px;height:29px;align-items:center;justify-content:center;border-radius:6px;font-size:14px;font-weight:600;color:var(--ink);background:var(--surface-soft)}.ts-legend .ts-legend-work{background:var(--accent-soft);color:var(--accent-text)}.ts-legend .ts-legend-remote{background:var(--accent-soft);color:var(--accent-text);border:1px dashed var(--accent-line)}.ts-legend .ts-legend-sick{background:var(--warning-soft);color:var(--warning)}
.ts-legend .ts-legend-vacation{background:var(--accent-soft);color:var(--accent-text);border:1px solid var(--accent-line)}.ts-legend .ts-legend-absence{background:var(--danger-soft);color:var(--danger)}
.ts-footnote{font-size:14px;line-height:1.6;color:var(--muted);margin:0}.ts-department-manage{justify-self:start;font-size:14px}
.ts-editor{width:660px}.ts-editor .modal-heading h2{font-size:22px}.ts-editor .modal-heading p{font-size:16px}.ts-editor-summary{display:grid;gap:7px;padding:16px;border:1px solid var(--line);background:var(--surface-soft);border-radius:12px;margin-bottom:20px}.ts-editor-summary>span,.ts-editor-summary>small{color:var(--muted);font-size:13px}.ts-editor-summary>strong{font-size:18px;line-height:1.4}
.ts-markers{padding:0;border:0;margin:0 0 20px}.ts-markers legend{font-size:15px;font-weight:600;margin-bottom:10px;float:none;width:auto}.ts-marker-options{display:flex;gap:8px;flex-wrap:wrap}.ts-marker-option{cursor:pointer;position:relative;flex:1;min-width:132px}.ts-marker-option>input{position:absolute;opacity:0;width:1px;height:1px}.ts-marker-option>span{display:flex;align-items:center;gap:8px;min-height:52px;border:1px solid var(--line);border-radius:9px;padding:10px 12px;font-size:14px;color:var(--muted);background:var(--surface)}.ts-marker-option strong{font-size:18px;color:var(--ink)}.ts-marker-option>input:checked+span{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.ts-marker-option>input:checked+span strong{color:var(--accent-text)}.ts-marker-option>input:focus-visible+span{outline:3px solid var(--focus-ring);outline-offset:2px}.ts-marker-option.ts-clear{flex-basis:100%}.ts-clear>span{justify-content:center;min-height:38px;font-size:13px}
.ts-editor .form-field label{font-size:15px}.ts-editor .form-field input,.ts-editor .form-field textarea{font-size:16px}.ts-editor .form-field .hint{font-size:13px;line-height:1.5}.ts-editor [hidden]{display:none!important}
.ts-history{border-top:1px solid var(--line);padding-top:18px;margin-top:22px}.ts-history summary{font-size:15px;font-weight:600;cursor:pointer;color:var(--ink)}.ts-history-list{list-style:none;padding:0;margin:16px 0 0;display:grid;gap:14px}.ts-history-list li{padding-left:14px;border-left:2px solid var(--accent-line)}.ts-history-list li>div{display:flex;justify-content:space-between;gap:12px;font-size:14px}.ts-history-list time,.ts-history-list small{font-size:12px;color:var(--muted)}.ts-history-list p{font-size:14px;margin:6px 0;line-height:1.5}.ts-history-list .ts-history-comment{color:var(--muted)}
.ts-fact-note,.ts-read-only,.ts-muted{font-size:13px;line-height:1.6;color:var(--muted);margin:16px 0 0}.ts-read-comment{white-space:pre-wrap;font-size:16px;line-height:1.6}.ts-bulk-options{display:grid;gap:10px;margin:20px 0}.ts-bulk-options label{display:flex;gap:10px;align-items:center;font-size:14px;color:var(--ink)}.ts-bulk-preview{margin-top:16px;padding:14px;background:var(--accent-soft);border:1px solid var(--accent-line);border-radius:10px;font-size:14px;color:var(--accent-text);line-height:1.6}.ts-editor .form-error .btn{display:block;margin-top:12px}
.ts-departments{display:grid;gap:8px;margin-bottom:24px;max-height:310px;overflow:auto}.ts-departments>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line);border-radius:9px;font-size:16px}.ts-unassigned{padding:36px;max-width:740px}.ts-unassigned h2{font-size:26px;margin:0 0 12px}.ts-unassigned p{font-size:16px;color:var(--muted);line-height:1.6;margin:0}
.department-access-options{display:grid;gap:9px;padding:13px;border:1px solid var(--line);border-radius:9px;max-height:240px;overflow:auto}.department-access-options label{display:flex;align-items:center;gap:10px;min-height:30px;font-size:15px}.department-access-options input[type=checkbox]{width:18px;height:18px;min-height:18px;accent-color:var(--accent)}
@media(max-width:1100px){.ts-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.ts-toolbar .ts-department,.ts-toolbar .ts-search{flex:1 1 220px}.ts-sheet-heading{align-items:flex-start}.ts-table .ts-name,body[data-theme] .ts-table .ts-name{min-width:245px;width:245px;max-width:245px}}
@media(max-width:650px){.ts-page{gap:14px}.ts-toolbar{padding:16px;gap:14px}.ts-toolbar>label,.ts-toolbar .ts-department,.ts-toolbar .ts-search{width:100%;min-width:0;flex-basis:100%}.ts-month-controls input{flex:1;width:auto}.ts-export{width:100%}.ts-summary{gap:9px}.ts-summary>div{padding:14px}.ts-summary span{font-size:12px}.ts-summary strong{font-size:25px}.ts-sheet-heading{padding:18px;flex-direction:column;gap:14px}.ts-sheet-heading h2{font-size:22px}.ts-selection-bar{padding:12px 18px;font-size:12px}.ts-table .ts-name,body[data-theme] .ts-table .ts-name{min-width:185px;width:185px;max-width:185px;padding:10px}.ts-person{gap:8px}.ts-person .profile-link{font-size:14px}.ts-person span{font-size:11px}.ts-legend{padding:16px;gap:12px 16px;font-size:12px}.ts-editor .modal-body{padding:18px}.ts-marker-option{min-width:120px}.ts-history-list li>div{flex-direction:column;gap:4px}}

.ts-admin-tools{display:flex;flex-wrap:wrap;gap:18px;font-size:14px}
/* A desktop-to-phone resize must never leave navigation over the sheet. */
@media(max-width:1020px){
  body:not(.menu-open) .sidebar{transform:translateX(-100%);visibility:hidden;pointer-events:none}
  body.menu-open .sidebar{transform:translateX(0);visibility:visible;pointer-events:auto}
}
@media(max-width:650px){
  .topline{display:flex;gap:10px}.topline-left{min-width:0}.top-controls{flex-shrink:0}
  .topline .mobile-menu{display:inline-flex;flex-shrink:0;width:32px;height:36px}
  .topline .global-search{min-width:0;overflow:hidden}.topline .global-search span{max-width:140px}
  .portal-directory-trigger{flex-shrink:0}.portal-directory-trigger span{display:none}
}

.ts-cell.ts-dismissed,.ts-legend-dismissed{background:#edf0f4;color:#667085;border-color:#cfd5df;}
