/* Selfish POS Scheduling — MOBILE design system. Loaded only for narrow-view/touch.
   Deliberately separate from styles.css (desktop). Shares only the same token source. */
@media (max-width:480px){
  .time-picker-unified{padding:2px 4px;gap:4px}
  .time-picker-unified .tp-text-input{width:64px!important;min-width:60px!important;font-size:12.5px!important}
  .time-picker-unified .tp-dropdowns select{font-size:15px!important;padding:2px 1px!important}
}

@media screen and (max-width:760px){
.workspace-layout:has(>.destination-bar){grid-template-columns:minmax(0,1fr);padding-bottom:calc(72px + env(safe-area-inset-bottom))}
.destination-bar{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:20;flex-direction:row;justify-content:space-around;gap:0;padding:4px 4px calc(4px + env(safe-area-inset-bottom));border-radius:0;border-width:1px 0 0;box-shadow:none}
.destination-bar button{flex:1 1 0;width:auto;min-width:48px;padding:6px 2px;text-align:center;font-size:clamp(11px,3.4vw,13px);border-radius:var(--sch-r-md);white-space:nowrap;overflow-wrap:normal;word-break:normal}
}

@media screen and (max-width:760px){
dialog[open]{margin:auto 0 0 0;height:auto;max-height:92dvh;width:100%;max-width:100%;border-radius:var(--sch-r-lg) var(--sch-r-lg) 0 0;padding-bottom:calc(20px + env(safe-area-inset-bottom));animation-name:sch-sheet-bottom}
}

@media screen and (max-width:900px){
  .signed-in main.column{padding-inline:14px}
  .app-shell{grid-template-columns:180px minmax(0,1fr);gap:14px}
  .app-sidebar{padding-right:14px}
  .workspace-heading .workspace-role{font-size:11px;flex-basis:100%}
  .week-primary-actions{width:100%}
}

@media screen and (max-width:760px){
  .signed-in header{padding:10px 14px}
  .signed-in header .header-note{display:none}
  .signed-in main.column{padding-bottom:20px}
  .app-shell{display:flex;flex-direction:column;gap:0}
  .app-sidebar{display:contents}
  .app-sidebar .business-switcher{order:0;margin:14px 0;font-size:12px}
  .destination-bar{order:1;position:static;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;border-bottom:1px solid var(--sch-line);margin:0 0 14px}
  #workspaceNavigation button{display:flex;flex-direction:column;justify-content:center;gap:4px;font-size:10px;padding:6px 0;min-width:0;min-height:56px;border-radius:4px}
  .nav-symbol{width:20px;height:20px;flex-basis:20px}
  .workspace-main{order:2;padding-top:0}
  .global-navigation{order:3;flex-direction:row;flex-wrap:wrap;margin-top:20px;gap:8px}
  .global-links,.account-actions{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px}
  .global-navigation button{flex:1 1 140px;min-height:48px;border-color:var(--sch-line);text-align:center}
  .account-actions .meta{padding:0;flex-basis:100%}
  .workspace-heading{padding-top:0}
  .workspace-heading h1{font-size:26px}
  .workspace-heading>div{flex:1 1 100%}
  .workspace-context .status-note{display:block}
  .workspace-context .status-pill{margin-right:4px}
  #destinationHub button{padding:10px 8px;font-size:12px;flex:0 1 auto}
  .panel{padding:14px}
  .week-navigation{width:100%;justify-content:space-between}
  .week-primary-actions{gap:8px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .week-primary-actions button{padding:8px 4px;font-size:12px;min-width:0}
  .planner .metrics{gap:14px}
  .planner .metric{flex-direction:row;gap:6px}
  .planner-table th:first-child,.planner-table td:first-child{min-width:90px;width:clamp(95px,13vw,120px);padding:6px 4px}
  .roster .section-head>.primary{width:100%}
  .roster-filters label{flex:1 1 100%}
  .onboarding-steps li{flex:1 1 50%;min-height:44px}
  #onboardingSheet,#personSheet{width:100%;max-height:92dvh}
}

@media screen and (max-width:760px){
  .destination-bar{position:fixed;bottom:0;top:auto;left:0;width:100%;z-index:10;background:var(--white);border-top:1px solid var(--sch-line);border-bottom:0;margin:0;padding:4px 8px calc(4px + env(safe-area-inset-bottom))}
  .app-shell.workspace-layout{padding-bottom:80px}
  .signed-in footer{padding-bottom:100px}
}

@media (hover:none), (pointer:coarse) {
  .cell-add span {opacity:1}
  .planner-table .cell-add {border-color:var(--sch-line);border-style:dashed}
}

@media screen and (max-width:760px){
  .app-sidebar .workspace-context{order:3;margin-top:14px}
  .app-sidebar #emailSetupWarning>span:last-child{display:inline}
  .app-sidebar #emailSetupWarning{margin:0;padding:10px 0}
}

@media screen and (max-width:760px){
  #destinationHub{flex-wrap:nowrap;overflow-x:auto}
  #destinationHub button{flex:0 0 auto;white-space:nowrap}
  .signed-in #notice{right:14px;bottom:80px;max-width:calc(100vw - 28px)}
}

@media screen and (max-width:760px) {
  .planner-header-bar {gap:12px}
  .planner-header-controls {width:100%;gap:8px}
  .planner-header-controls>* {flex:1 1 160px;justify-content:center}
  .planner-header-controls .week-view-switch {flex-basis:180px}
  .planner-top-bar {align-items:stretch;gap:8px}
  .planner-nav-menus {width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) 44px;gap:4px}
  .menu-dropdown-btn {width:100%;padding:8px 6px!important}
  .menu-dropdown-btn .menu-icon {display:none}
  .planner-primary-cluster {width:100%;margin-left:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .planner-primary-cluster button {padding-inline:4px!important}
  .planner-primary-cluster .btn-action-publish {font-size:18px!important}
}

@media (pointer:coarse) {
  .btn-week-nav,.week-view-switch button,.menu-dropdown-btn,.menu-dropdown-item,
  .btn-action-primary,.btn-action-secondary,.btn-action-publish {min-height:48px!important}
  .btn-week-nav.btn-nav-prev,.btn-week-nav.btn-nav-next {min-width:48px;width:48px}
}

@media screen and (max-width:760px) {
  dialog.planner-context-sheet[open] {width:100%;max-height:92dvh;padding:14px 14px calc(14px + env(safe-area-inset-bottom))}
  .planner-sheet-heading {top:-14px}
  .planner-sheet-body .fields {grid-template-columns:minmax(0,1fr)}
}

@media screen and (max-width: 760px) {
  dialog.onboarding-wizard-modal[open],
  dialog.hr-documents-grid-modal[open],
  dialog.doc-builder-dialog[open],
  dialog.doc-view-dialog[open],
  dialog.manager-verify-dialog[open] {
    position: fixed !important;
    inset: 0 !important;
    margin: auto !important;
    width: 96vw !important;
    max-width: 96vw !important;
    height: 94vh !important;
    max-height: 94vh !important;
    border-radius: 16px !important;
    animation: sch-wizard-pop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    padding-bottom: 0 !important;
  }

  .wizard-header {
    padding: 16px 18px 12px 18px;
  }

  .wizard-content {
    padding: 20px 18px;
  }

  .wizard-toolbar {
    padding: 14px 18px;
  }

  .hr-grid-header {
    padding: 14px 16px 10px 16px;
    gap: 10px;
  }

  .hr-grid-header h2 {
    font-size: 18px;
  }

  .hr-grid-sub {
    font-size: 15px;
  }

  .hr-grid-controls {
    padding: 10px 16px;
    gap: 10px;
  }

  .controls-left {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .staff-search-label, .staff-filter-label {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .staff-search-input, .staff-filter-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .controls-right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .hr-grid-footer {
    padding: 10px 16px;
    flex-direction: row;
  }
}

@media (pointer:coarse) {
  .cell-avail-bar,.btn-toggle-avail,.shift-cell:has(.cell-avail-bar) .cell-add {min-height:48px!important}
}

@media screen and (max-width: 768px) {
  /* 1. Viewport & Document Container: Strict No Horizontal Scroll & No Zoom */
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    touch-action: pan-y !important;
  }
  
  *, *::before, *::after {
    box-sizing: border-box !important;
    max-width: 100%;
  }

  /* Form inputs at least 16px to prevent iOS Safari auto-zoom on focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* 2. Compact Sticky Top App Bar */
  header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 900 !important;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 14px 6px !important;
    background: var(--ink) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  }
  header .column.header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 0 !important;
  }
  header .identity {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }
  header .identity img {
    width: 30px !important;
    height: 18px !important;
  }
  header .identity strong {
    font-size: 14.5px !important;
    letter-spacing: 0.04em !important;
    line-height: 1 !important;
  }
  header .identity span {
    font-size: 8px !important;
    letter-spacing: 0.12em !important;
    margin-top: 1px !important;
    opacity: 0.7 !important;
  }
  header .header-note {
    display: none !important;
  }

  /* 3. Main Workspace Layout & Safe Area Padded Shell */
  .app-shell.workspace-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    min-height: 0 !important;
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  main.column {
    padding: 8px 10px calc(80px + env(safe-area-inset-bottom, 0px)) 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  /* Hide Desktop Marketing Footer when Signed In to Workspace */
  .signed-in.in-workspace footer {
    display: none !important;
  }
  
  /* 4. Streamline Location & Heading */
  .signed-in.in-workspace .app-sidebar .business-switcher {
    display: none !important;
  }
  .app-sidebar .workspace-context {
    display: none !important;
  }
  
  /* Account & Session Controls at bottom of content */
  .global-navigation {
    order: 99 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 24px !important;
    margin-bottom: 16px !important;
    padding: 14px !important;
    background: var(--white) !important;
    border-radius: var(--sch-r-sm) !important;
    border: 1px solid var(--sch-line) !important;
  }
  .global-navigation .global-links {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .global-navigation .sidebar-account-accordion {
    border: 0 !important;
    background: transparent !important;
  }
  .global-navigation .sidebar-account-panel {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 10px !important;
  }

  .workspace-heading {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 2px 0 8px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }
  .workspace-heading > div {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .workspace-heading h1 {
    font-size: 18px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
  }
  .workspace-heading .eyebrow {
    display: none !important;
  }
  .workspace-heading .workspace-role {
    font-size: 11px !important;
    color: var(--ink-70) !important;
    flex: 0 0 auto !important;
  }
  .location-switcher-header {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .location-switcher-btn {
    min-height: 44px !important;
    height: auto !important;
    padding: 8px 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 15px !important;
    background: var(--sch-surface-sunk) !important;
    border: 1px solid var(--sch-line) !important;
    color: var(--ink) !important;
  }
  .location-single-label .location-name {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--ink-70) !important;
  }

  /* 5. Sub-navigation Pills (#destinationHub) */
  #destinationHub.destination-hub {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    padding: 2px 0 8px !important;
    margin: 0 0 8px !important;
    border: none !important;
  }
  #destinationHub::-webkit-scrollbar {
    display: none !important;
  }
  #destinationHub button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    min-width: 48px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 24px !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    background: var(--paper) !important;
    color: var(--ink-70) !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    transition: all 0.15s ease !important;
  }
  #destinationHub button[aria-current="page"] {
    background: var(--ink) !important;
    color: var(--white) !important;
    border-color: var(--ink) !important;
    box-shadow:none !important;
  }

  /* 6. Fixed Bottom App Navigation Bar */
  #workspaceNavigation.destination-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    gap: 0 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid var(--sch-line) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow:none !important;
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
  }
  #workspaceNavigation button {
    flex: 1 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    min-height: 48px !important;
    min-width: 0 !important;
    padding: 4px 1px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    color: var(--ink-70) !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
  }
  #workspaceNavigation button .nav-symbol {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    stroke-width: 2 !important;
    color: inherit !important;
  }
  #workspaceNavigation button[aria-current="page"] {
    color: var(--ink) !important;
    font-weight: 700 !important;
    background: var(--sch-ink-06) !important;
  }
  #workspaceNavigation button[aria-current="page"] .nav-symbol {
    stroke-width: 2.5 !important;
    color: var(--ink) !important;
  }

  /* 7. Floating Toasts & Notices (Safely above bottom nav) */
  #toastContainer, .toast-container, .signed-in #notice, #notice {
    position: fixed !important;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    right: 12px !important;
    max-width: none !important;
    z-index: 10001 !important;
  }

  /* 8. Planner Schedule Header & Controls */
  .planner.panel {
    padding: 8px 8px 12px !important;
    border-radius: 12px !important;
    margin: 4px 0 10px !important;
  }
  .planner-header-bar {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
  }
  .planner-title-block {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    width: 100% !important;
  }
  .planner-title-block .eyebrow {
    font-size: 8.5px !important;
    margin: 0 !important;
    letter-spacing: 0.05em !important;
  }
  .planner-title-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 6px !important;
  }
  .planner-title-row h2 {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
  }
  .planner-status-badge {
    font-size: 9.5px !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
  }
  .planner-header-controls {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 6px !important;
  }
  .week-navigation-group {
    display: flex !important;
    align-items: center !important;
    background: var(--sch-surface-sunk) !important;
    padding: 2px !important;
    border-radius: 8px !important;
    border: 1px solid var(--sch-line) !important;
  }
  .week-navigation-group button {
    min-height: 44px !important;
    height: auto !important;
    padding: 8px 8px !important;
    font-size: 11px !important;
    border: none !important;
    border-radius: 6px !important;
    background: transparent !important;
  }
  .week-view-switch {
    display: flex !important;
    align-items: center !important;
    background: var(--sch-surface-sunk) !important;
    padding: 2px !important;
    border-radius: 8px !important;
    border: 1px solid var(--sch-line) !important;
  }
  .week-view-switch button {
    min-height: 44px !important;
    height: auto !important;
    padding: 8px 9px !important;
    font-size: 11px !important;
    border: none !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--ink-70) !important;
  }
  .week-view-switch button[aria-pressed="true"] {
    background: var(--ink) !important;
    color: var(--white) !important;
    font-weight: 700 !important;
  }
  .planner-fullscreen-controls {
    display: none !important;
  }
  
  /* Planner Menus & Action Buttons */
  .planner-top-bar {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
  }
  .planner-nav-menus {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
    width: 100% !important;
  }
  .menu-dropdown-btn {
    width: 100% !important;
    min-height: 48px !important;
    padding: 6px 4px !important;
    font-size: 11px !important;
    justify-content: center !important;
    gap: 3px !important;
    border-radius: 6px !important;
    border: 1px solid var(--sch-line) !important;
    background: var(--white) !important;
  }
  .planner-primary-cluster {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1.2fr !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .planner-primary-cluster #shift.btn-action-primary {
    min-height: 44px !important;
    height: auto !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background: var(--ink) !important;
    color: var(--white) !important;
    border: none !important;
    justify-content: center !important;
  }
  .planner-primary-cluster #save.btn-action-secondary {
    min-height: 44px !important;
    height: auto !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: var(--white) !important;
    border: 1px solid var(--sch-line-control) !important;
    justify-content: center !important;
  }
  .planner-primary-cluster #publish.btn-action-publish {
    min-height: 44px !important;
    height: auto !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background: var(--sage) !important;
    color: var(--white) !important;
    border: none !important;
    justify-content: center !important;
  }

  /* Details and Metrics under Planner */
  .schedule-tools, .schedule-guide {
    margin: 4px 0 !important;
  }
  .schedule-tools summary, .schedule-guide summary {
    font-size: 11px !important;
    padding: 6px 0 !important;
  }
  .planner .metrics {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 14px !important;
    padding: 8px 0 !important;
    margin-top: 8px !important;
  }
  .planner .metric {
    display: flex !important;
    align-items: baseline !important;
    gap: 4px !important;
  }
  .planner .metric label {
    font-size: 10.5px !important;
  }
  .planner .metric strong {
    font-size: 12.5px !important;
  }

  /* 10. Native Bottom Sheet Dialogs & Modals (100% Solid, Beautiful Stack) */
  dialog[open], dialog#editor[open], dialog#personSheet[open], dialog#onboardingSheet[open] {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 86vh !important;
    max-height: 86vh !important;
    background: var(--white) !important;
    background-color: var(--white) !important;
    opacity: 1 !important;
    border-radius: 20px 20px 0 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-bottom: none !important;
    box-shadow:none !important;
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 10000 !important;
    animation: sch-sheet-bottom var(--sch-dur-sheet) var(--sch-ease-settle) backwards !important;
  }
  dialog::backdrop {
    background: rgba(0, 0, 0, 0.68) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }
  dialog[open]::before {
    content: "" !important;
    display: block !important;
    width: 44px !important;
    height: 5px !important;
    border-radius: 3px !important;
    background: var(--rule-hair) !important;
    margin: 0 auto 14px !important;
  }
  dialog[open] form:not([hidden]) {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
  }
  dialog[open] .fields, .fields {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
  }
  dialog[open] .fields label, label.field {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  dialog[open] input, dialog[open] select, dialog[open] textarea {
    font-size: 16px !important;
    min-height: 48px !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    border: 1px solid var(--sch-line-control) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  dialog[open] button {
    min-height: 48px !important;
  }
  dialog[open] .toolbar {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    margin-top: auto !important;
    padding-top: 14px !important;
    position: sticky !important;
    bottom: -14px !important;
    background: var(--white) !important;
    border-top: 1px solid var(--sch-line) !important;
    z-index: 10 !important;
    width: 100% !important;
  }
  dialog[open] .toolbar button {
    flex: 1 1 0 !important;
    min-height: 48px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    justify-content: center !important;
  }

  /* Unified Time Picker in dialogs */
  .time-field-wrapper {
    width: 100% !important;
  }
  .time-picker-unified {
    min-height: 44px !important;
    padding: 4px 8px !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .time-picker-unified .tp-text-input {
    width: 80px !important;
    min-width: 70px !important;
    font-size: 16px !important;
  }
  .time-picker-unified .tp-dropdowns {
    padding-left: 6px !important;
    gap: 2px !important;
  }
  .time-picker-unified .tp-dropdowns select {
    font-size: 15px !important;
    min-height: 44px !important;
    padding: 2px 2px !important;
  }

  /* 11. Team, Roster & Other Views */
  .roster-table {
    min-width: 0 !important;
    width: 100% !important;
  }
  .roster-filters {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .roster-filters label {
    width: 100% !important;
    flex: 1 1 100% !important;
  }
  
  /* 12. Settings Cards */
  .section-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .section-options button {
    width: 100% !important;
    min-height: 54px !important;
    border-radius: 10px !important;
  }

  /* 13. Secure Personnel & Onboarding Wizard Mobile Sheet */
  dialog.secure-personnel[open] {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    margin: auto 0 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 92dvh !important;
    border-radius: var(--sch-r-lg) var(--sch-r-lg) 0 0 !important;
    padding: 16px 14px calc(24px + env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }
  dialog.secure-personnel nav.toolbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
  }
  dialog.secure-personnel nav.toolbar button {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  /* 14. Mobile Incomplete Onboarding Banner & Pill */
  .onboarding-incomplete-banner {
    padding: 14px 14px !important;
    border-radius: 10px !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .onboarding-banner-top {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .onboarding-banner-collapse-btn {
    align-self: flex-end !important;
    font-size: 12px !important;
    padding: 2px 6px !important;
  }
  .onboarding-banner-actions {
    width: 100% !important;
  }
  .onboarding-banner-action-btn {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 14px !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .onboarding-incomplete-pill {
    padding: 10px 12px !important;
    border-radius: 8px !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .onboarding-pill-btn {
    min-height: 40px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
  }
}

/* === Homebase-Style Schedule UX & Employee Centralization === */
body.schedule-busy,
body.schedule-busy .planner,
body.schedule-busy .planner-table,
body.schedule-busy .shift-chip,
body.schedule-busy .cell-add {
  cursor: progress !important;
}

.person-name-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  color: inherit;
  font: inherit;
  text-decoration: none;
}
.person-name-link strong {
  color: var(--sch-text, var(--ink));
  transition: color 0.15s ease;
}
.person-name-link:hover strong {
  color: var(--sch-primary, var(--sage));
  text-decoration: underline;
}

.termination-modal .modal-content {
  max-width: 520px;
  border-radius: 12px;
  padding: 24px;
}
.termination-warning-banner {
  display: flex;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--rule-dash);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}
.termination-warning-banner strong {
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}
.rehire-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  margin: 14px 0 20px;
}
.rehire-badge-eligible {
  background: var(--paper);
  color: var(--sage);
  border: 1px solid var(--rule-hair);
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
.rehire-badge-ineligible {
  background: var(--paper);
  color: var(--ink-70);
  border: 1px solid var(--rule-hair);
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.archived-roster-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--sch-line, var(--rule-hair));
}
.archived-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--rule-hair);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-70);
  cursor: pointer;
}
.archived-toggle-btn:hover {
  background: var(--paper);
  color: var(--ink);
}
.archived-reason-pill {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--rule-hair);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--ink);
}

.shift-edit-section {
  background: var(--white);
  border: 1px solid var(--sch-line, var(--rule-hair));
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}
.shift-edit-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sch-muted, var(--ink-70));
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.shift-time-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.shift-time-preset-btn {
  background: var(--paper);
  border: 1px solid var(--rule-hair);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.shift-time-preset-btn:hover {
  background: var(--rule-hair);
  border-color: var(--ink-70);
  color: var(--ink);
}

/* Schedule Paste Mode (Homebase style) */
.schedule-paste-banner {
  background: var(--ink);
  color: var(--white);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow:none;
  border: 1px solid var(--ink);
}
.paste-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.paste-banner-icon {
  font-size: 20px;
  background: var(--ink);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.paste-banner-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.paste-banner-title {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.paste-banner-title strong {
  color: var(--sage);
  font-weight: 700;
}
.paste-banner-times {
  font-weight: 600;
  color: var(--paper);
}
.paste-banner-role {
  color: var(--ink-70);
  font-size: 13px;
}
.paste-banner-sub {
  font-size: 12px;
  color: var(--ink-70);
}
.paste-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.finish-pasting-btn {
  background: var(--sage) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  cursor: pointer;
  transition: background 0.15s ease;
}
.finish-pasting-btn:hover {
  background: var(--sage) !important;
}
.cancel-pasting-btn {
  background: transparent !important;
  color: var(--rule-hair) !important;
  border: 1px solid var(--ink-70) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  cursor: pointer;
}
.cancel-pasting-btn:hover {
  background: var(--ink) !important;
  color: var(--white) !important;
}

/* Hover indicator during paste mode */
body.schedule-pasting-mode .shift-cell {
  cursor: copy !important;
}
body.schedule-pasting-mode .shift-cell:hover {
  background: rgba(14, 165, 233, 0.09) !important;
  outline: 2px dashed var(--sage) !important;
  outline-offset: -2px;
}
body.schedule-pasting-mode .shift-chip {
  cursor: copy !important;
}

/* Copy button on shift chip */
.shift-chip-copy-action {
  opacity: 0;
  font-size: 11px;
  margin-left: auto;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.07);
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.shift-chip:hover .shift-chip-copy-action {
  opacity: 0.85;
}
.shift-chip-copy-action:hover {
  opacity: 1 !important;
  background: rgba(0, 0, 0, 0.18) !important;
  transform: scale(1.15);
}
@media (hover: none) {
  .shift-chip-copy-action {
    opacity: 0.75;
  }
}


}

@media screen and (max-width:600px){.fields{grid-template-columns:minmax(0,1fr)}}
@media screen and (max-width:600px){.address-locality{grid-template-columns:minmax(0,1fr)}.street-row{grid-template-columns:minmax(0,1fr) 100px}.section-head>.toolbar{width:100%}.section-head{flex-wrap:wrap}}
@media screen and (max-width:600px){.toolbar>button{flex:1 1 140px;min-width:min(140px,100%)}.toolbar>label.field{flex:1 1 100%;width:100%}}
@media screen and (max-width:900px){.welcome-grid{gap:28px}.workspace-heading{align-items:flex-start;flex-wrap:wrap}.business-switcher{flex:1 1 100%}.workspace-heading>div{flex:1 1 100%}}
@media screen and (max-width:760px){.welcome-grid{grid-template-columns:minmax(0,1fr);padding:20px 0 40px;gap:28px}.welcome-copy{padding-top:0}.welcome-copy h1{font-size:56px}.welcome-rule{margin-top:28px}.welcome-forms .panel{padding:20px}.global-navigation{gap:20px}.global-links,.account-actions{width:100%}.global-links button,.account-actions button{flex:1 1 140px}.account-actions .meta{text-align:left}.workspace-heading{padding:28px 0 20px;gap:20px}.workspace-heading h1{font-size:36px}.business-card{padding:20px}.business-chooser h2{font-size:28px}.business-chooser .section-head{gap:14px}.lead{font-size:18px}}

/* === Mobile touch floors (owner direction 2026-10-26) ===
   Desktop (styles.css) uses compact 34–38px pointer floors. Touch contexts never
   fall below 44px. This section loads last and only below 768px. */
button, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea {
  min-height: 44px !important;
}
#workspaceNavigation button,
.destination-bar button,
.destination-hub button,
#destinationHub button,
.global-navigation button,
.onboarding-pill-btn,
.reveal-password {
  min-height: 48px !important;
  height: auto !important;
}
.menu-dropdown-btn,
.menu-dropdown-item,
.btn-week-nav,
.week-view-switch button,
.btn-action-primary,
.btn-action-secondary,
.btn-action-publish,
.person-tabs button,
.today-card button,
.secure-personnel nav.toolbar button {
  min-height: 48px !important;
  height: auto !important;
}
.location-switcher-btn,
.week-navigation-group button,
.planner-primary-cluster button,
.wizard-toolbar .btn {
  min-height: 44px !important;
  height: auto !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}
[aria-label="Time and attendance"] button,
.field-wrap input,
.field-wrap select,
.btn-toggle-avail,
.onboarding-banner-collapse-btn,
.avail-history-btn,
.btn-back-schedule {
  min-height: 44px !important;
  height: auto !important;
}
.menu-dropdown-btn.btn-kebab,
.menu-dropdown-btn.btn-nav-prev,
.menu-dropdown-btn.btn-nav-next,
.btn-week-nav.btn-nav-prev,
.btn-week-nav.btn-nav-next {
  min-width: 44px !important;
  width: auto !important;
}
.shift-chip-copy-action {
  min-height: 44px !important;
  min-width: 44px !important;
  padding: 0 6px !important;
}
/* Dialog form fields keep their existing 48px keyboard-entry floor on touch. */
dialog[open] button,
dialog[open] input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
dialog[open] select,
dialog[open] textarea {
  min-height: 48px !important;
  height: auto !important;
}

/* Empty-cell tap zones must never overlap: the availability chip owns the top
   strip exactly, the add button owns the rest, and the cell's tap center always
   lands on the add button (the editor). Owner direction 2026-10-26. */
.shift-cell:has(.cell-avail-bar){display:flex;flex-direction:column;gap:0}
.cell-avail-bar{height:44px !important;min-height:44px !important;max-height:44px !important;padding:0 !important;flex:0 0 44px}
.shift-cell:has(.cell-avail-bar) .cell-add{height:44px !important;min-height:44px !important;padding:0 !important;flex:1 1 auto}

/* Pushback P1, 2026-10-27: controls the desktop sweep compacted must never
   render below 44px on touch. Same specificity, later sheet wins. */
.app-sidebar .business-switcher select{min-height:44px !important;height:auto !important}
dialog#editor .editor-footer button,
dialog#editor .editor-close-x,
.btn-link, button.btn-link,
.close-sheet-link{min-height:44px !important;height:auto !important}
dialog#editor .editor-close-x{min-width:44px !important}
