/* Platform marketing homepage (apex hosts only). Scoped under .platform-home. */

.platform-home-shell {
  min-height: 100vh;
  background: #0f141f;
  color: #e8edf7;
}

.platform-home {
  --ph-navy: #1e2538;
  --ph-navy-deep: #0f141f;
  --ph-primary: #1a56db;
  --ph-primary-bright: #3b7cff;
  --ph-accent: #38bdf8;
  --ph-surface: #161d2e;
  --ph-surface-2: #1e2740;
  --ph-text: #e8edf7;
  --ph-muted: #9aa8c3;
  --ph-line: rgba(232, 237, 247, 0.12);
  --ph-font-display: "Segoe UI", system-ui, -apple-system, sans-serif;
  --ph-font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-family: var(--ph-font-body);
  color: var(--ph-text);
  background: var(--ph-navy-deep);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.platform-home a {
  color: inherit;
  text-decoration: none;
}

.platform-home a:hover {
  color: var(--ph-accent);
}

/* Nav */
.ph-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(15, 20, 31, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ph-line);
}

.ph-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
}

.ph-nav__brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.ph-nav__links {
  display: none;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ph-nav__links a {
  color: var(--ph-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.ph-nav__links a:hover {
  color: var(--ph-text);
}

.ph-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ph-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.55rem;
  padding: 0.7rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ph-btn:hover {
  transform: translateY(-1px);
}

/* Anchor buttons need .platform-home a.ph-btn* so color beats `.platform-home a`. */
.platform-home a.ph-btn--primary,
.ph-btn--primary {
  background: linear-gradient(135deg, var(--ph-primary) 0%, var(--ph-primary-bright) 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(26, 86, 219, 0.35);
}

.platform-home a.ph-btn--primary:hover,
.ph-btn--primary:hover {
  color: #fff;
}

.platform-home a.ph-btn--ghost,
.ph-btn--ghost {
  background: transparent;
  border-color: var(--ph-line);
  color: var(--ph-text);
}

.platform-home a.ph-btn--ghost:hover,
.ph-btn--ghost:hover {
  border-color: rgba(59, 124, 255, 0.55);
  color: #fff;
}

.platform-home a.ph-btn--light,
.ph-btn--light {
  background: var(--metro-surface);
  color: var(--ph-navy);
}

.platform-home a.ph-btn--light:hover,
.ph-btn--light:hover {
  color: var(--ph-navy);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.ph-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Hero — full bleed */
.ph-hero {
  position: relative;
  min-height: min(92vh, 880px);
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1rem, 4vw, 2.5rem) 4rem;
  overflow: hidden;
}

.ph-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(26, 86, 219, 0.45), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(56, 189, 248, 0.18), transparent 50%),
    linear-gradient(160deg, #0f141f 0%, #1e2538 45%, #152a5c 100%);
  z-index: 0;
}

.ph-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  animation: ph-grid-drift 28s linear infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes ph-grid-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-48px, -48px, 0); }
}

.ph-hero__orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 124, 255, 0.35), transparent 68%);
  filter: blur(8px);
  top: 8%;
  right: 8%;
  animation: ph-orb-pulse 7s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes ph-orb-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

.ph-hero__inner {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
}

.ph-hero__logo {
  width: min(280px, 72vw);
  height: auto;
  margin-bottom: 1.75rem;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.35));
  animation: ph-fade-up 0.8s ease both;
}

.ph-hero__title {
  font-family: var(--ph-font-display);
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 1rem;
  animation: ph-fade-up 0.85s 0.08s ease both;
}

.ph-hero__sub {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ph-muted);
  line-height: 1.55;
  max-width: 36rem;
  margin: 0 0 1.75rem;
  animation: ph-fade-up 0.85s 0.16s ease both;
}

.ph-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: ph-fade-up 0.85s 0.24s ease both;
}

@keyframes ph-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.ph-section {
  padding: clamp(3.5rem, 8vw, 5.5rem) clamp(1rem, 4vw, 2.5rem);
}

.ph-section--surface {
  background: var(--ph-surface);
}

.ph-section__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ph-accent);
  margin-bottom: 0.65rem;
}

.ph-section__title {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  font-weight: 720;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
}

.ph-section__lead {
  color: var(--ph-muted);
  font-size: 1.05rem;
  max-width: 40rem;
  margin: 0 0 2rem;
  line-height: 1.55;
}

.ph-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

/* Module explorer */
.ph-modules {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.ph-module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ph-module-tab {
  appearance: none;
  border: 1px solid var(--ph-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ph-muted);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ph-module-tab:hover {
  color: var(--ph-text);
  border-color: rgba(59, 124, 255, 0.45);
}

.ph-module-tab.is-active {
  background: rgba(26, 86, 219, 0.28);
  border-color: rgba(59, 124, 255, 0.7);
  color: #fff;
  transform: translateY(-1px);
}

.ph-module-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  background: linear-gradient(145deg, var(--ph-surface-2), rgba(26, 86, 219, 0.12));
  border: 1px solid var(--ph-line);
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  min-height: 320px;
}

.ph-module-stage__visual {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-module-stage__visual img,
.ph-module-stage__visual svg {
  width: min(100%, 440px);
  height: auto;
  animation: ph-scene-in 0.45s ease both;
}

@keyframes ph-scene-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.ph-module-stage__copy h3 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.ph-module-stage__copy p {
  color: var(--ph-muted);
  margin: 0;
  line-height: 1.55;
}

/* Stepper */
.ph-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ph-step {
  text-align: left;
  appearance: none;
  border: 1px solid var(--ph-line);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ph-step:hover {
  border-color: rgba(59, 124, 255, 0.4);
}

.ph-step.is-active {
  background: rgba(26, 86, 219, 0.22);
  border-color: rgba(59, 124, 255, 0.65);
  transform: translateY(-1px);
}

.ph-step__num {
  display: inline-flex;
  width: 1.7rem;
  height: 1.7rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--ph-accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
}

.ph-step__title {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.ph-step__body {
  color: var(--ph-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0;
}

.ph-step-panel {
  border: 1px solid var(--ph-line);
  border-radius: 1.1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: linear-gradient(160deg, rgba(26, 86, 219, 0.18), rgba(15, 20, 31, 0.4));
  min-height: 180px;
  animation: ph-fade-up 0.4s ease both;
}

.ph-step-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.ph-step-panel p {
  margin: 0;
  color: var(--ph-muted);
  line-height: 1.55;
}

/* Proof strip */
.ph-proof {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.ph-proof__item {
  padding: 1.15rem 1.2rem;
  border-left: 3px solid var(--ph-primary-bright);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0.75rem 0.75rem 0;
}

.ph-proof__item strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
}

.ph-proof__item span {
  color: var(--ph-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Demo form */
.ph-demo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.ph-form {
  background: var(--ph-surface-2);
  border: 1px solid var(--ph-line);
  border-radius: 1.15rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.ph-form label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.ph-form .form-control,
.ph-form .form-select,
.ph-form textarea {
  background: rgba(15, 20, 31, 0.65);
  border: 1px solid var(--ph-line);
  color: var(--ph-text);
  border-radius: 0.55rem;
}

.ph-form .form-control:focus,
.ph-form .form-select:focus,
.ph-form textarea:focus {
  background: rgba(15, 20, 31, 0.85);
  border-color: rgba(59, 124, 255, 0.7);
  box-shadow: 0 0 0 0.2rem rgba(26, 86, 219, 0.25);
  color: var(--ph-text);
}

.ph-form .form-select option {
  background: #1e2538;
  color: #fff;
}

.ph-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ph-form-status {
  margin-top: 0.85rem;
  font-size: 0.95rem;
}

.ph-form-status--ok {
  color: #6ee7b7;
}

.ph-form-status--err {
  color: #fca5a5;
}

/* Footer */
.ph-footer {
  border-top: 1px solid var(--ph-line);
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  color: var(--ph-muted);
  font-size: 0.9rem;
}

.ph-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.ph-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
}

.ph-footer__links a {
  color: var(--ph-muted);
}

.ph-footer__links a:hover {
  color: var(--ph-text);
}

.ph-gate {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ph-muted);
}

@media (min-width: 768px) {
  .ph-nav__links {
    display: flex;
  }

  .ph-modules {
    grid-template-columns: 1fr;
  }

  .ph-module-stage {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .ph-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .ph-proof {
    grid-template-columns: repeat(3, 1fr);
  }

  .ph-demo {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph-hero__grid,
  .ph-hero__orb,
  .ph-hero__logo,
  .ph-hero__title,
  .ph-hero__sub,
  .ph-hero__actions,
  .ph-module-stage__visual img,
  .ph-module-stage__visual svg,
  .ph-step-panel,
  .ph-btn {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Staff phone pages (lane D): messages, notifications, timesheets, executive,
   My HR. Pages link this file through <HeadContent>; every rule below is
   scoped to a page class (and mostly to the phone shell), so the marketing
   layout that also loads this file is untouched.
   ========================================================================== */

/* ---- Messages (/messages): app-like full-height panel on phones ---------- */
.messages-page {
    --msg-page-chrome: calc(var(--safe-top, 0px) + var(--topbar-height, 56px) + var(--mobile-bottom-h, 64px) + var(--safe-bottom, 0px) + 1.25rem);
}

@media (max-width: 767.98px), (orientation: landscape) and (max-height: 540px) {
    .mobile-shell .messages-page {
        padding-top: 0.25rem !important;
        padding-bottom: 0 !important;
        padding-left: 0;
        padding-right: 0;
    }

    /* The workspace card header already says "Messages"; keep the h1 for screen readers. */
    .mobile-shell .messages-page .messages-page__header {
        position: absolute !important;
        width: 1px;
        height: 1px;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }

    /* Fixed height so the thread scrolls inside the panel and the composer is
       always on screen above the bottom nav (or above the keyboard). */
    /* !important: dashboard-v2.css forces .page-body .dash-v2-card:not(.h-100) to height:auto. */
    .mobile-shell .messages-page .metro-msg-panel.metro-msg-panel--fullpage {
        height: calc(100dvh - var(--msg-page-chrome) - var(--metro-keyboard-inset, 0px)) !important;
        min-height: 18rem;
        padding-bottom: 0;
        border-radius: var(--mobile-radius-card, 16px);
        overflow: hidden;
    }

    /* The bottom nav hides while the keyboard is open; give its room back. */
    html.metro-keyboard-open .mobile-shell .messages-page .metro-msg-panel.metro-msg-panel--fullpage {
        height: calc(100dvh - var(--msg-page-chrome) + var(--mobile-bottom-h, 64px) - var(--metro-keyboard-inset, 0px)) !important;
        min-height: 12rem;
    }

    .mobile-shell .messages-page .metro-msg-panel > .card-header {
        min-height: 3.25rem;
        flex: none;
        flex-wrap: nowrap;
    }

    .mobile-shell .messages-page .metro-msg-header-actions .btn {
        min-height: 2.75rem;
        min-width: 2.75rem;
        padding: 0.35rem 0.85rem !important;
        border-radius: 999px;
        justify-content: center;
    }

    .mobile-shell .messages-page .metro-msg-new {
        flex: none;
        max-height: 62%;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .mobile-shell .messages-page .metro-msg-new .btn-group .btn,
    .mobile-shell .messages-page .metro-msg-new-secondary .btn,
    .mobile-shell .messages-page .metro-msg-new .btn.w-100 {
        min-height: 2.75rem;
    }

    .mobile-shell .messages-page .metro-msg-new .form-control {
        font-size: 1rem;
        min-height: 2.75rem;
    }

    .mobile-shell .messages-page .metro-msg-people-hit {
        min-height: 2.75rem;
    }

    .mobile-shell .messages-page .metro-msg-split {
        flex: 1 1 auto;
        min-height: 0;
        grid-template-rows: minmax(0, 1fr);
    }

    .mobile-shell .messages-page .metro-msg-threads {
        min-height: 0;
        max-height: none;
        overscroll-behavior: contain;
    }

    .mobile-shell .messages-page .metro-msg-thread-row {
        min-height: 3.5rem;
        padding: 0.6rem 2.75rem 0.6rem 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.1rem;
    }

    .mobile-shell .messages-page .metro-msg-thread-row .small {
        font-size: 0.95rem !important;
    }

    .mobile-shell .messages-page .metro-msg-thread-row > .text-muted {
        font-size: 0.8rem !important;
    }

    .mobile-shell .messages-page .metro-msg-badge {
        top: 50%;
        right: 0.85rem;
        transform: translateY(-50%);
        font-size: 0.72rem;
        min-width: 1.4rem;
    }

    .mobile-shell .messages-page .metro-msg-thread {
        min-height: 0;
        overflow: hidden;
    }

    .mobile-shell .messages-page .metro-msg-scroll {
        min-height: 0;
        overscroll-behavior: contain;
    }

    .mobile-shell .messages-page .metro-msg-actions-btn {
        min-width: 2.25rem;
        min-height: 2.25rem;
    }

    /* Composer: in flow at the bottom of the fixed panel (the mobile.css sticky
       rule cannot work inside the overflow:hidden panel), Send beside the box. */
    .mobile-shell .messages-page .metro-msg-compose {
        position: static;
        z-index: auto;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        column-gap: 0.5rem;
        row-gap: 0.25rem;
        flex: none;
        padding: 0.5rem 0.6rem !important;
        background: var(--bs-body-bg);
        border-top: 1px solid var(--bs-border-color);
    }

    .mobile-shell .messages-page .metro-msg-compose > * {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .mobile-shell .messages-page .metro-msg-compose > textarea {
        grid-column: 1;
        margin-bottom: 0 !important;
        font-size: 1rem;
        min-height: 2.75rem;
        max-height: 8rem;
        border-radius: 1.25rem;
        padding: 0.55rem 0.9rem;
        resize: none;
    }

    .mobile-shell .messages-page .metro-msg-compose > .small.text-muted.mb-2 {
        display: none;
    }

    .mobile-shell .messages-page .metro-msg-compose > .btn {
        grid-column: 2;
        width: auto !important;
        min-width: 4.5rem;
        min-height: 2.75rem;
        border-radius: 999px;
        font-weight: 600;
    }

    .mobile-shell .messages-page .metro-msg-mentions {
        max-height: 11rem;
        overflow-y: auto;
    }
}

/* Portrait phone: one column. No conversation open: the list fills the panel.
   A conversation open: a short list on top, the conversation gets the rest. */
@media (max-width: 767.98px) and (orientation: portrait), (max-width: 575.98px) {
    .mobile-shell .messages-page .metro-msg-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .mobile-shell .messages-page .metro-msg-threads {
        border-right: 0 !important;
        border-bottom: 1px solid var(--bs-border-color);
    }

    .mobile-shell .messages-page .metro-msg-split:not(:has(.metro-msg-compose)) {
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .mobile-shell .messages-page .metro-msg-split:has(.metro-msg-compose) {
        grid-template-rows: auto minmax(0, 1fr);
    }

    .mobile-shell .messages-page .metro-msg-split:has(.metro-msg-compose) .metro-msg-threads {
        max-height: 7.25rem;
    }

    .mobile-shell .messages-page .metro-msg-split:has(.metro-msg-compose) .metro-msg-thread-row {
        min-height: 3.25rem;
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }
}

/* Phone landscape: list beside the conversation. */
@media (orientation: landscape) and (max-height: 540px) and (min-width: 576px) {
    .mobile-shell .messages-page .metro-msg-panel.metro-msg-panel--fullpage {
        min-height: 12rem;
    }

    .mobile-shell .messages-page .metro-msg-panel > .card-header {
        min-height: 0;
        padding-top: 0.2rem !important;
        padding-bottom: 0.2rem !important;
    }

    .mobile-shell .messages-page .metro-msg-compose > textarea {
        max-height: 3.5rem;
    }

    .mobile-shell .messages-page .metro-msg-split {
        grid-template-columns: minmax(11rem, 34%) minmax(0, 1fr);
    }
}


/* ---- Notification Center (/notifications) -------------------------------- */
.notif-page .pk-actions:empty {
    display: none;
}

.notif-page__push {
    max-width: 520px;
}

.notif-page__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.notif-page__filters .form-select {
    width: auto;
}

.notif-page__refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.notif-page .pk-hero .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

@media (max-width: 767.98px), (orientation: landscape) and (max-height: 540px) {
    .mobile-shell .notif-page .pk-tabs {
        margin-bottom: 0;
    }

    /* Two selects side by side, Refresh as a round icon-sized button. */
    .mobile-shell .notif-page__filters {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
        gap: 0.5rem;
        margin: 0;
        padding: 0;
        border: 0;
        background: none;
    }

    .mobile-shell .notif-page__filters .form-select {
        width: 100%;
        min-width: 0;
        min-height: 2.75rem;
        font-size: 1rem;
        border-radius: 0.85rem;
    }

    .mobile-shell .notif-page__refresh {
        min-width: 2.75rem;
        min-height: 2.75rem;
        padding: 0 0.75rem;
        border-radius: 999px;
    }

    .mobile-shell .notif-page__refresh > span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .mobile-shell .notif-page .notification-center-card {
        padding: 0.85rem 0.95rem;
        border-radius: var(--mobile-radius-card, 16px);
        overflow-wrap: anywhere;
    }

    .mobile-shell .notif-page .notification-center-card-unread {
        box-shadow: inset 4px 0 0 var(--metro-status-info-solid);
    }

    .mobile-shell .notif-page .notification-center-card__main .mb-2 {
        margin-bottom: 0.35rem !important;
    }

    .mobile-shell .notif-page .notification-center-body {
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mobile-shell .notif-page .notification-center-card__meta {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .mobile-shell .notif-page .notification-center-card__meta .btn {
        min-height: 2.75rem;
        padding: 0.35rem 1rem;
        border-radius: 999px;
        flex: none;
    }

    .mobile-shell .notif-page__template {
        border-radius: var(--mobile-radius-card, 16px);
    }

    .mobile-shell .notif-page__template-actions .btn {
        flex: 1 1 0;
        min-height: 2.75rem;
        border-radius: 999px;
    }

    .mobile-shell .notif-page__push {
        max-width: none;
    }

    .mobile-shell .notif-page__push .btn-primary {
        width: 100%;
        min-height: 2.75rem;
        border-radius: 999px;
    }

    .mobile-shell .notif-page .pagination .page-link {
        min-width: 2.75rem;
        min-height: 2.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 359.98px) {
    /* 320 px: the two selects stack, Refresh sits beside the second one. */
    .mobile-shell .notif-page__filters {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .mobile-shell .notif-page__filters > .form-select:first-child {
        grid-column: 1 / -1;
    }
}


@media (max-width: 767.98px), (orientation: landscape) and (max-height: 540px) {
    /* Hero buttons keep one-line labels; on a narrow phone they wrap as whole buttons. */
    .mobile-shell .notif-page .pk-hero .pk-actions {
        flex-wrap: wrap;
    }

    .mobile-shell .notif-page .pk-hero .pk-actions .btn {
        flex: 1 1 auto;
        white-space: nowrap;
    }
}


/* ---- Choose a workspace (/start) ----------------------------------------- */
.city-start__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    gap: 0.5rem;
}

.city-start__link {
    min-width: 0;
}

.city-start__text {
    min-width: 0;
}

/* Phone: one grouped list of tappable rows, like a settings screen. */
@media (max-width: 767.98px), (orientation: landscape) and (max-height: 540px) {
    .mobile-shell .city-start__grid {
        gap: 0;
        border: 1px solid var(--bs-border-color);
        border-radius: var(--mobile-radius-card, 16px);
        background: var(--bs-body-bg);
        overflow: hidden;
    }

    .mobile-shell .city-start__link {
        min-height: 4rem;
        padding: 0.7rem 0.9rem;
        border: 0;
        border-top: 1px solid var(--bs-border-color);
        border-radius: 0;
        box-shadow: none;
    }

    .mobile-shell .city-start__link:first-child {
        border-top: 0;
    }

    .mobile-shell .city-start__link:active {
        background: var(--bs-tertiary-bg);
    }

    .mobile-shell .city-start__text .small {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Landscape phone: two columns of rows so the list fits without scrolling far. */
@media (orientation: landscape) and (max-height: 540px) and (min-width: 576px) {
    .mobile-shell .city-start__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-shell .city-start__link:nth-child(2) {
        border-top: 0;
    }

    .mobile-shell .city-start__link:nth-child(even) {
        border-left: 1px solid var(--bs-border-color);
    }
}

/* ---- Executive pages (/executive, crew day, lenses) on phones --------------- */
@media (max-width: 767.98px), (orientation: landscape) and (max-height: 540px) {
    /* Hero Timesheets / Refresh tiles are full-width tiles here; keep their words
       (dashboard-v2 hides them under 576px and leaves bare icons). */
    .mobile-shell .dash-v2--executive .dash-v2-hero__topline-actions .dash-v2-refresh span,
    .mobile-shell .dash-v2--executive .dash-v2-hero__topline > .dash-v2-refresh span {
        display: inline;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* "Needs you" pin: label, title and detail stacked in one column with the chevron on
       the right, title on one line, so the sticky pin stays short at 320px. */
    .dash-v2--executive .dash-v2-today-pin {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .dash-v2--executive .dash-v2-today-pin > :not(i) {
        grid-column: 1;
        min-width: 0;
    }

    .dash-v2--executive .dash-v2-today-pin > strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dash-v2--executive .dash-v2-today-pin > i {
        grid-column: 2;
        grid-row: 1 / 4;
    }

    /* Pulse: the 7d / 30d / 90d range takes its own row with 44px buttons. */
    .dash-v2--executive .collapsible-card-header .btn-group-sm > .btn {
        min-height: 2.75rem;
        min-width: 2.75rem;
    }

    /* Section cards (public safety, programs, ...): the card already pads, so drop the
       body's own inset; the KPI tiles get room for their labels and "View details" stays
       one 44px tap. */
    /* Crew day: "Open plan" sits inline in the card's plan line; give it a 44px tap
       area without growing the line. */
    .dash-v2--executive .dash-v2-card > p.small > a {
        display: inline-block;
        padding-block: 0.75rem;
        margin-block: -0.75rem;
    }

    .dash-v2--executive .dashboard-grid-item-inner > .row {
        --bs-gutter-x: 0;
    }

    .dash-v2--executive .dash-v2-card > .card-header {
        padding-inline: 0;
    }

    .dash-v2--executive .dash-v2-card > .card-header > .btn {
        flex: none;
        display: inline-flex;
        align-items: center;
        min-height: 2.75rem;
        white-space: nowrap;
    }

    .dash-v2--executive .dash-v2-card > .card-body {
        padding-inline: 0;
    }

    .dash-v2--executive .dash-v2-card > .card-body .row.g-2 .card-body {
        padding-inline: 0.6rem !important;
    }

    .dash-v2--executive .dash-v2-card > .card-body .row.g-2 .small {
        overflow-wrap: normal;
        hyphens: auto;
    }
}

/* Sideways phones have ~360px of height: the Customize bar already pins, so the Needs-you
   pin scrolls with the page and Briefing sits in the hero (like the kit's pk-bar). */
@media (orientation: landscape) and (max-height: 540px) {
    .dash-v2--executive .dash-v2-today-pin {
        position: relative;
        top: auto;
    }

    .mobile-shell .dash-v2--executive .dash-v2-hero-cta-row {
        position: static;
        margin-top: 0.75rem;
    }

    .mobile-shell .dash-v2--executive {
        padding-bottom: 0;
    }
}

/* ---- My HR (/my-hr) ------------------------------------------------------------ */
/* Status card: whose HR record this is, their employment status and the open section. */
.myhr-page > .myhr-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

/* The tab row scrolls sideways on phones, so the card names the open section. */
.myhr-status__showing {
    flex: 1 1 100%;
    margin: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--bs-border-color-translucent);
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
}

.myhr-status__showing > strong {
    color: var(--bs-body-color);
}

.myhr-status__who {
    display: grid;
    min-width: 0;
}

.myhr-status__who > strong {
    font-size: 1.05rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.myhr-status__who > small {
    color: var(--bs-secondary-color);
}

.myhr-status__chip {
    flex: none;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--metro-status-info-line);
    border-radius: 999px;
    background: var(--metro-status-info-soft);
    color: var(--metro-status-info-ink);
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 767.98px), (orientation: landscape) and (max-height: 540px) {
    /* 44px controls in the forms and card headers. */
    .myhr-page .btn-sm,
    .myhr-page .form-control-sm,
    .myhr-page .form-select-sm {
        min-height: 2.75rem;
    }

    .myhr-page .btn-sm {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 2.75rem;
    }

    .myhr-page .btn-group-sm > .btn {
        min-height: 2.75rem;
        min-width: 2.75rem;
    }

    .myhr-page .list-group-item.d-flex {
        gap: 0.75rem;
    }

    .myhr-page .card-header.d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .myhr-page .card-body > .btn-success.btn-sm,
    .myhr-page .card-body > .btn-primary.btn-sm {
        width: 100%;
    }

    .myhr-page .list-group-item.d-flex > :first-child {
        min-width: 0;
    }

    .myhr-page .list-group-item.d-flex > span:last-child {
        flex: none;
        text-align: end;
    }

    .myhr-page dl.row > dd {
        overflow-wrap: anywhere;
    }
}

/* ---- Timesheets (/personnel-timesheets) on phones ----------------------------- */
/* Submit week is the page's main action, but it sat under seven day cards. Pin it just
   above the tab bar while the week scrolls; it settles back above History at the end. */
@media (max-width: 767.98px) {
    .mobile-shell .personnel-timesheet-page .personnel-timesheet-submitbar {
        position: sticky;
        bottom: calc(var(--mobile-bottom-h, 64px) + var(--mobile-safe-bottom, 0px) + 0.5rem);
        z-index: 15;
        margin-inline: -0.5rem;
        padding: 0.5rem;
        border: 1px solid var(--bs-border-color-translucent);
        border-radius: 1rem;
        background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent);
        box-shadow: 0 -0.35rem 1.25rem color-mix(in srgb, var(--bs-body-color) 12%, transparent);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

/* Hero links (Review hours / Hours report) share one row of 44px tiles. */
@media (max-width: 767.98px), (orientation: landscape) and (max-height: 540px) {
    .personnel-timesheet-page .dash-v2-hero__topline-actions > .dash-v2-refresh {
        min-height: 2.75rem;
    }
}

/* Sideways phones: the ring and status sit side by side so the first day shows. */
@media (orientation: landscape) and (max-height: 540px) {
    .personnel-timesheet-page .personnel-timesheet-ring {
        width: min(160px, 30vw);
    }

    /* ~360px of height: a pinned bar would take a quarter of it, so Submit week sits
       after the days as before. */
    .mobile-shell .personnel-timesheet-page .personnel-timesheet-submitbar {
        position: static;
        margin-inline: 0;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

/* History: the open week was white text on a white tile (the choice surface beat the
   list-group active colours). Show it as the selected week, and give the date and the
   status their own lines. */
.personnel-timesheet-history .list-group-item.personnel-timesheet-choice {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.15rem 0.75rem;
}

.personnel-timesheet-history .list-group-item.personnel-timesheet-choice.active {
    border-color: var(--metro-status-info-line);
    background: var(--metro-status-info-soft);
    color: var(--metro-status-info-ink);
}

/* ---- Review hours (/personnel-timesheets/approvals) ------------------------------ */
/* Status card: how many weeks are in to approve and how many people still owe one. */
.pts-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pts-board__stat {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--metro-status-info-line);
    border-radius: 0.85rem;
    background: var(--metro-status-info-soft);
    color: var(--metro-status-info-ink);
}

.pts-board__stat--missing {
    border-color: var(--metro-status-warning-line);
    background: var(--metro-status-warning-soft);
    color: var(--metro-status-warning-ink);
}

.pts-board__stat > strong {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
}

.pts-board__stat > span {
    font-weight: 650;
}

/* Approve all is pinned (see Timesheets above) only while there is something to approve. */
@media (max-width: 767.98px) {
    .mobile-shell .personnel-timesheet-page--approvals .personnel-timesheet-submitbar:has(> .personnel-timesheet-submit:disabled) {
        position: static;
        margin-inline: 0;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

/* ---- Timesheet sign-off link (/personnel-timesheets/action) ----------------------- */
/* Status card: employee, period, hours and status as one bordered block. */
.pts-magic > dl.pts-magic-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 0.4rem 1rem;
    margin-inline: 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    background: var(--bs-tertiary-bg);
    font-size: 0.95rem;
}

.pts-magic > dl.pts-magic-summary > dt,
.pts-magic > dl.pts-magic-summary > dd {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
}

.pts-magic > dl.pts-magic-summary > dt {
    color: var(--bs-secondary-color);
    font-weight: 600;
}

.pts-magic > dl.pts-magic-summary > dd {
    overflow-wrap: anywhere;
    font-weight: 650;
}

.pts-magic-summary__status {
    justify-self: start;
    padding: 0.15rem 0.7rem;
    border: 1px solid var(--metro-status-info-line);
    border-radius: 999px;
    background: var(--metro-status-info-soft);
    color: var(--metro-status-info-ink);
}

.pts-magic-summary__status[data-status="Approved"] {
    border-color: var(--metro-status-success-line);
    background: var(--metro-status-success-soft);
    color: var(--metro-status-success-ink);
}

/* Ride above the anonymous tab bar when there is one. */
.mobile-shell .pts-magic-sticky {
    bottom: calc(var(--mobile-bottom-h, 0px) + var(--mobile-safe-bottom, 0px));
    padding-bottom: 0.75rem;
}

.mobile-shell--no-bottom-nav .pts-magic-sticky,
.mobile-shell:not(:has(.mobile-bottom-nav)) .pts-magic-sticky {
    bottom: 0;
    padding-bottom: calc(0.75rem + var(--mobile-safe-bottom, 0px));
}

@media (max-width: 767.98px), (orientation: landscape) and (max-height: 540px) {
    .pts-magic .btn {
        min-height: 2.75rem;
    }

    .pts-magic-day__head > strong {
        flex: 1 1 auto;
        min-width: 0;
    }
}

/* ---- Hours report (/personnel-timesheets/reports) ------------------------------- */
@media (max-width: 767.98px), (orientation: landscape) and (max-height: 540px) {
    /* From / To share a row; Show hours and Print PDF take the next. */
    .personnel-timesheet-page .personnel-timesheet-toolbar > .personnel-timesheet-date {
        flex: 1 1 8.5rem;
        min-width: 0;
    }

    .personnel-timesheet-page .personnel-timesheet-date input {
        min-width: 0;
    }
}
