/* Mobile web foundation. Desktop layout and business rules remain in styles.css/app.js. */
@media (max-width: 920px) {
  #appShellView { --mobile-radius: 18px; }
  #appShellView .page-wrap { padding: 20px 16px calc(100px + env(safe-area-inset-bottom, 0px)) !important; }
  #appShellView .panel, #appShellView .employee-card, #appShellView .report-summary {
    border-radius: var(--mobile-radius);
    border: 1px solid var(--line);
    box-shadow: 0 4px 20px rgba(15, 35, 45, .035);
  }
  #appShellView .panel { padding: 18px; min-width: 0; }
  #appShellView .page-heading { gap: 16px; margin-bottom: 20px; }
  #appShellView .page-heading h1 { font-size: clamp(23px, 5.5vw, 30px); letter-spacing: -.8px; line-height: 1.2; }
  #appShellView .page-heading .muted { font-size: 13px; line-height: 1.65; margin-top: 8px; }
  #appShellView .eyebrow { font-size: 10px; letter-spacing: 1.3px; }
  #appShellView .panel-heading h2 { font-size: 16px; line-height: 1.35; }
  #appShellView .panel-heading p { font-size: 12px; line-height: 1.5; }
  #appShellView .button, .modal-backdrop .button, .logout-confirm-dialog .button { min-height: 44px; border-radius: 11px; font-size: 12px; line-height: 1.4; }
  #appShellView button, .modal-backdrop button { touch-action: manipulation; }
  #appShellView :is(.icon-button, .mobile-menu), .modal-backdrop .modal-close { min-width: 44px; min-height: 44px; }
  #appShellView .form-input, .modal-backdrop .form-input, .logout-confirm-dialog .form-input {
    min-height: 46px; height: auto; font-size: 16px !important; border-radius: 11px; padding: 11px 12px;
  }
  #appShellView input[type="checkbox"], .modal-backdrop input[type="checkbox"] { min-width: 20px; min-height: 20px; }
  #appShellView .metric-grid { gap: 12px !important; }
  #appShellView .metric-card { padding: 16px !important; border-radius: 16px; min-width: 0; }
  #appShellView .metric-card > strong { font-size: clamp(22px, 5vw, 29px) !important; line-height: 1.2; overflow-wrap: anywhere; }
  #appShellView .metric-label { font-size: 11px; line-height: 1.4; }
  #appShellView .metric-card small { font-size: 10px; line-height: 1.4; }
  #appShellView .dashboard-grid, #appShellView .lower-grid { gap: 16px !important; }
  #appShellView .shortcut-grid { gap: 10px; }
  #appShellView .shortcut-grid button { min-height: 70px; padding: 14px; border-radius: 14px; text-align: left; }
  #appShellView .shortcut-grid b { font-size: 12px; line-height: 1.4; }
  #appShellView .shortcut-grid small { font-size: 11px; line-height: 1.5; }
  #workerShiftConfirmBanner { padding: 20px !important; border-radius: 20px !important; }
  #workerShiftBannerTitle { line-height: 1.5; }
  #workerShiftBannerSub { display: block; line-height: 1.65; margin-top: 6px; }
  #workerShiftActionsWrap { width: 100%; }
  #workerShiftActionsWrap .button { width: 100%; min-height: 50px; white-space: normal; }
  #trialBanner { padding: 16px !important; gap: 14px; flex-wrap: wrap; }
  #trialBanner small { line-height: 1.6; }
  #trialBanner > div { min-width: 0; }
  #appShellView .calendar-cell { min-width: 0; }
  #appShellView .calendar-grid { gap: 4px; }
  #appShellView .calendar-number { font-size: 12px; }
  #appShellView .calendar-legend { gap: 10px; font-size: 10px !important; line-height: 1.5; }
  #appShellView .employee-toolbar { gap: 12px; flex-wrap: wrap; }
  #appShellView .employee-toolbar > *, #appShellView .employee-toolbar .search-box { width: 100%; min-width: 0; }
  #appShellView .employee-toolbar .search-box { min-height: 46px; border-radius: 12px; }
  #appShellView .employee-toolbar .search-box input { font-size: 16px; }
  #appShellView .employee-tabs-bar { gap: 8px !important; }
  #appShellView .emp-tab-btn { flex: 1; min-height: 46px; padding: 10px !important; font-size: 11px !important; line-height: 1.5; }
  #appShellView .employee-card { padding: 20px; }
  #appShellView .employee-big b { font-size: 15px; }
  #appShellView .employee-big small { font-size: 11px; }
  #appShellView .employee-meta span { font-size: 10px; }
  #appShellView .employee-meta b { font-size: 13px; }
  #appShellView .employee-card-footer { gap: 12px; flex-wrap: wrap; }
  #appShellView .employee-card-footer button { min-height: 42px !important; }
  #appShellView .settings-grid-advanced { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
  #appShellView .settings-card { padding: 20px !important; }
  #appShellView .settings-section h2 { font-size: 16px; line-height: 1.4; }
  #appShellView .settings-section p { font-size: 12px; line-height: 1.65; }
  #appShellView .settings-section label { font-size: 12px !important; line-height: 1.5; }
  #appShellView .section-title-wrap > div { min-width: 0; }
  #view-timesheet > .panel { padding: 16px !important; }
  #view-timesheet .worker-detail-toolbar { padding: 12px !important; gap: 12px !important; }
  #view-timesheet .worker-detail-toolbar > div { width: 100%; flex-wrap: wrap; }
  #view-timesheet .month-nav { flex: 1 1 100%; justify-content: space-between; min-height: 44px; }
  #view-timesheet :is(#wdMonthSelect, #wdYearSelect) { flex: 1 1 40%; width: auto !important; }
  #view-timesheet #wdDayFilter { width: 100%; min-width: 0 !important; }
  #view-timesheet .worker-detail-toolbar > div > div:has(#wdDayFilter) { width: 100%; }
  #view-timesheet #wdViewModeToggle { display: flex; flex: 1 1 100%; }
  #view-timesheet .btn-view-mode { flex: 1; min-height: 42px; }
  #view-timesheet #wdBulkActionBar { flex-wrap: wrap; gap: 12px; }
  #view-timesheet #wdBulkActionBar > div { flex-wrap: wrap; }
  .modal-backdrop { align-items: flex-end !important; padding: 0 !important; }
  .modal-backdrop .modal { width: 100%; max-width: 640px !important; max-height: calc(100dvh - 20px) !important; border-radius: 24px 24px 0 0 !important; padding: 22px 20px calc(24px + env(safe-area-inset-bottom, 0px)) !important; overscroll-behavior: contain; }
  .modal-backdrop .modal-header { align-items: flex-start; gap: 12px; margin-bottom: 22px; }
  .modal-backdrop .modal-header h2 { font-size: 21px !important; line-height: 1.3; }
  .modal-backdrop .modal-close { border-radius: 50%; background: var(--surface-alt); color: var(--ink); flex: 0 0 44px; }
  .modal-backdrop .form-footer { flex-wrap: wrap; gap: 10px; padding-top: 16px; }
  .modal-backdrop .form-footer .button { flex: 1; min-width: 110px; min-height: 48px; }
  .modal-backdrop .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .modal-backdrop .form-grid > *, .modal-backdrop .modal form > * { min-width: 0; }
  #employeeForm > div[style*="display:grid"], #profileModalBody div[style*="grid-template-columns:1fr 1fr"], #leaveRequestForm > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: minmax(0, 1fr) !important; }
  #employeeModal label, #profileModal label, #leaveModal label { font-size: 12px !important; line-height: 1.5; }
  #employeeModal #empEditExtraActions > div { flex-wrap: wrap; gap: 14px !important; }
  #employeeModal #empEditExtraActions small { font-size: 11px !important; line-height: 1.5; }
  #employeeModal #btnEmpToggleArchive { min-height: 44px !important; }
  #employeeModal .employee-picker-toolbar { flex-wrap: wrap; }
  #profileModalBody #profileLogoutBtn { min-height: 46px; }
  #geoModal .geo-status-card { padding: 16px; border-radius: 16px; }
  #geoModal #geoDistanceText { font-size: 12px; line-height: 1.6; }
  #geoModal .tab-btn { min-height: 52px; font-size: 11px !important; line-height: 1.4; }
  #geoModal :is(#btnCheckInNow, #btnCheckOutNow) { min-height: 52px; }
  #geoModal .geo-fieldwork-box small { font-size: 11px !important; line-height: 1.6; }
  #geoModal .geo-actions-row { flex-wrap: wrap; }
  #geoModal #btnVerifyLocation { width: 100%; }
  #geoModal .geo-sim-buttons { flex-wrap: wrap; }
  #appShellView .mobile-bottom-nav { height: auto; min-height: calc(76px + env(safe-area-inset-bottom, 0px)); padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); gap: 4px; background: var(--surface) !important; border-color: var(--line); }
  #appShellView .mobile-nav-btn { min-height: 58px; min-width: 0; border-radius: 14px; padding: 7px 3px; color: var(--muted); }
  #appShellView .mobile-nav-btn.active { background: var(--teal-soft); }
  #appShellView .mobile-nav-btn .m-icon { font-size: 21px; }
  #appShellView .mobile-nav-btn .m-label { font-size: 10px; line-height: 1.25; text-align: center; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  #appShellView .mobile-nav-btn.m-checkin-action { top: 0; }
  #appShellView .m-checkin-circle { width: 32px; height: 32px; border: 0; border-radius: 11px; background: var(--teal); color: var(--surface); box-shadow: none; }
  #appShellView .sidebar { border-radius: 0 24px 24px 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  #appShellView .main-nav .nav-item { min-height: 48px; border-radius: 12px; margin-bottom: 4px; font-size: 13px; }
  #appShellView .sidebar .workspace-pill { border-radius: 14px; padding: 14px; }
  #appShellView .toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; }
}
.mobile-theme-slot { display: none; }
@media (max-width: 760px) {
  #appShellView .topbar { height: 72px; padding: 0 12px; gap: 8px; }
  #appShellView .mobile-menu { margin-right: 0; flex: 0 0 40px; min-width: 40px; border-radius: 12px; }
  #appShellView .breadcrumb { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex: 1; min-width: 0; }
  #appShellView .breadcrumb > b { display: none; }
  #appShellView #topbarCompanyName { max-width: 100%; overflow: hidden; font-size: 12px; white-space: nowrap; }
  #appShellView #topbarCompanyName > span { overflow: hidden; text-overflow: ellipsis; }
  #appShellView #pageTitle { font-size: 10px; color: var(--muted); max-width: 100%; }
  #appShellView .topbar-actions { flex: 0 0 auto; gap: 5px; }
  #appShellView #topbarLogoutBtn, #appShellView #topbarUserName { display: none; }
  #appShellView #topbarLoginBtn, #appShellView #notificationButton { min-width: 38px; min-height: 42px; padding: 8px; border-radius: 12px; }
  #appShellView #languageSelect { height: 42px; width: 49px; padding: 0 3px; font-size: 12px; border-radius: 10px; }
  #appShellView .mobile-theme-slot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; padding: 12px; background: var(--surface-alt); border-radius: 12px; color: var(--ink); font-size: 12px; }
  #appShellView .mobile-theme-slot .theme-btn { width: 38px; height: 38px; font-size: 17px; }
  #appShellView .mobile-theme-slot .theme-switch-pill { background: var(--surface); border-color: var(--line); }
}
@media (max-width: 600px) {
  /* Keep the same table data and actions, presented as labelled records on phones. */
  #appShellView .mobile-record-table { display: block; min-width: 0 !important; width: 100%; border: 0; }
  #appShellView .mobile-record-table thead { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  #appShellView .mobile-record-table tbody { display: flex; flex-direction: column; gap: 12px; width: 100%; }
  #appShellView .mobile-record-table tbody tr { display: block; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
  #appShellView .mobile-record-table td { display: grid; grid-template-columns: minmax(90px, 35%) minmax(0, 1fr); align-items: center; gap: 12px; padding: 11px 13px !important; font-size: 12px !important; text-align: left !important; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  #appShellView .mobile-record-table td::before { content: attr(data-mobile-label); color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.5; }
  #appShellView .mobile-record-table td[colspan] { display: block; padding: 14px !important; }
  #appShellView .mobile-record-table td[colspan]::before { content: none; }
  #appShellView .mobile-record-table td:last-child { border-bottom: 0; }
  #appShellView .mobile-record-table td > div { min-width: 0; flex-wrap: wrap; gap: 8px !important; }
  #appShellView .mobile-record-table td .button { white-space: normal; font-size: 11px !important; min-height: 42px; }
  #appShellView #wdTableWrap { border: 0 !important; background: transparent !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; }
  #appShellView #leavesTable { min-width: 0; }
  #appShellView .report-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #appShellView .report-summary { padding: 16px; min-width: 0; }
  #appShellView .report-summary > span { font-size: 11px; line-height: 1.5; }
  #appShellView .report-summary strong { font-size: 23px; margin: 12px 0 6px; overflow-wrap: anywhere; }
  #appShellView .report-summary small { font-size: 10px; line-height: 1.5; }
  #appShellView .panel-heading { flex-wrap: wrap; gap: 12px; }
  #appShellView .panel-heading > div { min-width: 0; }
  #appShellView #leavesStatusFilter { width: 100%; min-height: 44px; }
  #appShellView .employee-toolbar .month-nav { flex: 1; min-height: 44px; }
  #appShellView .employee-toolbar .filter-button { min-height: 44px; padding: 12px; }
  #appShellView .employee-toolbar .view-mode-toggle { width: 100%; }
  #appShellView .employee-toolbar .btn-view-mode { flex: 1; min-height: 42px; }
  #appShellView #empBulkPaymentBar { flex-wrap: wrap; gap: 12px; padding: 14px !important; }
  #appShellView #empBulkPaymentBar button { width: 100%; }
  #appShellView .settings-card div[style*="grid-template-columns:1fr 1fr"], #appShellView .settings-card div[style*="grid-template-columns:130px 1fr auto"] { grid-template-columns: minmax(0, 1fr) !important; }
  #appShellView .settings-card .button { white-space: normal !important; }
  #companySubscriptionSettings #setCurrency { flex-basis: 100% !important; }
  #companySubscriptionSettings #btnSaveCurrency { width: 100%; }
  .logout-confirm-dialog { padding: 22px; border-radius: 22px; }
  .logout-confirm-dialog .form-footer { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  #appShellView *, .modal-backdrop *, .logout-confirm-dialog { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 600px) {
  #appShellView .mobile-record-table td > :nth-child(n+2) { grid-column: 2; }
  #appShellView .mobile-record-table td[style*="white-space:nowrap"] { white-space: normal !important; max-width: none !important; }
}

.mobile-attendance-legend { display: none; }
@media (max-width: 920px) {
  /* Workers see attendance at a glance; pay and shift details stay in the table. */
  #appShellView[data-role="worker"] #wdCalendarWrap {
    padding: 6px !important;
    border: 0 !important;
    background: transparent !important;
  }
  #appShellView[data-role="worker"] #wdCalendarGrid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px !important;
  }
  #appShellView[data-role="worker"] #wdCalendarGrid .calendar-cell {
    aspect-ratio: 1;
    min-height: 0 !important;
    height: auto;
    padding: 0 !important;
    border-radius: 11px;
    display: grid !important;
    place-items: center;
    justify-content: center !important;
    background: var(--surface-alt) !important;
    border: 1px solid var(--line) !important;
    box-shadow: none;
  }
  #appShellView[data-role="worker"] #wdCalendarGrid .calendar-cell-top {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #appShellView[data-role="worker"] #wdCalendarGrid .calendar-number {
    color: var(--ink) !important;
    font-size: clamp(14px, 4vw, 21px) !important;
    font-weight: 800;
    line-height: 1;
  }
  #appShellView[data-role="worker"] #wdCalendarGrid :is(.worker-calendar-details, .cal-day-hours-badge, .calendar-mark),
  #appShellView[data-role="worker"] #wdCalendarGrid .calendar-number > span {
    display: none !important;
  }
  #appShellView[data-role="worker"] #wdCalendarGrid .attendance-worked {
    background: #15803d !important;
    border-color: #166534 !important;
  }
  #appShellView[data-role="worker"] #wdCalendarGrid .attendance-absent {
    background: #be123c !important;
    border-color: #9f1239 !important;
  }
  #appShellView[data-role="worker"] #wdCalendarGrid :is(.attendance-worked, .attendance-absent) .calendar-number {
    color: #fff !important;
  }
  #appShellView[data-role="worker"] #wdCalendarGrid .attendance-future { opacity: .6; }
  #appShellView[data-role="worker"] #view-timesheet .calendar-legend { display: none; }
  #appShellView[data-role="worker"] .mobile-attendance-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
    margin-top: 18px;
    padding: 10px 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
  }
  .mobile-attendance-legend > span { display: inline-flex; align-items: center; gap: 6px; }
  .attendance-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-alt); border: 1px solid var(--line); }
  .attendance-dot.worked { background: #15803d; border-color: #166534; }
  .attendance-dot.absent { background: #be123c; border-color: #9f1239; }
}
@media (max-width: 920px) {
  #appShellView[data-role="worker"] #wdCalendarGrid :is(.weekend-muted,.weekend-worked) {
    min-height: 64px !important;
    padding: 5px 2px !important;
    align-content: center;
    gap: 4px;
  }
  #appShellView[data-role="worker"] #wdCalendarGrid .calendar-weekly-rest-label {
    font-size: 8px;
    line-height: 1.25;
    text-align: center;
    margin: 0;
    color: var(--muted);
    max-width: 100%;
  }
}

@media (max-width: 920px) {
  #appShellView #mobileGeoCheckinBtn .m-checkin-circle {background:transparent;box-shadow:none;width:auto;height:auto;margin:0;color:inherit;}
  #appShellView #mobileGeoCheckinBtn .m-icon {color:var(--muted);font-size:21px;}
  #employeeModal .modal, #entryModal .modal {min-height:65dvh;}
  .modal-backdrop .form-footer {position:sticky;bottom:0;background:var(--surface);z-index:3;padding-bottom:8px;}
}

@media (max-width: 920px) {
  #appShellView[data-role="worker"] #geoCheckinOpenButton,
  #appShellView[data-role="worker"] #shortcutGeo {display:none !important;}
  #appShellView[data-role="worker"] .worker-today-summary {padding:20px;}
  #appShellView[data-role="worker"] .worker-today-summary > strong {font-size:23px;}
}

@media (max-width: 760px) {
  #superAdminView > header {flex-wrap:wrap;gap:12px;padding:14px 16px !important;}
  #superAdminView > header > div:last-child {width:100%;flex-wrap:wrap;gap:8px !important;}
  #superAdminPasswordBtn {min-height:44px;white-space:normal;}
}

/* Keep report tables from expanding the mobile page and its navigation viewport. */
@media (max-width: 920px) {
  #appShellView .main-content, #appShellView .page-wrap { width: 100%; max-width: 100%; min-width: 0; }
  #appShellView #view-reports, #appShellView #view-reports .report-table-panel { width: 100%; max-width: 100%; min-width: 0; }
  #appShellView #view-reports .page-heading { flex-wrap: wrap; }
  #appShellView #view-reports .page-heading > div { min-width: 0; max-width: 100%; }
  #appShellView #view-reports .report-cards { width: 100%; min-width: 0; }
  #appShellView #monthlyReportTable { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #appShellView #mobileBottomNav { width: 100%; max-width: 100vw; left: 0; right: 0; bottom: 0; }
}
@media (max-width: 400px) {
  #appShellView #view-reports .report-cards { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 400px) {
  #appShellView .topbar-actions { min-width: 0; flex: 1; }
  #appShellView .topbar-actions .search-box { min-width: 0; flex: 1; }
  #appShellView .topbar-actions .search-box input { min-width: 0; width: 100%; }
  #appShellView .topbar-actions .search-box kbd { display: none; }
}

@media (max-width: 920px) {
 #appShellView #mobileMenu { width: 50px; height: 50px; min-width: 50px; min-height: 50px; flex: 0 0 50px; display: inline-flex; align-items: center; justify-content: center; background: #0369a1; color: #fff; border: 1px solid #0284c7; border-radius: 13px; font-size: 27px; box-shadow: 0 3px 10px rgba(3,105,161,.22); }
 #appShellView #mobileMenu:focus-visible { outline: 3px solid #38bdf8; outline-offset: 3px; }
 #appShellView .topbar-actions { flex: 0 0 auto; margin-left: auto; }
}

@media (max-width: 920px) {
 #appShellView .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
 #appShellView .topbar .breadcrumb { min-width: 0; flex: 1; overflow: hidden; }
 #appShellView .topbar-actions { gap: 5px; }
 #appShellView #topbarThemePill { display: flex !important; gap: 2px; padding: 3px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; }
 #appShellView #topbarThemePill .theme-btn { width: 29px; height: 34px; min-width: 29px; min-height: 34px; padding: 0; font-size: 16px; border-radius: 7px; }
 #appShellView #mobileThemeSlot { display: none; }
 #appShellView #dayPanelToolbar > div:first-child > label { width: 100%; }
 #appShellView #dayPanelToolbar .button { flex: 1 1 calc(50% - 8px); }
 #appShellView[data-role="admin"] :is(#calendarGrid,#largeCalendarGrid) .calendar-cell { min-height: 100px; }
 #appShellView[data-role="admin"] :is(#calendarGrid,#largeCalendarGrid) .cal-day-hours-badge { top: 4px; right: 2px; padding: 2px 3px; font-size: 10px; }
 #appShellView[data-role="admin"] :is(#calendarGrid,#largeCalendarGrid) .calendar-number { font-size: 26px; }
 #appShellView[data-role="admin"] :is(#calendarGrid,#largeCalendarGrid) .calendar-cell > :is(small,span:not(.calendar-number):not(.cal-day-hours-badge)) { font-size: 9px !important; }
}

@media(max-width:920px) {
 #appShellView[data-role="worker"] :is(#calendarGrid,#largeCalendarGrid,#wdCalendarGrid) .calendar-cell { display:block !important;aspect-ratio:auto;min-height:100px !important;padding:4px !important; }
 #appShellView[data-role="worker"] #wdCalendarGrid .calendar-cell-top { display:contents; }
 #appShellView[data-role="worker"] :is(#calendarGrid,#largeCalendarGrid,#wdCalendarGrid) .calendar-number { font-size:26px !important; }
 #appShellView[data-role="worker"] #wdCalendarGrid .cal-day-hours-badge { display:block !important; }
 #appShellView[data-role="worker"] #wdCalendarGrid .calendar-cell.muted { background:transparent !important;border:none !important;opacity:1 !important; }
 #appShellView[data-role="worker"] :is(#calendarGrid,#largeCalendarGrid,#wdCalendarGrid) .calendar-cell > :is(small,span:not(.calendar-number):not(.cal-day-hours-badge)) { font-size:9px !important; }
}

@media(max-width:920px) {
 #appShellView[data-role="worker"] #geoCheckinOpenButton { display:inline-flex !important;align-items:center;justify-content:center;gap:8px;min-height:46px; }
 #geoModal.open { display:flex !important;z-index:1200;align-items:flex-end !important; }
 #geoModal .modal { width:100%;max-width:100% !important;max-height:calc(100dvh - 12px) !important;overflow-y:auto;overflow-x:hidden; }
 #geoModal .tab-btn { min-width:0;flex:1 1 0 !important;white-space:normal;padding:8px 4px !important; }
 #appShellView #wdKpiGrid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
 #appShellView #wdKpiGrid .metric-view-button { width:100%; }
}

.day-shift-notes { width:100%;margin:0;color:var(--muted);font-size:11px; }
.day-shift-notes > div { display:flex;align-items:baseline;gap:6px; }
.day-shift-notes dt { font-weight:700; }
.day-shift-notes dd { margin:0;overflow-wrap:anywhere; }
.day-shift-notes-button { display:none; }
#dayShiftNotesDialog .day-shift-notes { color:var(--ink);font-size:14px; }
#dayShiftNotesDialog .day-shift-notes > div { padding:9px 0;border-bottom:1px solid var(--line);flex-wrap:wrap; }
@media (max-width: 920px) {
  #dayEntries .day-shift-notes { display:none; }
  #dayEntries .day-shift-notes-button { display:inline-flex;min-height:44px;padding:0 10px; }
}

.worker-calendar-day { margin:12px 0; min-width:0; }
.worker-calendar-day[hidden] { display:none !important; }
.worker-calendar-day h2 { margin:0 0 10px; font-size:17px; }
.worker-calendar-day .work-day-note { overflow-wrap:anywhere; }
