/* Detailed work views share the shell's scale, without changing public documents. */
body.ts2 .sidebar-brand .ts-wordmark { display: inline-block; font: 800 32px/1 var(--ts-font); letter-spacing: 0; color: var(--ts-text); }
body.ts2 .sidebar-brand .ts-wordmark > span { color: var(--ts-brand); }
body.ts2 .ts-home-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.ts2 .ts-home-overview > section { min-width: 0; }
body.ts2 .ts-home-metric { min-width: 0; display: grid; grid-template-rows: 40px minmax(40px,auto) auto; align-content: start; }
body.ts2 .ts-home-metric strong { margin: 0; line-height: 1.25; }
body.ts2 .ts-home-metric > span { align-items: flex-start; min-height: 40px; overflow-wrap: anywhere; }
body.ts2 .ts-home-metric > span svg { flex: 0 0 18px; margin-top: 2px; }
body.ts2 .ts-home-metric small { overflow-wrap: anywhere; }
body.ts2 #tsHomeEstateMetrics { grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); }

/* Contacts: a compact directory with communication methods grouped together. */
body.ts2 #contactsSection .contacts-topbar { flex-direction: row; align-items: center; }
body.ts2 #contactsSection .contacts-actions { width: auto; }
body.ts2 #contactsSection .contacts-summary { display: flex !important; flex-wrap: wrap; align-items: center; gap: 12px 24px !important; margin: 0 0 20px; padding: 0 0 18px; border: 0 !important; border-bottom: 1px solid var(--ts-border) !important; background: transparent !important; }
body.ts2 #contactsSection .contacts-summary > .contacts-stat:nth-child(2) { display: none; }
body.ts2 #contactsSection .contacts-stat { min-height: 0 !important; padding: 0 !important; background: transparent; }
body.ts2 #contactsSection .contacts-stat-icon { display: none; }
body.ts2 #contactsSection .contacts-stat > div { display: flex; flex-direction: row-reverse; align-items: baseline; gap: 8px; }
body.ts2 #contactsSection .contacts-stat strong { font: 650 19px/1.4 var(--ts-font); color: var(--ts-text); }
body.ts2 #contactsSection .contacts-stat span { font: 400 12px/1.4 var(--ts-font); color: var(--ts-muted); }
body.ts2 #contactsSection #contactsBirthdayBtn { margin-left: auto; }
body.ts2 #contactsSection .contacts-toolbar { display: flex !important; gap: 12px; align-items: center; }
body.ts2 #contactsSection .contacts-search-label { display: block !important; flex: 1; min-width: 0; max-width: 620px; }
body.ts2 #contactsSection .contacts-search-wrap { height: 44px !important; }
body.ts2 #contactsSection #contactsSearch { height: 44px !important; }
body.ts2 #contactsSection .contacts-search-wrap svg { top: 13px !important; }
body.ts2 #contactsSection .contacts-field-title { display: none; }
body.ts2 #contactsSection .contacts-toolbar-actions { display: flex; gap: 6px; height: 44px; min-height: 44px; width: auto !important; }
body.ts2 #contactsSection .contacts-button.icon-only { width: 40px; min-width: 40px; padding: 8px; }
body.ts2 #contactsSection .contacts-alpha { padding: 0 0 12px; gap: 2px; border: 0; background: transparent; overflow-x: auto; flex-wrap: nowrap; }
body.ts2 #contactsSection .contacts-alpha button { min-width: 28px !important; min-height: 36px; padding: 6px !important; font: 500 12px/1.4 var(--ts-font); }
body.ts2 #contactsSection .contacts-alpha button.active { color: var(--ts-brand); background: var(--ts-brand-tint); }
body.ts2 #contactsSection .contacts-table { min-width: 0 !important; table-layout: fixed; }
body.ts2 #contactsSection .contacts-table :is(th,td) { display: table-cell; width: auto; vertical-align: middle; overflow-wrap: anywhere; }
body.ts2 #contactsSection .contacts-table :is(th,td):nth-child(1) { width: 40px; }
body.ts2 #contactsSection .contacts-table :is(th,td):nth-child(2) { width: 26%; }
body.ts2 #contactsSection .contacts-table :is(th,td):nth-child(3) { width: 25%; }
body.ts2 #contactsSection .contacts-table :is(th,td):nth-child(5) { width: 100px; }
body.ts2 #contactsSection .contacts-table :is(th,td):nth-child(6) { width: 120px; }
body.ts2 #contactsSection .contacts-name-copy :is(strong,span) { white-space: normal; overflow: visible; font-size: 13px; }
body.ts2 #contactsSection .contacts-name-copy span { font-size: 12px; }
body.ts2 #contactsSection .contacts-avatar { flex: 0 0 32px; width: 32px; height: 32px; font: 600 11px var(--ts-font); background: var(--ts-subtle); color: var(--ts-muted); border: 1px solid var(--ts-border); }
body.ts2 #contactsSection .ts-contact-methods { display: grid; gap: 4px; }
body.ts2 #contactsSection .contacts-link { color: var(--ts-text); font-size: 13px; text-decoration: none; }
body.ts2 #contactsSection .contacts-link:hover { color: var(--ts-brand); text-decoration: underline; }
body.ts2 #contactsSection .contacts-row-actions { display: flex; gap: 2px; }
body.ts2 #contactsSection .contacts-row-button { min-width: 32px; width: 32px; height: 36px; border: 0; background: transparent; box-shadow: none; color: var(--ts-muted); border-radius: 4px; }
body.ts2 #contactsSection .contacts-row-button:hover { background: var(--ts-subtle); color: var(--ts-text); }
body.ts2 #contactsSection .contacts-pagination { padding: 16px 0; border: 0; background: transparent; gap: 12px; }
body.ts2 #contactsSection .contacts-selection-bar { margin: 0 0 12px; padding: 8px 12px; background: var(--ts-brand-tint); }
body.ts2 #contactsSection.contacts-no-delete .contacts-table :is(th,td):first-child { display: none !important; }
body.ts2 #contactsSection [hidden] { display: none !important; }
body.ts2 #contactsBirthdayOverlay .contacts-modal { width: min(880px,100%); display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; font-family: var(--ts-font); color: var(--ts-text); }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-head { padding: 20px 24px; background: white; border-bottom: 1px solid var(--ts-border); gap: 16px; overflow: visible; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-head h2 { font: 650 22px/1.3 var(--ts-font); margin: 0 0 4px; letter-spacing: 0; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-head p { color: var(--ts-muted); font-size: 13px; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-head::before,
body.ts2 #contactsBirthdayOverlay .contacts-birthday-head::after,
body.ts2 #contactsBirthdayOverlay .contacts-birthday-card::before { display: none; }
body.ts2 #contactsBirthdayOverlay .contacts-modal-close { display: grid !important; place-items: center; width: 44px; height: 44px; border: 1px solid var(--ts-border); background: white; border-radius: 6px; }
body.ts2 #contactsBirthdayOverlay .contacts-modal-close:focus-visible { outline: 2px solid var(--ts-brand); outline-offset: 2px; }
body.ts2 #contactsBirthdayOverlay .contacts-modal-body { overflow-y: auto; min-height: 0; padding: 0 24px 12px; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-summary { margin: 0; padding: 16px 0; font: 500 13px/1.4 var(--ts-font); color: var(--ts-muted); border-bottom: 1px solid var(--ts-border); }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-list { gap: 0; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-card { grid-template-columns: 36px minmax(0,1fr) auto; gap: 16px; padding: 18px 0; background: white; border: 0; border-bottom: 1px solid var(--ts-border); border-radius: 0; overflow: visible; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-card:last-child { border-bottom: 0; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-avatar { display: grid; place-items: center; width: 36px; height: 36px; background: var(--ts-subtle); border: 1px solid var(--ts-border); border-radius: 50%; color: var(--ts-muted); font: 600 12px var(--ts-font); }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-person { min-width: 0; overflow-wrap: anywhere; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-person strong { font: 600 14px/1.5 var(--ts-font); color: var(--ts-text); }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-person span { font: 400 13px/1.5 var(--ts-font); color: var(--ts-muted); margin-top: 2px; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-card-actions { grid-column: auto; align-items: center; gap: 8px; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-card-actions button { min-height: 44px; flex-shrink: 0; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-card-actions button:disabled { opacity: .45; cursor: not-allowed; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-empty { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; background: white; border: 0; border-radius: 0; color: var(--ts-muted); }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-empty svg { width: 28px; height: 28px; }
body.ts2 #contactsBirthdayOverlay .contacts-birthday-empty strong { font: 500 15px var(--ts-font); color: var(--ts-text); }
@media (max-width: 600px) {
  body.ts2 #contactsBirthdayOverlay { padding: 12px; }
  body.ts2 #contactsBirthdayOverlay .contacts-modal { max-height: calc(100dvh - 24px); }
  body.ts2 #contactsBirthdayOverlay .contacts-birthday-head { padding: 16px; }
  body.ts2 #contactsBirthdayOverlay .contacts-modal-body { padding: 0 16px 8px; }
  body.ts2 #contactsBirthdayOverlay .contacts-birthday-card { grid-template-columns: 36px minmax(0,1fr); gap: 12px; }
  body.ts2 #contactsBirthdayOverlay .contacts-birthday-card-actions { grid-column: 2; justify-content: flex-end; flex-wrap: wrap; }
}

/* Calendar: a fitted month and a useful agenda, instead of a wide scrolling sheet. */
body.ts2 #calendarSection .calendar-shell { --calendar-orange: var(--ts-brand); --calendar-border: var(--ts-border); }
body.ts2 #calendarSection .calendar-toolbar { display: grid !important; grid-template-columns: auto minmax(0,1fr) auto !important; gap: 16px; padding: 0 0 20px !important; background: transparent !important; border: 0 !important; min-height: 0; }
body.ts2 #calendarSection .calendar-toolbar > * { width: auto !important; }
body.ts2 #calendarSection .calendar-toolbar h2 { grid-column: auto; grid-row: auto; text-align: left; white-space: normal; font: 600 20px/1.3 var(--ts-font); }
body.ts2 #calendarSection :is(#calendarPeriodTitle,#calendarAgendaTitle) { text-transform: none; }
body.ts2 #calendarSection :is(#calendarPeriodTitle,#calendarAgendaTitle)::first-letter { text-transform: uppercase; }
body.ts2 #calendarSection .calendar-navigation { grid-column: auto; grid-row: auto; gap: 4px; }
body.ts2 #calendarSection .calendar-view-switch { grid-column: auto; grid-row: auto; gap: 2px; padding: 3px; border: 1px solid var(--ts-border); border-radius: 6px; background: var(--ts-subtle); }
body.ts2 #calendarSection .calendar-view-switch button { height: 34px; min-width: 48px; font: 500 12px var(--ts-font); border-radius: 4px; }
body.ts2 #calendarSection .calendar-view-switch button.active { color: var(--ts-text); box-shadow: 0 1px 3px #20242b15; }
body.ts2 #calendarSection .calendar-icon-button { width: 40px; height: 40px; min-height: 40px; border: 1px solid var(--ts-border); background: white; color: var(--ts-text); border-radius: 6px; transform: none; }
body.ts2 #calendarSection .ts-calendar-layout { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 24px; align-items: start; }
body.ts2 #calendarSection .calendar-canvas { min-width: 0; min-height: 0; border: 0; background: transparent; overflow: hidden; }
body.ts2 #calendarSection .calendar-month-grid { min-width: 0; grid-template-columns: repeat(7,minmax(0,1fr)); grid-template-rows: 36px repeat(6,108px); border-top: 1px solid var(--ts-border); border-left: 1px solid var(--ts-border); }
body.ts2 #calendarSection .calendar-weekday { padding: 8px; justify-content: center; min-height: 0; font: 500 11px var(--ts-font); text-transform: none; background: transparent; }
body.ts2 #calendarSection .calendar-day { min-height: 0; padding: 4px; border-right: 1px solid var(--ts-border); border-bottom: 1px solid var(--ts-border); }
body.ts2 #calendarSection .calendar-day.is-selected { box-shadow: inset 0 0 0 2px var(--ts-brand); }
body.ts2 #calendarSection .calendar-day-number { margin: 0 0 4px; width: 24px; height: 24px; font: 500 12px var(--ts-font); }
body.ts2 #calendarSection .calendar-day-events { gap: 2px; }
body.ts2 #calendarSection .calendar-event.compact { padding: 2px 4px; height: 20px; min-height: 20px; gap: 4px; font: 500 11px/1.3 var(--ts-font); }
body.ts2 #calendarSection .calendar-event.compact time { font-size: 9px; }
body.ts2 #calendarSection .calendar-event { border-radius: 3px; box-shadow: none; }
body.ts2 #calendarSection .calendar-more { font: 500 11px/16px var(--ts-font); padding: 2px 4px; height: 20px; min-height: 20px; }
body.ts2 #calendarSection .ts-calendar-dots { display: none; }
body.ts2 #calendarSection .ts-calendar-agenda { min-width: 0; }
body.ts2 #calendarSection .ts-calendar-agenda > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; padding-bottom: 16px; border-bottom: 1px solid var(--ts-border); }
body.ts2 #calendarSection .ts-calendar-agenda header span { font-size: 12px; color: var(--ts-muted); }
body.ts2 #calendarSection .ts-calendar-agenda h3 { font: 600 16px/1.4 var(--ts-font); margin: 4px 0 0; text-transform: capitalize; }
body.ts2 #calendarSection .ts-agenda-event { display: grid; width: 100%; text-align: left; padding: 18px 0 18px 16px; border: 0; border-bottom: 1px solid var(--ts-border); border-radius: 0; background: transparent; position: relative; gap: 4px; color: var(--ts-text); cursor: pointer; font: 400 13px/1.5 var(--ts-font); }
body.ts2 #calendarSection .ts-agenda-event::before { content: ''; position: absolute; left: 0; top: 22px; width: 4px; height: 24px; border-radius: 2px; background: var(--event-color); }
body.ts2 #calendarSection .ts-agenda-event strong { font-weight: 600; overflow-wrap: anywhere; }
body.ts2 #calendarSection .ts-agenda-event :is(time,span) { color: var(--ts-muted); font-size: 12px; overflow-wrap: anywhere; }
body.ts2 #calendarSection .ts-agenda-event:hover { background: white; }
body.ts2 #calendarSection .ts-agenda-empty { padding: 24px 0; color: var(--ts-muted); font-size: 13px; }
body.ts2 #calendarSection .calendar-timeline-scroll { max-height: 650px; }
body.ts2 #calendarSection .calendar-timeline { min-width: 640px; grid-template-columns: 48px minmax(0,1fr); }
body.ts2 #calendarSection .calendar-timeline-heads, body.ts2 #calendarSection .calendar-all-day-row, body.ts2 #calendarSection .calendar-time-columns { grid-template-columns: repeat(var(--calendar-days),minmax(0,1fr)); }
body.ts2 #calendarSection[data-view="day"] .calendar-timeline { min-width: 0; }

/* Shared field geometry must survive the legacy input reset. */
body.ts2 .ts-module .dashboard-search-control input { padding-left: 44px !important; }
body.ts2 #csFilters label { display: grid; gap: 6px; font: 500 13px/1.5 var(--ts-font) !important; color: var(--ts-muted); }
body.ts2 #csFilters :is(input,select) { height: 44px !important; min-height: 44px !important; margin: 0; }
body.ts2 #reservationsSection #reservationSearch { padding-left: 44px !important; }
body.ts2 .ts-module :is(button, label, h1, h2, h3) { overflow-wrap: anywhere; }
body.ts2 .ts-module :is(.field, .dashboard-search-control, .cs-filters > *, .vd-field) { min-width: 0; }
body.ts2 .ts-module :is(.btn, .table-btn, .pn-button, .contacts-button, .calendar-button, .vd-button, .users-btn) { max-width: 100%; height: auto; white-space: normal; gap: 8px; }
body.ts2 #dashboardSection .dashboard-tabs { max-width: 100%; width: 100%; }
body.ts2 #dashboardSection .dashboard-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 16px; padding: 0 0 24px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; overflow: visible !important; }
body.ts2 #dashboardProvidersPanel > .card { padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; border: 0 !important; }
body.ts2 #dashboardProvidersPanel .preview-header p { display: none; }
body.ts2 #providerAccountSummary { gap: 0; background: white; border-block: 1px solid var(--ts-border); margin: 20px 0 24px; }
body.ts2 #providerAccountSummary > div { min-width: 0; border: 0; border-right: 1px solid var(--ts-border); border-radius: 0; box-shadow: none; padding: 16px; }
body.ts2 #providerAccountSummary > div:last-child { border-right: 0; }
body.ts2 #providerAccountSummary strong { font: 600 22px/1.4 var(--ts-font); overflow-wrap: anywhere; }
body.ts2 #providerAccountSummary :is(span,small) { font: 400 12px/1.5 var(--ts-font); text-transform: none; color: var(--ts-muted); }
body.ts2 #dashboardSection .topbar h1 { font-size: 28px !important; }
body.ts2 #dashboardBudgetsPanel .work-budget-table td button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; height: auto; line-height: 1.5; }
body.ts2 #vidrieraSection #vidrieraRoot .vd-pagination .vd-icon { flex-shrink: 0; }
@media (max-width: 640px) {
  body.ts2 #dashboardSection .dashboard-toolbar { grid-template-columns: minmax(0,1fr) !important; }
  body.ts2 #dashboardSection .topbar h1 { font-size: 24px !important; }
}
@media (max-width: 380px) {
  body.ts2 #calendarSection .calendar-toolbar .calendar-navigation,
  body.ts2 #calendarSection .calendar-toolbar .calendar-view-switch { grid-column: 1/-1; justify-self: start; }
  body.ts2 #vidrieraSection #vidrieraRoot .vd-pagination .vd-actions { flex-wrap: wrap; justify-content: flex-end; }
  body.ts2 #vidrieraSection #vidrieraRoot .vd-pagination .vd-inline-field { flex-basis: 100%; justify-content: flex-end; }
}

/* Budget entry and analysis keep the existing calculations and actions. */
body.ts2 #budgetAdminPanel { margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
body.ts2 #budgetAdminPanel .ts-form-block { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--ts-border); }
body.ts2 #budgetAdminPanel .ts-form-block h3 { font: 600 14px/1.5 var(--ts-font); margin: 8px 0 0; }
body.ts2 #budgetAdminPanel .ts-form-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; max-width: 800px; }
body.ts2 #budgetAdminPanel .ts-form-fields > :first-child, body.ts2 #budgetAdminPanel .budget-observation-field { grid-column: 1/-1; }
body.ts2 #budgetAdminPanel .ts-budget-save { display: flex; justify-content: flex-end; padding: 24px 0; }
body.ts2 #budgetAdminPanel #budgetHistoryList { border-top: 1px solid var(--ts-border); }
body.ts2 #budgetAdminPanel .compact-header p { display: none; }
body.ts2 #budgetAdminPanel .work-budget-history-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; padding: 20px 0; background: transparent; }
body.ts2 #budgetAdminPanel .work-budget-history-icon { display: none; }
body.ts2 #budgetAdminPanel .work-budget-history-row strong { font: 500 14px/1.5 var(--ts-font); }
body.ts2 #budgetAdminPanel .work-budget-history-row :is(span,time) { font: 400 12px/1.5 var(--ts-font); color: var(--ts-muted); }
body.ts2 #dashboardBudgetsPanel :is(.work-budget-eyebrow,.work-budget-header p,.work-budget-panel-head p,.work-budget-filter-note span) { display: none; }
body.ts2 #dashboardBudgetsPanel .work-budget-header { display: block; padding: 0; margin: 0 0 24px; border: 0; background: transparent; }
body.ts2 #dashboardBudgetsPanel .work-budget-header h2 { font: 600 18px/1.4 var(--ts-font); margin-bottom: 16px; }
body.ts2 #dashboardBudgetsPanel .work-budget-header-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 16px; max-width: none; }
body.ts2 #dashboardBudgetsPanel .work-budget-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; border-block: 1px solid var(--ts-border); margin: 0 0 28px; }
body.ts2 #dashboardBudgetsPanel .work-budget-metric { min-height: 0; padding: 20px; border: 0 !important; border-right: 1px solid var(--ts-border) !important; border-radius: 0 !important; box-shadow: none !important; background: white !important; }
body.ts2 #dashboardBudgetsPanel .work-budget-metric::after { display: none; }
body.ts2 #dashboardBudgetsPanel .work-budget-metric > span { font: 500 12px/1.5 var(--ts-font); color: var(--ts-muted); }
body.ts2 #dashboardBudgetsPanel .work-budget-metric strong { font: 650 23px/1.4 var(--ts-font); color: var(--ts-text); overflow-wrap: anywhere; }
body.ts2 #dashboardBudgetsPanel .work-budget-metric small { font: 400 12px/1.5 var(--ts-font); }
body.ts2 #dashboardBudgetsPanel .work-budget-overview { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 32px; margin-bottom: 28px; }
body.ts2 #dashboardBudgetsPanel .work-budget-panel { padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; min-width: 0; }
body.ts2 #dashboardBudgetsPanel .work-budget-panel-head { padding: 0 0 16px; border: 0; }
body.ts2 #dashboardBudgetsPanel .work-budget-panel-head span { font: 600 14px/1.4 var(--ts-font); }
body.ts2 #dashboardBudgetsPanel .work-budget-execution-body { grid-template-columns: minmax(0,1fr) 108px; gap: 24px; }
body.ts2 #dashboardBudgetsPanel .work-budget-donut { width: 108px; height: 108px; min-width: 0; }
body.ts2 #dashboardBudgetsPanel .work-budget-donut > div { width: 82px; height: 82px; }
body.ts2 #dashboardBudgetsPanel .work-budget-donut strong { font-size: 21px; }
body.ts2 #dashboardBudgetsPanel .work-budget-main-layout { display: block; }
body.ts2 #dashboardBudgetsPanel .ts-budget-filter-disclosure { margin: 16px 0 20px; border-block: 1px solid var(--ts-border); }
body.ts2 #dashboardBudgetsPanel .ts-budget-filter-disclosure summary { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; cursor: pointer; }
body.ts2 #dashboardBudgetsPanel .ts-budget-filter-disclosure summary::after { content: '+'; margin-left: auto; }
body.ts2 #dashboardBudgetsPanel .ts-budget-filter-disclosure[open] summary::after { content: '-'; }
body.ts2 #dashboardBudgetsPanel .ts-budget-filter-disclosure svg { width: 16px; height: 16px; }
body.ts2 #dashboardBudgetsPanel .work-budget-filters { position: static; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; align-items: end; padding: 12px 0 20px; }
body.ts2 #dashboardBudgetsPanel .work-budget-filters > .work-budget-panel-head { display: none; }
body.ts2 #dashboardBudgetsPanel .work-budget-filters .field { margin: 0; }
body.ts2 #dashboardBudgetsPanel .work-budget-filter-note { margin: 0; padding: 0; border: 0; background: transparent; }
body.ts2 #dashboardBudgetsPanel .work-budget-tabs { padding: 0; border: 0; gap: 24px; background: transparent; display: flex; overflow-x: auto; }
body.ts2 #dashboardBudgetsPanel .work-budget-tabs button { padding: 10px 0; min-height: 44px; font: 500 13px var(--ts-font); border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ts-muted); white-space: nowrap; }
body.ts2 #dashboardBudgetsPanel .work-budget-tabs button.active { color: var(--ts-brand); border-bottom-color: var(--ts-brand); }
body.ts2 #dashboardBudgetsPanel .work-budget-table { min-width: 960px; }
body.ts2 #dashboardBudgetsPanel .work-budget-table :is(th,td) { font-size: 12px; padding: 12px; white-space: nowrap; }
body.ts2 #dashboardBudgetsPanel .work-budget-table th { text-transform: none; background: var(--ts-subtle); font-weight: 500; }
body.ts2 #dashboardBudgetsPanel .work-budget-table td { background: white; }
body.ts2 #dashboardBudgetsPanel .budget-table-wrap { max-width: 100%; width: 100%; overflow-x: auto !important; overscroll-behavior-x: contain; }

/* Dialogs inherit the same readable type and field scale as their workspaces. */
body.ts2 :is(#contactModalOverlay,#calendarModalOverlay) { font: 14px/1.5 var(--ts-font); }
body.ts2 :is(#contactModalOverlay,#calendarModalOverlay) [hidden] { display: none !important; }
body.ts2 :is(#contactModalOverlay,#calendarModalOverlay) :is(input,textarea,button) { font-family: var(--ts-font); letter-spacing: 0; }
body.ts2 :is(#contactModalOverlay,#calendarModalOverlay) :is(input,textarea) { width: 100% !important; min-width: 0 !important; font-size: 16px !important; font-weight: 400 !important; min-height: 44px; border-radius: 6px !important; }
body.ts2 #calendarModalOverlay input[type="checkbox"] { min-height: 18px; }
body.ts2 :is(#contactModalOverlay,#calendarModalOverlay) .primary { background: var(--ts-brand); border-color: var(--ts-brand); color: white; box-shadow: none; }
body.ts2 :is(#contactModalOverlay,#calendarModalOverlay) h2 { font: 650 20px/1.4 var(--ts-font); }
body.ts2 #calendarModalOverlay .calendar-eyebrow, body.ts2 #contactModalOverlay .contacts-modal-head p { display: none; }
body.ts2 :is(#contactModalOverlay,#calendarModalOverlay) :is(.contacts-modal,.calendar-modal) { display: flex; flex-direction: column; overflow: hidden; border-radius: 8px !important; max-height: calc(100dvh - 32px) !important; }
body.ts2 :is(#contactForm,#calendarForm) { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
body.ts2 :is(.contacts-modal-head,.calendar-modal-head,.contacts-modal-actions,.calendar-modal-actions) { flex: 0 0 auto; }
body.ts2 #contactModalOverlay .contacts-modal-body, body.ts2 #calendarModalOverlay .calendar-modal-body { overflow-y: auto; min-height: 0; padding: 20px; }
body.ts2 #contactModalOverlay .contacts-form-field, body.ts2 #calendarModalOverlay .calendar-field > span { font-weight: 500; font-size: 12px; color: var(--ts-muted); }
body.ts2 #calendarModalOverlay .calendar-check input { width: 18px !important; min-height: 18px !important; }
body.ts2 #contactModal[data-mode="view"] :is(input,textarea) { background: transparent !important; border: 0 !important; box-shadow: none !important; outline: none !important; padding: 0 !important; min-height: 28px !important; pointer-events: auto; color: var(--ts-text) !important; }
body.ts2 #contactModal[data-mode="view"] input { height: 28px !important; }
body.ts2 #contactModal[data-mode="view"] .contacts-form-field { padding-bottom: 12px; border-bottom: 1px solid var(--ts-border); gap: 2px; }
body.ts2 #calendarModalOverlay .calendar-modal-actions, body.ts2 #contactModalOverlay .contacts-modal-actions { padding: 12px 20px; background: white; border-top: 1px solid var(--ts-border); }
body.ts2 #calendarModalOverlay .calendar-modal-actions { display: flex !important; justify-content: flex-end; flex-wrap: wrap; }
body.ts2 #calendarModalOverlay #calendarDeleteBtn { margin-right: auto; }
body.ts2 #calendarModalOverlay .calendar-modal-actions > span { display: none; }
body.ts2 #calendarModalOverlay .calendar-colors button { width: 32px; height: 32px; }

@media (max-width: 1279px) {
  body.ts2 .ts-home-overview { grid-template-columns: minmax(0,1fr); }
  body.ts2 #calendarSection .ts-calendar-layout { grid-template-columns: minmax(0,1fr); }
  body.ts2 #calendarSection .ts-calendar-agenda { max-width: none; }
  body.ts2 #calendarSection #calendarAgendaEvents { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; }
  body.ts2 #dashboardBudgetsPanel .work-budget-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  body.ts2 #contactsSection .contacts-table, body.ts2 #contactsSection .contacts-table tbody { display: block !important; }
  body.ts2 #contactsSection .contacts-table thead { display: none !important; }
  body.ts2 #contactsSection .contacts-table tr { display: grid !important; grid-template-columns: 24px minmax(0,1fr); gap: 8px 12px !important; padding: 16px !important; margin: 0 !important; border: 0 !important; border-bottom: 1px solid var(--ts-border) !important; border-radius: 0 !important; box-shadow: none !important; background: white; }
  body.ts2 #contactsSection .contacts-table td { display: block !important; grid-column: 2; width: auto !important; max-width: none !important; padding: 0 !important; border: 0 !important; margin: 0; }
  body.ts2 #contactsSection .contacts-table td:first-child { display: block !important; grid-column: 1; grid-row: 1; padding-top: 8px !important; }
  body.ts2 #contactsSection .contacts-table td::before { display: none; }
  body.ts2 #contactsSection .contacts-table td[data-label="Cumpleaños"]::before { content: 'Cumpleaños '; display: inline; margin-right: 6px; font: 400 12px var(--ts-font) !important; text-transform: none !important; letter-spacing: 0 !important; }
  body.ts2 #contactsSection .contacts-name-copy strong { font-size: 15px; }
  body.ts2 #contactsSection .contacts-table-wrap { padding: 0; }
  body.ts2 #contactsSection .contacts-row-button { width: 44px; height: 44px; }
  body.ts2 #contactsSection .contacts-row-actions { width: auto; justify-content: flex-end; }
  body.ts2 #contactsSection .contacts-table td:last-child { margin-top: 4px; border-top: 1px solid var(--ts-border) !important; padding-top: 6px !important; }
  body.ts2 #calendarSection .calendar-toolbar { grid-template-columns: minmax(0,1fr) auto !important; }
  body.ts2 #calendarSection .calendar-toolbar h2 { grid-row: 1; grid-column: 1/-1; }
  body.ts2 #dashboardBudgetsPanel .work-budget-overview { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
  body.ts2 #homeSection .ts-home-metrics { grid-template-columns: minmax(0,1fr); border-bottom: 0; }
  body.ts2 #homeSection .ts-home-metric { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto auto; min-height: 0; gap: 3px 12px; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--ts-border); }
  body.ts2 #homeSection .ts-home-metric > span { min-height: 0; align-items: center; font-size: 13px; }
  body.ts2 #homeSection .ts-home-metric > strong { grid-column: 2; grid-row: 1/3; align-self: center; font-size: 26px; }
  body.ts2 #homeSection .ts-home-metric > small { grid-column: 1; padding-left: 26px; font-size: 11px; }
  body.ts2 #contactsSection .contacts-summary { gap: 8px 16px; }
  body.ts2 #contactsSection .contacts-summary #contactsBirthdayBtn { margin-left: auto; }
  body.ts2 #contactsSection .contacts-toolbar { flex-wrap: wrap; }
  body.ts2 #contactsSection .contacts-search-label { flex-basis: 100%; }
  body.ts2 #contactsSection .contacts-toolbar-actions { margin-left: auto; }
  body.ts2 #contactsSection .contacts-alpha button { min-height: 44px; min-width: 36px !important; }
  body.ts2 #calendarSection .calendar-page-header { align-items: center; flex-wrap: wrap; }
  body.ts2 #calendarSection .calendar-page-header .primary { width: auto !important; }
  body.ts2 #calendarSection .calendar-view-switch { width: auto; grid-template-columns: repeat(3,1fr); }
  body.ts2 #calendarSection .calendar-view-switch button { min-width: 40px; padding: 0 6px; height: 40px; }
  body.ts2 #calendarSection .calendar-toolbar { gap: 12px; }
  body.ts2 #calendarSection .calendar-toolbar h2 { font-size: 18px; }
  body.ts2 #calendarSection .calendar-navigation { gap: 2px; }
  body.ts2 #calendarSection .calendar-icon-button { width: 44px; height: 44px; min-height: 44px; }
  body.ts2 #calendarSection #calendarTodayBtn { padding: 8px; }
  body.ts2 #calendarSection .calendar-month-grid { grid-template-rows: 32px repeat(6,60px); }
  body.ts2 #calendarSection .calendar-day { padding: 2px; }
  body.ts2 #calendarSection .calendar-day-number { width: 100%; height: 40px; margin: 0; border-radius: 4px; }
  body.ts2 #calendarSection .calendar-day-events { display: none; }
  body.ts2 #calendarSection .ts-calendar-dots { display: flex; gap: 3px; height: 10px; justify-content: center; align-items: center; }
  body.ts2 #calendarSection .ts-calendar-dots i { width: 4px; height: 4px; border-radius: 50%; }
  body.ts2 #calendarSection #calendarAgendaEvents { grid-template-columns: minmax(0,1fr); }
  body.ts2 #budgetAdminPanel .ts-form-block { grid-template-columns: minmax(0,1fr); gap: 16px; padding: 20px 0; }
  body.ts2 #budgetAdminPanel .ts-form-fields { grid-template-columns: minmax(0,1fr); }
  body.ts2 #budgetAdminPanel .ts-budget-save .btn { width: 100%; }
  body.ts2 #budgetAdminPanel .work-budget-history-row { grid-template-columns: minmax(0,1fr); gap: 8px; }
  body.ts2 #dashboardBudgetsPanel .work-budget-header-actions { grid-template-columns: minmax(0,1fr); }
  body.ts2 #dashboardBudgetsPanel .work-budget-action-field label { display: none; }
  body.ts2 #dashboardBudgetsPanel .work-budget-metric { padding: 12px; }
  body.ts2 #dashboardBudgetsPanel .work-budget-metric strong { font-size: 18px; }
  body.ts2 #dashboardBudgetsPanel .work-budget-execution-body { grid-template-columns: minmax(0,1fr); }
  body.ts2 #dashboardBudgetsPanel .work-budget-donut { display: none; }
  body.ts2 #dashboardBudgetsPanel .work-budget-filters { grid-template-columns: minmax(0,1fr); }
  body.ts2 #dashboardBudgetsPanel .work-budget-table { display: table !important; min-width: 1000px !important; table-layout: auto !important; }
  body.ts2 #dashboardBudgetsPanel .work-budget-table thead { display: table-header-group !important; }
  body.ts2 #dashboardBudgetsPanel .work-budget-table tbody { display: table-row-group !important; }
  body.ts2 #dashboardBudgetsPanel .work-budget-table tr { display: table-row !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  body.ts2 #dashboardBudgetsPanel .work-budget-table :is(th,td) { display: table-cell !important; max-width: none !important; width: auto !important; padding: 12px !important; white-space: nowrap !important; font-size: 13px !important; }
  body.ts2 #dashboardBudgetsPanel .work-budget-table td::before { display: none !important; }
  body.ts2 #dashboardBudgetsPanel .work-budget-eye { width: 44px !important; min-width: 44px !important; height: 44px !important; padding: 10px !important; }
  body.ts2 #calendarModalOverlay .calendar-form-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; }
}
