/* ------------------------------------------------------------------
   Sapient – Design wie der think why Desk (ruhige Flächen,
   weiche Karten, Pill-Buttons), Markenfarben und Schrift von think-why.com.
   Markengelb nur als Fläche mit dunklem Text, nie als Textfarbe auf Weiß.
------------------------------------------------------------------- */

:root {
  --tw-ink: #1a1719;
  --tw-yellow: #ffff00;
  --tw-yellow-soft: #fffbb8;
  --tw-sand: #f2e8dc;
  --tw-stone: #d1cabc;
  --tw-taupe: #726e67;
  --tw-green: #4cfe00;
  --tw-green-soft: #dcffd0;
  --tw-red: #ff3100;
  --tw-red-soft: #ffe1d9;

  --tc-bg: #f7f6f3;
  --tc-surface: #ffffff;
  --tc-text: var(--tw-ink);
  --tc-text-secondary: var(--tw-taupe);
  --tc-border: rgba(26, 23, 25, 0.08);
  --tc-border-strong: rgba(26, 23, 25, 0.16);
  --tc-radius-lg: 18px;
  --tc-radius-md: 12px;
  --tc-radius-pill: 980px;
  --tc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 10px rgba(0, 0, 0, 0.035);
  --tc-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06), 0 10px 28px rgba(0, 0, 0, 0.06);
  --tc-font: "Montserrat", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;

  /* Bootstrap-Variablen umbiegen, damit Standardkomponenten den Look erben */
  --bs-body-font-family: var(--tc-font);
  --bs-body-font-size: 0.94rem;
  --bs-body-bg: var(--tc-bg);
  --bs-body-color: var(--tc-text);
  --bs-emphasis-color: var(--tc-text);
  --bs-secondary-color: var(--tc-text-secondary);
  --bs-border-color: var(--tc-border);
  --bs-border-radius: var(--tc-radius-md);
  --bs-border-radius-sm: 10px;
  --bs-border-radius-lg: var(--tc-radius-lg);
  --bs-border-radius-xl: 22px;
  --bs-primary: #1a1719;
  --bs-primary-rgb: 26, 23, 25;
  --bs-link-color: var(--tw-ink);
  --bs-link-color-rgb: 26, 23, 25;
  --bs-link-hover-color: #000;
  --bs-link-hover-color-rgb: 0, 0, 0;
}

body {
  background-color: var(--tc-bg);
  color: var(--tc-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--tc-text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.text-muted {
  color: var(--tc-text-secondary) !important;
}

::selection {
  background: var(--tw-yellow);
  color: var(--tw-ink);
}

/* ---------------------------- Navigation --------------------------- */

.app-navbar {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--tc-border);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.app-navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.app-navbar .site-logo {
  height: 26px;
  width: auto;
  display: block;
}


.app-navbar .nav-link {
  color: var(--tc-text) !important;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0 0.15rem;
  white-space: nowrap;
  padding: 0.35rem 0.85rem !important;
  border-radius: var(--tc-radius-pill);
  transition: background-color 0.15s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
  background: var(--tc-bg);
}

.app-navbar .nav-link.active {
  background: var(--tw-yellow);
}

.app-navbar .navbar-toggler {
  border: none;
  box-shadow: none;
}

.app-navbar .dropdown-menu {
  margin-top: 0.5rem;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--tc-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tw-ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.avatar.avatar-light {
  background: var(--tw-sand);
  color: var(--tw-ink);
}

/* ------------------------------- Page head ------------------------------ */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-head h1 {
  margin: 0;
}

.page-head .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tc-text-secondary);
  margin-bottom: 0.25rem;
}

/* ------------------------------- Cards ------------------------------ */

.card {
  background: var(--tc-surface);
  border: none;
  border-radius: var(--tc-radius-lg);
  box-shadow: var(--tc-shadow-sm);
}

.card-body {
  padding: 1.6rem;
}

.card-title-sm {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tc-text-secondary);
  margin-bottom: 1rem;
}

.project-card {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.project-card:hover {
  box-shadow: var(--tc-shadow-md);
  transform: translateY(-1px);
  color: inherit;
}

.project-key {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2em 0.6em;
  border-radius: 6px;
  background: var(--tw-ink);
  color: #fff;
}

.project-card .project-key {
  margin-bottom: 0.75rem;
}

/* ------------------------------ Buttons ------------------------------ */

.btn {
  font-weight: 600;
  border-radius: var(--tc-radius-pill);
  padding: 0.5rem 1.35rem;
  white-space: nowrap;
  transition: transform 0.08s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn-sm {
  padding: 0.3rem 0.95rem;
  font-size: 0.82rem;
}

.btn-primary {
  background-color: var(--tw-ink);
  border-color: var(--tw-ink);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--tw-yellow);
  border-color: var(--tw-yellow);
  color: var(--tw-ink);
}

.btn-outline-secondary {
  color: var(--tc-text);
  border-color: var(--tc-border-strong);
}

.btn-outline-secondary:hover {
  background-color: var(--tw-ink);
  border-color: var(--tw-ink);
  color: #fff;
}

.btn-outline-danger {
  color: #c02600;
  border-color: rgba(255, 49, 0, 0.4);
}

.btn-outline-danger:hover {
  background-color: var(--tw-red);
  border-color: var(--tw-red);
  color: #fff;
}

.btn-link {
  color: var(--tc-text);
  font-weight: 500;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--tw-ink);
  box-shadow: 0 0 0 3px var(--tw-yellow);
}

/* ------------------------------- Forms -------------------------------- */

.form-control,
.form-select {
  border-radius: 10px;
  border-color: var(--tc-border-strong);
  padding: 0.55rem 0.85rem;
}

.form-control-sm,
.form-select-sm {
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
}

.form-label {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--tc-text);
}

.form-text {
  color: var(--tc-text-secondary);
}

.form-check-input:checked {
  background-color: var(--tw-ink);
  border-color: var(--tw-ink);
}

/* ------------------------------- Tables -------------------------------- */

.table {
  --bs-table-border-color: var(--tc-border);
  color: var(--tc-text);
  margin-bottom: 0;
}

.table thead th {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--tc-text-secondary);
  font-weight: 600;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.table-hover > tbody > tr:hover > * {
  --bs-table-hover-bg: var(--tc-bg);
}

.row-muted td {
  color: var(--tc-text-secondary);
}

/* ------------------------------- Alerts -------------------------------- */

.alert {
  border: none;
  border-radius: var(--tc-radius-md);
}

.alert-success {
  background: var(--tw-green-soft);
  color: var(--tw-ink);
}

.alert-danger {
  background: var(--tw-red-soft);
  color: #7a1700;
}

.alert-warning,
.alert-info {
  background: var(--tw-yellow-soft);
  color: var(--tw-ink);
}

/* ------------------------------- Badges -------------------------------- */

.badge {
  border-radius: var(--tc-radius-pill);
  font-weight: 600;
  padding: 0.4em 0.75em;
}

.badge-soft {
  background: var(--tc-bg);
  color: var(--tc-text);
  border: 1px solid var(--tc-border);
}

.badge-dark {
  background: var(--tw-ink);
  color: #fff;
}

/* Status-Badges nach Kategorie: Offen (Sand), In Arbeit (Gelb), Fertig (Grün) */
.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3em 0.7em;
  border-radius: 6px;
  white-space: nowrap;
  color: var(--tw-ink);
}

.status-badge.cat-todo { background: var(--tw-sand); }
.status-badge.cat-in_progress { background: var(--tw-yellow); }
.status-badge.cat-done { background: var(--tw-green-soft); }

/* ------------------------------- Modals -------------------------------- */

.modal-content {
  border: none;
  border-radius: var(--tc-radius-lg);
  box-shadow: var(--tc-shadow-md);
}

.modal-header {
  border-bottom-color: var(--tc-border);
}

.modal-footer {
  border-top-color: var(--tc-border);
}

/* ---------------------------- Dropdowns --------------------------------- */

.dropdown-menu {
  border: none;
  border-radius: var(--tc-radius-md);
  box-shadow: var(--tc-shadow-md);
  padding: 0.4rem;
}

.dropdown-item {
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--tc-bg);
}

.dropdown-item:active {
  background-color: var(--tw-yellow);
  color: var(--tw-ink);
}

/* ------------------------------ Pills / Tabs ------------------------------ */

.pill-tabs {
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.pill-tabs .nav-link {
  border-radius: var(--tc-radius-pill);
  color: var(--tc-text);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.4rem 1.1rem;
}

.pill-tabs .nav-link:hover {
  background: var(--tc-surface);
}

.pill-tabs .nav-link.active {
  background-color: var(--tw-ink);
  color: #fff;
}

/* ------------------------------ Status-Editor ----------------------------- */

.status-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--tc-border);
}

.status-row:last-child {
  border-bottom: none;
}

.status-order {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.status-order button {
  border: none;
  background: none;
  padding: 0.1rem 0.4rem;
  color: var(--tc-text-secondary);
  font-size: 0.75rem;
}

.status-order button:hover:not(:disabled) {
  color: var(--tc-text);
}

.status-order button:disabled {
  opacity: 0.25;
}

@media (max-width: 767.98px) {
  .status-row {
    grid-template-columns: 2.25rem 1fr;
  }
  .status-row > :not(.status-order) {
    grid-column: 2;
  }
  .status-row > .status-order {
    grid-row: span 4;
    align-self: start;
  }
}

/* ------------------------------ Leere Zustände ------------------------------ */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--tc-text-secondary);
}

.empty-state .empty-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tw-yellow);
  display: inline-block;
  margin-bottom: 1rem;
}

.empty-state h2 {
  font-size: 1.05rem;
  color: var(--tc-text);
}

/* ------------------------------ Auth pages ------------------------------- */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.75rem;
}

.auth-brand .auth-logo {
  height: 44px;
  width: auto;
  display: block;
  margin-bottom: 0.9rem;
}

.auth-brand .auth-brand-name {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tc-text-secondary);
}

.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-card .card-body {
  padding: 2.25rem;
}

/* ------------------------------ Kleinteile ------------------------------ */

.avatar-sm {
  width: 24px;
  height: 24px;
  font-size: 0.62rem;
}

.avatar-empty {
  background: transparent;
  border: 1.5px dashed var(--tc-border-strong);
}



.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tc-text-secondary);
  margin-bottom: 0.75rem;
}

.section-title .count {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  margin-left: 0.35rem;
  opacity: 0.8;
}

/* =====================================================================
   Sapient: Mandanten, Kacheln, Formulare
   ===================================================================== */

.app-wordmark {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tc-text-secondary);
  margin-left: 0.6rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--tc-border-strong);
}

/* Mandantenumschalter in der Navigation */
.tenant-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 260px;
  padding: 0.3rem 0.85rem 0.3rem 0.35rem;
  border-radius: var(--tc-radius-pill);
  background: var(--tw-sand);
  color: var(--tc-text);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border: none;
}
.tenant-switch:hover,
.tenant-switch.show {
  background: var(--tw-stone);
  color: var(--tc-text);
}
.tenant-switch .tenant-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tenant-switch.is-empty {
  background: var(--tw-yellow-soft);
}

.tenant-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--tw-ink);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}
.tenant-mark-lg {
  width: 44px;
  height: 44px;
  font-size: 0.95rem;
}

.tenant-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
}
.tenant-card .tenant-stats {
  display: flex;
  gap: 1.25rem;
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--tc-text-secondary);
}
.tenant-card .tenant-stats strong {
  display: block;
  font-size: 1.1rem;
  color: var(--tc-text);
}

/* Kennzahl-Kacheln im Dashboard */
.stat-tile .stat-value {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
}
.stat-tile .stat-label {
  font-size: 0.8rem;
  color: var(--tc-text-secondary);
}

/* Stufenplan / kommende Module im Dashboard */
.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.module-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--tc-border);
}
.module-list li:last-child {
  border-bottom: none;
}
.module-list .module-stage {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15em 0.55em;
  border-radius: 6px;
  background: var(--tc-bg);
  color: var(--tc-text-secondary);
  white-space: nowrap;
}

.badge-yellow {
  background: var(--tw-yellow);
  color: var(--tw-ink);
}

/* Rechte-Häkchen in Nutzerlisten */
.perm-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.audit-table td {
  font-size: 0.85rem;
}
.audit-action {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

/* =====================================================================
   Stufe 2: Arbeitgebermarke, Stellenprofile
   ===================================================================== */

/* Zeilen-Editor für Listen */
.repeater-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.repeater-list:empty + .repeater-empty {
  display: block;
}
.repeater-empty {
  display: none;
  font-size: 0.85rem;
  color: var(--tc-text-secondary);
  padding: 0.75rem 1rem;
  border: 1.5px dashed var(--tc-border-strong);
  border-radius: var(--tc-radius-md);
  margin-bottom: 0.5rem;
}
.repeater-row {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: start;
  padding: 0.75rem;
  background: var(--tc-bg);
  border-radius: var(--tc-radius-md);
}
.repeater-row.compact {
  padding: 0.4rem 0.5rem;
  align-items: center;
}
.repeater-handle {
  cursor: grab;
  color: var(--tc-text-secondary);
  user-select: none;
  line-height: 2.2;
  text-align: center;
  font-size: 0.9rem;
}
.repeater-row.compact .repeater-handle {
  line-height: 1;
}
[data-readonly] .repeater-handle,
[data-readonly] [data-repeater-remove] {
  display: none;
}
.repeater-ghost {
  opacity: 0.4;
}
.repeater-remove {
  border: none;
  background: transparent;
  color: var(--tc-text-secondary);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
}
.repeater-remove:hover {
  background: var(--tw-red-soft);
  color: var(--tw-red);
}
.repeater-fields {
  display: grid;
  gap: 0.5rem;
}
.repeater-fields .form-control,
.repeater-fields .form-select {
  background-color: var(--tc-surface);
}
.btn-add {
  border: 1.5px dashed var(--tc-border-strong);
  background: transparent;
  color: var(--tc-text);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--tc-radius-pill);
  padding: 0.35rem 1rem;
  margin-top: 0.6rem;
}
.btn-add:hover {
  border-color: var(--tw-ink);
}

/* Farben */
.color-fields {
  grid-template-columns: 2.6rem 7rem minmax(0, 1fr) 10rem;
  align-items: center;
}
.color-picker {
  width: 2.6rem;
  height: 2.3rem;
  padding: 0.15rem;
  border-radius: 10px;
  border: 1px solid var(--tc-border-strong);
  background: var(--tc-surface);
  cursor: pointer;
}
.color-hex {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}
@media (max-width: 575.98px) {
  .color-fields {
    grid-template-columns: 2.6rem minmax(0, 1fr);
  }
}

.swatch-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.swatch {
  width: 88px;
  border-radius: var(--tc-radius-md);
  overflow: hidden;
  box-shadow: var(--tc-shadow-sm);
  font-size: 0.7rem;
}
.swatch-color {
  height: 52px;
  display: flex;
  align-items: flex-end;
  padding: 0.3rem 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.swatch-label {
  background: var(--tc-surface);
  padding: 0.3rem 0.45rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Logos und Referenzbilder */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}
.logo-tile {
  border-radius: var(--tc-radius-md);
  border: 1px solid var(--tc-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.logo-preview {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--tc-bg);
}
.logo-preview.on-dark {
  background: var(--tw-ink);
}
.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.logo-preview .logo-empty {
  font-size: 0.78rem;
  color: var(--tc-text-secondary);
  text-align: center;
}
.logo-preview.on-dark .logo-empty {
  color: var(--tw-stone);
}
.logo-meta {
  padding: 0.65rem 0.8rem;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.logo-meta .form-control {
  font-size: 0.78rem;
}

.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.ref-tile {
  position: relative;
  border-radius: var(--tc-radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--tc-bg);
}
.ref-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ref-tile form {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
}
.ref-tile .repeater-remove {
  background: rgba(255, 255, 255, 0.9);
}

/* Schriften */
.font-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--tc-border);
}
.font-row:last-child {
  border-bottom: none;
}
.font-sample {
  font-size: 1.5rem;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Vollständigkeit */
.progress-slim {
  height: 8px;
  border-radius: 99px;
  background: var(--tc-bg);
  overflow: hidden;
}
.progress-slim .bar {
  height: 100%;
  background: var(--tw-ink);
  border-radius: 99px;
}
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}
.check-list li {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.check-list .mark {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  margin-top: 0.15rem;
  background: var(--tc-bg);
  border: 1px solid var(--tc-border-strong);
}
.check-list .ok .mark {
  background: var(--tw-yellow);
  border-color: var(--tw-yellow);
}
.check-list .ok a,
.check-list .ok span.label {
  color: var(--tc-text-secondary);
}
.sticky-side {
  position: sticky;
  top: 84px;
}

.form-hint-inline {
  font-weight: 400;
  color: var(--tc-text-secondary);
  font-size: 0.8rem;
}

/* Stellenprofile */
.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.8rem;
  color: var(--tc-text-secondary);
}
.job-status-active { background: var(--tw-green-soft); color: var(--tw-ink); }
.job-status-filled { background: var(--tw-yellow-soft); color: var(--tw-ink); }
.job-status-archived { background: var(--tc-bg); color: var(--tc-text-secondary); border: 1px solid var(--tc-border); }
.list-section + .list-section {
  margin-top: 1.5rem;
}

/* Datei-Upload als Schaltfläche statt nativem Dateifeld */
.upload-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.upload-button input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-button:focus-within {
  outline: 2px solid var(--tw-ink);
  outline-offset: 2px;
}

/* =====================================================================
   Stufe 3: Kampagnen, Inhalte, Freigabe
   ===================================================================== */

.asset-list {
  display: flex;
  flex-direction: column;
}
.asset-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--tc-border);
  color: inherit;
  text-decoration: none;
}
.asset-row:last-child {
  border-bottom: none;
}
.asset-row:hover .fw-semibold {
  text-decoration: underline;
}
.asset-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.asset-rejected { background: var(--tw-red-soft); color: var(--tw-ink); }

.ai-job {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 0.3rem 0;
}
.ai-job-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tw-stone);
  flex-shrink: 0;
}
.ai-job-running .ai-job-dot {
  background: var(--tw-yellow);
  box-shadow: 0 0 0 3px var(--tw-yellow-soft);
  animation: ai-pulse 1.2s ease-in-out infinite;
}
.ai-job-done .ai-job-dot { background: var(--tw-green); }
.ai-job-error .ai-job-dot { background: var(--tw-red); }
@keyframes ai-pulse {
  50% { box-shadow: 0 0 0 6px var(--tw-yellow-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .ai-job-running .ai-job-dot { animation: none; }
}

.ai-accordion .accordion-item {
  background: transparent;
  border-color: var(--tc-border);
}
.ai-accordion .accordion-button {
  padding: 0.75rem 0;
  font-weight: 600;
  font-size: 0.92rem;
  background: transparent;
  box-shadow: none;
  color: var(--tc-text);
}
.ai-accordion .accordion-collapse form {
  padding-bottom: 1rem;
}

/* Inhaltsvorschau */
.asset-preview {
  position: relative;
}
.asset-preview.is-draft::before {
  content: "Entwurf";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tw-taupe);
  border: 1px dashed var(--tw-stone);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
}
.preview-ad h2 {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}
.preview-ad h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1.25rem 0 0.4rem;
}
.preview-ad ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
}
.preview-post {
  max-width: 560px;
}
.hashtags {
  color: #2f6fd6;
  font-size: 0.9rem;
}
.slide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}
.slide-card {
  aspect-ratio: 4 / 5;
  border-radius: var(--tc-radius-md);
  background: var(--tc-bg);
  border: 1px solid var(--tc-border);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  overflow: hidden;
}
.slide-card .slide-no {
  font-size: 0.68rem;
  color: var(--tc-text-secondary);
  font-weight: 700;
}
.slide-card strong {
  font-size: 0.92rem;
  line-height: 1.2;
}
.image-idea {
  background: var(--tw-yellow-soft);
  border-radius: var(--tc-radius-md);
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
}
.scene-table td {
  font-size: 0.85rem;
  vertical-align: top;
}
.version-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--tc-border);
  font-size: 0.82rem;
}
.version-list li:last-child {
  border-bottom: none;
}
.version-list .current {
  font-weight: 700;
}
.comment-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--tc-border);
  font-size: 0.88rem;
}
.comment-item:last-child {
  border-bottom: none;
}
.approval-box {
  border-radius: var(--tc-radius-md);
  padding: 1rem;
  background: var(--tw-yellow-soft);
}
.approval-box.is-approved {
  background: var(--tw-green-soft);
}
.approval-box.is-rejected {
  background: var(--tw-red-soft);
}

.nav-count {
  display: inline-block;
  min-width: 1.3em;
  padding: 0 0.35em;
  margin-left: 0.2rem;
  border-radius: 99px;
  background: var(--tw-ink);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: center;
  vertical-align: 1px;
}
.nav-link.active .nav-count {
  background: var(--tw-ink);
}

/* Navigation zwischen 1200 und 1400 px: kompakter, damit alle Punkte in eine Zeile passen */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .app-navbar .nav-link {
    padding: 0.35rem 0.5rem !important;
    margin: 0;
    font-size: 0.86rem;
  }
  .app-navbar .app-wordmark {
    display: none;
  }
  .tenant-switch {
    max-width: 190px;
  }
}

/* Flex-Kinder duerfen schrumpfen (lange Titel werden abgeschnitten statt die Seite zu verbreitern) */
.min-w-0 {
  min-width: 0;
}

/* =====================================================================
   Stufe 4: Grafiken
   ===================================================================== */

.swatch-pick {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--tc-surface);
  box-shadow: 0 0 0 1px var(--tc-border-strong);
  padding: 0;
  flex-shrink: 0;
}
.design-preview,
.visual-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.visual-preview.single {
  grid-template-columns: minmax(0, 420px);
}
.design-preview figure,
.visual-preview figure {
  margin: 0;
}
.design-preview canvas,
.visual-preview canvas,
.render-grid img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--tc-shadow-sm);
  background: var(--tc-bg);
  display: block;
}
.design-preview figcaption,
.visual-preview figcaption {
  font-size: 0.78rem;
  color: var(--tc-text-secondary);
  margin-top: 0.35rem;
}
.render-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 0.5rem;
}
.media-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
  background: var(--tc-bg);
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
}
.media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-tile.is-selected {
  border-color: var(--tw-ink);
  box-shadow: 0 0 0 3px var(--tw-yellow);
}
.media-tile .media-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 0 4px;
}
.media-tile.color-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}
.slide-bg-row {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--tc-border);
}
.slide-bg-row:last-child {
  border-bottom: none;
}
.asset-thumb {
  width: 56px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--tc-bg);
}

/* =====================================================================
   Stufe 5: Auswertung, Maßnahmenplan
   ===================================================================== */

.kpi-chart {
  width: 100%;
  height: auto;
  display: block;
}
.kpi-chart .grid {
  stroke: var(--tc-border);
  stroke-width: 1;
}
.kpi-chart .baseline {
  stroke: var(--tc-border-strong);
  stroke-width: 1;
}
.kpi-chart .axis {
  font-size: 11px;
  fill: var(--tc-text-secondary);
  font-family: var(--tc-font);
}
.kpi-chart .mark {
  fill: var(--tw-ink);
}
.kpi-chart .hit {
  fill: transparent;
}
.kpi-chart .bar:hover .hit {
  fill: var(--tc-bg);
}
.kpi-chart .bar:hover .mark {
  fill: var(--tw-taupe);
}
.stat-tile .stat-value {
  font-size: 1.6rem;
}
.tracking-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  word-break: break-all;
  background: var(--tc-bg);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}
.plan-week {
  margin-bottom: 1.5rem;
}
.plan-week-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.plan-week-head .week-no {
  font-weight: 700;
}
.plan-week.is-current .week-no::after {
  content: "diese Woche";
  margin-left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--tw-yellow);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
}
.plan-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 1rem;
  background: var(--tc-surface);
  border-radius: var(--tc-radius-md);
  box-shadow: var(--tc-shadow-sm);
  margin-bottom: 0.5rem;
}
.plan-item.is-done {
  opacity: 0.6;
}
.plan-item.is-done .plan-title {
  text-decoration: line-through;
}
.plan-item .plan-title {
  font-weight: 600;
}
.plan-item .plan-condition {
  font-size: 0.8rem;
  background: var(--tw-yellow-soft);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  display: inline-block;
  margin-top: 0.3rem;
}
.tenant-card .tenant-stats,
.project-card .tenant-stats {
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

/* Repeater-Zeilen mit eigenem Spaltenraster werden auf schmalen Bildschirmen einspaltig */
@media (max-width: 767.98px) {
  .repeater-fields[style] {
    grid-template-columns: 1fr !important;
  }
}

/* =====================================================================
   Stufe 6: Onboarding
   ===================================================================== */

.checklist-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--tc-border);
}
.checklist-row:last-of-type {
  border-bottom: none;
}
.checklist-row .form-check-input {
  margin-top: 0.2rem;
}
.checklist-row.is-done .checklist-title {
  text-decoration: line-through;
  color: var(--tc-text-secondary);
}
.checklist-title {
  font-weight: 600;
  font-size: 0.92rem;
}
.mark-dot {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  border: 1px solid var(--tc-border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.mark-dot.is-ok {
  background: var(--tw-green-soft);
  border-color: var(--tw-green-soft);
}
.coffee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}
.coffee-pick {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-md);
  cursor: pointer;
  font-size: 0.88rem;
}
.coffee-pick:has(input:checked) {
  border-color: var(--tw-ink);
  background: var(--tw-yellow-soft);
}
.coffee-pick .form-check-input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

/* =====================================================================
   Stufe 7: Mitarbeiterportal
   ===================================================================== */

.portal-hero .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tc-text-secondary);
  margin-bottom: 0.25rem;
}
.first-day-card {
  background: var(--tw-yellow-soft);
}
.date-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4rem;
  padding: 0.3rem 0.4rem;
  border-radius: 10px;
  background: var(--tc-bg);
  font-size: 0.72rem;
  line-height: 1.2;
}
.date-chip strong {
  font-size: 0.9rem;
}
.module-content {
  font-size: 1rem;
  line-height: 1.65;
}
.module-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.4rem 0 0.5rem;
}
.module-content ul {
  padding-left: 1.2rem;
}
.module-content .lead-text {
  font-size: 1.08rem;
  color: var(--tc-text-secondary);
}
.g2k-search {
  border-radius: var(--tc-radius-pill);
  padding-left: 1.25rem;
}
.g2k-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--tc-border);
}
.g2k-list li:last-child {
  border-bottom: none;
}
.feedback-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feedback-msg {
  max-width: 85%;
  padding: 0.85rem 1rem;
  border-radius: var(--tc-radius-md);
  background: var(--tc-surface);
  box-shadow: var(--tc-shadow-sm);
}
.feedback-msg.is-author {
  align-self: flex-start;
  background: var(--tw-yellow-soft);
}
.feedback-msg:not(.is-author) {
  align-self: flex-end;
}
