/* OrganiseOne Web-Konsole — Arbeitsoberfläche für Betriebe.
   Ergänzt site.css (Farben/Tokens kommen von dort). Bewusst dichter und
   nüchterner als die Marketingseiten: hier wird gearbeitet, nicht geworben. */

body.konsole { font-size: 16px; }

/* ---------- Anmeldung ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: 32px;
  box-shadow: var(--shadow);
}
.auth-card .brand { justify-content: center; margin-bottom: 22px; }
.auth-card h1 { font-size: 24px; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--tx2); font-size: 15px; margin-bottom: 24px; }

/* ---------- Formularelemente ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: var(--tx2); margin-bottom: 6px; font-weight: 600; }
.field .hint { font-size: 13px; color: var(--tx3); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=url], select, textarea {
  width: 100%; background: var(--card2); border: 1px solid var(--line);
  color: var(--tx); border-radius: 10px; padding: 11px 13px; font-size: 16px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ind); box-shadow: 0 0 0 3px var(--ind-soft);
}
textarea { min-height: 90px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { display: block; width: 100%; }
.linkbtn {
  background: none; border: 0; color: var(--ind2); font: inherit; font-size: 15px;
  cursor: pointer; padding: 0; text-decoration: none;
}
.linkbtn:hover { text-decoration: underline; }

/* ---------- Meldungen ---------- */
.msg { border-radius: 10px; padding: 12px 15px; font-size: 15px; margin-bottom: 16px; }
.msg.err { background: rgba(255, 107, 107, .13); border: 1px solid rgba(255, 107, 107, .35); color: #FFB3B3; }
.msg.ok { background: var(--grn-soft); border: 1px solid rgba(52, 199, 123, .35); color: var(--grn); }
.msg.info { background: var(--ind-soft); border: 1px solid rgba(91, 110, 245, .3); color: var(--tx); }

/* ---------- Rahmen der Konsole ---------- */
.k-head {
  position: sticky; top: 0; z-index: 40; background: rgba(15, 17, 20, .92);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.k-head-in { display: flex; align-items: center; gap: 14px; padding: 11px 20px; }
.k-head .brand span { font-size: 17px; }
.k-head .spacer { margin-left: auto; }
.k-biz {
  background: var(--card); border: 1px solid var(--line); color: var(--tx);
  border-radius: 10px; padding: 8px 12px; font-size: 15px; max-width: 260px;
}
.k-user { color: var(--tx2); font-size: 14.5px; }
@media (max-width: 720px) { .k-user { display: none; } }

/* minmax(0, 1fr) statt 1fr: sonst wächst die Spalte auf die Breite ihres
   breitesten Inhalts (lange Code-Zeilen) und die ganze Seite läuft seitlich über. */
.k-body { display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .k-body { grid-template-columns: minmax(0, 1fr); } }

.k-nav {
  position: sticky; top: 57px; padding: 20px 12px; border-right: 1px solid var(--line);
  height: calc(100vh - 57px); overflow: auto;
}
.k-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--tx2); font-size: 15.5px; font-weight: 550; margin-bottom: 2px;
}
.k-nav a:hover { background: var(--card); color: var(--tx); text-decoration: none; }
.k-nav a.on { background: var(--ind-soft); color: var(--ind2); }
.k-nav .gruppe { font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--tx3); font-weight: 700; margin: 20px 0 8px; padding-left: 12px; }
@media (max-width: 900px) {
  .k-nav {
    position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line);
    display: flex; gap: 6px; overflow-x: auto; padding: 12px;
  }
  .k-nav a { white-space: nowrap; margin: 0; }
  .k-nav .gruppe { display: none; }
}

.k-main { padding: 28px 28px 80px; max-width: 1000px; }
@media (max-width: 620px) { .k-main { padding: 20px 16px 60px; } }
.k-main h1 { font-size: 27px; margin-bottom: 4px; }
.k-main .unter { color: var(--tx2); margin-bottom: 26px; }
.k-sec { margin-bottom: 36px; }
.k-sec h2 { font-size: 19px; margin-bottom: 14px; }

/* ---------- Kacheln ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.kpi b { display: block; font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.kpi span { color: var(--tx2); font-size: 14px; }

/* Verhältnisbalken in der Auswertung – zeigt auf einen Blick, was den Umsatz
   trägt, ohne dass man Zahlen vergleichen muss. */
.balken {
  display: block; height: 4px; margin-top: 6px; max-width: 320px;
  background: var(--line); border-radius: 2px; overflow: hidden;
}
.balken i { display: block; height: 100%; background: var(--ind); }

/* ---------- Listen ---------- */
.liste { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.zeile {
  display: flex; gap: 16px; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.zeile:last-child { border-bottom: 0; }
.zeile:hover { background: var(--card2); }
.zeile .zeit { min-width: 116px; font-variant-numeric: tabular-nums; font-weight: 650; }
.zeile .zeit small { display: block; color: var(--tx3); font-weight: 400; font-size: 13px; }
.zeile .mitte { flex: 1; min-width: 0; }
.zeile .mitte b { display: block; font-weight: 600; }
.zeile .mitte span { color: var(--tx2); font-size: 14px; }
.zeile .rechts { text-align: right; white-space: nowrap; }
.leer { padding: 34px 18px; text-align: center; color: var(--tx3); }

.status {
  display: inline-block; padding: 3px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 650;
}
.status.confirmed { background: var(--grn-soft); color: var(--grn); }
.status.pending { background: rgba(230, 180, 80, .15); color: var(--yel); }
.status.cancelled { background: rgba(255, 107, 107, .13); color: var(--red); }
.status.noshow { background: rgba(255, 107, 107, .13); color: var(--red); }
.status.done { background: var(--card2); color: var(--tx2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  background: var(--card); border: 1px solid var(--line); color: var(--tx2);
  border-radius: 999px; padding: 7px 14px; font-size: 14.5px; cursor: pointer;
}
.chip.on { background: var(--ind); border-color: var(--ind); color: #fff; font-weight: 600; }

/* ---------- Dialog ---------- */
.dlg-bg {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.dlg {
  background: var(--card); border: 1px solid var(--line2); border-radius: 16px;
  padding: 26px; width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  box-shadow: var(--shadow);
}
.dlg h3 { margin-bottom: 4px; }
.dlg .dlg-sub { color: var(--tx2); font-size: 14.5px; margin-bottom: 20px; }
/* Zwischenüberschrift im Dialog (Teilnehmer, Warteliste): eine Stufe leiser
   als h3, sonst konkurriert sie mit dem Dialogtitel. */
.dlg h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--tx3); }
.dlg .dlg-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* QR-Code immer auf weißem Grund – auf dunklem Untergrund erkennt ihn keine
   Kamera. Der Kasten ist deshalb bewusst hell, mitten in der dunklen Konsole. */
.qr-kasten {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 12px; padding: 10px; min-width: 120px;
  min-height: 120px; color: #333;
}
.qr-kasten canvas { display: block; }

.dl { display: grid; grid-template-columns: 148px 1fr; gap: 8px 16px; font-size: 15px; }
@media (max-width: 520px) { .dl { grid-template-columns: 1fr; gap: 2px 0; } }
.dl dt { color: var(--tx3); }
.dl dd { margin: 0; }

/* Fließtext-Vorlagen umbrechen statt seitlich scrollen – Code-Schnipsel
   behalten den Zeilenumbruch des Originals (dort ist er bedeutungstragend). */
.code.text pre { white-space: pre-wrap; word-break: break-word; }

/* ---------- Belegungsplan ---------- */
.plan-leiste { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.plan { display: flex; gap: 0; overflow-x: auto; padding-bottom: 6px; }
.plan-zeit { flex: 0 0 56px; position: sticky; left: 0; z-index: 2; background: var(--bg); }
.plan-zeit .saeule { position: relative; }
.stunde { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.stunde span {
  position: absolute; top: -9px; left: 0; font-size: 12px; color: var(--tx3);
  background: var(--bg); padding-right: 6px; font-variant-numeric: tabular-nums;
}
.plan-spalten { display: flex; flex: 1; min-width: 0; }
.plan-spalte { flex: 1 1 0; min-width: 132px; border-left: 1px solid var(--line); }
.plan-spalte.heute { background: rgba(91, 110, 245, .05); }
.plan-spalte .kopf {
  height: 52px; padding: 6px 10px; border-bottom: 1px solid var(--line);
  position: sticky; top: 57px; background: var(--bg); z-index: 1;
}
.plan-spalte .kopf b { display: block; font-size: 14.5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.plan-spalte .kopf span { font-size: 12.5px; color: var(--tx3); }
.plan-spalte .saeule { position: relative; }

/* Arbeitszeit hebt sich vom Rest ab – der dunkle Grund ist „zu". */
.arbeitszeit { position: absolute; left: 0; right: 0; background: var(--card); }
.linie { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.sperre {
  position: absolute; left: 0; right: 0; background: repeating-linear-gradient(
    45deg, rgba(255,107,107,.10), rgba(255,107,107,.10) 6px,
    transparent 6px, transparent 12px);
  border-top: 1px solid rgba(255,107,107,.3); border-bottom: 1px solid rgba(255,107,107,.3);
}
.sperre span { font-size: 11.5px; color: var(--red); padding: 2px 6px; display: block; }

.termin {
  position: absolute; left: 3px; right: 3px; overflow: hidden; cursor: pointer;
  background: var(--ind); border-radius: 7px; padding: 4px 7px; color: #fff;
  font-size: 12.5px; line-height: 1.3; border: 1px solid rgba(255,255,255,.14);
}
.termin:hover { filter: brightness(1.12); }
.termin b { display: block; font-weight: 650; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.termin span { display: block; opacity: .85; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.termin em { font-style: normal; font-size: 11px; opacity: .9; }
.termin.pending { background: rgba(230,180,80,.22); border-color: var(--yel); color: var(--yel); }
.termin.no_show { background: rgba(255,107,107,.2); border-color: var(--red); color: #FFC9C9; }
.termin.done { background: var(--card2); border-color: var(--line2); color: var(--tx2); }

.jetzt { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 3; }
.jetzt::before {
  content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--red);
}

/* ---------- Chat ---------- */
.verlauf {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; max-height: 52vh; overflow-y: auto; margin-bottom: 14px;
}
.blase {
  max-width: 74%; background: var(--card2); border-radius: 14px;
  padding: 10px 14px; margin-bottom: 10px; font-size: 15.5px;
}
.blase.meins { margin-left: auto; background: var(--ind-soft); border: 1px solid rgba(91,110,245,.3); }
/* Nur eigene Nachrichten sind anklickbar (ändern/löschen). */
.blase[data-m] { cursor: pointer; }
.blase[data-m]:hover { border-color: var(--ind); }
.blase .wer { display: block; font-size: 12.5px; color: var(--ind2); font-weight: 650; margin-bottom: 2px; }
.blase .inhalt { display: block; white-space: pre-wrap; word-break: break-word; }
.blase .wann { display: block; text-align: right; font-size: 11.5px; color: var(--tx3); margin-top: 4px; }
/* Bild/Video in der Blase: die Blase gibt die Breite vor, nicht die Datei. */
.blase.mit-medium { padding: 6px 6px 4px; }
.blase .medium { display: block; max-width: 100%; width: 260px; border-radius: 10px; }
.blase img.medium { object-fit: cover; cursor: zoom-in; }
.blase .tiny { display: block; color: var(--tx3); }
.system {
  text-align: center; color: var(--tx3); font-size: 13.5px;
  margin: 12px auto; max-width: 88%;
}
.system span { opacity: .7; }
.senden { display: flex; gap: 10px; }
.senden input { flex: 1; }

/* ---------- Laden ---------- */
.laden { padding: 40px; text-align: center; color: var(--tx3); }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 12px; border-radius: 50%;
  border: 3px solid var(--line2); border-top-color: var(--ind); animation: dreh .8s linear infinite;
}
@keyframes dreh { to { transform: rotate(360deg); } }
.plan-spalte .kopf b .datum { font-weight: 400; color: var(--tx3); font-size: 13px; }
