/* The OS shell shares the calm, layered surfaces of workspace headers. */
.app-header,
.review-crm .app-header {
  background: linear-gradient(110deg, #ffffff 20%, #f4fafc 100%);
  box-shadow: 0 3px 18px rgba(27, 48, 90, .05);
  position: relative;
  z-index: 3;
}
.brand-divider { height: 3px; background: var(--gradient); }
@media (forced-colors: active) { .brand-divider { background: CanvasText; } }
.app-header-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.workspace-save-indicator { position: relative; flex: 0 1 auto; }
.workspace-save-indicator:empty { display: none; }
.workspace-save-indicator .opportunity-save-recovery:not([hidden]) {
  position: absolute; inset: calc(100% + 8px) 0 auto auto; z-index: 4;
  width: min(17rem, calc(100vw - 32px)); padding: 10px;
  border: 1px solid #cfdeec; border-radius: 8px; background: var(--white);
}
@media (max-width: 700px) {
  .app-header-brand { gap: 8px; flex-wrap: wrap; }
}
.account-menu > summary { border-radius: 12px; padding: 4px 7px; cursor: pointer; }
.account-menu > summary:hover { background: #eaf5f8; }
.account-menu > summary:focus-visible,
.workspace-menu-toggle:focus-visible { outline: 3px solid #16657c; outline-offset: 3px; }
.account-initial { background: linear-gradient(145deg, #223b75, #142450); box-shadow: 0 3px 9px rgba(27, 48, 90, .15); }
.account-popover { border: 1px solid #cbdde5; box-shadow: 0 16px 35px rgba(27, 48, 90, .16); }
.account-popover:has(.account-workspace) { max-height: calc(100dvh - 112px); overflow-y: auto; }
.account-workspace {
  display: grid;
  gap: 2px;
  padding: 10px 0 6px;
  margin-bottom: 10px;
  border-top: 1px solid #d5e3ea;
  border-bottom: 1px solid #d5e3ea;
}
.account-workspace h2 { margin: 0 8px; font-size: .8rem; color: #456178; }
.account-workspace a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: .875rem;
  text-decoration: none;
}
.account-workspace a:hover,
.account-workspace a[aria-current=page] { background: #eaf5f8; }
.account-workspace a:focus-visible { outline: 2px solid #16657c; outline-offset: -2px; }
.workspace-sidebar,
.review-crm .workspace-sidebar {
  background: linear-gradient(180deg, #f6fbfc 0%, #fff 70%);
  border-right: 1px solid #d5e3ea;
}
.workspace-nav .nav-group-label,
.review-crm .workspace-nav .nav-group-label {
  color: #456178;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.review-crm .workspace-nav .nav-group-label:not(:first-child) { border-top: 1px solid #d9e8ec; }
.workspace-nav > a,
.review-crm .workspace-nav > a { border-radius: 10px; color: #243b63; }
.workspace-nav > a:not([aria-current=page]):hover,
.review-crm .workspace-nav > a:not([aria-current=page]):hover { background: #e8f5f6; outline: 1px solid #c3e2e4; outline-offset: -1px; }
.workspace-nav > a[aria-current=page],
.review-crm .workspace-nav > a[aria-current=page] {
  background: linear-gradient(115deg, #20376d, #172858);
  color: #fff;
  box-shadow: inset 4px 0 0 var(--teal), 0 4px 10px rgba(27, 48, 90, .14);
}
.workspace-nav > a:focus-visible,
.review-crm .workspace-nav > a:focus-visible { outline: 3px solid #16657c; outline-offset: 2px; }
.workspace-nav > a[aria-current=page]:focus-visible,
.review-crm .workspace-nav > a[aria-current=page]:focus-visible { outline-color: #087e91; }
@media (max-width: 1000px) {
  .workspace-sidebar, .review-crm .workspace-sidebar { border-right: 0; border-bottom: 1px solid #d5e3ea; }
}
.workspace-position { color: #176878; font-size: 13px; font-weight: 700; line-height: 1.3; text-align: right; }
@media(max-width: 700px) { .workspace-position { font-size: 11px; max-width: 140px; white-space: normal; } .account-bar { gap: 8px; } }

.account-photo { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

@media (min-width: 1001px) {
  body.signed-in {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
  }

  .signed-in > :not(.app-shell) { flex-shrink: 0; }

  .signed-in > .app-shell {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
  }

  .signed-in .workspace-body,
  .signed-in .workspace-sidebar {
    min-height: 0;
    overflow-y: auto;
  }
}

@media (max-width: 1000px) {
  .workspace-sidebar > .sidebar-promise.sidebar-beta { display: block; padding: 8px 12px 0; }
}

.sidebar-beta { text-align: center; }

.sidebar-beta .release-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  padding: 4px 7px;
  border: 1px solid #cfdee6;
  border-radius: 8px;
  background: #f6fafc;
  color: #243b63;
  white-space: nowrap;
}

.sidebar-beta .release-number {
  border-radius: 5px;
  padding: 1px 6px;
  background: #e3f1ef;
  color: #175852;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.signed-out main:has(.beta-login) {
  display: grid;
  place-items: center;
  max-width: none;
  min-height: 100dvh;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse at 50% 28%, #ffffff 0%, #ffffff00 64%),
    linear-gradient(136deg, #eaf0f8 0%, #f3f7fa 48%, #e5f3ef 100%);
}

.signed-out:has(.beta-login) > .app-header,
.signed-out:has(.beta-login) > .brand-divider { display: none; }

.signed-out .beta-login {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 500px);
  margin: 0 auto;
}

.beta-login .login-form {
  padding: clamp(26px, 6vw, 48px) clamp(24px, 6vw, 48px);
  text-align: center;
  border: 1px solid #dce6ed;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(24, 44, 82, .03), 0 24px 64px rgba(24, 44, 82, .075);
}

.beta-login .login-brand-lockup {
  position: relative;
  width: min(100%, 228px);
  margin: 0 auto 24px;
}

.beta-login .login-brand-logo {
  display: block;
  width: 100%;
  height: auto;
}

.login-unlock-mark { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .login-unlocking .login-brand-logo {
    transform-origin: 12% 50%;
    animation: login-wordmark-fold 575ms cubic-bezier(.56, .09, .22, 1) both;
  }

  .login-unlocking .login-unlock-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 30%;
    aspect-ratio: 1;
    background: url("/static/brand/continuos-welcome-loader.png") center / contain no-repeat;
    animation: login-mark-center 620ms cubic-bezier(.45, .05, .22, 1) both;
  }

  @keyframes login-wordmark-fold {
    0% { opacity: 1; transform: scale(1); }
    18% { opacity: 1; }
    78%, 100% { opacity: 0; transform: scale(.08, .55); }
  }

  @keyframes login-mark-center {
    0% { opacity: 0; transform: translate3d(-176.7%, -50%, 0) scale(.90); }
    26% { opacity: 1; transform: translate3d(-176.7%, -50%, 0) scale(1); }
    100% { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1.08); }
  }
}

.beta-login .field-help,
.beta-login .notice { text-align: left; }

.beta-login .login-accessible-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.beta-login .full-button { margin-top: 10px; }
.beta-login .login-form > :last-child { margin-bottom: 0; }

.beta-login .google-sign-in-button {
  display: inline-block;
  max-width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.beta-login .google-sign-in-button img {
  display: block;
  max-width: 100%;
  height: auto;
}

.beta-login [data-google-entry] { position: relative; }

.google-entry-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.beta-login .google-sign-in-button:focus-visible {
  outline: 3px solid #16766d;
  outline-offset: 3px;
}

.workspace-welcome {
  margin: 0 0 20px;
  color: #20365c;
}

.welcome-portal,
.workspace-welcome[hidden] { display: none; }

.workspace-welcome p {
  margin: 0;
  font-size: clamp(18px, 3vw, 24px);
}

@media (prefers-reduced-motion: no-preference) {
  .workspace-welcome {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    isolation: isolate;
    overflow: hidden;
    margin: 0;
    padding: 24px;
    pointer-events: none;
    background:
      radial-gradient(ellipse at 52% 58%, #fff 0%, transparent 52%),
      radial-gradient(ellipse at 74% 26%, var(--welcome-sky, #e8f0fb) 0%, transparent 58%),
      linear-gradient(140deg, #f8fafc 8%, #eef5f8 52%, var(--welcome-horizon, #e1f2ed) 100%);
    color: var(--navy);
    text-align: center;
    animation: workspace-welcome-depart 2.65s cubic-bezier(.22, .68, .3, 1) both;
  }

  .workspace-welcome[data-phase="morning"] {
    --welcome-sky: #e7f1ff;
    --welcome-horizon: #fbefda;
  }

  .workspace-welcome[data-phase="evening"] {
    --welcome-sky: #e8eafa;
    --welcome-horizon: #f8e9dc;
  }

  .workspace-welcome[data-phase="overnight"] {
    --welcome-sky: #e7ebf8;
    --welcome-horizon: #e6edf6;
  }

  .workspace-welcome::before,
  .workspace-welcome::after {
    position: absolute;
    z-index: -1;
    width: min(75vmin, 640px);
    aspect-ratio: 1;
    border: 1px solid #87b9b947;
    border-radius: 50%;
    content: '';
  }

  .workspace-welcome::after {
    width: min(91vmin, 780px);
    border-color: #849fc230;
  }

  .workspace-welcome p {
    min-width: 0;
    max-width: 100%;
    text-wrap: balance;
    font-size: clamp(30px, 6vw, 76px);
    font-weight: 400;
    letter-spacing: -.04em;
    line-height: 1.15;
    animation: workspace-welcome-arrival 360ms 1.32s cubic-bezier(.22, .68, .3, 1) both;
  }

  .workspace-welcome p > span,
  .workspace-welcome p > strong {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .workspace-welcome strong {
    color: var(--blue);
    font-weight: 650;
  }

  @property --welcome-opening {
    syntax: "<length>";
    inherits: false;
    initial-value: -24px;
  }

  .welcome-portal {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    overflow: hidden;
    animation: welcome-portal-reveal 1.52s ease-in-out both;
  }

  .welcome-portal::before {
    position: absolute;
    inset: 0;
    background: #fff;
    mask-image: radial-gradient(circle, transparent var(--welcome-opening),
      #000 calc(var(--welcome-opening) + 24px));
    animation: welcome-portal-open 580ms 880ms cubic-bezier(.65, .05, .2, 1) both;
    content: '';
  }

  .welcome-portal picture {
    position: relative;
    display: block;
    width: clamp(104px, 15vw, 156px);
    animation: welcome-portal-zoom 1.44s cubic-bezier(.45, .04, .3, 1) both;
  }

  .welcome-portal picture::before {
    position: absolute;
    inset: -10%;
    border: 1px solid #08b2cf;
    border-radius: 50%;
    opacity: 0;
    animation: welcome-portal-ring 680ms 570ms ease-out both;
    content: '';
  }

  .welcome-portal img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
  }

  @keyframes welcome-portal-open {
    from { --welcome-opening: -24px; }
    to { --welcome-opening: 100vmax; }
  }

  @keyframes welcome-portal-ring {
    0% { opacity: 0; transform: scale(.86); }
    24% { opacity: .38; }
    100% { opacity: 0; transform: scale(1.4); }
  }

  @keyframes welcome-portal-reveal {
    0%, 80% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
  }

  @keyframes welcome-portal-zoom {
    0% { opacity: 0; transform: scale(.92); }
    18%, 48% { opacity: 1; transform: scale(1); }
    64% { opacity: 1; transform: scale(.97); }
    78% { opacity: .54; transform: scale(5); }
    91% { opacity: 0; transform: scale(18); }
    100% { opacity: 0; transform: scale(22); }
  }

  body:focus-within .workspace-welcome { visibility: hidden; }

  @keyframes workspace-welcome-arrival {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes workspace-welcome-depart {
    0%, 72% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
  }
}

/* Signed-in chrome uses the same light palette as the arrival screen. */
.signed-in > .app-header {
  gap: clamp(12px, 2vw, 28px);
  min-height: 72px;
  padding: 10px clamp(16px, 2.5vw, 36px);
  background: linear-gradient(108deg, #fff 25%, #f2f8fb 70%, #edf7f5);
  box-shadow: 0 4px 18px rgba(27, 48, 90, .08);
}

.signed-in .app-header .brand-logo { width: clamp(125px, 14vw, 168px); }
.signed-in .account-bar { gap: 12px; }

.signed-in .account-menu > summary {
  min-height: 44px;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid #d7e6eb;
  background: #ffffffb8;
}

.signed-in .account-menu > summary:hover,
.signed-in .account-menu[open] > summary { background: #eaf5f8; }
.signed-in .account-initial { width: 34px; height: 34px; }
.signed-in .account-copy { font-size: .89rem; font-weight: 650; }
.signed-in .account-popover { top: calc(100% + 8px); padding: 12px; }
.account-identity {
  display: grid;
  gap: 5px;
  padding: 8px;
  overflow-wrap: anywhere;
}
.account-profile a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
}
.account-profile a:hover { background: #eaf5f8; }
.account-signout { width: 100%; min-height: 44px; margin-top: 4px; }

.signed-in .workspace-sidebar {
  background: linear-gradient(155deg, #f1f7fb, #f7fbfc 65%, #f2f8f6);
}
.signed-in .workspace-nav > a:not([aria-current=page]):hover { text-decoration: none; }
.signed-in .workspace-nav > a[aria-current=page] {
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--teal), 0 4px 12px rgba(27, 48, 90, .17);
}

.dashboard-task-return {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0 12px;
  color: #176878;
  font-size: .9rem;
  font-weight: 700;
}

@media (max-width: 1000px) {
  body.signed-in { --compact-header-height: 64px; }
  html:has(body.signed-in) { scroll-padding-top: 140px; }
  .signed-in > .app-header {
    position: sticky;
    top: 0;
    z-index: 8;
    height: var(--compact-header-height);
    min-height: 0;
    flex-wrap: nowrap;
    padding: 6px 14px;
  }
  .signed-in .app-header-brand { flex-wrap: nowrap; }
  .signed-in .workspace-sidebar:has(.workspace-menu-toggle:not([hidden])) {
    position: sticky;
    top: var(--compact-header-height);
    z-index: 7;
    padding: 6px 14px;
    box-shadow: 0 4px 12px rgba(27, 48, 90, .08);
  }
  .signed-in .workspace-nav:not([hidden]) {
    max-height: calc(100dvh - 160px);
    overflow-y: auto;
    padding: 10px 2px 4px;
  }
  .signed-in .workspace-menu-toggle {
    min-height: 44px;
    background: #fff;
    border-color: #d0e1e9;
  }
  .signed-in .sidebar-promise.sidebar-beta { padding-top: 4px; }
  .signed-in .sidebar-promise.sidebar-beta .release-badge { padding: 2px 6px; }
  .signed-in .demo-pill { display: none; }
}

@media (max-width: 520px) {
  .signed-in .workspace-position { display: none; }
  .signed-in .workspace-save-indicator .opportunity-save-recovery:not([hidden]) { inset-inline: 0 auto; }
  .signed-in .account-popover { min-width: min(250px, calc(100vw - 28px)); }
  .signed-in > .skip:focus { position: fixed; }
}
