/* ═══════════════════════════════════════════════════
   TOKENS & RESET  (identisch mit work.css / blog_style.css)
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;600;700&family=Syne:wght@400;600;800&display=swap');

:root {
  --bg:      #0b0f17;
  --surface: #111827;
  --card:    #161d2e;
  --border:  #1e2d47;
  --accent:  #00d4ff;
  --accent2: #7c3aed;
  --accent3: #10b981;
  --warn:    #f59e0b;
  --text:    #e2e8f0;
  --muted:   #64748b;
  --grid:    rgba(0, 212, 255, 0.035);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 18px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

/* Grid line texture */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── CURSOR ── */
#cursor {
  position: fixed; z-index: 9999;
  width: 10px; height: 10px;
  background: var(--accent); border-radius: 50%;
  pointer-events: none; transform: translate(-50%,-50%);
  box-shadow: 0 0 14px var(--accent);
  transition: width .15s, height .15s, background .15s;
}
#cursor-ring {
  position: fixed; z-index: 9998;
  width: 36px; height: 36px;
  border: 1px solid rgba(0,212,255,.35); border-radius: 50%;
  pointer-events: none; transform: translate(-50%,-50%);
  transition: width .2s, height .2s, border-color .2s;
}
body.cursor-hover #cursor { width: 6px; height: 6px; background: #fff; }
body.cursor-hover #cursor-ring { width: 52px; height: 52px; border-color: rgba(0,212,255,.6); }

/* ── ANIMATIONS ── */
@keyframes blink    { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes fadeUp   { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
@keyframes spin     { to{transform:rotate(360deg)} }
@keyframes msgIn    { from{opacity:0;transform:translateY(10px) scale(.98)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes typing   { 0%,80%,100%{transform:scale(0);opacity:.4} 40%{transform:scale(1);opacity:1} }
@keyframes pulse    { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ═══════════════════════════════════════════════════
   TOP BAR  (1:1 wie work.css)
═══════════════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem; height: 64px;
  background: rgba(11, 15, 23, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-left { display: flex; align-items: center; gap: 1.2rem; }

.logo-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: blink 2s infinite;
}

.logo-text {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 1rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}

.topbar-meta { font-size: .8rem; color: var(--muted); letter-spacing: .05em; }

.topbar-right { display: flex; align-items: center; gap: 1.4rem; }

.status-pill {
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem; color: var(--accent3);
  background: rgba(16, 185, 129, .08);
  border: 1px solid rgba(16, 185, 129, .25);
  padding: .3rem .9rem; border-radius: 999px;
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent3); animation: blink 1.5s infinite;
}

.topbar-nav { display: flex; gap: .35rem; }

.topbar-nav a {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--muted);
  text-decoration: none; padding: .45rem 1rem;
  border-radius: 6px; border: 1px solid transparent;
  transition: all .18s; letter-spacing: .06em; cursor: none;
}

.topbar-nav a:hover,
.topbar-nav a.active {
  color: var(--accent);
  border-color: rgba(0, 212, 255, .2);
  background: rgba(0, 212, 255, .05);
}

.topbar-nav ion-icon { font-size: 1.1rem; }

/* ═══════════════════════════════════════════════════
   PAGE WRAPPER
═══════════════════════════════════════════════════ */
.page {
  position: relative; z-index: 1;
  padding-top: 64px;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
/* ═══════════════════════════════════════════════════
   NAV DROPDOWN
═══════════════════════════════════════════════════ */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--muted);
  text-decoration: none; padding: .45rem 1rem;
  border-radius: 6px; border: 1px solid transparent;
  transition: all .18s; letter-spacing: .06em; cursor: none;
}

.nav-dropdown-trigger:hover,
.nav-dropdown:hover .nav-dropdown-trigger {
  color: var(--accent);
  border-color: rgba(0,212,255,.2);
  background: rgba(0,212,255,.05);
}

.dropdown-arrow {
  font-size: .75rem;
  transition: transform .2s;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* invisible bridge fills the gap so mouse doesn't lose hover */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%; left: -20px; right: -20px;
  height: 16px;
}

/* The dropdown menu — sits flush, no gap */
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 14px); left: 50%;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .4rem;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity .18s, transform .18s;
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(0,212,255,.08);
}

/* Arrow pointer at top */
.nav-dropdown-menu::before {
  content: '';
  position: absolute; top: -6px; left: 50%;
  width: 10px; height: 10px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: flex; align-items: center; gap: .9rem;
  padding: .75rem .9rem;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text);
  transition: all .15s; cursor: none;
  border: 1px solid transparent;
}

.nav-dropdown-item:hover {
  background: rgba(0,212,255,.05);
  border-color: rgba(0,212,255,.15);
}

.dropdown-item-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.dropdown-item-title {
  font-size: .78rem; color: var(--text); font-weight: 600;
  font-family: 'Syne', sans-serif;
  margin-bottom: .15rem;
}

.dropdown-item-sub {
  font-size: .62rem; color: var(--muted); letter-spacing: .04em;
}

.nav-dropdown-item:hover .dropdown-item-title { color: var(--accent); }

/* ═══════════════════════════════════════════════════
   PAGE WRAPPER
═══════════════════════════════════════════════════ */
.page {
  position: relative; z-index: 1;
  padding-top: 64px;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ── DASH HEADER ── */
.dash-header {
  padding: 1.8rem 3rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  animation: fadeUp .4s ease both;
  flex-shrink: 0;
}
.dash-header-left {}
.dash-eyebrow {
  font-size: .65rem; color: var(--accent); letter-spacing: .2em;
  text-transform: uppercase; margin-bottom: .3rem;
  display: flex; align-items: center; gap: .6rem;
}
.dash-eyebrow::before { content: '//'; color: var(--muted); }
.dash-title {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 1.7rem; color: var(--text);
}
.dash-title span { color: var(--accent); }
.dash-sub { font-size: .72rem; color: var(--muted); margin-top: .25rem; }

/* ── DOC STATUS PILL ── */
.doc-status {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem 1.1rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; font-size: .72rem;
}
.doc-status.loaded { border-color: rgba(16,185,129,.3); }
.doc-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
}
.doc-status.loaded .doc-status-dot { background: var(--accent3); box-shadow: 0 0 6px var(--accent3); animation: blink 2s infinite; }
.doc-status-name { color: var(--text); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-status-info { color: var(--muted); font-size: .65rem; }

/* ═══════════════════════════════════════════════════
   MAIN LAYOUT  (settings sidebar + chat)
═══════════════════════════════════════════════════ */
.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  flex: 1;
  overflow: hidden;
}

/* ── SETTINGS PANEL ── */
.settings-panel {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.settings-panel::-webkit-scrollbar { width: 4px; }
.settings-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.settings-section {
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--border);
}

.settings-label {
  font-size: .6rem; color: var(--accent); letter-spacing: .18em;
  text-transform: uppercase; font-weight: 600; margin-bottom: .9rem;
  display: flex; align-items: center; gap: .5rem;
}
.settings-label ion-icon { font-size: .85rem; }

/* Input */
.inp {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: 7px;
  padding: .55rem .85rem; font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; outline: none; cursor: text;
  transition: border-color .18s;
}
.inp:focus { border-color: var(--accent); }
.inp-label { font-size: .62rem; color: var(--muted); margin-bottom: .35rem; display: block; }

/* Select */
.sel {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: 7px;
  padding: .55rem .85rem; font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; outline: none; cursor: none;
  transition: border-color .18s; appearance: none;
}
.sel:focus { border-color: var(--accent); }
.sel option { background: var(--card); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem; font-weight: 600; letter-spacing: .07em;
  padding: .58rem 1.2rem; border-radius: 7px;
  border: 1px solid; cursor: none; transition: all .18s; width: 100%;
}
.btn-primary {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
  box-shadow: 0 0 16px rgba(0,212,255,.25);
}
.btn-primary:hover { background: #33ddff; transform: translateY(-1px); box-shadow: 0 0 24px rgba(0,212,255,.45); }
.btn-ghost  { background: transparent; color: var(--accent); border-color: rgba(0,212,255,.3); }
.btn-ghost:hover  { background: rgba(0,212,255,.07); transform: translateY(-1px); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: rgba(244,63,94,.3); }
.btn-danger-ghost:hover { background: rgba(244,63,94,.07); }
.btn.loading { opacity: .65; pointer-events: none; }
.btn + .btn { margin-top: .6rem; }

.spinner { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.2); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }

/* Upload drop zone */
.drop-zone {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 1.8rem 1rem; text-align: center;
  transition: border-color .2s, background .2s; cursor: none;
  font-size: .72rem; color: var(--muted); margin-bottom: .8rem;
}
.drop-zone.drag-over { border-color: var(--accent); background: rgba(0,212,255,.04); }
.drop-zone ion-icon  { font-size: 1.8rem; display: block; margin: 0 auto .5rem; opacity: .5; }

/* Range slider */
.range-wrap { margin-bottom: .9rem; }
.range-label { display: flex; justify-content: space-between; font-size: .62rem; color: var(--muted); margin-bottom: .35rem; }
.range-val   { color: var(--accent); }
input[type="range"] {
  width: 100%; height: 4px; appearance: none;
  background: var(--border); border-radius: 2px; outline: none; cursor: none;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px rgba(0,212,255,.5); cursor: none;
}

/* Example PDF pills */
.example-pill {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .9rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card);
  cursor: none; transition: all .18s; margin-bottom: .55rem;
  font-size: .72rem; color: var(--muted);
}
.example-pill:hover { border-color: rgba(0,212,255,.3); color: var(--text); background: rgba(0,212,255,.04); }
.example-pill ion-icon { font-size: 1.1rem; color: var(--accent); flex-shrink: 0; }
.example-pill-title { font-size: .72rem; color: var(--text); font-weight: 600; }
.example-pill-sub   { font-size: .6rem; color: var(--muted); }

/* Doc info card */
.doc-info-card {
  background: rgba(16,185,129,.05); border: 1px solid rgba(16,185,129,.2);
  border-radius: 8px; padding: .9rem 1rem;
  font-size: .72rem; display: none;
}
.doc-info-card.visible { display: block; animation: fadeUp .3s ease both; }
.doc-info-row { display: flex; justify-content: space-between; padding: .25rem 0; }
.doc-info-key { color: var(--muted); }
.doc-info-val { color: var(--accent3); font-weight: 600; }

/* Info/error boxes */
.info-box  { padding: .8rem 1rem; border-radius: 7px; font-size: .72rem; color: var(--muted); line-height: 1.7; background: rgba(0,212,255,.04); border: 1px solid rgba(0,212,255,.15); margin-top: .7rem; }
.error-box { padding: .8rem 1rem; border-radius: 7px; font-size: .72rem; color: var(--danger); line-height: 1.7; background: rgba(244,63,94,.05); border: 1px solid rgba(244,63,94,.2); margin-top: .7rem; }

/* ── CHAT AREA ── */
.chat-area {
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* Messages container */
.messages {
  flex: 1; overflow-y: auto;
  padding: 1.8rem 2rem;
  display: flex; flex-direction: column; gap: 1.2rem;
}
.messages::-webkit-scrollbar { width: 4px; }
.messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Welcome screen */
.welcome {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; text-align: center; padding: 3rem;
  animation: fadeUp .4s ease both;
}
.welcome-icon { font-size: 3.5rem; margin-bottom: 1.2rem; opacity: .7; }
.welcome-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.5rem; margin-bottom: .6rem; }
.welcome-sub   { font-size: .78rem; color: var(--muted); line-height: 1.8; max-width: 420px; }

/* Suggestion chips */
.suggestions {
  display: flex; flex-wrap: wrap; gap: .55rem;
  justify-content: center; margin-top: 1.4rem;
}
.suggestion-chip {
  font-size: .7rem; padding: .45rem 1rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); background: var(--card);
  cursor: none; transition: all .18s;
}
.suggestion-chip:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,212,255,.06); }

/* Message bubbles */
.msg { display: flex; gap: .9rem; animation: msgIn .3s ease both; }
.msg.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; font-family: 'Syne', sans-serif;
}
.msg.assistant .msg-avatar {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: var(--bg); font-size: .7rem;
}
.msg.user .msg-avatar {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--accent); font-size: .8rem;
}

.msg-content { max-width: 72%; }

.msg-bubble {
  padding: .95rem 1.2rem; border-radius: 12px;
  font-size: .8rem; line-height: 1.85;
}
.msg.assistant .msg-bubble {
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-top-left-radius: 4px;
}
.msg.user .msg-bubble {
  background: rgba(0,212,255,.1); border: 1px solid rgba(0,212,255,.2);
  color: var(--text); border-top-right-radius: 4px;
}

.msg-meta {
  font-size: .6rem; color: var(--muted); margin-top: .35rem;
  display: flex; align-items: center; gap: .5rem;
}
.msg.user .msg-meta { justify-content: flex-end; }

.msg-model-badge {
  font-size: .58rem; padding: .1rem .45rem; border-radius: 3px;
  background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.2);
  color: #a78bfa;
}

/* Sources */
.msg-sources {
  margin-top: .6rem; font-size: .65rem; color: var(--muted);
  padding: .5rem .75rem; border-radius: 6px;
  background: rgba(0,212,255,.04); border: 1px solid rgba(0,212,255,.1);
}
.msg-sources strong { color: var(--accent); }

/* Typing indicator */
.typing-indicator {
  display: flex; gap: .35rem; align-items: center;
  padding: .85rem 1.1rem; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
  width: fit-content;
}
.typing-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted);
  animation: typing 1.2s ease infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }

/* ── INPUT BAR ── */
.input-bar {
  padding: 1rem 2rem 1.3rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.input-wrap {
  display: flex; gap: .7rem; align-items: flex-end;
}
.chat-input {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: .75rem 1.1rem; font-family: 'JetBrains Mono', monospace;
  font-size: .82rem; outline: none; cursor: text;
  resize: none; max-height: 140px; min-height: 44px;
  transition: border-color .18s; line-height: 1.5;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--muted); }

.send-btn {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent); border: none; cursor: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg); font-size: 1.1rem; flex-shrink: 0;
  transition: all .18s;
  box-shadow: 0 0 14px rgba(0,212,255,.25);
}
.send-btn:hover { background: #33ddff; transform: translateY(-1px); box-shadow: 0 0 22px rgba(0,212,255,.45); }
.send-btn:disabled { opacity: .4; pointer-events: none; }

.input-hint { font-size: .6rem; color: var(--muted); margin-top: .5rem; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  
  
  
  


/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .section-wrap { padding-left: 2.5rem; padding-right: 2.5rem; }
  .hero { padding-left: 2.5rem; padding-right: 2.5rem; gap: 2.5rem; }
}

@media (max-width: 900px) {
  .topbar { padding: 0 1.2rem; }
  .topbar-meta { display: none; }
  .chat-layout { grid-template-columns: 1fr; }
  .input-bar { padding: .8rem 1.2rem 1rem; }
  .messages  { padding: 1.2rem; }
  .settings-panel { border-right: none; border-bottom: 1px solid var(--border); max-height: 50vh; }
  .hero { grid-template-columns: 1fr; padding: 4rem 1.5rem 2rem; min-height: unset; }
  .hero-right { display: none; }
  .section-wrap { padding-left: 1.5rem; padding-right: 1.5rem; }
  .footer { padding: 1.1rem 1.5rem; }
  .tile-featured { grid-column: span 1; }
  .tile-featured .tile-inner { grid-template-columns: 1fr; }
  .dash-header { padding: 1.2rem; }
}

@media (max-width: 600px) {
  html { font-size: 16px; }
  .topbar { padding: 0 1rem; height: 56px; }
  .page { padding-top: 56px; }
  .topbar-nav a span { display: none; }
  .hero-name { font-size: 2.8rem; }
}