:root {
  color: #263238;
  background: #f6f4f0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f6f4f0;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8d3cb;
  border-radius: 8px;
  background: #fbfaf8;
  color: #263238;
  padding: 10px 12px;
}

button {
  min-height: 36px;
  border: 1px solid #d8d3cb;
  border-radius: 8px;
  background: #ffffff;
  color: #39464d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #5f6d73;
  font-size: 13px;
  font-weight: 800;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #1f2a30;
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  color: #263238;
  font-size: 17px;
}

.login {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(360px, 440px);
  align-items: center;
  justify-content: center;
  gap: 56px;
  min-height: 100vh;
  padding: 48px;
}

.login-intro {
  display: grid;
  gap: 28px;
}

.login-card {
  display: grid;
  width: 100%;
  gap: 18px;
  border: 1px solid #ded9d1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgb(49 87 96 / 10%);
  padding: 28px;
}

.login-copy {
  display: grid;
  gap: 14px;
}

.login-copy h1 {
  max-width: 520px;
  font-size: 42px;
  line-height: 1.12;
}

.login-points {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-points li {
  border-left: 3px solid #c9a27e;
  color: #39464d;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
  padding-left: 12px;
}

.login-description,
.auth-note {
  color: #5f6d73;
  font-size: 14px;
  line-height: 1.55;
}

.form {
  display: grid;
  gap: 13px;
}

.stacked-form {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #ebe6de;
}

.primary-button {
  min-height: 44px;
  border-color: #315760;
  background: #315760;
  color: #ffffff;
}

.error {
  border: 1px solid #e2b7aa;
  border-radius: 8px;
  background: #fff4ef;
  color: #9d392f;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  padding: 12px;
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d8ebe1;
  border-radius: 8px;
  background: #f4fbf7;
  color: #244f3f;
  font-size: 13px;
  font-weight: 700;
  padding: 12px;
}

.notice.compact {
  flex-wrap: wrap;
  margin-bottom: 14px;
}

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

.sidebar {
  border-right: 1px solid #ded9d1;
  background: #ffffff;
  padding: 24px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px 24px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: #315760;
  color: #ffffff;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: #1f2a30;
  font-size: 17px;
}

.brand span {
  margin-top: 3px;
  color: #6f797d;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.user-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  border: 1px solid #ebe6de;
  border-radius: 8px;
  background: #fbfaf8;
  padding: 12px;
}

.user-summary strong {
  color: #263238;
  font-size: 14px;
}

.user-summary span {
  overflow-wrap: anywhere;
  color: #6f797d;
  font-size: 12px;
  font-weight: 700;
}

.nav-item {
  border-radius: 8px;
  color: #5f6d73;
  font-size: 14px;
  font-weight: 800;
  min-height: 42px;
  padding: 12px 14px;
}

.nav-item[aria-current="page"],
.nav-item:hover {
  background: #e7eee9;
  color: #203a40;
}

.workspace {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #ded9d1;
  padding-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #b77c50;
  font-size: 12px;
  font-weight: 900;
}

.page-description {
  max-width: 760px;
  margin-top: 8px;
  color: #5f6d73;
  font-size: 14px;
  line-height: 1.55;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 520px;
}

.status-pill {
  overflow-wrap: anywhere;
  border: 1px solid #ded9d1;
  border-radius: 999px;
  background: #ffffff;
  color: #5f6d73;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.status-pill.strong {
  border-color: #cdded3;
  background: #e7eee9;
  color: #203a40;
}

.status-pill.danger {
  border-color: #e2b7aa;
  background: #fff4ef;
  color: #9d392f;
}

.organization-select {
  width: auto;
  max-width: 240px;
  min-height: 36px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

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

.metric-card,
.panel,
.auth-notice,
.filter-bar,
.calendar-board,
.plan-panel,
.setting-card {
  border: 1px solid #ded9d1;
  border-radius: 8px;
  background: #ffffff;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 136px;
  padding: 17px;
}

.metric-card span,
.section-label {
  color: #6f797d;
  font-size: 12px;
  font-weight: 900;
}

.metric-card strong {
  color: #203a40;
  font-size: 28px;
}

.metric-card p,
.setting-card p,
.panel p,
.auth-notice p,
.filter-bar p,
.plan-panel p,
.slot-row p {
  color: #5f6d73;
  font-size: 14px;
  line-height: 1.5;
}

.content-grid,
.billing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
}

.auth-notice {
  display: grid;
  gap: 6px;
  border-color: #cdded3;
  background: #f3f8f4;
  padding: 16px 18px;
}

.auth-notice strong {
  color: #203a40;
  font-size: 14px;
}

.auth-notice.danger {
  border-color: #e2b7aa;
  background: #fff4ef;
}

.auth-notice.danger strong {
  color: #9d392f;
}

.panel,
.calendar-board,
.plan-panel {
  padding: 20px;
}

.panel-heading,
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.work-list,
.slot-list,
.workflow-list,
.task-list {
  display: grid;
  gap: 10px;
}

.work-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #ebe6de;
  border-radius: 8px;
  background: #fbfaf8;
  padding: 14px;
}

.work-item strong {
  color: #263238;
  font-size: 14px;
}

.work-item p {
  margin-top: 5px;
}

.work-item span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf2f7;
  color: #405160;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
  white-space: nowrap;
}

.work-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.work-actions button {
  white-space: nowrap;
}

.workflow-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #ebe6de;
  padding: 8px 0;
}

.workflow-list li:last-child {
  border-bottom: 0;
}

.workflow-list span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #e7eee9;
  color: #203a40;
  font-size: 12px;
  font-weight: 900;
}

.workflow-list p {
  color: #39464d;
  font-size: 14px;
  line-height: 1.45;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.filter-bar strong {
  color: #263238;
}

.filter-bar p {
  margin-top: 5px;
}

.filter-controls,
.segmented,
.onboarding-actions,
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.onboarding-actions {
  align-items: center;
  margin-top: 8px;
}

.inline-form,
.member-invite-form {
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: minmax(160px, 1fr) auto;
}

.member-invite-form label,
.checkbox-row label {
  color: #405160;
  font-size: 13px;
  font-weight: 800;
}

.checkbox-row {
  align-items: center;
}

.form-error {
  color: #9d392f;
  font-weight: 800;
}

.invite-result {
  overflow-wrap: anywhere;
}

.invite-result code {
  border-radius: 6px;
  background: #f0eee9;
  color: #203a40;
  padding: 2px 5px;
}

.segmented {
  border: 1px solid #d8d3cb;
  border-radius: 8px;
  background: #f6f4f0;
  padding: 3px;
}

.segmented button {
  min-width: 42px;
  border: 0;
  background: transparent;
}

.segmented button[aria-pressed="true"] {
  background: #ffffff;
  color: #203a40;
}

.slot-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(140px, 0.5fr);
  gap: 12px;
  border-left: 3px solid #8aa99b;
  background: #fbfaf8;
  padding: 13px 14px;
}

.slot-row span {
  color: #6f797d;
  font-size: 13px;
  font-weight: 900;
}

.slot-row strong {
  color: #263238;
  font-size: 14px;
}

.plan-panel {
  display: grid;
  gap: 12px;
}

.plan-panel h2 {
  font-size: 24px;
}

.plan-meter {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #ece7df;
}

.plan-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #315760;
}

.task-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #5f6d73;
  line-height: 1.55;
}

.setting-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 18px;
}

.setting-card-wide {
  grid-column: span 2;
}

.setting-card strong {
  color: #263238;
}

.compact-list {
  gap: 8px;
}

.compact-list .work-item {
  padding: 10px;
}

@media (max-width: 1080px) {
  .metric-grid,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setting-card-wide {
    grid-column: span 2;
  }

  .content-grid,
  .billing-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .login {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 18px;
  }

  .login-copy h1 {
    font-size: 32px;
  }

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #ded9d1;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace {
    padding: 24px 18px;
  }

  .topbar,
  .filter-bar,
  .panel-heading,
  .calendar-header {
    display: grid;
  }

  .topbar-actions {
    justify-content: flex-start;
    max-width: none;
  }

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

  .slot-row p {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .metric-grid,
  .settings-grid,
  .nav-list {
    grid-template-columns: 1fr;
  }

  .setting-card-wide {
    grid-column: span 1;
  }

  .work-item {
    display: grid;
  }

  .work-item span {
    width: fit-content;
  }

  .work-actions {
    flex-wrap: wrap;
  }
}
