:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef4f2;
  --text: #1d2528;
  --muted: #657274;
  --line: #d7dfda;
  --accent: #2f6f68;
  --accent-2: #b85b3f;
  --ink-soft: #314244;
  --shadow: 0 18px 50px rgba(34, 45, 43, 0.11);
  --radius: 8px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Aptos", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #203133;
  color: #f7fbfa;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: #e7f0eb;
  color: #203133;
  font-weight: 800;
}

.rfs-mark {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.rfs-mark span {
  position: absolute;
  inset: 8px 10px 8px 12px;
  border: 3px solid #aebdb2;
}

.rfs-mark i {
  position: absolute;
  left: 16px;
  top: 1px;
  width: 5px;
  height: 35px;
  background: #f7fbfa;
  border-left: 2px solid #1b2422;
  transform: rotate(42deg);
}

.brand strong,
.brand span,
.rule-card span,
.user-switch span,
.session-card span {
  display: block;
}

.brand span,
.rule-card span,
.user-switch span,
.session-card span,
.session-card em {
  margin-top: 3px;
  color: rgba(247, 251, 250, 0.7);
  font-size: 12px;
}

.user-switch {
  display: grid;
  gap: 8px;
}

.user-switch select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.user-switch option {
  color: var(--text);
}

.session-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.session-card strong,
.session-card em {
  display: block;
  font-style: normal;
}

.session-card button {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.rule-card {
  margin-top: auto;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.rule-card strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.3;
}

.main {
  min-width: 0;
  padding: 28px;
}

.login-screen {
  grid-column: 1 / -1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #203133;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-brand .brand-mark {
  background: #203133;
  color: #f7fbfa;
}

.login-brand span {
  color: var(--muted);
}

.login-panel label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.login-panel label span {
  color: var(--muted);
  font-size: 13px;
}

.login-panel input,
.login-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}

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

h1 {
  margin-bottom: 6px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.04;
  font-family: var(--serif);
  font-weight: 500;
}

h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
}

.topbar p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.role-pill,
.notice {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.role-pill {
  padding: 9px 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #e9f2ec;
  color: #25543f;
  border-color: #c9decf;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.form-panel,
.list-panel,
.record-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
  font-family: var(--serif);
  font-weight: 700;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.review-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #cbdad4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.review-panel span {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.review-panel h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.review-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.review-panel ol {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.review-panel li + li {
  margin-top: 4px;
}

.pattern-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #cbdad4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.pattern-head {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.pattern-head span {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.pattern-head h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.pattern-head p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.pattern-counters article {
  min-height: 72px;
  padding: 12px;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #f7faf8;
}

.pattern-counters span {
  color: var(--muted);
}

.pattern-counters strong {
  display: block;
  margin-top: 7px;
  font-size: 24px;
  line-height: 1;
}

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

.pattern-list {
  padding: 12px;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #fbfcfb;
}

.pattern-list h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.pattern-list button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  border: 1px solid #cbd7d1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-soft);
  padding: 8px 10px;
  text-align: left;
}

.pattern-list button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pattern-list button strong {
  flex: 0 0 auto;
  color: var(--accent);
}

.share-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #cbdad4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.share-head {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1.25fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.share-head span {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.share-head h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.share-head p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.share-actions button {
  min-height: 72px;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #f7faf8;
  color: var(--ink-soft);
  padding: 12px;
  text-align: left;
}

.share-actions button.active {
  border-color: #8fb3aa;
  background: #edf8f4;
}

.share-actions strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

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

.share-queue {
  padding: 12px;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #fbfcfb;
}

.share-queue h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.share-queue button {
  width: 100%;
  display: grid;
  gap: 3px;
  margin-top: 7px;
  border: 1px solid #cbd7d1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-soft);
  padding: 8px 10px;
  text-align: left;
}

.share-queue button span,
.share-queue button small {
  overflow-wrap: anywhere;
}

.share-queue button small {
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(440px, 1.15fr);
  gap: 18px;
  align-items: start;
}

.focus-panel {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #cbdad4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.focus-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.focus-top span {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.focus-top h2 {
  margin-bottom: 5px;
  font-size: 24px;
}

.focus-top p {
  margin-bottom: 0;
  color: var(--muted);
}

.focus-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.focus-facts,
.focus-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.focus-facts h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.focus-facts p {
  white-space: pre-line;
  color: var(--ink-soft);
  line-height: 1.55;
}

.mobile-note-hint {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #f7faf8;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.focus-form {
  display: grid;
  gap: 10px;
}

.focus-form textarea {
  min-height: 108px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ghost-button,
.button-row button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid #b7c8c2;
  background: #ffffff;
  color: var(--accent);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.button-row .primary-action {
  border-color: transparent;
  background: var(--accent);
  color: #ffffff;
}

.button-row .danger-action {
  border-color: #d7b5aa;
  color: #8a3e2d;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.form-panel,
.list-panel {
  padding: 20px;
  max-height: calc(100vh - 160px);
  overflow: auto;
}

.form-panel {
  position: sticky;
  top: 24px;
}

.data-panel {
  position: static;
}

.security-panel {
  position: static;
}

.security-form {
  display: grid;
  gap: 4px;
}

.system-status {
  display: grid;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #d8e2dd;
  background: #f7faf8;
}

.status-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.system-status h3 {
  margin: 0;
  font-size: 16px;
}

.system-status span {
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 78px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  text-align: center;
}

.status-pill.ok {
  background: #dcebe5;
  color: #244a3f;
}

.status-pill.warn {
  background: #f4ddd6;
  color: #8a3e2d;
}

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

.status-check {
  min-height: 58px;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid #d8e2dd;
  background: #ffffff;
}

.status-check small {
  display: inline-block;
  margin-bottom: 5px;
  border-radius: 999px;
  padding: 2px 6px;
  background: #eef4f2;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-check.ok {
  border-color: #b7c8c2;
}

.status-check.warn {
  border-color: #d7b5aa;
  background: #fff8f6;
}

.status-check.warn small {
  background: #f4ddd6;
  color: #8a3e2d;
}

.status-check strong,
.status-check span {
  display: block;
}

.status-check strong {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 13px;
}

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

.backup-guardrails {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.backup-guardrails span {
  display: block;
  border-left: 3px solid #b7c8c2;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.access-row.inactive {
  opacity: 0.72;
}

.access-actions {
  display: grid;
  gap: 6px;
}

.access-toggle,
.owner-lock {
  min-width: 86px;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid #b7c8c2;
  background: #ffffff;
  color: var(--accent);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.generated-code {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #b7c8c2;
  background: #eef4f2;
}

.generated-code span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.generated-code strong {
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 18px;
  letter-spacing: 0;
}

.owner-lock {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.create-access-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.create-access-form h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.session-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.session-list h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.session-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #f7faf8;
  border: 1px solid #d8e2dd;
}

.session-item strong,
.session-item span {
  display: block;
}

.session-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.session-item button {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid #d7b5aa;
  background: #ffffff;
  color: #8a3e2d;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.security-form button {
  justify-self: end;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #ffffff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.audit-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.audit-item {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: #f7faf8;
  border: 1px solid #d8e2dd;
}

.audit-item strong {
  color: var(--accent);
  font-size: 13px;
}

.audit-item span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.data-actions {
  display: flex;
  margin-bottom: 12px;
}

.data-actions .primary {
  text-decoration: none;
}

.import-form {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.snapshot-form {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.snapshot-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.snapshot-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d8e2dd;
  background: #f7faf8;
}

.snapshot-item strong,
.snapshot-item span {
  display: block;
}

.snapshot-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.snapshot-item button {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid #b7c8c2;
  background: #ffffff;
  color: var(--accent);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.snapshot-preview {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #b7c8c2;
  background: #eef4f2;
}

.snapshot-preview strong,
.snapshot-preview span {
  display: block;
}

.snapshot-preview span {
  color: var(--muted);
  font-size: 12px;
}

.snapshot-preview dl {
  margin: 4px 0 0;
}

.snapshot-preview .danger-action {
  justify-self: end;
  margin-top: 4px;
}

.import-form button,
.snapshot-form button {
  justify-self: end;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid #b7c8c2;
  background: #ffffff;
  color: var(--accent);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
}

.import-preview {
  margin-top: 12px;
}

.import-preview article {
  padding: 12px;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #f7faf8;
}

.import-preview strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
}

.import-warning {
  margin: 8px 0;
  border-left: 3px solid #b6523a;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff8f6;
  color: #7b3425;
  font-size: 13px;
  font-weight: 700;
}

.import-warning.soft {
  border-left-color: #b7c8c2;
  background: #f5f8f6;
  color: var(--muted);
}

.import-preview dl {
  margin-bottom: 0;
}

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

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

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.field.compact {
  margin-bottom: 0;
}

.field input,
.field textarea,
.field select,
.comment-form input {
  width: 100%;
  border: 1px solid #cbd7d1;
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--text);
  padding: 10px 11px;
  outline: none;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.4;
}

.primary,
.comment-form button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 8px 12px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.record-card {
  padding: 16px;
  margin-bottom: 12px;
  background: #fbfcfb;
  box-shadow: none;
}

.record-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  margin-bottom: 4px;
}

.panel-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-heading.tight {
  margin-bottom: 10px;
}

.part-panel {
  position: static;
}

.team-panel {
  position: static;
}

.psycho-panel {
  position: static;
}

.psycho-form {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.psycho-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.psycho-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.psycho-card.selected {
  border-color: #9abbb2;
  background: #f1f8f5;
}

.psycho-card h3 {
  margin-bottom: 3px;
  font-size: 16px;
}

.psycho-card span {
  color: var(--muted);
  font-size: 12px;
}

.psycho-card p {
  margin: 9px 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.psycho-card dl {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

.psycho-detail {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.psycho-detail h3 {
  margin-bottom: 12px;
}

.psycho-edit-form {
  display: grid;
  gap: 8px;
}

.part-form {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.part-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.part-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.part-card.selected {
  border-color: #9abbb2;
  background: #f1f8f5;
}

.part-card h3 {
  margin-bottom: 3px;
  font-size: 16px;
}

.part-card span {
  color: var(--muted);
  font-size: 12px;
}

.part-card p {
  margin: 9px 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.part-card dl {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 10px;
  border: 1px solid #b7c8c2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.link-button {
  background: #f7faf8;
}

.part-detail {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.part-detail h3 {
  margin-bottom: 12px;
}

.part-edit-form {
  display: grid;
  gap: 8px;
}

.linked-events {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.linked-events h4 {
  margin-bottom: 2px;
  font-size: 14px;
}

.linked-events button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink-soft);
  padding: 8px 10px;
  text-align: left;
}

.team-builder {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #f7faf8;
}

.team-builder h3 {
  margin-bottom: 4px;
}

.team-builder textarea {
  min-height: 78px;
}

.tops-grid {
  display: grid;
  gap: 10px;
}

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

.team-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.team-card h3 {
  margin-bottom: 3px;
  font-size: 16px;
}

.team-card span {
  color: var(--muted);
  font-size: 12px;
}

.team-card p {
  max-height: 170px;
  overflow: auto;
  white-space: pre-line;
  margin: 9px 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-edit-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.team-edit-form h4 {
  margin-bottom: 2px;
  font-size: 14px;
}

.team-edit-form textarea {
  min-height: 78px;
}

.team-edit-form input,
.team-edit-form select,
.team-edit-form textarea {
  width: 100%;
  border: 1px solid #cbd7d1;
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--text);
  padding: 9px 10px;
}

.team-edit-form button {
  justify-self: end;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid #b7c8c2;
  background: #ffffff;
  color: var(--accent);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
}

.print-shell {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #cbdad4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.print-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.print-toolbar h2 {
  margin-bottom: 4px;
}

.print-toolbar p {
  margin-bottom: 0;
  color: var(--muted);
}

.print-document {
  max-width: 820px;
  min-height: 980px;
  margin: 0 auto;
  padding: 48px;
  border: 1px solid #d9e1dc;
  background: #ffffff;
  color: #1d2528;
}

.template-line {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.print-document h1 {
  margin-bottom: 20px;
  color: #203133;
  font-size: 32px;
}

.print-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #f7faf8;
}

.print-meta dd,
.print-section p {
  white-space: pre-line;
}

.print-section {
  break-inside: avoid;
  margin-top: 18px;
}

.print-section h2 {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 20px;
}

.print-section p {
  margin-bottom: 0;
  line-height: 1.58;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.65fr) minmax(110px, 0.5fr) minmax(120px, 0.55fr) minmax(140px, 0.7fr) minmax(150px, 0.75fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.toggle-filter {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.toggle-filter input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.filter-bar button {
  min-height: 38px;
  border: 1px solid #b7c8c2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.import-badge,
.status-badge {
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px !important;
  font-weight: 800;
}

.import-badge {
  border: 1px solid #d2b9aa;
  background: #fff5ef;
  color: var(--accent-2) !important;
}

.status-badge {
  border: 1px solid #c9d5d8;
  background: #f7fafb;
  color: #415154 !important;
}

.status-checking {
  border-color: #c7d1aa;
  background: #f6f8eb;
  color: #52621f !important;
}

.status-assigned {
  border-color: #aecfc4;
  background: #edf8f4;
  color: #276252 !important;
}

.status-paused {
  border-color: #d7c6bd;
  background: #fbf1ec;
  color: #884b34 !important;
}

.record-card h3 {
  margin-bottom: 4px;
  font-size: 18px;
}

.record-card span {
  color: var(--muted);
  font-size: 13px;
}

.record-card p {
  color: var(--ink-soft);
  line-height: 1.5;
}

.situation-form textarea[name="innerSentences"],
.situation-form textarea[name="questions"],
.situation-form textarea[name="insight"],
.situation-form textarea[name="nextTask"] {
  min-height: 76px;
}

.situation-workflow {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  background: #f7faf8;
}

.workflow-meter {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 7px 12px;
  align-items: center;
  margin-bottom: 12px;
}

.workflow-meter span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.workflow-meter strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.workflow-meter div {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce7e2;
}

.workflow-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.workflow-meter.small {
  margin: 12px 0;
}

.situation-workflow dl {
  margin-bottom: 0;
}

.situation-workflow dd {
  white-space: pre-line;
}

.situation-workflow .filled dd {
  color: #214f46;
  font-weight: 700;
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.comments {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.classification-form,
.share-form {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  background: #f2f6f4;
}

.share-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.classification-form {
  background: #f7faf8;
}

.classification-form textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.4;
}

.quick-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-parts button {
  min-height: 30px;
  border: 1px solid #cbd7d1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-soft);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}

.share-form label {
  display: grid;
  gap: 6px;
}

.share-form span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.share-form select,
.classification-form input,
.classification-form select,
.classification-form textarea,
.part-edit-form input,
.part-edit-form select,
.part-edit-form textarea,
.psycho-edit-form input,
.psycho-edit-form select,
.psycho-edit-form textarea,
.team-builder input,
.team-builder select,
.team-builder textarea {
  width: 100%;
  border: 1px solid #cbd7d1;
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--text);
  padding: 9px 10px;
}

.share-form button,
.classification-form button,
.part-edit-form button,
.psycho-edit-form button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid #b7c8c2;
  background: #ffffff;
  color: var(--accent);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
}

.classification-form button {
  justify-self: end;
}

.comments h4 {
  margin-bottom: 9px;
  font-size: 14px;
}

.comment {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-2);
  margin-bottom: 8px;
}

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

.comment span {
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.comment p {
  margin-bottom: 0;
  line-height: 1.45;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.empty {
  padding: 22px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
}

.empty.small {
  padding: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.fatal {
  padding: 32px;
}

/* ECHO shell: sichtbare Produkt- und Navigationslogik über dem bestehenden Arbeitskern. */
#app {
  grid-template-columns: 292px minmax(0, 1fr);
  background: linear-gradient(90deg, #eef3f0 0, #f8faf8 32%, #fbfcfb 100%);
}

.sidebar.system-rail {
  padding: 22px 16px;
  gap: 18px;
  background: #1f3434;
  color: #f7fbfa;
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.5);
  background: #f4f8f6;
  color: #1f3434;
  font-size: 17px;
}

.brand strong {
  letter-spacing: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
}

.echo-line {
  max-width: 198px;
  color: rgba(247, 251, 250, 0.74);
  font-size: 10px;
  line-height: 1.35;
}

.product-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.product-card span {
  color: rgba(247, 251, 250, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

.product-card strong {
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1.25;
}

.product-card em {
  color: rgba(247, 251, 250, 0.8);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.product-card p {
  margin: 0;
  color: rgba(247, 251, 250, 0.74);
  font-size: 12px;
  line-height: 1.45;
}

.module-nav {
  display: grid;
  gap: 6px;
}

.module-nav button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(247, 251, 250, 0.76);
  padding: 8px 9px;
  text-align: left;
}

.module-nav button:hover,
.module-nav button.active {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.module-nav strong {
  width: 28px;
  color: rgba(247, 251, 250, 0.5);
  font-size: 12px;
}

.module-nav span {
  font-size: 13px;
  font-weight: 800;
}

.module-nav em,
.personal-tag {
  border-radius: 999px;
  background: rgba(205, 222, 214, 0.14);
  color: #d8e7e1;
  padding: 3px 6px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.echo-workspace {
  padding: 30px 34px;
}

.breadcrumb {
  display: block;
  margin-bottom: 8px;
  color: #60706f;
  font-size: 12px;
  font-weight: 800;
}

.role-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.role-switch span,
.role-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd8d1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #37514e;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
}

.role-switch span.active {
  border-color: #7b9c91;
  background: #e8f0ec;
  color: #173836;
}

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

.metric,
.review-panel,
.pattern-panel,
.share-panel,
.form-panel,
.list-panel,
.focus-panel,
.part-detail,
.psycho-detail {
  border: 1px solid #cbd8d1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 38px rgba(32, 52, 50, 0.08);
}

.view-workspace {
  display: grid;
  gap: 16px;
}

.function-deck {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.deck-heading {
  border: 1px solid #cbd8d1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 16px;
}

.deck-heading span {
  display: block;
  margin-bottom: 5px;
  color: #23615c;
  font-size: 11px;
  font-weight: 900;
}

.deck-heading h2 {
  margin-bottom: 6px;
}

.deck-heading p {
  margin: 0;
  color: #536463;
}

.echo-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 16px;
}

.system-marker,
.today-panel,
.module-grid,
.personal-note {
  border: 1px solid #cbd8d1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 16px;
}

.system-marker span,
.today-panel span,
.personal-note span {
  display: block;
  margin-bottom: 6px;
  color: #23615c;
  font-size: 11px;
  font-weight: 900;
}

.system-marker p,
.today-panel p,
.personal-note p {
  margin: 0;
  color: #536463;
  line-height: 1.5;
}

.marker-rule {
  display: block;
  color: #0d2021;
  font-size: 20px;
  line-height: 1.25;
}

.marker-body {
  margin-top: 10px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

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

.module-grid button {
  display: grid;
  gap: 7px;
  min-height: 112px;
  border: 1px solid #d5e0db;
  border-left: 4px solid #b7cbc3;
  border-radius: 8px;
  background: #fbfdfc;
  color: #182a2b;
  padding: 12px;
  text-align: left;
}

.module-grid button:hover,
.module-grid button.personal-card:hover {
  border-color: #8faea4;
  background: #f4f8f6;
}

.module-grid button strong {
  font-size: 15px;
}

.module-grid button span {
  color: #647675;
  font-size: 12px;
  line-height: 1.45;
}

.module-grid button em,
.personal-note em {
  width: fit-content;
  border-radius: 999px;
  background: #e8f0ec;
  color: #315a55;
  padding: 4px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.module-grid button.personal-card {
  border-left-color: #947b63;
  background: #fcfbf8;
}

.personal-note {
  border-left: 4px solid #947b63;
}

.admin-workspace {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (max-width: 1180px) {
  .metrics,
  .module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .echo-intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  #app,
  .workspace,
  .focus-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .form-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .focus-top,
  .pattern-head,
  .pattern-grid,
  .pattern-counters,
  .share-head,
  .share-grid,
  .share-actions,
  .comment-form,
  .share-form,
  .classification-form,
  .review-panel,
  .filter-bar {
    display: grid;
  }

  .metrics,
  .grid.two,
  dl,
  .print-meta,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .module-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .role-switch {
    justify-content: flex-start;
  }
}

@media print {
  @page {
    margin: 18mm;
  }

  body {
    background: #ffffff;
  }

  body * {
    visibility: hidden;
  }

  .print-shell,
  .print-shell * {
    visibility: visible;
  }

  .print-shell {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .print-toolbar {
    display: none;
  }

  .print-document {
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .print-meta {
    border-color: #bfcac5;
    background: #ffffff;
  }

  .print-section {
    page-break-inside: avoid;
  }
}
