:root {
  color-scheme: light;
  --ink: #1b2b3f;
  --muted: #77879b;
  --line: #e9eef4;
  --blue: #3568d4;
  --blue-dark: #2655bb;
  --sidebar-width: 258px;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #f5f8fc;
}

button,
a {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.planning-view {
  min-height: calc(100vh - 150px);
}

.planning-frame {
  display: block;
  width: 100%;
  min-height: max(78vh, 720px);
  border: 0;
  border-radius: 12px;
  background: #f5f8fc;
}

.sidebar {
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 30px 18px 20px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #4385ec, #2e60ca);
  box-shadow: 0 6px 14px #3568d426;
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy strong {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.brand-copy > span {
  color: #8a99ab;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-caption {
  margin: 55px 11px 13px;
  color: #9aa8b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.25px;
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 13px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  color: #718197;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 160ms ease, background 160ms ease;
}

.nav-item:hover {
  color: var(--blue);
  background: #f5f8fe;
}

.nav-item.is-active {
  color: var(--blue);
  background: #edf3ff;
  font-weight: 700;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.nav-item span {
  font-size: 13px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 14px 10px 3px;
  border-top: 1px solid #f0f3f7;
  color: #738197;
  font-size: 11px;
}

.status-dot,
.workspace-badge > span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #59bf96;
}

.status-label {
  margin-left: auto;
  color: #a0adbb;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.7px;
}

.main-column {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  height: 72px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 0 46px;
  border-bottom: 1px solid var(--line);
  background: #ffffffeb;
  backdrop-filter: blur(14px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9aa7b6;
  font-size: 12px;
}

.breadcrumb svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #aeb8c4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.breadcrumb strong {
  color: #44556c;
  font-weight: 600;
}

.topbar-team {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #65758a;
  font-size: 11px;
  font-weight: 600;
}

.team-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #dce7ff;
  border-radius: 10px;
  color: var(--blue);
  background: #f0f5ff;
  font-size: 10px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #53647a;
  background: #fff;
  cursor: pointer;
}

.menu-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.content {
  width: min(100%, 1120px);
  flex: 1;
  margin: 0 auto;
  padding: 60px 64px 38px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 35px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #7187aa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.55px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.8px;
}

h1 {
  margin-bottom: 9px;
  color: #1b2b3f;
  font-size: clamp(27px, 3vw, 34px);
  font-weight: 800;
}

.page-description {
  margin-bottom: 0;
  color: #7b8a9d;
  font-size: 13px;
  line-height: 1.7;
}

.workspace-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  padding: 9px 12px;
  border: 1px solid #e7edf3;
  border-radius: 20px;
  color: #75849a;
  background: #fff;
  font-size: 10px;
  white-space: nowrap;
}

.workspace-badge > span {
  width: 6px;
  height: 6px;
}

.welcome-card {
  position: relative;
  display: flex;
  min-height: 296px;
  align-items: center;
  overflow: hidden;
  padding: 42px 56px;
  border: 1px solid #e7edf5;
  border-radius: 16px;
  background: linear-gradient(112deg, #fff 14%, #fbfdff 60%, #f1f6ff 100%);
  box-shadow: 0 12px 36px #3450790a;
}

.welcome-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 475px);
}

.welcome-tag {
  display: inline-block;
  margin-bottom: 14px;
  color: #4874c7;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.25px;
}

h2 {
  margin-bottom: 11px;
  color: #263a54;
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 800;
  line-height: 1.35;
}

.welcome-copy p {
  max-width: 430px;
  margin-bottom: 0;
  color: #7b8a9e;
  font-size: 12px;
  line-height: 1.9;
}

.welcome-index {
  position: absolute;
  right: 22px;
  bottom: 15px;
  color: #cbd8ee;
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.welcome-art {
  position: absolute;
  top: 0;
  right: 8%;
  width: 270px;
  height: 100%;
  opacity: 0.9;
}

.art-circle {
  position: absolute;
  top: 47px;
  left: 49px;
  width: 168px;
  height: 168px;
  border: 1px solid #dbe7fa;
  border-radius: 50%;
  background: radial-gradient(circle at 49% 49%, #e8f0ff 0, #f3f7ff 58%, #f8fbff 59%);
}

.art-sheet {
  position: absolute;
  top: 80px;
  left: 95px;
  display: flex;
  width: 92px;
  height: 112px;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  transform: rotate(5deg);
  border: 1px solid #e7edf8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 13px 30px #345d9917;
}

.art-sheet-line {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 4px;
  background: #e9eff9;
}

.art-sheet-line.short {
  width: 62%;
  background: #dce8fd;
}

.art-check {
  position: absolute;
  top: 45px;
  left: 26px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #5c94eb;
  box-shadow: 0 3px 9px #3568d433;
}

.art-check svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.art-spark {
  position: absolute;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8cb6f4;
}

.spark-one {
  top: 73px;
  right: 35px;
}

.spark-two {
  right: 51px;
  bottom: 65px;
  width: 5px;
  height: 5px;
  background: #b4cafa;
}

.bottom-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 22px;
  padding: 0 4px;
}

.note-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #8298ba;
  background: #eaf0f8;
}

.note-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.bottom-note p {
  margin-bottom: 0;
  color: #8997a8;
  font-size: 10px;
  line-height: 1.6;
}

.page-footer {
  padding: 18px 64px 22px;
  border-top: 1px solid var(--line);
  color: #96a3b2;
  font-size: 10px;
  text-align: center;
}

.page-footer span {
  padding: 0 5px;
  color: #c2ccd7;
}

.app-shell[hidden],
.auth-screen[hidden],
.auth-form[hidden],
.philips-only[hidden] {
  display: none !important;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  align-content: center;
  justify-items: center;
  padding: 34px 20px 22px;
  background:
    radial-gradient(ellipse at 16% 6%, #e8f0ff 0, transparent 35%),
    #f5f8fc;
}

.auth-brand {
  margin-bottom: 27px;
}

.auth-card {
  width: min(100%, 440px);
  padding: 35px 38px 30px;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px #28466c12;
}

.auth-card > .eyebrow {
  margin-bottom: 9px;
}

.auth-card h1 {
  margin-bottom: 8px;
  font-size: 25px;
}

.auth-description {
  margin-bottom: 24px;
  color: #78889c;
  font-size: 12px;
  line-height: 1.7;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 23px;
  padding: 4px;
  border-radius: 9px;
  background: #f3f6fa;
}

.auth-tab {
  min-height: 37px;
  border: 0;
  border-radius: 7px;
  color: #77869a;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.auth-tab.is-active {
  color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 1px 4px #243e5c18;
}

.auth-form {
  display: grid;
  gap: 9px;
}

.auth-form label {
  margin-top: 3px;
  color: #40536a;
  font-size: 11px;
  font-weight: 600;
}

.auth-form label span {
  color: #8997a8;
  font-size: 10px;
  font-weight: 400;
}

.auth-form input {
  width: 100%;
  min-height: 42px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-form input:focus {
  border-color: #7398e4;
  box-shadow: 0 0 0 3px #3568d41a;
}

.auth-submit {
  min-height: 43px;
  margin-top: 7px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background 150ms ease;
}

.auth-submit:hover {
  background: var(--blue-dark);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.auth-message {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.auth-message.is-error {
  color: #b43c4d;
}

.auth-message.is-success {
  color: #24825f;
}

.app-message {
  min-height: 18px;
  margin: 12px 4px 0;
  font-size: 11px;
}

.app-message.is-error {
  color: #b43c4d;
}

.productivity-view {
  display: block;
}

.productivity-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 220px) auto;
  align-items: end;
  gap: 14px;
  padding: 20px;
  border: 1px solid #e7edf5;
  border-radius: 13px;
  background: #fff;
}

.file-picker,
.month-picker {
  display: grid;
  gap: 8px;
  color: #40536a;
  font-size: 11px;
  font-weight: 600;
}

.file-picker input,
.month-picker input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  color: #617287;
  background: #fff;
  font: inherit;
  font-size: 11px;
}

.file-name {
  overflow: hidden;
  color: #8290a1;
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.productivity-submit {
  min-width: 130px;
  padding: 0 15px;
}

.productivity-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.published-report {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 15px;
  padding: 15px 18px;
  border: 1px solid #e4ebf7;
  border-radius: 11px;
  background: #f7f9fe;
}

.published-report > div {
  display: grid;
  gap: 5px;
}

.published-report strong {
  color: #40536a;
  font-size: 11px;
}

.published-report span {
  color: #7f8da0;
  font-size: 10px;
  line-height: 1.5;
}

.published-report .secondary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.privacy-note {
  margin: 13px 2px 0;
  color: #7f8da0;
  font-size: 10px;
  line-height: 1.7;
}

.productivity-message {
  min-height: 18px;
  margin: 12px 2px;
  color: #24825f;
  font-size: 11px;
  line-height: 1.6;
}

.productivity-message.is-error {
  color: #b43c4d;
}

.productivity-message.is-success {
  color: #24825f;
}

.report-results {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.report-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.report-heading .eyebrow {
  margin-bottom: 7px;
}

.report-heading h2,
.section-heading h3,
.ai-analysis h3 {
  margin-bottom: 0;
  color: #263a54;
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.35px;
}

.report-source {
  max-width: 45%;
  overflow: hidden;
  color: #8997a8;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  display: grid;
  min-height: 124px;
  align-content: start;
  gap: 9px;
  padding: 17px;
  border: 1px solid #e7edf5;
  border-radius: 12px;
  background: #fff;
}

.metric-label {
  color: #78889c;
  font-size: 10px;
  font-weight: 600;
}

.metric-value {
  color: #263a54;
  font-family: "Manrope", sans-serif;
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 800;
  letter-spacing: -0.6px;
}

.metric-detail {
  color: #8997a8;
  font-size: 9px;
  line-height: 1.5;
}

.stage-report {
  overflow: hidden;
  border: 1px solid #e7edf5;
  border-radius: 13px;
  background: #fff;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf1f6;
}

.section-heading h3,
.ai-analysis h3 {
  font-size: 14px;
}

.section-heading > span {
  color: #8a98a9;
  font-size: 10px;
}

.table-scroll {
  overflow-x: auto;
}

.stage-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  text-align: left;
}

.stage-table th,
.stage-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #f0f3f7;
  color: #65758a;
  font-size: 10px;
  white-space: nowrap;
}

.stage-table thead th {
  color: #8b99aa;
  background: #fafbfd;
  font-size: 9px;
  font-weight: 700;
}

.stage-table tbody tr:last-child th,
.stage-table tbody tr:last-child td {
  border-bottom: 0;
}

.stage-table tbody th {
  width: 44%;
  color: #40536a;
  font-weight: 600;
  white-space: normal;
}

.stage-name {
  display: block;
  margin-bottom: 6px;
}

.stage-bar-track {
  display: block;
  width: min(100%, 260px);
  height: 4px;
  overflow: hidden;
  border-radius: 5px;
  background: #eef2f8;
}

.stage-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #5681dc;
}

.report-caveat {
  padding: 14px 16px;
  border: 1px solid #e8edf4;
  border-radius: 10px;
  color: #77879b;
  background: #f9fbfe;
  font-size: 10px;
  line-height: 1.7;
}

.ai-analysis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 20px;
  border: 1px solid #e4ebf7;
  border-radius: 12px;
  background: #f7f9fe;
}

.ai-analysis p {
  margin: 7px 0 0;
  color: #7d8b9e;
  font-size: 10px;
  line-height: 1.6;
}

.secondary-button {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid #dce6f5;
  border-radius: 8px;
  color: #3568d4;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.secondary-button:hover {
  border-color: #b9ccef;
  background: #f8faff;
}

.ai-prompt-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #e7edf5;
  border-radius: 10px;
  background: #fff;
}

.ai-prompt-panel label {
  color: #40536a;
  font-size: 10px;
  font-weight: 600;
}

.ai-prompt-panel textarea {
  width: 100%;
  resize: vertical;
  padding: 12px;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  color: #52647b;
  background: #fbfcfe;
  font: 11px/1.6 "DM Sans", sans-serif;
}

.ai-prompt-panel .secondary-button {
  justify-self: start;
}

.page-view[hidden],
.productivity-view[hidden],
.report-results[hidden],
.ai-prompt-panel[hidden] {
  display: none !important;
}

.auth-disclaimer {
  margin: 13px 0 0;
  padding-top: 13px;
  border-top: 1px solid #eef2f6;
  color: #94a1af;
  font-size: 10px;
  line-height: 1.6;
}

.auth-footer {
  margin: 23px 0 0;
  color: #97a4b2;
  font-size: 10px;
}

.sidebar-footer #sidebar-user-name {
  overflow: hidden;
  flex: 1 1 auto;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  padding: 5px 6px;
  border: 0;
  border-radius: 5px;
  color: #75849a;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.logout-button:hover {
  color: #ba3f50;
  background: #fff2f3;
}

@media (max-width: 1020px) {
  .content {
    padding-right: 38px;
    padding-left: 38px;
  }

  .topbar {
    padding-right: 36px;
    padding-left: 36px;
  }

  .welcome-card {
    padding: 38px;
  }

  .welcome-art {
    right: 1%;
    opacity: 0.68;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar-width: 258px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: 10px 0 30px #1e35551a;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .main-column {
    margin-left: 0;
  }

  .topbar {
    height: 64px;
    justify-content: flex-start;
    gap: 13px;
    padding: 0 20px;
  }

  .menu-toggle {
    display: grid;
    flex: 0 0 auto;
  }

  .topbar-team {
    margin-left: auto;
  }

  .topbar-team > span:last-child {
    display: none;
  }

  .content {
    padding: 42px 24px 34px;
  }

  .page-heading {
    align-items: flex-start;
  }

  .productivity-controls {
    grid-template-columns: 1fr 1fr;
  }

  .productivity-submit {
    grid-column: 1 / -1;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .ai-analysis {
    align-items: flex-start;
    flex-direction: column;
  }

  .published-report {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-badge {
    display: none;
  }

  .welcome-card {
    min-height: 310px;
    align-items: flex-start;
    padding: 37px 30px;
  }

  .welcome-copy {
    width: 100%;
  }

  .welcome-art {
    top: auto;
    right: 2%;
    bottom: -36px;
    transform: scale(0.7);
    transform-origin: bottom right;
    opacity: 0.3;
  }

  .page-footer {
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (max-width: 430px) {
  .breadcrumb {
    gap: 6px;
    font-size: 11px;
  }

  .content {
    padding-right: 18px;
    padding-left: 18px;
  }

  .page-heading {
    margin-bottom: 27px;
  }

  .productivity-controls {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .productivity-submit {
    grid-column: auto;
  }

  .metrics-grid {
    gap: 8px;
  }

  .metric-card {
    min-height: 116px;
    padding: 13px;
  }

  .report-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .report-source {
    max-width: 100%;
  }

  .welcome-card {
    min-height: 325px;
    padding: 30px 23px;
  }

  .welcome-copy p {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
