/* Equal dashboard panels and one mobile list/detail flow. */
@layer torpedo-workspace {
  body .workspace-module-nav { display: none !important; }
  body .workspace-monitor-panel[hidden],
  body .workspace-module-nav[hidden],
  body .workspace-module-nav button[hidden] { display: none !important; }
  .workspace-section-tabs, .workspace-panel-tabs {
    display: flex; gap: 5px; padding: 5px;
    background: #eaf0f8; border: 1px solid #cedaeb; border-radius: 12px;
  }
  .workspace-section-tabs button, .workspace-panel-tabs button, .workspace-module-nav button {
    flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px;
    background: transparent; border: 1px solid transparent; border-radius: 8px;
    color: #3c4b62; font: inherit; font-size: 13px; font-weight: 700;
    overflow-wrap: anywhere; cursor: pointer;
  }
  .workspace-section-tabs button[aria-pressed=true], .workspace-panel-tabs button[aria-pressed=true],
  .workspace-module-nav button[aria-current=page] {
    background: #fff; border-color: #c6d7ef; color: #125fce; box-shadow: 0 1px 3px #12345b0b;
  }
  body .dashboard-main-grid { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 16px !important; align-items: stretch !important; }
  body .dashboard-main-grid > .dashboard-main-card { grid-column: auto !important; display: flex !important; flex-direction: column !important; min-width: 0 !important; }
  body .workspace-panel-tabs { display: none !important; margin-bottom: 16px; }
  body .dashboard-main-card > .dashboard-control-shell,
  body .dashboard-main-card > .dashboard-main-table-shell,
  body .dashboard-main-card > .workspace-table-options { display: none !important; }
  body .dashboard-panel-kicker { display: none !important; }
  body .dashboard-main-topbar { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; padding: 16px 18px !important; min-height: 70px !important; }
  body .dashboard-main-title-block { text-align: left !important; }
  body .dashboard-main-title-block h3 { font-size: 18px !important; margin: 0 !important; overflow-wrap: anywhere !important; }
  .workspace-panel-configure { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; min-height: 38px; background: #fff; color: #215b9c; border: 1px solid #c6d7ed; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
  .workspace-panel-configure .nav-icon { width: 15px !important; height: 15px !important; flex-basis: 15px !important; }
  .workspace-panel-summary { display: flex; flex-direction: column; flex: 1; padding: 18px; min-width: 0; }
  .workspace-panel-context { margin: 0 0 16px; color: #44566f; font-size: 12px; font-weight: 600; min-height: 36px; overflow-wrap: anywhere; }
  body .workspace-panel-summary .dashboard-stat-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 14px !important; grid-row: auto !important; margin: 0 0 18px !important; }
  body .workspace-panel-summary .dashboard-stat-card { min-height: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; text-align: left !important; }
  body .workspace-panel-summary .dashboard-stat-card span { color: #45566e !important; font-size: 12px !important; }
  body .workspace-panel-summary .dashboard-stat-card strong { display: block !important; margin-top: 4px !important; color: #101827 !important; }
  .workspace-referral-preview { border-top: 1px solid #dde5f0; padding-top: 12px; min-height: 80px; margin-bottom: 16px; }
  .workspace-preview-header { display: flex; justify-content: space-between; gap: 10px; color: #4d5d76; font-size: 11px; font-weight: 700; }
  .workspace-referral-preview ul { padding: 0; margin: 4px 0 0; list-style: none; }
  .workspace-referral-preview li { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 50px; padding: 8px 0; border-bottom: 1px solid #edf1f6; }
  .workspace-referral-preview li > span { min-width: 0; }
  .workspace-referral-preview strong { display: block; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
  .workspace-referral-preview small { display: block; font-size: 11px; color: #586a83; }
  .workspace-referral-preview b { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
  .workspace-referral-preview b.negative { color: #b32949; }
  .workspace-panel-empty { color: #52647b; font-size: 13px; margin: 20px 0; }
  .workspace-panel-detail { min-height: 42px; width: 100%; padding: 9px 12px; margin-top: auto; border: 1px solid #bcd1ed; border-radius: 10px; background: #eef5ff; color: #125fc4; font-size: 13px; font-weight: 750; cursor: pointer; }
  body .dashboard-main-card:nth-child(2) .workspace-panel-detail { background: #f4f0ff; border-color: #d5c8ee; color: #6341b2; }
  body .dashboard-main-card:nth-child(3) .workspace-panel-detail { background: #edf9f5; border-color: #b7dbce; color: #147460; }
  body #workspace-settings .dashboard-control-shell { display: grid !important; grid-template-columns: minmax(0,1fr) !important; padding: 0 !important; gap: 20px !important; }
  body #workspace-settings .dashboard-date-filter-card { grid-column: 1 !important; grid-row: auto !important; }
  body #workspace-settings .dashboard-main-top-actions { justify-content: flex-start !important; padding-top: 16px !important; border-top: 1px solid #dee6f0 !important; }
  body #workspace-settings .dashboard-filter-row { display: grid !important; grid-template-columns: minmax(0,1fr) !important; }
  body #workspace-settings :is(.dashboard-control-shell > *, .dashboard-date-grid, .dashboard-site-select) { min-width: 0 !important; max-width: 100% !important; }
  body #workspace-settings .dashboard-date-grid { grid-template-columns: minmax(0,1fr) !important; }
  body #workspace-settings .dashboard-range-actions { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  body #workspace-settings .dashboard-range-btn { padding-inline: 6px !important; white-space: normal !important; font-size: 11px !important; }
  body #workspace-settings .dashboard-filter-row .add-referral-btn { display: none !important; }
  body #workspace-settings .dashboard-panel-status { margin-left: auto !important; }
  body #workspace-settings[data-kind=referrals] { width: min(1000px,calc(100% - 32px)) !important; }
  body #workspace-settings .dashboard-main-table-shell { display: block !important; margin: 0 0 16px !important; }
  body #workspace-settings .dashboard-main-table { min-width: 0 !important; }
  /* These original Player controls also live in the filter dialog on compact screens. */
  body #workspace-settings .enterprise-field, body #workspace-settings .enterprise-date-field { display: grid !important; gap: 7px !important; min-width: 0 !important; }
  body #workspace-settings .enterprise-date-title { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; margin-bottom: 12px !important; font-weight: 700 !important; }
  body #workspace-settings .enterprise-date-range { display: grid !important; gap: 12px !important; min-width: 0 !important; }
  body #workspace-settings .enterprise-field > label, body #workspace-settings .enterprise-date-field > span { font-size: 12px !important; font-weight: 650 !important; color: #344760 !important; }
  body #workspace-settings .date-field { width: 100% !important; max-width: none !important; min-width: 0 !important; }
  body #workspace-settings .date-field input.filter-date-input { width: 100% !important; min-width: 0 !important; max-width: none !important; padding-right: 48px !important; }
  body .date-field > input.filter-date-input { flex: 1 1 0 !important; min-width: 0 !important; max-width: none !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  body #workspace-settings .enterprise-switch { position: relative !important; display: inline-flex !important; align-items: center !important; width: 48px !important; height: 44px !important; min-height: 44px !important; flex: 0 0 48px !important; cursor: pointer; }
  body #workspace-settings .enterprise-switch input { position: absolute !important; inset: 0 !important; width: 48px !important; height: 44px !important; opacity: 0 !important; margin: 0 !important; cursor: pointer; }
  body #workspace-settings .enterprise-switch > span { position: relative !important; display: block !important; width: 48px !important; height: 28px !important; border-radius: 999px !important; background: #cbd6e5 !important; }
  body #workspace-settings .enterprise-switch > span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #18365933; transition: transform .15s; }
  body #workspace-settings .enterprise-switch input:checked + span { background: #1768db !important; }
  body #workspace-settings .enterprise-switch input:checked + span::before { transform: translateX(20px); }
  body #workspace-settings .enterprise-switch input:focus-visible + span { outline: 3px solid #85baff; outline-offset: 3px; }
  body #workspace-settings .enterprise-active-check { display: flex !important; align-items: center !important; gap: 10px !important; min-height: 44px !important; font-weight: 650 !important; cursor: pointer; }
  body #workspace-settings .enterprise-active-check input { position: static !important; opacity: 1 !important; width: 18px !important; height: 18px !important; min-height: 18px !important; flex: 0 0 18px !important; margin: 0 !important; accent-color: #1768db; }
  body #workspace-settings .enterprise-active-check .enterprise-check-box { display: none !important; }
  body .pagination { margin: 18px 0 0 !important; padding-top: 15px !important; border-top: 1px solid #dce5ef !important; }
  body .dw-table-toolbar:empty { display: none !important; }
  body .dw-v45-filter-shell { display: grid !important; gap: 14px !important; min-width: 0 !important; }
  body .dw-filter-card { display: grid !important; gap: 14px !important; }
  body .site-url { min-width: 0 !important; max-width: 100% !important; white-space: normal !important; overflow-wrap: anywhere !important; }
  body .workspace-panel-configure, body .workspace-panel-detail { font-weight: 700 !important; }
  body .summary-pill strong, body .dashboard-stat-card strong { min-width: 0 !important; max-width: 100% !important; white-space: normal !important; overflow-wrap: anywhere !important; }
  @media (max-width:480px) {
    body .filter-card .summary-strip, body .dashboard-main-card .workspace-panel-summary .dashboard-stat-grid { grid-template-columns: minmax(0,1fr) !important; }
    body .filter-card .summary-strip .summary-pill { min-height: 44px !important; }
  }
  body .history-table .badge { max-width: 100% !important; white-space: normal !important; overflow-wrap: anywhere !important; line-height: 1.4 !important; }
  body .dw-table .date-cell .compact-datetime { display: grid !important; gap: 3px !important; white-space: normal !important; }
  body .dw-table .date-cell :is(.date-line,.time-line) { display: block !important; white-space: normal !important; }
  body .tq-identity :is(strong,small), body .tq-progress :is(strong,small) { white-space: normal !important; overflow: visible !important; overflow-wrap: anywhere !important; }
  @media (max-width:1180px) {
    body .tq-row { grid-template-columns: minmax(0,1fr) auto !important; }
    body .tq-saved { min-width: 64px !important; }
  }
  @media (min-width:640px) and (max-width:1180px) {
    body .tq-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto !important; }
    body .tq-row > div:nth-child(2) { justify-self: start !important; }
    body .tq-progress { grid-column: 1 / 3 !important; grid-row: 2 !important; }
    body .tq-saved { grid-column: 3 !important; grid-row: 1 !important; }
    body .tq-actions { grid-column: 3 !important; grid-row: 2 !important; }
  }
  @media (min-width:640px) and (max-width:1024px) {
    body .site-management-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  }
  @media (min-width:1025px) {
    body .history-table:has(.btn-del-dataset) :is(th,td):nth-child(7) { width: 320px !important; min-width: 320px !important; }
    body .history-table:has(.btn-del-dataset) .table-actions { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 6px !important; }
    body .history-table:has(.btn-del-dataset) .table-actions .btn { min-height: 36px !important; padding: 8px !important; font-size: 11px !important; white-space: nowrap !important; }
  }
  body .workspace-table-options { display: none !important; }
  .workspace-log-filter { display: grid; gap: 5px; flex: 1; min-width: 0; }
  body .premium-toolbar .workspace-log-filter select { width: 100% !important; min-width: 0 !important; }
  body .workspace-history-site { display: none !important; }
  .workspace-extra-actions { min-width: 0; }
  .workspace-extra-actions > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 14px; border: 1px solid #cbd8e9; border-radius: 10px; background: #fff; color: #294363; font-size: 12px; font-weight: 700; cursor: pointer; }
  .workspace-extra-actions > summary::after { content: '+'; }
  .workspace-extra-actions[open] > summary::after { content: '−'; }
  .workspace-extra-actions > div { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; }
  body .workspace-extra-actions:not([open]) > div { display: none !important; }
  body tbody tr.workspace-paged-out { display: none !important; }
  .workspace-local-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #dce5ef; }
  body .workspace-local-pagination[hidden] { display: none !important; }
  .workspace-local-pagination span { font-size: 12px; font-weight: 600; color: #455a76; text-align: center; }
  body .workspace-empty-head { display: none !important; }
  body .site-editor-form { display: grid !important; gap: 18px !important; padding: 20px !important; min-width: 0 !important; }
  body .site-editor-form label { display: grid !important; gap: 7px !important; min-width: 0 !important; font-size: 13px !important; font-weight: 700 !important; color: #172b49 !important; }
  body #site-editor .site-editor-form input { width: 100% !important; min-width: 0 !important; min-height: 44px !important; font-size: 16px !important; }
  body .site-editor-actions { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; padding-top: 8px !important; }
  body .site-editor-actions .btn { width: 100% !important; min-width: 0 !important; min-height: 44px !important; }
  body .site-editor-error { margin: 0 !important; padding: 12px !important; background: #fff1f2 !important; border: 1px solid #f2b8c1 !important; border-radius: 10px !important; color: #9f1239 !important; font-size: 13px !important; font-weight: 600 !important; overflow-wrap: anywhere; }
  body .site-editor-error[hidden] { display: none !important; }
  body .workspace-table-heading { display: flex !important; flex: 1 !important; width: 100% !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important; }
  body .workspace-table-heading .btn { flex-shrink: 0 !important; font-size: 11px !important; padding-inline: 10px !important; }
  .workspace-filter-caption { font-size: 12px; color: #41556f; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
  body .table-details > summary { display: inline-flex !important; align-items: center !important; justify-content: center !important; min-width: 54px !important; min-height: 36px !important; padding: 6px 10px !important; border: 1px solid #c6d7ef !important; border-radius: 8px !important; background: #fff !important; color: #164eab !important; font-size: 12px !important; font-weight: 700 !important; cursor: pointer; }
  body .table-details > summary:focus-visible { outline: 3px solid #85baff; outline-offset: 2px; }
  body .table-details > pre { background: #f1f5fb !important; color: #172b49 !important; border: 1px solid #c6d7ef !important; border-radius: 8px !important; padding: 10px !important; font-size: 12px !important; font-weight: 550 !important; line-height: 1.6 !important; max-height: 260px !important; overflow: auto !important; white-space: pre-wrap !important; overflow-wrap: anywhere !important; }
  body #workspace-settings .filter-fields { grid-template-columns: minmax(0,1fr) !important; width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
  body #workspace-settings .enterprise-filter-shell { grid-template-columns: minmax(0,1fr) !important; width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
  body #workspace-settings .enterprise-date-board { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 12px !important; width: 100% !important; min-width: 0 !important; }
  body #workspace-settings .enterprise-date-card, body #workspace-settings .enterprise-action-card { width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
  body .icon-btn.edit-panel-name { width: auto !important; min-width: 78px !important; gap: 6px !important; padding: 8px 12px !important; }
  body .icon-btn.edit-panel-name .nav-icon { width: 15px !important; height: 15px !important; flex: 0 0 15px !important; }
  body .dashboard-referral-modal-head { display: grid !important; grid-template-columns: minmax(0,1fr) !important; align-items: start !important; gap: 8px !important; padding: 0 52px 14px 0 !important; }
  body .dashboard-referral-modal-head > div { min-width: 0 !important; width: 100% !important; }
  body .dashboard-referral-modal-head h3 { width: auto !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; font-size: 18px !important; line-height: 1.4 !important; text-align: left !important; white-space: normal !important; overflow: visible !important; overflow-wrap: anywhere !important; }
  body .dashboard-referral-counter { position: static !important; width: fit-content !important; margin: 0 !important; transform: none !important; }
  body .workspace-data-mode { width: fit-content !important; margin: 0 0 14px !important; }
  /* Short screens must keep the whole form reachable, including its final action. */
  body .modal { z-index: 200 !important; padding: 12px !important; overflow-y: auto !important; }
  body .modal .modal-card, body .modal .app-dialog-card {
    min-width: 0 !important; max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important; overflow-y: auto !important;
    overscroll-behavior: contain; scroll-padding-block: 12px;
  }
  body .workspace-dialog { max-height: calc(100dvh - 24px) !important; }
  body .workspace-dialog-header { gap: 12px !important; }
  body .workspace-dialog-close { flex: 0 0 44px; min-width: 44px; width: 44px; height: 44px; font-size: 24px !important; line-height: 1 !important; font-weight: 500 !important; }
  @media (max-width:1199px) {
    body .dashboard-main-grid { grid-template-columns: 1fr !important; }
    body .workspace-panel-tabs { display: flex !important; }
    body .dashboard-main-grid > .dashboard-main-card:not(.workspace-panel-selected) { display: none !important; }
    body .workspace-panel-summary .dashboard-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  }
  @media (max-width:1024px) {
    body .login-shell { padding: 24px 16px !important; }
    body .login-shell .login-card { width: 100% !important; max-width: 410px !important; padding: 28px !important; }
    body .content { padding: 16px 12px calc(84px + env(safe-area-inset-bottom,0px)) !important; }
    body .content-inner { gap: 12px !important; }
    body .hero-card.compact-hero { min-height: 42px !important; margin: 0 !important; }
    body .workspace-breadcrumb { display: none !important; }
    body .hero-card h1 { font-size: 20px !important; }
    body .workspace-module-nav { display: flex !important; gap: 4px; padding: 4px; background: #e9eff8; border: 1px solid #d0dceb; border-radius: 12px; }
    body .workspace-module-nav button, body .workspace-section-tabs button, body .workspace-panel-tabs button { min-height: 44px !important; padding: 8px 5px !important; font-size: 12px !important; }
    body .workspace-panel-tabs { margin-bottom: 12px !important; }
    body .workspace-panel-summary { padding: 15px !important; }
    body .workspace-panel-context { margin-bottom: 14px !important; min-height: 0 !important; }
    body .workspace-referral-preview { display: none !important; }
    body .workspace-panel-summary .dashboard-stat-grid { padding-bottom: 6px !important; }
    body .dashboard-main-topbar { padding: 12px 15px !important; min-height: 60px !important; }
    body .workspace-panel-summary .dashboard-stat-card strong { font-size: var(--metric-size,20px) !important; }
    body .workspace-panel-configure, body .workspace-panel-detail { min-height: 44px !important; }
    body .filter-card { gap: 12px !important; padding: 13px !important; }
    body .filter-card > .site-tabs, body .filter-card > .pill-row { display: none !important; }
    body .filter-toggle { display: grid !important; grid-template-columns: 20px minmax(0,1fr) auto !important; column-gap: 8px !important; row-gap: 3px !important; align-items: center !important; min-height: 48px !important; }
    body .filter-toggle > span:not(.workspace-filter-caption) { font-size: 13px !important; color: #13243b !important; }
    body .filter-toggle .workspace-filter-caption { grid-column: 2 / 4 !important; grid-row: 2 !important; margin: 0 !important; text-align: left !important; font-size: 11px !important; }
    body .filter-toggle::after { content: none !important; }
    body .filter-toggle::before { content: 'Ubah'; grid-column: 3; grid-row: 1; font-size: 12px; font-weight: 700; color: #1469ce; }
    body .summary-strip { border-top: 1px solid #dce6f1 !important; padding-top: 10px !important; gap: 10px 14px !important; }
    body .summary-strip .summary-pill { min-height: 58px !important; padding: 5px 0 !important; border: 0 !important; background: transparent !important; border-radius: 0 !important; box-shadow: none !important; }
    body .summary-strip .summary-pill span { font-size: 11px !important; color: #435772 !important; }
    body #player-summary .summary-pill:first-child, body #tx-summary .summary-pill:first-child { grid-column: 1 / -1 !important; display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; min-height: 32px !important; padding-bottom: 8px !important; border-bottom: 1px solid #e8eef5 !important; }
    body .table-card { padding: 13px !important; }
    body .table-card .section-caption { margin-bottom: 10px !important; }
    body .table-card .table-caption { font-size: 11px !important; }
    body .workspace-data-mode { width: 100% !important; }
    body .workspace-data-mode button { flex: 1 !important; min-height: 42px !important; }
    body .mobile-table-compact th[data-mobile-primary], body .mobile-table-compact td[data-mobile-primary] { padding: 11px 8px !important; font-size: 12px !important; }
    body .mobile-table-compact th[data-mobile-primary] { font-size: 11px !important; font-weight: 750 !important; }
    body .mobile-table-compact .mobile-cell-action { width: 64px !important; min-width: 64px !important; max-width: 64px !important; padding: 4px !important; }
    body .mobile-cell-action button { width: 56px !important; height: 44px !important; min-height: 44px !important; font-size: 11px !important; font-weight: 750 !important; border: 0 !important; background: transparent !important; color: #125fc4 !important; }
    body .mobile-table-compact .log-message-cell { display: -webkit-box !important; -webkit-line-clamp: 3 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; }
    body .workspace-local-pagination { flex-wrap: wrap !important; }
    body .workspace-local-pagination span { order: -1 !important; width: 100% !important; font-size: 11px !important; }
    body .workspace-table-options { display: block !important; padding: 9px 0 0 !important; font-size: 12px; color: #425b7a; }
    .workspace-table-options > summary { min-height: 44px; display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 650; }
    .workspace-table-options > summary::after { content: '+'; margin-left: auto; font-size: 18px; }
    .workspace-table-options[open] > summary::after { content: '−'; }
    body .workspace-table-options:not([open]) > .mobile-table-toolbar { display: none !important; }
    body .mobile-table-toolbar { margin: 0 !important; padding: 4px 0 10px !important; }
    body .pagination { gap: 6px !important; justify-content: space-between !important; padding-top: 12px !important; margin-top: 12px !important; }
    body .pagination .page-meta { width: 100% !important; font-size: 11px !important; margin-bottom: 4px !important; text-align: center !important; }
    body .pagination .workspace-page-edge { min-width: 42px !important; padding-inline: 7px !important; font-size: 10px !important; }
    body .pagination .btn:not(.workspace-page-edge) { flex: 1 !important; font-size: 11px !important; padding-inline: 6px !important; }
    body .control-hero-card .runner-heading { display: none !important; }
    body .control-hero-card { padding: 14px !important; }
    body .control-metric-card { padding: 10px !important; min-height: 61px !important; }
    body .control-hero-actions { gap: 7px !important; }
    body .control-metric-card span { font-size: 11px !important; }
    body .control-metric-card strong { font-size: 15px !important; }
    body .runner-settings-toggle { font-size: 16px !important; }
    body .premium-toolbar select { min-width: 90px !important; font-size: 14px !important; }
    body .log-filters { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px !important; padding: 10px !important; }
    body .workspace-log-filter:first-child { grid-column: 1 / -1 !important; }
    body .workspace-log-filter { font-size: 11px !important; }
    body .premium-toolbar .workspace-log-filter select { min-width: 0 !important; padding: 8px !important; font-size: 16px !important; }
    body .workspace-history-site { display: block !important; width: 100% !important; }
    body .workspace-history-pills { display: none !important; }
    body .workspace-dialog { max-height: 94dvh !important; border-radius: 18px 18px 0 0 !important; }
    body .workspace-dialog-body { padding: 16px !important; }
    body #workspace-settings .enterprise-date-board, body #workspace-settings .enterprise-date-range, body #workspace-settings .dw-v45-date-row { grid-template-columns: 1fr !important; }
    body #workspace-settings .enterprise-date-card, body #workspace-settings .enterprise-action-card { padding: 12px !important; }
    body #workspace-settings .enterprise-action-card { flex-direction: column !important; align-items: stretch !important; }
    body #workspace-settings .filter-fields { display: grid !important; }
    body #workspace-settings[data-kind=referrals] { width: 100% !important; }
    body #workspace-settings .dashboard-date-grid { grid-template-columns: 1fr !important; }
    body .workspace-detail-list { grid-template-columns: minmax(82px,.7fr) minmax(0,1.3fr) !important; }
    body .telegram-actions { grid-template-columns: 1fr !important; }
    body .workspace-extra-actions { width: 100% !important; }
    body .workspace-extra-actions > summary { min-height: 44px !important; }
    body .workspace-extra-actions > div { display: grid !important; grid-template-columns: 1fr !important; }
    body .site-card .action-row { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px !important; }
    body .site-card .action-row .btn { min-width: 0 !important; width: 100% !important; font-size: 11px !important; padding: 8px !important; }
    body .unified-controls label:has(> input[type=checkbox]) { flex-direction: row-reverse !important; }
    body .workspace-menu-links { gap: 8px !important; }
    body .content { padding-left: max(12px,env(safe-area-inset-left,0px)) !important; padding-right: max(12px,env(safe-area-inset-right,0px)) !important; }
    body .workspace-bottom-nav { padding-left: max(10px,env(safe-area-inset-left,0px)) !important; padding-right: max(10px,env(safe-area-inset-right,0px)) !important; }
    body .workspace-dialog { max-height: calc(100dvh - 12px) !important; }
    body .workspace-dialog .workspace-dialog-header { padding: 12px 16px !important; }
    body .content :is(button,summary), body .workspace-dialog :is(button,summary), body .modal :is(button,summary) { min-height: 44px !important; }
    body .content .control-hero-actions .btn:last-child:nth-child(3) { min-height: 44px !important; }
    body .content .control-queue-head .btn-danger, body .content .panel-head .btn { min-height: 44px !important; }
    body .content .pagination .btn, body .content .mobile-table-toolbar button { min-height: 44px !important; }
    body .content select.mobile-page-size { min-height: 44px !important; font-size: 16px !important; }
    body .content .tx-mode-btn { min-height: 44px !important; }
    body .date-field .date-trigger { min-width: 44px !important; width: 44px !important; }
    body .content label:has(> input[type=checkbox]), body .workspace-dialog label:has(> input[type=checkbox]), body .runner-auto-row .switch-row { min-height: 44px !important; align-items: center !important; }
  }
  @media (max-width:1024px) and (max-height:500px) {
    body .workspace-bottom-nav button { display: flex !important; align-items: center !important; justify-content: center !important; gap: 7px !important; min-height: 44px !important; }
    body .workspace-bottom-nav { padding-top: 4px !important; padding-bottom: calc(4px + env(safe-area-inset-bottom,0px)) !important; }
    body .content { padding-bottom: calc(68px + env(safe-area-inset-bottom,0px)) !important; }
  }
  @media (max-width:480px) {
    body .dashboard-referral-modal-table-wrap { max-height: min(44dvh,360px) !important; }
    body .dashboard-referral-input-table, body .dashboard-referral-input-table tbody { display: block !important; width: 100% !important; }
    body .dashboard-referral-input-table thead { display: none !important; }
    body .dashboard-referral-input-table tbody tr { display: grid !important; grid-template-columns: minmax(0,1fr) 44px !important; gap: 8px !important; padding: 10px 0 !important; border-bottom: 1px solid #dce5ef !important; }
    body .dashboard-referral-input-table tbody td { display: block !important; width: auto !important; min-width: 0 !important; max-width: none !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
    body .dashboard-referral-input-table tbody td:first-child { grid-column: 1 !important; grid-row: 1 !important; }
    body .dashboard-referral-input-table tbody td:nth-child(2) { grid-column: 1 !important; grid-row: 2 !important; }
    body .dashboard-referral-input-table tbody td.dashboard-referral-action-col { display: flex !important; grid-column: 2 !important; grid-row: 1 / 3 !important; align-items: center !important; justify-content: center !important; }
    body .dashboard-referral-input-table .dashboard-referral-remove { width: 44px !important; min-width: 44px !important; height: 44px !important; padding: 0 !important; }
    body .dashboard-referral-modal-actions { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px !important; }
    body .dashboard-referral-modal-actions .btn { width: 100% !important; min-width: 0 !important; max-width: 100% !important; margin: 0 !important; padding-inline: 8px !important; font-size: 12px !important; }
    body #dashboard-referral-save { grid-column: 1 / -1 !important; }
  }
  @media (pointer:coarse) and (min-width:1025px) {
    body .app-shell :is(button,summary), body .workspace-dialog :is(button,summary), body .modal :is(button,summary) { min-height: 44px !important; }
    body .app-shell :is(input:not([type=checkbox]):not([type=radio]):not(.native-date),select,textarea), body .workspace-dialog :is(input:not([type=checkbox]):not([type=radio]):not(.native-date),select,textarea) { min-height: 44px !important; font-size: 16px !important; }
  }
}
