:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-muted: #eef2f4;
  --text: #1f2933;
  --muted: #65727f;
  --line: #d9e1e7;
  --accent: #146c72;
  --accent-strong: #0f5257;
  --accent-soft: #dceff0;
  --blue: #2d5f9a;
  --amber: #9a6a1f;
  --green: #2d6d4a;
  --shadow: 0 12px 28px rgba(31, 41, 51, 0.08);
  --radius: 8px;
  --sidebar: 248px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

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

button,
input {
  font: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
  padding: 24px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 8px;
  font-size: 18px;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.nav-list {
  display: grid;
  gap: 6px;
  margin-top: 32px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  padding: 8px 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  background: var(--surface-muted);
  color: var(--text);
  outline: none;
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--accent);
  font-size: 15px;
}

.nav-logo {
  display: grid;
  width: 42px;
  height: 38px;
  place-items: center;
  overflow: visible;
  flex: 0 0 auto;
}

.nav-logo-wide {
  width: 78px;
}

.nav-logo img {
  display: block;
  max-width: 38px;
  max-height: 34px;
  object-fit: contain;
}

.nav-logo-wide img {
  max-width: 78px;
  max-height: 34px;
}

.main-area {
  min-width: 0;
  padding: 28px clamp(18px, 4vw, 48px) 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.organization-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.organization-logo {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  overflow: visible;
  flex: 0 0 auto;
}

.organization-logo.is-wide {
  width: 188px;
}

.organization-logo img {
  display: block;
  max-width: 62px;
  max-height: 50px;
  object-fit: contain;
}

.organization-logo.is-wide img {
  max-width: 188px;
  max-height: 58px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.search-wrap {
  width: min(100%, 360px);
}

.search-wrap input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  outline: none;
  box-shadow: 0 1px 0 rgba(31, 41, 51, 0.02);
}

.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 108, 114, 0.16);
}

.overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.metric {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

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

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.workspace-section {
  padding-top: 4px;
}

.compact-section {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

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

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.filter-tab {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 7px 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.filter-tab:hover,
.filter-tab:focus-visible,
.filter-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}

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

.tool-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  color: inherit;
  cursor: pointer;
}

.tool-card:hover,
.tool-card:focus-within {
  border-color: rgba(20, 108, 114, 0.5);
}

.tool-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 108, 114, 0.16), var(--shadow);
  outline: none;
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tool-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.tool-image {
  aspect-ratio: 16 / 8;
  margin: -10px -10px 8px;
  overflow: hidden;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line);
}

.tool-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.tool-status {
  border-radius: 999px;
  padding: 2px 6px;
  background: #e8f4ec;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.public-card-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  padding: 2px 6px 2px 4px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.public-card-toggle input {
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: var(--accent);
}

.public-card-toggle:has(input:checked) {
  background: #e7f3eb;
  color: var(--green);
}

.tool-status[data-status="in-arbeit"] {
  background: #edf2fb;
  color: var(--blue);
}

.tool-status[data-status="geplant"] {
  background: #fbf1dd;
  color: var(--amber);
}

.tool-body {
  padding-top: 7px;
}

.tool-body h3 {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0;
}

.tool-body p {
  display: -webkit-box;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 750;
}

.tool-actions {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
}

.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: var(--radius);
  background: var(--text);
  color: #ffffff;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

.open-link:hover,
.open-link:focus-visible {
  background: var(--accent-strong);
  outline: none;
}

.meta-text {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  padding: 22px;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 18px;
  }

  .brand {
    padding: 0;
  }

  .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    margin-top: 14px;
    padding-bottom: 2px;
  }

  .topbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search-wrap {
    width: 100%;
  }

  .filter-tabs {
    justify-content: flex-start;
  }
}

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

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

@media (max-width: 620px) {
  .main-area {
    padding: 22px 14px 36px;
  }

  .organization-heading {
    gap: 12px;
  }

  .organization-logo {
    width: 58px;
    height: 58px;
  }

  .organization-logo.is-wide {
    width: 118px;
  }

  .organization-logo img {
    max-width: 48px;
    max-height: 40px;
  }

  .organization-logo.is-wide img {
    max-width: 106px;
    max-height: 34px;
  }

  .overview {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }
}
