@import url('/tokens.css');

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text-dunkel);
  background: var(--creme-100);
  font-family: var(--font-text);
  line-height: 1.5;
}
main {
  max-width: 38rem;
  margin: auto;
  padding: 1.5rem;
}
header {
  border-bottom: 1px solid var(--gold-500);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}
.marke {
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 700;
}
h1,
h2 {
  font-family: var(--font-ueberschrift);
  line-height: 1.15;
}
h1 {
  font-size: 2.1rem;
  margin-top: 0.2rem;
}
h2 {
  font-size: 1.4rem;
}
.ort {
  margin-bottom: 0.3rem;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 1.5rem 0;
}
legend {
  font-weight: 650;
  margin-bottom: 0.75rem;
}
.stimmungen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.stimmungen label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--gruen-700);
  border-radius: var(--radius-m);
  padding: 0.7rem 0.3rem;
  min-height: 3rem;
  font-size: 0.88rem;
}
input[type='radio'] {
  accent-color: var(--gruen-700);
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}
label:has(input:checked) {
  background: var(--gruen-900);
  color: var(--creme-100);
}
textarea {
  width: 100%;
  border: 1px solid var(--gruen-700);
  border-radius: var(--radius-m);
  background: var(--creme-50);
  font: inherit;
  padding: 0.75rem;
  margin-top: 0.4rem;
}
.kanal {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  border: 1px solid var(--gruen-700);
  border-radius: var(--radius-m);
  padding: 1rem;
  margin-bottom: 0.75rem;
}
small {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.5;
}
.klein {
  font-size: 0.85rem;
}
button {
  width: 100%;
  min-height: 3rem;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--gruen-900);
  color: var(--creme-100);
  font: inherit;
  font-weight: 650;
  padding: 0.8rem;
}
a {
  color: var(--gruen-700);
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}
section {
  border-top: 1px solid var(--gold-500);
  padding: 1rem 0;
}
footer {
  font-size: 0.75rem;
  margin-top: 2rem;
}
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
select {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem;
  font: inherit;
  color: inherit;
  background: var(--creme-100);
  border: 1px solid var(--text-dunkel);
  border-radius: 0.5rem;
}
article {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gold-500);
}

/* Shared account forms, including password reset and invitations. */
form label:has(input:not([type='radio']):not([type='checkbox'])) {
  display: block;
  margin: 0.8rem 0;
}
input:not([type='hidden']):not([type='radio']):not([type='checkbox']) {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem;
  font: inherit;
  color: var(--gruen-900);
  border: 1px solid var(--gruen-700);
  border-radius: var(--radius-m);
  background: var(--creme-50);
}

/* Admin forms are isolated from the guest selection cards. */
.admin form {
  margin: 1rem 0;
}
.admin form label {
  display: block;
  margin: 1rem 0;
}
.admin form label:has(input[type='checkbox']),
.host form label:has(input[type='checkbox']) {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.65rem;
  border: 1px solid var(--gruen-700);
  border-radius: var(--radius-m);
}
.admin input[type='checkbox'],
.host input[type='checkbox'] {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  accent-color: var(--gruen-700);
}
.admin details {
  margin: 1rem 0;
}
.admin summary {
  cursor: pointer;
  min-height: 2.75rem;
  padding: 0.6rem 0;
}

.recovery-id {
  overflow-wrap: anywhere;
}

/* QR addresses and operational identifiers must wrap on narrow screens. */
article p {
  overflow-wrap: anywhere;
}

/* Internal work surfaces: tablet and desktop adapt; guest reading width stays capped. */
.host main a,
.admin main a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.host main a:focus-visible,
.admin main a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}
.host nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0;
  margin-bottom: 1.5rem;
}
.host nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--gruen-700);
  border-radius: var(--radius-m);
  font-size: 1rem;
  text-decoration: none;
}
.host nav a:hover {
  background: var(--creme-50);
}
.host details,
.host form,
.admin .beleg {
  margin: 1rem 0;
}
.host summary {
  cursor: pointer;
  min-height: 2.75rem;
  padding: 0.6rem 0;
}
.konto-aktion {
  display: inline-flex;
  padding: 0.8rem 1rem;
  background: var(--gruen-900);
  color: var(--creme-100);
  border-radius: var(--radius-m);
}
.host .qr-liste {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
.host .qr-liste article {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--gold-500);
  border-radius: var(--radius-m);
}
.host [data-qr-adresse] {
  width: min(100%, 16rem);
  margin: 1rem 0;
}
.host .qr-liste p {
  overflow-wrap: anywhere;
}
@media (min-width: 64rem) {
  .host main,
  .admin main {
    max-width: 76rem;
    padding: 2rem 3rem;
  }
  .host form,
  .admin form {
    max-width: 40rem;
  }
  .host article,
  .admin .beleg {
    padding: 1.5rem;
    border: 1px solid var(--gold-500);
    border-radius: var(--radius-m);
  }
}

@media (min-width: 48rem) and (max-width: 63.999rem) {
  .host main,
  .admin main {
    max-width: 76rem;
    padding: 2rem;
  }
  .host form,
  .admin form {
    max-width: 40rem;
  }
}

/* Guest language choices remain usable on touch screens. */
nav[aria-label='Language'] {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
nav[aria-label='Language'] a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.25rem 0.5rem;
}
nav[aria-label='Language'] a[aria-current='true'] {
  font-weight: 700;
}

/* Language picker is compact; RTL is logical and guest-provided content isolated. */
.sprachdetails {
  margin-bottom: 1rem;
}
.sprachdetails summary {
  cursor: pointer;
  min-height: 44px;
  padding-block: 0.5rem;
}
html[dir='rtl'] body {
  text-align: start;
}
html[dir='rtl'] .marke {
  direction: ltr;
  unicode-bidi: isolate;
}
textarea,
article p,
.ort {
  unicode-bidi: plaintext;
}

.betriebslogo {
  max-width: min(100%, 16rem);
  max-height: 8rem;
  object-fit: contain;
  display: block;
  margin-block: 1rem;
}
body[data-palette='blau'] {
  --gruen-900: #143a5a;
}
body[data-palette='wein'] {
  --gruen-900: #552735;
}
body[data-palette='violett'] {
  --gruen-900: #3f3157;
}
body[data-palette='graphit'] {
  --gruen-900: #263638;
}

.betriebslogo[hidden] {
  display: none;
}

.blanko-tisch svg,
.claim-privat svg {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
  margin: 1rem auto;
  background: white;
}
@media print {
  .claim-privat {
    break-after: page;
  }
  .blanko-hinweis,
  .blanko-trennung,
  .blanko-oeffentlich-titel {
    display: none;
  }
  .blanko-tisch {
    break-after: page;
    break-inside: avoid;
  }
  form,
  nav {
    display: none;
  }
}
/* Guided setup. Progress comes from saved tenant state, not browser drafts. */
.host .onboarding {
  margin: 32px 0;
}
.host .onboarding > .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b5429;
}
.host .onboarding > h2 {
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1.12;
  margin: 16px 0 24px;
}
.host .onboarding-primary {
  display: inline-flex;
  align-items: center;
  background: #d0b068;
  color: #0a1f18;
  padding: 15px 22px;
  border-radius: 40px;
  font-weight: 650;
  text-decoration: none;
  margin: 12px 0 25px;
}
.host .onboarding > ol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  list-style: none;
  padding: 0;
  counter-reset: onboarding;
}
.host .onboarding > ol > li {
  counter-increment: onboarding;
  border: 1px solid #0a1f182e;
  border-radius: 16px;
  background: #faf9f5;
  padding: 24px;
  margin: 0;
}
.host .onboarding > ol > li::before {
  content: '0' counter(onboarding);
  font-size: 12px;
  color: #80602e;
  font-weight: 650;
}
.host .onboarding li section {
  border: 0;
  padding: 0;
}
.host .onboarding li p:first-child {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 14px 0;
  color: #627368;
}
.host .onboarding li.saved {
  border-color: #58785d80;
}
.host .onboarding li.saved p:first-child {
  color: #285e3b;
}
.host .onboarding li h3 {
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1.15;
  margin: 16px 0;
}
.host .onboarding li p {
  font-size: 14px;
  line-height: 1.6;
}
.host .onboarding-reference {
  border-top: 1px solid #d0b06880;
  margin-top: 28px;
  padding-top: 22px;
}
.host .onboarding-reference summary {
  font-size: 16px;
  cursor: pointer;
}
@media (max-width: 760px) {
  .host .onboarding > ol {
    grid-template-columns: 1fr;
  }
  .host .onboarding > h2 {
    font-size: 33px;
  }
  .host .onboarding > ol > li {
    padding: 22px;
  }
}

.registrierung-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.original-logo {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--gruen-900);
  line-height: 1;
}
.original-logo img {
  width: 205px;
  max-width: 100%;
  height: auto;
  display: block;
}

.marken-icon {
  width: 38px;
  height: auto;
  border-radius: 6px;
  display: block;
}
.intern-label {
  display: inline-block;
  margin-left: 12px;
  font-size: 12px;
}

/* Shared action rhythm across guest, host and admin, including wizard buttons. */
form > button,
form > input[type='submit'] {
  margin-top: var(--control-gap, 0.75rem);
  margin-bottom: var(--control-gap, 0.75rem);
}
form > button + button {
  margin-left: 0;
  margin-top: var(--control-gap, 0.75rem);
}
form + form {
  margin-top: var(--form-gap, 1.5rem);
}
form > label {
  margin-bottom: var(--control-gap, 0.75rem);
}
button {
  min-height: 44px;
  border-radius: var(--radius-m, 0.5rem);
  box-shadow: var(--control-shadow, 0 2px 8px rgb(0 0 0 / 6%));
}
.host nav,
.admin nav {
  gap: var(--control-gap, 0.75rem);
}

/* Scoped host dashboard. Guest/admin surfaces retain their existing layout. */
.host-dashboard main {
  max-width: 92rem;
  padding: 1rem;
}
.dsh-app {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  min-height: calc(100vh - 2rem);
  border: 1px solid #d3d8c9;
  border-radius: 1rem;
  overflow: hidden;
  background: #f5f6ef;
}
.dsh-sidebar {
  background: #0c3027;
  color: #f9f7ee;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.dsh-side-brand img {
  max-width: 100%;
  height: auto;
}
.dsh-side-brand small,
.dsh-side-label,
.dsh-kicker {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}
.dsh-side-label {
  color: #c2cfb8;
  margin-bottom: 0;
}
.host .dsh-sidebar nav {
  flex-direction: column;
  gap: 0.5rem;
}
.host .dsh-sidebar nav a {
  color: #edf0e5;
  font-size: 0.85rem;
  border-color: transparent;
}
.host .dsh-sidebar nav a:hover,
.host .dsh-sidebar a[aria-current='page'] {
  background: #234638;
  border-color: #647a58;
}
.dsh-side-callout {
  margin-top: auto;
  font-family: var(--font-ueberschrift);
  font-size: 1.25rem;
  color: #d0d9c4;
}
.dsh-side-user {
  border-top: 1px solid #436054;
  padding-top: 1rem;
  font-size: 0.85rem;
}
.dsh-side-user small {
  font-size: 0.7rem;
  color: #c2cfb8;
}
.dsh-main {
  min-width: 0;
  padding: 1.75rem;
}
.dsh-topbar {
  border: 0;
  padding: 0;
  margin-bottom: 1.5rem;
}
.dsh-topbar h1 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}
.dsh-kicker {
  color: #64705f;
}
.host .dsh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: none;
  align-items: end;
  margin: 1.5rem 0;
}
.host .dsh-filters label {
  flex: 1 1 10rem;
  margin: 0;
  min-width: 0;
}
.host .dsh-filters button {
  width: auto;
  padding: 0.6rem 1rem;
  min-height: 2.75rem;
}
.dsh-period {
  font-size: 0.8rem;
  color: #5b6855;
}
.dsh-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.dsh-kpi,
.dsh-panel {
  border: 1px solid #dce0d3;
  background: #fcfcf7;
  border-radius: 0.5rem;
  padding: 1.25rem;
}
.dsh-kpi h2 {
  font: inherit;
  font-size: 0.8rem;
  margin: 0 0 0.75rem;
  color: #5b6855;
}
.dsh-kpi strong {
  font-size: 2.3rem;
  font-weight: 550;
  line-height: 1;
}
.dsh-kpi p {
  font-size: 0.75rem;
  margin-bottom: 0;
  color: #5b6855;
}
.dsh-positive {
  background: #eaf0df;
}
.dsh-critical {
  background: #faf0e7;
}
.dsh-mood {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
}
.dsh-panel h2 {
  font-family: var(--font-text);
  font-size: 1rem;
}
.dsh-donut {
  max-width: 15rem;
  width: 100%;
  display: block;
  margin: 1rem auto;
}
.dsh-ring-empty {
  stroke: #e5e8de;
}
.dsh-ring-positive {
  stroke: #527b5c;
}
.dsh-ring-neutral {
  stroke: #c8a85e;
}
.dsh-ring-critical {
  stroke: #b77c66;
}
.dsh-donut text {
  font-size: 0.8rem;
  fill: #173b2d;
}
.dsh-main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.dsh-main caption {
  text-align: start;
  font-weight: 650;
  margin: 1rem 0;
}
.dsh-main th,
.dsh-main td {
  text-align: start;
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid #dce0d3;
}
.host .dsh-main details.dsh-panel {
  margin: 1rem 0;
}
.host .dsh-feedback {
  background: #fcfcf7;
  border: 1px solid #dce0d3;
  border-radius: 0.5rem;
  padding: 1rem;
}
.dsh-feedback-meta {
  color: #66705d;
  font-size: 0.8rem;
}
.dsh-main footer {
  border-top: 1px solid #dce0d3;
  padding-top: 1rem;
  color: #66705d;
}
@media (max-width: 63.999rem) {
  .dsh-app {
    grid-template-columns: 10rem minmax(0, 1fr);
  }
  .dsh-main {
    padding: 1.25rem;
  }
  .dsh-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dsh-mood {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 47.999rem) {
  .host-dashboard main {
    padding: 0.5rem;
  }
  .dsh-app {
    grid-template-columns: minmax(0, 1fr);
  }
  .dsh-sidebar {
    padding: 1rem;
    gap: 0.5rem;
  }
  .dsh-side-brand {
    max-width: 10rem;
  }
  .host .dsh-sidebar nav {
    flex-direction: row;
    margin-bottom: 0;
  }
  .dsh-side-callout,
  .dsh-side-label {
    display: none;
  }
  .dsh-side-user {
    margin: 0;
  }
  .dsh-main {
    padding: 1rem;
  }
  .dsh-kpi {
    padding: 0.85rem;
  }
  .dsh-kpi strong {
    font-size: 2rem;
  }
}

.dsh-history {
  display: block;
  width: 100%;
  max-height: 240px;
  color: #507c5b;
}
.dsh-table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.dsh-table-scroll table {
  min-width: 650px;
}

.dsh-history {
  min-height: 160px;
}
.dsh-main .dsh-history text {
  font-size: 24px;
}

.dsh-sidebar details {
  margin: 1rem 0;
}
.dsh-sidebar summary {
  color: #e6eadf;
  padding: 0.6rem 0.4rem;
}
.dsh-sidebar details a {
  display: block;
}
.dsh-main .onboarding {
  padding: 0;
}
.host .dsh-sidebar .dsh-side-settings {
  width: 100%;
  min-width: 0;
}
.host .dsh-sidebar .dsh-side-settings summary {
  width: 100%;
  min-width: 44px;
  font-size: 0.85rem;
}
/* Application shell fills the viewport; panels own the internal spacing. */
.host.host-dashboard main {
  padding: 0;
  max-width: none;
}
.host.host-dashboard .dsh-app {
  border: 0;
  border-radius: 0;
  min-height: 100vh;
}

.dsh-signals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.5rem;
}
.dsh-signals strong {
  font-size: 2rem;
}
.dsh-topic-list {
  display: grid;
  gap: 1rem;
}
.dsh-topic-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) 3rem minmax(4rem, 2fr);
  gap: 1rem;
  align-items: center;
}
.dsh-topic-row meter {
  width: 100%;
  accent-color: #0a1f18;
}

.host .dsh-nav-shell > summary {
  display: none;
}
.host .dsh-nav-shell > nav {
  display: grid;
}
.host .dsh-sidebar .dsh-nav-shell {
  margin: 0;
}
@media (max-width: 47.999rem) {
  .host .dsh-nav-shell > summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 0;
    font-size: 1rem;
    color: #fff;
  }
  .host .dsh-nav-shell:not([open]) > nav {
    display: none;
  }
  .host .dsh-nav-shell[open] > nav {
    display: flex;
  }
  .host .dsh-side-user {
    display: none;
  }
  .host .dsh-sidebar {
    padding: 1rem;
  }
  .host .dsh-side-brand small {
    display: none;
  }
  .host .dsh-filters {
    display: grid;
    grid-template-columns: 1fr;
  }
  .host .dsh-filters label {
    width: 100%;
  }
  .host .dsh-filters select {
    width: 100%;
    min-width: 0;
  }
}

.invitation-review-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  font: inherit;
  line-height: 1.5;
  padding: 1rem;
  border: 1px solid var(--farbe-linie, #d0b068);
  border-radius: 0.5rem;
}
