:root {
  --workspace-canvas: #f5f8f5;
  --workspace-surface: #fff;
  --workspace-border: #e5ece6;
  --workspace-muted: #718078;
  --workspace-shadow: 0 16px 46px rgb(16 38 58 / 6%);
  --workspace-shadow-sm: 0 6px 20px rgb(16 38 58 / 5%);
  --workspace-radius: 20px;
  --workspace-safe-top: env(safe-area-inset-top, 0px);
}

/* Installed iOS apps draw under the status bar when the viewport covers the screen. */
@media (display-mode: standalone) {
  @supports (-webkit-touch-callout: none) {
    :root {
      --workspace-safe-top: max(20px, env(safe-area-inset-top, 0px));
    }
  }
}

/* Public website: keep the important actions reachable on every screen. */
.marketingNav {
  position: sticky;
  top: 0;
  z-index: 30;
  height: calc(86px + var(--workspace-safe-top));
  max-width: none;
  padding-top: var(--workspace-safe-top);
  padding-inline: max(38px, calc((100vw - 1204px) / 2));
  background: rgb(255 255 255 / 92%);
  border-bottom: 1px solid rgb(228 234 229 / 74%);
  backdrop-filter: blur(18px);
}

.marketingQuickNav {
  display: none;
}

.marketingActions .marketingSignIn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #e7ece8;
  border-radius: 11px;
  background: #fff;
  color: var(--site-ink);
  white-space: nowrap;
}

.marketingExistingCustomer {
  max-width: none !important;
  margin: 16px 0 0;
  font-size: 12px !important;
  color: #728178 !important;
}

.marketingExistingCustomer a {
  color: var(--site-green);
  font-weight: 850;
}

/* Sign-in opens immediately instead of hiding at the end of the homepage. */
.signInSection[hidden] {
  display: none !important;
}

body.marketing-auth-open {
  overflow: hidden;
}

.marketingSite .signInSection:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 430px);
  align-content: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 44px 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(ellipse at 19% 15%, rgb(84 185 72 / 13%), transparent 33%),
    radial-gradient(ellipse at 91% 84%, rgb(16 38 58 / 9%), transparent 31%),
    #f7faf7;
}

.signInSection .authbox {
  position: relative;
  padding: 32px;
  border: 1px solid #e5ebe6;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 32px 90px rgb(16 38 58 / 12%);
}

.signInClose {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid #e8eeea;
  border-radius: 12px;
  background: #f7f9f7;
  color: var(--site-ink);
  font-size: 23px;
}

.signInBenefits {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.signInBenefits span {
  color: #526459;
  font-size: 12px;
  font-weight: 750;
}

.signInSection .authboxHeading {
  padding-right: 33px;
}

/* Shared workspace shell and responsive containment. */
body:has(#appView:not(.hidden)) {
  background: var(--workspace-canvas);
  color: #10263a;
}

#appView,
#appView main,
#appView .view,
#appView .panel,
#appView .card,
#appView .form,
#appView .notificationSection,
#appView .settingsHubCard,
#appView .workCard,
#appView .teamAccessEditor,
#sheet,
#sheet .panel,
#sheet .form {
  min-width: 0;
  max-width: 100%;
}

#appView .top {
  z-index: 20;
  display: flex;
  height: calc(82px + var(--workspace-safe-top));
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: calc(12px + var(--workspace-safe-top)) 24px 12px;
  border-bottom: 1px solid #e8ede8;
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(20px);
}

.workspaceBrand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

#appView .workspaceBrand > img {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  max-width: 48px;
  border-radius: 13px;
  object-fit: contain;
}

.workspaceBrandCopy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.workspaceBrandCopy > span {
  color: #809087;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.workspaceBrandCopy > strong {
  overflow: hidden;
  color: #10263a;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspaceHeaderActions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.workspaceLivePill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf7eb;
  color: #318044;
  font-size: 10px;
  font-weight: 850;
}

.workspaceLivePill > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.workspaceHeaderButton {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #e6ece7;
  border-radius: 12px;
  background: #fff;
  color: #52635c;
}

.workspaceHeaderButton svg {
  width: 19px;
  height: 19px;
}

#appView main {
  max-width: 1020px;
  padding: 28px 25px 42px;
}

#appView .view > .section:first-child,
#appView .settingsDetailHeader {
  margin-block: 5px 20px;
}

#appView .section h1,
#appView .settingsDetailHeader h1 {
  color: #10263a;
  font-size: clamp(27px, 4vw, 36px);
  font-weight: 920;
  letter-spacing: -1.15px;
}

#appView .section h2 {
  color: #10263a;
  font-size: 17px;
  font-weight: 870;
  letter-spacing: -.25px;
}

#appView .section,
#appView .teamPanelHead,
#appView .notificationHeader,
#appView .notificationSectionHead,
#appView .paySectionHead,
#appView .workSectionHead,
#appView .workCardTop,
#appView .planHeaderTop,
#sheet .modalhead {
  min-width: 0;
}

#appView .section > *,
#appView .notificationSectionHead > *,
#appView .teamPanelHead > *,
#appView .paySectionHead > *,
#appView .workCardTop > *,
#appView .workSectionHead > *,
#sheet .modalhead > * {
  min-width: 0;
}

#appView .hero {
  position: relative;
  overflow: hidden;
  margin: 3px 0 18px;
  padding: 30px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(132deg, #10263a, #193b4b 71%, #275049);
  box-shadow: 0 19px 42px rgb(16 38 58 / 15%);
}

#appView .hero::after {
  position: absolute;
  top: -100px;
  right: -77px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgb(84 185 72 / 15%);
  content: "";
  pointer-events: none;
}

#appView .hero .eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 9px;
  color: #8adf82;
  font-size: 10px;
  letter-spacing: .15em;
}

#appView .hero h1 {
  position: relative;
  z-index: 1;
  max-width: 520px;
  color: #fff;
  font-size: clamp(27px, 5vw, 37px);
  letter-spacing: -1.2px;
}

#appView .hero .primary {
  position: relative;
  z-index: 1;
  width: auto;
  min-height: 46px;
  padding-inline: 19px;
  background: #fff;
  color: #10263a;
}

#appView .stats,
#appView .workMetrics {
  gap: 12px;
}

#appView .stat,
#appView .panel,
#appView .card,
#appView .workCard,
#appView .workMetric {
  border: 1px solid var(--workspace-border);
  background: var(--workspace-surface);
  box-shadow: var(--workspace-shadow-sm);
}

#appView .stat,
#appView .workMetric {
  padding: 18px 16px;
  border-radius: 18px;
}

#appView .stat b,
#appView .workMetric strong {
  overflow: hidden;
  color: #10263a;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 900;
  letter-spacing: -.8px;
  text-overflow: ellipsis;
}

#appView .stat span,
#appView .workMetric span {
  display: block;
  margin-top: 5px;
  color: var(--workspace-muted);
  font-size: 10px;
  line-height: 1.35;
}

#appView .panel,
#sheet .panel,
#sheet .form {
  gap: 15px;
  padding: 23px;
  border-radius: var(--workspace-radius);
}

#appView .panel > *,
#appView .form > *,
#sheet .panel > *,
#sheet .form > * {
  min-width: 0;
}

#appView .panel h3,
#appView .analyticsPanelHeading h3 {
  color: #10263a;
  font-size: 17px;
  font-weight: 870;
  letter-spacing: -.35px;
}

#appView .hint,
#sheet .hint {
  overflow-wrap: anywhere;
  color: var(--workspace-muted);
  font-size: 11px;
  line-height: 1.65;
}

/* One polished input, select, and action-button system everywhere. */
#appView :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea),
#sheet :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 47px;
  padding: 12px 13px;
  border: 1px solid #dfe7e1;
  border-radius: 13px;
  background: #fff;
  color: #10263a;
  font-size: 12px;
  line-height: 1.3;
}

#appView :is(input, select, textarea):focus,
#sheet :is(input, select, textarea):focus {
  outline: 3px solid color-mix(in srgb, var(--green) 18%, transparent);
  outline-offset: 0;
  border-color: var(--green);
}

#appView select,
#sheet select {
  padding-right: 36px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23718078' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

#appView :is(input[type="date"], input[type="time"]),
#sheet :is(input[type="date"], input[type="time"]) {
  min-inline-size: 0;
  inline-size: 100%;
  -webkit-appearance: none;
}

#appView label,
#sheet label {
  max-width: 100%;
}

#appView .panel label,
#appView .form label,
#sheet .panel label,
#sheet .form label {
  display: block;
  color: #56655e;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

#appView .panel label :is(input, select, textarea),
#appView .form label :is(input, select, textarea),
#sheet label :is(input, select, textarea) {
  margin-top: 7px;
}

#appView :is(.primary, .secondary, .success, .danger),
#sheet :is(.primary, .secondary, .success, .danger) {
  display: inline-flex;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  white-space: normal;
}

#appView .primary,
#sheet .primary {
  background: #10263a;
  color: #fff;
  box-shadow: 0 6px 15px rgb(16 38 58 / 12%);
}

#appView .secondary,
#sheet .secondary {
  border: 1px solid #e2e9e3;
  background: #f3f6f3;
  color: #263c35;
}

#appView button:not(:disabled):active,
#sheet button:not(:disabled):active {
  transform: scale(.985);
}

#appView .card {
  align-items: flex-start;
  gap: 12px;
  padding: 17px 16px;
  border-radius: 17px;
}

#appView .card > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

#appView .card strong,
#appView .card span {
  overflow-wrap: anywhere;
}

#appView .card > .right {
  flex: 0 1 42%;
  min-width: 0;
}

#appView .link,
#sheet .link {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Focused settings hub and owner-only analytics. */
#appView .settingsHubIntro {
  position: relative;
  overflow: hidden;
  margin-bottom: 21px;
  padding: 25px;
  border-radius: 22px;
  background: linear-gradient(135deg, #10263a, #1a3c4d 74%, #294d47);
  box-shadow: 0 16px 38px rgb(16 38 58 / 14%);
}

#appView .settingsHubIntro h2 {
  color: #fff;
  font-size: 24px;
  letter-spacing: -.7px;
}

#appView .settingsHubSectionTitle {
  margin: 0 0 12px;
  font-size: 10px;
  letter-spacing: .13em;
}

#appView .settingsHubGrid {
  gap: 12px;
}

#appView .settingsHubCard {
  min-width: 0;
  min-height: 98px;
  border-color: #e5ece6;
  border-radius: 18px;
  box-shadow: var(--workspace-shadow-sm);
}

#appView .settingsHubIcon {
  background: #edf6eb;
  color: #398344;
}

#appView .settingsHubCopy strong {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

#appView .settingsHubBack {
  display: inline-flex;
  min-height: 37px;
  align-items: center;
  padding: 7px 11px;
  border-radius: 10px;
  background: #edf5eb;
  color: #368245;
  font-size: 11px;
}

.analyticsPanelHeading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.analyticsPanelHeading h3 {
  margin: 7px 0 4px;
}

.analyticsEyebrow {
  color: #3d9045;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .13em;
}

.analyticsOwnerBadge {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 999px;
  background: #edf5ed;
  color: #347747;
  font-size: 9px;
  font-weight: 850;
}

.statsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.statsTile {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 15px;
  border: 1px solid #e7ede8;
  border-radius: 15px;
  background: #fbfcfb;
}

.statsTileFeatured {
  border-color: #d7ecd5;
  background: linear-gradient(145deg, #f3faf1, #fff);
}

.statsTile > span,
.statsTile > small {
  overflow-wrap: anywhere;
  color: #68776f;
  font-size: 10px;
}

.statsTile > b {
  overflow-wrap: anywhere;
  color: #10263a;
  font-size: 21px;
  font-weight: 920;
  letter-spacing: -.55px;
}

.statsTile > small {
  color: #839087;
  font-size: 9px;
}

.analyticsSubheading {
  margin-top: 8px;
}

.analyticsSubheading h3 {
  margin: 0 0 4px;
}

.statsRecord {
  display: grid;
}

.statsRecordRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e8eee9;
}

.statsRecordRow:last-child {
  border-bottom: 0;
}

.statsRecordRow span,
.statsRecordRow strong {
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.5;
}

.statsRecordRow span {
  color: #718078;
}

.statsRecordRow strong {
  color: #10263a;
  text-align: right;
}

#statsLegacy > .panel {
  margin-top: 10px;
  padding: 16px;
  border-radius: 16px;
  background: #fbfcfb;
  box-shadow: none;
}

body.employee-preview #companyAnalyticsPanel {
  display: none !important;
}

/* Notification settings, permissions, and pay controls share the same language. */
#appView .notificationForm {
  gap: 14px;
}

#appView .notificationSection,
#appView .payMethodCard,
#appView .teamAccessEditor {
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  border: 1px solid #e5ece6;
  border-radius: 17px;
  background: #fbfcfb;
}

#appView .notificationSectionHead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 13px;
}

#appView .notificationSectionHead h4,
#appView .notificationDevice h4,
#appView .paySectionHead h4 {
  overflow-wrap: anywhere;
  color: #10263a;
  font-size: 14px;
  letter-spacing: -.2px;
}

#appView .notificationSectionHead p {
  max-width: 460px;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.6;
}

#appView .notificationGrid,
#appView .teamAccessGrid,
#appView .brandColorGrid,
#appView .workFormGrid {
  min-width: 0;
  gap: 12px;
}

#appView :is(.notificationGrid, .teamAccessGrid, .brandColorGrid, .workFormGrid) > *,
#appView .notificationChecks > *,
#appView .teamPermissionChecks > * {
  min-width: 0;
  max-width: 100%;
}

#appView .notificationToggle,
#appView .payToggle,
#appView .workToggle,
#appView .teamPermissionToggle {
  display: flex !important;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 9px;
  color: #34483d !important;
}

#appView :is(.notificationToggle, .payToggle, .workToggle, .teamPermissionToggle) > input[type="checkbox"] {
  position: relative;
  display: block;
  flex: 0 0 39px;
  width: 39px !important;
  min-width: 39px !important;
  max-width: 39px !important;
  height: 23px;
  min-height: 23px;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #d8e1da;
  border-radius: 999px;
  appearance: none;
  background: #e4eae5;
  cursor: pointer;
}

#appView :is(.notificationToggle, .payToggle, .workToggle, .teamPermissionToggle) > input[type="checkbox"]::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgb(16 38 58 / 17%);
  content: "";
  transition: transform .16s ease;
}

#appView :is(.notificationToggle, .payToggle, .workToggle, .teamPermissionToggle) > input[type="checkbox"]:checked {
  border-color: var(--green);
  background: var(--green);
}

#appView :is(.notificationToggle, .payToggle, .workToggle, .teamPermissionToggle) > input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}

#appView :is(.notificationToggle, .payToggle, .workToggle, .teamPermissionToggle) > input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .5;
}

#appView .notificationActions,
#appView .brandLogoActions,
#appView .workCardActions,
#appView .customerHeaderActions,
#appView .teamPanelHead,
#appView .paySectionHead {
  max-width: 100%;
}

#appView :is(.notificationActions, .brandLogoActions, .workCardActions, .customerHeaderActions) > * {
  min-width: 0;
  max-width: 100%;
}

/* App-like mobile navigation without the legacy Stats tab. */
#appView .tabs {
  z-index: 35;
  align-items: stretch;
  border-top: 1px solid #e6ece7;
  background: rgb(255 255 255 / 97%);
  box-shadow: 0 -9px 30px rgb(16 38 58 / 5%);
  backdrop-filter: blur(20px);
}

#appView .tabs button {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 7px 2px 5px;
  color: #76827c;
}

#appView .workspaceNavIcon,
#appView .tabs .tabCalendarIcon {
  width: 20px;
  height: 20px;
  margin: 0;
}

#appView .tabs button > span {
  overflow: hidden;
  max-width: 100%;
  margin: 0;
  font-size: 9px !important;
  font-weight: 820;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appView .tabs button.active {
  color: var(--green);
}

#appView .tabs button.active::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 23px;
  height: 3px;
  border-radius: 0 0 5px 5px;
  background: var(--green);
  content: "";
  transform: translateX(-50%);
}

#modal .sheet {
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -18px 70px rgb(16 38 58 / 15%);
}

#modal .modalhead h2 {
  overflow-wrap: anywhere;
  color: #10263a;
  font-size: 21px;
  letter-spacing: -.5px;
}

@media (max-width: 760px) {
  .marketingNav {
    height: calc(70px + var(--workspace-safe-top));
    gap: 12px;
    padding-top: var(--workspace-safe-top);
    padding-inline: 15px;
  }

  .marketingBrand {
    gap: 7px;
    font-size: 19px;
  }

  .marketingBrand > img {
    width: 33px;
    height: 33px;
  }

  .marketingActions {
    gap: 7px;
  }

  .marketingActions .marketingSignIn {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 10px;
  }

  .marketingActions .marketingButton {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 10px;
  }

  .marketingQuickNav {
    position: sticky;
    top: calc(70px + var(--workspace-safe-top));
    z-index: 29;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 7px 15px;
    overflow-x: auto;
    border-bottom: 1px solid #edf0ed;
    background: rgb(255 255 255 / 96%);
    scrollbar-width: none;
  }

  .marketingQuickNav::-webkit-scrollbar {
    display: none;
  }

  .marketingQuickNav a {
    flex: 0 0 auto;
    color: #65736b;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
  }

  .marketingQuickNav a:last-child {
    color: #378447;
  }

  .marketingHero {
    padding-top: 45px;
  }

  .marketingSite .signInSection:not([hidden]) {
    grid-template-columns: minmax(0, 460px);
    gap: 20px;
    padding: max(24px, var(--workspace-safe-top)) 18px max(24px, env(safe-area-inset-bottom, 0px));
  }

  .signInCopy h2 {
    margin: 9px 0 6px;
    font-size: 30px;
  }

  .signInCopy > p {
    font-size: 12px;
  }

  .signInBenefits {
    display: none;
  }

  .signInSection .authbox {
    padding: 24px 19px;
  }

  #appView main {
    padding: 20px 15px 36px;
  }

  #appView .top {
    height: calc(73px + var(--workspace-safe-top));
    gap: 9px;
    padding: calc(10px + var(--workspace-safe-top)) 15px 10px;
  }

  #appView .workspaceBrand > img {
    flex-basis: 43px;
    width: 43px;
    height: 43px;
    max-width: 43px;
  }

  .workspaceBrand {
    gap: 9px;
  }

  .workspaceBrandCopy > strong {
    max-width: 45vw;
    font-size: 15px;
  }

  #appView .hero {
    padding: 23px 21px;
  }

  #appView .stat,
  #appView .workMetric {
    padding: 15px 11px;
  }

  #appView .panel,
  #sheet .panel,
  #sheet .form {
    padding: 17px 15px;
  }
}

@media (max-width: 520px) {
  #appView .settingsHubGrid {
    gap: 9px;
  }

  #appView .settingsHubCard {
    min-height: 82px;
    gap: 8px;
    padding: 10px;
  }

  #appView .settingsHubIcon {
    width: 36px;
    height: 36px;
  }

  #appView .settingsHubCopy strong {
    font-size: 11px;
  }

  #appView .settingsHubIntro {
    padding: 18px 15px;
  }

  #appView .notificationSection,
  #appView .payMethodCard,
  #appView .teamAccessEditor {
    padding: 13px;
  }

  #appView .notificationGrid,
  #appView .teamAccessGrid,
  #appView .brandColorGrid,
  #appView .workFormGrid {
    grid-template-columns: minmax(0, 1fr);
  }

  #appView .notificationActions,
  #appView .brandLogoActions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #appView .notificationActions button,
  #appView .brandLogoActions button {
    width: 100%;
    min-width: 0;
  }

  .analyticsPanelHeading {
    gap: 8px;
  }

  .statsTile {
    padding: 12px 10px;
  }

  .statsTile > b {
    font-size: 18px;
  }
}

@media (max-width: 410px) {
  .workspaceLivePill {
    display: none;
  }

  .workspaceBrandCopy > strong {
    max-width: 58vw;
  }

  #appView .notificationSectionHead,
  #appView .paySectionHead,
  #appView .teamPanelHead {
    grid-template-columns: minmax(0, 1fr);
    flex-wrap: wrap;
  }

  #appView .notificationSectionHead > .notificationToggle {
    justify-self: start;
  }

  #appView .customerHeaderActions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  #appView .tabs button > span {
    font-size: 8px !important;
  }

  #appView .stats {
    gap: 8px;
  }
}

@media (min-width: 1060px) {
  #appView .top {
    margin-left: 248px;
    padding-inline: 34px;
  }

  #appView main {
    max-width: 1080px;
    margin: 0 auto 0 calc(248px + (100vw - 248px - min(1080px, 100vw - 248px)) / 2);
    padding: 35px 40px 55px;
  }

  #appView .tabs {
    width: 248px;
    padding: 95px 14px 22px;
    box-shadow: none;
  }

  #appView .tabs::before {
    top: 28px;
    left: 25px;
    color: #10263a;
    font-size: 24px;
  }

  #appView .tabs button:not(.hidden) {
    min-height: 48px;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 12px;
    padding: 0 12px;
    border-radius: 12px;
  }

  #appView .tabs button > span {
    font-size: 12px !important;
  }

  #appView .tabs button.active {
    background: #edf6eb;
  }

  #appView .tabs button.active::before {
    display: none;
  }

  #appView .settingsHubGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .statsGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  #appView *,
  #sheet * {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
  }
}

.workspaceNotificationsTrigger {
  position: relative;
}

.workspaceHeaderBadge,
#appView .tabs button > .workspaceTabBadge {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 19px;
  height: 19px;
  align-items: center;
  justify-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ed3d43;
  color: #fff;
  font-size: 10px !important;
  font-weight: 900;
  line-height: 1;
  text-overflow: clip;
}

.workspaceHeaderBadge {
  top: -7px;
  right: -7px;
}

#appView .tabs button > .workspaceTabBadge {
  top: 2px;
  right: calc(50% - 20px);
  overflow: visible;
  max-width: none;
  transform: translateX(35%);
}

.plannerOverdueHome {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  margin: 0 0 18px;
  padding: 15px 16px;
  border: 1px solid #f6d9ae;
  border-radius: 18px;
  background: linear-gradient(120deg, #fffaf1, #fff5e8);
}

.plannerAttentionIcon {
  display: grid;
  width: 39px;
  height: 39px;
  align-items: center;
  justify-items: center;
  border-radius: 13px;
  background: #ffebc8;
  color: #9d590c;
  font-size: 22px;
  font-weight: 950;
}

.plannerAttentionCopy,
.plannerOverdueHead > div:first-child {
  min-width: 0;
}

.plannerAttentionCopy > span,
.plannerOverdueHead > div:first-child > span,
.workOverdueAlert > div > span {
  display: block;
  color: #a66011;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .9px;
}

.plannerAttentionCopy > strong,
.workOverdueAlert > div > strong {
  display: block;
  margin-top: 3px;
  color: #17293a;
  font-size: 14px;
  line-height: 1.3;
}

.plannerAttentionCopy > small {
  display: block;
  margin-top: 3px;
  color: #766d5d;
  font-size: 11px;
}

.plannerAttentionAction,
.workOverdueAction {
  min-height: 37px;
  padding: 9px 13px;
  border: 0;
  border-radius: 11px;
  background: #17293a;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.plannerOverduePanel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 17px;
  border: 1px solid #f2d7ad;
  border-radius: 20px;
  background: #fffaf3;
}

.plannerOverdueHead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.plannerOverdueHead h2 {
  margin: 5px 0 4px;
  color: #142738;
  font-size: 20px;
  letter-spacing: -.5px;
}

.plannerOverdueHead p {
  margin: 0;
  color: #756f63;
  font-size: 12px;
  line-height: 1.45;
}

.plannerOverdueCount {
  display: grid;
  min-width: 37px;
  height: 37px;
  align-items: center;
  justify-items: center;
  padding: 0 8px;
  border-radius: 13px;
  background: #ffebc8;
  color: #995815;
  font-size: 17px;
  font-weight: 900;
}

.plannerOverdueGroup h3 {
  margin: 0 0 8px;
  color: #756851;
  font-size: 12px;
  font-weight: 850;
}

#appView .plannerScheduleOverdue {
  border-left-color: #ec9741;
}

.plannerOverdueTag {
  display: inline-flex;
  color: #ae6210;
  font-weight: 850;
}

.plannerOverdueNotice {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid #f0d5aa;
  border-radius: 15px;
  background: #fff8ed;
}

.plannerOverdueNotice strong {
  color: #92560f;
  font-size: 13px;
}

.plannerOverdueNotice > span {
  color: #786d5c;
  font-size: 11px;
  line-height: 1.5;
}

.plannerJobActions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.plannerJobActions > button:first-child {
  grid-column: 1 / -1;
}

.workOverdueAlert {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #f3d5a6;
  border-radius: 17px;
  background: #fff9ef;
}

.workOverdueAlert p {
  margin: 5px 0 0;
  color: #726a5e;
  font-size: 11px;
}

.workOverdueFilter {
  display: flex;
  width: 100%;
  gap: 8px;
  align-items: center;
  margin-bottom: 15px;
  padding: 11px 13px;
  border: 1px solid #f2d7ad;
  border-radius: 13px;
  background: #fff8ec;
  color: #855214;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

.workOverdueFilter > span {
  display: grid;
  min-width: 23px;
  height: 23px;
  align-items: center;
  justify-items: center;
  border-radius: 50%;
  background: #f6dfbd;
  font-size: 11px;
  font-weight: 900;
}

#appView .workOverdueResolve {
  border-color: #f2d6ab;
  background: #fff8ed;
  color: #955914;
}

body.workspace-notifications-open {
  overflow: hidden;
}

.workspaceNotificationCenter {
  position: fixed;
  z-index: 2600;
  inset: 0;
  display: flex;
  justify-content: flex-end;
}

.workspaceNotificationCenter.hidden {
  display: none !important;
}

.workspaceNotificationBackdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(15 34 48 / 37%);
  backdrop-filter: blur(2px);
}

.workspaceNotificationPanel {
  position: relative;
  display: flex;
  width: min(440px, 100vw);
  height: 100dvh;
  flex-direction: column;
  border-left: 1px solid #e9eeea;
  background: #fff;
  box-shadow: -18px 0 75px rgb(13 31 45 / 13%);
}

.workspaceNotificationHeader {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  gap: 15px;
  padding: calc(24px + var(--workspace-safe-top)) 23px 18px;
  border-bottom: 1px solid #eef1ef;
}

.workspaceNotificationHeader > div > span {
  color: #4fa744;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.workspaceNotificationHeader h2 {
  margin: 7px 0 4px;
  color: #142637;
  font-size: 28px;
  letter-spacing: -.9px;
}

.workspaceNotificationHeader p {
  margin: 0;
  color: #71807a;
  font-size: 12px;
}

.workspaceNotificationClose {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-items: center;
  border: 1px solid #e8eeea;
  border-radius: 11px;
  background: #fff;
  color: #61706a;
  font-size: 21px;
}

.workspaceNotificationToolbar {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 13px 19px;
  border-bottom: 1px solid #eef1ef;
}

.workspaceNotificationFilters {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #f2f5f2;
}

.workspaceNotificationFilters button {
  min-height: 31px;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7771;
  font-size: 11px;
  font-weight: 780;
}

.workspaceNotificationFilters button.active {
  background: #fff;
  color: #17293a;
  box-shadow: 0 1px 5px rgb(15 35 49 / 7%);
}

.workspaceMarkAll {
  padding: 8px 3px;
  border: 0;
  background: transparent;
  color: #347c38;
  font-size: 10px;
  font-weight: 830;
}

.workspaceNotificationList {
  overflow-y: auto;
  flex: 1 1 auto;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.workspaceNotificationRow {
  display: grid;
  width: 100%;
  grid-template-columns: 41px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 20px;
  border: 0;
  border-bottom: 1px solid #eff2ef;
  background: #fff;
  text-align: left;
}

.workspaceNotificationRow.unread {
  background: #f6fbf5;
}

.workspaceNotificationIcon {
  display: grid;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-items: center;
  border-radius: 12px;
  background: #eef4ef;
  color: #476b55;
}

.workspaceNotificationIcon.calendar {
  background: #fff1dd;
  color: #a46a27;
}

.workspaceNotificationIcon.invoices {
  background: #e8f5e9;
  color: #3f8747;
}

.workspaceNotificationIcon svg {
  width: 19px;
  height: 19px;
}

.workspaceNotificationCopy,
.workspaceNotificationTopline,
.workspaceNotificationMeta {
  min-width: 0;
}

.workspaceNotificationTopline {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  align-items: center;
}

.workspaceNotificationTopline > strong {
  color: #183043;
  font-size: 12px;
  line-height: 1.4;
}

.workspaceNotificationUnread {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e94349;
}

.workspaceNotificationBody {
  display: block;
  margin-top: 5px;
  color: #5f6e66;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.workspaceNotificationMeta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: #78847e;
  font-size: 10px;
}

.workspaceNotificationMeta > span {
  font-weight: 820;
}

.workspaceNotificationEmpty {
  display: grid;
  min-height: 260px;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 25px;
  text-align: center;
}

.workspaceNotificationEmpty > span {
  display: grid;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-items: center;
  border-radius: 15px;
  background: #edf6ec;
  color: #438647;
  font-size: 24px;
}

.workspaceNotificationEmpty > strong {
  color: #17293a;
  font-size: 14px;
}

.workspaceNotificationEmpty > p {
  max-width: 260px;
  margin: 0;
  color: #75817a;
  font-size: 11px;
  line-height: 1.5;
}

.workspaceNotificationTarget {
  animation: workspace-notification-target 2s ease-out;
}

@keyframes workspace-notification-target {
  0%, 32% { box-shadow: 0 0 0 3px rgb(84 185 72 / 35%); }
  100% { box-shadow: 0 0 0 0 rgb(84 185 72 / 0%); }
}

@media (max-width: 520px) {
  .workspaceHeaderActions {
    gap: 7px;
  }

  .plannerOverdueHome {
    gap: 9px;
    padding: 12px;
  }

  .plannerAttentionIcon {
    width: 34px;
    height: 34px;
  }

  .plannerAttentionCopy > strong {
    font-size: 12px;
  }

  .plannerAttentionAction {
    padding: 8px 10px;
  }

  .plannerJobActions {
    grid-template-columns: minmax(0, 1fr);
  }

  .workOverdueAlert {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspaceNotificationPanel {
    width: 100vw;
    border-left: 0;
  }
}

@media (min-width: 1060px) {
  #appView .tabs button > .workspaceTabBadge {
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
  }
}
