/* TSIGNS internal UI corrections: keep document, signing and TV surfaces independent. */
body.ts2 { --ts-control-height: 40px; }
body.ts2 .ts-module :is(.contacts-toolbar, .cs-filters, .renditions-filterbar, .users-filter-bar) :is(input:not([type=checkbox]):not([type=radio]), select),
body.ts2 .ts-module input[type=date], body.ts2 .ts-module input[type=time] {
  box-sizing: border-box; height: var(--ts-control-height) !important; min-height: var(--ts-control-height) !important;
  border-radius: 6px !important; padding-block: 8px !important;
}
body.ts2 .ts-module input[type=date]::-webkit-calendar-picker-indicator,
body.ts2 .ts-module input[type=time]::-webkit-calendar-picker-indicator { width: 18px; height: 18px; opacity: .6; cursor: pointer; }
body.ts2 .ts-module :is(.contacts-toolbar,.cs-filters,.renditions-filterbar,.users-filter-bar) { align-items: end; }
body.ts2 #vidrieraSection #vidrieraRoot :is(.vd-button,.vd-icon) { min-height: var(--ts-control-height) !important; border-radius: 6px !important; font-size: 13px !important; }
body.ts2 #vidrieraSection #vidrieraRoot .vd-icon { width: var(--ts-control-height) !important; min-width: var(--ts-control-height) !important; height: var(--ts-control-height) !important; flex-basis: var(--ts-control-height); }
body.ts2 #vidrieraSection #vidrieraRoot .vd-filters :is(input,select) { height: var(--ts-control-height) !important; min-height: var(--ts-control-height) !important; border-radius: 6px !important; font-size: 14px !important; }
body.ts2 #generatedDraftClearBtn { width: 40px !important; min-width: 40px !important; height: 40px !important; border-radius: 6px !important; }
body.ts2 #adminSection .users-filter-bar > label > span { text-transform: none !important; }
body.ts2 #adminSection :is(.admin-inner-table,.audit-table) th,
body.ts2 #dashboardSection :is(.orders-table,.work-budget-table) th {
  color: var(--ts-muted); font-size: 12px !important; font-weight: 500 !important; text-transform: none !important;
  line-height: 1.4; overflow-wrap: normal; word-break: normal;
}
body.ts2 #dashboardSection :is(.work-budget-table,.orders-table) td { font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; }
body.ts2 #dashboardSection .work-budget-table :is(th,td) { min-width: 96px; }
body.ts2 #dashboardSection .work-budget-table :is(th:first-child,td:first-child) { min-width: 160px; }
body.ts2 #trashPanel > .preview-header h2,
body.ts2 #systemPanel > .preview-header h2,
body.ts2 #teamPanel > .preview-header:first-of-type h2,
body.ts2 #historicalWorksPanel > .preview-header h2 { display: none; }
body.ts2 #timbreSection { font: 14px/1.5 var(--ts-font); }
body.ts2 #timbreSection .timbre-card h2 { font-size: 17px; font-weight: 650; }
body.ts2 #timbreSection .timbre-card label:not(.timbre-listen) { font-size: 13px; font-weight: 500; }
body.ts2 #timbreSection :is(select,textarea) { font: 400 14px/1.4 var(--ts-font); border: 1px solid var(--ts-border); border-radius: 6px; padding: 9px 12px; }
body.ts2 #timbreSection select { min-height: var(--ts-control-height); }
body.ts2 #timbreSection :is(#timbreRefresh,#timbreTestSound) { min-height: var(--ts-control-height); border: 1px solid var(--ts-border); border-radius: 6px; font: 600 13px/1.4 var(--ts-font); padding: 8px 12px; background: var(--ts-surface); color: var(--ts-text); }
/* This dialog was missing native-dialog centering and inherited oversized mobile buttons. */
body.ts2 dialog.ta-dialog {
  position: fixed; inset: 0; margin: auto; width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 24px; border: 1px solid var(--ts-border); border-radius: 8px; background: var(--ts-surface); color: var(--ts-text);
  font: 14px/1.5 var(--ts-font); overflow-y: auto;
}
body.ts2 .ta-heading { align-items: flex-start; gap: 16px; }
body.ts2 .ta-heading h2 { font-size: 20px; line-height: 1.35; font-weight: 650; }
body.ts2 .ta-dialog .btn { flex: 0 0 auto; width: auto !important; min-height: var(--ts-control-height); margin: 0; border-radius: 6px; padding: 8px 12px; font: 600 13px/1.4 var(--ts-font); }
body.ts2 .ta-dialog .btn.secondary { background: var(--ts-surface); border: 1px solid var(--ts-border); color: var(--ts-text); }
body.ts2 .ta-field { font-size: 12px; color: var(--ts-muted); font-weight: 500; }
body.ts2 .ta-field select { min-height: var(--ts-control-height); border-radius: 6px; border-color: var(--ts-border); font-size: 14px; font-weight: 400; color: var(--ts-text); padding: 8px 12px; }
body.ts2 .ta-users label { border-radius: 6px; padding: 12px; }
body.ts2 .ta-dialog :is(input,select,button):focus-visible { outline: 2px solid var(--ts-focus); outline-offset: 2px; }
body.ts2 .users-detail-drawer { height: 100dvh; }
body.ts2 .users-drawer-head button { min-width: var(--ts-control-height); min-height: var(--ts-control-height); border-radius: 6px; }
@media (max-width: 767px) {
  body.ts2 { --ts-control-height: 44px; }
  body.ts2 #vidrieraSection #vidrieraRoot .vd-filters :is(input,select),
  body.ts2 #timbreSection :is(select,textarea), body.ts2 .ta-field select { font-size: 16px !important; }
  body.ts2 #timbreSection .timbre-heading { align-items: flex-start; flex-wrap: wrap; }
  body.ts2 #timbreSection .timbre-heading h1 { font-size: 24px; }
  body.ts2 dialog.ta-dialog { padding: 20px 16px; }
  body.ts2 .ta-heading h2 { font-size: 18px; }
  body.ts2 .ta-users { grid-template-columns: 1fr; }
  body.ts2 #adminSection .users-native-drawer-footer { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  body.ts2 #adminSection .users-native-drawer-footer .users-btn { width: 100%; min-width: 0; min-height: 44px; padding: 8px; white-space: normal; }
  body.ts2 #adminSection .users-drawer-footer-spacer { display: none; }
  body.ts2 #adminSection .users-enterprise-table tr.ios-mobile-row { border-radius: 8px !important; box-shadow: none !important; }
  body.ts2 #adminSection :is(#adminUsersPrevPage,#adminUsersNextPage) { min-width: 44px; min-height: 44px; }
  body.ts2 #sentOrdersSection :is(.ts-row-action,.ts-order-more,.order-favorite-btn) { min-width: 44px; min-height: 44px; }
}
body.ts2 #renditionsSection .renditions-toolbar { align-items: end !important; gap: 12px !important; }
body.ts2 #renditionsSection .renditions-toolbar > .field { margin: 0 !important; }
body.ts2 #renditionsSection .renditions-table th { font: 500 12px/1.4 var(--ts-font); text-transform: none; letter-spacing: 0; color: var(--ts-muted); }
body.ts2 #renditionsSection .renditions-table td { font-size: 13px; line-height: 1.5; word-break: normal; overflow-wrap: break-word; }
body.ts2 #renditionsSection .renditions-table td strong { font-size: 13px; font-weight: 600; }
body.ts2 .ta-field select { font-family: var(--ts-font) !important; font-weight: 400 !important; }
@media (min-width: 768px) {
  body.ts2 #renditionsSection .renditions-table { min-width: 960px; table-layout: auto; }
  body.ts2 #renditionsSection .renditions-table :is(th:nth-child(2),td:nth-child(2)) { min-width: 140px; }
  body.ts2 #renditionsSection .renditions-table :is(th:nth-child(3),td:nth-child(3)) { min-width: 220px; }
  body.ts2 #renditionsSection .renditions-table :is(th:nth-child(4),td:nth-child(4)) { min-width: 140px; }
}
@media (max-width: 767px) {
  body.ts2 #sentOrdersSection :is(.orders-row-actions-inline .table-btn,.orders-favorite-btn) { min-width: 44px !important; min-height: 44px !important; }
}

@media (min-width: 768px) {
  body.ts2 #vidrieraSection #vidrieraRoot .vd-table:not(.vd-playlist-table) :is(th:nth-child(2),td:nth-child(2)) { min-width: 130px; word-break: normal; overflow-wrap: normal; }
}
body.ts2 #companiesPanel > .preview-header h2,
body.ts2 #trustsPanel > h2,
body.ts2 #providersPanel > h2,
body.ts2 #categoriesPanel > h2,
body.ts2 #itemsPanel > h2 { display: none; }
