/* Jost – Self-Hosted */
@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost/Jost-300-Light.837069ebcd33.otf") format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost/Jost-300-LightItalic.ef52cc7220ef.otf") format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost/Jost-400-Book.9d6c1a53bee4.otf") format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost/Jost-400-BookItalic.f4b63cd69ed7.otf") format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost/Jost-500-Medium.e7d669944283.otf") format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost/Jost-500-MediumItalic.4b2f5a7ed7aa.otf") format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost/Jost-700-Bold.813b3d255120.otf") format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost/Jost-700-BoldItalic.996691fd3ad7.otf") format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bs-body-font-family: 'Jost', sans-serif;
  --bs-body-font-weight: 400;
  --bs-primary: #26873f;
  --bs-primary-rgb: 38, 135, 63;
  --ot-ink: #1a1a1a;
  --ot-green: #26873f;
  --ot-green-dark: #17672d;
  --ot-green-soft: #e8f3eb;
  --ot-green-tint: #b7d7bd;
  --ot-red: #c21522;
  --ot-red-soft: #fbeaec;
  --ot-gold: #f2b705;
  --ot-gold-soft: #fff5cf;
  --ot-teal: #0e5b52;
  --ot-teal-soft: #e5f3f1;
  --ot-paper: #ffffff;
  --ot-canvas: #f2f4f2;
  --ot-line: #dce2dc;
  --ot-muted: #667068;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 8% -10%, rgba(38, 135, 63, 0.09), transparent 27rem),
    var(--ot-canvas);
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  color: var(--ot-ink);
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body > main {
  flex: 1 0 auto;
}

.app-footer {
  flex-shrink: 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(33, 62, 40, 0.1);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ot-muted);
  font-size: 0.875rem;
}

.app-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: min(1540px, 100%);
  margin-inline: auto;
  padding: 1rem clamp(1rem, 3vw, 2.5rem);
}

.app-footer a {
  color: var(--ot-green-dark);
  text-decoration: none;
}

.app-footer a:hover,
.app-footer a:focus-visible {
  text-decoration: underline;
}

.legal-page {
  max-width: 960px;
}

.legal-section {
  scroll-margin-top: 1.5rem;
}

.legal-details dt {
  color: var(--ot-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.legal-details dd {
  margin-bottom: 0.75rem;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 400;
}

label, .form-label, .col-form-label {
  font-weight: 400;
}

b, strong, th {
  font-weight: 500;
}

.form-control, .form-select {
  font-weight: 400;
  border-color: #cfd7d0;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--ot-green);
  box-shadow: 0 0 0 0.2rem rgba(38, 135, 63, 0.16);
}

.navbar-title {
  font-weight: 400;
}

.card-body > :last-child {
  margin-bottom: 0 !important;
}

.card {
  border: 0;
}

.btn {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.btn-primary {
  --bs-btn-bg: var(--ot-green);
  --bs-btn-border-color: var(--ot-green);
  --bs-btn-hover-bg: var(--ot-green-dark);
  --bs-btn-hover-border-color: var(--ot-green-dark);
  --bs-btn-active-bg: #125625;
  --bs-btn-active-border-color: #125625;
  --bs-btn-disabled-bg: #7fa98a;
  --bs-btn-disabled-border-color: #7fa98a;
}

.btn-outline-primary {
  --bs-btn-color: var(--ot-green-dark);
  --bs-btn-border-color: #78b488;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--ot-green);
  --bs-btn-hover-border-color: var(--ot-green);
  --bs-btn-focus-shadow-rgb: 38, 135, 63;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--ot-green-dark);
  --bs-btn-active-border-color: var(--ot-green-dark);
  --bs-btn-disabled-color: #7fa98a;
  --bs-btn-disabled-border-color: #9dbba5;
}

.btn-success {
  --bs-btn-bg: var(--ot-green);
  --bs-btn-border-color: var(--ot-green);
  --bs-btn-hover-bg: var(--ot-green-dark);
  --bs-btn-hover-border-color: var(--ot-green-dark);
  --bs-btn-active-bg: #125625;
  --bs-btn-active-border-color: #125625;
}

.app-navbar {
  min-height: 68px;
  padding-block: 0;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(33, 62, 40, 0.1);
  box-shadow: 0 10px 32px rgba(21, 51, 28, 0.08);
  backdrop-filter: blur(16px);
}

.app-navbar__inner {
  width: min(1540px, 100%);
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 68px;
  margin-right: clamp(1.5rem, 4vw, 4rem);
  padding-block: 0.55rem;
}

.app-brand img {
  width: 94px;
  height: 40px;
  object-fit: contain;
  filter: none;
}

.app-brand__divider {
  width: 1px;
  height: 24px;
  background: var(--ot-line);
}

.app-brand .navbar-title {
  color: #59635c;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-nav-links {
  align-items: stretch;
  min-height: 68px;
}

.app-nav-links .nav-item {
  display: flex;
}

.app-nav-links .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-inline: 1rem;
  color: #576159;
  font-weight: 500;
}

.app-nav-links .nav-link::after {
  position: absolute;
  right: 1rem;
  bottom: 0;
  left: 1rem;
  height: 3px;
  content: "";
  background: transparent;
  border-radius: 3px 3px 0 0;
}

.app-nav-links .nav-link:hover,
.app-nav-links .nav-link.active {
  color: var(--ot-green-dark);
}

.app-nav-links .nav-link.active::after {
  background: var(--ot-green);
}

.app-user-area {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.user-code-badge {
  display: inline-grid;
  flex: 0 0 auto;
  width: auto;
  min-width: 2.65rem;
  height: 2rem;
  padding-inline: 0.55rem;
  place-items: center;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  vertical-align: middle;
  background: linear-gradient(135deg, var(--ot-green), var(--ot-teal));
  border-radius: 999px;
}

.user-code-badge--compact {
  min-width: 2.15rem;
  height: 1.35rem;
  padding-inline: 0.42rem;
  font-size: 0.65rem;
}

.app-user-copy {
  display: grid;
  min-width: 0;
  line-height: 1.12;
}

.app-user-copy strong {
  overflow: hidden;
  max-width: 150px;
  font-size: 0.82rem;
  text-overflow: ellipsis;
}

.app-user-copy small {
  color: var(--ot-muted);
  font-size: 0.68rem;
}

.app-logout-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.workspace-eyebrow {
  display: block;
  color: var(--ot-teal);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.status-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid;
  border-radius: 0.7rem;
}

.status-callout > i {
  margin-top: 0.1rem;
  font-size: 1.05rem;
}

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

.status-callout span,
.status-callout li {
  font-size: 0.82rem;
}

.status-callout--warning {
  color: var(--ot-ink);
  background: var(--ot-gold-soft);
  border-color: #eed778;
}

.status-callout--danger {
  color: #94131d;
  background: var(--ot-red-soft);
  border-color: #e4aab0;
}

.status-callout--muted {
  color: #59615b;
  background: #f1f3f1;
  border-color: #d7ddd8;
}

.auth-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(38, 135, 63, 0.2), transparent 30rem),
    radial-gradient(circle at 90% 90%, rgba(14, 91, 82, 0.16), transparent 28rem),
    #edf1ed;
}

.auth-page .navbar {
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

.auth-page .app-brand .navbar-title,
.auth-page .app-navbar__toggle,
.auth-page .app-user-area {
  display: none;
}

.auth-container {
  display: grid;
  min-height: 0;
  align-items: center;
  padding-block: 2rem;
}

.auth-container > #global-messages:not(.mb-3) {
  display: none;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  width: min(1080px, 100%);
  margin: auto;
}

.auth-welcome {
  padding: clamp(1rem, 3vw, 2.5rem);
}

.auth-kicker {
  display: inline-flex;
  padding: 0.34rem 0.6rem;
  color: var(--ot-teal);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(14, 91, 82, 0.16);
  border-radius: 999px;
}

.auth-welcome h1 {
  max-width: 680px;
  margin: 0.9rem 0 1rem;
  font-size: clamp(2.45rem, 4.1vw, 3.55rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.auth-welcome h1 em {
  color: var(--ot-green);
  font-style: normal;
}

.auth-benefits {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.auth-benefits span {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-benefits i {
  color: var(--ot-green);
}

.auth-card {
  position: relative;
  width: 110%;
  justify-self: end;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 1.2rem;
  box-shadow: 0 28px 70px rgba(24, 48, 30, 0.16);
  backdrop-filter: blur(14px);
}

.auth-card::before {
  position: absolute;
  inset: 0.55rem;
  z-index: -1;
  content: "";
  border: 1px solid rgba(38, 135, 63, 0.08);
  border-radius: 0.9rem;
}

.auth-card-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.2rem;
  place-items: center;
  color: #fff;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--ot-green), var(--ot-teal));
  border-radius: 0.75rem;
  box-shadow: 0 9px 20px rgba(38, 135, 63, 0.24);
}

.auth-card h2 {
  margin: 0.3rem 0 0.25rem;
  font-size: 1.55rem;
  font-weight: 600;
}

.auth-card .form-control {
  min-height: 46px;
  background: #fafbfa;
}

.auth-help {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ot-line);
}

.auth-help a {
  color: var(--ot-teal);
  font-weight: 500;
  text-decoration: none;
}

.auth-help span {
  color: var(--ot-muted);
  font-size: 0.75rem;
  text-align: center;
}

@media (max-width: 899.98px) {
  .auth-shell { grid-template-columns: 1fr; gap: 1rem; }
  .auth-welcome { display: none; }
  .auth-card { width: min(480px, 100%); margin-inline: auto; }
}

.htmx-indicator {
  opacity: 0;
  pointer-events: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 200ms ease-in;
}

/* Projekt-Workspace */
.projects-container {
  width: min(1540px, 100%);
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

.projects-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin: 0.5rem 0 1.5rem;
}

.projects-hero h1 {
  margin: 0.25rem 0 0.35rem;
  font-size: clamp(2rem, 3vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.projects-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--ot-muted);
  font-size: 1rem;
}

.projects-create-button,
.project-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.project-open-button {
  min-width: 84px;
}

.project-search-panel {
  margin-bottom: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(42, 72, 49, 0.1);
  border-radius: 0.9rem;
  box-shadow: 0 12px 34px rgba(28, 60, 35, 0.07);
}

.project-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.project-search-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 46px;
  padding-inline: 0.9rem;
  background: #f7f9f7;
  border: 1px solid #d4dbd5;
  border-radius: 0.58rem;
}

.project-search-control:focus-within {
  background: #fff;
  border-color: var(--ot-green);
  box-shadow: 0 0 0 0.2rem rgba(38, 135, 63, 0.13);
}

.project-search-control.is-invalid {
  border-color: var(--ot-red);
}

.project-search-control > i {
  margin-right: 0.7rem;
  color: var(--ot-green);
}

.project-search-control input {
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
}

.project-search-clear {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--ot-muted);
  text-decoration: none;
  border-radius: 50%;
}

.project-search-clear:hover {
  color: var(--ot-green-dark);
  background: var(--ot-green-soft);
}

.project-scope-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 4.55rem;
  align-items: stretch;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.project-scope-tab {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 76px;
  padding: 0.85rem 1rem;
  color: var(--ot-ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(47, 70, 52, 0.12);
  border-radius: 0.85rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.project-scope-tab--archive {
  grid-template-columns: 1fr;
  justify-items: center;
  font-size: 1.15rem;
}

.project-scope-tab:hover {
  color: var(--ot-ink);
  border-color: #9dc8a8;
  box-shadow: 0 10px 25px rgba(33, 76, 43, 0.08);
  transform: translateY(-1px);
}

.project-scope-tab.is-active {
  background: linear-gradient(135deg, #fff, #eff8f1);
  border-color: #8ec29b;
  box-shadow: 0 12px 30px rgba(34, 99, 49, 0.11);
}

.project-scope-tab.is-active::after {
  position: absolute;
  right: 0.9rem;
  bottom: -1px;
  left: 0.9rem;
  height: 3px;
  content: "";
  background: var(--ot-green);
  border-radius: 3px 3px 0 0;
}

.project-scope-icon {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  color: var(--ot-teal);
  background: var(--ot-teal-soft);
  border-radius: 0.68rem;
}

.project-scope-tab.is-active .project-scope-icon {
  color: var(--ot-green-dark);
  background: var(--ot-green-soft);
}

.project-scope-copy {
  display: grid;
  line-height: 1.2;
}

.project-scope-tab strong {
  font-size: 0.93rem;
}

.project-scope-tab small {
  margin-top: 0.2rem;
  color: var(--ot-muted);
  font-size: 0.75rem;
}

.project-scope-count {
  display: grid;
  min-width: 2rem;
  height: 2rem;
  padding-inline: 0.4rem;
  place-items: center;
  color: var(--ot-teal);
  font-size: 0.8rem;
  font-weight: 600;
  background: #edf2ee;
  border-radius: 999px;
}

.project-scope-tab.is-active .project-scope-count {
  color: #fff;
  background: var(--ot-green);
}

.project-list-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(43, 72, 50, 0.1);
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgba(28, 58, 34, 0.09);
}

.project-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 82px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e4e9e5;
}

.project-list-heading h2 {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.project-result-label {
  color: var(--ot-muted);
  font-size: 0.78rem;
}

.workspace-table {
  display: grid;
  grid-template-columns: var(--workspace-table-columns);
  width: 100%;
  min-width: 0;
}

.workspace-table thead,
.workspace-table tbody,
.workspace-table tr {
  display: contents;
}

.project-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.workspace-table thead th,
.workspace-table tbody td {
  display: grid;
  min-width: 0;
  height: var(--workspace-table-row-height);
  padding: 0.75rem 1rem;
  align-content: center;
  border-color: #edf0ed;
}

.workspace-table thead th {
  height: auto;
  color: #758078;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: #f6f8f6;
  border-bottom: 1px solid #e0e6e1;
}

.workspace-table :is(.col-action, .position-action) {
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}

.project-table {
  --workspace-table-columns:
    minmax(0, 3fr)
    minmax(0, 2fr)
    max-content
    max-content
    max-content
    max-content;
  --workspace-table-row-height: 78px;
}

.project-table tbody td {
  transition: background-color 130ms ease;
}

.project-table tbody tr:hover td {
  background: #f7fbf8;
}

.project-table .col-positions {
  justify-items: center;
}

.project-table-link {
  display: grid;
  min-width: 0;
  color: var(--ot-ink);
  line-height: 1.25;
  text-decoration: none;
}

.project-table-link:hover strong {
  color: var(--ot-green-dark);
}

.project-table-link strong {
  overflow: hidden;
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-number {
  overflow: hidden;
  margin-bottom: 0.22rem;
  color: var(--ot-teal);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: #566159;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-location i {
  flex: 0 0 auto;
  color: var(--ot-green);
}

.position-count {
  display: inline-grid;
  min-width: 2rem;
  height: 2rem;
  padding-inline: 0.35rem;
  place-items: center;
  color: var(--ot-teal);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--ot-teal-soft);
  border-radius: 999px;
}

.project-table .col-updated {
  color: #4e5951;
  font-size: 0.8rem;
}

.project-table .col-updated small {
  color: var(--ot-muted);
  font-size: 0.7rem;
}

.project-table .project-owner-avatar {
  justify-self: center;
}

.project-empty-state {
  display: grid;
  justify-items: center;
  min-height: 330px;
  padding: 3rem 1.5rem;
  align-content: center;
  text-align: center;
}

.project-empty-icon {
  display: grid;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  place-items: center;
  color: var(--ot-green-dark);
  font-size: 1.55rem;
  background: var(--ot-green-soft);
  border: 1px solid #c3ddca;
  border-radius: 1rem;
}

.project-empty-state h3 {
  margin-bottom: 0.35rem;
  font-size: 1.18rem;
  font-weight: 600;
}

.project-empty-state p {
  max-width: 510px;
  color: var(--ot-muted);
}

.project-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 0.75rem 1.25rem;
  color: var(--ot-muted);
  font-size: 0.8rem;
  border-top: 1px solid #e5eae6;
}

@media (max-width: 991.98px) {
  .app-navbar {
    padding-block: 0.4rem;
  }

  .app-brand,
  .app-nav-links {
    min-height: 58px;
  }

  .app-nav-links .nav-item {
    display: block;
  }

  .app-nav-links .nav-link {
    padding-block: 0.65rem;
    padding-inline: 0;
  }

  .app-nav-links .nav-link::after {
    display: none;
  }

  .app-user-area {
    padding: 0.8rem 0 0.35rem;
    border-top: 1px solid var(--ot-line);
  }

  .projects-hero {
    align-items: flex-start;
  }

  .project-table {
    --workspace-table-columns:
      minmax(0, 3fr)
      minmax(0, 2fr)
      max-content
      max-content
      max-content;
  }

  .project-table .col-updated {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .app-user-copy {
    display: none;
  }

  .projects-hero {
    display: grid;
    gap: 1rem;
  }

  .projects-create-button {
    width: 100%;
  }

  .project-search-form {
    grid-template-columns: 1fr;
  }

  .project-scope-tabs {
    grid-template-columns: minmax(0, 1fr) 4.55rem;
  }

  .project-scope-tab--mine {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .project-scope-tab--all {
    grid-column: 1;
    grid-row: 2;
  }

  .project-scope-tab--archive {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: 1fr;
    justify-content: center;
  }

  .project-list-heading,
  .project-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-table-wrap {
    overflow: visible;
  }

  .project-table {
    display: block;
    min-width: 0;
  }

  .project-table thead {
    display: none;
  }

  .project-table tbody {
    display: grid;
  }

  .project-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e8ece9;
  }

  .project-table tbody tr:last-child {
    border-bottom: 0;
  }

  .project-table tbody td {
    display: block;
    width: auto !important;
    height: auto;
    padding: 0;
    border: 0;
  }

  .project-table .col-project {
    grid-column: 1;
    grid-row: 1;
  }

  .project-table .col-location {
    grid-column: 1;
    grid-row: 2;
  }

  .project-table .col-action {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .project-table .col-positions,
  .project-table .col-updated,
  .project-table .col-owner {
    display: none;
  }
}

@media (max-width: 359.98px) {
  .project-table .col-location {
    display: none;
  }

  .project-table .col-action {
    grid-row: 1;
  }
}

/* Projektformular */
.project-form-shell {
  width: min(980px, 100%);
  margin-inline: auto;
}

.project-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 0.25rem 0 1.2rem;
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  background: linear-gradient(125deg, #fff, #edf7ef);
  border: 1px solid rgba(43, 72, 50, 0.11);
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(28, 58, 34, 0.08);
}

.project-form-header h1 {
  margin: 0.2rem 0 0.3rem;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.project-form-header p {
  margin: 0;
  color: var(--ot-muted);
}

.project-form-header-icon {
  display: grid;
  flex: 0 0 auto;
  width: 4.1rem;
  height: 4.1rem;
  place-items: center;
  color: #fff;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--ot-green), var(--ot-teal));
  border-radius: 1rem;
  box-shadow: 0 14px 28px rgba(38, 135, 63, 0.2);
}

.project-form-card {
  overflow: visible;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(43, 72, 50, 0.11);
  border-radius: 1rem;
  box-shadow: 0 14px 38px rgba(28, 58, 34, 0.075);
}

.project-form-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 72px;
  padding: 0.85rem 1.1rem;
  background: #f8faf8;
  border-bottom: 1px solid #e3e8e4;
  border-radius: 1rem 1rem 0 0;
}

.project-form-card-header > span {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--ot-green);
  border-radius: 0.65rem;
}

.project-form-card-header > div {
  display: grid;
  line-height: 1.15;
}

.project-form-card-header small {
  color: var(--ot-teal);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-form-card-header strong {
  margin-top: 0.2rem;
  font-size: 1rem;
  font-weight: 600;
}

.project-form-card > .card-body {
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.project-map-link {
  display: inline-flex;
  align-items: center;
}

.project-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(43, 72, 50, 0.12);
  border-radius: 0.85rem;
  box-shadow: 0 14px 36px rgba(25, 57, 32, 0.13);
}

.project-form-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

@media (max-width: 575.98px) {
  .project-form-header-icon {
    display: none;
  }

  .project-form-actions {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
  }

  .project-form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 419.98px) {
  .app-brand img {
    width: 82px;
  }

  .app-logout-button span {
    display: none;
  }
}

/* Projektdetail */
.project-detail-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin: 0.25rem 0 1.5rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(235, 246, 238, 0.96)),
    var(--ot-paper);
  border: 1px solid rgba(42, 77, 50, 0.12);
  border-radius: 1rem;
  box-shadow: 0 18px 44px rgba(28, 63, 36, 0.09);
}

.project-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: var(--ot-teal);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
}

.project-detail-title h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.project-detail-title p {
  margin: 0;
  color: var(--ot-muted);
  font-size: 0.8rem;
}

.project-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.project-detail-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 40px;
}

.project-delete-action {
  width: 42px;
  padding-inline: 0;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.27fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-info-card,
.project-stat-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(43, 72, 50, 0.1);
  border-radius: 1rem;
  box-shadow: 0 14px 36px rgba(28, 58, 34, 0.07);
}

.project-stat-card {
  display: grid;
  padding: 1.2rem;
  align-content: center;
  text-align: center;
}

.project-section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 76px;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #e5eae6;
}

.project-section-heading h2 {
  margin: 0.15rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.project-section-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  color: var(--ot-green-dark);
  background: var(--ot-green-soft);
  border-radius: 0.7rem;
}

.project-info-body {
  display: grid;
  grid-template-columns: minmax(170px, 0.45fr) minmax(260px, 1fr);
  align-items: stretch;
  gap: 1rem;
  padding: 1rem;
}

.project-address {
  display: grid;
  align-content: center;
  color: #59635c;
  font-size: 0.84rem;
}

.project-address strong {
  margin-bottom: 0.35rem;
  color: var(--ot-ink);
  font-size: 0.92rem;
}

.project-address small {
  margin-top: 0.5rem;
  color: var(--ot-muted);
  font-size: 0.7rem;
}

.project-wind-summary {
  grid-column: 1 / -1;
  margin-top: 0;
}

.project-stat-value {
  margin: 0.6rem 0 -0.15rem;
  color: var(--ot-green-dark);
  font-size: 3.4rem;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
}

.project-stat-card > strong {
  font-size: 0.9rem;
}

.project-stat-card p {
  margin: 0.7rem 0 1rem;
  color: var(--ot-muted);
  font-size: 0.74rem;
}

.project-positions-card {
  margin-bottom: 2rem;
}

.position-table {
  --workspace-table-columns:
    minmax(0, 4fr)
    minmax(max-content, 0.85fr)
    repeat(2, minmax(max-content, 1.2fr))
    max-content
    max-content;
  --workspace-table-row-height: 70px;
}

.position-system-main {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.position-badge {
  padding: 0.1rem 0.35rem;
  color: var(--ot-ink);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  background: var(--ot-green-tint);
  border-radius: 0.3rem;
}

.position-muted {
  color: var(--bs-gray-600);
}

.position-cell-detail {
  margin-top: 0.15rem;
  color: var(--bs-gray-600);
  font-size: 0.85rem;
}

.position-table .position-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.position-status {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 999px;
}

.position-status--ready {
  color: #17612d;
  background: var(--ot-green-soft);
}

.position-status--draft {
  color: #69716b;
  background: #eef1ee;
}

.position-status--invalid {
  color: #9f2d2d;
  background: #fbeaea;
}

.position-work-state-content {
  width: 6rem;
}

.position-utilization {
  font-variant-numeric: tabular-nums;
}

.position-utilization-value {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
}

.position-utilization-value span {
  color: var(--ot-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.position-utilization-value strong {
  font-size: 0.86rem;
}

.position-utilization-track {
  display: block;
  width: 100%;
  height: 0.25rem;
  overflow: hidden;
  background: #e4e9e5;
  border-radius: 999px;
}

.position-utilization-track span {
  display: block;
  width: min(var(--position-utilization), 100%);
  height: 100%;
  background: currentColor;
  border-radius: inherit;
}

.position-utilization--success { color: #26873f; }
.position-utilization--danger { color: #bd2f2f; }

.position-work-state-date {
  margin-top: 0.35rem;
  color: var(--bs-gray-500);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

.position-stale-warning {
  margin-left: auto;
  margin-right: 0.2rem;
  color: #c68a00;
  font-size: 0.85rem;
}

.project-empty-state--compact {
  min-height: 270px;
}

@media (max-width: 991.98px) {
  .project-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-detail-actions {
    justify-content: flex-start;
  }

  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .project-stat-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    text-align: left;
  }

  .project-stat-card .workspace-eyebrow,
  .project-stat-card p {
    display: none;
  }

  .project-stat-value {
    margin: 0;
    font-size: 2.5rem;
  }
}

@media (max-width: 899.98px) {
  .position-table {
    --workspace-table-columns:
      minmax(0, 4fr)
      minmax(max-content, 0.85fr)
      repeat(2, minmax(max-content, 1.2fr))
      max-content;
  }

  .position-table .position-work-state {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .project-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    width: 100%;
  }

  .project-info-body {
    grid-template-columns: 1fr;
  }

  .project-wind-summary {
    grid-column: auto;
  }

  .project-stat-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .project-stat-card .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 699.98px) {
  .position-table {
    --workspace-table-columns:
      minmax(0, 4fr)
      minmax(max-content, 0.85fr)
      minmax(max-content, 1.2fr)
      max-content;
  }

  .position-table .position-plate-height {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .position-table thead th,
  .position-table tbody td {
    padding-inline: 0.75rem;
  }
}

@media (max-width: 499.98px) {
  .position-table {
    --workspace-table-columns:
      minmax(0, 4fr)
      minmax(max-content, 1fr)
      max-content;
  }

  .position-table .position-system {
    display: none;
  }
}
