:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #ece8de;
  --ink: #17201c;
  --muted: #66706a;
  --line: #d9d2c3;
  --green: #1d6b4f;
  --green-dark: #122f27;
  --gold: #b0842e;
  --red: #9d3d32;
  --shadow: 0 18px 44px rgba(38, 45, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

button,
input {
  font: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  background: #13251f;
  color: #f6f2e9;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  display: grid;
  place-items: center;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

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

.brand small,
.label,
.eyebrow,
.count,
.side-panel p,
.section-copy,
.tool-card p,
.list-row small,
.access-row small {
  color: var(--muted);
}

.sidebar .brand small,
.sidebar .side-panel p,
.sidebar .label {
  color: rgba(246, 242, 233, 0.72);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-group {
  display: grid;
  gap: 7px;
  padding: 8px 0;
}

.nav-parent {
  font-weight: 700;
}

.nav-group-label {
  padding: 0 14px;
  color: rgba(246, 242, 233, 0.58);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-link {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(246, 242, 233, 0.82);
}

.tool-link {
  padding-left: 26px;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active,
.nav-link:hover {
  background: #f6f2e9;
  color: #13251f;
}

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

.side-panel strong,
.label {
  display: block;
}

.label,
.eyebrow,
.count,
.card-topline,
.tag-row,
.list-row small,
.access-row small {
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main {
  padding: 34px;
}

.hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: end;
  padding: 42px;
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(19, 37, 31, 0.92), rgba(29, 107, 79, 0.76)),
    url("./Arbeitshandb%C3%BCcher%20und%20Orga/capitanis-dashboard.png") center / cover;
  color: #fffaf0;
  box-shadow: var(--shadow);
}

.hero .eyebrow,
.hero p {
  color: rgba(255, 250, 240, 0.78);
}

.hero h1 {
  max-width: 860px;
  margin: 8px 0 18px;
  font-size: clamp(2.2rem, 5vw, 5.25rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  font-size: 1.04rem;
}

.quick-actions {
  display: grid;
  gap: 10px;
}

.primary-action,
.secondary-action,
.card-link,
.note-form button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-action,
.card-link,
.note-form button {
  background: var(--green);
  color: white;
}

.secondary-action {
  border-color: rgba(255, 255, 255, 0.34);
  color: #fffaf0;
  background: rgba(255, 255, 255, 0.08);
}

.toolbar,
.section {
  margin-top: 22px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.search-box {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.search-box input,
.note-form textarea,
.note-form input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.search-box input,
.note-form input {
  min-height: 44px;
}

.note-form textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.filter-tabs button.active {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
}

.section {
  padding: 28px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.section h2,
.section h3,
.section p,
.section ul,
.hero h1 {
  margin-top: 0;
}

.section h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.section-copy {
  max-width: 460px;
}

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

.tool-card,
.assessment-grid article {
  padding: 18px;
  border-radius: 8px;
  background: #fbfaf6;
  border: 1px solid var(--line);
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 265px;
}

.card-topline,
.tag-row,
.list-row,
.access-row {
  display: flex;
  gap: 10px;
}

.card-topline,
.list-row {
  justify-content: space-between;
  align-items: center;
}

.status {
  padding: 3px 8px;
  border-radius: 999px;
}

.status.ok {
  color: var(--green);
  background: rgba(29, 107, 79, 0.12);
}

.status.pending {
  color: var(--gold);
  background: rgba(176, 132, 46, 0.14);
}

.tag-row {
  flex-wrap: wrap;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #4b554f;
}

.card-link {
  margin-top: auto;
}

.list-panel,
.notes-panel {
  display: grid;
  gap: 10px;
}

.list-row,
.access-row,
.note-row {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.list-row strong,
.list-row small,
.access-row strong,
.access-row small {
  display: block;
}

.access-row {
  display: grid;
}

.access-row p {
  margin: 6px 0 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
}

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

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

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

.note-row button {
  border: 1px solid rgba(157, 61, 50, 0.28);
  border-radius: 8px;
  min-height: 34px;
  background: rgba(157, 61, 50, 0.08);
  color: var(--red);
  cursor: pointer;
}

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

.assessment-grid ul {
  margin-bottom: 0;
  padding-left: 20px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

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

  .nav-group {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-group-label {
    grid-column: 1 / -1;
  }

  .hero,
  .split,
  .toolbar {
    grid-template-columns: 1fr;
  }

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

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

  .hero,
  .section {
    padding: 22px;
  }

  .nav,
  .nav-group,
  .card-grid,
  .assessment-grid,
  .note-form {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .section-head,
  .note-row {
    align-items: stretch;
    flex-direction: column;
  }
}
