:root {
  color-scheme: light;
  --background-main: #f7f6f2;
  --background-soft: #fcfbf8;
  --surface-white: #ffffff;
  --surface-dark: #161613;
  --surface-dark-secondary: #20201b;
  --text-primary: #171714;
  --text-secondary: #686a64;
  --text-light: #f7f5ed;
  --accent-primary: #017c83;
  --accent-light: #00c8d1;
  --accent-bright: #00e2ed;
  --accent-dark: #005f65;
  --accent-soft: rgba(1, 124, 131, 0.12);
  --border-light: #e6e2d8;
  --border-dark-accent: rgba(1, 124, 131, 0.28);
  --success: #2fa84f;
  --warning: #d69a00;
  --danger: #d84343;
  --bg: var(--background-main);
  --surface: var(--surface-white);
  --surface-soft: var(--background-soft);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border-light);
  --accent: var(--accent-primary);
  --green: var(--success);
  --red: var(--danger);
  --shadow: 0 10px 30px rgba(27, 26, 20, 0.06);
  --shadow-strong: 0 18px 44px rgba(30, 28, 21, 0.09);
  --shadow-dark: 0 20px 50px rgba(14, 13, 9, 0.22), 0 0 30px rgba(1, 124, 131, 0.11);
  --radius: 18px;
  --radius-small: 10px;
  --radius-button: 12px;
  --radius-intelligence: 22px;
}

/* Desktop owner workspace aligned with the native iOS visual system. */
@media (min-width: 821px) {
  :is(.role-owner, .role-manager).web-entry {
    color-scheme: dark;
    --ios-bg: #070f13;
    --ios-panel: #142228;
    --ios-panel-raised: #182b32;
    --ios-ink: #e6f2f3;
    --ios-muted: #98c8c8;
    --ios-line: #6898a8;
    --ios-bright: #cfeaec;
    --ios-shadow: 0 18px 46px rgba(0, 0, 0, 0.25);
    --text-primary: var(--ios-ink);
    --text-secondary: var(--ios-muted);
    --ink: var(--ios-ink);
    --muted: var(--ios-muted);
    --line: rgba(104, 152, 168, 0.3);
    --accent-dark: var(--ios-muted);
    background: var(--ios-bg);
    color: var(--ios-ink);
  }

  :is(.role-owner, .role-manager).web-entry .app-shell {
    grid-template-columns: 252px minmax(0, 1fr);
    background:
      radial-gradient(circle at 78% 0%, rgba(85, 177, 188, 0.09), transparent 36rem),
      var(--ios-bg);
  }

  :is(.role-owner, .role-manager).web-entry .sidebar {
    padding: 28px 20px 22px;
    border-right: 1px solid rgba(104, 152, 168, 0.22);
    background: rgba(10, 21, 26, 0.96);
    box-shadow: 16px 0 44px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(24px);
  }

  :is(.role-owner, .role-manager).web-entry .brand-lockup {
    width: 154px;
    height: 64px;
    margin-bottom: 30px;
  }

  :is(.role-owner, .role-manager).web-entry .brand-lockup img {
    width: 154px;
    filter: brightness(0) invert(92%) sepia(14%) saturate(467%) hue-rotate(137deg) brightness(104%);
  }

  :is(.role-owner, .role-manager).web-entry .side-nav {
    gap: 8px;
  }

  :is(.role-owner, .role-manager).web-entry .side-nav a,
  :is(.role-owner, .role-manager).web-entry .side-nav summary,
  :is(.role-owner, .role-manager).web-entry .shell-create-trigger {
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #b8ced1;
    font-weight: 720;
  }

  :is(.role-owner, .role-manager).web-entry .shell-create-trigger {
    margin-bottom: 8px;
    border-color: rgba(104, 152, 168, 0.5);
    background: linear-gradient(110deg, #d9edef, #8eb9c1);
    color: #071116;
    box-shadow: 0 12px 28px rgba(104, 152, 168, 0.16);
  }

  :is(.role-owner, .role-manager).web-entry .side-nav a:hover,
  :is(.role-owner, .role-manager).web-entry .side-nav summary:hover {
    transform: translateX(2px);
    background: rgba(104, 152, 168, 0.1);
    color: var(--ios-ink);
  }

  :is(.role-owner, .role-manager).web-entry .side-nav a.active,
  :is(.role-owner, .role-manager).web-entry .side-nav summary.active {
    border-color: rgba(104, 152, 168, 0.28);
    background: linear-gradient(90deg, rgba(104, 152, 168, 0.24), rgba(20, 34, 40, 0.62));
    color: var(--ios-ink);
    box-shadow: inset 3px 0 0 #a8d2d7;
  }

  :is(.role-owner, .role-manager).web-entry .side-more-links {
    border-color: rgba(104, 152, 168, 0.2);
  }

  :is(.role-owner, .role-manager).web-entry .sidebar-foot {
    border-top-color: rgba(104, 152, 168, 0.22);
  }

  :is(.role-owner, .role-manager).web-entry .sidebar-foot strong { color: var(--ios-ink); }
  :is(.role-owner, .role-manager).web-entry .sidebar-foot span { color: var(--ios-muted); }
  :is(.role-owner, .role-manager).web-entry .avatar {
    background: linear-gradient(145deg, #d8ecee, #7eabb4);
    color: #071116;
  }

  :is(.role-owner, .role-manager).web-entry .page {
    display: block;
    width: min(1440px, calc(100% - 64px));
    padding: 32px 0 56px;
  }

  .ios-desktop-home { display: grid; gap: 30px; }
  .ios-desktop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(104, 152, 168, 0.18);
  }
  .ios-desktop-brand { display: flex; align-items: center; gap: 16px; }
  .ios-desktop-brand img {
    width: 118px;
    max-height: 46px;
    object-fit: contain;
    filter: brightness(0) invert(92%) sepia(14%) saturate(467%) hue-rotate(137deg) brightness(104%);
  }
  .ios-desktop-brand span,
  .ios-desktop-business span {
    color: var(--ios-muted);
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .ios-desktop-business { display: grid; gap: 3px; text-align: right; }
  .ios-desktop-business strong { color: var(--ios-ink); font-size: 0.96rem; }

  .ios-desktop-layout {
    display: grid;
    grid-template-columns: minmax(560px, 1.55fr) minmax(340px, 0.8fr);
    gap: 28px;
    align-items: start;
  }
  .ios-desktop-primary { display: grid; gap: 20px; }
  .ios-desktop-greeting { margin-bottom: 2px; }
  .ios-desktop-kicker {
    margin: 0 0 7px;
    color: var(--ios-muted);
    font-size: 0.72rem;
    font-weight: 820;
    letter-spacing: 0.11em;
    text-transform: uppercase;
  }
  .ios-desktop-greeting h1 {
    margin: 0;
    color: var(--ios-ink);
    font-size: clamp(2.35rem, 4vw, 4.4rem);
    letter-spacing: -0.045em;
    line-height: 0.98;
  }
  .ios-desktop-greeting > p:last-child {
    margin: 10px 0 0;
    color: var(--ios-muted);
    font-size: 1.05rem;
  }

  .ios-create-request,
  .ios-question-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    min-height: 78px;
    padding: 14px 18px;
    border-radius: 19px;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  }
  .ios-question-alert { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .ios-create-request {
    background: linear-gradient(110deg, #e0f0f1, #9fc9cf 58%, #6f9da8);
    color: #071116;
    box-shadow: 0 16px 34px rgba(104, 152, 168, 0.17);
  }
  .ios-question-alert {
    border: 1px solid rgba(104, 152, 168, 0.62);
    background: var(--ios-panel);
    color: var(--ios-ink);
  }
  .ios-create-request:hover,
  .ios-question-alert:hover,
  .ios-work-card:hover,
  .ios-rail-panel a:hover { transform: translateY(-2px); }
  .ios-create-request strong,
  .ios-question-alert strong { display: block; font-size: 1.02rem; }
  .ios-create-request small,
  .ios-question-alert small { display: block; margin-top: 3px; opacity: 0.72; }
  .ios-create-request i,
  .ios-question-alert i { font-size: 1.7rem; font-style: normal; }
  .ios-create-icon,
  .ios-alert-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 1.35rem;
    font-weight: 800;
  }
  .ios-question-alert b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ios-ink);
    color: var(--ios-bg);
  }

  .ios-workspace-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 7px;
  }
  .ios-workspace-heading h2 { margin: 0; color: var(--ios-ink); font-size: 1.45rem; }
  .ios-workspace-heading a,
  .ios-rail-heading a { color: var(--ios-muted); font-size: 0.82rem; font-weight: 780; }

  .ios-workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .ios-work-card {
    position: relative;
    display: grid;
    align-content: start;
    min-height: 150px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(104, 152, 168, 0.38);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(24, 43, 50, 0.98), rgba(17, 31, 37, 0.98));
    color: var(--ios-ink);
    box-shadow: var(--ios-shadow);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }
  .ios-work-card::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(152, 200, 200, 0.14), transparent 68%);
  }
  .ios-work-card:hover { border-color: rgba(168, 210, 215, 0.72); box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32); }
  .ios-card-icon { color: var(--ios-muted); font-size: 1.3rem; font-weight: 800; }
  .ios-work-card > strong,
  .ios-work-card > span > strong { margin-top: 13px; color: var(--ios-ink); font-size: 2rem; line-height: 1; }
  .ios-work-card h3 { margin: 13px 0 0; color: var(--ios-ink); font-size: 0.9rem; }
  .ios-work-card p { margin: 4px 0 0; color: var(--ios-muted); font-size: 0.78rem; }
  .ios-work-card-wide {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: 112px;
    gap: 18px;
  }
  .ios-work-card-wide > span > strong { display: block; margin-top: 0; }
  .ios-work-card-wide h3 { margin-top: 6px; }
  .ios-work-card-wide > i { color: var(--ios-muted); font-size: 1.8rem; font-style: normal; }
  .ios-work-card-focus { background: linear-gradient(125deg, #1a3038, #112127); }
  .ios-income-card { min-height: 122px; }
  .ios-income-card small { margin-left: 2px; color: var(--ios-muted); font-size: 0.8rem; }

  .ios-desktop-rail { display: grid; gap: 16px; position: sticky; top: 28px; }
  .ios-rail-panel {
    padding: 20px;
    border: 1px solid rgba(104, 152, 168, 0.3);
    border-radius: 20px;
    background: rgba(20, 34, 40, 0.94);
    box-shadow: var(--ios-shadow);
  }
  .ios-rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  .ios-rail-heading > span { color: var(--ios-ink); font-size: 0.8rem; font-weight: 820; letter-spacing: 0.08em; text-transform: uppercase; }
  .ios-rail-heading > b { display: grid; place-items: center; min-width: 29px; height: 29px; padding: 0 8px; border-radius: 50px; background: #d9ecee; color: #071116; }
  .ios-next-action {
    display: grid;
    gap: 6px;
    padding: 17px;
    border: 1px solid rgba(104, 152, 168, 0.4);
    border-radius: 15px;
    background: var(--ios-panel-raised);
    color: var(--ios-ink);
    transition: transform 160ms ease;
  }
  .ios-next-action small { color: var(--ios-muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
  .ios-next-action strong { font-size: 1.05rem; line-height: 1.25; }
  .ios-next-action p { margin: 0; color: var(--ios-muted); font-size: 0.8rem; line-height: 1.45; }
  .ios-next-action > span { margin-top: 5px; color: var(--ios-bright); font-size: 0.78rem; font-weight: 780; }
  .ios-next-action.urgent { border-color: rgba(233, 146, 126, 0.52); }
  .ios-next-action.warning { border-color: rgba(218, 188, 105, 0.5); }
  .ios-action-list { display: grid; margin-top: 10px; }
  .ios-action-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 3px;
    border-bottom: 1px solid rgba(104, 152, 168, 0.16);
    color: var(--ios-ink);
    transition: transform 160ms ease;
  }
  .ios-action-list a:last-child { border-bottom: 0; }
  .ios-action-list strong,
  .ios-action-list small { display: block; }
  .ios-action-list strong { font-size: 0.82rem; }
  .ios-action-list small { margin-top: 3px; color: var(--ios-muted); font-size: 0.7rem; line-height: 1.35; }
  .ios-action-list i { color: var(--ios-muted); font-size: 1.2rem; font-style: normal; }

  .ios-today-list { display: grid; }
  .ios-today-list a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 12px 0; color: var(--ios-ink); transition: transform 160ms ease; }
  .ios-today-list a + a { border-top: 1px solid rgba(104, 152, 168, 0.16); }
  .ios-today-list b { width: 4px; border-radius: 4px; background: var(--ios-line); }
  .ios-today-list b.warning { background: #d5b56c; }
  .ios-today-list b.active { background: #9ed0d3; }
  .ios-today-list small,
  .ios-today-list strong,
  .ios-today-list em { display: block; }
  .ios-today-list small { color: var(--ios-muted); font-size: 0.68rem; }
  .ios-today-list strong { margin-top: 3px; font-size: 0.85rem; }
  .ios-today-list em { margin-top: 4px; color: var(--ios-muted); font-size: 0.68rem; font-style: normal; }
  .ios-clear-state { display: grid; justify-items: center; gap: 7px; padding: 16px; text-align: center; }
  .ios-clear-state > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(152, 200, 200, 0.16); color: var(--ios-muted); }
  .ios-clear-state p { margin: 0; color: var(--ios-muted); font-size: 0.75rem; }
  .ios-cash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .ios-cash-grid > div { min-width: 0; padding: 12px 10px; border-radius: 13px; background: rgba(7, 15, 19, 0.46); }
  .ios-cash-grid span,
  .ios-cash-grid strong { display: block; }
  .ios-cash-grid span { color: var(--ios-muted); font-size: 0.62rem; text-transform: uppercase; }
  .ios-cash-grid strong { margin-top: 5px; overflow: hidden; color: var(--ios-ink); font-size: 0.84rem; text-overflow: ellipsis; }

  :is(.role-owner, .role-manager).web-entry .notice {
    border-color: rgba(104, 152, 168, 0.4);
    background: var(--ios-panel);
    color: var(--ios-ink);
  }
}

/* Project hub: overview first, details on demand. */
.project-app-view {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.project-app-header {
  position: relative;
  z-index: 24;
  display: grid;
  gap: 12px;
}

.project-back-link {
  width: max-content;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 850;
}

.project-app-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-app-title-row > div {
  min-width: 0;
}

.project-app-title-row .status-pill {
  margin-bottom: 8px;
}

.project-app-title-row h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.project-app-title-row p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-app-menu {
  flex: 0 0 auto;
}

.project-app-menu > summary {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  list-style: none;
}

.project-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.project-section-bar a {
  color: var(--accent-dark);
  font-weight: 850;
}

.project-money-overview,
.project-next-move,
.project-destination-grid > a {
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.project-money-overview {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.project-overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.project-next-copy,
.project-invoice-links a span,
.project-activity-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-next-move small {
  color: var(--accent-dark);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-overview-heading strong {
  font-size: 1.25rem;
}

.project-overview-heading b,
.project-next-arrow {
  color: var(--accent-dark);
  font-size: 1.8rem;
}

.project-money-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.project-money-grid > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.project-money-grid > div:last-child {
  border-right: 0;
}

.project-money-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-money-grid strong {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.project-payment-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.project-next-move {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  color: var(--text);
}

.project-next-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--text);
}

.project-next-move strong {
  font-size: 1.15rem;
  line-height: 1.15;
}

.project-next-move em {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
}

.project-next-move form,
.project-next-move > .button,
.project-next-arrow {
  flex: 0 0 auto;
}

.project-next-move form .button {
  white-space: nowrap;
}

.project-next-arrow {
  color: var(--accent-dark);
  font-size: 1.8rem;
  font-weight: 900;
}

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

.project-destination-grid > a {
  display: grid;
  gap: 8px;
  min-height: 82px;
  padding: 13px;
  color: var(--text);
}

.project-destination-grid > a.primary {
  border-color: rgba(1, 124, 131, 0.28);
  background: rgba(1, 124, 131, 0.08);
}

.project-destination-grid span {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.project-destination-grid strong {
  font-size: 0.88rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.project-section-panel {
  display: grid;
  gap: 18px;
}

.project-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-invoice-links,
.project-activity-list {
  display: grid;
  gap: 8px;
}

.project-invoice-links a,
.project-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}

.project-invoice-links small,
.project-activity-row small {
  color: var(--muted);
}

.page-project-results.native-app .create-orbit {
  display: none;
}

@media (max-width: 720px) {
  .project-app-view {
    gap: 12px;
  }

  .project-app-header {
    gap: 8px;
  }

  .project-app-title-row h1 {
    font-size: 2rem;
  }

  .project-app-title-row p {
    font-size: 0.78rem;
  }

  .project-money-overview {
    gap: 11px;
    padding: 14px;
  }

  .project-money-grid > div {
    padding: 9px 7px;
  }

  .project-money-grid span {
    font-size: 0.56rem;
  }

  .project-money-grid strong {
    font-size: 0.92rem;
  }

  .project-payment-state {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .project-next-move {
    min-height: 76px;
    padding: 12px 14px;
  }

  .project-destination-grid {
    gap: 8px;
  }

  .project-destination-grid > a {
    min-height: 84px;
    padding: 12px 10px;
  }

  .project-section-panel {
    padding: 18px 16px;
  }

  .project-section-actions,
  .project-section-actions .button {
    width: 100%;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 4%, rgba(0, 200, 209, 0.11), transparent 30rem),
    var(--background-main);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.32rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.app-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 8px 18px;
  overflow-x: hidden;
}

.auth-card {
  width: min(100%, 520px);
  padding: 34px;
  border: 1px solid rgba(230, 226, 216, 0.94);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 0%, rgba(1, 124, 131, 0.12), transparent 16rem),
    rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-strong);
}

.welcome-card {
  text-align: center;
}

.auth-logo {
  display: block;
  width: 86px;
  height: auto;
  margin: 0 auto 16px;
}

.logo-with-tm {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: max-content;
  max-width: 100%;
  line-height: 0;
}

.logo-with-tm img {
  display: block;
}

.tm-mark {
  position: absolute;
  top: 2%;
  right: -0.55em;
  color: var(--accent-dark);
  font-size: clamp(0.48rem, 1vw, 0.7rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.auth-logo-wrap {
  display: grid;
  margin: 0 auto 16px;
}

.auth-logo-wrap .auth-logo {
  margin: 0;
}

.welcome-logo-wrap {
  margin-bottom: clamp(24px, 3vw, 42px);
}

.wordmark-logo {
  width: min(260px, 72vw);
  max-height: 78px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(34%) sepia(57%) saturate(1138%) hue-rotate(137deg) brightness(89%) contrast(99%);
}

.welcome-shell {
  --pointer-x: 72%;
  --pointer-y: 34%;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.74fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 28px clamp(44px, 5.4vw, 92px);
  align-items: center;
  width: min(100%, 1540px);
  min-height: calc(100dvh - 16px);
  padding: clamp(34px, 4vw, 64px) clamp(38px, 5.2vw, 84px) clamp(28px, 3.5vw, 52px);
  overflow: hidden;
  border: 1px solid rgba(28, 44, 79, 0.14);
  border-radius: 30px;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(22, 183, 187, 0.18), transparent 24rem),
    linear-gradient(128deg, rgba(255, 255, 255, 0.98) 0 38%, rgba(239, 245, 255, 0.96) 62%, rgba(225, 236, 255, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 24px 80px rgba(26, 53, 105, 0.12);
}

.welcome-shell::before,
.welcome-shell::after {
  content: "";
  position: absolute;
  z-index: -2;
  pointer-events: none;
}

.welcome-shell::before {
  inset: 0;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(1, 124, 131, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 124, 131, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(90deg, transparent 8%, black 54%, black 100%);
  mask-image: linear-gradient(90deg, transparent 8%, black 54%, black 100%);
}

.welcome-shell::after {
  top: 0;
  right: 0;
  bottom: 0;
  width: 48%;
  background: linear-gradient(155deg, rgba(18, 28, 53, 0.03), rgba(1, 124, 131, 0.08));
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
}

.welcome-story,
.welcome-login-wrap,
.welcome-feature-grid {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-shell.is-ready .welcome-story,
.welcome-shell.is-ready .welcome-login-wrap,
.welcome-shell.is-ready .welcome-feature-grid {
  opacity: 1;
  transform: none;
}

.welcome-shell.is-ready .welcome-login-wrap {
  transition-delay: 90ms;
}

.welcome-shell.is-ready .welcome-feature-grid {
  transition-delay: 160ms;
}

.welcome-story {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  max-width: 780px;
}

.welcome-wordmark {
  width: min(310px, 46vw);
  height: auto;
}

.welcome-copy {
  max-width: 760px;
}

.welcome-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: #2859bf !important;
  font-size: 0.78rem !important;
  font-weight: 850;
  text-transform: uppercase;
}

.welcome-kicker span,
.login-card-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #37b961;
  box-shadow: 0 0 0 4px rgba(55, 185, 97, 0.12);
}

.welcome-copy h1 {
  max-width: 770px;
  margin-bottom: 20px;
  font-size: clamp(3.15rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.welcome-copy h1 span {
  display: block;
  color: var(--accent-dark);
}

.welcome-copy > p:last-child {
  max-width: 640px;
  margin-bottom: 0;
  color: #40506a;
  font-size: clamp(1rem, 1.2vw, 1.18rem);
  line-height: 1.58;
}

.welcome-feature-grid {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(151, 175, 221, 0.34);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 42px rgba(0, 95, 100, 0.08), inset 0 1px 0 #fff;
  backdrop-filter: blur(18px);
}

.welcome-feature-grid article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 12px;
  transition: background 180ms ease, transform 180ms ease;
}

.welcome-feature-grid article:hover {
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-2px);
}

.welcome-feature-grid .feature-intelligence {
  background: #172039;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px rgba(23, 32, 57, 0.16);
}

.welcome-feature-grid strong {
  display: block;
  overflow: hidden;
  color: #141923;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-feature-grid p {
  overflow: hidden;
  margin: 1px 0 0;
  color: #627087;
  font-size: 0.75rem;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-feature-grid .feature-intelligence strong {
  color: #fff;
}

.welcome-feature-grid .feature-intelligence p {
  color: #b9d8d7;
}

.welcome-feature-grid .feature-intelligence .feature-icon {
  border-color: rgba(96, 218, 220, 0.26);
  background: rgba(34, 176, 180, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.welcome-feature-grid .feature-intelligence .feature-icon::before,
.welcome-feature-grid .feature-intelligence .feature-icon::after {
  border-color: #63e0e4;
}

.welcome-feature-grid .feature-intelligence .insight-icon::after {
  background:
    linear-gradient(135deg, transparent 34%, #63e0e4 36%, #63e0e4 43%, transparent 45%),
    linear-gradient(90deg, transparent 0 20%, #63e0e4 20% 30%, transparent 30% 48%, #63e0e4 48% 58%, transparent 58% 76%, #63e0e4 76% 86%, transparent 86%);
}

.feature-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(1, 124, 131, 0.12);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.96), rgba(239, 246, 255, 0.7));
  box-shadow: 0 10px 28px rgba(1, 124, 131, 0.1);
}

.feature-icon::before,
.feature-icon::after {
  content: "";
  position: absolute;
  border-color: var(--accent-dark);
}

.project-icon::before {
  width: 20px;
  height: 22px;
  border: 2px solid var(--accent-dark);
  border-radius: 5px;
}

.project-icon::after {
  width: 14px;
  height: 2px;
  background: var(--accent-dark);
  box-shadow: 0 7px 0 var(--accent-dark);
}

.customer-icon::before {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-dark);
  border-radius: 50%;
  transform: translateY(-5px);
}

.customer-icon::after {
  width: 26px;
  height: 12px;
  border: 2px solid var(--accent-dark);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  transform: translateY(10px);
}

.time-icon::before {
  width: 25px;
  height: 25px;
  border: 2px solid var(--accent-dark);
  border-radius: 50%;
}

.time-icon::after {
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--accent-dark);
  border-bottom: 2px solid var(--accent-dark);
  transform: translate(2px, -2px);
}

.insight-icon::before {
  width: 24px;
  height: 18px;
  border-left: 2px solid var(--accent-dark);
  border-bottom: 2px solid var(--accent-dark);
}

.insight-icon::after {
  width: 22px;
  height: 16px;
  background:
    linear-gradient(135deg, transparent 34%, var(--accent-dark) 36%, var(--accent-dark) 43%, transparent 45%),
    linear-gradient(90deg, transparent 0 20%, var(--accent-dark) 20% 30%, transparent 30% 48%, var(--accent-dark) 48% 58%, transparent 58% 76%, var(--accent-dark) 76% 86%, transparent 86%);
  transform: translate(2px, -1px);
}

.invoice-icon::before {
  width: 21px;
  height: 25px;
  border: 2px solid var(--accent-dark);
  border-radius: 4px;
}

.invoice-icon::after {
  width: 12px;
  height: 2px;
  background: var(--accent-dark);
  box-shadow: 0 7px 0 var(--accent-dark);
}

.welcome-environment {
  position: absolute;
  z-index: 0;
  top: 3%;
  right: 1%;
  width: min(54vw, 790px);
  height: 70%;
  overflow: hidden;
  pointer-events: none;
}

.welcome-grid-floor {
  position: absolute;
  inset: 12% -14% -32% 4%;
  background-image:
    linear-gradient(rgba(36, 172, 176, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 172, 176, 0.13) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(520px) rotateX(63deg) rotateZ(-8deg);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 68%);
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 68%);
}

.intelligence-model {
  position: absolute;
  top: 6%;
  right: -4%;
  width: min(45vw, 610px);
  aspect-ratio: 1;
  transform: perspective(1000px) rotateX(57deg) rotateZ(-8deg);
  transform-style: preserve-3d;
  transition: transform 220ms ease-out;
}

.intelligence-orbit,
.intelligence-axis,
.intelligence-core,
.signal-node {
  position: absolute;
  transform-style: preserve-3d;
}

.intelligence-orbit {
  border: 1px solid rgba(0, 126, 131, 0.34);
  border-radius: 50%;
  box-shadow: inset 0 0 34px rgba(29, 163, 167, 0.06), 0 0 32px rgba(29, 163, 167, 0.08);
}

.orbit-outer {
  inset: 7%;
  border-width: 2px;
}

.orbit-middle {
  inset: 22%;
  border-color: rgba(1, 124, 131, 0.5);
}

.orbit-inner {
  inset: 36%;
  border-color: rgba(0, 116, 121, 0.74);
  background: rgba(255, 255, 255, 0.26);
}

.intelligence-axis {
  top: 50%;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(1, 124, 131, 0.5), transparent);
}

.axis-one {
  transform: rotate(35deg);
}

.axis-two {
  transform: rotate(145deg);
}

.intelligence-core {
  top: 43%;
  left: 43%;
  display: grid;
  grid-template-columns: repeat(3, 13px);
  gap: 5px;
  padding: 18px;
  border: 1px solid rgba(1, 124, 131, 0.4);
  border-radius: 16px;
  background: #17213b;
  box-shadow: 0 18px 34px rgba(5, 67, 72, 0.25), 0 0 28px rgba(1, 124, 131, 0.16);
  transform: translateZ(42px) rotateZ(8deg);
}

.intelligence-core span {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: #00e2ed;
  box-shadow: 0 0 12px rgba(106, 166, 255, 0.42);
}

.intelligence-core span:nth-child(2) { background: #fff; }
.intelligence-core span:nth-child(3) { background: #3bd071; }

.signal-node {
  min-width: 112px;
  padding: 10px 12px 10px 32px;
  border: 1px solid rgba(1, 124, 131, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(0, 95, 100, 0.14);
  transform: translateZ(34px) rotateZ(8deg);
}

.signal-node i {
  position: absolute;
  top: 15px;
  left: 13px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #3bd071;
  box-shadow: 0 0 0 3px rgba(59, 208, 113, 0.15);
}

.signal-node strong,
.signal-node span {
  display: block;
  line-height: 1.2;
}

.signal-node strong {
  color: #17213b;
  font-size: 0.72rem;
}

.signal-node span {
  margin-top: 2px;
  color: #68758d;
  font-size: 0.62rem;
}

.signal-work { top: 13%; left: 43%; }
.signal-money { right: 5%; bottom: 23%; }
.signal-insight { bottom: 10%; left: 12%; }

.welcome-login-wrap {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  justify-items: center;
  align-self: center;
}

.welcome-login-card {
  position: relative;
  width: min(100%, 500px);
  padding: clamp(28px, 2.8vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.91));
  box-shadow: 0 32px 86px rgba(4, 79, 83, 0.2), 0 8px 24px rgba(31, 63, 127, 0.1), inset 0 1px 0 #fff;
  backdrop-filter: blur(24px);
  text-align: left;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

.welcome-login-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px solid rgba(1, 124, 131, 0.08);
  border-radius: 16px;
  pointer-events: none;
}

.login-card-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 17px;
  color: #53627b;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.welcome-login-card h2 {
  margin-bottom: 4px;
  text-align: center;
  font-size: clamp(2rem, 2.7vw, 2.45rem);
}

.welcome-login-card > .muted {
  margin-bottom: 24px;
  text-align: center;
  font-size: 0.95rem;
}

.welcome-login-card .auth-footnote {
  width: 100%;
  margin-top: 20px;
  font-size: 0.9rem;
}

.welcome-login-card label {
  color: #293344;
  font-size: 0.82rem;
  font-weight: 780;
}

.welcome-login-card input {
  min-height: 52px;
  margin-top: 7px;
  border-color: #d6e9e8;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 2px rgba(36, 55, 92, 0.03);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 66px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--accent-dark);
  font-size: 0.76rem;
  transform: translateY(-42%);
}

.welcome-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 54px;
  margin-top: 4px;
  color: #fff;
}

.welcome-login-button i {
  font-size: 1.12rem;
  font-style: normal;
  transition: transform 180ms ease;
}

.welcome-login-button:hover i {
  transform: translateX(4px);
}

.welcome-login-button.is-loading i {
  display: none;
}

.auth-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.auth-card form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-card .button {
  width: 100%;
}

.auth-footnote,
.auth-notice {
  width: min(100%, 520px);
  margin: 16px auto 0;
  text-align: center;
}

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  padding: 26px 18px;
  border-right: 1px solid rgba(230, 226, 216, 0.86);
  background: rgba(252, 251, 248, 0.86);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: grid;
  place-items: center;
  width: 176px;
  height: 58px;
  margin: 0 auto 22px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.brand-lockup img {
  display: block;
  height: auto;
}

.brand-lockup img {
  width: 176px;
  max-width: 100%;
  filter: brightness(0) saturate(100%) invert(34%) sepia(57%) saturate(1138%) hue-rotate(137deg) brightness(89%) contrast(99%);
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 7px;
}

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-small);
  color: #293236;
  font-size: 0.92rem;
  font-weight: 780;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.side-nav a:hover {
  background: rgba(1, 124, 131, 0.08);
  color: var(--accent-dark);
}

.side-nav a.active {
  background: linear-gradient(90deg, rgba(0, 200, 209, 0.24), rgba(0, 200, 209, 0.07));
  color: var(--accent-dark);
  box-shadow: inset 3px 0 0 var(--accent-primary), 0 6px 18px rgba(1, 124, 131, 0.08);
}

.nav-separator {
  display: block;
  height: 1px;
  margin: 7px 10px;
  background: linear-gradient(90deg, transparent, rgba(1, 124, 131, 0.18), transparent);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 4px 0;
  border-top: 1px solid var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--surface-dark-secondary), var(--surface-dark));
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
}

.sidebar-foot strong,
.sidebar-foot span {
  display: block;
  font-size: 0.84rem;
}

.sidebar-foot span {
  color: var(--muted);
}

.main-shell {
  min-width: 0;
}

.mobile-section-break {
  display: none;
}

.page {
  --page-section-gap: 24px;
  display: grid;
  gap: var(--page-section-gap);
  align-items: start;
  width: min(1180px, calc(100% - 72px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.page > :is(section, article, .panel, .metric-grid, .split, .report-value-grid, .dashboard-layout, .dashboard-command-grid, .dashboard-support-grid, .control-grid, .business-flow-card, .workflow-guardrail, .notice) {
  margin-top: 0;
  margin-bottom: 0;
}

.page > :is(.panel, .form-shell, .metric-grid, .split, .report-value-grid, .dashboard-layout, .dashboard-command-grid, .dashboard-support-grid, .control-grid, .business-flow-card) {
  width: 100%;
}

.page > .form-shell,
.page > .empty {
  justify-self: center;
}

.page > .split > .form-shell,
.page > .split > .panel {
  width: 100%;
}

.dashboard-hero,
.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.dashboard-hero p:last-child,
.project-header p:last-child {
  margin-bottom: 0;
}

.dashboard-welcome {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.dashboard-welcome-logo {
  display: none;
  width: 150px;
  height: auto;
  flex: 0 0 auto;
}

.panel,
.metric-card,
.notice,
.form-shell {
  border: 1px solid rgba(230, 226, 216, 0.94);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.motion-card,
.motion-button {
  transform: translate3d(0, 0, 0);
  transform-style: preserve-3d;
  will-change: transform;
}

.motion-card {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.motion-card.is-reacting {
  box-shadow:
    var(--shadow-strong),
    0 14px 34px rgba(1, 124, 131, 0.08);
}

.motion-button {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.panel,
.form-shell {
  padding: 24px;
}

.hero-panel {
  padding: 26px;
  background:
    radial-gradient(circle at 88% 0%, rgba(1, 124, 131, 0.1), transparent 18rem),
    rgba(255, 255, 255, 0.94);
}

.notice {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-color: rgba(1, 124, 131, 0.22);
  background: #fff8e8;
}

.notice p {
  margin-bottom: 0;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(0, 111, 115, 0.28);
  border-radius: var(--radius-button);
  background: linear-gradient(135deg, #00c8d1 0%, #017c83 55%, #00565c 100%);
  box-shadow: 0 8px 24px rgba(1, 124, 131, 0.2), 0 0 20px rgba(0, 170, 179, 0.14);
  color: #fff;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.button:visited,
.button:active,
button:active {
  color: #fff;
}

.button:hover,
button:hover {
  filter: brightness(1.01);
  transform: translateY(-1px);
}

.button.secondary {
  border-color: var(--border-light);
  background: #f5f1e7;
  box-shadow: 0 6px 16px rgba(27, 26, 20, 0.04);
  color: var(--ink);
}

.button.danger-button,
button.danger-button {
  border-color: rgba(216, 67, 67, 0.22);
  background: linear-gradient(135deg, #fff3f1, #f6dedb);
  box-shadow: 0 8px 20px rgba(216, 67, 67, 0.08);
  color: #b32d2d;
}

.button.small {
  min-height: 36px;
  padding: 0 13px;
}

.clickable-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

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

.metric-card {
  position: relative;
  min-height: 144px;
  padding: 24px 22px 20px;
  border-radius: 18px;
}

.metric-card:first-child {
  box-shadow: var(--shadow), 0 0 28px rgba(1, 124, 131, 0.08);
}

dt {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

dd {
  margin: 6px 0 0;
  color: var(--text-primary);
  font-size: 2.18rem;
  line-height: 1;
  font-weight: 900;
}

.metric-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.metric-card .good,
.good {
  color: var(--green);
}

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

.employee-status-grid .metric-card {
  min-height: 112px;
}

.employee-clock-card {
  margin-bottom: 0;
}

.employee-clock-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
}

.elapsed-timer {
  display: grid;
  gap: 6px;
  min-width: 168px;
  padding: 18px;
  border: 1px solid rgba(0, 200, 209, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  text-align: right;
}

.elapsed-timer span {
  color: rgba(247, 245, 237, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.elapsed-timer strong {
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.clockout-modal {
  width: min(100%, 560px);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
}

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

.clockout-option {
  margin: 0;
  cursor: pointer;
}

.clockout-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.clockout-option span {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(1, 124, 131, 0.16);
  border-radius: 14px;
  background: rgba(1, 124, 131, 0.05);
  color: var(--ink);
  font-weight: 850;
  text-align: center;
}

.clockout-option input:checked + span {
  border-color: rgba(1, 124, 131, 0.42);
  background: linear-gradient(135deg, rgba(0, 200, 209, 0.24), rgba(1, 124, 131, 0.12));
  color: var(--accent-dark);
  box-shadow: 0 10px 22px rgba(1, 124, 131, 0.09);
}

.clockout-other-note {
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.employee-secondary-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.operating-hero {
  align-items: center;
}

.calm-hero {
  margin-bottom: 22px;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.control-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.control-card strong {
  color: var(--text-primary);
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
}

.control-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.control-label {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.attention-card {
  border-color: rgba(1, 124, 131, 0.24);
  box-shadow: var(--shadow), 0 0 30px rgba(1, 124, 131, 0.08);
}

.owner-insight-card {
  margin-bottom: 0;
}

.next-actions-panel {
  margin-bottom: 0;
}

.action-list {
  display: grid;
  gap: 10px;
}

.action-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.74);
}

.action-row > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.action-row.warning > span {
  background: var(--warning);
}

.action-row.urgent > span {
  background: var(--danger);
  box-shadow: 0 0 18px rgba(216, 67, 67, 0.24);
}

.action-row strong,
.action-row small {
  display: block;
}

.action-row small {
  color: var(--muted);
}

.dashboard-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
}

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-list a {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--text-primary);
}

.compact-list a:first-child {
  border-top: 0;
}

.compact-list span {
  color: var(--muted);
  font-size: 0.88rem;
}

.financial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.financial-grid div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.financial-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.financial-grid strong {
  color: var(--text-primary);
  font-size: 1.2rem;
}

.operating-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.operating-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.operating-grid .intelligence-card {
  min-height: auto;
}

.schedule-list,
.activity-list,
.cash-flow-list,
.module-list {
  display: grid;
  gap: 12px;
}

.schedule-row,
.activity-row,
.module-list div,
.cash-flow-list div,
.cash-flow-list a {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  border-radius: 10px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.schedule-row:first-child,
.activity-row:first-child,
.module-list div:first-child,
.cash-flow-list div:first-child,
.cash-flow-list a:first-child {
  border-top: 0;
}

.clickable-card:hover,
.schedule-row:hover,
.activity-row:hover,
.cash-flow-list a:hover {
  background: rgba(1, 124, 131, 0.045);
}

.schedule-row {
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
}

.schedule-row span,
.activity-row strong,
.module-list strong {
  font-weight: 850;
}

.schedule-row small,
.activity-row small,
.module-list span,
.schedule-row em {
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
}

.activity-row {
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
}

.activity-row > span {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 14px rgba(1, 124, 131, 0.34);
}

.cash-flow-list div,
.cash-flow-list a {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.business-table {
  display: grid;
  overflow-x: auto;
}

.business-row {
  display: grid;
  grid-template-columns: 1.35fr 1.1fr 0.8fr 1fr 0.9fr 0.9fr;
  gap: 14px;
  align-items: center;
  min-width: 780px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.business-row:first-child {
  border-top: 0;
}

.business-row.table-head {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compact-table .business-row {
  grid-template-columns: 1.3fr 1.3fr 0.7fr 0.8fr;
  min-width: 560px;
}

.invoice-lines {
  display: grid;
  gap: 10px;
}

.invoice-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 140px;
  gap: 10px;
  align-items: center;
}

.invoice-line.table-head {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.customer-table .business-row {
  grid-template-columns: 1.1fr 1.35fr 0.6fr 0.7fr 0.8fr 0.8fr;
}

.customer-record-list {
  display: grid;
  gap: 12px;
}

.customer-record-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.customer-record-main,
.customer-record-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.customer-record-main strong,
.customer-record-main span:not(.status-pill) {
  display: block;
}

.customer-record-main strong {
  margin-bottom: 2px;
}

.customer-record-main span:not(.status-pill),
.customer-record-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.customer-record-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.customer-record-actions .inline-form {
  display: block;
}

.customer-record-actions .button {
  width: 100%;
}

.customer-project-grid,
.customer-invoice-list {
  display: grid;
  gap: 14px;
}

.customer-project-card,
.customer-invoice-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.customer-card-head,
.portal-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.customer-card-head strong,
.customer-card-head span:not(.status-pill) {
  display: block;
}

.customer-card-head strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.customer-card-head span:not(.status-pill),
.portal-progress-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.portal-progress {
  display: grid;
  gap: 8px;
}

.portal-progress .progress-track {
  display: block;
  height: 8px;
}

.customer-detail-grid,
.invoice-summary-grid,
.invoice-send-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-detail-grid span,
.invoice-summary-grid span,
.invoice-send-summary span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(1, 124, 131, 0.12);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(1, 124, 131, 0.04);
}

.customer-detail-grid strong,
.invoice-summary-grid strong,
.invoice-send-summary strong {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.invoice-send-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 12px 0 18px;
}

.invoice-closing-fields {
  align-items: end;
  margin-top: 18px;
}

.invoice-closing-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 18px;
}

.invoice-closing-summary span {
  align-content: start;
  min-height: 92px;
  padding: 13px 14px;
}

.invoice-closing-summary b {
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}

.invoice-closing-summary small {
  min-height: 2.4em;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

.invoice-closing-summary .tax-summary {
  border-color: rgba(1, 124, 131, 0.24);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(219, 234, 254, 0.76));
}

.invoice-closing-summary .sending-now-summary {
  border-color: rgba(214, 154, 0, 0.36);
  background: linear-gradient(145deg, rgba(255, 252, 235, 0.98), rgba(243, 197, 72, 0.2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 9px 22px rgba(169, 111, 0, 0.1);
}

.invoice-closing-summary .sending-now-summary strong,
.invoice-closing-summary .sending-now-summary b {
  color: #8a5a00;
}

.action-menu {
  position: relative;
}

.action-menu summary {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.action-menu summary::-webkit-details-marker {
  display: none;
}

.action-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 4;
  display: grid;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(27, 26, 20, 0.14);
}

.action-menu-panel a,
.action-menu-panel button {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.action-menu-panel a:hover,
.action-menu-panel button:hover {
  background: rgba(1, 124, 131, 0.08);
}

.action-menu-panel button {
  color: var(--danger);
}

.customer-line-items,
.customer-payments {
  display: grid;
  gap: 8px;
}

.customer-line-items h3,
.customer-payments h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
}

.line-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.line-item-row span {
  color: var(--muted);
  min-width: 0;
}

.line-item-row span:first-child {
  color: var(--ink);
  font-weight: 750;
}

.question-list {
  display: grid;
  gap: 12px;
}

.question-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.question-card.open {
  border-color: rgba(1, 124, 131, 0.22);
  background: rgba(1, 124, 131, 0.05);
}

.question-card p {
  margin: 0;
}

.question-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.question-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.create-link {
  color: #fff !important;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
  box-shadow: 0 10px 24px rgba(1, 124, 131, 0.18);
}

.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.business-flow-card {
  margin-bottom: 18px;
}

.business-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.flow-stage {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 104px;
  padding: 18px;
  color: var(--ink);
  border-right: 1px solid var(--line);
}

.flow-stage:last-child {
  border-right: 0;
}

.flow-stage span,
.flow-stage small {
  color: var(--muted);
}

.flow-stage strong {
  font-size: 1.85rem;
  line-height: 1;
}

.dashboard-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.schedule-list,
.request-list,
.schedule-board {
  display: grid;
  gap: 12px;
}

.schedule-card-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  color: var(--ink);
  border-top: 1px solid var(--line);
}

.schedule-card-row:first-child {
  border-top: 0;
}

.schedule-card-row span,
.schedule-card-row small {
  display: block;
  min-width: 0;
}

.schedule-card-row small,
.schedule-card-row em {
  color: var(--muted);
  font-style: normal;
}

.request-card,
.schedule-job-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.schedule-calendar-panel {
  overflow: hidden;
}

.employee-tab-nav {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(27, 26, 20, 0.05);
}

.employee-tab {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.employee-tab.active {
  background: linear-gradient(135deg, rgba(47, 210, 213, 0.2), rgba(1, 124, 131, 0.12));
  color: var(--accent-dark);
}

.employee-tab-panel {
  display: grid;
  gap: 18px;
}

.employee-tab-panel[hidden] {
  display: none !important;
}

.checklist-job-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.checklist-job-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(1, 124, 131, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.checklist-job-tab.active {
  background: linear-gradient(135deg, rgba(47, 210, 213, 0.2), rgba(1, 124, 131, 0.12));
  color: var(--accent-dark);
  border-color: rgba(1, 124, 131, 0.32);
}

.checklist-job-panel {
  display: grid;
  gap: 14px;
}

.checklist-job-panel[hidden] {
  display: none !important;
}

.calendar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.mobile-week-calendar {
  display: none;
}

.month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}

.calendar-weekday {
  padding: 10px;
  background: rgba(1, 124, 131, 0.07);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.calendar-day {
  min-height: 126px;
  padding: 10px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day.outside-month {
  background: rgba(246, 248, 252, 0.7);
  color: var(--muted);
}

.calendar-day.today {
  background: linear-gradient(145deg, rgba(1, 124, 131, 0.11), rgba(255, 255, 255, 0.78));
}

.calendar-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.calendar-day.today .calendar-day-number {
  background: rgba(1, 124, 131, 0.12);
  color: var(--accent-dark);
}

.calendar-day-jobs,
.week-calendar {
  display: grid;
  gap: 8px;
}

.calendar-day-jobs {
  margin-top: 8px;
}

.calendar-job {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(1, 124, 131, 0.16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(47, 210, 213, 0.16), rgba(1, 124, 131, 0.08));
  color: var(--ink);
  text-decoration: none;
}

.calendar-job:hover {
  border-color: rgba(1, 124, 131, 0.38);
  box-shadow: 0 8px 22px rgba(1, 124, 131, 0.1);
}

.calendar-job strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}

.calendar-job span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.74rem;
}

.calendar-job.compact {
  padding: 7px 8px;
  border-radius: 10px;
}

.calendar-job.compact strong {
  font-size: 0.74rem;
}

.calendar-job.compact span {
  font-size: 0.68rem;
}

.week-day-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.week-day-card.today {
  border-color: rgba(1, 124, 131, 0.24);
  box-shadow: 0 12px 28px rgba(1, 124, 131, 0.1);
}

.week-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent-dark);
}

.week-day-head strong {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.week-day-head span {
  font-size: 1.35rem;
  font-weight: 950;
  color: var(--ink);
}

.quote-convert-form {
  display: grid;
  grid-template-columns: 150px 120px 96px minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: end;
  width: 100%;
}

.quote-convert-form input {
  min-width: 0;
}

.setup-check-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.setup-check-grid span,
.assigned-chip-list span {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.setup-check-grid .ready,
.assigned-chip-list span {
  color: #14532d;
  background: rgba(47, 168, 79, 0.11);
  border: 1px solid rgba(47, 168, 79, 0.22);
}

.setup-check-grid .missing {
  color: #991b1b;
  background: rgba(216, 67, 67, 0.1);
  border: 1px solid rgba(216, 67, 67, 0.2);
}

.assigned-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.36em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: inset 0 0 0 5px var(--accent-dark);
}

.employee-list {
  display: grid;
  gap: 12px;
}

.employee-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.employee-card-main,
.employee-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.employee-card-main strong,
.employee-card-main span {
  display: block;
}

.employee-card-main span,
.employee-card-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.employee-card-actions {
  display: flex;
  justify-content: flex-end;
}

.project-link-panel {
  margin-bottom: 0;
}

.project-customer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.project-customer-form label {
  margin: 0;
}

.crew-assignment-form {
  display: grid;
  gap: 14px;
}

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

.checkbox-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.checkbox-card input {
  width: 18px;
  min-height: 18px;
}

.checkbox-card span,
.checkbox-card small {
  display: block;
}

.checkbox-card small {
  color: var(--muted);
  font-size: 0.8rem;
}

.invite-link-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(1, 124, 131, 0.16);
  border-radius: 14px;
  background: rgba(1, 124, 131, 0.06);
}

.invite-link-row input {
  width: 100%;
  font-size: 0.82rem;
}

.invite-link-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.invite-copy-button {
  min-width: 108px;
  white-space: nowrap;
}

.invite-copy-button.is-copied {
  border-color: rgba(47, 168, 79, 0.3);
  background: rgba(47, 168, 79, 0.12);
  color: var(--success);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(104, 106, 100, 0.12);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.status-pill.dynamic-status {
  gap: 7px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(104, 106, 100, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 5px 12px rgba(15, 23, 42, 0.045);
  line-height: 1.15;
}

.status-pill.dynamic-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 13%, transparent);
}

.status-pill.invited {
  background: rgba(1, 124, 131, 0.12);
  color: var(--accent-dark);
}

.status-pill.active {
  background: rgba(47, 168, 79, 0.12);
  color: var(--success);
}

.status-pill.ready,
.status-pill.ready_to_send,
.status-pill.approved,
.status-pill.converted,
.status-pill.paid,
.status-pill.in_progress,
.status-pill.ready_for_start,
.status-pill.past_ready {
  background: rgba(47, 168, 79, 0.12);
  color: var(--success);
}

.status-pill.warning,
.status-pill.quote_needed,
.status-pill.quote_draft,
.status-pill.quote_sent,
.status-pill.revision_requested,
.status-pill.sent,
.status-pill.needs_follow_up,
.status-pill.expired,
.status-pill.overdue,
.status-pill.partial,
.status-pill.payment_pending,
.status-pill.waiting_for_deposit,
.status-pill.send_deposit_invoice,
.status-pill.send_final_invoice,
.status-pill.scheduled,
.status-pill.open {
  background: rgba(1, 124, 131, 0.12);
  color: var(--accent-dark);
}

.status-pill.completed,
.status-pill.past,
.status-pill.closed,
.status-pill.inactive,
.status-pill.not_invited,
.status-pill.cancelled {
  background: rgba(104, 106, 100, 0.12);
  color: var(--muted);
}

.status-pill.answered {
  background: rgba(47, 168, 79, 0.12);
  color: var(--success);
}

.status-pill.declined {
  background: rgba(216, 67, 67, 0.1);
  color: var(--danger);
}

.status-pill.deposit {
  background: rgba(1, 124, 131, 0.12);
  color: var(--accent-dark);
}

.status-pill.final_payment {
  background: rgba(47, 168, 79, 0.12);
  color: var(--success);
}

.status-pill.full_payment {
  background: rgba(104, 106, 100, 0.12);
  color: var(--muted);
}

.quote-images {
  display: grid;
  gap: 10px;
}

.quote-images h3 {
  margin: 0;
}

.quote-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.quote-image-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(84px, 112px));
}

.quote-image-grid a {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(1, 124, 131, 0.18);
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.72);
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.07);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.quote-image-grid a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(1, 124, 131, 0.13);
}

.quote-image-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quote-image-editor {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.quote-image-editor legend {
  padding: 0 6px;
  color: var(--ink);
  font-weight: 800;
}

.quote-image-choice {
  display: grid;
  gap: 7px;
  margin: 0;
}

.quote-image-choice img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  object-fit: cover;
}

.quote-image-choice span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
}

.quote-image-choice input {
  width: 18px;
  height: 18px;
  margin: 0;
}

/* Keep the employee's primary action legible when shared panel styles change. */
.panel.intelligence-card.employee-clock-card {
  color: #f8fafc;
  border-color: rgba(0, 200, 209, 0.34);
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 170, 179, 0.3), transparent 18rem),
    linear-gradient(145deg, #172033 0%, #0b1020 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 38px rgba(15, 23, 42, 0.2),
    0 0 24px rgba(1, 124, 131, 0.1);
}

.employee-clock-card .insight-label {
  color: #9ce9e8;
}

.employee-clock-card h2,
.employee-clock-card p,
.employee-clock-card label {
  color: #f8fafc;
}

.employee-clock-card form {
  display: grid;
  gap: 14px;
}

.employee-clock-card select {
  color: #171714;
  border-color: rgba(156, 233, 232, 0.72);
  background: #fff;
}

.employee-clock-card select option {
  color: #171714;
  background: #fff;
}

@media (max-width: 720px) {
  .panel.intelligence-card.employee-clock-card {
    padding: 20px;
  }
}

.stacked-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.status-stack {
  display: inline-flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.stacked-cell .status-pill,
.status-stack .status-pill {
  min-height: 22px;
  padding: 0 8px;
  font-size: 0.68rem;
}

.customer-card-head > .status-pill,
.customer-card-head > .status-stack {
  flex: 0 0 auto;
  align-self: flex-start;
}

.status-metric {
  display: flex;
  align-items: center;
  min-height: 35px;
}

.status-metric .status-pill {
  font-size: 0.78rem;
}

.question-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.form-hint {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.checklist-generator-actions {
  display: grid;
  gap: 6px;
  margin: -4px 0 18px;
}

.checklist-generator-actions .button {
  justify-self: start;
}

.intelligence-clarifier {
  display: grid;
  gap: 12px;
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid rgba(1, 124, 131, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(44, 201, 204, 0.18), transparent 20rem),
    rgba(1, 124, 131, 0.07);
}

.intelligence-clarifier strong {
  color: var(--accent-dark);
}

.intelligence-clarifier label {
  margin: 0;
}

.live-checklist {
  display: grid;
  gap: 10px;
  margin: 16px 0 4px;
}

.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(1, 124, 131, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.checklist-item label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 0;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
}

.checklist-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 1px;
  accent-color: var(--accent-primary);
}

.checklist-item.complete span {
  color: var(--muted);
  text-decoration: line-through;
}

.checklist-item small {
  white-space: nowrap;
  color: var(--success);
  font-weight: 800;
}

.employee-live-checklist .checklist-item {
  background: rgba(255, 255, 255, 0.94);
}

.workflow-guardrail {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(1, 124, 131, 0.18);
  border-radius: 14px;
  background: rgba(1, 124, 131, 0.06);
}

.workflow-guardrail strong,
.workflow-guardrail a {
  color: var(--accent-dark);
}

.empty-row {
  min-width: 0;
  grid-template-columns: 1fr;
  color: var(--muted);
}

.mini-progress {
  display: inline-block;
  width: 72px;
  height: 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: #e5e2da;
  vertical-align: middle;
  overflow: hidden;
}

.mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-primary), var(--accent-light));
}

.danger {
  color: var(--danger);
}

.danger {
  color: var(--red);
}

.alert-insight {
  border-color: rgba(1, 124, 131, 0.24);
  background: rgba(1, 124, 131, 0.08);
  color: var(--accent-dark);
}

.alert-positive {
  border-color: rgba(47, 168, 79, 0.22);
  background: rgba(47, 168, 79, 0.08);
  color: var(--success);
}

.alert-urgent {
  border-color: rgba(216, 67, 67, 0.24);
  background: rgba(216, 67, 67, 0.07);
  box-shadow: 0 0 20px rgba(216, 67, 67, 0.08);
  color: var(--danger);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.92fr);
  gap: 24px;
}

.stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin-bottom: 0;
}

.panel-head a,
.panel-head span {
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.project-table {
  display: grid;
}

.project-row {
  display: grid;
  grid-template-columns: 54px minmax(180px, 1fr) minmax(90px, 0.45fr) 92px 70px;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  padding: 12px 8px;
  border-top: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.project-row:first-child {
  border-top: 0;
}

.project-row:hover {
  background: rgba(252, 251, 248, 0.9);
  box-shadow: 0 10px 24px rgba(27, 26, 20, 0.05);
  transform: translateY(-1px);
}

.project-thumb {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(1, 124, 131, 0.18);
  border-radius: 13px;
  background:
    radial-gradient(circle at 32% 28%, rgba(0, 200, 209, 0.4), transparent 36%),
    linear-gradient(135deg, #263721, #9aa671);
}

.project-thumb.completed {
  background:
    linear-gradient(135deg, rgba(31, 25, 14, 0.12), rgba(255, 255, 255, 0.2)),
    linear-gradient(135deg, #1b292e, #b98a1c);
}

.project-main {
  min-width: 0;
}

.project-main strong,
.project-main span,
.project-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-main .status-pill {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin-top: 6px;
  overflow: visible;
  text-overflow: clip;
}

.project-main span,
.project-stat span,
.entry-list small {
  color: var(--muted);
  font-size: 0.78rem;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: #e6e2d8;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-primary), var(--accent-light));
  transition: width 220ms ease;
}

.utilization-track.utilization-red span {
  background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.utilization-track.utilization-yellow span {
  background: linear-gradient(90deg, #ca8a04, #facc15);
}

.utilization-track.utilization-green span {
  background: linear-gradient(90deg, #15803d, #22c55e);
}

.utilization-track.utilization-gold span {
  background: linear-gradient(90deg, #b7791f, #f5c84b);
}

.project-stat {
  text-align: right;
}

.project-stat strong,
.project-stat span {
  display: block;
}

.project-status {
  font-size: 0.82rem;
  font-weight: 850;
  text-align: right;
}

.intelligence-card {
  position: relative;
  overflow: hidden;
  color: var(--text-light);
  border: 1px solid var(--border-dark-accent);
  border-radius: var(--radius-intelligence);
  background:
    radial-gradient(circle at 16% 10%, rgba(238, 183, 39, 0.2), transparent 38%),
    linear-gradient(145deg, #24241f 0%, #141411 100%);
  box-shadow: var(--shadow-dark);
}

.intelligence-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      circle at var(--mouse-x, 50%) var(--mouse-y, 20%),
      rgba(0, 200, 209, 0.2),
      transparent 18rem
    );
  transition: opacity 180ms ease;
}

.intelligence-card.is-reacting::before {
  opacity: 1;
}

.intelligence-card > * {
  position: relative;
  z-index: 1;
}

.intelligence-card::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  box-shadow: 0 0 18px rgba(0, 200, 209, 0.62);
}

.insight-card {
  min-height: 210px;
  padding: 26px;
}

.insight-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-card h2 {
  max-width: 26rem;
  margin-bottom: 24px;
  color: var(--text-light);
  font-size: 1.36rem;
  font-weight: 780;
  line-height: 1.28;
}

.intelligence-card .button {
  background: linear-gradient(135deg, var(--accent-light), var(--accent-primary));
  color: #fff;
}

.intelligence-card .muted {
  color: rgba(247, 245, 237, 0.72);
}

.intelligence-card label,
.intelligence-card fieldset {
  color: var(--text-light);
}

.intelligence-card label span {
  color: rgba(247, 245, 237, 0.72);
}

.intelligence-card h2,
.intelligence-card h3,
.intelligence-card p,
.intelligence-card li {
  color: inherit;
}

.intelligence-card .observations li::marker {
  color: var(--accent-light);
}

.entry-list {
  display: grid;
}

.entry-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.entry-list a:first-child {
  border-top: 0;
}

.entry-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.entry-list small {
  grid-column: 1 / -1;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
}

.split > :nth-child(odd):last-child {
  grid-column: 1 / -1;
}

.page > .empty.panel,
.page > .auth-card {
  width: min(100%, 680px);
  justify-self: center;
}

.page > .panel:only-child,
.page > .form-shell:only-child {
  justify-self: center;
}

.observations {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding-left: 21px;
}

.observations li::marker {
  color: var(--accent);
}

.report-action {
  margin: 0 0 18px;
}

.report {
  display: grid;
  gap: 20px;
}

.intelligent-report {
  background:
    radial-gradient(circle at 90% 0%, rgba(1, 124, 131, 0.08), transparent 18rem),
    rgba(255, 255, 255, 0.94);
}

.intelligent-report-header {
  padding: 26px;
}

.intelligent-report-header h2 {
  margin-bottom: 10px;
  font-size: 1.7rem;
}

.intelligent-report-header p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 1.05rem;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.report-tile {
  padding: 18px;
  border: 1px solid rgba(230, 226, 216, 0.94);
  border-radius: 16px;
  background: #fffaf0;
  box-shadow: 0 8px 22px rgba(27, 26, 20, 0.04);
}

.report-section {
  border-radius: 16px;
}

.recommendation-panel {
  border-color: rgba(1, 124, 131, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 249, 233, 0.72), rgba(255, 255, 255, 0.94));
}

.period-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: -6px 0 18px;
}

.period-tabs a {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.period-tabs a.active {
  border-color: rgba(201, 145, 5, 0.25);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.summary-brief h2 {
  max-width: 900px;
  margin-bottom: 22px;
  font-size: 1.48rem;
  line-height: 1.35;
}

.summary-brief {
  padding: 28px;
}

.owner-action {
  max-width: 780px;
  padding: 16px 18px;
  border: 1px solid rgba(0, 200, 209, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.owner-action span,
.change-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.owner-action strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.02rem;
}

.owner-action p {
  margin-bottom: 0;
  color: rgba(247, 245, 237, 0.78);
}

.report-value-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 22px;
}

.change-list {
  display: grid;
  gap: 12px;
}

.change-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(252, 251, 248, 0.72);
}

.change-item span {
  color: var(--muted);
}

.change-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
  font-size: 1.25rem;
}

.change-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.change-item.up {
  border-color: rgba(1, 124, 131, 0.22);
}

.change-item.down {
  border-color: rgba(47, 168, 79, 0.2);
}

.contributor-list {
  display: grid;
}

.contributor-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  color: var(--text-primary);
}

.contributor-list a:first-child {
  border-top: 0;
}

.contributor-list span,
.contributor-list strong,
.contributor-list small {
  display: block;
}

.contributor-list small {
  color: var(--muted);
}

.contributor-list em {
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.distribution-list {
  display: grid;
  gap: 15px;
}

.distribution-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
}

.distribution-list span {
  font-weight: 850;
}

.distribution-list strong {
  color: var(--accent-dark);
}

.distribution-list .progress-track {
  grid-column: 1 / -1;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 850;
}

td {
  font-size: 0.9rem;
}

.note-row td {
  color: var(--muted);
  background: var(--surface-soft);
}

.form-shell {
  width: min(780px, 100%);
}

.form-shell.wide {
  width: min(920px, 100%);
}

.form-panel {
  margin: 0 auto;
  box-shadow:
    var(--shadow-strong),
    0 0 34px rgba(1, 124, 131, 0.07);
}

form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.inline-form {
  display: inline;
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--text-primary);
  font-weight: 900;
}

.form-section-title span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 200, 209, 0.36), rgba(1, 124, 131, 0.14));
  color: var(--accent-dark);
  font-size: 0.82rem;
}

label,
fieldset {
  display: grid;
  gap: 7px;
  color: #293236;
  font-size: 0.88rem;
  font-weight: 800;
}

label span {
  color: var(--muted);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
select {
  min-width: 0;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(1, 124, 131, 0.11), 0 4px 16px rgba(1, 124, 131, 0.07);
}

textarea {
  resize: vertical;
}

fieldset {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
}

legend {
  padding: 0 8px;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
}

.inline input {
  width: auto;
  min-height: auto;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.conditional {
  margin-top: 12px;
}

.empty {
  max-width: 560px;
}

.mobile-nav {
  display: none;
}

.mobile-topbar {
  display: none;
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .motion-card,
  .motion-button,
  .button,
  button,
  .project-row {
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }

  .intelligence-card::before {
    display: none;
  }

  .welcome-story,
  .welcome-login-wrap,
  .welcome-feature-grid {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .intelligence-model,
  .welcome-login-card {
    transform: none !important;
    transition: none;
  }
}

@media (max-width: 1080px) {
  .auth-page {
    place-items: start center;
    padding: 0;
  }

  .welcome-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 26px;
    width: 100%;
    min-height: 100vh;
    padding: 36px 24px 44px;
    border: 0;
    border-radius: 0;
  }

  .welcome-shell::before {
    inset: 0;
  }

  .welcome-story {
    display: contents;
    grid-column: 1;
    grid-row: auto;
    min-height: auto;
    padding-bottom: 0;
  }

  .welcome-copy {
    display: contents;
  }

  .welcome-login-wrap,
  .welcome-feature-grid {
    grid-column: 1;
    grid-row: auto;
  }

  .welcome-wordmark {
    order: 1;
    width: min(270px, 70vw);
    margin-bottom: 12px;
  }

  .welcome-kicker {
    order: 2;
    margin-bottom: 0;
  }

  .welcome-copy h1 {
    order: 3;
    margin-bottom: 6px;
    font-size: clamp(2.55rem, 10vw, 4rem);
  }

  .welcome-copy > p:last-child {
    order: 5;
    font-size: 1.03rem;
  }

  .welcome-login-wrap {
    order: 4;
  }

  .welcome-feature-grid {
    order: 6;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
  }

  .welcome-feature-grid .feature-intelligence {
    grid-column: 1 / -1;
  }

  .welcome-login-card {
    width: min(100%, 620px);
  }

  .welcome-environment {
    top: 0;
    right: -15%;
    width: 86vw;
    height: 43%;
    opacity: 0.72;
  }

  .intelligence-model {
    top: -4%;
    right: -6%;
    width: min(72vw, 540px);
  }

  .signal-node {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .mobile-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 12;
    display: grid;
    place-items: center;
    min-height: 70px;
    padding: max(12px, env(safe-area-inset-top)) 18px 10px;
    border-bottom: 1px solid rgba(0, 226, 237, 0.24);
    background: rgba(1, 124, 131, 0.97);
    box-shadow: 0 12px 30px rgba(0, 68, 72, 0.18);
    backdrop-filter: blur(18px);
    transition: opacity 220ms ease, transform 220ms ease;
  }

  .mobile-topbar.is-hidden {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
  }

  .mobile-topbar img {
    display: block;
    width: min(210px, 56vw);
    height: auto;
    filter: none;
  }

  .page {
    --page-section-gap: 20px;
    width: min(calc(100% - 28px), 760px);
    padding: calc(82px + env(safe-area-inset-top)) 0 calc(92px + env(safe-area-inset-bottom));
  }

  .role-employee .page {
    padding-top: 30px;
  }

  .role-customer .page,
  .role-platform_admin .page {
    padding-top: 30px;
  }

  .role-employee .employee-hero {
    margin-bottom: 4px;
  }

  .dashboard-layout,
  .split,
  .control-grid,
  .dashboard-support-grid,
  .financial-grid,
  .report-value-grid,
  .operating-grid {
    grid-template-columns: 1fr;
  }

  .split > :nth-child(odd):last-child {
    grid-column: auto;
  }

  .metric-grid,
  .detail-metrics,
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-section-break {
    display: block;
    height: 1px;
    margin: -2px 0 22px;
    background: linear-gradient(90deg, transparent, rgba(1, 124, 131, 0.24), transparent);
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 42px;
    min-width: max-content;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1.1;
    text-align: center;
  }

  .mobile-nav a.active {
    background: var(--accent-soft);
    color: var(--accent-dark);
  }
}

@media (max-width: 720px) {
  .auth-page {
    min-height: 100dvh;
  }

  .auth-card {
    width: min(100% - 28px, 520px);
    padding: 26px 20px;
  }

  .welcome-shell {
    gap: 22px;
    padding: 24px 18px 38px;
  }

  .welcome-wordmark {
    width: min(225px, 64vw);
    margin-bottom: 8px;
  }

  .welcome-logo-wrap {
    margin-bottom: 8px;
  }

  .welcome-copy h1 {
    font-size: clamp(2.42rem, 11vw, 3.3rem);
    line-height: 1;
  }

  .welcome-kicker {
    font-size: 0.66rem !important;
  }

  .welcome-feature-grid article {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    padding: 10px 8px;
  }

  .welcome-feature-grid strong {
    font-size: 0.78rem;
  }

  .welcome-feature-grid p {
    font-size: 0.7rem;
  }

  .feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .welcome-login-card {
    width: 100%;
    padding: 25px 20px;
  }

  .welcome-login-card .wordmark-logo,
  .wordmark-logo {
    width: min(220px, 72vw);
  }

  .welcome-environment {
    right: -28%;
    width: 112vw;
    opacity: 0.5;
  }

  .dashboard-hero,
  .project-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-hero {
    gap: 20px;
    margin-bottom: 0;
  }

  .dashboard-welcome {
    align-items: center;
    gap: 12px;
  }

  .dashboard-welcome-logo {
    display: block;
    width: min(210px, 58vw);
  }

  .dashboard-welcome .eyebrow {
    margin-bottom: 6px;
    font-size: 0.62rem;
    line-height: 1.1;
  }

  .dashboard-welcome h1 {
    margin-bottom: 6px;
    font-size: clamp(1.7rem, 7vw, 2.05rem);
    line-height: 1.02;
  }

  .dashboard-welcome .muted {
    font-size: 0.96rem;
    line-height: 1.25;
  }

  .dashboard-hero .button,
  .project-header .button,
  .report-action .button,
  form > .button {
    width: 100%;
  }

  form,
  label,
  fieldset,
  input,
  textarea,
  select {
    min-width: 0;
  }

  input,
  textarea,
  select {
    max-width: 100%;
    font-size: 16px;
  }

  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  input[type="month"],
  select {
    appearance: none;
    -webkit-appearance: none;
    overflow: hidden;
  }

  .metric-grid,
  .detail-metrics,
  .report-grid,
  .employee-secondary-metrics,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .invoice-line {
    grid-template-columns: minmax(0, 1fr) 58px 78px;
    gap: 6px;
  }

  .invoice-line input {
    min-height: 44px;
    padding: 8px 8px;
    font-size: 0.9rem;
  }

  .invoice-line input[name="item_description"] {
    font-size: 0.86rem;
  }

  .invoice-line.table-head {
    display: none;
  }

  .dashboard-metrics,
  .operating-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 0;
  }

  .dashboard-metrics .metric-card,
  .operating-metrics .metric-card {
    min-height: 96px;
    padding: 16px 12px 12px;
    border-radius: 14px;
  }

  .dashboard-metrics dt,
  .operating-metrics dt {
    font-size: 0.64rem;
    line-height: 1.15;
  }

  .dashboard-metrics dd,
  .operating-metrics dd {
    margin-top: 4px;
    font-size: 1.5rem;
  }

  .dashboard-metrics .metric-card p,
  .operating-metrics .metric-card p {
    margin-top: 7px;
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .operating-metrics .metric-card:last-child {
    grid-column: 1 / -1;
  }

  .control-card {
    min-height: 118px;
    padding: 18px;
  }

  .business-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-stage {
    min-height: 92px;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .flow-stage:nth-child(-n + 2) {
    border-top: 0;
  }

  .dashboard-command-grid {
    grid-template-columns: 1fr;
  }

  .employee-tab-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .desktop-calendar {
    display: none;
  }

  .mobile-week-calendar {
    display: grid;
  }

  .calendar-nav {
    width: 100%;
    justify-content: stretch;
  }

  .calendar-nav .button {
    flex: 1 1 140px;
  }

  .week-calendar {
    gap: 12px;
  }

  .week-day-card {
    padding: 14px;
  }

  .calendar-job strong,
  .calendar-job span {
    white-space: normal;
  }

  .schedule-card-row,
  .quote-convert-form {
    grid-template-columns: 1fr;
  }

  .setup-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-insight-card h2 {
    font-size: 1.22rem;
  }

  .employee-clock-layout {
    grid-template-columns: 1fr;
  }

  .elapsed-timer {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .clockout-options {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
  }

  .schedule-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .schedule-row em {
    grid-column: 2;
  }

  .invoice-send-summary {
    grid-template-columns: 1fr;
  }

  .business-row {
    grid-template-columns: 1fr;
    min-width: 0;
    gap: 4px;
  }

  .business-row.table-head {
    display: none;
  }

  .compact-table .business-row {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .metric-card {
    min-height: 112px;
  }

  .project-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .progress-track,
  .project-stat {
    display: none;
  }

  .project-status {
    font-size: 0.76rem;
  }

  .customer-record-main,
  .customer-record-meta,
  .employee-card-main,
  .employee-card-meta,
  .project-customer-form {
    grid-template-columns: 1fr;
  }

  .customer-record-main,
  .customer-record-meta,
  .employee-card-main,
  .employee-card-meta {
    display: grid;
  }

  .employee-card-actions {
    justify-content: stretch;
  }

  .employee-card-actions .button {
    width: 100%;
  }

  .customer-record-actions {
    grid-template-columns: 1fr;
  }

  .customer-card-head,
  .portal-progress-head {
    gap: 8px;
  }

  .customer-detail-grid,
  .invoice-summary-grid {
    grid-template-columns: 1fr;
  }

  .line-item-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .form-shell,
  .hero-panel {
    padding: 18px;
  }

  .insight-card,
  .summary-brief,
  .intelligent-report-header {
    padding: 22px;
  }

  .insight-card h2,
  .summary-brief h2 {
    font-size: 1.22rem;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* 2026-07-16: application-wide responsive alignment and depth pass */
:root {
  --shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px rgba(15, 23, 42, 0.065),
    0 22px 54px rgba(1, 124, 131, 0.035);
  --shadow-strong:
    0 2px 5px rgba(15, 23, 42, 0.055),
    0 18px 42px rgba(15, 23, 42, 0.095),
    0 30px 80px rgba(1, 124, 131, 0.055);
  --surface-raised:
    linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.95) 58%, rgba(241, 246, 255, 0.88) 100%);
}

html {
  overflow-x: clip;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 79% 2%, rgba(0, 170, 179, 0.13), transparent 32rem),
    radial-gradient(circle at 10% 86%, rgba(148, 163, 184, 0.07), transparent 30rem),
    linear-gradient(180deg, #f8f7f4 0%, #f5f6f7 52%, #f7f6f2 100%);
}

.page > *,
.split > *,
.grid > *,
.dashboard-command-grid > *,
.dashboard-support-grid > *,
.operating-grid > *,
.report-value-grid > *,
.panel-head > *,
.header-actions > * {
  min-width: 0;
}

.panel,
.form-shell,
.metric-card,
.control-card,
.customer-project-card,
.customer-invoice-card,
.customer-record-card,
.employee-card,
.request-card,
.schedule-job-card,
.week-day-card,
.report-tile {
  border-color: rgba(209, 216, 226, 0.82);
  background: var(--surface-raised);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(1, 124, 131, 0.035),
    var(--shadow);
}

.panel,
.form-shell,
.metric-card,
.control-card,
.customer-project-card,
.customer-invoice-card,
.customer-record-card,
.employee-card,
.request-card,
.schedule-job-card,
.week-day-card,
.report-tile,
.flow-stage,
.action-row,
.checkbox-card,
.financial-grid > div {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .clickable-card:hover,
  .flow-stage:hover,
  .action-row:hover,
  .customer-record-card:hover,
  .employee-card:hover,
  .request-card:hover,
  .customer-project-card:hover,
  .customer-invoice-card:hover,
  .week-day-card:hover,
  .checkbox-card:hover {
    border-color: rgba(1, 124, 131, 0.23);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.96),
      0 16px 34px rgba(15, 23, 42, 0.09),
      0 24px 54px rgba(1, 124, 131, 0.07);
  }

  .flow-stage:hover,
  .action-row:hover,
  .checkbox-card:hover {
    transform: translateY(-2px);
  }
}

.sidebar {
  border-right-color: rgba(203, 213, 225, 0.74);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.88)),
    var(--background-soft);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.78),
    12px 0 36px rgba(15, 23, 42, 0.035);
}

.side-nav a {
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.side-nav a:hover {
  transform: translateX(2px);
}

.panel-head {
  align-items: flex-start;
}

.panel-head p:last-child,
.dashboard-hero p:last-child,
.project-header p:last-child {
  margin-bottom: 0;
}

.dashboard-hero,
.project-header {
  margin-bottom: 0;
}

.project-header {
  position: relative;
  z-index: 24;
  overflow: visible;
}

.project-header + * {
  position: relative;
  z-index: 1;
}

.action-menu[open] {
  z-index: 80;
}

.action-menu-panel {
  z-index: 90;
}

.project-header > div:first-child > .status-pill {
  margin-bottom: 12px;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.metric-card {
  isolation: isolate;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  top: -52px;
  right: -48px;
  z-index: -1;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(0, 200, 209, 0.13);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 200, 209, 0.12), transparent 68%);
  pointer-events: none;
}

.metric-card dd,
.control-card strong,
.flow-stage strong,
.financial-grid strong {
  font-variant-numeric: tabular-nums;
}

.financial-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
}

.financial-grid > div,
.customer-detail-grid span,
.invoice-summary-grid span,
.invoice-send-summary span {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.68));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 20px rgba(15, 23, 42, 0.04);
}

.business-flow {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 12px 28px rgba(15, 23, 42, 0.04);
}

.flow-stage {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 249, 255, 0.68));
}

.flow-stage:hover {
  background: linear-gradient(180deg, #fff, rgba(232, 241, 255, 0.9));
}

input,
textarea,
select {
  border-color: rgba(203, 213, 225, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.035),
    0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(0, 200, 209, 0.54);
}

.button,
button {
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(15, 23, 42, 0.16),
    0 9px 20px rgba(1, 124, 131, 0.2),
    0 18px 34px rgba(1, 124, 131, 0.09);
}

.button.secondary {
  border-color: rgba(203, 213, 225, 0.86);
  background: linear-gradient(180deg, #ffffff, #f3f5f8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 7px 18px rgba(15, 23, 42, 0.065);
}

.business-table,
.project-table,
.request-list,
.customer-record-list,
.employee-list,
.customer-project-grid,
.customer-invoice-list,
.question-list,
.live-checklist {
  min-width: 0;
}

.business-row > *,
.project-row > *,
.line-item-row > *,
.invoice-line > *,
.customer-card-head > *,
.employee-card-main > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.invoice-line:not(.table-head) {
  padding: 8px;
  border: 1px solid rgba(203, 213, 225, 0.68);
  border-radius: 13px;
  background: rgba(248, 250, 252, 0.72);
}

.line-item-row {
  border-top-color: rgba(203, 213, 225, 0.76);
}

.customer-record-card,
.employee-card,
.request-card,
.customer-project-card,
.customer-invoice-card,
.question-card,
.checklist-item {
  padding: 18px;
}

.month-calendar {
  border-color: rgba(203, 213, 225, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 30px rgba(15, 23, 42, 0.05);
}

.calendar-day {
  background: rgba(255, 255, 255, 0.72);
}

.calendar-day.today {
  background:
    radial-gradient(circle at 85% 12%, rgba(0, 200, 209, 0.16), transparent 7rem),
    rgba(239, 246, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(1, 124, 131, 0.24);
}

.calendar-job {
  box-shadow: 0 6px 16px rgba(1, 124, 131, 0.08);
}

.quote-line {
  display: grid;
  grid-template-columns: 32px minmax(180px, 1fr) 92px 118px 112px 34px;
  gap: 8px;
  align-items: start;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.quote-line-description {
  min-width: 0;
}

.quote-line-description input {
  width: 100%;
}

.quote-line-number,
.quote-line-unit {
  display: grid;
  gap: 4px;
  margin: 0;
}

.quote-line-number small,
.quote-line-unit small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.quote-line-unit select {
  min-width: 0;
}

.quote-live-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 18px;
  padding: 16px 18px;
  border: 1px solid rgba(1, 124, 131, 0.2);
  border-radius: 10px;
  background: rgba(232, 247, 247, 0.72);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.quote-live-total strong {
  color: var(--brand-deep);
  font-size: 1.35rem;
  white-space: nowrap;
}

.split.quote-edit-focus {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.line-drag-handle,
.line-clear {
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 42px;
  padding: 0;
  border: 0;
  color: #64748b;
  background: transparent;
  box-shadow: none;
  touch-action: none;
}

.line-drag-handle {
  cursor: grab;
  letter-spacing: -4px;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.line-drag-handle:active {
  cursor: grabbing;
}

.line-clear {
  color: #94a3b8;
  font-size: 1.35rem;
}

.quote-line.is-drag-placeholder {
  opacity: 0.22;
  border-style: dashed;
}

.quote-drag-preview {
  position: fixed;
  z-index: 200;
  margin: 0;
  pointer-events: none;
  opacity: 0.96;
  background: #ffffff;
  border-color: rgba(0, 151, 157, 0.7);
  box-shadow: 0 22px 46px rgba(4, 58, 62, 0.24);
  transition: none;
  transform-origin: center;
}

body.quote-reordering,
body.quote-reordering * {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.quote-line {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.quote-line input {
  user-select: text;
  -webkit-user-select: text;
}

.quote-line.is-unrecognized {
  border-color: rgba(216, 67, 67, 0.62);
  background: rgba(254, 242, 242, 0.92);
  box-shadow: 0 0 0 2px rgba(216, 67, 67, 0.07);
}

.unrecognized-label {
  display: block;
  padding: 5px 2px 0;
  color: #b42318;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
}

.unrecognized-label[hidden] {
  display: none;
}

.quote-photo-picker {
  position: relative;
  display: grid;
  gap: 7px;
}

.quote-photo-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.quote-photo-picker > b {
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 10px 16px;
  color: var(--accent-dark);
  font-size: 0.86rem;
  border: 1px solid rgba(1, 124, 131, 0.34);
  border-radius: 12px;
  background: rgba(225, 246, 245, 0.72);
  cursor: pointer;
}

.quote-photo-picker:focus-within > b {
  outline: 3px solid rgba(0, 175, 181, 0.2);
  outline-offset: 2px;
}

.quote-upload-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.quote-upload-preview:empty {
  display: none;
}

.quote-upload-preview figure {
  min-width: 0;
  margin: 0;
}

.quote-upload-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: cover;
}

.quote-upload-preview figcaption {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-brief,
.intelligent-report-header,
.insight-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 22px 46px rgba(15, 23, 42, 0.2),
    0 28px 70px rgba(1, 124, 131, 0.1);
}

@media (max-width: 1280px) and (min-width: 1081px) {
  .page {
    width: min(100% - 48px, 1080px);
  }

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

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

  .operating-grid > :last-child {
    grid-column: 1 / -1;
  }

  .invoice-send-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .role-employee .page,
  .role-customer .page,
  .role-platform_admin .page {
    padding-top: 28px;
  }

  .page {
    width: min(calc(100% - 24px), 780px);
  }

  .mobile-topbar {
    box-shadow:
      inset 0 -1px 0 rgba(255, 255, 255, 0.9),
      0 10px 28px rgba(15, 23, 42, 0.08);
  }

  .mobile-nav {
    border-color: rgba(203, 213, 225, 0.82);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.94),
      0 -12px 34px rgba(15, 23, 42, 0.09);
  }

  .operating-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operating-grid,
  .dashboard-layout,
  .dashboard-command-grid,
  .dashboard-support-grid,
  .report-value-grid,
  .split {
    gap: 18px;
  }

  .invoice-send-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page {
    --page-section-gap: 16px;
    width: min(calc(100% - 20px), 620px);
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .role-employee .page,
  .role-customer .page,
  .role-platform_admin .page {
    padding-top: 18px;
  }

  h1 {
    font-size: clamp(1.75rem, 9vw, 2.2rem);
  }

  h2 {
    font-size: 1.16rem;
  }

  .dashboard-hero,
  .project-header {
    gap: 14px;
  }

  .hero-actions,
  .header-actions,
  .question-actions,
  .modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .hero-actions > *,
  .header-actions > *,
  .question-actions > *,
  .modal-actions > * {
    width: 100%;
  }

  .header-actions .action-menu {
    justify-self: end;
    width: auto;
  }

  .header-actions .action-menu summary {
    width: 44px;
    height: 44px;
  }

  .panel-head {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .panel-head > div {
    flex: 1 1 220px;
  }

  .panel,
  .form-shell,
  .hero-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .metric-grid,
  .detail-metrics,
  .report-grid,
  .employee-secondary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.two {
    gap: 10px;
  }

  .metric-card {
    min-height: 104px;
    padding: 17px 15px 14px;
    border-radius: 15px;
  }

  .metric-card::after {
    top: -64px;
    right: -58px;
  }

  .metric-card dd {
    font-size: clamp(1.55rem, 8vw, 1.95rem);
    overflow-wrap: anywhere;
  }

  .business-flow {
    gap: 8px;
    padding: 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .flow-stage,
  .flow-stage:nth-child(-n + 2) {
    min-height: 88px;
    padding: 13px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 13px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  }

  .flow-stage strong {
    font-size: 1.55rem;
  }

  .business-row,
  .compact-table .business-row {
    gap: 7px;
    min-width: 0;
    margin-top: 10px;
    padding: 13px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 13px;
    background: rgba(248, 250, 252, 0.76);
  }

  .business-row:first-child {
    margin-top: 0;
  }

  .business-row.table-head {
    display: none;
  }

  .project-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 8px 10px;
    min-height: 0;
    margin-top: 8px;
    padding: 13px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
  }

  .project-row:first-child {
    margin-top: 0;
  }

  .project-row .progress-track {
    display: block;
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .project-row .project-stat {
    display: none;
  }

  .project-thumb {
    width: 44px;
    height: 44px;
  }

  .project-main span {
    white-space: normal;
  }

  .invoice-line,
  .invoice-line.table-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 68px 78px;
    gap: 6px;
  }

  .invoice-line.table-head {
    padding: 0 7px;
    font-size: 0.62rem;
  }

  .invoice-line:not(.table-head) {
    padding: 7px;
    border-radius: 11px;
  }

  .invoice-line input {
    min-height: 42px;
    padding: 7px 6px;
    font-size: 0.82rem;
  }

  .invoice-line input[name="item_description"] {
    font-size: 0.8rem;
  }

  .quote-lines-head {
    align-items: center;
    gap: 8px;
  }

  .quote-lines-head h2,
  .quote-lines-head span {
    white-space: nowrap;
  }

  .quote-lines-head h2 {
    font-size: 1.18rem;
  }

  .quote-lines-head span {
    font-size: 0.68rem;
  }

  .invoice-line.quote-line {
    grid-template-columns: 26px minmax(0, 0.9fr) minmax(88px, 1.3fr) minmax(0, 0.9fr) 26px;
    gap: 7px;
    align-items: center;
    padding: 10px 8px;
    overflow: visible;
  }

  .quote-line .line-drag-handle,
  .quote-line .line-clear {
    grid-row: 1 / 3;
    min-width: 26px;
    min-height: 100%;
  }

  .quote-line .line-drag-handle {
    grid-column: 1;
  }

  .quote-line .line-clear {
    grid-column: 5;
  }

  .quote-line-description {
    grid-column: 2 / 5;
    grid-row: 1;
  }

  .quote-line-number,
  .quote-line-unit {
    grid-row: 2;
  }

  .quote-line input,
  .quote-line select {
    min-width: 0;
    padding-inline: 9px;
  }

  .quote-line select {
    font-size: 0.82rem;
    text-overflow: ellipsis;
  }

  .quote-line input[name="item_description"] {
    width: 100%;
  }

  .unrecognized-label {
    font-size: 0.58rem;
    line-height: 1.2;
  }

  .line-item-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
    font-size: 0.82rem;
  }

  .invoice-send-summary,
  .customer-detail-grid,
  .invoice-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .invoice-send-summary span,
  .customer-detail-grid span,
  .invoice-summary-grid span {
    padding: 9px;
    font-size: 0.82rem;
  }

  .invoice-closing-summary span {
    min-height: 88px;
  }

  .invoice-closing-summary b {
    font-size: 0.98rem;
  }

  .invoice-closing-summary small {
    font-size: 0.62rem;
  }

  .customer-card-head,
  .portal-progress-head,
  .customer-record-main,
  .customer-record-meta,
  .employee-card-main,
  .employee-card-meta {
    align-items: flex-start;
    gap: 8px;
  }

  .customer-record-card,
  .employee-card,
  .request-card,
  .customer-project-card,
  .customer-invoice-card,
  .question-card,
  .checklist-item {
    padding: 14px;
    border-radius: 14px;
  }

  .project-customer-form {
    gap: 10px;
  }

  .calendar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .calendar-nav .button {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .week-day-card {
    padding: 13px;
  }

  .clockout-modal {
    width: min(100%, 520px);
    max-height: calc(100dvh - 24px);
    padding: 18px;
  }

  .mobile-nav a {
    min-height: 44px;
    padding: 0 13px;
  }

  .welcome-shell {
    gap: 22px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .welcome-login-card {
    padding: 24px 18px;
  }
}

@media (max-width: 420px) {
  .page {
    width: calc(100% - 16px);
  }

  .dashboard-metrics,
  .operating-metrics {
    gap: 8px;
  }

  .dashboard-metrics .metric-card,
  .operating-metrics .metric-card {
    padding: 14px 10px 11px;
  }

  .metric-grid,
  .detail-metrics,
  .report-grid,
  .employee-secondary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions,
  .header-actions,
  .question-actions,
  .modal-actions {
    grid-template-columns: 1fr;
  }

  .header-actions .action-menu {
    justify-self: start;
  }

  .invoice-line,
  .invoice-line.table-head {
    grid-template-columns: minmax(0, 1fr) 66px 72px;
    gap: 4px;
  }

  .invoice-send-summary,
  .customer-detail-grid,
  .invoice-summary-grid {
    grid-template-columns: 1fr;
  }

  .customer-card-head,
  .portal-progress-head,
  .customer-record-main,
  .customer-record-meta,
  .employee-card-main,
  .employee-card-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .customer-card-head > .status-pill,
  .customer-card-head > .status-stack {
    justify-self: start;
  }

  .customer-card-head > .status-stack {
    justify-content: flex-start;
    width: 100%;
  }

  .status-pill {
    max-width: 100%;
    flex: 0 0 auto;
    white-space: normal;
    text-align: center;
  }
}

/* Guided, mobile-first operating experience. */
.shell-create-trigger.create-link {
  width: 100%;
  min-height: 46px;
  margin-bottom: 8px;
  justify-content: flex-start;
  padding: 0 16px;
  border-radius: 13px;
  color: #fff;
  font-size: 0.92rem;
}

.side-more {
  display: grid;
}

.side-more summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-small);
  color: #293236;
  font-size: 0.92rem;
  font-weight: 780;
  cursor: pointer;
  list-style: none;
}

.side-more summary::-webkit-details-marker {
  display: none;
}

.side-more summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent-dark);
  font-size: 1.1rem;
  transition: transform 180ms ease;
}

.side-more[open] summary::after {
  transform: rotate(45deg);
}

.side-more summary.active {
  color: var(--accent-dark);
  background: linear-gradient(90deg, rgba(0, 200, 209, 0.2), rgba(0, 200, 209, 0.04));
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.side-more-links {
  display: grid;
  gap: 2px;
  padding: 6px 0 2px 14px;
}

.side-more-links a {
  min-height: 36px;
  padding-left: 14px;
  font-size: 0.82rem;
}

.page-intro,
.home-hero,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-intro p:last-child,
.home-hero p:last-child {
  margin-bottom: 0;
}

.home-hero {
  align-items: center;
}

.home-hero h1 {
  font-size: clamp(2.35rem, 4vw, 3.8rem);
}

.home-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 20px;
}

.readiness-card,
.next-move-card,
.today-section,
.focus-section {
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-strong);
}

.readiness-card {
  overflow: hidden;
}

.readiness-card > summary {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr) 42px;
  gap: 22px;
  align-items: center;
  min-height: 236px;
  padding: 26px;
  cursor: pointer;
  list-style: none;
}

.readiness-card > summary::-webkit-details-marker {
  display: none;
}

.readiness-card[open] > summary {
  min-height: 190px;
}

.readiness-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-primary) calc(var(--readiness) * 1%), rgba(1, 124, 131, 0.1) 0);
  box-shadow: 0 18px 42px rgba(1, 124, 131, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.68);
}

.readiness-ring::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  background: linear-gradient(145deg, #fff, #f2fbfa);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.06);
}

.readiness-ring strong,
.readiness-ring span {
  position: relative;
  z-index: 1;
}

.readiness-ring strong {
  align-self: end;
  font-size: 2.35rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.readiness-ring span {
  align-self: start;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.section-kicker {
  margin-bottom: 7px;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.readiness-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.readiness-copy p:last-child {
  margin: 0;
  color: var(--muted);
}

.reveal-control {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(1, 124, 131, 0.16);
  border-radius: 50%;
  color: var(--accent-dark);
  background: rgba(1, 124, 131, 0.07);
  font-size: 1.4rem;
  transition: transform 220ms ease, background 220ms ease;
}

.readiness-card[open] .reveal-control {
  transform: rotate(45deg);
  background: rgba(1, 124, 131, 0.13);
}

.readiness-breakdown {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0 20px 20px;
  animation: guided-reveal 240ms ease both;
}

.readiness-check {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, 0.68);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(248, 250, 252, 0.86);
}

.readiness-check > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 900;
}

.readiness-check.complete > span {
  background: var(--success);
}

.readiness-check strong {
  font-size: 0.78rem;
  line-height: 1.2;
}

.readiness-check small {
  color: var(--muted);
  font-size: 0.68rem;
}

.next-move-card {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 236px;
  padding: 28px;
  overflow: hidden;
  color: var(--text-light);
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 200, 209, 0.28), transparent 16rem),
    linear-gradient(145deg, #182136, #0b1020);
  box-shadow: var(--shadow-dark);
}

.next-move-card::after,
.home-win-card::after {
  content: "";
  position: absolute;
  right: 12%;
  bottom: -1px;
  left: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  box-shadow: 0 0 16px rgba(0, 200, 209, 0.54);
}

.next-move-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.next-move-topline span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  font-weight: 800;
}

.next-move-card h2 {
  margin: 12px 0 8px;
  color: #fff;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
}

.next-move-card > p {
  color: rgba(248, 250, 252, 0.76);
}

.next-move-button {
  justify-self: start;
  min-width: 150px;
}

.automation-note {
  margin-top: 13px;
  color: rgba(248, 250, 252, 0.56);
}

.today-section,
.focus-section {
  padding: 24px;
}

.section-heading {
  align-items: end;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
}

.section-heading > a {
  font-weight: 850;
}

.today-timeline {
  display: grid;
}

.today-event {
  display: grid;
  grid-template-columns: 74px 14px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 8px 4px;
  border-top: 1px solid rgba(203, 213, 225, 0.62);
  color: var(--ink);
}

.today-event:first-child {
  border-top: 0;
}

.today-event time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.timeline-marker {
  width: 11px;
  height: 11px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(1, 124, 131, 0.18);
}

.today-event-copy strong,
.today-event-copy small {
  display: block;
}

.today-event-copy small,
.today-event em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.business-pulse {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.business-pulse a {
  display: grid;
  gap: 3px;
  min-height: 118px;
  align-content: center;
  padding: 20px 24px;
  border-left: 1px solid rgba(203, 213, 225, 0.62);
  color: var(--ink);
}

.business-pulse a:first-child {
  border-left: 0;
}

.business-pulse span,
.business-pulse small {
  color: var(--muted);
}

.business-pulse span {
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.business-pulse strong {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  font-variant-numeric: tabular-nums;
}

.business-pulse small {
  font-size: 0.76rem;
}

.home-win-card {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
}

.home-win-card h2 {
  max-width: 760px;
}

.home-win-card p:last-child {
  margin-bottom: 0;
  color: rgba(248, 250, 252, 0.68);
}

.workflow-stage-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.74);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.workflow-stage-strip a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 78px;
  padding: 18px;
  border-left: 1px solid rgba(203, 213, 225, 0.62);
  color: var(--ink);
}

.workflow-stage-strip a:first-child {
  border-left: 0;
}

.workflow-stage-strip span {
  color: var(--muted);
  font-weight: 800;
}

.workflow-stage-strip strong {
  font-size: 1.8rem;
}

.work-focus-list {
  display: grid;
  gap: 9px;
}

.work-focus-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid rgba(203, 213, 225, 0.68);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(248, 250, 252, 0.72);
}

.work-stage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(1, 124, 131, 0.1);
}

.work-stage-dot.quote {
  background: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.work-focus-row strong,
.work-focus-row small {
  display: block;
}

.work-focus-row small {
  color: var(--muted);
}

.work-focus-row b {
  color: var(--accent-dark);
  font-size: 0.8rem;
}

.request-intake-shell {
  width: min(760px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.board-count {
  align-self: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.request-board-action {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.request-board-action em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 750;
}

.quiet-button {
  color: var(--muted);
  background: transparent;
  border-color: rgba(148, 163, 184, 0.42);
  box-shadow: none;
}

.archived-quote-panel {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
}

.archived-quote-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
}

.archived-quote-panel > summary::-webkit-details-marker {
  display: none;
}

.archived-quote-panel > summary span,
.archived-quote-row > span {
  display: grid;
  gap: 3px;
}

.archived-quote-panel small,
.archived-quote-row small {
  color: var(--muted);
}

.archived-quote-panel > summary > b {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-dark);
  background: rgba(1, 124, 131, 0.09);
}

.archived-quote-list {
  border-top: 1px solid var(--line);
}

.archived-quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 22px;
}

.archived-quote-row + .archived-quote-row {
  border-top: 1px solid var(--line);
}

.work-job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.work-job-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 16px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, rgba(239, 246, 255, 0.7));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.work-job-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.work-job-card h3 {
  margin: 16px 0 4px;
}

.work-job-card p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.more-backdrop {
  position: fixed;
  inset: 0;
  z-index: 89;
  opacity: 0;
  background: rgba(9, 15, 28, 0.36);
  backdrop-filter: blur(6px);
  transition: opacity 220ms ease;
}

.more-sheet {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  width: min(430px, calc(100% - 24px));
  padding: 12px 18px 18px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.more-is-open .more-backdrop,
.more-is-open .more-sheet {
  opacity: 1;
}

.more-is-open .more-sheet {
  transform: translateY(0) scale(1);
}

.sheet-handle {
  width: 46px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: #d5dbe5;
}

.more-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.more-sheet-head h2,
.more-sheet-head p {
  margin-bottom: 0;
}

.icon-button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  color: var(--ink);
  background: #eef8f7;
  box-shadow: none;
  font-size: 1.5rem;
}

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

.more-menu-grid a {
  display: grid;
  gap: 4px;
  min-height: 86px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 15px;
  color: var(--ink);
  background: #f8fafc;
}

.more-menu-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.more-logout {
  display: block;
  margin-top: 10px;
  padding: 12px;
  color: var(--danger);
  font-weight: 850;
  text-align: center;
}

.create-orbit {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 70;
  width: 58px;
  height: 58px;
}

.create-orbit-button {
  position: relative;
  z-index: 1;
  width: 58px;
  min-height: 58px;
  padding: 0;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.create-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 119;
  opacity: 0;
  background: rgba(8, 18, 25, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 180ms ease;
}

.create-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 120;
  width: min(460px, calc(100% - 48px));
  padding: 30px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 30px 90px rgba(8, 18, 25, 0.3);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 18px)) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.create-is-open {
  overflow: hidden;
}

.create-is-open .create-dialog-backdrop,
.create-is-open .create-dialog {
  opacity: 1;
}

.create-is-open .create-dialog {
  transform: translate(-50%, -50%) scale(1);
}

.create-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.create-dialog .eyebrow {
  margin: 0 48px 8px 0;
}

.create-dialog h2 {
  margin: 0 48px 10px 0;
  font-size: 1.8rem;
  line-height: 1.08;
}

.create-dialog-copy {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.create-request-action {
  width: 100%;
  min-height: 52px;
}

.create-other-toggle {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 1px solid rgba(1, 124, 131, 0.22);
  color: var(--accent-dark);
  background: #fff;
  box-shadow: none;
}

.create-alternatives {
  display: grid;
  margin-top: 12px;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 12px;
  overflow: hidden;
}

.create-alternatives[hidden],
.create-dialog[hidden],
.create-dialog-backdrop[hidden] {
  display: none;
}

.create-alternatives a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  color: var(--ink);
  background: #f8faf9;
  font-weight: 820;
}

.create-alternatives a + a {
  border-top: 1px solid rgba(203, 213, 225, 0.8);
}

.create-alternatives b {
  color: var(--accent-dark);
  font-size: 1.35rem;
}

.role-portal-intro {
  align-items: end;
  min-height: 110px;
  padding: 4px 0;
}

.role-portal-intro h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.portal-pulse-grid .metric-card {
  min-height: 128px;
}

.empty-state {
  display: grid;
  gap: 5px;
  padding: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.56);
  border-radius: 15px;
  color: var(--muted);
}

.compact-empty {
  padding: 18px;
}

.work-job-progress {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

@keyframes control-press {
  0% { filter: brightness(1); }
  45% { filter: brightness(0.94); }
  100% { filter: brightness(1); }
}

a.is-pressed,
button.is-pressed {
  animation: control-press 180ms ease-out;
}

@keyframes guided-reveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) and (pointer: fine) {
  .today-event,
  .business-pulse a,
  .work-focus-row,
  .work-job-card,
  .more-menu-grid a,
  .readiness-check {
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }

  .today-event:hover,
  .business-pulse a:hover,
  .work-focus-row:hover,
  .work-job-card:hover,
  .more-menu-grid a:hover,
  .readiness-check:hover {
    transform: translateY(-2px);
    border-color: rgba(1, 124, 131, 0.24);
    background: #fff;
    box-shadow: 0 14px 30px rgba(1, 124, 131, 0.08);
  }
}

@media (max-width: 1080px) {
  .role-owner .mobile-nav,
  .role-manager .mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
    padding: 7px 6px max(7px, env(safe-area-inset-bottom));
  }

  .role-owner .mobile-nav a,
  .role-owner .mobile-nav button,
  .role-manager .mobile-nav a,
  .role-manager .mobile-nav button {
    display: grid;
    grid-template-rows: 14px auto;
    place-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 51px;
    padding: 5px 2px;
    border: 0;
    border-radius: 12px;
    color: var(--muted);
    background: transparent;
    box-shadow: none;
    font-size: 0.67rem;
    font-weight: 850;
  }

  .role-owner .mobile-nav i,
  .role-manager .mobile-nav i {
    display: block;
    width: 18px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.55;
  }

  .role-owner .mobile-nav .active,
  .role-manager .mobile-nav .active {
    color: var(--accent-dark);
    background: rgba(1, 124, 131, 0.1);
  }

  .role-owner .mobile-nav .active i,
  .role-manager .mobile-nav .active i {
    width: 23px;
    opacity: 1;
  }

  .create-orbit {
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .role-employee .mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .role-employee .mobile-nav a {
    min-width: 0;
    text-align: center;
  }

  .home-primary-grid {
    grid-template-columns: 1fr;
  }

  .readiness-breakdown {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1081px) {
  .create-orbit {
    display: none;
  }
}

@media (max-width: 560px) {
  .create-dialog {
    width: calc(100% - 48px);
    padding: 26px 20px 20px;
    border-radius: 18px;
  }

  .create-dialog h2 {
    font-size: 1.55rem;
  }
}

@media (max-width: 720px) {
  .home-hero,
  .page-intro,
  .home-win-card {
    display: grid;
    gap: 14px;
  }

  .home-hero h1 {
    font-size: clamp(2.05rem, 11vw, 2.85rem);
  }

  .home-hero > .status-pill {
    justify-self: start;
  }

  .readiness-card > summary {
    grid-template-columns: 112px minmax(0, 1fr) 32px;
    gap: 14px;
    min-height: 188px;
    padding: 18px 15px;
  }

  .readiness-ring {
    width: 108px;
    height: 108px;
  }

  .readiness-ring::before {
    inset: 10px;
  }

  .readiness-ring strong {
    font-size: 1.72rem;
  }

  .readiness-copy h2 {
    font-size: 1.15rem;
  }

  .readiness-copy p:last-child {
    font-size: 0.78rem;
  }

  .reveal-control {
    width: 30px;
    height: 30px;
  }

  .readiness-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 14px 14px;
  }

  .next-move-card,
  .today-section,
  .focus-section,
  .home-win-card {
    padding: 20px;
    border-radius: 18px;
  }

  .today-event {
    grid-template-columns: 58px 12px minmax(0, 1fr);
    gap: 9px;
    padding: 12px 0;
  }

  .today-event em {
    grid-column: 3;
  }

  .business-pulse {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .business-pulse a {
    min-height: 96px;
    padding: 14px 10px;
  }

  .business-pulse span,
  .business-pulse small {
    font-size: 0.62rem;
  }

  .business-pulse strong {
    font-size: clamp(1.25rem, 7vw, 1.7rem);
    overflow-wrap: anywhere;
  }

  .home-win-card .button {
    width: 100%;
  }

  .workflow-stage-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-stage-strip a {
    min-height: 66px;
    padding: 13px;
    border-top: 1px solid rgba(203, 213, 225, 0.62);
  }

  .workflow-stage-strip a:nth-child(-n + 2) {
    border-top: 0;
  }

  .work-focus-row {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .work-focus-row b {
    grid-column: 2;
  }

  .request-board-action {
    grid-column: 2;
    grid-template-columns: auto auto;
    justify-content: space-between;
    justify-items: start;
    width: 100%;
  }

  .request-board-action b {
    grid-column: auto;
    justify-self: end;
  }

  .archived-quote-row {
    align-items: start;
    padding: 14px 18px;
  }

  .work-job-grid {
    grid-template-columns: 1fr;
  }

  .more-sheet {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
    transform: translateY(100%);
    transform-origin: bottom center;
  }

  .more-is-open .more-sheet {
    transform: translateY(0);
  }

  .more-menu-grid a {
    min-height: 78px;
    padding: 12px;
  }

  .role-portal-intro {
    min-height: auto;
    padding-top: 2px;
  }

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

  .portal-pulse-grid .metric-card {
    min-height: 108px;
    padding: 14px;
  }

  .portal-pulse-grid .metric-card dd {
    font-size: clamp(1.35rem, 7vw, 1.8rem);
  }
}

@media (max-width: 390px) {
  .readiness-card > summary {
    grid-template-columns: 94px minmax(0, 1fr) 28px;
    gap: 10px;
  }

  .readiness-ring {
    width: 92px;
    height: 92px;
  }

  .readiness-copy h2 {
    font-size: 1.02rem;
  }

  .readiness-copy p:last-child {
    display: none;
  }

  .business-pulse small {
    display: none;
  }

  .more-menu-grid {
    grid-template-columns: 1fr;
    max-height: 48vh;
    overflow-y: auto;
  }
}

/* Daily owner brief: one native-feeling operating surface, not stacked page sections. */
.today-dashboard {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding-bottom: 120px;
}

.today-app-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 4px 0 20px;
  padding: 0 4px;
}

.today-app-header .eyebrow {
  margin: 0 0 3px;
}

.today-app-header h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.today-count {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(1, 124, 131, 0.2);
  border-radius: 10px;
  background: rgba(1, 124, 131, 0.08);
  color: var(--blue, #017c83);
  font-size: 0.78rem;
  font-weight: 800;
}

.today-count.clear {
  border-color: rgba(47, 168, 79, 0.2);
  background: rgba(47, 168, 79, 0.1);
  color: #21853b;
}

.daily-brief-surface,
.first-work-surface,
.business-detail-drawer {
  border: 1px solid rgba(207, 216, 230, 0.94);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 46px rgba(31, 49, 82, 0.09);
}

.daily-brief-surface {
  overflow: hidden;
}

.daily-brief-section {
  padding: 28px 30px;
}

.brief-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.brief-section-heading .section-kicker {
  margin: 0 0 4px;
}

.brief-section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.brief-section-heading > a {
  flex: 0 0 auto;
  color: var(--blue, #017c83);
  font-size: 0.85rem;
  font-weight: 800;
}

.daily-work-list {
  border-top: 1px solid #e5eaf2;
}

.daily-work-item {
  position: relative;
  display: grid;
  grid-template-columns: 4px 92px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 13px 2px 13px 0;
  border-bottom: 1px solid #e5eaf2;
  color: #171714;
  transition: background 160ms ease, transform 160ms ease;
}

.daily-work-item:hover {
  background: rgba(1, 124, 131, 0.035);
  transform: translateX(2px);
}

.work-item-rail {
  align-self: stretch;
  width: 4px;
  border-radius: 4px;
  background: #a3a9a4;
}

.work-item-rail.active { background: #017c83; }
.work-item-rail.warning { background: #d69a00; }
.work-item-rail.urgent { background: #d84343; }

.work-item-time,
.work-item-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.work-item-time small,
.work-item-copy small {
  color: #6b706b;
  font-size: 0.78rem;
}

.work-item-time strong {
  font-size: 0.88rem;
}

.work-item-copy strong {
  font-size: 1rem;
}

.work-item-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-item-status {
  padding: 5px 8px;
  border-radius: 8px;
  background: #eef1f5;
  color: #555b56;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.work-item-status.active {
  background: rgba(1, 124, 131, 0.1);
  color: #007379;
}

.work-item-status.warning {
  background: rgba(214, 154, 0, 0.12);
  color: #936a00;
}

.row-chevron {
  color: #8d949f;
  font-size: 1.4rem;
  line-height: 1;
}

.daily-clear-state {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 22px 2px;
  border-bottom: 1px solid #e5eaf2;
}

.clear-check {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(47, 168, 79, 0.12);
  color: #21853b;
  font-weight: 900;
}

.daily-clear-state strong,
.daily-clear-state p {
  margin: 0;
}

.daily-clear-state p {
  margin-top: 3px;
  color: #6b706b;
  font-size: 0.86rem;
}

.daily-clear-state > a {
  color: var(--blue, #017c83);
  font-size: 0.82rem;
  font-weight: 800;
}

.daily-brief-divider {
  height: 8px;
  border-top: 1px solid #e1e7f0;
  border-bottom: 1px solid #e1e7f0;
  background: linear-gradient(90deg, #f6fbfa, #e9f8f7, #f6fbfa);
}

.cash-position-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 16px;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  overflow: hidden;
}

.cash-position-strip > div {
  display: grid;
  gap: 5px;
  padding: 15px 17px;
}

.cash-position-strip > div + div {
  border-left: 1px solid #dfe5ef;
}

.cash-position-strip span {
  color: #6b706b;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cash-position-strip strong {
  font-size: 1.35rem;
}

.cash-position-strip .urgent strong {
  color: #c83737;
}

.cash-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 15px;
  padding: 16px 18px;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  background: #f7fcfb;
  color: #171714;
}

.cash-action-row > span:first-child {
  display: grid;
  gap: 3px;
}

.cash-action-row small {
  color: #6b706b;
}

.cash-action-row em {
  color: var(--blue, #017c83);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.cash-action-row.urgent {
  border-color: rgba(216, 67, 67, 0.25);
  background: rgba(216, 67, 67, 0.055);
}

.cash-action-row.warning {
  border-color: rgba(214, 154, 0, 0.28);
  background: rgba(214, 154, 0, 0.055);
}

.business-detail-drawer {
  margin-top: 14px;
  overflow: hidden;
}

.business-detail-drawer > summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  cursor: pointer;
  list-style: none;
}

.business-detail-drawer > summary::-webkit-details-marker { display: none; }

.business-detail-drawer > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.business-detail-drawer > summary small {
  color: #6b706b;
}

.business-detail-drawer .reveal-control {
  position: static;
  flex: 0 0 auto;
}

.business-detail-drawer[open] .reveal-control {
  transform: rotate(45deg);
}

.business-detail-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #e1e7f0;
}

.business-detail-strip a {
  display: grid;
  gap: 5px;
  padding: 18px 24px;
  color: #171714;
}

.business-detail-strip a + a { border-left: 1px solid #e1e7f0; }
.business-detail-strip span { color: #6b706b; font-size: 0.76rem; font-weight: 800; text-transform: uppercase; }
.business-detail-strip strong { font-size: 1.25rem; }

.first-work-surface {
  padding: 34px;
  overflow: hidden;
}

.first-work-intro {
  max-width: 760px;
}

.first-work-intro h2 {
  margin: 4px 0 9px;
  font-size: clamp(1.65rem, 3.5vw, 2.5rem);
}

.first-work-intro p:last-child {
  max-width: 680px;
  margin: 0;
  color: #686a64;
}

.first-work-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 28px 0;
  padding-left: 0;
}

.first-work-actions .text-action {
  color: var(--blue, #017c83);
  font-weight: 800;
}

.first-work-path {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-left: 0;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  overflow: hidden;
}

.first-work-path span {
  padding: 12px 8px;
  color: #858b86;
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
}

.first-work-path span + span { border-left: 1px solid #dfe5ef; }
.first-work-path span:first-child,
.first-work-path span.complete { background: rgba(1, 124, 131, 0.08); color: #017c83; }

.starter-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 22px;
  margin-top: 22px;
}

.starter-overview-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid #dfe5ef;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(25, 42, 58, 0.09);
}

.starter-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.starter-card-heading h2 { margin: 4px 0 0; font-size: 1.45rem; }
.starter-card-heading a { color: #017c83; font-weight: 800; white-space: nowrap; }
.starter-schedule-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 22px; }
.starter-schedule-card .starter-card-heading { grid-column: 1 / -1; }
.starter-calendar-date { display: grid; align-content: center; justify-items: center; padding: 14px 8px; border: 1px solid rgba(1, 124, 131, 0.22); border-radius: 14px; background: rgba(1, 124, 131, 0.07); }
.starter-calendar-date span { color: #017c83; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; }
.starter-calendar-date strong { color: #171714; font-size: 2rem; line-height: 1.1; }
.starter-calendar-date small { color: #727771; font-weight: 700; }
.starter-job-list { display: grid; gap: 12px; }
.starter-job-list > * { display: grid; gap: 3px; padding: 13px 15px; border-left: 3px solid #0b9ba1; background: #f7faf9; color: #171714; }
.starter-job-list span { color: #017c83; font-size: 0.68rem; font-weight: 900; text-transform: uppercase; }
.starter-job-list small { color: #727771; }
.starter-revenue-card { display: flex; flex-direction: column; }
.starter-revenue-total { display: grid; gap: 3px; margin: 30px 0 22px; }
.starter-revenue-total strong { font-size: 3rem; line-height: 1; }
.starter-revenue-total span, .starter-average span { color: #727771; font-weight: 700; }
.starter-average { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-block: 1px solid #e3e8e8; }
.starter-average strong { font-size: 1.35rem; }
.starter-revenue-card > p { margin: auto 0 0; padding-top: 20px; color: #727771; font-size: 0.86rem; }
.report-header-actions { display: flex; align-items: center; gap: 12px; }

@media (max-width: 720px) {
  .today-dashboard {
    width: 100%;
    padding: 0 14px 126px;
  }

  .today-app-header {
    margin: 2px 0 14px;
    padding: 0 4px;
  }

  .today-app-header h1 {
    font-size: 1.55rem;
  }

  .daily-brief-surface,
  .first-work-surface,
  .business-detail-drawer {
    border-radius: 18px;
  }

  .daily-brief-section {
    padding: 22px 18px;
  }

  .brief-section-heading {
    align-items: start;
    margin-bottom: 14px;
  }

  .brief-section-heading h2 {
    max-width: 230px;
    font-size: 1.15rem;
  }

  .daily-work-item {
    grid-template-columns: 4px minmax(0, 1fr) auto 12px;
    gap: 10px;
    min-height: 76px;
    padding: 12px 0;
  }

  .work-item-time {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .work-item-time strong {
    color: #6b706b;
    font-size: 0.72rem;
  }

  .work-item-copy {
    grid-column: 2;
    grid-row: 2;
  }

  .work-item-copy small {
    white-space: normal;
  }

  .work-item-status {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    max-width: 92px;
    white-space: normal;
    text-align: center;
  }

  .daily-work-item .row-chevron {
    grid-column: 4;
    grid-row: 1 / span 2;
  }

  .work-item-rail {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .daily-clear-state {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 18px 0;
  }

  .daily-clear-state > a {
    grid-column: 2;
    justify-self: start;
  }

  .cash-position-strip {
    margin-bottom: 12px;
  }

  .cash-position-strip > div {
    padding: 12px 10px;
  }

  .cash-position-strip span {
    font-size: 0.62rem;
  }

  .cash-position-strip strong {
    font-size: 1.05rem;
  }

  .cash-action-row {
    grid-template-columns: minmax(0, 1fr) 12px;
    padding: 14px;
  }

  .cash-action-row em {
    grid-column: 1;
    justify-self: start;
    margin-top: 5px;
  }

  .cash-action-row .row-chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .business-detail-drawer > summary {
    padding: 16px 18px;
  }

  .business-detail-strip a {
    padding: 14px 10px;
    text-align: center;
  }

  .business-detail-strip span { font-size: 0.6rem; }
  .business-detail-strip strong { font-size: 1rem; }

  .first-work-surface {
    padding: 24px 20px;
  }

  .first-work-intro {
    display: block;
  }

  .first-work-intro h2 {
    font-size: 1.65rem;
  }

  .first-work-actions {
    display: grid;
    gap: 14px;
    margin: 24px 0;
    padding-left: 0;
  }

  .first-work-actions .button {
    width: 100%;
  }

  .first-work-actions .text-action {
    text-align: center;
  }

  .first-work-path {
    margin-left: 0;
  }

  .first-work-path span {
    padding: 10px 3px;
    font-size: 0.56rem;
  }

  .starter-overview-grid { grid-template-columns: 1fr; }
  .starter-overview-card { padding: 22px 18px; }
  .starter-schedule-card { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
  .report-header-actions { width: 100%; flex-direction: column; align-items: stretch; }
}

/* State-aware owner brief and project operating focus */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.owner-brief-grid,
.home-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 20px;
}

.today-focus-card,
.money-today-card,
.project-focus-card {
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 20px;
  box-shadow: var(--shadow-strong);
}

.today-focus-card,
.money-today-card {
  display: grid;
  align-content: start;
  min-height: 280px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.95);
}

.owner-brief-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.owner-brief-topline .section-kicker {
  margin-bottom: 8px;
}

.owner-brief-topline time {
  color: var(--muted);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.today-focus-card h2,
.money-today-card h2 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 2.7vw, 2.35rem);
}

.brief-location {
  margin-top: -2px;
  color: var(--muted);
}

.brief-conclusion {
  display: block;
  margin: 16px 0 6px;
  font-size: 1.05rem;
}

.today-focus-card > p:last-of-type,
.money-today-card > p {
  color: var(--muted);
}

.owner-brief-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 18px;
}

.owner-brief-actions form {
  margin: 0;
}

.money-today-card {
  position: relative;
  overflow: hidden;
  color: var(--text-light);
  background:
    radial-gradient(circle at 92% 4%, rgba(0, 200, 209, 0.24), transparent 16rem),
    linear-gradient(145deg, #182136, #0b1020);
  box-shadow: var(--shadow-dark);
}

.money-today-card::after {
  content: "";
  position: absolute;
  right: 14%;
  bottom: 0;
  left: 14%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  box-shadow: 0 0 14px rgba(0, 200, 209, 0.5);
}

.money-today-card .section-kicker,
.money-today-card h2 {
  color: #fff;
}

.money-today-card > p {
  color: rgba(248, 250, 252, 0.7);
}

.money-today-card .status-pill {
  border-color: rgba(255, 255, 255, 0.16);
}

.money-today-card .button {
  justify-self: start;
  margin-top: auto;
}

.money-today-amount {
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(2.25rem, 4vw, 3.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.home-secondary-grid .readiness-card > summary,
.home-secondary-grid .next-move-card {
  min-height: 210px;
}

.home-secondary-grid .readiness-card > summary {
  grid-template-columns: 122px minmax(0, 1fr) 38px;
}

.home-secondary-grid .readiness-ring {
  width: 118px;
  height: 118px;
}

.project-focus-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 26px 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 0%, rgba(0, 200, 209, 0.17), transparent 18rem),
    rgba(255, 255, 255, 0.96);
}

.project-focus-card.focus-active_work,
.project-focus-card.focus-late_day_active,
.project-focus-card.focus-financial_closeout {
  color: var(--text-light);
  border-color: rgba(0, 200, 209, 0.28);
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 200, 209, 0.25), transparent 18rem),
    linear-gradient(145deg, #182136, #0b1020);
  box-shadow: var(--shadow-dark);
}

.project-focus-card.focus-active_work h2,
.project-focus-card.focus-late_day_active h2,
.project-focus-card.focus-financial_closeout h2 {
  color: #fff;
}

.project-focus-card.focus-active_work p:not(.section-kicker),
.project-focus-card.focus-late_day_active p:not(.section-kicker),
.project-focus-card.focus-financial_closeout p:not(.section-kicker) {
  color: rgba(248, 250, 252, 0.72);
}

.project-focus-copy h2 {
  margin-bottom: 8px;
}

.project-focus-copy > p:not(.section-kicker) {
  max-width: 780px;
  color: var(--muted);
}

.project-focus-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.project-focus-stats span {
  padding: 7px 10px;
  border: 1px solid rgba(0, 200, 209, 0.2);
  border-radius: 10px;
  color: inherit;
  background: rgba(0, 200, 209, 0.08);
  font-size: 0.78rem;
}

.project-materials-panel.is-primary {
  border-color: rgba(1, 124, 131, 0.25);
  box-shadow: 0 16px 38px rgba(1, 124, 131, 0.1);
}

.material-list {
  display: grid;
  gap: 10px;
}

.material-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-left: 4px solid #d84343;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.82);
}

.material-row.status-scheduled {
  border-left-color: #d69a00;
}

.material-row.status-acquired {
  border-left-color: var(--success);
  background: rgba(47, 168, 79, 0.04);
}

.material-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.material-main strong,
.material-main small,
.material-main p {
  overflow-wrap: anywhere;
}

.material-main small,
.material-main p {
  color: var(--muted);
}

.material-main p {
  margin: 2px 0 0;
  font-size: 0.76rem;
}

.material-status-form select {
  min-height: 42px;
  margin: 0;
}

.icon-text-button {
  min-height: 38px;
  padding: 6px 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.danger-text {
  color: #b42318;
}

.material-add-panel {
  margin-top: 16px;
  border-top: 1px solid rgba(203, 213, 225, 0.72);
}

.material-add-panel > summary {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  color: var(--accent-dark);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.material-add-panel > summary::-webkit-details-marker {
  display: none;
}

.material-add-panel > summary span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent-primary);
}

.material-add-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.material-add-form label {
  min-width: 0;
}

.material-add-form input,
.material-add-form select {
  width: 100%;
}

.material-note-field {
  grid-column: span 2;
}

.material-add-form .button {
  align-self: end;
  min-height: 48px;
}

@media (max-width: 900px) {
  .owner-brief-grid,
  .home-secondary-grid {
    grid-template-columns: 1fr;
  }

  .material-add-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .today-focus-card,
  .money-today-card {
    min-height: 0;
    padding: 22px 20px;
  }

  .owner-brief-topline {
    margin-bottom: 18px;
  }

  .money-today-card .button,
  .owner-brief-actions .button,
  .owner-brief-actions form {
    width: 100%;
  }

  .owner-brief-actions form .button {
    width: 100%;
  }

  .home-secondary-grid .readiness-card > summary {
    grid-template-columns: 1fr;
  }

  .project-focus-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 20px;
  }

  .project-focus-card > form,
  .project-focus-card > .button,
  .project-focus-card > form .button {
    width: 100%;
  }

  .material-row {
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 10px;
    padding: 13px;
  }

  .material-row > form:last-child {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .material-add-form {
    grid-template-columns: 1fr;
  }

  .material-note-field {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .material-row {
    grid-template-columns: 1fr;
  }

  .material-status-form select {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .readiness-breakdown,
  .more-sheet,
  .more-backdrop,
  .create-dialog,
  .create-dialog-backdrop,
  .create-orbit-button,
  .reveal-control {
    animation: none !important;
    transition: none !important;
  }
}

/* App-entry experience and mobile alignment, July 2026 */
.welcome-shell {
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.72fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 22px clamp(40px, 5vw, 86px);
  min-height: calc(100dvh - 16px);
  padding: clamp(30px, 3.4vw, 52px) clamp(34px, 4.6vw, 74px);
  color: #effcfc;
  border-color: rgba(45, 196, 200, 0.24);
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(8, 154, 159, 0.24), transparent 21rem),
    radial-gradient(circle at 16% 18%, rgba(0, 170, 179, 0.18), transparent 24rem),
    linear-gradient(145deg, #061719 0%, #0a292b 54%, #041315 100%);
  box-shadow: 0 28px 90px rgba(2, 8, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.welcome-shell::before {
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(0, 200, 209, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 209, 0.09) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 45% 45%, black, transparent 72%);
  mask-image: radial-gradient(circle at 45% 45%, black, transparent 72%);
}

.welcome-shell::after {
  top: auto;
  right: 7%;
  bottom: -1px;
  left: 7%;
  width: auto;
  height: 2px;
  clip-path: none;
  background: linear-gradient(90deg, transparent, #00c8d1, transparent);
  box-shadow: 0 0 22px rgba(0, 200, 209, 0.66);
}

.welcome-brandline {
  position: relative;
  z-index: 3;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.welcome-logo-wrap {
  margin: 0;
}

.welcome-wordmark {
  width: min(250px, 38vw);
  filter: drop-shadow(0 0 18px rgba(18, 179, 183, 0.28));
}

.welcome-live-status,
.welcome-system-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b7d6d5;
  font-size: 0.7rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.welcome-live-status i,
.welcome-system-strip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.1), 0 0 14px rgba(74, 222, 128, 0.46);
}

.welcome-story {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  max-width: 660px;
  padding-bottom: 4px;
}

.welcome-kicker {
  color: #65d9db !important;
}

.welcome-copy h1 {
  max-width: 650px;
  color: #f8fbff;
  font-size: clamp(3.2rem, 5.4vw, 5.35rem);
  text-shadow: 0 8px 34px rgba(1, 8, 22, 0.32);
}

.welcome-copy h1 span {
  color: #00c8d1;
}

.welcome-copy > p:last-child {
  max-width: 580px;
  color: #b1cccb;
}

.welcome-environment {
  position: relative;
  z-index: 1;
  top: auto;
  right: auto;
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  width: min(100%, 690px);
  height: min(43vh, 390px);
  min-height: 280px;
  margin-top: -6px;
  overflow: visible;
  opacity: 1;
}

.welcome-grid-floor {
  inset: 4% -6% -22% -8%;
  opacity: 0.72;
  background-image:
    linear-gradient(rgba(0, 200, 209, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 209, 0.18) 1px, transparent 1px);
}

.intelligence-model {
  top: -22%;
  right: 2%;
  width: min(48vw, 510px);
  filter: drop-shadow(0 30px 34px rgba(0, 0, 0, 0.24));
}

.intelligence-orbit {
  border-color: rgba(56, 200, 203, 0.52);
  box-shadow: inset 0 0 40px rgba(22, 183, 187, 0.1), 0 0 38px rgba(22, 183, 187, 0.12);
}

.orbit-inner {
  background: rgba(8, 91, 96, 0.22);
}

.signal-node {
  border-color: rgba(63, 204, 207, 0.3);
  background: rgba(13, 26, 50, 0.88);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.signal-node strong { color: #f4f8ff; }
.signal-node span { color: #a8c8c7; }

.intelligence-caption {
  position: absolute;
  right: 12%;
  bottom: 7%;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #89afae;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intelligence-caption i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #00aab3;
}

.welcome-login-wrap {
  grid-column: 2;
  grid-row: 1 / 4;
}

.welcome-login-card {
  border-color: rgba(116, 213, 215, 0.26);
  background:
    radial-gradient(circle at 88% 0%, rgba(18, 165, 169, 0.16), transparent 15rem),
    rgba(248, 251, 255, 0.96);
  box-shadow: 0 34px 90px rgba(0, 5, 18, 0.42), inset 0 1px 0 #fff;
}

.welcome-login-card h2 {
  color: #111a2b;
}

.welcome-system-strip {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(93, 203, 206, 0.16);
}

.welcome-system-strip i {
  width: 6px;
  height: 6px;
  background: #00c8d1;
  box-shadow: 0 0 12px rgba(0, 200, 209, 0.5);
}

@media (max-width: 1080px) {
  .welcome-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 250px auto auto auto;
    gap: 20px;
    min-height: 100dvh;
    padding: 24px 20px 40px;
  }

  .welcome-brandline,
  .welcome-environment,
  .welcome-story,
  .welcome-login-wrap,
  .welcome-system-strip {
    grid-column: 1;
  }

  .welcome-brandline { grid-row: 1; }
  .welcome-environment {
    grid-row: 2;
    width: min(100%, 620px);
    height: 250px;
    min-height: 0;
    margin: 0 auto;
  }
  .welcome-story {
    display: block;
    grid-row: 3;
    justify-self: center;
    align-self: auto;
    max-width: 620px;
    text-align: center;
  }
  .welcome-copy { display: block; }
  .welcome-login-wrap { grid-row: 4; }
  .welcome-system-strip {
    grid-row: 5;
    justify-content: center;
  }

  .welcome-wordmark {
    width: min(230px, 58vw);
    margin: 0;
  }

  .intelligence-model {
    top: -38%;
    right: 50%;
    width: min(80vw, 440px);
    transform: translateX(50%) perspective(1000px) rotateX(57deg) rotateZ(-8deg);
  }

  .welcome-copy h1 {
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(2.65rem, 9vw, 4.15rem);
  }

  .welcome-copy > p:last-child {
    margin-right: auto;
    margin-left: auto;
  }

  .welcome-kicker {
    justify-content: center;
  }

  .welcome-login-card {
    width: min(100%, 590px);
  }
}

@media (max-width: 720px) {
  .welcome-shell {
    grid-template-rows: auto 210px auto auto auto;
    gap: 17px;
    padding: 20px 16px 34px;
  }

  .welcome-live-status {
    font-size: 0.58rem;
  }

  .welcome-environment {
    height: 210px;
  }

  .intelligence-model {
    top: -43%;
    width: min(96vw, 405px);
  }

  .intelligence-caption {
    right: 50%;
    bottom: 1%;
    width: max-content;
    transform: translateX(50%);
  }

  .welcome-copy h1 {
    margin-bottom: 12px;
    font-size: clamp(2.45rem, 12vw, 3.3rem);
  }

  .welcome-copy > p:last-child {
    font-size: 0.94rem;
    line-height: 1.48;
  }

  .welcome-login-card {
    padding: 25px 20px;
    border-radius: 20px;
  }

  .welcome-system-strip {
    gap: 10px 15px;
  }

  .welcome-system-strip span {
    font-size: 0.56rem;
  }
}

@media (max-width: 420px) {
  .welcome-brandline {
    justify-content: center;
  }

  .welcome-live-status {
    position: absolute;
    top: 50%;
    right: 0;
    width: 8px;
    height: 8px;
    overflow: hidden;
    color: transparent;
    transform: translateY(-50%);
  }

  .welcome-live-status i {
    flex: 0 0 7px;
  }

  .welcome-system-strip span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 1080px) {
  .role-owner .mobile-nav a,
  .role-owner .mobile-nav button,
  .role-manager .mobile-nav a,
  .role-manager .mobile-nav button {
    grid-template-rows: 24px auto;
    gap: 2px;
    min-height: 58px;
    font-size: 0.64rem;
  }

  .role-owner .mobile-nav .mobile-nav-icon,
  .role-manager .mobile-nav .mobile-nav-icon {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 0;
    background-color: currentColor;
    background-image: none;
    opacity: 0.68;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
  }

  .role-owner .mobile-nav .active .mobile-nav-icon,
  .role-manager .mobile-nav .active .mobile-nav-icon {
    width: 22px;
    opacity: 1;
  }

  .nav-icon-home {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.7 2.6 10.4a1 1 0 0 0 1.3 1.5l.8-.7V21h5.5v-6h3.6v6h5.5v-9.8l.8.7a1 1 0 1 0 1.3-1.5L12 2.7Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.7 2.6 10.4a1 1 0 0 0 1.3 1.5l.8-.7V21h5.5v-6h3.6v6h5.5v-9.8l.8.7a1 1 0 1 0 1.3-1.5L12 2.7Z'/%3E%3C/svg%3E");
  }
  .nav-icon-willgence {
    width: 26px !important;
    -webkit-mask-image: url("willgence-nav-mark.png?v=20260909");
    mask-image: url("willgence-nav-mark.png?v=20260909");
  }
  .nav-icon-calendar {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2h2v2h6V2h2v2h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2V2Zm12 8H5v10h14V10ZM5 6v2h14V6H5Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2h2v2h6V2h2v2h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2V2Zm12 8H5v10h14V10ZM5 6v2h14V6H5Z'/%3E%3C/svg%3E");
  }
  .nav-icon-work {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 3h6a2 2 0 0 1 2 2v2h3a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h3V5a2 2 0 0 1 2-2Zm6 4V5H9v2h6Zm5 5H4v7h16v-7Zm-9 1h2v2h-2v-2Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 3h6a2 2 0 0 1 2 2v2h3a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h3V5a2 2 0 0 1 2-2Zm6 4V5H9v2h6Zm5 5H4v7h16v-7Zm-9 1h2v2h-2v-2Z'/%3E%3C/svg%3E");
  }
  .nav-icon-invoice {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 2h11l4 4v16l-3-1.5-3 1.5-2-1.5-2 1.5-2.5-1.5L5 22V2Zm2 3v13.7l.5-.3 2.4 1.4 2.1-1.5 2.2 1.5 2.8-1.4 1 .5V7h-3V4H7v1Zm3.9 3h2.2v1.2c1.2.2 2 .9 2.3 2l-1.9.7c-.2-.5-.7-.8-1.4-.8-.8 0-1.2.3-1.2.7 0 .3.2.5.7.6l1.6.4c1.5.4 2.4 1.3 2.4 2.6 0 1.4-1 2.4-2.5 2.7v1.1h-2.2v-1.1c-1.5-.2-2.5-1-2.8-2.3l2-.6c.2.7.8 1 1.8 1 .8 0 1.3-.3 1.3-.8 0-.3-.3-.6-.9-.7l-1.5-.4c-1.5-.4-2.3-1.2-2.3-2.5 0-1.4.9-2.3 2.4-2.6V8Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 2h11l4 4v16l-3-1.5-3 1.5-2-1.5-2 1.5-2.5-1.5L5 22V2Zm2 3v13.7l.5-.3 2.4 1.4 2.1-1.5 2.2 1.5 2.8-1.4 1 .5V7h-3V4H7v1Zm3.9 3h2.2v1.2c1.2.2 2 .9 2.3 2l-1.9.7c-.2-.5-.7-.8-1.4-.8-.8 0-1.2.3-1.2.7 0 .3.2.5.7.6l1.6.4c1.5.4 2.4 1.3 2.4 2.6 0 1.4-1 2.4-2.5 2.7v1.1h-2.2v-1.1c-1.5-.2-2.5-1-2.8-2.3l2-.6c.2.7.8 1 1.8 1 .8 0 1.3-.3 1.3-.8 0-.3-.3-.6-.9-.7l-1.5-.4c-1.5-.4-2.3-1.2-2.3-2.5 0-1.4.9-2.3 2.4-2.6V8Z'/%3E%3C/svg%3E");
  }
  .nav-icon-more {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 9a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm7 0a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm7 0a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 9a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm7 0a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm7 0a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E");
  }
}

/* Distinct website and native-app entry experiences, July 2026 */
.role-guest.web-entry,
.role-guest.native-app {
  min-height: 100%;
  margin: 0;
  background: #061719;
}

.role-guest .auth-page:has(.entry-shell) {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  padding: 0;
}

.role-guest .auth-page:has(.entry-shell) > .notice {
  position: fixed;
  z-index: 40;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  width: min(calc(100% - 32px), 520px);
  margin: 0;
  transform: translateX(-50%);
  box-shadow: 0 14px 42px rgba(2, 12, 14, 0.24);
}

.entry-shell {
  --entry-x: 72%;
  --entry-y: 18%;
  --entry-shift-x: 0px;
  --entry-shift-y: 0px;
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  color: #f7ffff;
  background:
    radial-gradient(circle at var(--entry-x) var(--entry-y), rgba(33, 224, 220, 0.2), transparent 24rem),
    radial-gradient(circle at 18% 92%, rgba(1, 129, 135, 0.2), transparent 28rem),
    linear-gradient(142deg, #041416 0%, #082b2e 57%, #031113 100%);
}

.entry-shell::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(79, 226, 225, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 226, 225, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at 48% 42%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 48% 42%, #000 0%, transparent 72%);
}

.entry-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 10%;
  left: 43%;
  width: min(48vw, 720px);
  aspect-ratio: 1;
  border: 1px solid rgba(76, 226, 224, 0.17);
  border-radius: 50%;
  box-shadow:
    0 0 0 54px rgba(24, 172, 175, 0.025),
    0 0 0 118px rgba(24, 172, 175, 0.018),
    inset 0 0 90px rgba(24, 172, 175, 0.06);
  transform: translate3d(var(--entry-shift-x), var(--entry-shift-y), 0);
  transition: transform 220ms ease-out;
}

.entry-light {
  position: absolute;
  z-index: -1;
  top: 18%;
  left: 53%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #74ffff;
  box-shadow: 0 0 18px #16c8cb, 0 0 70px 24px rgba(10, 178, 183, 0.18);
  transform: translate3d(var(--entry-shift-x), var(--entry-shift-y), 0);
}

.web-entry-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 72px, 1420px);
  height: 96px;
  margin: 0 auto;
}

.web-entry-header img {
  display: block;
  width: 220px;
  height: auto;
}

.web-entry-header > a {
  color: #dffdfc;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(89, 234, 232, 0.52);
}

.entry-header-note {
  color: #8eb0af;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.web-entry-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.65fr);
  align-items: center;
  gap: clamp(54px, 7vw, 116px);
  width: min(100% - 72px, 1420px);
  min-height: calc(100dvh - 176px);
  margin: 0 auto;
  padding: 28px 0 58px;
}

.web-entry-story {
  max-width: 780px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 600ms ease;
}

.entry-shell.is-ready .web-entry-story {
  opacity: 1;
  transform: translateY(0);
}

.entry-eyebrow {
  margin: 0 0 18px;
  color: #68e2df;
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.web-entry-story h1 {
  max-width: 750px;
  margin: 0;
  color: #f9ffff;
  font-size: clamp(3.5rem, 6vw, 6.4rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.web-entry-story h1 span {
  display: block;
  color: #31d6d4;
}

.web-entry-lead {
  max-width: 690px;
  margin: 28px 0 34px;
  color: #b7d2d1;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.62;
}

.owner-outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.owner-outcomes article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 18px 16px;
  border: 1px solid rgba(95, 226, 224, 0.14);
  border-radius: 8px;
  background: rgba(9, 38, 41, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(12px);
}

.outcome-signal {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(70, 229, 226, 0.38);
  border-radius: 8px;
  background: rgba(39, 198, 198, 0.1);
}

.outcome-signal::before,
.outcome-signal::after {
  content: "";
  position: absolute;
  background: #55dfdc;
}

.signal-workflow::before { inset: 8px 7px auto; height: 2px; box-shadow: 0 6px 0 #55dfdc, 0 12px 0 #55dfdc; }
.signal-workflow::after { display: none; }
.signal-crew::before { top: 7px; left: 10px; width: 8px; height: 8px; border-radius: 50%; }
.signal-crew::after { right: 6px; bottom: 6px; left: 6px; height: 8px; border-radius: 8px 8px 3px 3px; }
.signal-intelligence::before { top: 6px; bottom: 6px; left: 14px; width: 2px; }
.signal-intelligence::after { top: 13px; left: 7px; width: 16px; height: 2px; box-shadow: -3px -5px 0 -0.25px #55dfdc, 3px 5px 0 -0.25px #55dfdc; }

.owner-outcomes strong,
.owner-outcomes span {
  display: block;
}

.customer-access-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.customer-access-points span {
  padding: 9px 12px;
  border: 1px solid rgba(95, 226, 224, 0.2);
  border-radius: 8px;
  color: #c9e5e3;
  background: rgba(9, 38, 41, 0.5);
  font-size: 0.72rem;
  font-weight: 800;
}

.entry-connection-line {
  display: flex;
  align-items: center;
  gap: 0;
  width: min(100%, 430px);
  margin-top: 42px;
}

.entry-connection-line::before,
.entry-connection-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(84, 231, 228, 0.55));
}

.entry-connection-line::after { transform: scaleX(-1); }
.entry-connection-line i {
  width: 11px;
  height: 11px;
  margin: 0 8px;
  border: 2px solid #43d8d6;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(67, 216, 214, 0.45);
}

.entry-connection-line i:nth-child(2) {
  width: 17px;
  height: 17px;
  background: rgba(67, 216, 214, 0.18);
}

.owner-outcomes strong {
  color: #f6ffff;
  font-size: 0.84rem;
  line-height: 1.3;
}

.owner-outcomes span {
  margin-top: 5px;
  color: #94b6b5;
  font-size: 0.72rem;
  line-height: 1.5;
}

.entry-login-panel {
  color: #102021;
}

.web-login-panel {
  width: 100%;
  max-width: 500px;
  justify-self: end;
  padding: clamp(30px, 3.4vw, 46px);
  border: 1px solid rgba(141, 239, 237, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 0%, rgba(36, 206, 205, 0.12), transparent 14rem),
    rgba(250, 255, 254, 0.965);
  box-shadow: 0 34px 90px rgba(0, 8, 10, 0.44), inset 0 1px 0 #fff;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms 100ms ease, transform 600ms 100ms ease, box-shadow 180ms ease;
}

.entry-shell.is-ready .web-login-panel {
  opacity: 1;
  transform: translateY(0);
}

.login-panel-head {
  margin-bottom: 26px;
}

.secure-indicator,
.native-security-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.secure-indicator { color: #267c7d; }
.secure-indicator i,
.native-security-note i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20b981;
  box-shadow: 0 0 0 4px rgba(32, 185, 129, 0.1);
}

.login-panel-head h2 {
  margin: 14px 0 5px;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.login-panel-head p {
  margin: 0;
  color: #667675;
}

.entry-login-panel form {
  display: grid;
  gap: 17px;
}

.entry-login-panel label {
  display: grid;
  gap: 8px;
  color: #273635;
  font-size: 0.78rem;
  font-weight: 790;
}

.entry-login-panel input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid #cfddda;
  border-radius: 10px;
  color: #132120;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 2px rgba(5, 32, 33, 0.035);
}

.entry-login-panel input:focus {
  border-color: #03999d;
  box-shadow: 0 0 0 3px rgba(0, 157, 162, 0.11), 0 8px 22px rgba(0, 119, 123, 0.06);
}

.entry-login-panel .password-field {
  position: relative;
  display: block;
}

.entry-login-panel .password-field input { padding-right: 66px; }
.entry-login-panel .password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 48px;
  padding: 8px;
  border: 0;
  color: #227779;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.entry-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-top: 3px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #17bfc1 0%, #007f84 72%, #006b70 100%);
  box-shadow: 0 12px 28px rgba(0, 128, 133, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.entry-login-button:hover { transform: translateY(-1px); }
.entry-login-button i { font-style: normal; transition: transform 160ms ease; }
.entry-login-button:hover i { transform: translateX(3px); }
.entry-login-button.is-loading i { opacity: 0; }

.entry-account-link {
  margin: 22px 0 0;
  color: #687775;
  font-size: 0.82rem;
  text-align: center;
}

.entry-account-link a {
  color: #007f84;
  font-weight: 820;
  text-decoration: none;
}

.entry-invite-note,
.entry-selection-note {
  margin: 10px 0 0;
  color: #71817f;
  font-size: 0.69rem;
  line-height: 1.45;
  text-align: center;
}

.portal-help { line-height: 1.5; }

.entry-access-panel { padding: clamp(30px, 3.4vw, 44px); }

.entry-access-choices {
  display: grid;
  gap: 13px;
}

.entry-access-choice {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid #c9d9d6;
  border-radius: 12px;
  color: #132120;
  background: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(3, 30, 31, 0.04);
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.entry-access-choice:hover {
  border-color: #2bbfbe;
  box-shadow: 0 14px 30px rgba(0, 103, 107, 0.12);
  transform: translateY(-2px);
}

.entry-access-choice span,
.entry-access-choice strong,
.entry-access-choice small { display: block; }
.entry-access-choice strong { font-size: 0.94rem; }
.entry-access-choice small {
  margin-top: 5px;
  color: #687775;
  font-size: 0.72rem;
  line-height: 1.4;
}
.entry-access-choice b {
  color: #078f92;
  font-size: 1.15rem;
  transition: transform 170ms ease;
}
.entry-access-choice:hover b { transform: translateX(3px); }

.access-choice-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(0, 148, 152, 0.2);
  border-radius: 10px;
  background: rgba(31, 193, 193, 0.09);
}

.customer-icon::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 16px;
  width: 12px;
  height: 12px;
  border: 2px solid #078f92;
  border-radius: 50%;
}
.customer-icon::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 8px;
  left: 9px;
  height: 11px;
  border: 2px solid #078f92;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.business-icon::before {
  content: "";
  position: absolute;
  inset: 11px 9px 9px;
  border: 2px solid #078f92;
  border-radius: 3px;
}
.business-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 16px;
  width: 12px;
  height: 7px;
  border: 2px solid #078f92;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.web-entry-foot {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-height: 60px;
  border-top: 1px solid rgba(86, 220, 218, 0.12);
  color: #8eb0af;
  background: rgba(1, 15, 17, 0.34);
  backdrop-filter: blur(14px);
}

.web-entry-foot span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.web-entry-foot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2fd5d3;
  box-shadow: 0 0 10px rgba(47, 213, 211, 0.62);
}

/* Native entry uses the same information architecture as the responsive website. */
.role-guest.native-app,
.role-guest.native-app .auth-page {
  width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #041f21;
}

.entry-native {
  min-height: 100dvh;
}

.entry-native::after {
  top: 8%;
  left: 20%;
  width: 94vw;
}

.entry-native .entry-light {
  top: 18%;
  left: 53%;
}

@media (max-width: 1080px) {
  .web-entry-header {
    width: min(100% - 40px, 760px);
    height: 82px;
  }

  .web-entry-header img { width: 190px; }

  .web-entry-main {
    grid-template-columns: 1fr;
    gap: 38px;
    width: min(100% - 40px, 760px);
    padding: 44px 0 108px;
  }

  .web-entry-story,
  .web-login-panel {
    max-width: 660px;
    justify-self: center;
  }

  .web-entry-story { text-align: center; }
  .web-entry-story h1,
  .web-entry-lead { margin-right: auto; margin-left: auto; }
  .owner-outcomes { text-align: left; }
  .customer-access-points,
  .entry-connection-line { justify-content: center; margin-right: auto; margin-left: auto; }
}

@media (max-width: 720px) {
  .role-guest.web-entry,
  .role-guest.web-entry .auth-page,
  .role-guest.native-app,
  .role-guest.native-app .auth-page {
    overflow: auto;
  }

  .entry-web,
  .entry-native { min-height: 100dvh; }
  .entry-web::after,
  .entry-native::after {
    top: 8%;
    left: 20%;
    width: 94vw;
  }

  .web-entry-header {
    width: calc(100% - 32px);
    height: auto;
    min-height: calc(76px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }

  .web-entry-header img { width: min(48vw, 190px); }
  .web-entry-header > a { font-size: 0.72rem; }
  .entry-header-note { font-size: 0.58rem; }

  .web-entry-main {
    width: calc(100% - 32px);
    gap: 28px;
    padding: 34px 0 calc(92px + env(safe-area-inset-bottom));
  }

  .entry-eyebrow { font-size: 0.64rem; }
  .web-entry-story h1 {
    font-size: clamp(2.7rem, 13.5vw, 4.1rem);
    line-height: 0.98;
  }

  .web-entry-lead {
    margin: 21px auto 26px;
    font-size: 0.94rem;
    line-height: 1.54;
  }

  .owner-outcomes {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .owner-outcomes article { padding: 14px; }
  .web-login-panel {
    padding: 26px 20px;
    border-radius: 16px;
  }

  .entry-access-choice {
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    min-height: 84px;
    padding: 13px;
  }

  .access-choice-icon { width: 42px; height: 42px; }

  .web-entry-foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .entry-shell::after,
  .entry-light,
  .web-entry-story,
  .web-login-panel {
    transition: none;
  }
}

@media (max-width: 720px) {
  .home-hero {
    justify-items: center;
    text-align: center;
  }

  .home-hero > div {
    width: min(100%, 560px);
  }

  .home-hero > .status-pill {
    justify-self: center;
  }

  .home-primary-grid,
  .today-section,
  .business-pulse,
  .home-win-card {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
  }

  .readiness-card > summary {
    position: relative;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
    min-height: 0;
    padding: 24px 46px 24px;
    text-align: center;
  }

  .readiness-ring {
    width: 116px;
    height: 116px;
  }

  .readiness-copy {
    width: min(100%, 310px);
  }

  .readiness-copy h2 {
    font-size: 1.2rem;
  }

  .reveal-control {
    position: absolute;
    top: 18px;
    right: 16px;
    width: 32px;
    height: 32px;
  }

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

  .section-heading h2 {
    font-size: 1.34rem;
  }

  .section-heading > a {
    padding-top: 24px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .today-event {
    grid-template-columns: 52px 12px minmax(0, 1fr);
    gap: 9px;
    min-height: 82px;
    padding: 14px 0;
  }

  .today-event time {
    text-align: right;
  }

  .today-event-copy {
    min-width: 0;
  }

  .today-event-copy strong,
  .today-event-copy small {
    overflow-wrap: anywhere;
  }

  .today-event em {
    justify-self: start;
    margin-top: 2px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(1, 124, 131, 0.08);
  }

  .business-pulse a {
    justify-items: center;
    text-align: center;
  }

  .home-win-card {
    text-align: left;
  }
}

@media (max-width: 390px) {
  .readiness-card > summary {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px 42px 22px;
  }

  .readiness-ring {
    width: 108px;
    height: 108px;
  }

  .readiness-copy p:last-child {
    display: block;
  }
}

/* Native authenticated shell: content-first chrome and consistent app gutters. */
@media (max-width: 1080px) {
  .native-app {
    --native-space-y: 12px;
    --native-space-x: calc(var(--native-space-y) * 2);
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .native-app input,
  .native-app select,
  .native-app textarea,
  .native-app .quote-line input,
  .native-app .quote-line input[name="item_description"] {
    font-size: 16px;
  }

  .native-app .mobile-topbar {
    display: none !important;
  }

  .native-app .main-shell {
    min-height: 100dvh;
  }

  .native-app .page,
  .native-app.role-employee .page,
  .native-app.role-customer .page,
  .native-app.role-platform_admin .page {
    width: min(calc(100% - (var(--native-space-x) * 2)), 780px);
    padding-top: calc(env(safe-area-inset-top) + var(--native-space-y));
    padding-bottom: calc(96px + env(safe-area-inset-bottom) + var(--native-space-y));
  }

  .native-app .today-dashboard {
    width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  .native-app .page > *,
  .native-app .page-header,
  .native-app .page-intro,
  .native-app .dashboard-hero,
  .native-app .project-header {
    min-width: 0;
    max-width: 100%;
  }

  .native-app .mobile-nav {
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .native-app .more-sheet {
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    width: auto;
  }
}

@media (max-width: 720px) {
  .native-app .page,
  .native-app.role-employee .page,
  .native-app.role-customer .page,
  .native-app.role-platform_admin .page {
    --page-section-gap: 18px;
    width: min(calc(100% - (var(--native-space-x) * 2)), 620px);
  }
}

.split.tracker-only {
  grid-template-columns: 1fr;
}

/* Native home: the workflow is the navigation surface. */
@media (max-width: 1080px) {
  .native-app.role-owner .mobile-nav,
  .native-app.role-manager .mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-right: max(22px, env(safe-area-inset-right));
    padding-left: max(22px, env(safe-area-inset-left));
  }

  .native-app.role-owner .mobile-nav a,
  .native-app.role-owner .mobile-nav button,
  .native-app.role-manager .mobile-nav a,
  .native-app.role-manager .mobile-nav button {
    width: 100%;
    min-width: 0;
  }

  .native-app .create-orbit {
    right: max(20px, env(safe-area-inset-right));
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .native-app .more-sheet {
    max-height: calc(100dvh - env(safe-area-inset-top) - 24px);
    overflow-y: auto;
  }

  .native-home-hub {
    display: grid;
    gap: 16px;
    width: 100%;
  }

  .native-hub-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 4px 2px 2px;
  }

  .native-hub-header h1 {
    margin: 3px 0 0;
    font-size: clamp(2rem, 8vw, 2.7rem);
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .native-hub-header time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
  }

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

  .native-hub-tile {
    position: relative;
    display: grid;
    align-content: center;
    min-width: 0;
    min-height: 142px;
    padding: 20px;
    overflow: hidden;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid #cfdddf;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(16, 39, 43, 0.08);
  }

  .native-hub-tile span {
    overflow: hidden;
    color: #626b69;
    font-size: 0.76rem;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .native-hub-tile strong {
    margin-top: 12px;
    font-size: 3rem;
    line-height: 1;
  }

  .native-hub-tile i,
  .native-next-move i {
    font-size: 1.75rem;
    font-style: normal;
    line-height: 1;
  }

  .native-hub-tile > i {
    position: absolute;
    right: 18px;
    bottom: 16px;
    color: #8b9694;
  }

  .native-hub-tile.has-work {
    border-color: rgba(0, 151, 157, 0.5);
    box-shadow: 0 14px 30px rgba(0, 126, 132, 0.13);
  }

  .native-hub-tile.is-clear strong {
    color: #697370;
  }

  .native-hub-outgoing {
    background: #f2fbfb;
  }

  .native-hub-revisions {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 96px;
    background: #f7f8f7;
  }

  .native-hub-revisions strong {
    grid-column: 2;
    grid-row: 1;
    margin: 0 34px 0 12px;
    font-size: 2.5rem;
  }

  .native-hub-revisions > i {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .native-next-move {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 78px;
    padding: 16px 19px;
    color: #ffffff;
    background: #073f42;
    border: 1px solid rgba(22, 190, 192, 0.45);
    border-radius: 21px;
    box-shadow: 0 14px 28px rgba(5, 54, 57, 0.17);
  }

  .native-next-move span {
    display: grid;
    min-width: 0;
    gap: 4px;
  }

  .native-next-move small {
    color: #7de1de;
    font-size: 0.66rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .native-next-move strong {
    overflow: hidden;
    font-size: 0.95rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  .native-hub-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .native-hub-tile {
    min-height: 128px;
    padding: 17px;
    border-radius: 22px;
  }

  .native-hub-tile span {
    font-size: 0.69rem;
  }

  .native-hub-tile strong {
    font-size: 2.65rem;
  }

  .native-hub-revisions {
    min-height: 88px;
  }
}

/* Native sign-in: a focused app entry, separate from the public website hero. */
.role-guest.native-app,
.role-guest.native-app .auth-page {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background: #032d2f;
}

.native-login-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding:
    max(16px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  color: #f7ffff;
  background:
    radial-gradient(circle at 85% 8%, rgba(41, 211, 207, 0.17), transparent 35%),
    radial-gradient(circle at 8% 92%, rgba(0, 134, 140, 0.22), transparent 34%),
    linear-gradient(155deg, #062f31 0%, #032426 58%, #021b1d 100%);
}

/* Signup is intentionally taller than the focused native login screen. */
.role-guest.native-app:has(.signup-card),
.role-guest.native-app .auth-page:has(.signup-card) {
  height: auto;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.role-guest.native-app .auth-page:has(.signup-card) {
  display: block;
  padding:
    max(20px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(44px, calc(env(safe-area-inset-bottom) + 28px))
    max(18px, env(safe-area-inset-left));
  background: #032d2f;
}

.role-guest.native-app .signup-card {
  width: min(100%, 560px);
  margin: 0 auto;
}

.role-guest.native-app .signup-card .button {
  min-height: 54px;
}

.native-login-shell::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(74, 222, 218, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 218, 0.13) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent, black 24%, black 78%, transparent);
}

.native-login-shell::after {
  position: absolute;
  top: 14%;
  left: 50%;
  z-index: -1;
  width: min(118vw, 660px);
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(75, 224, 220, 0.17);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow:
    0 0 0 54px rgba(75, 224, 220, 0.025),
    inset 0 0 70px rgba(75, 224, 220, 0.035);
}

.native-login-light {
  position: absolute;
  top: -12%;
  left: 50%;
  z-index: -1;
  width: 88%;
  height: 46%;
  border-radius: 50%;
  pointer-events: none;
  transform: translateX(-50%);
  background: rgba(30, 207, 202, 0.13);
  filter: blur(70px);
}

.native-login-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 420px);
  height: 100%;
  margin: 0 auto;
}

.native-login-brand {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.native-login-brand img {
  display: block;
  width: clamp(158px, 47vw, 190px);
  height: auto;
  object-fit: contain;
}

.native-login-content {
  align-self: center;
  width: 100%;
  margin-top: -10px;
}

.native-login-heading {
  margin-bottom: 24px;
  text-align: center;
}

.native-security-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #77dfdc;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.native-security-note i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35d39a;
  box-shadow: 0 0 0 5px rgba(53, 211, 154, 0.12);
}

.native-login-heading h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.35rem, 11vw, 3.35rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.native-login-heading p {
  margin: 12px 0 0;
  color: rgba(231, 246, 244, 0.7);
  font-size: 0.98rem;
  line-height: 1.45;
}

.native-login-content form {
  display: grid;
  gap: 15px;
}

.native-login-content form > label {
  display: grid;
  gap: 7px;
  color: rgba(245, 255, 254, 0.9);
  font-size: 0.78rem;
  font-weight: 750;
}

.native-login-content input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  color: #f8ffff;
  font-size: 1rem;
  background: rgba(2, 23, 25, 0.54);
  border: 1px solid rgba(150, 225, 222, 0.34);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.native-login-content input::placeholder {
  color: rgba(220, 237, 235, 0.4);
}

.native-login-content input:focus {
  border-color: #36d4d0;
  box-shadow: 0 0 0 3px rgba(54, 212, 208, 0.14);
}

.native-login-content .password-field {
  position: relative;
  display: block;
}

.native-login-content .password-field input {
  margin: 0;
  padding-right: 72px;
}

.native-login-content .password-toggle {
  position: absolute;
  top: 0;
  right: 8px;
  bottom: 0;
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 40px;
  min-height: 0;
  margin: auto 0;
  padding: 0 8px;
  color: #72dfdc;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  background: transparent;
  border: 0;
  transform: none;
}

@media (max-width: 720px) {
  .invite-link-actions {
    grid-template-columns: 1fr;
  }

  .invite-copy-button {
    width: 100%;
  }
}

.native-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  margin-top: 3px;
  color: #ffffff;
  font-weight: 850;
  background: linear-gradient(135deg, #17c7c5 0%, #008b91 58%, #006970 100%);
  border: 1px solid rgba(116, 238, 234, 0.48);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 139, 145, 0.25);
}

.native-login-button i {
  font-size: 1.25rem;
  font-style: normal;
}

.native-login-help,
.native-signup-link {
  margin: 14px 0 0;
  color: rgba(223, 241, 239, 0.62);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
}

.native-signup-link {
  margin-top: 9px;
}

.native-signup-link a,
.native-portal-switch {
  color: #76e1de;
  font-weight: 800;
}

.native-portal-switch {
  display: block;
  width: max-content;
  margin: 16px auto 0;
  padding: 7px 12px;
  font-size: 0.76rem;
  text-align: center;
}

@media (max-height: 720px) {
  .native-login-shell {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .native-login-brand {
    padding-top: 2px;
  }

  .native-login-brand img {
    width: 148px;
  }

  .native-login-content {
    margin-top: -4px;
  }

  .native-login-heading {
    margin-bottom: 16px;
  }

  .native-security-note {
    margin-bottom: 9px;
  }

  .native-login-heading h1 {
    font-size: 2.15rem;
  }

  .native-login-heading p {
    margin-top: 8px;
    font-size: 0.88rem;
  }

  .native-login-content form {
    gap: 10px;
  }

  .native-login-content input,
  .native-login-button {
    height: 48px;
    min-height: 48px;
  }

  .native-login-help {
    margin-top: 10px;
  }

  .native-signup-link {
    margin-top: 6px;
  }

  .native-portal-switch {
    margin-top: 8px;
  }
}

/* Customer portal: one current stage, with history and questions kept secondary. */
.portal-stage-intro,
.portal-stage-layout {
  width: min(100%, 880px);
  margin-inline: auto;
}

.portal-stage-intro {
  display: grid;
  gap: 8px;
  padding: 6px 0 22px;
}

.portal-stage-intro h1,
.portal-stage-intro p {
  margin: 0;
}

.portal-stage-intro h1 {
  max-width: none;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.portal-stage-intro > p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
}

.portal-stage-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  border-block: 1px solid rgba(1, 124, 131, 0.18);
}

.portal-stage-track span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  color: #7b827f;
  font-size: 0.8rem;
  font-weight: 800;
}

.portal-stage-track span + span {
  border-left: 1px solid rgba(1, 124, 131, 0.14);
}

.portal-stage-track i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #b9c4c1;
  border-radius: 50%;
  font-style: normal;
}

.portal-stage-track .active {
  color: var(--brand-deep);
  background: rgba(0, 184, 190, 0.08);
}

.portal-stage-track .active i {
  color: white;
  border-color: var(--brand-deep);
  background: var(--brand-deep);
}

.portal-stage-track .complete {
  color: #238451;
}

.portal-stage-track .complete i {
  border-color: #83caa5;
  background: #e8f7ef;
}

.portal-stage-layout {
  display: grid;
  gap: 18px;
}

.portal-focus-card {
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
}

.portal-focus-card .customer-card-head h2 {
  margin: 3px 0 4px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.portal-quote-total,
.portal-payment-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 18px;
  align-items: end;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}

.portal-quote-total > span,
.portal-payment-total > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-quote-total strong,
.portal-payment-total strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--ink);
  font-size: clamp(1.8rem, 6vw, 2.7rem);
}

.portal-quote-total small,
.portal-payment-total small {
  color: var(--muted);
}

.portal-primary-action {
  width: 100%;
  min-height: 54px;
}

.portal-line-items .line-item-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.portal-project-dates span {
  box-shadow: none;
}

.portal-progress p {
  margin: 0;
  color: var(--muted);
}

.portal-checklist,
.portal-updates {
  display: grid;
  gap: 10px;
}

.portal-checklist h3,
.portal-updates h3 {
  margin: 0 0 2px;
  font-size: 1rem;
}

.portal-checklist-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.portal-checklist-item i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #bdc9c6;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.portal-checklist-item.complete i {
  color: #176a43;
  border-color: #8bd0aa;
  background: #e9f8f0;
}

.portal-checklist-item.complete span {
  color: var(--muted);
  text-decoration: line-through;
}

.portal-updates > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.portal-updates span {
  color: var(--muted);
}

.portal-inline-details {
  border-top: 1px solid var(--line);
}

.portal-inline-details > summary,
.portal-history > summary,
.portal-question-panel > summary,
.portal-question-history > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  color: var(--brand-deep);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.portal-inline-details > summary::after,
.portal-history > summary::after,
.portal-question-panel > summary::after,
.portal-question-history > summary::after {
  content: "+";
  font-size: 1.3rem;
}

.portal-inline-details[open] > summary::after,
.portal-history[open] > summary::after,
.portal-question-panel[open] > summary::after,
.portal-question-history[open] > summary::after {
  content: "−";
}

.portal-inline-details > form,
.portal-question-panel > form {
  padding-top: 12px;
}

.supporting-quote .portal-approved-quote {
  display: grid;
  gap: 14px;
  padding-top: 8px;
}

.portal-supporting-section {
  display: grid;
  gap: 12px;
}

.portal-supporting-section > h2 {
  margin: 8px 0 0;
}

.portal-complete-state {
  padding: 32px 0;
  text-align: center;
}

.portal-complete-state > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  color: #176a43;
  background: #e9f8f0;
  font-size: 1.4rem;
  font-weight: 900;
}

.portal-complete-state h2,
.portal-complete-state p {
  margin: 4px 0;
}

.portal-complete-state p,
.portal-history summary small,
.portal-question-panel summary small,
.portal-question-history summary small {
  color: var(--muted);
}

.portal-history {
  border-block: 1px solid var(--line);
}

.portal-history > summary,
.portal-question-panel > summary,
.portal-question-history > summary {
  padding: 4px 2px;
}

.portal-history summary span,
.portal-question-panel summary span,
.portal-question-history summary span {
  display: grid;
  gap: 2px;
}

.portal-history-list,
.portal-question-history .question-list {
  display: grid;
  gap: 14px;
  padding: 14px 0;
}

.portal-question-panel,
.portal-question-history {
  padding: 18px 22px;
  border-radius: 8px;
}

@media (max-width: 640px) {
  .portal-stage-intro {
    padding-bottom: 14px;
  }

  .portal-stage-intro h1 {
    font-size: 2.05rem;
    white-space: nowrap;
  }

  .portal-stage-track span {
    gap: 5px;
    min-height: 46px;
    font-size: 0.7rem;
  }

  .portal-stage-track i {
    width: 21px;
    height: 21px;
  }

  .portal-focus-card {
    gap: 14px;
    padding: 18px;
  }

  .portal-focus-card .customer-card-head {
    display: grid;
  }

  .portal-focus-card .status-pill {
    width: max-content;
  }

  .portal-line-items .line-item-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 10px;
  }

  .portal-line-items .line-item-row span:nth-child(2) {
    grid-row: 2;
    font-size: 0.76rem;
  }

  .portal-line-items .line-item-row strong {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .portal-updates > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .portal-question-panel,
  .portal-question-history {
    padding: 14px 16px;
  }
}

.deposit-setup-intro,
.deposit-setup-shell {
  width: min(760px, 100%);
  margin-inline: auto;
}

.deposit-setup-shell {
  padding: 28px;
  border-radius: 8px;
}

.deposit-project-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 26px;
  border-block: 1px solid var(--line);
}

.deposit-project-summary > div {
  display: grid;
  gap: 4px;
  padding: 18px 4px;
}

.deposit-project-summary > div + div {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.deposit-project-summary span,
.deposit-send-summary small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.deposit-project-summary strong {
  font-size: 1.25rem;
}

.deposit-project-summary small {
  color: var(--muted);
}

.deposit-setup-form {
  display: grid;
  gap: 22px;
}

.deposit-lead-time {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.deposit-lead-time span {
  color: var(--muted);
  font-weight: 750;
}

.deposit-send-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.deposit-send-summary span {
  display: grid;
  gap: 5px;
  padding: 16px;
}

.deposit-send-summary span:nth-child(even) {
  border-left: 1px solid var(--line);
}

.deposit-send-summary span:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.deposit-send-summary strong {
  font-size: 1.15rem;
}

.deposit-send-button {
  min-height: 56px;
  width: 100%;
}

@media (max-width: 640px) {
  .deposit-setup-intro {
    display: grid;
    gap: 14px;
  }

  .deposit-setup-intro .button {
    width: max-content;
  }

  .deposit-setup-shell {
    padding: 20px 18px;
  }

  .deposit-project-summary,
  .deposit-setup-form .grid.two {
    grid-template-columns: 1fr;
  }

  .deposit-project-summary > div + div {
    padding-left: 4px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .deposit-send-summary {
    grid-template-columns: 1fr 1fr;
  }
}

.project-index-intro,
.project-index-layout {
  width: min(980px, 100%);
  margin-inline: auto;
}

.project-index-layout {
  display: grid;
  gap: 34px;
}

.project-index-section {
  display: grid;
  gap: 16px;
}

.project-index-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.project-index-heading h2,
.project-index-heading p {
  margin: 0;
}

.project-index-heading > span {
  color: var(--muted);
  font-weight: 800;
}

.project-index-list {
  display: grid;
  gap: 10px;
}

.project-index-row {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1fr) minmax(140px, 0.55fr) minmax(150px, auto) 20px;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-index-row:hover {
  border-color: rgba(0, 133, 138, 0.35);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.project-index-row.completed {
  background: rgba(248, 250, 249, 0.78);
}

.project-index-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0, 133, 138, 0.25);
  border-radius: 50%;
  background: #e5f4f3;
}

.project-index-mark::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-dark);
}

.project-index-mark.completed {
  color: #176a43;
  border-color: #9bd7b7;
  background: #e9f8f0;
  font-weight: 900;
}

.project-index-mark.completed::after {
  display: none;
}

.project-index-main,
.project-index-meta,
.project-index-status {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.project-index-main strong {
  overflow: hidden;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-index-main small,
.project-index-meta small,
.project-index-status > small {
  color: var(--muted);
}

.project-index-meta strong {
  font-size: 0.9rem;
}

.project-index-status {
  justify-items: start;
}

.project-index-arrow {
  color: #8b9693;
  font-size: 1.6rem;
}

.project-archive-button {
  width: max-content;
  margin-top: 2px;
}

@media (max-width: 700px) {
  .project-index-intro {
    padding-bottom: 12px;
  }

  .project-index-intro h1 {
    font-size: 2.45rem;
  }

  .project-index-layout {
    gap: 28px;
  }

  .project-index-heading {
    align-items: center;
  }

  .project-index-row {
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    gap: 8px 12px;
    padding: 15px 14px;
  }

  .project-index-mark {
    grid-row: 1 / 3;
    width: 36px;
    height: 36px;
  }

  .project-index-main {
    grid-column: 2;
  }

  .project-index-meta {
    grid-column: 2;
    grid-row: 2;
  }

  .project-index-meta small {
    display: none;
  }

  .project-index-meta strong {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
  }

  .project-index-status {
    grid-column: 2 / -1;
    grid-row: 3;
  }

  .project-index-arrow {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .project-archive-button {
    width: 100%;
  }
}
.portal-timing-choice {
  min-inline-size: 0;
  margin: 0 0 14px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portal-timing-choice legend {
  max-width: 100%;
  padding: 0 6px;
  font-size: 1rem;
  line-height: 1.35;
  white-space: normal;
}

.portal-timing-choice label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.25;
}

.portal-timing-choice input[type="radio"] {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  flex: 0 0 20px;
}

@media (max-width: 640px) {
  .portal-timing-choice {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .portal-timing-choice legend {
    font-size: 0.95rem;
  }

  .portal-timing-choice label {
    padding: 9px 10px;
  }
}

/* Customer beta portal: responsive and keyboard-safe critical actions. */
.role-customer,
.role-customer .app-shell,
.role-customer .main-shell,
.role-customer .page,
.role-customer .portal-stage-intro,
.role-customer .portal-stage-layout,
.role-customer .portal-focus-card,
.role-customer .portal-focus-card > *,
.customer-invite-card,
.customer-invite-card > * {
  min-width: 0;
  max-width: 100%;
}

.role-customer .portal-stage-intro h1,
.role-customer .portal-stage-intro > p,
.role-customer .customer-card-head h2,
.role-customer .customer-card-head span,
.role-customer .line-item-row > *,
.role-customer details summary span,
.customer-invite-card h1,
.customer-invite-card p {
  overflow-wrap: anywhere;
}

.role-customer .customer-card-head > div {
  min-width: 0;
}

.portal-choice-help {
  grid-column: 1 / -1;
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

.portal-timing-choice label {
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.portal-timing-choice label:has(input:checked) {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.portal-timing-choice label:has(input:focus-visible) {
  outline: 3px solid rgba(1, 124, 131, 0.2);
  outline-offset: 2px;
}

.role-customer details > summary:focus-visible,
.role-customer .button:focus-visible,
.customer-invite-card .button:focus-visible {
  outline: 3px solid rgba(1, 124, 131, 0.25);
  outline-offset: 3px;
}

[data-portal-submit][aria-busy="true"] {
  cursor: progress;
}

[data-portal-submit] button:disabled {
  cursor: progress;
  opacity: 0.68;
  transform: none !important;
}

.customer-invite-card .form-hint {
  margin: -9px 0 0;
}

@media (max-width: 640px) {
  .role-customer .portal-stage-intro h1 {
    font-size: clamp(1.75rem, 9vw, 2.05rem);
    line-height: 1.08;
    white-space: normal;
  }

  .role-customer .portal-stage-intro > p:not(.eyebrow) {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .role-customer .portal-focus-card {
    padding: 16px;
  }

  .role-customer .customer-card-head {
    gap: 9px;
  }

  .role-customer .portal-quote-total,
  .role-customer .portal-payment-total {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
  }

  .role-customer .portal-quote-total strong,
  .role-customer .portal-payment-total strong {
    max-width: 52vw;
    font-size: clamp(1.55rem, 9vw, 2.2rem);
    overflow-wrap: anywhere;
  }

  .role-customer .portal-line-items .line-item-row {
    padding: 11px 0;
  }

  .role-customer .portal-inline-details > summary,
  .role-customer .portal-history > summary,
  .role-customer .portal-question-panel > summary,
  .role-customer .portal-question-history > summary {
    min-width: 0;
    min-height: 48px;
  }

  .role-customer .portal-inline-details > summary::after,
  .role-customer .portal-history > summary::after,
  .role-customer .portal-question-panel > summary::after,
  .role-customer .portal-question-history > summary::after {
    flex: 0 0 auto;
  }

  .role-customer .portal-question-panel form .button,
  .role-customer .portal-inline-details form .button,
  .customer-invite-card .button {
    min-height: 48px;
    line-height: 1.25;
    white-space: normal;
  }

  .customer-invite-card {
    width: min(calc(100% - 16px), 520px);
    padding: 24px 18px;
  }

  .customer-invite-card h1 {
    font-size: clamp(1.65rem, 8.5vw, 2.2rem);
    line-height: 1.08;
  }
}

@media (max-width: 360px) {
  .role-customer .page {
    width: calc(100% - 12px);
  }

  .role-customer .portal-stage-track span {
    gap: 4px;
    font-size: 0.66rem;
  }

  .role-customer .portal-focus-card,
  .role-customer .portal-question-panel,
  .role-customer .portal-question-history {
    padding-right: 13px;
    padding-left: 13px;
  }

  .role-customer .portal-line-items .line-item-row {
    grid-template-columns: minmax(0, 1fr) minmax(64px, auto);
    gap: 5px 8px;
  }

  .role-customer .quote-image-grid {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }
}

/* 2026-09-25: close the owner tablet-shell gap between mobile and desktop. */
@media (min-width: 821px) and (max-width: 1080px) {
  :is(.role-owner, .role-manager).web-entry .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(.role-owner, .role-manager).web-entry .main-shell {
    width: 100%;
    min-width: 0;
  }

  :is(.role-owner, .role-manager).web-entry .page {
    width: min(calc(100% - 32px), 920px);
    padding-top: calc(96px + env(safe-area-inset-top));
  }

  :is(.role-owner, .role-manager).web-entry .mobile-nav :is(a, button) {
    color: #25343a;
  }

  :is(.role-owner, .role-manager).web-entry .mobile-nav :is(a.active, button.active) {
    color: #075f66;
  }
}

/* Reports use the owner dark palette at desktop and tablet widths. */
@media (min-width: 821px) {
  :is(.role-owner, .role-manager).web-entry.page-reports .summary-brief {
    border-color: rgba(104, 152, 168, 0.34);
    background:
      radial-gradient(circle at 8% 0%, rgba(104, 152, 168, 0.13), transparent 24rem),
      linear-gradient(145deg, rgba(24, 43, 50, 0.98), rgba(13, 25, 30, 0.98));
  }

  :is(.role-owner, .role-manager).web-entry.page-reports .period-tabs a {
    border-color: rgba(104, 152, 168, 0.34);
    background: var(--ios-panel);
    color: var(--ios-muted);
  }

  :is(.role-owner, .role-manager).web-entry.page-reports .period-tabs a.active {
    border-color: rgba(168, 210, 215, 0.72);
    background: var(--ios-panel-raised);
    color: var(--ios-ink);
  }

  :is(.role-owner, .role-manager).web-entry.page-reports .change-item {
    border-color: rgba(104, 152, 168, 0.28);
    background: rgba(7, 15, 19, 0.48);
  }

  :is(.role-owner, .role-manager).web-entry.page-reports .change-item span,
  :is(.role-owner, .role-manager).web-entry.page-reports .change-item p {
    color: var(--ios-muted);
  }

  :is(.role-owner, .role-manager).web-entry.page-reports .change-item strong {
    color: var(--ios-ink);
  }
}

/* Keep the remaining owner desktop screens in the same native-inspired shell. */
@media (min-width: 821px) {
  :is(.role-owner, .role-manager).web-entry .page :is(
    .panel, .form-shell, .focus-section, .workflow-stage-strip, .metric-card,
    .control-card, .request-card, .customer-record-card, .employee-card,
    .customer-project-card, .customer-invoice-card, .schedule-job-card,
    .week-day-card, .report-tile, .project-money-overview, .project-next-move,
    .project-destination-grid > a, .business-flow-card, .workflow-guardrail
  ) {
    border-color: rgba(104, 152, 168, 0.3);
    background: linear-gradient(145deg, rgba(24, 43, 50, 0.98), rgba(17, 31, 37, 0.98));
    color: var(--ios-ink);
    box-shadow: var(--ios-shadow);
  }

  :is(.role-owner, .role-manager).web-entry .workflow-stage-strip {
    overflow: hidden;
  }

  :is(.role-owner, .role-manager).web-entry .workflow-stage-strip a {
    border-color: rgba(104, 152, 168, 0.18);
    background: transparent;
    color: var(--ios-ink);
  }

  :is(.role-owner, .role-manager).web-entry .page :is(
    .work-focus-row, .work-job-card, .empty-state, .action-row, .checkbox-card,
    .financial-grid > div, .customer-detail-grid span, .invoice-summary-grid span,
    .invoice-send-summary span, .project-invoice-links a, .project-activity-row
  ) {
    border-color: rgba(104, 152, 168, 0.24);
    background: rgba(7, 15, 19, 0.38);
    color: var(--ios-ink);
    box-shadow: none;
  }

  :is(.role-owner, .role-manager).web-entry .page :is(
    h1, h2, h3, h4, strong, label, legend, th, dt
  ) { color: var(--ios-ink); }

  :is(.role-owner, .role-manager).web-entry .page :is(
    p, small, span, td, dd, .muted, .work-job-progress
  ) { border-color: rgba(104, 152, 168, 0.18); }

  :is(.role-owner, .role-manager).web-entry .page :is(
    .muted, .work-focus-row small, .work-job-card p, .empty-state span,
    .panel-head span, .project-next-move em
  ) { color: var(--ios-muted); }

  :is(.role-owner, .role-manager).web-entry .page :is(input, select, textarea) {
    border-color: rgba(104, 152, 168, 0.48);
    background: rgba(7, 15, 19, 0.72);
    color: var(--ios-ink);
  }

  :is(.role-owner, .role-manager).web-entry .page :is(input, textarea)::placeholder {
    color: rgba(152, 200, 200, 0.58);
  }

  :is(.role-owner, .role-manager).web-entry .page table {
    border-color: rgba(104, 152, 168, 0.22);
    background: var(--ios-panel);
    color: var(--ios-ink);
  }

  :is(.role-owner, .role-manager).web-entry .page :is(th, td) {
    border-color: rgba(104, 152, 168, 0.16);
  }

  :is(.role-owner, .role-manager).web-entry .page .button {
    border-color: transparent;
    background: linear-gradient(110deg, #d9edef, #8eb9c1);
    color: #071116;
    box-shadow: 0 12px 28px rgba(104, 152, 168, 0.15);
  }

  :is(.role-owner, .role-manager).web-entry .page .button.secondary {
    border-color: rgba(104, 152, 168, 0.42);
    background: var(--ios-panel-raised);
    color: var(--ios-ink);
  }

  :is(.role-owner, .role-manager).web-entry :is(.shell-create-trigger, .ios-create-request),
  :is(.role-owner, .role-manager).web-entry :is(.shell-create-trigger, .ios-create-request) :is(strong, small, span, i) {
    color: #071116 !important;
  }

  :is(.role-owner, .role-manager).web-entry .page :is(
    .workflow-stage-strip span, .request-board-action em, .request-board-action b,
    .section-kicker, .section-heading > a, .work-job-head .status-pill
  ) { color: var(--ios-muted); }
}

@media (max-width: 820px) {
  :is(.role-owner, .role-manager).web-entry.page-dashboard {
    color-scheme: dark;
    --ios-bg: #070f13;
    --ios-panel: #142228;
    --ios-panel-raised: #182b32;
    --ios-ink: #e6f2f3;
    --ios-muted: #98c8c8;
    --ios-line: #6898a8;
    --text-primary: var(--ios-ink);
    --text-secondary: var(--ios-muted);
    --ink: var(--ios-ink);
    --muted: var(--ios-muted);
    --line: rgba(104, 152, 168, 0.3);
    background: var(--ios-bg);
    color: var(--ios-ink);
  }

  :is(.role-owner, .role-manager).web-entry.page-dashboard .app-shell,
  :is(.role-owner, .role-manager).web-entry.page-dashboard .main-shell {
    background: var(--ios-bg);
  }

  :is(.role-owner, .role-manager).web-entry.page-dashboard .page {
    width: min(100% - 28px, 720px);
    padding-top: 20px;
  }

  .ios-desktop-home,
  .ios-desktop-primary,
  .ios-desktop-rail { display: grid; gap: 16px; }
  .ios-desktop-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(104, 152, 168, 0.2); }
  .ios-desktop-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .ios-desktop-brand img { width: 104px; max-height: 38px; object-fit: contain; filter: brightness(0) invert(92%) sepia(14%) saturate(467%) hue-rotate(137deg) brightness(104%); }
  .ios-desktop-brand span,
  .ios-desktop-business span { color: var(--ios-muted); font-size: 0.58rem; font-weight: 760; letter-spacing: 0.07em; text-transform: uppercase; }
  .ios-desktop-business { display: grid; gap: 2px; min-width: 0; text-align: right; }
  .ios-desktop-business strong { overflow: hidden; color: var(--ios-ink); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
  .ios-desktop-layout { display: grid; gap: 18px; }
  .ios-desktop-kicker { margin: 0 0 6px; color: var(--ios-muted); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
  .ios-desktop-greeting h1 { margin: 0; color: var(--ios-ink); font-size: clamp(2rem, 11vw, 3.2rem); line-height: 1; letter-spacing: -0.045em; }
  .ios-desktop-greeting > p:last-child { margin: 8px 0 0; color: var(--ios-muted); }

  .ios-create-request,
  .ios-question-alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border-radius: 17px; }
  .ios-question-alert { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .ios-create-request { background: linear-gradient(110deg, #e0f0f1, #8eb9c1); color: #071116; }
  .ios-create-request :is(strong, small, span, i) { color: #071116; }
  .ios-question-alert { border: 1px solid rgba(104, 152, 168, 0.52); background: var(--ios-panel); color: var(--ios-ink); }
  .ios-create-request strong,
  .ios-question-alert strong,
  .ios-create-request small,
  .ios-question-alert small { display: block; }
  .ios-create-request small,
  .ios-question-alert small { margin-top: 3px; font-size: 0.72rem; opacity: 0.75; }
  .ios-create-icon,
  .ios-alert-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid currentColor; border-radius: 50%; font-size: 1.2rem; font-weight: 800; }
  .ios-create-request i,
  .ios-question-alert i { font-size: 1.4rem; font-style: normal; }
  .ios-question-alert b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ios-ink); color: var(--ios-bg); }

  .ios-workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
  .ios-workspace-heading h2 { margin: 0; color: var(--ios-ink); font-size: 1.25rem; }
  .ios-workspace-heading a,
  .ios-rail-heading a { color: var(--ios-muted); font-size: 0.72rem; font-weight: 760; }
  .ios-workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ios-work-card { display: grid; align-content: start; min-height: 132px; padding: 15px; border: 1px solid rgba(104, 152, 168, 0.34); border-radius: 17px; background: var(--ios-panel); color: var(--ios-ink); }
  .ios-work-card-wide { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-height: 100px; gap: 12px; }
  .ios-card-icon { color: var(--ios-muted); font-weight: 800; }
  .ios-work-card > strong,
  .ios-work-card > span > strong { margin-top: 10px; color: var(--ios-ink); font-size: 1.65rem; line-height: 1; }
  .ios-work-card-wide > span > strong { display: block; margin-top: 0; }
  .ios-work-card h3 { margin: 10px 0 0; color: var(--ios-ink); font-size: 0.82rem; }
  .ios-work-card-wide h3 { margin-top: 5px; }
  .ios-work-card p { margin: 4px 0 0; color: var(--ios-muted); font-size: 0.68rem; line-height: 1.35; }
  .ios-work-card > i { color: var(--ios-muted); font-size: 1.4rem; font-style: normal; }
  .ios-income-card small { color: var(--ios-muted); font-size: 0.68rem; }

  .ios-rail-panel { padding: 16px; border: 1px solid rgba(104, 152, 168, 0.3); border-radius: 17px; background: var(--ios-panel); color: var(--ios-ink); }
  .ios-rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
  .ios-rail-heading > span { color: var(--ios-ink); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
  .ios-rail-heading > b { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 50px; background: var(--ios-ink); color: var(--ios-bg); }
  .ios-next-action { display: grid; gap: 5px; padding: 14px; border: 1px solid rgba(104, 152, 168, 0.36); border-radius: 14px; background: var(--ios-panel-raised); color: var(--ios-ink); }
  .ios-next-action small,
  .ios-next-action p,
  .ios-next-action > span { color: var(--ios-muted); }
  .ios-next-action p { margin: 0; font-size: 0.75rem; line-height: 1.4; }
  .ios-action-list,
  .ios-today-list { display: grid; }
  .ios-action-list a,
  .ios-today-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 2px; border-bottom: 1px solid rgba(104, 152, 168, 0.15); color: var(--ios-ink); }
  .ios-action-list :is(strong, small),
  .ios-today-list :is(strong, small, em) { display: block; }
  .ios-action-list small,
  .ios-today-list small,
  .ios-today-list em { margin-top: 3px; color: var(--ios-muted); font-size: 0.67rem; font-style: normal; }
  .ios-clear-state { display: grid; justify-items: center; gap: 6px; padding: 12px; text-align: center; }
  .ios-clear-state p { margin: 0; color: var(--ios-muted); font-size: 0.72rem; }
  .ios-cash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .ios-cash-grid > div { min-width: 0; padding: 10px 8px; border-radius: 12px; background: rgba(7, 15, 19, 0.5); }
  .ios-cash-grid span,
  .ios-cash-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; }
  .ios-cash-grid span { color: var(--ios-muted); font-size: 0.56rem; text-transform: uppercase; }
  .ios-cash-grid strong { margin-top: 4px; color: var(--ios-ink); font-size: 0.76rem; }

  :is(.role-owner, .role-manager).web-entry.page-dashboard .mobile-nav :is(a, button) {
    color: #25343a;
  }

  :is(.role-owner, .role-manager).web-entry.page-dashboard .mobile-nav :is(a.active, button.active) {
    color: #075f66;
  }
}

/* 2026-09-25: website-wide alignment and responsive spacing audit. */
.web-entry .page,
.web-entry .page > *,
.web-entry .page :is(
  .dashboard-hero, .project-header, .page-intro, .section-heading, .panel-head,
  .header-actions, .report-header-actions, .calendar-nav, .employee-card-actions,
  .customer-record-actions, .modal-actions, .grid, .split, .metric-grid,
  .report-value-grid, .control-grid, .business-table, .business-row
) {
  min-inline-size: 0;
}

.web-entry .page :is(
  h1, h2, h3, h4, p, label, legend, small,
  .customer-record-main, .employee-card-main, .customer-card-head
) {
  overflow-wrap: anywhere;
}

.web-entry .page :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  width: 100%;
  max-width: 100%;
}

.web-entry .page :is(
  .header-actions, .report-header-actions, .calendar-nav,
  .employee-card-actions, .customer-record-actions, .modal-actions
) {
  flex-wrap: wrap;
}

.web-entry.page-reports .period-tabs {
  margin: 0;
}

.web-entry .progress-track > span {
  max-width: 100%;
}

.web-entry.page-reports .dashboard-hero {
  align-items: end;
}

.web-entry.page-reports .dashboard-hero .muted {
  margin-top: 8px;
}

@media (min-width: 821px) and (max-width: 1180px) {
  .web-entry .page {
    width: min(100% - 48px, 1180px);
    padding-top: 34px;
  }

  .web-entry .page :is(.dashboard-hero, .project-header, .page-intro) {
    gap: 18px;
  }

  .web-entry .page :is(.panel, .form-shell, .summary-brief, .intelligence-card) {
    padding-right: clamp(20px, 3vw, 28px);
    padding-left: clamp(20px, 3vw, 28px);
  }
}

@media (min-width: 821px) {
  :is(.role-owner, .role-manager).web-entry .page {
    display: grid;
    gap: var(--page-section-gap, 24px);
  }
}

@media (max-width: 820px) {
  .web-entry .page {
    width: min(100% - 28px, 760px);
  }

  .web-entry .page :is(
    .dashboard-hero, .project-header, .page-intro, .section-heading, .panel-head
  ) {
    flex-wrap: wrap;
  }

  .web-entry .page :is(
    .dashboard-hero, .project-header, .page-intro
  ) > :is(.header-actions, .report-header-actions, .calendar-nav) {
    width: 100%;
  }

  .web-entry .page :is(.report-value-grid, .split, .control-grid) {
    gap: 16px;
  }

  .web-entry.page-reports .dashboard-hero {
    align-items: start;
  }
}

@media (max-width: 640px) {
  .web-entry .page {
    --page-section-gap: 18px;
    width: min(100% - 24px, 560px);
  }

  .web-entry .page :is(
    .dashboard-hero, .project-header, .page-intro, .section-heading
  ) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .web-entry .page :is(
    .panel, .form-shell, .summary-brief, .intelligence-card,
    .customer-record-card, .employee-card, .request-card,
    .customer-project-card, .customer-invoice-card
  ) {
    padding-right: clamp(14px, 4.8vw, 20px);
    padding-left: clamp(14px, 4.8vw, 20px);
  }

  .web-entry .page :is(
    .header-actions, .report-header-actions, .calendar-nav,
    .employee-card-actions, .customer-record-actions, .modal-actions
  ) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 10px;
  }

  .web-entry .page :is(
    .header-actions, .report-header-actions, .calendar-nav,
    .employee-card-actions, .customer-record-actions, .modal-actions
  ) > :is(a, button, form),
  .web-entry .page :is(
    .header-actions, .report-header-actions, .calendar-nav,
    .employee-card-actions, .customer-record-actions, .modal-actions
  ) > form > button {
    width: 100%;
    min-width: 0;
  }

  .web-entry.page-reports .period-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .web-entry.page-reports .period-tabs a {
    min-width: 0;
    padding-inline: 10px;
  }

  .web-entry .customer-card-head,
  .web-entry .employee-card-main {
    align-items: start;
    gap: 10px;
  }
}

@media (max-width: 360px) {
  .web-entry .page {
    width: calc(100% - 16px);
  }

  .web-entry.page-reports .period-tabs {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Run Four — Fresh & Minimal semantic design system. */
:root {
  --brand-primary: #2dd4bf;
  --brand-primary-pressed: #14b8a6;
  --brand-primary-subtle: #ccfbf1;
  --ds-background: #f1f5f9;
  --ds-surface: #ffffff;
  --ds-surface-elevated: #ffffff;
  --ds-surface-subtle: #f8fafc;
  --ds-input-background: #ffffff;
  --ds-border: #cbd5e1;
  --ds-border-strong: #94a3b8;
  --ds-text-primary: #0f172a;
  --ds-text-secondary: #475569;
  --ds-text-muted: #64748b;
  --ds-action-primary: var(--brand-primary);
  --ds-action-secondary: #e2e8f0;
  --ds-selected: var(--brand-primary-subtle);
  --ds-focus: #0f766e;
  --ds-success: #15803d;
  --ds-success-subtle: #dcfce7;
  --ds-warning: #b45309;
  --ds-warning-subtle: #fef3c7;
  --ds-error: #dc2626;
  --ds-error-subtle: #fee2e2;
  --ds-info: #2563eb;
  --ds-info-subtle: #dbeafe;
  --accent-primary: var(--brand-primary);
  --accent-light: var(--brand-primary);
  --accent-dark: var(--ds-focus);
  --accent-soft: var(--brand-primary-subtle);
  --success: var(--ds-success);
  --warning: var(--ds-warning);
  --danger: var(--ds-error);
}

.web-entry {
  background: var(--ds-background);
  color: var(--ds-text-primary);
}

.web-entry :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--ds-focus);
  outline-offset: 3px;
}

.web-entry .page :is(.button, button[type="submit"]),
.web-entry .auth-page :is(.button, button[type="submit"]) {
  border-color: transparent;
  background: var(--ds-action-primary);
  color: var(--ds-text-primary);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-primary-pressed) 22%, transparent);
}

.web-entry .page :is(.button, button[type="submit"]):hover,
.web-entry .auth-page :is(.button, button[type="submit"]):hover {
  background: var(--brand-primary-pressed);
}

.web-entry .page .button.secondary,
.web-entry .auth-page .button.secondary {
  border-color: var(--ds-border);
  background: var(--ds-action-secondary);
  color: var(--ds-text-primary);
  box-shadow: none;
}

.web-entry .page :is(.button.danger-button, button.danger-button) {
  border-color: color-mix(in srgb, var(--ds-error) 32%, transparent);
  background: var(--ds-error-subtle);
  color: var(--ds-error);
  box-shadow: none;
}

.web-entry .notice {
  border-color: color-mix(in srgb, var(--ds-info) 30%, transparent);
  background: var(--ds-info-subtle);
  color: var(--ds-info);
}

.web-entry .notice.success {
  border-color: color-mix(in srgb, var(--ds-success) 32%, transparent);
  background: var(--ds-success-subtle);
  color: var(--ds-success);
}

.web-entry :is(.notice.warning) {
  border-color: color-mix(in srgb, var(--ds-warning) 30%, transparent);
  background: var(--ds-warning-subtle);
  color: var(--ds-warning);
}

.web-entry :is(.notice.error, .error-card, .native-error) {
  border-color: color-mix(in srgb, var(--ds-error) 35%, transparent);
  background: var(--ds-error-subtle);
  color: var(--ds-error);
}

.web-entry .status-pill {
  border-color: var(--ds-border);
  background: var(--ds-action-secondary);
  color: var(--ds-text-secondary);
  box-shadow: none;
}

.web-entry .status-pill:is(.active, .in_progress, .ready_to_send, .clocked_in) {
  border-color: color-mix(in srgb, var(--brand-primary-pressed) 32%, transparent);
  background: var(--brand-primary-subtle);
  color: #0f766e;
}

.web-entry .status-pill:is(
  .ready, .approved, .paid, .past_ready, .completed, .past, .invoiced,
  .closed, .acquired
) {
  border-color: color-mix(in srgb, var(--ds-success) 28%, transparent);
  background: var(--ds-success-subtle);
  color: var(--ds-success);
}

.web-entry .status-pill:is(
  .revision_requested, .needs_follow_up, .partial, .expired, .work_done,
  .send_deposit_invoice, .send_final_invoice, .needed, .open
) {
  border-color: color-mix(in srgb, var(--ds-warning) 30%, transparent);
  background: var(--ds-warning-subtle);
  color: var(--ds-warning);
}

.web-entry .status-pill:is(.overdue, .declined, .failed, .rejected) {
  border-color: color-mix(in srgb, var(--ds-error) 28%, transparent);
  background: var(--ds-error-subtle);
  color: var(--ds-error);
}

.web-entry .status-pill:is(
  .new, .quote_needed, .quote_sent, .sent, .viewed, .scheduled,
  .ready_for_start, .invited, .payment_pending, .waiting_for_deposit,
  .answered
) {
  border-color: color-mix(in srgb, var(--ds-info) 25%, transparent);
  background: var(--ds-info-subtle);
  color: var(--ds-info);
}

.web-entry .status-pill:is(
  .draft, .quote_draft, .converted, .cancelled, .inactive, .not_invited,
  .archived, .deposit, .final_payment, .full_payment
) {
  border-color: var(--ds-border);
  background: var(--ds-action-secondary);
  color: var(--ds-text-secondary);
}

.role-employee.web-entry,
.role-customer.web-entry,
.role-platform_admin.web-entry {
  --bg: var(--ds-background);
  --surface: var(--ds-surface);
  --surface-soft: var(--ds-surface-subtle);
  --ink: var(--ds-text-primary);
  --muted: var(--ds-text-secondary);
  --line: var(--ds-border);
  background: var(--ds-background);
}

/* Crew tools share the focused dark workspace used by owners. */
.role-employee.web-entry {
  --ds-background: #0f172a;
  --ds-surface: #1e293b;
  --ds-surface-elevated: #263449;
  --ds-surface-subtle: #172033;
  --ds-input-background: #111827;
  --ds-border: #334155;
  --ds-border-strong: #64748b;
  --ds-text-primary: #f8fafc;
  --ds-text-secondary: #cbd5e1;
  --ds-text-muted: #94a3b8;
  --ds-action-secondary: #334155;
  --bg: var(--ds-background);
  --surface: var(--ds-surface);
  --surface-soft: var(--ds-surface-subtle);
  --ink: var(--ds-text-primary);
  --muted: var(--ds-text-secondary);
  --line: var(--ds-border);
  color: var(--ds-text-primary);
}

.role-employee.web-entry :is(.app-shell, .main-shell, .page) { background: var(--ds-background); }
.role-employee.web-entry :is(.sidebar, .panel, .form-shell, .clockout-modal, .week-day-card) {
  border-color: var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text-primary);
}
.role-employee.web-entry :is(h1, h2, h3, strong, label, legend) { color: var(--ds-text-primary); }
.role-employee.web-entry :is(input, select, textarea) {
  border-color: var(--ds-border-strong);
  background: var(--ds-input-background);
  color: var(--ds-text-primary);
}

:is(.role-employee, .role-customer, .role-platform_admin).web-entry :is(.sidebar, .panel, .form-shell) {
  border-color: var(--ds-border);
  background: var(--ds-surface);
}

@media (min-width: 821px) {
  :is(.role-owner, .role-manager).web-entry {
    --ds-background: #0f172a;
    --ds-surface: #1e293b;
    --ds-surface-elevated: #263449;
    --ds-surface-subtle: #172033;
    --ds-input-background: #111827;
    --ds-border: #334155;
    --ds-border-strong: #64748b;
    --ds-text-primary: #f8fafc;
    --ds-text-secondary: #cbd5e1;
    --ds-text-muted: #94a3b8;
    --ds-focus: #5eead4;
    --ds-success: #4ade80;
    --ds-success-subtle: #14532d;
    --ds-warning: #fbbf24;
    --ds-warning-subtle: #451a03;
    --ds-error: #f87171;
    --ds-error-subtle: #450a0a;
    --ds-info: #60a5fa;
    --ds-info-subtle: #172554;
    --ds-action-secondary: #334155;
    --ds-selected: color-mix(in srgb, var(--brand-primary) 15%, var(--ds-surface));
    --ios-bg: var(--ds-background);
    --ios-panel: var(--ds-surface);
    --ios-panel-raised: var(--ds-surface-elevated);
    --ios-ink: var(--ds-text-primary);
    --ios-muted: var(--ds-text-muted);
    --ios-line: var(--ds-border);
    --ios-bright: var(--brand-primary);
    --text-primary: var(--ds-text-primary);
    --text-secondary: var(--ds-text-secondary);
    --ink: var(--ds-text-primary);
    --muted: var(--ds-text-muted);
    --line: var(--ds-border);
    background: var(--ds-background);
  }

  :is(.role-owner, .role-manager).web-entry .app-shell {
    background: var(--ds-background);
  }

  :is(.role-owner, .role-manager).web-entry .sidebar {
    border-color: var(--ds-border);
    background: #111827;
    box-shadow: 12px 0 32px rgba(2, 6, 23, 0.24);
  }

  :is(.role-owner, .role-manager).web-entry .shell-create-trigger,
  :is(.role-owner, .role-manager).web-entry .ios-create-request {
    border-color: transparent;
    background: var(--brand-primary);
    color: #0f172a;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--brand-primary-pressed) 18%, transparent);
  }

  :is(.role-owner, .role-manager).web-entry .side-nav :is(a.active, summary.active) {
    border-color: color-mix(in srgb, var(--brand-primary) 38%, transparent);
    background: var(--ds-selected);
    color: var(--ds-text-primary);
    box-shadow: inset 3px 0 0 var(--brand-primary);
  }

  :is(.role-owner, .role-manager).web-entry .page :is(
    .panel, .form-shell, .focus-section, .workflow-stage-strip, .metric-card,
    .control-card, .request-card, .customer-record-card, .employee-card,
    .customer-project-card, .customer-invoice-card, .schedule-job-card,
    .week-day-card, .report-tile, .project-money-overview, .project-next-move,
    .project-destination-grid > a, .business-flow-card, .workflow-guardrail,
    .ios-work-card, .ios-rail-panel
  ) {
    border-color: var(--ds-border);
    background: var(--ds-surface);
    color: var(--ds-text-primary);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.2);
  }

  :is(.role-owner, .role-manager).web-entry .page :is(
    .work-focus-row, .work-job-card, .empty-state, .action-row, .checkbox-card,
    .financial-grid > div, .customer-detail-grid span, .invoice-summary-grid span,
    .invoice-send-summary span, .project-invoice-links a, .project-activity-row,
    .change-item, .owner-action, .ios-cash-grid > div, .ios-next-action
  ) {
    border-color: var(--ds-border);
    background: var(--ds-surface-subtle);
    color: var(--ds-text-primary);
  }

  :is(.role-owner, .role-manager).web-entry .page :is(
    h1, h2, h3, h4, strong, label, legend, th, dt
  ) {
    color: var(--ds-text-primary);
  }

  :is(.role-owner, .role-manager).web-entry .page :is(
    p, small, td, dd, .muted, .panel-head span, .work-job-progress,
    .work-focus-row small, .work-job-card p, .empty-state span,
    .project-next-move em, .ios-work-card p, .ios-income-card small
  ) {
    color: var(--ds-text-muted);
  }

  :is(.role-owner, .role-manager).web-entry .page :is(input, select, textarea) {
    border-color: var(--ds-border-strong);
    background: var(--ds-input-background);
    color: var(--ds-text-primary);
  }

  :is(.role-owner, .role-manager).web-entry .page :is(input, textarea)::placeholder {
    color: var(--ds-text-muted);
    opacity: 0.82;
  }

  :is(.role-owner, .role-manager).web-entry .page table {
    border-color: var(--ds-border);
    background: var(--ds-surface);
    color: var(--ds-text-primary);
  }

  :is(.role-owner, .role-manager).web-entry .page .button {
    border-color: transparent;
    background: var(--ds-action-primary);
    color: #0f172a;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-primary-pressed) 20%, transparent);
  }

  :is(.role-owner, .role-manager).web-entry .page .button.secondary {
    border-color: var(--ds-border-strong);
    background: var(--ds-action-secondary);
    color: var(--ds-text-primary);
    box-shadow: none;
  }

  :is(.role-owner, .role-manager).web-entry .page :is(.button.danger-button, button.danger-button) {
    border-color: color-mix(in srgb, var(--ds-error) 45%, transparent);
    background: color-mix(in srgb, var(--ds-error) 14%, var(--ds-surface));
    color: #fca5a5;
  }

  :is(.role-owner, .role-manager).web-entry .page .action-menu-panel button {
    min-height: 0;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--ds-text-primary);
    box-shadow: none;
  }

  :is(.role-owner, .role-manager).web-entry .page .action-menu-panel form:last-child button,
  :is(.role-owner, .role-manager).web-entry .page .icon-text-button.danger-text {
    background: transparent;
    color: var(--ds-error);
    box-shadow: none;
  }

  :is(.role-owner, .role-manager).web-entry .ios-work-card::after {
    display: none;
  }

  :is(.role-owner, .role-manager).web-entry.page-reports .summary-brief {
    border-color: var(--ds-border);
    background: var(--ds-surface);
  }

  :is(.role-owner, .role-manager).web-entry.page-reports .period-tabs a {
    border-color: var(--ds-border);
    background: var(--ds-surface);
    color: var(--ds-text-secondary);
  }

  :is(.role-owner, .role-manager).web-entry.page-reports .period-tabs a.active {
    border-color: var(--brand-primary);
    background: var(--ds-selected);
    color: var(--ds-text-primary);
  }

  :is(.role-owner, .role-manager).web-entry .status-pill.dynamic-status {
    box-shadow: none;
  }
}

@media (max-width: 820px) {
  :is(.role-owner, .role-manager).web-entry.page-dashboard {
    --ios-bg: #0f172a;
    --ios-panel: #1e293b;
    --ios-panel-raised: #263449;
    --ios-ink: #f8fafc;
    --ios-muted: #94a3b8;
    --ios-line: #334155;
    --accent-primary: var(--brand-primary);
    --accent-dark: var(--brand-primary-pressed);
    background: var(--ios-bg);
  }

  :is(.role-owner, .role-manager).web-entry.page-dashboard :is(.ios-work-card, .ios-rail-panel) {
    border-color: var(--ios-line);
    background: var(--ios-panel);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.18);
  }

  :is(.role-owner, .role-manager).web-entry.page-dashboard .ios-work-card::after {
    display: none;
  }

  :is(.role-owner, .role-manager).web-entry.page-dashboard .ios-create-request {
    background: var(--brand-primary);
    color: #0f172a;
  }
}

@media (min-width: 821px) and (max-width: 1280px) {
  :is(.role-owner, .role-manager).web-entry .app-shell { grid-template-columns: 214px minmax(0, 1fr); }
  :is(.role-owner, .role-manager).web-entry .page { width: min(100% - 36px, 1040px); }
  .ios-desktop-layout { grid-template-columns: 1fr; }
  .ios-desktop-rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ios-next-panel { grid-row: span 2; }
}

/* Keep tablet-sized owner layouts in the compact navigation mode. This guard
   must remain after the broader 821–1280 desktop-density rule above. */
@media (min-width: 821px) and (max-width: 1080px) {
  :is(.role-owner, .role-manager).web-entry .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(.role-owner, .role-manager).web-entry .main-shell {
    width: 100%;
    min-width: 0;
  }

  :is(.role-owner, .role-manager).web-entry .page {
    width: min(calc(100% - 32px), 920px);
    padding-top: calc(96px + env(safe-area-inset-top));
  }
}

.web-entry :is(button, .button, input, select, textarea):disabled,
.web-entry [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.web-entry :is(.employee-tab-nav, .checklist-job-tabs) {
  border-color: var(--ds-border);
  background: var(--ds-surface);
  box-shadow: none;
}

.web-entry :is(.employee-tab, .checklist-job-tab) {
  border-color: transparent;
  background: transparent;
  color: var(--ds-text-secondary);
}

.web-entry :is(.employee-tab.active, .checklist-job-tab.active) {
  border-color: color-mix(in srgb, var(--brand-primary-pressed) 30%, transparent);
  background: var(--brand-primary-subtle);
  color: #0f766e;
}

/* Reports use semantic neutral surfaces at every viewport, including phones. */
:is(.role-owner, .role-manager).web-entry:is(.page-reports, .page-insights) .summary-brief,
:is(.role-owner, .role-manager).web-entry:is(.page-reports, .page-insights) .owner-action,
:is(.role-owner, .role-manager).web-entry:is(.page-reports, .page-insights) .report-tile,
:is(.role-owner, .role-manager).web-entry .intelligent-report-header {
  border-color: var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text-primary);
}

:is(.role-owner, .role-manager).web-entry:is(.page-reports, .page-insights) :is(.summary-brief, .owner-action) :is(p, small),
:is(.role-owner, .role-manager).web-entry .intelligent-report-header :is(p, small) {
  color: var(--ds-text-secondary);
}

:is(.role-owner, .role-manager).web-entry:is(.page-reports, .page-insights) .owner-action > span {
  color: var(--ds-info);
}

:is(.role-owner, .role-manager).web-entry:is(.page-reports, .page-insights) .period-tabs a {
  border-color: var(--ds-border);
  background: var(--ds-action-secondary);
  color: var(--ds-text-secondary);
}

:is(.role-owner, .role-manager).web-entry:is(.page-reports, .page-insights) .period-tabs a.active {
  border-color: var(--brand-primary-pressed);
  background: var(--brand-primary-subtle);
  color: #0f766e;
}

.role-employee.web-entry .panel.intelligence-card.employee-clock-card {
  border-color: var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text-primary);
  box-shadow: none;
}

.role-employee.web-entry .employee-clock-card :is(h2, p, label, .insight-label) {
  color: var(--ds-text-primary);
}

.role-employee.web-entry .employee-clock-card p {
  color: var(--ds-text-secondary);
}

.role-employee.web-entry .employee-progress-intro { margin-bottom: 18px; }
.role-employee.web-entry .employee-tab-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.role-employee.web-entry .employee-tab { min-width: 0; }
.role-employee.web-entry .employee-progress-intro h2 { margin: 4px 0 6px; color: var(--ds-text-primary); }
.role-employee.web-entry .employee-progress-intro p:last-child { margin: 0; color: var(--ds-text-secondary); }
.role-employee.web-entry .employee-progress-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px;
}
.role-employee.web-entry .employee-progress-metrics article {
  display: grid; gap: 6px; padding: 18px; border: 1px solid var(--ds-border);
  border-radius: 18px; background: var(--ds-surface);
}
.role-employee.web-entry .employee-progress-metrics strong { color: var(--ds-text-primary); font-size: clamp(1.5rem, 3vw, 2.2rem); }
.role-employee.web-entry .employee-progress-metrics span { color: var(--ds-text-secondary); line-height: 1.35; }
.employee-milestone-list, .employee-contribution-list { display: grid; gap: 10px; }
.employee-milestone-row, .employee-contribution-list article, .employee-shared-notices article {
  display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--ds-border);
}
.employee-milestone-row:first-child, .employee-contribution-list article:first-child { border-top: 0; }
.employee-milestone-row > div, .employee-contribution-list article > span, .employee-shared-notices article > span { display: grid; gap: 3px; flex: 1; }
.employee-milestone-row p, .employee-contribution-list small, .employee-shared-notices small { margin: 0; color: var(--ds-text-secondary); }
.employee-milestone-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-primary-subtle); color: var(--brand-primary); }
.employee-progress-note { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--ds-border); color: var(--ds-text-muted); font-size: .88rem; }
.employee-shared-notices { padding: 16px 18px; border: 1px solid var(--ds-border); border-radius: 18px; background: var(--ds-surface); }
.employee-shared-notices h2 { margin: 2px 0 6px; font-size: 1.15rem; }
.employee-shared-notices article form { margin: 0; }

@media (max-width: 640px) {
  .role-employee.web-entry .employee-progress-metrics { grid-template-columns: 1fr; }
  .employee-milestone-row { align-items: flex-start; flex-wrap: wrap; }
  .employee-milestone-row form { width: 100%; }
  .employee-milestone-row .button { width: 100%; }
}

.role-customer.web-entry .portal-stage-track .active i {
  border-color: var(--brand-primary-pressed);
  background: var(--brand-primary);
  color: #0f172a;
}

/* Schedule calendar: keep every label and job readable on the semantic
   surface selected by the current light or dark workspace theme. */
.web-entry .schedule-calendar-panel .month-calendar {
  border-color: var(--ds-border);
  background: var(--ds-surface);
  box-shadow: none;
}

.web-entry .schedule-calendar-panel .calendar-weekday {
  border-color: var(--ds-border);
  background: var(--ds-surface-elevated);
  color: var(--ds-text-secondary);
}

.web-entry .schedule-calendar-panel .calendar-day {
  border-color: var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text-primary);
}

.web-entry .schedule-calendar-panel .calendar-day.outside-month {
  background: var(--ds-surface-subtle);
  color: var(--ds-text-muted);
}

.web-entry .schedule-calendar-panel .calendar-day.today {
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--ds-surface));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand-primary) 45%, transparent);
}

.web-entry .schedule-calendar-panel .calendar-day-number {
  color: var(--ds-text-secondary);
}

.web-entry .schedule-calendar-panel .calendar-day.today .calendar-day-number {
  background: var(--brand-primary-subtle);
  color: #0f766e;
}

.web-entry .schedule-calendar-panel .calendar-job {
  border-color: color-mix(in srgb, var(--brand-primary) 32%, var(--ds-border));
  background: color-mix(in srgb, var(--brand-primary) 12%, var(--ds-surface-elevated));
  color: var(--ds-text-primary);
  box-shadow: none;
}

.web-entry .schedule-calendar-panel .calendar-job :is(strong, span) {
  color: inherit;
}

.web-entry .schedule-calendar-panel .calendar-job span {
  color: var(--ds-text-secondary);
}

.web-entry .schedule-calendar-panel .calendar-job:hover {
  border-color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 18%, var(--ds-surface-elevated));
}

/* Human validation: keep the timing question within its answer surface. */
.portal-timing-choice .portal-timing-heading { grid-column: 1 / -1; width: 100%; font-size: 1rem; font-weight: 700; margin: 0; overflow-wrap: anywhere; }

/* Contextual customer communication uses the workspace palette. */
.conversation-reply { padding: 1rem; margin-block: 1rem; border: 1px solid var(--border, #334155); border-radius: 14px; background: #111c2d; color: #f1f5f9; }
.conversation-reply p, .conversation-reply small { color: #cbd5e1; overflow-wrap: anywhere; }
