.employee-mobile-experience,
.employee-mobile-bottom-nav,
.employee-mobile-menu-backdrop {
  display: none;
}

@media (max-width: 640px) {
  body.employee-mobile-enabled {
    background: #f4f7fb;
    overflow-x: hidden;
  }

  body.employee-mobile-enabled #mainApp {
    display: block !important;
    max-width: 100%;
    min-height: 100dvh;
    overflow-x: clip;
    width: 100%;
  }

  body.employee-mobile-enabled #mainApp > .main,
  body.employee-mobile-enabled.sidebar-collapsed #mainApp > .main {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 100dvh;
    min-width: 0;
    overflow-x: hidden;
    padding: 14px 14px calc(88px + env(safe-area-inset-bottom, 0px));
    width: 100%;
  }

  body.employee-mobile-enabled.employee-mobile-surface-active #mainApp > .main {
    padding: 0 0 calc(76px + env(safe-area-inset-bottom, 0px));
  }

  body.employee-mobile-enabled.employee-mobile-surface-active #mainApp > .main > .topbar,
  body.employee-mobile-enabled.employee-mobile-surface-active #personalWorkspaceDrawer {
    display: none !important;
  }

  body.employee-mobile-enabled #mainApp > .sidebar,
  body.employee-mobile-enabled.sidebar-collapsed #mainApp > .sidebar,
  body.employee-mobile-enabled.human-capital-section-active #mainApp > .sidebar {
    align-items: stretch;
    bottom: 0;
    display: flex;
    flex: none;
    flex-direction: column;
    left: 0;
    max-width: 320px;
    min-height: 100dvh;
    overflow-y: auto;
    padding: max(22px, env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    width: min(86vw, 320px);
    z-index: 13001;
  }

  body.employee-mobile-enabled.employee-mobile-menu-open #mainApp > .sidebar {
    transform: translateX(0);
  }

  body.employee-mobile-enabled #mainApp > .sidebar > ul {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
    width: 100%;
  }

  body.employee-mobile-enabled.sidebar-collapsed #mainApp > .sidebar .sidebar-brand h2,
  body.employee-mobile-enabled.sidebar-collapsed #mainApp > .sidebar .app-version,
  body.employee-mobile-enabled.sidebar-collapsed #mainApp > .sidebar .sidebar-footer,
  body.employee-mobile-enabled.sidebar-collapsed #mainApp > .sidebar li span {
    display: initial;
  }

  body.employee-mobile-enabled #mainApp > .sidebar .sidebar-toggle-btn {
    display: none;
  }

  body.employee-mobile-enabled.sidebar-collapsed #mainApp > .sidebar li,
  body.employee-mobile-enabled #mainApp > .sidebar li {
    box-sizing: border-box;
    font-size: 0.92rem;
    height: auto;
    justify-content: flex-start;
    margin: 0;
    min-height: 48px;
    overflow: visible;
    padding: 12px 14px;
    white-space: normal;
    width: 100%;
  }

  body.employee-mobile-enabled.sidebar-collapsed #mainApp > .sidebar li::before {
    flex: 0 0 auto;
    font-size: 18px;
  }

  body.employee-mobile-enabled.sidebar-collapsed #mainApp > .sidebar li:hover::after {
    display: none;
  }

  body.employee-mobile-menu-open {
    overflow: hidden;
  }

  .employee-mobile-experience:not([hidden]) {
    display: block;
    min-height: calc(100dvh - 76px - env(safe-area-inset-bottom, 0px));
    width: 100%;
  }

  .employee-mobile-content {
    margin: 0 auto;
    max-width: 560px;
    min-width: 0;
    width: 100%;
  }

  .employee-mobile-page {
    display: grid;
    gap: 18px;
    min-width: 0;
    padding: max(22px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 22px max(16px, env(safe-area-inset-left, 0px));
  }

  .employee-mobile-greeting,
  .employee-mobile-page-header {
    min-width: 0;
  }

  .employee-mobile-greeting span,
  .employee-mobile-page-header p {
    color: #52657a;
    display: block;
    font-size: 0.92rem;
    margin: 0;
  }

  .employee-mobile-greeting h1,
  .employee-mobile-page-header h1 {
    color: #102a43;
    font-size: clamp(1.55rem, 8vw, 2rem);
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin: 4px 0 7px;
    overflow-wrap: anywhere;
  }

  .employee-mobile-card,
  .employee-mobile-week {
    background: #fff;
    border: 1px solid #dce5ee;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 36, 62, 0.08);
    box-sizing: border-box;
    min-width: 0;
    padding: 18px;
    width: 100%;
  }

  .employee-mobile-today-card > header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
  }

  .employee-mobile-today-card > header > div {
    min-width: 0;
  }

  .employee-mobile-kicker {
    color: #587088;
    display: block;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .employee-mobile-today-card h2 {
    color: #102a43;
    font-size: clamp(1.35rem, 7vw, 1.8rem);
    margin: 5px 0 3px;
  }

  .employee-mobile-today-card header p {
    color: #52657a;
    font-size: 0.92rem;
    margin: 0;
  }

  .employee-mobile-status {
    background: #eef3f8;
    border-radius: 999px;
    color: #334e68;
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 800;
    max-width: 44%;
    padding: 7px 10px;
    text-align: center;
  }

  .employee-mobile-status-in_progress,
  .employee-mobile-status-completed {
    background: #dcfce7;
    color: #166534;
  }

  .employee-mobile-status-incomplete,
  .employee-mobile-status-absence_detected,
  .employee-mobile-status-authorization_conflict {
    background: #fef3c7;
    color: #92400e;
  }

  .employee-mobile-facts {
    display: grid;
    gap: 9px;
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .employee-mobile-facts > div {
    align-items: center;
    background: #f6f9fc;
    border-radius: 11px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 48px;
    padding: 10px 12px;
  }

  .employee-mobile-facts span {
    color: #61758a;
    font-size: 0.78rem;
    font-weight: 700;
  }

  .employee-mobile-facts strong {
    color: #102a43;
    font-size: 0.9rem;
    text-align: right;
  }

  .employee-mobile-journey-grid {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
  }

  .employee-mobile-journey-grid > div {
    background: #f6f9fc;
    border-radius: 10px;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 11px;
  }

  .employee-mobile-journey-grid span {
    color: #61758a;
    font-size: 0.72rem;
    font-weight: 700;
  }

  .employee-mobile-journey-grid strong {
    color: #102a43;
    font-size: 0.88rem;
    overflow-wrap: anywhere;
  }

  .employee-mobile-journey-grid .employee-mobile-journey-incident {
    background: #fff7ed;
    color: #9a3412;
    grid-column: 1 / -1;
  }

  .employee-mobile-journey-grid .employee-mobile-journey-incident strong {
    color: #9a3412;
  }

  .employee-mobile-result {
    align-items: center;
    border-radius: 11px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 18px;
    padding: 13px;
  }

  .employee-mobile-result-success {
    background: #ecfdf5;
    color: #166534;
  }

  .employee-mobile-feedback {
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 700;
    margin-top: 14px;
    overflow-wrap: anywhere;
    padding: 11px 12px;
  }

  .employee-mobile-feedback-status {
    background: #eff6ff;
    color: #1d4ed8;
  }

  .employee-mobile-feedback-success {
    background: #ecfdf5;
    color: #166534;
  }

  .employee-mobile-feedback-error {
    background: #fef2f2;
    color: #991b1b;
  }

  .employee-mobile-primary-action,
  .employee-mobile-empty button {
    align-items: center;
    background: #123b63;
    border: 0;
    border-radius: 13px;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 1rem;
    font-weight: 900;
    justify-content: center;
    margin: 16px 0 0;
    min-height: 56px;
    padding: 13px 16px;
    touch-action: manipulation;
    width: 100%;
  }

  .employee-mobile-primary-action:disabled {
    cursor: wait;
    opacity: 0.68;
  }

  .employee-mobile-no-action {
    background: #f6f9fc;
    border-radius: 10px;
    color: #52657a;
    font-size: 0.84rem;
    font-weight: 750;
    margin-top: 14px;
    padding: 11px 12px;
    text-align: center;
  }

  .employee-mobile-location-note {
    color: #718398;
    font-size: 0.72rem;
    line-height: 1.4;
    margin: 10px 0 0;
    text-align: center;
  }

  .employee-mobile-incidents {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
  }

  .employee-mobile-incidents li {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    color: #9a3412;
    display: grid;
    gap: 2px;
    padding: 10px 12px;
  }

  .employee-mobile-incidents span {
    font-size: 0.75rem;
  }

  .employee-mobile-activities {
    display: grid;
    gap: 10px;
    min-width: 0;
  }

  .employee-mobile-activity-list {
    display: grid;
    gap: 12px;
    min-width: 0;
  }

  .employee-mobile-activity-card {
    display: grid;
    gap: 12px;
  }

  .employee-mobile-activity-time {
    color: #123b63;
    font-size: 1.15rem;
    font-weight: 900;
  }

  .employee-mobile-activity-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  .employee-mobile-activity-copy h2 {
    color: #102a43;
    font-size: 1.22rem;
    margin: 0;
    overflow-wrap: anywhere;
  }

  .employee-mobile-activity-copy p {
    color: #52657a;
    font-size: 0.86rem;
    margin: 0;
    overflow-wrap: anywhere;
  }

  .employee-mobile-activity-copy strong {
    color: #334e68;
    font-size: 0.9rem;
  }

  .employee-mobile-event-action {
    margin-top: 2px;
  }

  .employee-mobile-context-status,
  .employee-mobile-context-error {
    color: #52657a;
    font-size: 0.86rem;
    margin: 0;
  }

  .employee-mobile-context-error {
    align-items: center;
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #991b1b;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 12px;
  }

  .employee-mobile-context-error button {
    background: transparent;
    border: 0;
    color: #123b63;
    font-weight: 800;
    min-height: 44px;
    padding: 8px;
  }

  .employee-mobile-linked-event-workspace {
    box-sizing: border-box;
    min-height: calc(100dvh - 76px - env(safe-area-inset-bottom, 0px));
    min-width: 0;
    overflow-x: hidden;
    padding: max(14px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 18px max(12px, env(safe-area-inset-left, 0px));
    width: 100%;
  }

  .employee-mobile-linked-event-workspace .event-check-in-shell {
    margin: 0;
    max-width: 100%;
    min-width: 0;
  }

  .employee-mobile-quick-access {
    display: grid;
    gap: 10px;
    min-width: 0;
  }

  .employee-mobile-quick-access-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .employee-mobile-quick-access-button {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-sizing: border-box;
    color: #123b63;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    min-height: 56px;
    min-width: 0;
    padding: 10px 12px;
    text-align: left;
    touch-action: manipulation;
    width: 100%;
  }

  .employee-mobile-quick-access-button > span {
    align-items: center;
    background: #eef5fb;
    border-radius: 9px;
    display: inline-flex;
    flex: 0 0 34px;
    font-size: 1.2rem;
    font-weight: 900;
    height: 34px;
    justify-content: center;
  }

  .employee-mobile-quick-access-button strong {
    font-size: 0.88rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .employee-mobile-quick-access-button:disabled {
    cursor: wait;
    opacity: 0.68;
  }

  .employee-mobile-quick-access-error {
    color: #991b1b;
    font-size: 0.82rem;
    margin: 0;
  }

  @media (max-width: 360px) {
    .employee-mobile-quick-access-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  .employee-mobile-week {
    padding: 16px;
  }

  .employee-mobile-week > header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .employee-mobile-week > header button {
    background: transparent;
    border: 0;
    color: #123b63;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
    min-height: 44px;
    padding: 8px;
    touch-action: manipulation;
  }

  .employee-mobile-week-list {
    display: grid;
  }

  .employee-mobile-week-row {
    align-items: center;
    border-top: 1px solid #e5ebf1;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 68px;
    padding: 10px 0;
  }

  .employee-mobile-week-row > div {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .employee-mobile-week-row strong {
    color: #102a43;
    font-size: 0.9rem;
  }

  .employee-mobile-week-row span {
    color: #61758a;
    font-size: 0.78rem;
  }

  .employee-mobile-week-row .employee-mobile-week-note {
    color: #a16207;
    font-weight: 750;
  }

  .employee-mobile-week-status {
    background: #eef3f8;
    border-radius: 999px;
    flex: 0 0 auto;
    font-weight: 800;
    padding: 6px 9px;
  }

  .employee-mobile-empty {
    color: #52657a;
    min-height: 180px;
  }

  .employee-mobile-empty h2 {
    color: #102a43;
    margin-top: 0;
  }

  .employee-mobile-empty-week {
    color: #61758a;
    font-size: 0.86rem;
    padding: 18px 0;
  }

  .employee-mobile-bottom-nav:not([hidden]) {
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #dce5ee;
    bottom: 0;
    box-shadow: 0 -10px 28px rgba(15, 36, 62, 0.09);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    left: 0;
    padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    position: fixed;
    right: 0;
    z-index: 12000;
  }

  .employee-mobile-bottom-nav button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: #61758a;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    margin: 0;
    min-height: 56px;
    min-width: 0;
    padding: 5px 3px;
    touch-action: manipulation;
  }

  .employee-mobile-bottom-nav button > span {
    font-size: 1.25rem;
    line-height: 1;
  }

  .employee-mobile-bottom-nav button > strong {
    font-size: clamp(0.66rem, 3.3vw, 0.76rem);
  }

  .employee-mobile-bottom-nav button.is-active {
    background: #eaf2fa;
    color: #123b63;
  }

  .employee-mobile-menu-backdrop:not([hidden]) {
    background: rgba(15, 23, 42, 0.48);
    border: 0;
    bottom: 0;
    display: block;
    left: 0;
    margin: 0;
    padding: 0;
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 13000;
  }

  html:not(.plannerpro-security-ready) .employee-mobile-bottom-nav,
  html:not(.plannerpro-security-ready) .employee-mobile-menu-backdrop {
    display: none !important;
  }
}
