/* shadcn-ähnliche Tokens + Komponenten (Tailwind ergänzend) */

.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 7px 16px; border-radius: 8px;
  color: #52525b; font-weight: 500; text-align: left;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: #f4f4f5; color: #18181b; }
.nav-item.active { background: #f0f0f3; color: #18181b; border-radius: 0; }

/* Logo */
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: #18181b; color: #fafafa;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Courier New', monospace; font-size: 13px; font-weight: 700;
  letter-spacing: -0.5px;
}
.logo-text { font-family: Georgia, 'Times New Roman', serif; }
.logo-text .t1 { display: block; font-size: 13px; font-weight: 700; color: #18181b; line-height: 1.15; letter-spacing: -0.2px; }

.btn-primary {
  height: 32px; padding: 0 14px; border-radius: 8px;
  background: #18181b; color: #fafafa; font-size: 13px; font-weight: 500;
  transition: background .12s;
}
.btn-primary:hover { background: #3f3f46; }

.btn-outline {
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid #e4e4e7; background: #fff; color: #18181b;
  font-size: 13px; font-weight: 500; box-shadow: 0 1px 2px rgb(0 0 0 / .04);
  transition: background .12s;
}
.btn-outline:hover { background: #f4f4f5; }

.panel-pre {
  background: #fff; border: 1px solid #e4e4e7; border-radius: 10px;
  padding: 10px 12px; font-size: 11px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; overflow: auto;
  color: #3f3f46; max-height: 300px;
}

/* Chat-Bubbles */
.msg { margin: 6px 0; max-width: 75%; padding: 8px 14px; border-radius: 16px;
       font-size: 14px; line-height: 1.45; white-space: pre-wrap; width: fit-content; }
.msg.in  { background: #f4f4f5; color: #18181b; border-bottom-left-radius: 4px; }
.msg.out { background: #18181b; color: #fafafa; margin-left: auto; border-bottom-right-radius: 4px; }
.msg.sys { background: transparent; color: #a1a1aa; font-size: 12px; max-width: 100%;
           padding: 2px 14px; font-style: italic; }

/* Szenario-Karten */
.sc { border: 1px solid #e4e4e7; border-radius: 12px; background: #fff; padding: 12px 14px;
      box-shadow: 0 1px 2px rgb(0 0 0 / .03); }
.sc.pass { border-left: 4px solid #22c55e; }
.sc.fail { border-left: 4px solid #ef4444; }
.sc .turn { font-size: 12px; color: #71717a; margin-top: 4px; font-family: ui-monospace, monospace; }
.sc .turn.ok::before { content: '✓ '; color: #22c55e; }
.sc .turn.bad::before { content: '✗ '; color: #ef4444; }

/* Settings-Formular */
#settingsForm input, #settingsForm select {
  height: 32px; width: 100%; border-radius: 8px; border: 1px solid #e4e4e7;
  background: #fff; padding: 0 10px; font-size: 13px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .03);
}
#settingsForm input:focus, #settingsForm select:focus { outline: none; box-shadow: 0 0 0 2px rgb(24 24 27 / .08); }
#settingsForm label { font-size: 12px; color: #71717a; font-family: ui-monospace, monospace; }

.field-ta {
  width: 100%; border-radius: 8px; border: 1px solid #e4e4e7;
  background: #fff; padding: 8px 10px; font-size: 13px; line-height: 1.5;
  box-shadow: 0 1px 2px rgb(0 0 0 / .03); resize: vertical;
}
.field-ta:focus { outline: none; box-shadow: 0 0 0 2px rgb(24 24 27 / .08); }

/* Prompt-Editor */
.sec-text {
  width: 100%; border: 0; border-top: 1px solid #f4f4f5;
  padding: 10px 14px; font-family: ui-monospace, monospace; font-size: 12px;
  line-height: 1.55; color: #3f3f46; resize: vertical; border-radius: 0 0 12px 12px;
  background: #fdfdfd;
}
.sec-text:focus { outline: none; box-shadow: inset 0 0 0 2px rgb(24 24 27 / .07); }

.badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.badge-gen { background: #f4f4f5; color: #71717a; }
.badge-ovr { background: #dbeafe; color: #1d4ed8; }

/* Dynamische Listen (Settings) */
.dyn-list { display: flex; flex-direction: column; gap: 4px; }
.dyn-row { display: flex; gap: 6px; align-items: center; }
.dyn-row input { flex: 1; }
.dyn-key { flex: 0 1 40% !important; }
.dyn-arrow { color: #a1a1aa; font-size: 12px; }
.dyn-del {
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid #e4e4e7;
  background: #fff; color: #a1a1aa; font-size: 14px; line-height: 1; cursor: pointer;
}
.dyn-del:hover { color: #ef4444; border-color: #fecaca; }
.dyn-add {
  align-self: flex-start; font-size: 11px; font-weight: 500; color: #52525b;
  padding: 3px 10px; border-radius: 6px; border: 1px dashed #d4d4d8; background: #fff;
  cursor: pointer;
}
.dyn-add:hover { border-color: #a1a1aa; color: #18181b; }

/* Preis-Editor */
.price-item input, .cat-label {
  height: 32px; border-radius: 8px; border: 1px solid #e4e4e7;
  background: #fff; padding: 0 10px; font-size: 13px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .03);
}
.price-item input:focus, .cat-label:focus { outline: none; box-shadow: 0 0 0 2px rgb(24 24 27 / .08); }
.pi-label { flex: 1.4; }
.pi-note  { flex: 1; color: #71717a; }
.pi-price { flex: 0 0 7rem; text-align: right; }

/* Tipp-Indikator */
.msg.typing { padding: 10px 16px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #a1a1aa;
         animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

/* Kalender */
.cal-grid { display: grid; grid-template-columns: 52px repeat(7, 1fr); min-width: 700px;
            border: 1px solid #e4e4e7; border-radius: 12px; overflow: hidden; background: #fff; }
.cal-corner { border-bottom: 1px solid #e4e4e7; }
.cal-dayhead { padding: 8px; text-align: center; font-size: 12px; color: #71717a;
               border-bottom: 1px solid #e4e4e7; border-left: 1px solid #f4f4f5; }
.cal-dayhead b { color: #18181b; font-size: 14px; }
.cal-dayhead.today { background: #eff6ff; }
.cal-times { border-right: 1px solid #e4e4e7; }
.cal-hour { height: 42px; padding: 2px 6px 0 0; text-align: right; font-size: 10px; color: #a1a1aa; }
.cal-daycol { position: relative; border-left: 1px solid #f4f4f5; }
.cal-daycol.today { background: #fafcff; }
.cal-slot { height: 42px; border-bottom: 1px solid #f8f8f9; }
.cal-appts { position: absolute; inset: 0; pointer-events: none; }
.cal-appt { position: absolute; left: 3px; right: 3px; border-radius: 6px;
            background: #18181b; color: #fafafa; font-size: 11px; padding: 3px 7px;
            overflow: hidden; cursor: pointer; pointer-events: auto; line-height: 1.35;
            box-shadow: 0 1px 3px rgb(0 0 0 / .2); }
.cal-appt:hover { background: #3f3f46; }
.cal-appt.cancelled { background: #e4e4e7; color: #a1a1aa; text-decoration: line-through;
                      box-shadow: none; }

/* Scrollbar: dünn, rund, dezent (shadcn-Look) */
* { scrollbar-width: thin; scrollbar-color: #d4d4d8 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #d4d4d8; border-radius: 999px;
  border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #a1a1aa; background-clip: padding-box; border: 3px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; }

/* Szenario-Detail (aufklappbarer Konversationsverlauf) */
.sc-head { cursor: pointer; }
.sc-head:hover { color: #000; }
.sc-caret { color: #a1a1aa; font-size: 11px; display: inline-block; width: 12px; }
.sc-detail { display: none; margin-top: 10px; }
.sc.open .sc-detail { display: block; }
.sc-conv { margin: 6px 0 10px; }
.sc-conv .msg { max-width: 85%; }
.sc-conv .msg.dim { opacity: .45; font-style: italic; }
.sc-tools { font-size: 11px; color: #a1a1aa; font-family: ui-monospace, monospace; padding: 2px 14px; }
.sc-problems { font-size: 11px; color: #ef4444; padding: 2px 14px; }

/* Skeleton-Loading (Shimmer) */
.skeleton {
  position: relative; overflow: hidden;
  background: #ececf0; border-radius: 8px;
}
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.sk-msg { height: 34px; margin: 8px 0; border-radius: 16px; }
.sk-card { height: 54px; border-radius: 12px; }
.sk-row { height: 32px; }
.sk-block { height: 100%; min-height: 200px; border-radius: 12px; }

/* Chat-Verlauf: Scrollbar erst bei Hover sichtbar */
#chatlog { scrollbar-color: transparent transparent; }
#chatlog:hover { scrollbar-color: #d4d4d8 transparent; }
#chatlog::-webkit-scrollbar-thumb { background: transparent; }
#chatlog:hover::-webkit-scrollbar-thumb { background: #d4d4d8; border: 3px solid transparent; background-clip: padding-box; }
