:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #17211e;
  background: #f3f5f1;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #cbd4cf;
  border-radius: 7px;
  background: #fff;
  padding: 8px 11px;
  color: #26332e;
}
button:hover {
  border-color: #6e8c80;
}
button.primary,
.primary {
  background: #1f6b51;
  border-color: #1f6b51;
  color: #fff;
}
button.danger-button {
  background: #fff5f3;
  border-color: #d89a90;
  color: #8e3326;
}
#app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px 1fr;
}
.rail {
  background: #14231f;
  color: #e9f2ed;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand > span,
.brand > img,
.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #73aa95;
  border-radius: 11px;
  color: #9fd0bd;
  flex: none;
}
.brand > img {
  object-fit: cover;
  border: 0;
}
.brand div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.brand strong {
  font-size: 13px;
}
.brand small {
  color: #a9bdb5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rail nav {
  display: grid;
  gap: 14px;
  overflow-y: auto;
}
.nav-group {
  display: grid;
  gap: 3px;
}
.nav-group > span {
  color: #71877e;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0 11px 3px;
}
.rail nav button,
.rail .logout {
  color: #afc2ba;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 9px 11px;
}
.rail nav button.active,
.rail nav button:hover {
  background: #263c35;
  color: #fff;
}
.language {
  display: grid;
  gap: 6px;
  color: #718078;
  font-size: 12px;
}
.language select {
  padding: 8px;
  border-radius: 7px;
}
.rail .language {
  margin-top: auto;
}
.rail select {
  background: #263c35;
  color: #fff;
  border-color: #3e574d;
}
.workspace {
  padding: 30px clamp(20px, 3vw, 44px) 60px;
  min-width: 0;
}
.workspace > header,
.plan > header,
.proposal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
h1 {
  font:
    500 31px Georgia,
    serif;
  margin: 4px 0 18px;
}
h2 {
  font:
    500 22px Georgia,
    serif;
  margin: 0 0 18px;
}
h3 {
  font-size: 13px;
  color: #52625b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.eyebrow {
  color: #6d7a74;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}
.standalone {
  color: #26785b;
  background: #e4f2eb;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 12px;
}
.header-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.demo-badge {
  color: #725817;
  background: #fff0b9;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 220px));
  gap: 12px;
  margin-bottom: 18px;
}
.overview-metrics {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}
.metrics .metric-word {
  font-size: 16px;
  line-height: 1.25;
}
.metrics article,
.panel,
.notice {
  background: #fff;
  border: 1px solid #d7ded9;
  border-radius: 12px;
}
.metrics article {
  padding: 18px;
  display: grid;
  gap: 4px;
}
.metrics strong {
  font-size: 27px;
  font-weight: 500;
}
.metrics span {
  color: #6c7973;
  font-size: 12px;
}
.metrics article.danger strong {
  color: #a54234;
}
.metrics article.warning strong {
  color: #9a6714;
}
.secondary-metrics {
  opacity: 0.78;
}
.attention-panel {
  border-left: 4px solid #317b5d;
}
.attention-metrics {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}
.metrics.compact {
  margin: 14px 0;
}
.metrics.compact article {
  padding: 11px;
}
.metrics.compact strong {
  font-size: 20px;
}
.panel {
  padding: 22px;
  margin-bottom: 16px;
}
.panel.narrow {
  max-width: 760px;
}
.panel.empty {
  min-height: 320px;
  display: grid;
  place-content: center;
  justify-items: center;
  color: #68776f;
  text-align: center;
}
.panel.empty h2 {
  margin: 14px 0 4px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
}
.empty-state {
  min-height: 150px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #68776f;
  text-align: center;
}
.empty-state img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quick-actions button {
  min-height: 52px;
  text-align: left;
}
.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.flow-step {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 3px 9px;
  text-align: left;
  padding: 14px;
}
.flow-step b {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8ece9;
}
.flow-step.ready b {
  color: #fff;
  background: #2d7c5e;
}
.flow-step small {
  color: #75817b;
}
.health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}
.health-grid > div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 9px;
  background: #f5f8f6;
}
.health-grid span {
  color: #6b7872;
  font-size: 11px;
}
.health-grid strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.health-grid i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ca36f;
}
.split {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(440px, 1.15fr);
  gap: 16px;
  align-items: start;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid label {
  display: grid;
  gap: 6px;
  color: #5d6b65;
  font-size: 12px;
}
.form-grid label small,
.capacity-note {
  color: #78857f;
  line-height: 1.4;
}
.form-grid input,
.form-grid select {
  width: 100%;
  border: 1px solid #cbd4cf;
  border-radius: 7px;
  padding: 9px;
  background: #fff;
  color: #17211e;
}
.form-grid .wide,
fieldset.wide {
  grid-column: 1 / -1;
}
.form-grid > button {
  justify-self: start;
  align-self: end;
}
.form-grid.nested {
  grid-column: 1 / -1;
}
.inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
fieldset {
  border: 1px solid #d6ddd9;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.form-grid fieldset label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.form-grid fieldset input {
  width: auto;
}
details > summary {
  cursor: pointer;
  color: #53635b;
}
details > summary h2 {
  display: inline-block;
  margin-left: 4px;
}
.advanced {
  border: 1px solid #d9dfdc;
  border-radius: 8px;
  padding: 12px;
}
.advanced .nested {
  margin-top: 13px;
}
.form-grid .hidden {
  display: none;
}
.entity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid #e1e6e3;
  padding: 13px 0;
}
.entity:first-of-type {
  border-top: 0;
}
.entity > div:first-child {
  display: grid;
  gap: 5px;
}
.entity span {
  color: #6b7872;
  font-size: 12px;
}
.entity.muted {
  opacity: 0.58;
}
.entity.critical {
  border-left: 4px solid #c1703b;
  padding-left: 11px;
}
.critical-tag {
  color: #8b3427;
  background: #fff0ed;
}
.entity .deadline-copy {
  color: #a54234;
}
.pill,
.tag {
  display: inline-block;
  padding: 3px 7px;
  background: #edf1ee;
  border-radius: 10px;
  font-size: 10px;
}
.entity .pill,
.entity .tag {
  font-size: 10px;
}
.tag {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tag.fixed {
  color: #25587c;
  background: #e9f1f6;
}
.tag.flexible {
  color: #8a5b13;
  background: #faf0dd;
}
.empty-copy {
  color: #909c96;
  text-align: center;
  padding: 28px;
}
.plan,
.proposal {
  border-top: 1px solid #dfe5e1;
  padding: 20px 0;
}
.plan:first-of-type,
.proposal:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.plan header > div,
.proposal header > div {
  display: grid;
  gap: 5px;
}
.plan header span,
.proposal header span {
  color: #68766f;
  font-size: 12px;
}
.plan-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
}
.week {
  margin: 14px 0 22px;
}
.week h4 {
  margin: 0 0 8px;
  color: #53635b;
  font-size: 12px;
  font-weight: 600;
}
.week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(125px, 1fr));
  gap: 7px;
  overflow-x: auto;
}
.day {
  min-height: 170px;
  padding: 8px;
  border: 1px solid #dce3df;
  border-radius: 8px;
  background: #fafcfb;
}
.day.outside {
  opacity: 0.35;
  background: #f0f2f0;
}
.day > header {
  display: grid;
  gap: 2px;
  padding-bottom: 7px;
  border-bottom: 1px solid #e1e6e3;
}
.day > header strong {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.07em;
}
.day > header span,
.day-empty {
  color: #74817b;
  font-size: 10px;
}
.proposal-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  margin: 10px 0 16px;
}
.plan-item,
.conflict {
  padding: 10px 12px;
  border-radius: 7px;
  margin: 7px 0;
  display: grid;
  gap: 4px;
}
.plan-item {
  background: #f0f5f2;
  border-left: 3px solid #34805f;
}
.plan-item time,
.plan-item span {
  color: #68756f;
  font-size: 11px;
}
.day .plan-item {
  padding: 8px;
  font-size: 11px;
}
.plan-item.fixed {
  border-left-color: #356f98;
  background: #edf4f8;
}
.plan-item.flexible {
  border-left-color: #b47a27;
  background: #fcf6e9;
}
.plan-item.has-conflict {
  box-shadow: inset 0 0 0 1px #d79b91;
}
.plan-item code {
  color: #9c4032;
  font-size: 9px;
}
.plan-item .recurrence-mark {
  color: #315d80;
  font-weight: 600;
}
.conflict {
  background: #fff2ef;
  border-left: 3px solid #b84d3c;
}
.conflict code {
  color: #9c4032;
}
.conflict span {
  font-size: 12px;
  color: #6f514c;
}
.conflict small {
  color: #83635e;
}
.scenario-card {
  border-top: 1px solid #e1e6e3;
  padding: 16px 0;
}
.scenario-card > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.scenario-card header > div:first-child {
  display: grid;
  gap: 5px;
}
.scenario-card header span {
  color: #6b7872;
  font-size: 12px;
}
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
.comparison > article {
  border: 1px solid #dce3df;
  border-radius: 10px;
  padding: 14px;
}
.availability-pattern {
  display: grid;
  gap: 10px;
}
.availability-pattern article {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) 1fr;
  gap: 14px;
  align-items: start;
}
.availability-pattern article > div {
  display: grid;
  grid-template-columns: repeat(7, minmax(72px, 1fr));
  gap: 5px;
  overflow-x: auto;
}
.availability-pattern span {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: #f4f7f5;
  border-radius: 7px;
  color: #66736d;
  font-size: 10px;
}
.health-panel > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.health-summary {
  font-size: 12px;
  color: #26785b;
}
.health-summary.unhealthy {
  color: #a54234;
}
.health-panel[open] > summary {
  margin-bottom: 16px;
}
.notice {
  padding: 12px 16px;
  color: #735620;
  background: #fff9eb;
  border-color: #e8d49e;
  margin-bottom: 14px;
}
.notice.neutral {
  color: #405b50;
  background: #edf5f1;
  border-color: #c7ddd2;
}
.error {
  display: flex;
  gap: 12px;
  background: #fff1ef;
  color: #87362a;
  border: 1px solid #e2aaa2;
  padding: 12px;
  border-radius: 9px;
  margin-bottom: 14px;
}
.audit {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 7px;
  margin-top: 24px;
  font-size: 12px;
}
.audit dt {
  color: #718078;
}
.auth-page {
  grid-column: 1 / -1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #edf4ef, #e7ebe7);
}
.auth-card {
  width: 430px;
  background: #fff;
  border: 1px solid #d3dcd6;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 18px 50px #1d33251a;
}
.auth-card .brand {
  margin-bottom: 28px;
}
.auth-card .brand small {
  color: #68766f;
}
.auth-card h1 {
  font-size: 27px;
}
.auth-card form {
  display: grid;
  gap: 13px;
}
.auth-card form label {
  display: grid;
  gap: 6px;
  color: #5e6b65;
  font-size: 12px;
}
.auth-card input,
.auth-card select {
  padding: 10px;
  border: 1px solid #cad3ce;
  border-radius: 7px;
}
.auth-card .language {
  margin-top: 18px;
}
.auth-intro {
  color: #65736c;
  line-height: 1.5;
  margin: -8px 0 20px;
}
.auth-card .workspace-mode {
  display: grid;
  gap: 8px;
  padding: 12px;
}
.auth-card .workspace-mode label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 9px;
  padding: 8px;
  border: 1px solid #dbe2de;
  border-radius: 8px;
}
.auth-card .workspace-mode input {
  margin-top: 3px;
}
.auth-card .workspace-mode span {
  display: grid;
  gap: 3px;
}
.auth-card .workspace-mode small {
  color: #728079;
  line-height: 1.35;
}
.source-connection,
.source-snapshot {
  border: 1px solid #d8e0db;
  border-radius: 10px;
  padding: 14px;
  margin: 10px 0;
  background: #fbfcfb;
}
.source-connection,
.source-snapshot > header,
.source-snapshot > footer,
.mapping-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.source-connection > div,
.source-snapshot header > div,
.mapping-row > div {
  display: grid;
  gap: 4px;
}
.source-connection span,
.source-snapshot header span,
.mapping-row span {
  color: #65736c;
  font-size: 11px;
}
.source-snapshot.invalid {
  border-color: #d9a59d;
  background: #fff8f6;
}
.snapshot-hash {
  display: block;
  overflow-wrap: anywhere;
  margin: 10px 0;
  color: #53645b;
  font-size: 10px;
}
.source-counts,
.change-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.change,
.source-state {
  display: inline-flex;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: #e8edeb;
  color: #52625a;
}
.change.new,
.source-state.current,
.source-state.available {
  background: #e3f3e9;
  color: #286443;
}
.change.changed,
.source-state.source_changed,
.source-state.stale {
  background: #fff0cd;
  color: #7d5912;
}
.change.removed_from_source,
.change.conflict,
.source-state.source_unavailable,
.source-state.revalidation_error,
.source-state.unavailable,
.source-state.error {
  background: #fbe4df;
  color: #8d392d;
}
.mapping-preview {
  margin: 8px 0 14px;
  border-top: 1px solid #e1e6e3;
}
.mapping-row {
  padding: 8px 0;
  border-bottom: 1px solid #e8ece9;
  flex-wrap: wrap;
}
.mapping-row .wide {
  width: 100%;
}
.mapping-row table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 11px;
}
.mapping-row th,
.mapping-row td {
  padding: 6px;
  border: 1px solid #e1e6e3;
  text-align: left;
  overflow-wrap: anywhere;
}
.source-message {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) 1fr;
  gap: 10px;
  padding: 7px 0;
  font-size: 12px;
}
.source-message.error,
.warning-text {
  color: #963c30;
}
.inline-form {
  align-items: end;
}
@media (max-width: 1100px) {
  .split {
    grid-template-columns: 1fr;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .overview-metrics,
  .flow-steps {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  #app {
    grid-template-columns: 1fr;
  }
  .rail {
    position: static;
    height: auto;
    padding: 14px 16px;
    gap: 12px;
  }
  .rail nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .rail nav button {
    white-space: nowrap;
  }
  .rail .language {
    margin-top: 0;
    grid-template-columns: auto 90px;
    align-items: center;
  }
  .rail .logout {
    position: absolute;
    top: 19px;
    right: 14px;
  }
  .workspace {
    padding: 22px 16px 50px;
  }
  .workspace > header {
    align-items: flex-start;
  }
  .header-status .standalone {
    display: none;
  }
  .health-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}
@media (max-width: 560px) {
  .overview-metrics,
  .flow-steps,
  .health-grid,
  .quick-actions,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .auth-card {
    width: calc(100vw - 28px);
    padding: 22px;
  }
  .workspace > header {
    display: block;
  }
  .header-status {
    justify-content: flex-start;
    margin-bottom: 14px;
  }
}
