/* Shared type and spacing scale. Loaded last so vendor and mobile rules cannot
   shrink table headings, secondary text, or controls independently. */
:root{
  --ui-text:16px;--ui-control-text:15px;--ui-label:14px;--ui-caption:13px;
  --ui-title:30px;--ui-section:20px;--ui-stat:32px;--ui-control-height:44px;
  --ui-gutter:28px;--ui-panel-padding:20px
}
.shell{--sidebar-width:272px}
.workspace{font-size:var(--ui-text);line-height:1.5}
.workspace-content{padding:28px var(--ui-gutter) 32px}
.workspace .topline{min-height:64px;padding:10px var(--ui-gutter)}
.workspace .page-heading{gap:16px;margin-bottom:24px}
.workspace .page-heading h1{font-size:var(--ui-title);line-height:1.2;letter-spacing:-.5px;font-weight:650}
.workspace .page-heading .page-description{font-size:var(--ui-label);line-height:1.5;margin-top:8px}
.workspace :is(.panel-head,.card-header){padding:18px var(--ui-panel-padding)}
.workspace :is(.panel-head,.card-header) h2{font-size:var(--ui-section);line-height:1.35;font-weight:600;letter-spacing:-.2px}
.workspace :is(.panel-head,.card-header) p{font-size:var(--ui-label);line-height:1.5}
.workspace .panel-body{padding:20px var(--ui-panel-padding)}

/* Ordinary buttons keep the same height across reports, filters and dialogs.
   The two-line Excel action and icon-only controls retain their own layouts. */
.workspace .btn,.workspace .panel-head .btn,.workspace .insight-button,.modal .btn{
  min-height:var(--ui-control-height);padding:10px 14px;font-size:var(--ui-control-text);
  line-height:20px;font-weight:500;border-radius:8px;gap:8px
}
.workspace .btn-primary,.workspace .panel-head .btn-primary,.workspace .insight-primary,.modal .btn-primary{font-weight:600}
.workspace .overview-report-actions .overview-export{min-height:58px;padding:10px 16px}
.workspace .overview-export small{font-size:var(--ui-caption);line-height:18px}
.workspace .period-presets button{min-height:38px;padding:8px 12px;font-size:var(--ui-label);line-height:20px}
.workspace .global-search kbd{font-size:12px;line-height:18px;padding:2px 5px}
.workspace .top-user.avatar{width:32px;height:32px;font-size:13px}

/* Form labels are lighter than the entered values; controls don't inherit the
   bold label font from the timesheet and analytics forms. */
.workspace :is(.filters,.ts-toolbar,.insight-filters){gap:14px;padding:18px;border-radius:12px}
.workspace :is(.field-label,.form-field label,.ts-toolbar>label,.insight-filters label),.modal .form-field label{
  font-size:var(--ui-label);line-height:20px;font-weight:500;letter-spacing:0;color:var(--muted)
}
.workspace :is(.filter-field,.ts-toolbar,.insight-filters,.form-field) :is(input:not([type=checkbox]):not([type=radio]),select),
.modal .form-field :is(input:not([type=checkbox]):not([type=radio]),select){
  height:var(--ui-control-height);min-height:var(--ui-control-height);padding:9px 12px;
  font-size:var(--ui-text);line-height:24px;font-weight:400;color:var(--ink);border-radius:8px
}
.workspace .ts-month-controls{height:var(--ui-control-height);border-radius:8px}
.workspace .ts-month-controls input{height:42px;min-height:42px}
.workspace .ts-month-controls .icon-btn{width:36px;height:36px;min-height:36px;font-size:24px}
.workspace .filters .filter-field .search-box input[type=search]{padding-left:38px}
.workspace .form-field textarea,.modal .form-field textarea{font-size:var(--ui-text);line-height:1.5;font-weight:400}
.workspace .form-field .hint,.modal .form-field .hint{font-size:var(--ui-caption);line-height:1.5}

/* Explicit table-header selectors take precedence over Tabler's rem scale. */
.workspace .table>thead>tr>th{
  font-size:var(--ui-label);line-height:20px;font-weight:600;text-transform:none;
  letter-spacing:0;padding:12px 16px
}
.workspace .table>thead>tr>th :is(span,small){font-size:inherit;line-height:inherit}
.workspace .table>tbody>tr>td{font-size:var(--ui-text);line-height:24px;padding:14px 16px}
.workspace .table .person-name,.workspace .table .profile-link{font-size:var(--ui-text);line-height:22px}
.workspace :is(.person-sub,.cell-sub){font-size:var(--ui-label);line-height:20px}
.workspace .table .badge{font-size:var(--ui-caption);line-height:18px;padding:4px 8px;font-weight:500}
.workspace .panel-foot{font-size:var(--ui-label);line-height:20px;padding:14px var(--ui-panel-padding)}
.workspace .step-number{font-size:13px;min-width:26px;height:26px}

/* Summary cards share one scale, including long time totals. */
.workspace .insight-metric,.workspace .ts-summary>div{padding:18px 20px;gap:8px;border-radius:12px}
.workspace .insight-metric>span,.workspace .ts-summary span{font-size:var(--ui-label);line-height:20px;font-weight:500}
.workspace .insight-metric>strong,.workspace .ts-summary strong{font-size:var(--ui-stat);line-height:1.2;font-weight:650;letter-spacing:-.5px;overflow-wrap:anywhere}
.workspace .insight-metric>small{font-size:var(--ui-caption);line-height:19px}
.workspace .ts-sheet-heading{padding:20px}
.workspace .ts-sheet-heading h2{font-size:24px;line-height:1.3}
.workspace .ts-person span{font-size:var(--ui-caption);line-height:19px}
.workspace .profile-summary .person-name{font-size:var(--ui-text);line-height:24px}
.workspace .profile-summary .person-sub{font-size:var(--ui-label);line-height:20px}

@media(min-width:1021px){.workspace .mobile-menu{display:none}}
@media(max-width:1020px){:root{--ui-gutter:22px}.workspace .mobile-menu{display:inline-flex}}
@media(max-width:760px){
  :root{--ui-title:28px;--ui-gutter:16px;--ui-panel-padding:16px;--ui-stat:28px}
  .workspace-content{padding-top:22px}
  .workspace .page-heading{gap:16px;margin-bottom:20px}
  .workspace :is(.filters,.ts-toolbar,.insight-filters){padding:16px;gap:14px}
  .workspace :is(.panel-head,.card-header){padding:16px}
  .workspace .insight-metric,.workspace .ts-summary>div{padding:16px}
  .workspace .insight-actions{gap:8px}
  .workspace .overview-report-actions{gap:10px}
  .workspace .overview-report-actions .overview-export{flex:1 1 205px}
  .workspace .insight-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}
  .workspace .insight-filters>label{min-width:0;width:100%;margin:0}
  .workspace .insight-filters :is(input,select){min-width:0;width:100%;max-width:100%;box-sizing:border-box}
  .workspace .insight-filters>:is(.insight-department-filter,.insight-office-filter,.insight-primary,.insight-presets,.insight-filter-error){grid-column:1/-1}
  .workspace .insight-filters .insight-presets{display:flex;flex-wrap:wrap;gap:8px;margin:0;justify-content:flex-start}
}
