/* Internal work surfaces only. PDF documents, signature canvases and TV players retain their styles. */
body.ts2 .ts-module {
  --ts-filter-control-size: 40px;
  --pn-orange: var(--ts-brand); --pn-ink: var(--ts-text); --pn-muted: var(--ts-muted); --pn-border: var(--ts-border);
  --reservations-orange: var(--ts-brand); --reservations-ink: var(--ts-text); --reservations-muted: var(--ts-muted); --reservations-line: var(--ts-border);
  font: 14px/1.5 var(--ts-font) !important; color: var(--ts-text) !important;
}
body.ts2 .ts-module [hidden], body.ts2 .ts-module-dialog[hidden] { display: none !important; }
body.ts2 .cs-dialog footer > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
body.ts2 .ts-module :is(button, input, select, textarea, label, th, td) { font-family: var(--ts-font) !important; letter-spacing: 0 !important; }
body.ts2 .ts-module :is(button, a):focus-visible { outline: 2px solid var(--ts-focus) !important; outline-offset: 3px; }
body.ts2 .ts-module :is(.reservations-shell, .purchase-notes-shell, .contacts-shell, .calendar-shell, .vd-shell, .cs-shell, .renditions-shell) { max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
body.ts2 .ts-module :is(.topbar, .purchase-notes-header, .contacts-topbar, .calendar-page-header, .vd-header, .renditions-header, .cs-shell > header) {
  min-height: 0 !important; padding: 8px 0 24px !important; margin: 0 !important;
  background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
}
body.ts2 .ts-module :is(.topbar, .purchase-notes-header, .contacts-topbar, .calendar-page-header, .vd-header, .renditions-header, .cs-shell > header) h1 {
  font: 650 28px/1.25 var(--ts-font) !important; letter-spacing: 0 !important; color: var(--ts-text) !important; margin: 0 !important;
}
body.ts2 .ts-module :is(.subtitle, .reservations-eyebrow, .reservations-header-context, .reservation-surface-kicker,
  .reservation-history-emblem, .purchase-note-editor-head p, .pn-items-head p, .pn-field-note,
  .reservation-surface-head p, .commercial-ledger-header p, .contacts-topbar p, .calendar-page-header p,
  .renditions-header p, #generatedOrderIntro, .generated-items .preview-header p, .vd-brand > p) { display: none !important; }
body.ts2 .ts-module :is(.btn, .table-btn, .pn-button, .pn-icon-button, .contacts-button, .calendar-button, .vd-button, .vd-icon-button, .users-btn, .cs-shell button, .ts-module-tabs button) {
  min-height: 40px !important; padding: 8px 12px; border-radius: 6px !important; box-shadow: none !important;
  font-size: 13px !important; font-weight: 600 !important; line-height: 1.4 !important; letter-spacing: 0 !important;
  transition: background-color .15s !important; transform: none !important; text-transform: none !important;
}
body.ts2 .ts-module :is(.btn, .pn-button, .contacts-button, .calendar-button, .vd-button) { display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
body.ts2 .ts-module :where(.btn.secondary, .table-btn, .pn-button:not(.primary), .pn-icon-button, .contacts-button:not(.primary), .calendar-button:not(.primary), .vd-button:not(.primary), .vd-icon-button, .cs-shell button) {
  background: var(--ts-surface) !important; color: var(--ts-text) !important; border: 1px solid var(--ts-border) !important;
}
body.ts2 .ts-module :is(.btn:not(.secondary), .pn-button.primary, .contacts-button.primary, .calendar-button.primary, .vd-button.primary, .users-btn.primary) {
  background: var(--ts-brand) !important; border-color: var(--ts-brand) !important; color: white !important;
}
body.ts2 .ts-module :is(.btn, .pn-button, .contacts-button, .calendar-button, .vd-button) svg { width: 18px !important; height: 18px !important; flex-shrink: 0; }
body.ts2 .ts-module :is(.pn-icon-button, .reservation-refresh-btn, .generated-remove-item) { width: 40px !important; min-width: 40px !important; height: 40px !important; padding: 8px !important; }
body.ts2 .ts-module :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]), select, textarea) {
  min-width: 0; max-width: 100%; min-height: 40px !important; border: 1px solid var(--ts-border) !important; border-radius: 6px !important;
  background-color: var(--ts-surface) !important; color: var(--ts-text) !important; font-size: 14px !important; font-weight: 400 !important; line-height: 1.4 !important;
  box-shadow: none !important;
}
body.ts2 .ts-module :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]), select, textarea) { padding: 9px 12px !important; }
body.ts2 .ts-module :is(input, select, textarea):focus { border-color: var(--ts-focus) !important; outline: 2px solid var(--ts-brand-tint); outline-offset: 1px; }
body.ts2 .ts-module :is(input:disabled, input[readonly]) { background: var(--ts-subtle) !important; color: var(--ts-muted) !important; }
body.ts2 .ts-module textarea { min-height: 96px !important; resize: vertical; }
body.ts2 .ts-module :is(.field > label, .pn-field > span, .pn-field > label, .pn-filter > span, .vd-field > span) {
  display: block; margin-bottom: 6px; color: var(--ts-muted) !important; font-size: 12px !important; font-weight: 500 !important; line-height: 1.4 !important; text-transform: none !important;
}
body.ts2 .ts-module :is(.field, .pn-field, .pn-filter) { min-width: 0; }
body.ts2 .ts-module :is(.card, .purchase-note-editor, .purchase-notes-history, .reservations-list-surface, .reservation-monthly-surface, .contacts-table-card, .cs-table-wrap, .vd-table-scroll) {
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; margin-inline: 0 !important; width: 100%;
}
body.ts2 .ts-module :is(.preview-header, .pn-history-head, .pn-items-head, .purchase-note-editor-head, .reservation-surface-head, .commercial-ledger-header) {
  padding: 0 0 16px !important; margin: 0 !important; min-height: 0 !important; background: transparent !important;
}
body.ts2 .ts-module :is(.preview-header, .pn-history-head, .pn-items-head, .purchase-note-editor-head, .reservation-surface-head, .commercial-ledger-header) :is(h2,h3) {
  font: 650 17px/1.4 var(--ts-font) !important; letter-spacing: 0 !important; margin: 0 !important; color: var(--ts-text) !important;
}
body.ts2 .ts-module :is(.pn-status, .reservation-status-badge, .vd-badge) { text-transform: none !important; font-size: 12px !important; font-weight: 600 !important; border-radius: 4px !important; box-shadow: none !important; }

/* A single navigation rhythm across the work modules. */
body.ts2 .ts-module :is(.ts-module-tabs, .reservations-tabs, .vd-tabs, .cs-tabs, .renditions-tabs, .dashboard-tabs) {
  display: flex !important; align-items: center; gap: 24px !important; overflow-x: auto !important;
  margin: 0 0 24px !important; padding: 0 !important; border: 0 !important; border-bottom: 1px solid var(--ts-border) !important;
  border-radius: 0 !important; background: transparent !important; box-shadow: none !important; scrollbar-width: thin;
}
body.ts2 .ts-module :is(.ts-module-tabs, .reservations-tabs, .vd-tabs, .cs-tabs, .renditions-tabs, .dashboard-tabs) > button {
  display: inline-flex; gap: 8px; align-items: center; justify-content: center; flex: 0 0 auto !important;
  padding: 12px 8px !important; min-height: 44px !important; height: auto !important; border: 0 !important; border-bottom: 2px solid transparent !important;
  border-radius: 0 !important; background: transparent !important; color: var(--ts-muted) !important; box-shadow: none !important;
  font: 500 13px/1.4 var(--ts-font) !important; white-space: nowrap;
}
body.ts2 .ts-module :is(.ts-module-tabs, .reservations-tabs, .vd-tabs, .cs-tabs, .renditions-tabs, .dashboard-tabs) > :is(.active,[aria-selected="true"]) {
  border-bottom-color: var(--ts-brand) !important; color: var(--ts-brand) !important;
}
.ts-module-tabs svg { width: 18px; height: 18px; }
.reservations-tabs > button > svg { width: 18px; height: 18px; flex-shrink: 0; }
body.ts2 #reservationsSection .reservation-ledger-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.ts2 #reservationsSection .commercial-ledger-finalize-btn { display: inline-flex; align-items: center; gap: 6px; }
body.ts2 #reservationsSection .commercial-ledger-finalize-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
body.ts2 #reservationsSection .reservation-conformation-tabs[hidden],
body.ts2 #reservationsSection #openCommercialRecordBtn[hidden] { display: none !important; }
body.ts2 #reservationsSection #openCommercialRecordBtn::before { content: none !important; }
body.ts2 #reservationsSection [data-reservation-panel="commercial"] .reservations-table-scroll { width: 100%; max-width: 100%; margin: 0 !important; }
body.ts2 #reservationsSection .reservations-ledger-table[data-completion="finalized"] :is(thead th:last-child, td[data-label="Acciones"]) { display: none !important; }
body.ts2 #reservationsSection .reservations-ledger-table th { white-space: nowrap !important; word-break: normal !important; overflow-wrap: normal !important; }
@media (min-width: 721px) {
  body.ts2 #reservationsSection .reservations-ledger-table { table-layout: auto !important; }
}
@media (max-width: 720px) {
  body.ts2.mobile-ios-body #reservationsSection [data-reservation-panel="commercial"] .reservations-list-surface {
    border: 0 !important; border-radius: 0 !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible !important;
  }
  body.ts2.mobile-ios-body #reservationsSection .commercial-ledger-header {
    width: 100% !important; min-height: 0 !important; margin: 0 !important; padding: 0 0 16px !important;
    display: flex !important; flex-direction: row !important; align-items: center !important; gap: 12px !important; text-align: left !important;
    background: transparent !important; border: 0 !important;
  }
  body.ts2.mobile-ios-body #reservationsSection .commercial-ledger-header > div { min-width: 0; }
  body.ts2.mobile-ios-body #reservationsSection .commercial-ledger-header h2 { font: 650 17px/1.4 var(--ts-font) !important; margin: 0 !important; }
  body.ts2.mobile-ios-body #reservationsSection #openCommercialRecordBtn { flex: 0 0 40px !important; width: 40px !important; min-width: 40px !important; height: 40px !important; padding: 8px !important; border-radius: 6px !important; }
  body.ts2.mobile-ios-body #reservationsSection .reservations-ledger-table tbody tr { border-radius: 8px !important; margin-inline: 0 !important; box-shadow: none !important; }
  body.ts2.mobile-ios-body #reservationsSection .reservation-ledger-actions { width: 100%; }
  body.ts2.mobile-ios-body #reservationsSection .reservation-ledger-actions .table-btn { flex: 1 1 112px; width: auto !important; justify-content: center; }
}
body.ts2 .ts-module :is(.pn-history-table, .reservations-history-table, .contacts-table, .cs-table, .vd-table) th {
  background: var(--ts-subtle) !important; font-size: 12px !important; text-transform: none !important; font-weight: 500 !important; color: var(--ts-muted) !important; height: 40px;
}
body.ts2 .ts-module :is(.pn-history-table, .reservations-history-table, .contacts-table, .cs-table, .vd-table) td {
  background: var(--ts-surface); font-size: 13px !important; padding: 14px 12px !important; border-bottom: 1px solid var(--ts-border) !important;
}
body.ts2 .ts-module :is(.pn-history-table, .reservations-history-table, .contacts-table, .cs-table, .vd-table) strong { font-weight: 600 !important; }
body.ts2 :is(.orders-pagination, .audit-pagination, .pn-pagination, .reservations-pagination, .contacts-pagination, .vd-pagination, .cs-shell > footer) {
  box-sizing: border-box; min-width: 0; max-width: 100%; padding: 20px 16px !important; margin: 0 !important;
  gap: 12px !important; align-items: center; flex-wrap: wrap; box-shadow: none !important;
}
body.ts2 :is(.orders-pagination-actions, .audit-pagination) { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px !important; }
body.ts2 :is(.orders-pagination, .audit-pagination, .pn-pagination, .reservations-pagination, .contacts-pagination, .vd-pagination, .cs-shell > footer) :is(button, .btn, .table-btn) {
  flex: 0 0 auto; width: auto !important; min-height: 40px !important; margin: 0 !important; padding: 10px 14px !important; line-height: 1.4 !important;
}
body.ts2 :is(.orders-pagination, .audit-pagination, .pn-pagination, .reservations-pagination, .contacts-pagination, .vd-pagination, .cs-shell > footer) :is(span, .orders-pagination-info) { min-width: 0; overflow-wrap: anywhere; }
body.ts2 .ts-module :is(.pn-filters, .reservation-history-filters, .reservation-filter-panel, .contacts-toolbar, .cs-filters) {
  border: 0 !important; border-radius: 0 !important; background: transparent !important; padding: 0 0 20px !important; margin: 0 !important; gap: 12px !important;
}

/* Reservations: open form sections, compact history and independent statistics. */
body.ts2 #reservationsSection :is(.reservation-create-card, .reservations-history-surface, .reservations-list-surface, .reservations-templates-surface, .reservation-monthly-surface) { padding: 0 !important; }
body.ts2 #reservationsSection .reservation-form-section {
  display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 24px; padding: 24px 0 !important; margin: 0 !important;
  background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--ts-border) !important; border-radius: 0 !important; box-shadow: none !important;
}
body.ts2 #reservationsSection .reservation-form-section > h3 { font: 600 14px/1.5 var(--ts-font) !important; margin: 8px 0 0 !important; padding: 0 !important; border: 0 !important; }
body.ts2 #reservationsSection .reservation-form-section { align-items: start !important; }
body.ts2 #reservationsSection .reservation-form-section > h3::before { display: none; }
body.ts2 #reservationsSection .reservation-fields-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; padding: 0 !important; gap: 16px !important; }
body.ts2 #reservationsSection .reservation-form-sections { gap: 0 !important; }
body.ts2 #reservationsSection .reservation-actions { border: 0 !important; padding: 24px 0 !important; }
body.ts2 #reservationsSection .reservation-primary-fields { max-width: 800px; }
body.ts2 #reservationsSection .reservation-history-filters { grid-template-columns: minmax(220px,1fr) minmax(140px,180px) minmax(160px,220px) 40px !important; align-items: end; }
body.ts2 #reservationsSection .reservation-history-search-control input { padding-left: 38px !important; }
body.ts2 #reservationsSection .reservation-summary-grid-compact { margin: 0 0 20px !important; padding: 0 !important; gap: 0 !important; border-block: 1px solid var(--ts-border) !important; background: white !important; }
body.ts2 #reservationsSection .reservation-summary-item { padding: 16px 20px !important; margin: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
body.ts2 #reservationsSection .reservation-summary-item::before { display: none !important; }
body.ts2 #reservationsSection .reservation-summary-item strong { font: 650 26px/1.2 var(--ts-font) !important; }
body.ts2 #reservationsSection .reservation-summary-item span { font-size: 12px !important; text-transform: none !important; font-weight: 500 !important; }
body.ts2 #reservationsSection .reservation-summary-item small { display: none !important; }
body.ts2 #reservationsSection .reservations-history-surface .orders-table-scroll { width: 100% !important; margin: 0 !important; border-radius: 0 !important; }
body.ts2 #reservationsSection .reservations-history-table { min-width: 980px !important; }
body.ts2 #reservationsSection .reservations-history-table { table-layout: auto !important; }
body.ts2 #reservationsSection .reservations-history-table th { width: auto !important; padding: 10px 12px !important; }
body.ts2 #reservationsSection .reservations-history-table :is([data-label="Fecha"],[data-label="Importe"]) { white-space: nowrap; font-variant-numeric: tabular-nums; }
body.ts2 #reservationsSection .reservation-actions-cell { gap: 4px !important; }
body.ts2 #reservationsSection .reservation-actions-cell .table-btn { width: 32px !important; min-width: 32px !important; height: 36px !important; min-height: 36px !important; padding: 6px !important; }
body.ts2 #reservationsSection .reservation-actions-cell svg { width: 16px !important; height: 16px !important; }
body.ts2 #reservationsSection .reservation-owner-avatar { display: none; }
body.ts2 #reservationsSection .reservation-property-cell { min-width: 130px; }
body.ts2 #reservationsSection .reservation-monthly-summary { border-block: 1px solid var(--ts-border); background: white; padding: 16px 0; gap: 0; }
body.ts2 #reservationsSection .reservation-monthly-summary > div { padding: 0 20px; }
body.ts2 #reservationsSection .reservation-monthly-summary strong { font-size: 28px !important; }
body.ts2 #reservationsSection .reservation-operation-tabs button { border-radius: 6px !important; }
body.ts2 #reservationsSection .reservation-operation-tabs button.active { background: var(--ts-brand) !important; color: white !important; }

/* Notes: separate editing and history, no nested surface frames. */
body.ts2 #purchaseNotesSection .purchase-note-form { padding: 24px 0 0 !important; }
body.ts2 #purchaseNotesSection .purchase-notes-history { margin: 0 !important; overflow: visible; }
body.ts2 #purchaseNotesSection .pn-form-grid { gap: 20px; max-width: 1040px; }
body.ts2 #purchaseNotesSection .pn-items-block { padding: 24px 0 0; margin-top: 24px; }
body.ts2 #purchaseNotesSection .pn-item-row { padding: 12px 0; }
body.ts2 #purchaseNotesSection .pn-items-labels { font-weight: 500; text-transform: none; font-size: 12px; }
body.ts2 #purchaseNotesSection .pn-item-row, body.ts2 #purchaseNotesSection .pn-items-labels { grid-template-columns: 100px minmax(180px,1fr) 150px 132px; }
body.ts2 #purchaseNotesSection .pn-form-actions { padding: 20px 0 0; margin-top: 20px; }
body.ts2 #purchaseNotesSection .pn-filters-simple { grid-template-columns: minmax(220px,1fr) 170px 170px 40px; align-items: end; }
body.ts2 .pn-filters > .pn-filter,
body.ts2 .reservation-history-filters > .field,
body.ts2 .cs-filters > label,
body.ts2 #vidrieraRoot .vd-filter-fields > .vd-field { margin: 0 !important; }
body.ts2 .pn-filters > .pn-filter { gap: 6px; }
body.ts2 .pn-filters > .pn-filter > span { margin: 0 !important; }
body.ts2 #purchaseNotesSection .pn-filters input,
body.ts2 #purchaseNotesSection #purchaseNotesClearFilters,
body.ts2 #reservationsSection .reservation-history-filters :is(input, select, button),
body.ts2 #vidrieraSection #vidrieraRoot .vd-filter-fields :is(select, .vd-icon) {
  height: var(--ts-filter-control-size) !important; min-height: var(--ts-filter-control-size) !important; padding-block: 7px !important;
}
body.ts2 #vidrieraSection #vidrieraRoot .vd-filter-fields > .vd-icon { width: var(--ts-filter-control-size) !important; min-width: var(--ts-filter-control-size) !important; margin: 0 !important; align-self: end; }
body.ts2 .ts-module .ts-filter-action {
  display: inline-flex; align-items: center; justify-content: center; align-self: end; margin: 0 !important;
  background: var(--ts-surface) !important; color: var(--ts-muted) !important; border: 1px solid var(--ts-border) !important;
  border-radius: 6px !important; box-shadow: none !important; transform: none !important;
}
body.ts2 .ts-module .ts-filter-action:hover { background: var(--ts-subtle) !important; color: var(--ts-text) !important; border-color: var(--ts-muted) !important; }
body.ts2 .ts-module .ts-filter-action svg { width: 18px !important; height: 18px !important; stroke-width: 1.75; }
@media (max-width: 380px) {
  body.ts2 #purchaseNotesSection .pn-filters.pn-filters-simple { grid-template-columns: minmax(0,1fr) 44px; }
  body.ts2 #purchaseNotesSection .pn-filters-simple > .pn-filter:nth-child(2) { grid-column: 1/-1; }
}
body.ts2 #purchaseNotesSection .pn-note-number { font-weight: 600; }
body.ts2 #purchaseNotesDetailOverlay .purchase-notes-detail { border-radius: 8px !important; max-width: 1000px; }
body.ts2 #purchaseNotesDetailOverlay :is(.pn-detail-head, .pn-detail-body, .pn-detail-actions) { padding: 20px 24px; }
body.ts2 #purchaseNotesDetailOverlay .pn-detail-grid { gap: 24px; }
body.ts2 #purchaseNotesDetailOverlay .pn-detail-grid :is(strong, span, small) { font-family: var(--ts-font); letter-spacing: 0; }

/* Orders: consistent grouped fields and a final submit action. */
body.ts2 #newOrderSection #generatedOrderForm { padding: 0 !important; }
body.ts2 #newOrderSection .generated-simple-grid { display: block !important; margin: 0 !important; }
body.ts2 #newOrderSection .ts-form-block { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 24px; border-top: 1px solid var(--ts-border); padding: 24px 0; }
body.ts2 #newOrderSection .ts-form-block h3 { font: 600 14px/1.5 var(--ts-font); margin: 8px 0 0; }
body.ts2 #newOrderSection .ts-form-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; min-width: 0; }
body.ts2 #newOrderSection .ts-form-fields .field { margin: 0; }
body.ts2 #newOrderSection .generated-progress { padding: 16px 0 !important; margin: 0 0 16px !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
body.ts2 #newOrderSection .progress-track { height: 4px !important; }
body.ts2 #newOrderSection .progress-step { background: transparent !important; border: 0 !important; padding: 4px 0 !important; font-size: 12px; }
body.ts2 #newOrderSection :is(.generated-items, .generated-summary-grid, .compact-upload) { margin: 0 !important; padding: 24px 0 !important; border: 0 !important; border-top: 1px solid var(--ts-border) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
body.ts2 #newOrderSection .generated-item-row { grid-template-columns: minmax(200px,1fr) 100px 160px 160px 40px !important; gap: 12px !important; padding: 16px 0 !important; margin: 0 !important; border: 0 !important; border-bottom: 1px solid var(--ts-border) !important; background: transparent !important; border-radius: 0 !important; }
body.ts2 #newOrderSection .generated-item-total { min-height: 40px; font-size: 14px !important; background: var(--ts-subtle) !important; border: 0 !important; border-radius: 6px !important; }
body.ts2 #newOrderSection .generated-total-box { padding: 20px !important; background: var(--ts-surface) !important; border: 0 !important; border-left: 2px solid var(--ts-brand) !important; border-radius: 0 !important; box-shadow: none !important; }
body.ts2 #newOrderSection .generated-summary-grid { grid-template-columns: minmax(0,1fr) 360px !important; gap: 24px !important; }
body.ts2 #newOrderSection .generated-total-box { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-content: start; align-items: baseline; }
body.ts2 #newOrderSection .generated-total-box strong { font-size: 16px !important; color: var(--ts-text) !important; text-align: right; margin: 0 !important; white-space: nowrap; }
body.ts2 #newOrderSection .generated-total-box span { color: var(--ts-muted) !important; font-size: 12px !important; }
body.ts2 #newOrderSection .ts-order-submit { display: flex; justify-content: flex-end; padding: 20px 0; border-top: 1px solid var(--ts-border); }
body.ts2 #newOrderSection .generated-hidden-field { display: none !important; }
body.ts2 #cancelGeneratedEditBtn:is([style*="display: none"],[style*="display:none"]) { display: none !important; }
body.ts2 #newOrderSection .file-preview-list img { width: 100%; height: auto; max-height: 220px; object-fit: contain; }

/* Shared secondary modules keep their own behavior and dense domain layouts. */
body.ts2 #adminSection > .topbar > .status-pill { display: none !important; }
body.ts2 #adminSection .admin-panel { padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; }
body.ts2 #auditPanel > .preview-header h2 { display: none; }
body.ts2 #auditPanel > .preview-header { padding-bottom: 20px !important; gap: 16px !important; }
body.ts2 #auditPanel .audit-pagination .btn { min-width: 0 !important; }
body.ts2 #adminSection :is(.admin-hub-card, .database-hub-card) { border: 1px solid var(--ts-border) !important; border-radius: 6px !important; box-shadow: none !important; background: white !important; padding: 20px !important; }
body.ts2 #adminSection .users-enterprise-header { background: transparent !important; padding: 0 0 20px !important; border: 0 !important; box-shadow: none !important; }
body.ts2 #adminSection .users-enterprise-header h2 { font: 650 20px/1.4 var(--ts-font) !important; }
body.ts2 #adminSection .users-enterprise-header :is(h2,p,.users-back-link) { display: none !important; }
body.ts2 #adminSection .users-enterprise-header { justify-content: flex-end; margin-top: -4px; }
body.ts2 #adminSection :is(.users-directory-surface, .users-filter-bar) { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; }
body.ts2 #adminSection .users-filter-bar { padding: 0 0 20px !important; gap: 12px !important; }
body.ts2 #adminSection .users-filter-bar > label > span { color: var(--ts-muted); font-size: 12px; font-weight: 500; }
body.ts2 #adminSection #adminUserSearch { padding-left: 38px !important; }
body.ts2 #adminSection .users-enterprise-table { min-width: 760px; border-collapse: collapse; }
body.ts2 #adminSection .users-enterprise-table th { font: 500 12px/1.4 var(--ts-font) !important; background: var(--ts-subtle) !important; text-transform: none !important; padding: 12px !important; }
body.ts2 #adminSection .users-enterprise-table td { font: 400 13px/1.5 var(--ts-font) !important; background: white; border-bottom: 1px solid var(--ts-border); padding: 14px 12px !important; }
body.ts2 #adminSection .users-enterprise-table strong { font-size: 13px !important; font-weight: 600 !important; }
body.ts2 #adminSection .users-enterprise-table button { min-width: 40px; min-height: 40px; border-radius: 6px !important; box-shadow: none !important; }
body.ts2 #adminSection .users-native-drawer { border-radius: 8px 0 0 8px !important; max-width: min(760px,100vw) !important; }
body.ts2 #adminUserDrawer[aria-hidden="true"] { visibility: hidden; pointer-events: none; }
body.ts2 #adminSection :is(.users-native-section,.users-permission-module) { border: 0 !important; border-bottom: 1px solid var(--ts-border) !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; }
body.ts2 #adminSection .users-native-section { padding: 20px 0 !important; margin: 0 !important; }
body.ts2 #adminSection .users-drawer-profile { padding: 20px 24px !important; }
body.ts2 #adminSection .users-drawer-profile h3 { font: 650 20px/1.4 var(--ts-font) !important; }
body.ts2 #adminSection .users-drawer-body { padding: 0 24px !important; }
body.ts2 #adminSection .users-detail-section-title strong { font: 600 14px/1.5 var(--ts-font) !important; }
body.ts2 #adminSection .users-detail-section-title span { display: none !important; }
body.ts2 #adminSection :is(.users-detail-form label > span,.users-permission-modules label) { font-size: 13px !important; font-weight: 500 !important; }
body.ts2 #adminSection .users-permission-modules label { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; min-height: 44px !important; padding: 10px 0 !important; }
body.ts2 #adminSection .users-permission-modules label strong { font-weight: 500 !important; font-size: 13px !important; }
body.ts2 #adminSection :is(.users-drawer-footer, .users-modal-actions) { padding: 16px 24px !important; border-top: 1px solid var(--ts-border) !important; box-shadow: none !important; gap: 8px !important; }
body.ts2 .ts-module :is(.users-btn.danger, .contacts-button.danger, .vd-button.danger) { color: var(--ts-danger) !important; background: var(--ts-danger-tint) !important; border-color: transparent !important; }
body.ts2 .ts-module :is(.users-modal-card, .vd-dialog, .calendar-modal, .purchase-notes-detail) { border-radius: 8px !important; }
body.ts2 #renditionsSection .renditions-header { flex-wrap: wrap; }
body.ts2 #renditionsSection .renditions-tabs { width: 100%; margin: 0 !important; }
body.ts2 #renditionsSection .renditions-metric { border-radius: 0 !important; box-shadow: none !important; border: 0 !important; background: white !important; padding: 20px !important; }
body.ts2 #contactsSection .contacts-summary { border-block: 1px solid var(--ts-border); background: white !important; border-radius: 0 !important; box-shadow: none !important; }
body.ts2 #contactsSection .contacts-summary > * { box-shadow: none !important; border-radius: 0 !important; border: 0 !important; }
body.ts2 #contactsSection #contactsSearch { padding-left: 40px !important; }
body.ts2 #contactsSection .contacts-workspace { border-radius: 0 !important; box-shadow: none !important; border: 0 !important; }
body.ts2 #contactsSection .contacts-alpha button { flex: 0 0 auto !important; min-width: 36px !important; width: auto !important; padding: 8px !important; white-space: nowrap !important; overflow-wrap: normal !important; }
body.ts2 #contactsSection .contacts-toolbar { box-shadow: none !important; }
body.ts2 #calendarSection .calendar-eyebrow { display: none !important; }
body.ts2 #calendarSection :is(.calendar-canvas,.calendar-toolbar) { box-shadow: none !important; border-radius: 0 !important; }
body.ts2 #renditionsSection :is(.renditions-card, .renditions-filters, .renditions-filterbar, .renditions-totals) { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
body.ts2 #renditionsSection .renditions-card { background: transparent !important; }
body.ts2 #renditionsSection .renditions-toolbar { padding: 20px 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
body.ts2 #renditionsSection .renditions-card-head { padding: 16px 0 !important; }
body.ts2 #renditionsSection .renditions-card-head h2 { font: 650 17px/1.4 var(--ts-font) !important; }
body.ts2 #renditionsSection .renditions-card-head p { display: none; }
body.ts2 #renditionsSection .renditions-card-head .btn { white-space: normal; }
body.ts2 #adminSection :is(#databaseHomePanel, #adminHomePanel) { border: 0 !important; box-shadow: none !important; margin-top: 0 !important; }
body.ts2 #databaseHomePanel > :is(h2,p) { display: none !important; }
body.ts2 #adminSection :is(#databaseHomePanel, #adminHomePanel) .preview-header p { display: none; }
body.ts2 #adminSection :is(.admin-hub-grid, .database-hub-grid) { gap: 0 24px !important; }
body.ts2 #adminSection :is(.admin-hub-card, .database-hub-card) { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px !important; padding: 16px 0 !important; background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--ts-border) !important; border-radius: 0 !important; text-align: left; }
body.ts2 #adminSection :is(.admin-hub-card, .database-hub-card) span { display: none; }
body.ts2 #adminSection :is(.admin-hub-card, .database-hub-card) strong { font: 600 14px/1.4 var(--ts-font) !important; }
body.ts2 #adminSection :is(.admin-hub-card, .database-hub-card) svg { width: 18px; height: 18px; color: var(--ts-muted); }
body.ts2 #vidrieraSection .vd-metrics { border-block: 1px solid var(--ts-border); border-radius: 0 !important; background: white !important; }
body.ts2 #calendarSection .calendar-layout { border-radius: 0 !important; box-shadow: none !important; }
body.ts2 #collectorSignaturesSection .cs-filters { margin-top: 0 !important; }

/* Home combines both business areas without duplicating navigation cards. */
.ts-domain-heading { font-size: 13px !important; color: var(--ts-muted); margin-bottom: 12px !important; }
.ts-home-overview { display: grid; grid-template-columns: repeat(auto-fit,minmax(360px,1fr)); gap: 24px; margin-bottom: 28px; }
.ts-home-overview > section { display: flex; flex-direction: column; }
.ts-home-overview .ts-home-metrics { grid-template-columns: repeat(auto-fit,minmax(100px,1fr)); margin: 0; }
.ts-home-overview .ts-home-metrics { flex: 1; }
.ts-home-overview .ts-home-metric { padding: 16px; }
.ts-has-estate .ts-home-columns { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.ts-estate-only .ts-home-columns { grid-template-columns: minmax(0,1fr); }
.ts-estate-only .ts-home-columns > aside { max-width: 100%; }
.ts-quick-heading { margin-top: 28px; }
#tsHomeEstateScope { font-size: 12px; margin: -6px 0 16px; }
.ts-home-overview > [hidden], #homeSection [hidden] { display: none !important; }

@media (max-width: 1199px) {
  body.ts2 #newOrderSection .generated-item-row { grid-template-columns: minmax(160px,1fr) 80px 130px 120px 40px !important; }
  body.ts2 #reservationsSection .reservation-history-filters { grid-template-columns: minmax(160px,1fr) 150px 160px 40px !important; }
}
@media (max-width: 900px) {
  body.ts2 #reservationsSection .reservation-form-section, body.ts2 #newOrderSection .ts-form-block { grid-template-columns: 1fr; gap: 16px; }
  body.ts2 #purchaseNotesSection .pn-filters-simple { grid-template-columns: minmax(160px,1fr) 150px 150px 40px; }
  .ts-home-overview { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  body.ts2 .ts-module { --ts-filter-control-size: 44px; }
  body.ts2 #vidrieraSection #vidrieraRoot .vd-filter-fields { grid-template-columns: minmax(0,1fr) 44px !important; }
  body.ts2 #vidrieraSection #vidrieraRoot .vd-filter-fields > .vd-field { grid-column: 1/-1; }
  body.ts2 #vidrieraSection #vidrieraRoot .vd-filter-fields > .vd-field:nth-last-child(2) { grid-column: 1; }
  body.ts2 .ts-module :is(.topbar, .purchase-notes-header, .contacts-topbar, .calendar-page-header, .vd-header, .renditions-header, .cs-shell > header) { flex-wrap: wrap; padding: 0 0 20px !important; }
  body.ts2 .ts-module :is(.topbar, .purchase-notes-header, .contacts-topbar, .calendar-page-header, .vd-header, .renditions-header, .cs-shell > header) h1 { font-size: 24px !important; }
  body.ts2 .ts-module :is(.topbar, .purchase-notes-header, .contacts-topbar, .calendar-page-header, .vd-header, .renditions-header, .cs-shell > header) { align-items: flex-start !important; text-align: left !important; }
  body.ts2 .ts-module :is(.topbar, .purchase-notes-header, .contacts-topbar, .calendar-page-header, .vd-header, .renditions-header, .cs-shell > header) h1 { text-align: left !important; }
  body.ts2 #contactsSection .contacts-summary, body.ts2 #renditionsSection .renditions-metrics { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 1px !important; }
  body.ts2 #contactsSection .contacts-stat { padding: 16px 12px !important; min-width: 0; }
  body.ts2 #contactsSection .contacts-stat-icon { display: none; }
  body.ts2 #renditionsSection .renditions-metric { padding: 16px 12px !important; min-width: 0; }
  body.ts2 #renditionsSection .renditions-metric strong { font-size: 20px !important; overflow-wrap: anywhere; }
  body.ts2 #purchaseNotesSection .purchase-notes-header { align-items: flex-start !important; text-align: left !important; }
  body.ts2 #purchaseNotesSection .purchase-notes-header h1 { text-align: left !important; }
  body.ts2 .ts-module :is(.btn, .table-btn, .pn-button, .pn-icon-button, .contacts-button, .calendar-button, .vd-button, .vd-icon-button, .cs-shell button) { min-height: 44px !important; }
  body.ts2 .ts-module :is(.pn-icon-button, .reservation-refresh-btn, .generated-remove-item) { min-width: 44px !important; width: 44px !important; height: 44px !important; }
  body.ts2 .ts-module :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) { font-size: 16px !important; min-height: 44px !important; }
  body.ts2 .ts-module :is(.ts-module-tabs, .reservations-tabs, .vd-tabs, .cs-tabs, .renditions-tabs) { gap: 20px !important; }
  body.ts2 #reservationsSection .reservation-fields-grid, body.ts2 #newOrderSection .ts-form-fields { grid-template-columns: 1fr !important; }
  body.ts2 #reservationsSection .reservation-primary-fields { grid-template-columns: 1fr !important; }
  body.ts2 #reservationsSection .reservation-history-filters { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 44px !important; }
  body.ts2 #reservationsSection .reservation-history-search { grid-column: 1/-1; }
  body.ts2 #reservationsSection .reservation-history-filters .field { grid-column: auto; }
  body.ts2 #reservationsSection .reservation-history-filters .reservation-history-search { grid-column: 1/-1; }
  body.ts2 #reservationsSection .reservation-summary-item { padding: 12px !important; }
  body.ts2 #reservationsSection .reservations-history-table { min-width: 0 !important; }
  body.ts2 #reservationsSection .reservation-actions-cell .table-btn { min-width: 44px !important; width: 44px !important; height: 44px !important; min-height: 44px !important; }
  body.ts2 .ts-module :is(.pn-history-table, .reservations-history-table, .cs-table).ios-mobile-table tbody { display: grid !important; gap: 12px !important; }
  body.ts2 .ts-module :is(.pn-history-table, .reservations-history-table, .cs-table).ios-mobile-table tr.ios-mobile-row { margin: 0 !important; padding: 12px !important; border-radius: 6px !important; box-shadow: none !important; border: 1px solid var(--ts-border) !important; }
  body.ts2 .ts-module :is(.pn-history-table, .reservations-history-table, .cs-table).ios-mobile-table td { padding: 8px 0 !important; border: 0 !important; }
  body.ts2 #purchaseNotesSection .pn-form-grid { grid-template-columns: 1fr !important; }
  body.ts2 #purchaseNotesSection .pn-field { grid-column: 1 !important; }
  body.ts2 #purchaseNotesSection .pn-filters-simple { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 44px; }
  body.ts2 #purchaseNotesSection .pn-filters-simple > :first-child { grid-column: 1/-1; }
  body.ts2 #purchaseNotesSection .pn-items-labels { display: none; }
  body.ts2 #purchaseNotesSection .pn-item-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 10px !important; padding: 16px 0; border-radius: 0 !important; background: transparent !important; }
  body.ts2 #purchaseNotesSection .pn-item-row [data-item-field="description"] { grid-column: 1/-1; grid-row: 1; }
  body.ts2 #purchaseNotesSection .pn-item-row [data-item-field="unit"] { grid-column: 2; grid-row: 2; }
  body.ts2 #purchaseNotesSection .pn-item-actions { grid-column: 1/-1; }
  body.ts2 #purchaseNotesSection .pn-form-actions { flex-wrap: wrap; gap: 8px; }
  body.ts2 #purchaseNotesSection .pn-form-actions .spacer { display: none; }
  body.ts2 #purchaseNotesSection .pn-form-actions > button { flex: 1 1 auto; }
  body.ts2 #newOrderSection .generated-item-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; }
  body.ts2 #newOrderSection .generated-item-row > .field { grid-column: auto !important; width: auto !important; }
  body.ts2 #newOrderSection .generated-item-row .field:first-child { grid-column: 1/-1 !important; }
  body.ts2 #newOrderSection .generated-item-row .generated-remove-item { justify-self: end; }
  body.ts2 #newOrderSection .generated-summary-grid { grid-template-columns: 1fr !important; gap: 24px; }
  body.ts2 #newOrderSection .ts-order-submit .audit-actions { width: 100%; }
  body.ts2 #newOrderSection #saveGeneratedOrderBtn { width: 100%; }
  body.ts2 #adminSection .users-enterprise-table { min-width: 0; }
  body.ts2 #adminSection .users-enterprise-table button { min-width: 44px; min-height: 44px; }
  body.ts2 #adminSection .users-native-drawer { border-radius: 0 !important; }
  body.ts2 #adminSection .users-drawer-body { padding: 0 16px !important; }
  body.ts2 #purchaseNotesDetailOverlay :is(.pn-detail-head, .pn-detail-body, .pn-detail-actions) { padding: 16px; }
  body.ts2 #purchaseNotesDetailOverlay .pn-detail-grid { grid-template-columns: 1fr; gap: 16px; }
  .ts-has-estate .ts-home-columns { grid-template-columns: 1fr; }
  .ts-home-overview { gap: 20px; }
  .ts-home-overview .ts-home-metric { padding: 12px; }
  .ts-home-overview .ts-home-metric:last-child:nth-child(odd) { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  body.ts2 .ts-module *, body.ts2 .ts-module *::before { transition: none !important; animation: none !important; }
}
