/* Opt-in presentation class; desktop styles and business controls remain unchanged. */
@media (max-width: 760px) {
  .fp-mobile :is(.fp-days,.fp-week-picker,.fp-calendar-picker) select { padding: 10px 12px; border: 1px solid #dce4f2; border-radius: 12px; background: white; color: #233956; font-family: inherit; }
  .fp-mobile .timesheet-table-tools:has(~ .fp-day-shell) :is(.day-jump-group,.timesheet-scroll-hint) { display: none; }
  .fp-mobile .fp-day-table .time-cell .time-input { border: 1px solid #c7d9f7; border-radius: 10px; background: #f6f9ff; text-align: left; padding: 10px 12px; min-height: 48px; }
  .fp-mobile .fp-context-open .topbar-mobile-row { display: none; }
  .fp-mobile .fp-context-open .topbar-controls { display: grid; gap: 12px; grid-template-columns: minmax(0,1fr) auto; }
  .fp-mobile .fp-record-table [hidden], .fp-mobile .fp-day-table [hidden] { display: none !important; }
  .fp-mobile .fp-day-shell ~ .timesheet-scroll-hint { display: none; }
  .fp-mobile .fp-week-picker { display: grid; gap: 8px; margin: 12px 0; font-size: 13px; }
  .fp-mobile .fp-record-table > tbody > .fp-week-hidden { display: none !important; }
  .fp-mobile :is(.mk-heading,.ld-heading) .eyebrow { display: none; }
  .fp-mobile :is(.mk-heading,.ld-heading) > div > p { margin: 8px 0; }
  .fp-mobile :is(.mk-workspace,.ld-workspace) { padding: 0; }
  .fp-mobile .sv-modal-backdrop { position: fixed; inset: 0; z-index: 400; padding: 0; display: block; background: white; }
  .fp-mobile .sv-modal { position: relative; top: var(--fp-viewport-top,0px); width: 100%; max-width: none; height: var(--fp-visible-height,100dvh); max-height: var(--fp-visible-height,100dvh); border-radius: 0; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
  .fp-mobile .sv-modal header { position: sticky; top: -16px; background: white; z-index: 2; padding: 10px 0; }
}
@media (max-width: 760px) {
  .fp-mobile .fp-record-table { display: block !important; width: 100% !important; min-width: 0 !important; border: 0; table-layout: auto; }
  .fp-mobile .fp-record-table > thead { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .fp-mobile .fp-record-table > tbody, .fp-mobile .fp-record-table > tfoot { display: block !important; }
  .fp-mobile .fp-record-table > tbody > tr, .fp-mobile .fp-record-table > tfoot > tr { display: block !important; width: 100%; margin: 0 0 12px; padding: 8px 12px; border: 1px solid #dce4f2; border-radius: 14px; background: white; }
  .fp-mobile .fp-record-table > :is(tbody,tfoot) > tr > :is(td,th) { position: static !important; display: block !important; width: auto !important; min-width: 0 !important; max-width: none !important; padding: 9px 0; height: auto; white-space: normal !important; overflow-wrap: anywhere; text-align: left; border: 0; border-bottom: 1px solid #edf1f8; background: transparent; box-shadow: none; }
  .fp-mobile .fp-record-table > :is(tbody,tfoot) > tr > :is(td,th):last-child { border-bottom: 0; }
  .fp-mobile .fp-record-table > :is(tbody,tfoot) > tr > :is(td,th)::before { content: attr(data-fp-label); display: block; margin-bottom: 5px; font-size: 12px; line-height: 1.4; font-weight: 500; color: #61718c; }
  .fp-mobile .fp-record-table > :is(tbody,tfoot) > tr > .fp-full-cell::before { display: none; }
  .fp-mobile .fp-record-table th[scope=row] { font-size: 17px; }
  .fp-mobile .fp-record-table :is(td,th) > input:not([type=checkbox]):not([type=radio]) { width: 100%; }
  .fp-mobile .fp-record-table :is(td,th) button { max-width: 100%; }
  .fp-mobile :is(.table-wrap,.table-shell,.mk-table-wrap,.ld-table-wrap,.revenue-plan-table-shell,.revenue-plan-daily-shell):has(> .fp-record-table) { overflow: visible; width: 100%; min-width: 0; border: 0; background: transparent; }
  .fp-mobile :is(.modal-backdrop,.ld-modal-backdrop,.mk-overlay,.technical-modal-backdrop,.sv-dialog-backdrop) { position: fixed; inset: 0; z-index: 400; padding: 0 !important; display: block; overflow: hidden; background: white; }
  .fp-mobile :is(.modal-backdrop > .modal,.ld-modal,.mk-modal,.technical-form-sheet,.sv-dialog) { position: relative; top: var(--fp-viewport-top,0px); width: 100% !important; max-width: none !important; height: var(--fp-visible-height,100dvh); max-height: var(--fp-visible-height,100dvh) !important; min-height: 0; margin: 0 !important; border: 0 !important; border-radius: 0 !important; overflow: auto; overscroll-behavior: contain; padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .fp-mobile :is(.ld-modal,.mk-modal,.technical-form-sheet,.modal) > header { position: sticky; top: calc(-12px - env(safe-area-inset-top)); z-index: 5; background: white; padding: 12px 0; }
  .fp-mobile :is(.ld-modal,.mk-modal,.technical-form-sheet,.modal) h2 { font-size: 22px; }
  .fp-mobile :is(.ld-form-grid,.mk-fields,.technical-form-grid,.form-grid) { grid-template-columns: minmax(0,1fr); }
  .fp-mobile :is(.ld-modal,.mk-modal,.technical-form-sheet) form > footer { position: sticky; z-index: 6; bottom: calc(-20px - env(safe-area-inset-bottom)); background: white; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #dce4f2; display: flex; flex-wrap: wrap; gap: 8px; }
  .fp-mobile :is(.ld-modal,.mk-modal,.technical-form-sheet) form > footer > button { flex: 1 1 120px; }
  .fp-mobile.fp-dialog-open body { overflow: hidden; }
  .fp-mobile.fp-dialog-open .fp-bottom-nav, .fp-mobile.fp-keyboard .fp-bottom-nav { display: none; }
  .fp-mobile.fp-dialog-open .fp-header { visibility: hidden; }
  .fp-mobile .fp-days { display: flex; align-items: end; gap: 10px; margin: 12px 0; }
  .fp-mobile .fp-days label { display: grid; flex: 1; gap: 5px; font-size: 13px; }
  .fp-mobile .fp-days select { width: 100%; }
  .fp-mobile .fp-day-shell { overflow: visible !important; max-height: none !important; }
  .fp-mobile .fp-day-table, .fp-mobile .fp-day-table tbody { display: block; min-width: 0 !important; width: 100% !important; }
  .fp-mobile .fp-day-table thead { display: none; }
  .fp-mobile .fp-day-table tbody tr { display: block; margin-bottom: 12px; padding: 12px; border: 1px solid #dce4f2; border-radius: 14px; background: white; }
  .fp-mobile .fp-day-table tbody td { position: static !important; display: block; width: 100% !important; height: auto; min-width: 0 !important; max-width: none !important; padding: 8px 0; border: 0; text-align: left; white-space: normal; background: transparent; box-shadow: none; }
  .fp-mobile .fp-day-table .fp-other-day { display: none !important; }
  .fp-mobile .fp-day-table tbody td:nth-last-child(-n+5):not(:last-child) { display: none; }
  .fp-mobile .fp-day-table .time-cell { width: 100%; min-height: 50px; }
  .fp-mobile .fp-day-table .time-cell input { width: 100%; max-width: none; }
  .fp-mobile .fp-calendar-picker { display: grid; gap: 8px; margin: 12px 0; }
  .fp-mobile .sv-calendar { display: block; min-width: 0 !important; width: 100% !important; }
  .fp-mobile .sv-calendar thead { display: none; }
  .fp-mobile .sv-calendar tbody { display: block; }
  .fp-mobile .sv-calendar tr { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; }
  .fp-mobile .sv-calendar .fp-calendar-hidden { display: none; }
  .fp-mobile .sv-calendar tr > :first-child { grid-column: 1/-1; width: auto; position: static; padding: 12px 0; }
  .fp-mobile .sv-calendar td { min-width: 0; width: auto; padding: 2px; }
  .fp-mobile .sv-calendar td::before { content: attr(data-fp-day); font-size: 12px; display: block; }
  .fp-mobile .sv-calendar button { width: 100%; min-width: 0; padding: 4px; }
  .fp-mobile .vmr-stepper { display: flex; flex-wrap: nowrap; overflow: auto; gap: 6px; }
  .fp-mobile .vmr-stepper > button { flex: 0 0 auto; }
  .fp-mobile .vmr-action-bar { position: sticky; bottom: calc(var(--fp-nav-height) + env(safe-area-inset-bottom)); background: white; z-index: 30; padding: 12px; border: 1px solid #dce4f2; }
  .fp-mobile.fp-keyboard .vmr-action-bar { position: static; }
  .fp-mobile .vmr-locked-context { grid-template-columns: 1fr; }
  @media (prefers-reduced-motion: reduce) { .fp-mobile.fp-loading .fp-header::after { animation: none; width: 100%; } }
}
@media (max-width: 760px) {
  .fp-mobile { --fp-nav-height: 66px; --fp-border: #dce4f2; --fp-muted: #61718c; background: #f5f7fc; scroll-padding-top: 76px; }
  .fp-mobile body { margin: 0; overflow-x: clip; -webkit-text-size-adjust: 100%; }
  .fp-mobile .app-shell { display: block; min-width: 0; }
  .fp-mobile .sidebar, .fp-mobile .main > .topbar:not(.fp-context-open), .fp-mobile .main > .footer { display: none !important; }
  .fp-mobile .main { width: 100%; min-width: 0; margin: 0; padding: 0 0 calc(var(--fp-nav-height) + env(safe-area-inset-bottom) + 20px); }
  .fp-mobile .content { padding: 16px 12px; min-width: 0; max-width: 100%; }
  .fp-mobile *, .fp-mobile *::before, .fp-mobile *::after { box-sizing: border-box; }
  .fp-mobile button, .fp-mobile a, .fp-mobile summary { touch-action: manipulation; }
  .fp-mobile button, .fp-mobile .btn { min-height: 44px; white-space: normal; }
  .fp-mobile input:not([type=checkbox]):not([type=radio]), .fp-mobile select, .fp-mobile textarea { font-size: 16px !important; max-width: 100%; min-height: 44px; }
  .fp-mobile input[type=checkbox], .fp-mobile input[type=radio] { width: 22px; height: 22px; flex: 0 0 auto; margin: 10px; }
  .fp-mobile input[type=file] { width: 100%; overflow: hidden; }
  .fp-mobile textarea { min-height: 110px; }
  .fp-mobile [hidden] { display: none !important; }
  .fp-mobile button:focus-visible, .fp-mobile summary:focus-visible, .fp-mobile a:focus-visible { outline: 3px solid #1265ef; outline-offset: 2px; }
  .fp-mobile .fp-header { position: sticky; top: 0; z-index: 90; display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--fp-border); }
  .fp-mobile .fp-header h1 { margin: 2px 0 0; font-size: 17px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fp-mobile .fp-header small { color: #1265ef; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
  .fp-mobile .fp-header button, .fp-mobile .fp-panel header button { background: #eef4ff; color: #1265ef; border: 0; border-radius: 12px; padding: 10px; }
  .fp-mobile .fp-header svg, .fp-mobile .fp-panel svg, .fp-mobile .fp-context-close svg { width: 24px; height: 24px; display: block; }
  .fp-mobile .fp-bottom-nav { position: fixed; z-index: 110; bottom: 0; left: 0; right: 0; height: calc(var(--fp-nav-height) + env(safe-area-inset-bottom)); padding: 5px max(6px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); background: rgba(255,255,255,.98); border-top: 1px solid var(--fp-border); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .fp-mobile .fp-bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 12px; color: var(--fp-muted); background: transparent; font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1.2; padding: 4px; }
  .fp-mobile .fp-bottom-nav svg { width: 24px; height: 24px; }
  .fp-mobile .fp-bottom-nav button[aria-current=page] { background: #edf4ff; color: #1265ef; }
  .fp-mobile .fp-bottom-nav b { position: absolute; top: 0; left: 56%; background: #c9233f; color: white; border-radius: 12px; padding: 2px 5px; }
  .fp-mobile .fp-network { display: flex; gap: 8px; align-items: center; background: #fff4db; color: #704a00; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
  .fp-mobile .fp-network button { flex: 0 0 44px; border: 0; background: transparent; font-size: 24px; }
  .fp-mobile.fp-loading .fp-header::after { content: ''; position: absolute; height: 3px; background: #1265ef; left: 0; bottom: -1px; width: 35%; animation: fp-progress 1.3s ease-in-out infinite alternate; }
  @keyframes fp-progress { to { transform: translateX(180%); } }
  .fp-mobile.fp-panel-open body { overflow: hidden; }
  .fp-mobile .fp-panel, .fp-mobile .main > .fp-context-open { position: fixed !important; inset: 0; z-index: 300; width: 100%; max-width: none; height: 100dvh; margin: 0; overflow: auto; overscroll-behavior: contain; background: #f7f9fd; padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: block !important; }
  .fp-mobile .fp-panel header { position: sticky; top: calc(-12px - env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f7f9fd; padding: 12px 0; z-index: 2; }
  .fp-mobile .fp-panel h2 { margin: 0; font-size: 24px; }
  .fp-mobile .fp-panel > button, .fp-mobile .fp-menu-group button { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 14px; margin: 6px 0; border: 1px solid var(--fp-border); background: white; border-radius: 12px; color: #19345b; font: inherit; }
  .fp-mobile .fp-menu-group button[aria-current=page] { border-color: #1265ef; background: #edf4ff; }
  .fp-mobile .fp-menu-group h3 { color: var(--fp-muted); font-size: 13px; margin: 22px 0 8px; }
  .fp-mobile .fp-menu-search { display: grid; gap: 8px; font-size: 13px; color: var(--fp-muted); }
  .fp-mobile .fp-menu-search input { width: 100%; }
  .fp-mobile .fp-profile { display: grid; justify-items: center; gap: 8px; margin: 18px 0 26px; }
  .fp-mobile .fp-profile > span { color: var(--fp-muted); }
  .fp-mobile .fp-avatar { border-radius: 20px; width: 64px; height: 64px; display: grid; place-items: center; background: #e4edff; font-size: 28px; color: #1265ef; }
  .fp-mobile .fp-panel .fp-danger { color: #b51c34; }
  .fp-mobile .fp-install { margin: 14px 0; padding: 14px; border: 1px solid var(--fp-border); border-radius: 12px; background: white; line-height: 1.5; }
  .fp-mobile .fp-install summary { min-height: 44px; align-content: center; }
  .fp-mobile .fp-context-close { display: flex; align-items: center; gap: 8px; margin: 0 0 20px auto; color: #1265ef; background: white; border: 1px solid var(--fp-border); border-radius: 12px; padding: 10px 14px; }
  .fp-mobile .fp-context-open > *, .fp-mobile .fp-context-open .topbar-actions { max-width: 100%; }
  .fp-mobile .fp-context-open .topbar-actions, .fp-mobile .fp-context-open .filters, .fp-mobile .fp-context-open .toolbar { flex-wrap: wrap; }
  .fp-mobile .fp-context-open .topbar-left, .fp-mobile .fp-context-open .topbar-main { display: grid; gap: 12px; }
  .fp-mobile .fp-fold { border: 1px solid var(--fp-border); background: white; border-radius: 12px; margin: 12px 0; overflow: hidden; }
  .fp-mobile .fp-fold > summary { padding: 14px; min-height: 48px; font-weight: 650; color: #28466d; }
  .fp-mobile .fp-fold > :not(summary) { margin: 0; padding: 12px; }
  .fp-mobile .ld-heading, .fp-mobile .mk-heading { gap: 14px; margin-bottom: 16px; }
  .fp-mobile .ld-heading h2, .fp-mobile .mk-heading h2 { font-size: 25px; line-height: 1.2; }
  .fp-mobile .ld-heading > div > p, .fp-mobile .mk-heading > div > p { font-size: 14px; line-height: 1.5; }
  .fp-mobile .ld-tabs, .fp-mobile .mk-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 4px 0 10px; }
  .fp-mobile .ld-tabs > button, .fp-mobile .mk-tabs > button { flex: 0 0 auto; min-width: 0; width: auto; padding: 10px 14px; white-space: nowrap; }
  .fp-mobile .ld-toolbar, .fp-mobile .mk-toolbar { display: grid; grid-template-columns: minmax(0,1fr); }
  .fp-mobile .mk-counters, .fp-mobile .ld-counters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fp-mobile .session-warning { bottom: calc(var(--fp-nav-height) + env(safe-area-inset-bottom) + 8px); max-width: calc(100vw - 24px); }
  .fp-return-app { margin: 12px; min-height: 44px; border: 1px solid #c7dafc; background: #edf4ff; color: #1265ef; border-radius: 10px; padding: 10px 16px; }
}
