* { box-sizing: border-box; }

/* Das hidden-Attribut muss auch bei Elementen mit eigenem display (flex/grid/block) gewinnen. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Georgia', 'Times New Roman', serif;
  background: linear-gradient(160deg, #f6efe7 0%, #eadfd0 100%);
  color: #3b3229;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.card {
  background: #fffdfa;
  border: 1px solid #e3d6c2;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(59, 50, 41, 0.08);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.card.wide {
  max-width: 720px;
}

h1 {
  font-size: 1.8rem;
  letter-spacing: 0.03em;
  margin: 0 0 0.3rem;
  text-align: center;
}

.subtitle {
  text-align: center;
  color: #8a7a63;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 2rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: #6b5d4a;
  margin: 1rem 0 0.3rem;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d8c9b2;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: #fffdfa;
  color: #3b3229;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #b08d57;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  margin-top: 1.8rem;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  background: #b08d57;
  color: #fffdfa;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.btn-primary:hover {
  background: #9a7a49;
}

.btn-secondary {
  padding: 0.5rem 1rem;
  border: 1px solid #b08d57;
  border-radius: 8px;
  background: transparent;
  color: #8a7a63;
  font-size: 0.85rem;
}

.error {
  color: #a3423a;
  font-size: 0.85rem;
  min-height: 1.2rem;
  margin-top: 0.8rem;
  text-align: center;
}

.success {
  color: #4a7a4a;
  font-size: 0.85rem;
  min-height: 1.2rem;
  margin-top: 0.8rem;
  text-align: center;
}

.topbar {
  width: 100%;
  max-width: 720px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.topbar .names {
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

nav.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  margin: 1.5rem 0;
  justify-content: center;
  width: 100%;
  max-width: 720px;
}

nav.tabs a {
  color: #8a7a63;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid transparent;
}

.nav-toggle {
  display: none;
}

nav.tabs a.active {
  color: #3b3229;
  border-bottom-color: #b08d57;
}

.countdown {
  text-align: center;
  font-size: 1.2rem;
  margin: 1.5rem 0;
  color: #6b5d4a;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.module-card {
  display: block;
  border: 1px dashed #d8c9b2;
  border-radius: 10px;
  padding: 1.2rem;
  text-align: center;
  color: #a89a86;
  font-size: 0.9rem;
  text-decoration: none;
}

.module-card-link {
  border-style: solid;
  border-color: #b08d57;
  color: #3b3229;
  font-weight: 600;
}

.module-card-link:hover {
  background: #faf6ef;
}

.fm-breadcrumb {
  font-size: 0.9rem;
  color: #6b5d4a;
  margin: 0.5rem 0 1rem;
}

.fm-breadcrumb a {
  color: #b08d57;
  text-decoration: none;
}

.fm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

#fm-new-folder,
.fm-upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  text-align: center;
}

.fm-empty {
  text-align: center;
  color: #a89a86;
  padding: 2rem 0;
}

.fm-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid #ece1d1;
}

.fm-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.7rem;
  min-width: 0;
  flex: 1 1 240px;
}

.fm-row-name {
  word-break: break-word;
  font-size: 0.92rem;
}

.fm-row-name a {
  color: #3b3229;
  text-decoration: none;
}

.fm-row-meta {
  color: #8a7a63;
  font-size: 0.78rem;
  min-width: 0;
}

.fm-row-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.fm-row-actions .btn-secondary {
  font-size: 0.78rem;
  padding: 0.4rem 0.7rem;
}

.fm-menu-trigger {
  min-width: 2.2rem;
  padding: 0.4rem 0.55rem !important;
  font-size: 1.1rem;
  line-height: 1;
}

.fm-menu {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  min-width: 170px;
  padding: 0.3rem;
  background: #fffdfa;
  border: 1px solid #d8c9b2;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(59, 50, 41, 0.2);
}

.fm-menu-item {
  background: none;
  border: none;
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: #3b3229;
  border-radius: 6px;
}

.fm-menu-item:hover {
  background: #f6efe7;
}

.fm-menu-item.danger {
  color: #a3423a;
}

.fm-menu-item.danger:hover {
  background: #f8e7e5;
}

.fm-viewer-path {
  font-size: 0.8rem;
  color: #8a7a63;
  margin: 0.2rem 0 1.2rem;
  word-break: break-all;
}

.fm-viewer-hint {
  font-size: 0.85rem;
  color: #8a7a63;
  margin-top: 0.8rem;
}

.fm-pdf-frame {
  width: 100%;
  height: 75vh;
  border: 1px solid #e3d6c2;
  border-radius: 8px;
}

.fm-image-preview {
  max-width: 100%;
  max-height: 75vh;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.fm-gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.fm-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(59, 50, 41, 0.45);
  color: #fffdfa;
  border: none;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.fm-gallery-arrow:hover {
  background: rgba(59, 50, 41, 0.7);
}

.fm-gallery-prev {
  left: 0.5rem;
}

.fm-gallery-next {
  right: 0.5rem;
}

.fm-gallery-counter {
  text-align: center;
  color: #8a7a63;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.fm-video-player,
.fm-audio-player {
  width: 100%;
  border-radius: 8px;
}

.fm-text-view {
  white-space: pre-wrap;
  word-break: break-word;
  background: #faf6ef;
  border: 1px solid #e3d6c2;
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.85rem;
  max-height: 70vh;
  overflow-y: auto;
  margin-top: 1rem;
}

.fm-text-editor {
  width: 100%;
  min-height: 50vh;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.85rem;
  padding: 1rem;
  border: 1px solid #d8c9b2;
  border-radius: 8px;
  background: #fffdfa;
  color: #3b3229;
  resize: vertical;
}

.gu-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.gu-header-row h1 {
  margin: 0;
}

.gu-search-input {
  flex: 1 1 220px;
}

.gu-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.gu-badge-invited {
  background: #ece1d1;
  color: #6b5d4a;
}

.gu-badge-started {
  background: #f0e2c6;
  color: #8a6a2a;
}

.gu-badge-confirmed {
  background: #e1efe1;
  color: #3d6b3d;
}

.gu-badge-declined {
  background: #f6e4e2;
  color: #a3423a;
}

.gu-badge-done {
  background: #e8e3da;
  color: #5c5346;
}

.gu-field {
  margin-bottom: 1.2rem;
}

.gu-help {
  font-size: 0.78rem;
  color: #8a7a63;
  margin: 0.3rem 0 0;
}

.gu-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gu-checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #3b3229;
}

.gu-checkbox-option input {
  width: auto;
}

.gu-required-toggle {
  margin: 1rem 0;
}

.gu-textarea {
  min-height: 6rem;
  margin-top: 0;
}

.gu-option-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.gu-option-row input {
  flex: 1 1 auto;
}

.ge-save-btn {
  width: auto;
  margin-top: 0;
}

.gu-lang-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.gu-lang-tab {
  border: 1px solid #d8c9b2;
  background: rgba(255, 253, 250, 0.6);
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: #3b3229;
}

.gu-lang-tab.active {
  background: #b08d57;
  border-color: #b08d57;
  color: #fff;
}

.gu-option-row-i18n {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.gu-option-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 140px;
  min-width: 0;
}

.gu-option-col-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a7a63;
  margin-bottom: 0.15rem;
}

.gu-option-col input {
  margin: 0;
}

.pl-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pl-progress-section {
  margin-bottom: 1.3rem;
}

.pl-progress-block {
  margin-bottom: 0.9rem;
}

.pl-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #6b5d4a;
  margin-bottom: 0.3rem;
}

.pl-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #ece1d1;
  overflow: hidden;
}

.pl-progress-fill {
  height: 100%;
  background: #b08d57;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.pl-launch-banner {
  padding: 0.9rem 1.2rem;
  border-radius: 10px;
  font-weight: bold;
  text-align: center;
  margin-top: 0.8rem;
}

.pl-launch-banner.ready {
  background: #e1efe1;
  color: #3d6b3d;
}

.pl-launch-banner.pending {
  background: #f0e2c6;
  color: #8a6a2a;
}

.pl-check-badge {
  font-size: 0.68rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: #ece1d1;
  color: #6b5d4a;
  white-space: nowrap;
}

.pl-required-badge {
  font-size: 0.68rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: #f6e4e2;
  color: #a3423a;
  white-space: nowrap;
}

.pl-category-tag {
  font-size: 0.72rem;
  color: #8a7a63;
}

.pl-detail-hint {
  font-size: 0.85rem;
  color: #a3423a;
  margin-top: 0.4rem;
}

.pl-scope-tag {
  font-size: 0.72rem;
  color: #8a7a63;
}

.pl-filter-panel {
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  background: #faf6ef;
  padding: 1rem;
  margin: 0.6rem 0 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.pl-filter-group h4 {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a7a63;
}

.pl-filter-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
}

.pl-filter-inactive {
  border-top: 1px solid #e3d6c2;
  padding-top: 0.8rem;
}

.pl-filter-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pl-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.3rem;
}

.pl-active-filters:empty {
  display: none;
}

.pl-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f0e2c6;
  color: #8a6a2a;
  border-radius: 999px;
  padding: 0.25rem 0.5rem 0.25rem 0.7rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.pl-filter-chip button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 0.1rem;
}

.pl-filter-reset-chip {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
}

.loc-form-section {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a7a63;
  margin: 1.3rem 0 0.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid #e3d6c2;
}

.loc-form-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.loc-detail-section {
  margin-bottom: 1.2rem;
}

.loc-detail-section h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a7a63;
  margin: 0 0 0.4rem;
}

.loc-detail-section p {
  margin: 0.2rem 0;
}

.tl-day-card {
  margin-bottom: 1.5rem;
}

.tl-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.tl-day-header h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.tl-day-meta {
  font-size: 0.8rem;
  color: #8a7a63;
}

.tl-item-row {
  display: flex;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid #e3d6c2;
  align-items: flex-start;
}

.tl-item-row:first-child {
  border-top: none;
}

.tl-item-time {
  flex: 0 0 92px;
  font-size: 0.85rem;
  color: #6b5d4a;
  font-weight: bold;
  white-space: nowrap;
}

.tl-item-duration {
  display: block;
  font-size: 0.72rem;
  color: #8a7a63;
  font-weight: normal;
  margin-top: 0.15rem;
}

.tl-item-content {
  flex: 1 1 auto;
  min-width: 0;
}

.tl-item-title {
  font-weight: bold;
}

.tl-item-meta {
  font-size: 0.8rem;
  color: #6b5d4a;
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
}

.tl-item-meta a {
  color: #b08d57;
}

.tl-conflict {
  color: #a3423a;
  font-size: 0.78rem;
  margin-top: 0.25rem;
}

.tl-item-actions {
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .tl-item-row {
    flex-direction: column;
    gap: 0.3rem;
  }
  .tl-item-time {
    flex: none;
  }
}

.ns-progress {
  font-size: 0.85rem;
  color: #6b5d4a;
  margin: 0.3rem 0 1rem;
}

.ns-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #ece1d1;
  overflow: hidden;
  margin-top: 0.4rem;
}

.ns-progress-fill {
  height: 100%;
  background: #b08d57;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.ns-add-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.ns-add-row input {
  flex: 1 1 auto;
}

.ns-add-row button {
  flex: 0 0 auto;
  width: auto;
}

.ns-filter-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.ns-filter-tab {
  border: 1px solid #d8c9b2;
  background: rgba(255, 253, 250, 0.6);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: #3b3229;
}

.ns-filter-tab.active {
  background: #b08d57;
  border-color: #b08d57;
  color: #fff;
}

.ns-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0;
  border-top: 1px solid #e3d6c2;
}

.ns-row:first-child {
  border-top: none;
}

.ns-row.dragging {
  opacity: 0.4;
}

.ns-drag-handle {
  flex: 0 0 auto;
  cursor: grab;
  color: #b0a08a;
  font-size: 1.1rem;
  padding-top: 0.15rem;
  user-select: none;
}

.ns-checkbox {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  cursor: pointer;
}

.ns-content {
  flex: 1 1 auto;
  min-width: 0;
}

.ns-title {
  font-size: 1rem;
  word-break: break-word;
}

.ns-title.completed {
  text-decoration: line-through;
  color: #a89a86;
}

.ns-notes-preview {
  font-size: 0.8rem;
  color: #8a7a63;
  margin-top: 0.2rem;
}

.ns-row-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 0.3rem;
}

@media (max-width: 640px) {
  .ns-drag-handle {
    display: none;
  }
}

/* ---------- Locations: Entscheidung, Preis, Bewertung, Vergleich ---------- */

.card.loc-wide {
  max-width: 960px;
}

a.btn-secondary {
  display: inline-block;
  text-decoration: none;
}

.loc-sort-select {
  width: auto;
  flex: 0 1 auto;
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
}

.loc-more-filters > summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: #6b5d4a;
  margin-bottom: 0.6rem;
}

.loc-more-filters .pl-filter-group {
  margin-bottom: 0.8rem;
}

.loc-price-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.loc-price-filter input {
  flex: 1 1 140px;
  min-width: 0;
}

.loc-compare-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  justify-content: space-between;
  background: #faf6ef;
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin: 0.4rem 0 0.8rem;
}

.loc-compare-hint {
  margin: 0;
  font-size: 0.85rem;
  color: #6b5d4a;
  flex: 1 1 220px;
}

.loc-compare-hint.warn {
  color: #a3423a;
}

/* Gebuchte Location(en) - prominent hervorgehoben (Entscheidung ist gefallen).
   Zwei Einsatzorte: innerhalb einer .card (Locations-Modul selbst, volle
   Breite der Karte) und projektweit von nav.js direkt unter der Navigation
   eingefügt (dort zusätzlich .loc-booked-banner-page für die Seitenbreite,
   analog zu .topbar/nav.tabs). */
.loc-booked-banner {
  background: #f7e7a8;
  border: 1px solid #d8c377;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 0.6rem 0 1rem;
}

.loc-booked-banner-page {
  width: 100%;
  max-width: 720px;
}

.loc-booked-name-plain {
  font-weight: bold;
  color: #3b3229;
  text-decoration: none;
  cursor: default;
}

.loc-booked-title {
  font-weight: bold;
  color: #7a5b00;
  margin-bottom: 0.5rem;
}

.loc-booked-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.loc-booked-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  background: #fffdfa;
  border: 1px solid #e3d6c2;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
}

.loc-booked-name {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: bold;
  color: #3b3229;
  cursor: pointer;
  text-decoration: underline;
}

/* Favoriten - Kurzliste zwischen Filtern und Ergebnisliste. */
.loc-favorites-section {
  background: #faf6ef;
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 0.6rem 0 1rem;
}

.loc-favorites-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.loc-favorites-header h3 {
  margin: 0;
  font-size: 1rem;
}

.loc-favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
}

.loc-favorite-card {
  background: #fffdfa;
  border: 1px solid #e3d6c2;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}

.loc-favorite-name {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  display: block;
  margin-bottom: 0.3rem;
}

.loc-compare-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.loc-compare-actions .btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.loc-row-check {
  display: inline-flex;
  align-items: center;
  margin: 0;
  align-self: center;
}

.loc-row-check input {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

.loc-row-facts {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1rem;
  font-size: 0.8rem;
  color: #6b5d4a;
}

.loc-fact-label {
  color: #8a7a63;
}

.loc-fact-value {
  font-weight: bold;
}

.loc-cell-empty {
  color: #b0a08a;
  font-weight: normal;
}

.loc-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  background: #ece1d1;
  color: #6b5d4a;
}

.loc-badge-contacted { background: #ece1d1; color: #6b5d4a; }
.loc-badge-viewing_planned,
.loc-badge-viewed,
.loc-badge-offer_received { background: #f0e2c6; color: #8a6a2a; }
.loc-badge-favorite { background: #f7e7a8; color: #7a5b00; font-weight: bold; }
.loc-badge-booked { background: #dcefdc; color: #2f5f2f; font-weight: bold; }
.loc-badge-rejected { background: #e8e3da; color: #7a6f60; text-decoration: line-through; }
.loc-badge-av-available { background: #e1efe1; color: #3d6b3d; }
.loc-badge-av-unavailable { background: #f6e4e2; color: #a3423a; }
.loc-badge-av-requested,
.loc-badge-av-option_reserved { background: #f0e2c6; color: #8a6a2a; }

/* Detailansicht: ausklappbare Bereiche */

.loc-section {
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  margin-bottom: 0.7rem;
  background: #fffdfa;
}

.loc-section > summary {
  cursor: pointer;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b5d4a;
}

.loc-section[open] > summary {
  border-bottom: 1px solid #ece1d1;
}

/* Ersteindruck (Migration 026): bewusst optisch hervorgehoben, weil er als
   erster Abschnitt direkt nach den Basisinformationen sofort auffallen soll -
   wichtiger für die aktuelle Location-Auswahl als viele Detailfelder. */
.loc-first-impression-section {
  border-color: #e7c86a;
  background: #fffbf0;
}

.loc-first-impression-section > summary {
  font-size: 0.95rem;
  font-weight: bold;
  text-transform: none;
  letter-spacing: normal;
  color: #7a5b00;
}

.loc-section-body {
  padding: 0.3rem 1rem 1rem;
}

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

.loc-subheading {
  font-size: 0.8rem;
  font-weight: bold;
  color: #6b5d4a;
  margin: 1.1rem 0 0;
  padding-bottom: 0.2rem;
  border-bottom: 1px dotted #d8c9b2;
}

.loc-subheading:first-child {
  margin-top: 0.6rem;
}

.loc-inline-link-row {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  word-break: break-all;
}

.loc-inline-link,
.loc-cell-link {
  color: #8a6a2a;
}

.loc-total-box {
  background: #faf6ef;
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 1rem 0 0.3rem;
}

.loc-total-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a7a63;
}

.loc-total-value {
  font-size: 1.5rem;
  font-weight: bold;
}

.loc-total-breakdown {
  font-size: 0.82rem;
  color: #6b5d4a;
  margin-top: 0.2rem;
}

.loc-total-hint {
  font-size: 0.8rem;
  color: #8a6a2a;
  margin: 0.4rem 0 0;
}

.loc-total-hint.loc-warn {
  color: #a3423a;
}

.loc-total-box .gu-help {
  margin-top: 0.5rem;
}

.loc-rating-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.loc-rating-box {
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  padding: 0.7rem 0.9rem 0.9rem;
  background: #faf6ef;
}

.loc-rating-title {
  font-weight: bold;
  font-size: 1rem;
}

.loc-rating-summary {
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
  font-weight: bold;
  color: #3b3229;
}

.loc-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #fffdfa;
  border-top: 1px solid #e3d6c2;
  padding: 0.7rem 0;
  margin: 1rem 0 0;
}

/* Kurzübersicht oben in der Detailansicht */

.loc-summary {
  background: #faf6ef;
  border: 1px solid #e3d6c2;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 0.8rem 0 1.2rem;
}

.loc-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.loc-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.8rem 1.4rem;
}

.loc-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.88rem;
  padding: 0.15rem 0;
}

.loc-stat-label {
  color: #8a7a63;
}

.loc-stat-value {
  text-align: right;
}

.loc-stat-strong {
  font-weight: bold;
}

.loc-summary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

/* Vergleichsansicht */

.loc-compare-wrap {
  overflow-x: auto;
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  margin-top: 0.8rem;
  -webkit-overflow-scrolling: touch;
}

.loc-compare-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.88rem;
}

.loc-compare-table th,
.loc-compare-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #ece1d1;
  vertical-align: top;
  text-align: left;
  background: #fffdfa;
}

.loc-compare-table td,
.loc-compare-table thead th:not(:first-child) {
  min-width: 150px;
}

/* Kriterien-Spalte bleibt beim seitlichen Scrollen sichtbar */
.loc-compare-table tbody th:first-child,
.loc-compare-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 100px;
  max-width: 130px;
  background: #faf6ef;
  color: #6b5d4a;
  font-weight: normal;
  font-size: 0.8rem;
  border-right: 1px solid #e3d6c2;
}

.loc-compare-table thead th {
  background: #f6efe7;
  vertical-align: bottom;
}

.loc-compare-table thead th:first-child {
  z-index: 2;
}

.loc-compare-name {
  font-weight: bold;
  font-size: 0.95rem;
  word-break: break-word;
}

.loc-compare-remove {
  margin-top: 0.3rem;
  border: none;
  background: none;
  color: #8a7a63;
  font-size: 0.75rem;
  text-decoration: underline;
  padding: 0;
}

/* Abschnittszeile spannt alle Spalten - nur das Label selbst bleibt beim
   seitlichen Scrollen sichtbar (eine volle Zeilen-Zelle kann nicht sticky sein). */
.loc-compare-table tr.loc-compare-section th {
  position: static;
  z-index: auto;
  background: #f0e6d6;
  color: #6b5d4a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  font-weight: bold;
  min-width: 0;
  max-width: none;
  border-right: none;
}

.loc-compare-section-label {
  position: sticky;
  left: 0.7rem;
  display: inline-block;
}

.loc-cell-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.loc-cell-sub {
  display: block;
  font-size: 0.75rem;
  color: #8a7a63;
  margin-top: 0.15rem;
}

.loc-cell-strong {
  font-weight: bold;
  font-size: 1rem;
}

@media (max-width: 640px) {
  .loc-grid,
  .loc-rating-grid {
    grid-template-columns: 1fr;
  }

  .loc-section-body {
    padding: 0.3rem 0.8rem 0.9rem;
  }

  .loc-compare-card {
    padding: 1.25rem 0.6rem;
  }

  .loc-compare-table td,
  .loc-compare-table thead th:not(:first-child) {
    min-width: 140px;
  }

  .loc-compare-table tbody th:first-child,
  .loc-compare-table thead th:first-child {
    min-width: 84px;
    max-width: 96px;
    padding: 0.5rem;
    font-size: 0.74rem;
  }

  .loc-sort-select {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

/* ---------- Mobile-Layout (alle internen Seiten) ---------- */

@media (max-width: 640px) {
  .page {
    padding: 1rem 0.75rem;
  }

  .card {
    padding: 1.25rem 1rem;
  }

  .topbar {
    margin-bottom: 0.8rem;
  }

  /* Navigation: eingeklappt, per Button (nav.js) auszuklappen. */
  .nav-toggle {
    display: block;
    width: 100%;
    max-width: 720px;
    margin: 0.4rem 0 0;
    padding: 0.7rem 1rem;
    border: 1px solid #b08d57;
    border-radius: 8px;
    background: #fffdfa;
    color: #3b3229;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-align: left;
  }

  nav.tabs {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0.4rem 0 1rem;
    background: #fffdfa;
    border: 1px solid #e3d6c2;
    border-radius: 8px;
    overflow: hidden;
  }

  nav.tabs.open {
    display: flex;
  }

  nav.tabs a {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #ece1d1;
  }

  nav.tabs a:last-child {
    border-bottom: none;
  }

  nav.tabs a.active {
    background: #faf6ef;
    border-bottom-color: #ece1d1;
    border-left: 3px solid #b08d57;
  }

  h1 {
    font-size: 1.4rem;
  }

  .gu-header-row {
    align-items: flex-start;
  }

  .fm-toolbar > .btn-secondary,
  .pl-header-actions > .btn-secondary {
    flex: 1 1 auto;
  }

  .ns-add-row {
    flex-wrap: wrap;
  }
}


/* ---------- Gästeplanung (Migration 016) ---------- */

.card.gu-wide {
  max-width: 1120px;
}

.gu-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Kennzahlen */

.gu-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0.6rem;
  margin: 0.9rem 0 0.4rem;
}

.gu-stat {
  border: 1px solid #e3d6c2;
  background: #faf6ef;
  border-radius: 10px;
  padding: 0.6rem 0.5rem;
  text-align: center;
}

.gu-stat-main {
  background: #f0e2c6;
}

.gu-stat-value {
  font-size: 1.5rem;
  line-height: 1.2;
  color: #3b3229;
}

.gu-stat-yes .gu-stat-value {
  color: #3d6b3d;
}

.gu-stat-no .gu-stat-value {
  color: #a3423a;
}

.gu-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #8a7a63;
}

.gu-summary-notes {
  margin: 0 0 1rem;
}

/* Ansichtsumschalter */

.gu-view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.2rem 0 0.6rem;
}

.gu-view-toggle .btn-secondary.active {
  background: #b08d57;
  color: #fffdfa;
}

/* Tabelle */

.gu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.gu-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a7a63;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #e3d6c2;
}

.gu-table td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid #ece1d1;
  vertical-align: middle;
}

.gu-cell-wrap {
  overflow-wrap: anywhere;
  min-width: 11rem;
}

.gu-cell-actions {
  text-align: right;
  white-space: nowrap;
}

.gu-name-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: #3b3229;
  text-align: left;
  cursor: pointer;
  text-decoration: underline dotted #b08d57;
  text-underline-offset: 3px;
}

.gu-name-link:hover {
  color: #8a6a2a;
}

.gu-dup-badge {
  display: inline-block;
  margin: 0.15rem 0 0 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #fbeed0;
  color: #8a6a2a;
  font-size: 0.7rem;
  cursor: help;
}

/* Einladungsstatus-Badges (getrennt vom Antwortstatus .gu-badge-*) */

.gu-inv-planned {
  background: #ece1d1;
  color: #6b5d4a;
}

.gu-inv-invitation_prepared {
  background: #f0e2c6;
  color: #8a6a2a;
}

.gu-inv-invited {
  background: #dfe9f4;
  color: #2f4f7a;
}

.gu-inv-not_invited {
  background: #e8e3da;
  color: #5c5346;
  text-decoration: line-through;
}

/* Gruppenansicht */

.gu-group-card {
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  background: #fffdfa;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
}

.gu-group-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.3rem;
}

.gu-group-title-wrap {
  min-width: 0;
  flex: 1 1 220px;
}

.gu-group-title {
  margin: 0;
  font-size: 1.05rem;
  word-break: break-word;
}

.gu-group-member {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  padding: 0.45rem 0.1rem;
  border-top: 1px solid #ece1d1;
  font-size: 0.9rem;
}

.gu-group-empty {
  padding: 0.6rem 0;
}

.gu-group-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.gu-group-add select {
  flex: 1 1 240px;
  width: auto;
}

/* Hinweisbox / Aktionsleiste */

.gu-notice {
  border: 1px solid #e6c98a;
  background: #fdf6e6;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin: 0.8rem 0;
  font-size: 0.88rem;
}

.gu-notice ul {
  margin: 0.3rem 0 0.3rem 1.2rem;
  padding: 0;
}

.gu-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #fffdfa;
  border-top: 1px solid #e3d6c2;
  padding: 0.7rem 0;
  margin: 1rem 0 0;
}

.gu-sticky-actions .btn-primary {
  width: auto;
  margin-top: 0;
  padding-left: 1.6rem;
  padding-right: 1.6rem;
}

.im-confirm {
  margin: 0 0 0.6rem;
}

.gu-danger-btn {
  color: #a3423a;
  border-color: #a3423a;
}

/* Excel-Import */

.im-step {
  margin-top: 0.6rem;
}

.im-subhead {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.95rem;
}

.im-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
}

.im-row > div {
  flex: 1 1 220px;
}

.im-scroll {
  overflow-x: auto;
  border: 1px solid #e3d6c2;
  border-radius: 8px;
}

.im-sample {
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 100%;
}

.im-sample th,
.im-sample td {
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid #ece1d1;
  text-align: left;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.im-sample th {
  background: #faf6ef;
  color: #6b5d4a;
  font-weight: normal;
}

.im-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.2rem 1.2rem;
}

.im-map-row label {
  margin-top: 0.7rem;
}

.im-row-card {
  border: 1px solid #e3d6c2;
  border-left-width: 4px;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.6rem;
  background: #fffdfa;
}

.im-cat-new { border-left-color: #6fa06f; }
.im-cat-match_certain { border-left-color: #6b8fb5; }
.im-cat-match_possible,
.im-cat-duplicate_in_file { border-left-color: #d0a23a; }
.im-cat-problem { border-left-color: #c2554b; background: #fdf3f1; }

.im-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.7rem;
  word-break: break-word;
}

.im-badge-new { background: #e1efe1; color: #3d6b3d; }
.im-badge-match_certain { background: #dfe9f4; color: #2f4f7a; }
.im-badge-match_possible,
.im-badge-duplicate_in_file { background: #fbeed0; color: #8a6a2a; }
.im-badge-problem { background: #f6e4e2; color: #a3423a; }

.im-reasons,
.im-matches {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
}

.im-reason-error { color: #a3423a; }
.im-reason-warning { color: #8a6a2a; }
.im-reason-info { color: #6b5d4a; }

.im-changes {
  margin-top: 0.4rem;
}

.im-diff {
  border-collapse: collapse;
  font-size: 0.82rem;
}

.im-diff th {
  text-align: left;
  font-weight: normal;
  color: #8a7a63;
  padding: 0.1rem 0.8rem 0.1rem 0;
}

.im-diff td {
  padding: 0.1rem 0.4rem;
  word-break: break-word;
}

.im-diff-from { color: #a3423a; }
.im-diff-to { color: #3d6b3d; }

.im-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  margin-top: 0.5rem;
}

.im-action label {
  margin: 0;
}

.im-action select {
  width: auto;
  min-width: 220px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.im-result {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Mobil: Tabelle wird zu Karten */

@media (max-width: 720px) {
  .gu-table,
  .gu-table tbody,
  .gu-table tr,
  .gu-table td {
    display: block;
    width: 100%;
  }

  .gu-table thead {
    position: absolute;
    left: -9999px;
  }

  .gu-table tr {
    border: 1px solid #e3d6c2;
    border-radius: 10px;
    background: #fffdfa;
    margin-bottom: 0.7rem;
    padding: 0.5rem 0.7rem;
  }

  .gu-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.8rem;
    padding: 0.3rem 0;
    border-bottom: none;
    text-align: right;
  }

  .gu-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a7a63;
    text-align: left;
  }

  .gu-table td.gu-cell-name {
    display: block;
    text-align: left;
    font-size: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #ece1d1;
    margin-bottom: 0.2rem;
  }

  .gu-table td.gu-cell-name::before,
  .gu-table td.gu-cell-actions::before {
    content: none;
  }

  .gu-table td.gu-cell-actions {
    justify-content: flex-end;
    padding-top: 0.5rem;
  }

  .gu-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .gu-header-actions {
    width: 100%;
  }

  .gu-header-actions > .btn-secondary {
    flex: 1 1 auto;
    text-align: center;
  }

  .gu-sticky-actions .btn-primary {
    width: 100%;
  }

  .im-action select {
    width: 100%;
  }
}

.dash-export {
  text-align: center;
  margin: 1.5rem 0 0;
}

/* ---------- Gästeplanung Teil 2: Priorität, Beziehung, sozialer Kreis (Migration 017) ---------- */

.gu-prio-summary p {
  margin: 0 0 0.2rem;
}

.gu-prio {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.gu-prio-1 { background: #d9ecd9; color: #2f5f2f; }
.gu-prio-2 { background: #e6efd3; color: #55692a; }
.gu-prio-3 { background: #f0e2c6; color: #8a6a2a; }
.gu-prio-4 { background: #ece1d1; color: #6b5d4a; }
.gu-prio-5 { background: #dfe9f4; color: #2f4f7a; }
.gu-prio-none { color: #a89a86; }

.gu-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
}

.gu-chip {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  background: #f3ece0;
  border: 1px solid #e3d6c2;
  color: #5c5346;
  font-size: 0.72rem;
  white-space: nowrap;
}

.gu-chip-archived {
  opacity: 0.6;
  font-style: italic;
}

.gu-cell-chips {
  max-width: 14rem;
}

.gu-second-name {
  display: inline-block;
  margin-left: 0.4rem;
}

.gu-name-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  border: 1px dashed #b08d57;
  color: #8a6a2a;
  font-size: 0.68rem;
}

.gu-contact {
  margin-top: 0.15rem;
  overflow-wrap: anywhere;
}

.gu-social-box {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #e3d6c2;
  border-radius: 8px;
  background: #faf6ef;
}

.gu-new-social {
  margin-top: 0.5rem;
}

.gu-tx-section {
  margin-bottom: 1.5rem;
}

.gu-tx-input {
  flex: 1 1 200px;
  min-width: 0;
}

.gu-tx-archived .gu-tx-input {
  opacity: 0.65;
}

/* Import-Vorschau: exakte Speicherung je Zeile */

.im-facts {
  display: grid;
  grid-template-columns: max-content 1fr max-content 1fr;
  gap: 0.15rem 0.8rem;
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
}

.im-facts dt {
  color: #8a7a63;
}

.im-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.im-facts dd.im-unknown {
  color: #b5a690;
}

.im-badge-flag {
  background: #fbeed0;
  color: #8a6a2a;
}

@media (max-width: 720px) {
  .im-facts {
    grid-template-columns: max-content 1fr;
  }

  .gu-chips {
    justify-content: flex-end;
  }

  .gu-cell-chips {
    max-width: none;
  }

  .gu-second-name,
  .gu-name-tag {
    margin-left: 0;
    margin-right: 0.4rem;
  }
}

/* ---------- Gruppenfähige öffentliche RSVP-Anmeldung (Migration 018) ---------- */

.gu-companions {
  margin-top: 0.6rem;
}

.gu-companions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin-top: 0.2rem;
}

.gu-warning {
  color: #a3423a;
  font-size: 0.82rem;
  margin: 0.3rem 0 0.6rem;
}

/* ---------- Einstellungen: E-Mail-Benachrichtigungen (Bestätigungs-E-Mail RSVP) ---------- */

.settings-section-heading {
  font-size: 1.1rem;
  margin: 2rem 0 0.5rem;
  border-top: 1px solid #e3d6c2;
  padding-top: 1.5rem;
}

.settings-checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #3b3229;
  margin: 0.6rem 0 0.2rem;
}

.settings-checkbox-option input {
  width: auto;
}

.hint {
  color: #8a7a63;
  font-size: 0.82rem;
  margin: 0.3rem 0 0.6rem;
}

.settings-test-mail-btn {
  margin-top: 1rem;
}

/* ---------- Sitzplan (Migration 020) ---------- */

.card.sp-wide {
  max-width: 1400px;
}

.sp-social-breakdown {
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  background: #faf6ef;
  padding: 0.6rem 0.9rem;
  margin: 0.4rem 0 0.8rem;
}

.sp-social-breakdown summary {
  cursor: pointer;
  color: #8a7a63;
  font-size: 0.85rem;
}

.sp-social-breakdown-body p {
  margin: 0.3rem 0;
}

.sp-group-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  background: #f0e2c6;
  color: #5c4a1f;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin: 0 0 0.8rem;
  font-size: 0.85rem;
}

.sp-board {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.8rem;
}

.sp-column {
  flex: 0 0 260px;
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  background: #faf6ef;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
}

.sp-pool-column {
  background: #fffdfa;
  border-style: dashed;
}

.sp-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.sp-column-title {
  margin: 0;
  font-size: 0.95rem;
}

.sp-pool-column .sp-column-title {
  margin-bottom: 0.4rem;
}

.sp-capacity-badge {
  font-size: 0.72rem;
  color: #8a7a63;
  background: #f0e2c6;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

.sp-capacity-over {
  background: #f6d9d5;
  color: #a3423a;
}

.sp-table-over {
  border-color: #d9a49c;
}

.sp-table-notes {
  font-size: 0.78rem;
  color: #8a7a63;
  margin: 0.3rem 0 0;
}

.sp-column-body {
  margin-top: 0.6rem;
  min-height: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-radius: 8px;
  transition: background-color 0.1s ease;
}

.sp-column-body.sp-drop-over {
  background: #f0e2c6;
}

.sp-column-empty {
  padding: 0.4rem 0;
  margin: 0;
  font-size: 0.78rem;
}

.sp-guest-card {
  background: #fffdfa;
  border: 1px solid #e3d6c2;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  cursor: grab;
}

.sp-guest-card.dragging {
  opacity: 0.4;
}

.sp-card-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}

.sp-card-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.sp-card-menu-btn {
  padding: 0.1rem 0.45rem;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.sp-card-tags {
  margin-top: 0.35rem;
  justify-content: flex-start;
}

.sp-card-group {
  margin-top: 0.35rem;
  font-size: 0.74rem;
  color: #8a7a63;
}

.sp-split-warning {
  color: #a3423a;
}

@media (max-width: 860px) {
  .sp-board {
    flex-direction: column;
    overflow-x: visible;
  }

  .sp-column {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* ---------- Budget ---------- */

.card.bg-wide {
  max-width: 960px;
}

.bg-total-budget {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8rem;
  background: #faf6ef;
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin: 0.8rem 0;
}

.bg-total-budget-label {
  color: #6b5d4a;
}

.bg-total-budget-value {
  font-size: 1.3rem;
  font-weight: bold;
}

.bg-total-budget-input {
  width: 10rem;
}

.bg-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
  margin: 0.8rem 0 1.2rem;
}

.bg-kpi {
  background: #faf6ef;
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}

.bg-kpi-warn {
  background: #f9efe9;
  border-color: #e6c2b3;
}

.bg-kpi-label {
  font-size: 0.75rem;
  color: #8a7a63;
  letter-spacing: 0.02em;
}

.bg-kpi-value {
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 0.15rem;
}

.bg-kpi-hint {
  font-size: 0.72rem;
  color: #8a6a2a;
  margin-top: 0.3rem;
}

.bg-kpi-warn .bg-kpi-hint {
  color: #a3423a;
}

.bg-breakdown-section,
.bg-upcoming-section {
  margin-bottom: 1rem;
}

.bg-cat-row {
  padding: 0.6rem 0.1rem;
  border-bottom: 1px solid #ece1d1;
}

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

.bg-cat-name {
  font-weight: bold;
  font-size: 0.9rem;
}

.bg-cat-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  font-size: 0.78rem;
  color: #6b5d4a;
  margin: 0.2rem 0 0.4rem;
}

.bg-cat-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #ece1d1;
  overflow: hidden;
}

.bg-cat-bar-planned {
  position: absolute;
  inset: 0;
  border-right: 2px solid #8a7a63;
}

.bg-cat-bar-paid {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: #b08d57;
  border-radius: 999px;
}

.bg-upcoming-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  padding: 0.5rem 0.1rem;
  border-bottom: 1px solid #ece1d1;
  font-size: 0.85rem;
}

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

.bg-upcoming-overdue {
  color: #a3423a;
}

.bg-upcoming-title {
  font-weight: bold;
  flex: 1 1 160px;
}

.bg-upcoming-amount {
  font-weight: bold;
}

.bg-upcoming-due {
  font-size: 0.8rem;
}

.bg-summary-box {
  background: #faf6ef;
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.bg-summary-row {
  padding: 0.15rem 0;
}

.bg-payment-row {
  background: #fbf8f2;
}

.bg-payment-add {
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #e3d6c2;
}

@media (max-width: 480px) {
  .bg-total-budget {
    flex-direction: column;
    align-items: flex-start;
  }

  .bg-total-budget-input {
    width: 100%;
  }
}

/* ---------- Aufgaben-Modul (aufgaben.html/aufgaben.js) ---------- */
/* Fälligkeits-Badges (Tasks.dueBucket) - eigene Farbskala, unabhängig von
   den Status-Badges (.tk-status-*) und Prioritäts-Badges (.tk-priority-*)
   weiter unten, damit alle drei gleichzeitig in einer Zeile unterscheidbar
   bleiben. Basis .loc-badge (gleiche Form/Größe wie überall im internen
   Bereich), nur die Farben sind neu. */
.tk-badge-overdue { background: #f6e4e2; color: #a3423a; font-weight: bold; }
.tk-badge-today { background: #f7e7a8; color: #7a5b00; font-weight: bold; }
.tk-badge-soon { background: #f0e2c6; color: #8a6a2a; }
.tk-badge-later { background: #ece1d1; color: #6b5d4a; }
.tk-badge-none { background: #ece1d1; color: #8a7a63; }
.tk-badge-done { background: #e8e3da; color: #5c5346; text-decoration: line-through; }

.tk-status-open,
.tk-status-waiting { background: #ece1d1; color: #6b5d4a; }
.tk-status-in_progress { background: #f0e2c6; color: #8a6a2a; }
.tk-status-done { background: #dcefdc; color: #2f5f2f; }
.tk-status-cancelled { background: #e8e3da; color: #7a6f60; text-decoration: line-through; }

.tk-priority-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tk-priority-low { color: #8a7a63; border-color: #e3d6c2; }
.tk-priority-normal { color: #6b5d4a; border-color: #e3d6c2; background: #faf6ef; }
.tk-priority-high { color: #8a6a2a; border-color: #e6c98a; background: #f0e2c6; }
.tk-priority-urgent { color: #a3423a; border-color: #e6b3ab; background: #f6e4e2; font-weight: bold; }

/* Schnellbedienung: Erledigt-Checkbox direkt in der Aufgabenzeile, gleiche
   Größe/Optik wie die Next-Steps-Checkbox (.ns-checkbox), bewusst
   wiederverwendet statt dupliziert. */
.tk-row-title.completed {
  text-decoration: line-through;
  color: #a89a86;
}

.tk-kpi-overdue .bg-kpi-value {
  color: #a3423a;
}
.tk-kpi-today .bg-kpi-value {
  color: #7a5b00;
}

@media (max-width: 640px) {
  .tk-row-actions .btn-secondary {
    padding: 0.4rem 0.55rem;
  }
}

/* Mehrfachauswahl-Feld "Verantwortlich" (Migration 024): kompaktes Wrap-Raster
   statt einer einspaltigen Liste - auf Desktop mehrspaltig, auf schmalen
   Bildschirmen wrapt jede Checkbox auf ihre eigene Zeile (kein horizontales
   Scrollen, große Tippfläche). */
.tk-assignee-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

/* Schnellanlage eines Verantwortlichen direkt im Formular - der Button sitzt
   knapp unter der Checkbox-Gruppe, die Inline-Zeile (Name-Eingabe +
   Hinzufügen/Abbrechen) nutzt das bestehende .gu-group-add-Wrap-Verhalten
   (siehe Kategorien-/Verantwortlichen-Verwaltung), damit auf ca. 390px kein
   horizontales Scrollen entsteht. */
.tk-assignee-add-btn {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  padding: 0.4rem 0.7rem;
}

/* Checkliste innerhalb einer Aufgabe (Migration 025). Die Zeilen im
   Bearbeitungsformular (buildChecklistItemRow) nutzen bewusst dieselben
   fm-row-/gu-tx-Klassen wie die Kategorien-/Verantwortlichen-Verwaltung -
   kein neues Zeilen-Layout nötig, schon mobil erprobt. */
.tk-checklist-row-done .gu-tx-input {
  text-decoration: line-through;
  color: #a89a86;
}

/* Fortschritts-Badge in der Aufgabenliste - klickbarer Button im Look eines
   loc-badge (Formatierung von dort geerbt), Browser-Button-Defaults
   zurückgesetzt. */
.tk-checklist-badge {
  border: none;
  font: inherit;
  cursor: pointer;
}

/* Kompakte Auf-/Zuklapp-Checkliste direkt in der Aufgabenliste (nur Text +
   Abhaken, siehe buildChecklistExpandPanel) - eigener, leicht abgesetzter
   Block direkt unter der Zeile. */
.tk-row-wrap {
  display: contents;
}

.tk-checklist-expand {
  margin: 0 0 0.6rem;
  padding: 0.5rem 0.8rem;
  background: #faf6ef;
  border: 1px solid #e3d6c2;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tk-checklist-expand-row {
  font-size: 0.85rem;
}

/* Termine-Modul: Abschnitts-/Monatsüberschriften für die chronologische
   Datumsgruppierung ("Kommende Termine" / "Vergangene Termine", darunter
   "Oktober 2026" usw., siehe assets/intern/termine.js renderGroupedSection). */
.ap-section-header {
  margin: 1.4rem 0 0.6rem;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e3d6c2;
  padding-bottom: 0.3rem;
}
.ap-section-header:first-child {
  margin-top: 0;
}

.ap-month-header {
  margin: 0.9rem 0 0.4rem;
  font-size: 0.95rem;
  font-weight: bold;
  color: #8a7a63;
  letter-spacing: 0.02em;
}

/* Termine-Modul: Status-Badges (gleiche Form/Größe wie .loc-badge/.tk-status-*
   anderswo). planned/confirmed sind hier eigene Farben (bei den Aufgaben-
   Status gibt es dafür keine Entsprechung), done/cancelled bewusst in
   denselben Farben wie .tk-status-done/.tk-status-cancelled. */
.ap-status-planned { background: #ece1d1; color: #6b5d4a; }
/* Gleicher Farbton wie .loc-badge-contacted/.loc-badge-av-requested - im
   ganzen Projekt die Farbe für "wartet auf Antwort/Rückmeldung". */
.ap-status-requested { background: #f0e2c6; color: #8a6a2a; }
.ap-status-confirmed { background: #dcefdc; color: #2f5f2f; }
.ap-status-done { background: #e1efe1; color: #3d6b3d; text-decoration: line-through; }
.ap-status-cancelled { background: #e8e3da; color: #7a6f60; text-decoration: line-through; }

/* Kompakter Termine-Hinweis auf der Location-Detailseite (Auftrag Abschnitt
   7) - siehe assets/intern/locations.js renderAppointmentsSummary. */
.loc-summary-appointments {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid #e3d6c2;
}
.loc-summary-appointments .loc-stat-row {
  margin: 0.2rem 0;
}

.loc-documents-block {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #e3d6c2;
}
.loc-documents-block h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: #3b3229;
}

/* Zentrale Dokument-Verknüpfung (Migration 029) - gemeinsame Komponente
   window.DocumentLinksWidget, identisch bei Location/Dienstleister/Aufgabe/
   Termin eingebunden (Auftrag Abschnitt 27). Gleiches Zeilen-/Aktionsschema
   wie .fm-row in der Dateiverwaltung, bewusst wiederverwendet statt neu
   erfunden. */
.dl-list {
  margin-bottom: 0.8rem;
}

.dl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0.2rem;
  border-bottom: 1px solid #ece1d1;
}

.dl-row-main {
  min-width: 0;
  flex: 1 1 220px;
}

.dl-row-name {
  word-break: break-word;
  font-size: 0.92rem;
}

.dl-row-meta {
  color: #8a7a63;
  font-size: 0.78rem;
  word-break: break-word;
}

.dl-row-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.dl-row-actions .btn-secondary {
  font-size: 0.78rem;
  padding: 0.4rem 0.7rem;
}

.dl-menu-trigger {
  min-width: 2.2rem;
  padding: 0.4rem 0.55rem !important;
  font-size: 1.1rem;
  line-height: 1;
}

/* Overlay für "Dokument verknüpfen"/"Verknüpfung bearbeiten" - bewusst ein
   einziges, gemeinsames Overlay-Muster (nicht viermal separat gebaut), da
   die Location-/Dienstleister-/Aufgaben-/Termin-Detailansichten dem
   bestehenden Panel-Wechsel-Muster folgen und darunter sichtbar bleiben
   müssen, während das Dokument ausgewählt wird. */
.dl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(59, 50, 41, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem;
  z-index: 1200;
  overflow-y: auto;
}

.dl-overlay-box {
  background: #fffdfa;
  border-radius: 12px;
  border: 1px solid #e3d6c2;
  padding: 1.2rem;
  width: 100%;
  max-width: 480px;
}

.dl-overlay-box h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  color: #3b3229;
}

.dl-field {
  display: block;
  margin: 0.7rem 0;
}

.dl-field span {
  display: block;
  font-size: 0.8rem;
  color: #8a7a63;
  margin-bottom: 0.25rem;
}

.dl-field input,
.dl-field select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d8c9b2;
  border-radius: 8px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.dl-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.dl-breadcrumb {
  font-size: 0.85rem;
  color: #6b5d4a;
  margin: 0 0 0.8rem;
  word-break: break-word;
}

.dl-breadcrumb a {
  color: #b08d57;
  text-decoration: none;
}

.dl-picker-list {
  max-height: 45vh;
  overflow-y: auto;
  margin-bottom: 0.8rem;
}

.dl-picker-file {
  width: 100%;
  text-align: left;
  word-break: break-word;
}

@media (max-width: 640px) {
  .dl-overlay {
    padding: 0;
    align-items: stretch;
  }
  .dl-overlay-box {
    max-width: none;
    border-radius: 0;
    min-height: 100%;
  }
  .dl-row {
    flex-direction: column;
    align-items: stretch;
  }
  .dl-row-actions {
    justify-content: flex-end;
  }
}
