/* =========================================================
   LV-Assistent – Reinweiß · Professionell · Hochmodern
   CSS-Version 0.8.4  (reinweiß + Bild-Upload)
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --white: #ffffff;
  --bg: #fbfbfc;
  --panel: #ffffff;
  --ink: #16181d;
  --ink-2: #3d4149;
  --muted: #8b9099;
  --line: #ededf0;
  --line-2: #e3e3e7;
  --accent: #1a1d23;        /* fast schwarz – edler, neutraler Akzent */
  --accent-soft: #f4f4f6;
  --green: #1f9d57;         /* nur für „eigener Preis" / Erfolg */
  --green-soft: #eef7f1;
  --amber: #b07d2b;         /* nur für Richtwerte */
  --amber-soft: #f8f2e6;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-xs: 0 1px 2px rgba(20,24,31,.04);
  --shadow-sm: 0 2px 8px rgba(20,24,31,.05);
  --shadow: 0 6px 24px rgba(20,24,31,.07);
  --shadow-lg: 0 20px 60px rgba(20,24,31,.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

body.lva-standalone {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh;
}

.lva-app, .lva-landing { position: relative; box-sizing: border-box; }
.lva-app *, .lva-landing *, .lva-modal * { box-sizing: border-box; }

/* ===================== APP-Layout ===================== */
.lva-app {
  display: grid;
  grid-template-columns: 268px 1fr 384px;
  height: 100vh; height: 100dvh; width: 100%;
  background: var(--bg);
}

.lva-sidebar { background: var(--white); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; animation: lvaIn .5s var(--ease) both; }
.lva-main { display: flex; flex-direction: column; min-height: 0; background: var(--bg); animation: lvaIn .5s var(--ease) .05s both; }
.lva-lv { background: var(--white); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; animation: lvaIn .5s var(--ease) .1s both; }
@keyframes lvaIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- Sidebar ---- */
.lva-side-head { display: flex; align-items: center; gap: 12px; padding: 24px 22px 18px; }
.lva-logo {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; letter-spacing: -.02em;
}
.lva-side-head strong { font-weight: 600; font-size: 15.5px; display: block; letter-spacing: -.01em; }
.lva-side-head small { color: var(--muted); font-size: 12.5px; }

.lva-new-btn {
  margin: 4px 18px 16px; padding: 12px 16px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-weight: 600; font-size: 14px; font-family: var(--font); background: var(--accent); color: #fff;
  display: flex; align-items: center; gap: 9px; transition: transform .2s var(--ease), opacity .2s;
}
.lva-new-btn:hover { transform: translateY(-1px); opacity: .9; }
.lva-new-btn:active { transform: translateY(0); }

.lva-conv-list { flex: 1; overflow-y: auto; padding: 0 12px; }
.lva-conv-list .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 6px; font-weight: 600; }
.lva-conv {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 2px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--ink-2);
  transition: background .15s var(--ease);
}
.lva-conv:hover { background: var(--accent-soft); }
.lva-conv.lva-conv-active { background: var(--accent-soft); color: var(--ink); font-weight: 500; }
.lva-conv .lva-conv-title { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.lva-conv-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 17px; line-height: 1; opacity: 0; transition: opacity .15s, color .15s; }
.lva-conv:hover .lva-conv-del { opacity: 1; }
.lva-conv-del:hover { color: #d0463b; }

.lva-pricing-btn, .lva-logout {
  margin: 8px 18px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; font-family: var(--font);
  cursor: pointer; display: flex; align-items: center; gap: 10px; text-decoration: none; transition: background .15s;
}
.lva-pricing-btn { border: 1px solid var(--line-2); background: var(--white); color: var(--ink); font-weight: 600; }
.lva-pricing-btn:hover { background: var(--accent-soft); }
.lva-logout { border: none; background: none; color: var(--muted); margin-top: 0; margin-bottom: 6px; }
.lva-logout:hover { color: #d0463b; }
.lva-ico { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.lva-quota { margin: 0 18px 10px; padding: 9px 13px; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--accent-soft); text-align: center; }
.lva-quota-low { color: #d0463b; background: #fbecea; }
.lva-brand { padding: 0 22px 18px; font-size: 11.5px; color: var(--muted); }
.lva-brand a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.lva-brand a:hover { color: var(--ink); text-decoration: underline; }
.lva-brand-landing { padding: 26px 0 0; font-size: 13px; }

/* ---- Chat ---- */
.lva-trades { display: flex; align-items: center; gap: 8px; padding: 20px 28px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--white); }
.lva-trades span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.lva-chip {
  font-size: 13px; font-weight: 500; padding: 7px 15px; border-radius: 100px; cursor: pointer; font-family: var(--font);
  border: 1px solid var(--line-2); background: var(--white); color: var(--ink-2); transition: all .18s var(--ease);
}
.lva-chip:hover { border-color: var(--muted); color: var(--ink); }
.lva-chip.lva-active { background: var(--accent); color: #fff; border-color: var(--accent); }

.lva-messages { flex: 1; overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.lva-msg { max-width: 84%; animation: lvaMsg .4s var(--ease); }
@keyframes lvaMsg { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lva-user { align-self: flex-end; }
.lva-bubble { padding: 13px 17px; border-radius: 16px; font-size: 14.5px; line-height: 1.6; }
.lva-user .lva-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.lva-bot .lva-bubble { background: var(--white); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 5px; box-shadow: var(--shadow-xs); }

.lva-pos-wrap { display: flex; flex-direction: column; gap: 11px; max-width: 84%; margin-top: 2px; }
.lva-pos-card {
  background: var(--white); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 16px 18px; box-shadow: var(--shadow-xs); position: relative; overflow: hidden;
  animation: lvaMsg .4s var(--ease) both; transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s;
}
.lva-pos-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--line); }
.lva-pos-unit { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.lva-pos-kurz { font-weight: 600; font-size: 15px; margin: 5px 0 6px; letter-spacing: -.01em; }
.lva-pos-lang { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.lva-pos-price { margin-top: 11px; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.lva-price-own { color: var(--green); }
.lva-price-est { color: var(--amber); }
.lva-price-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 100px; background: var(--green-soft); color: var(--green); }
.lva-tag-est { background: var(--amber-soft); color: var(--amber); }
.lva-pos-add {
  margin-top: 14px; width: 100%; padding: 11px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; font-family: var(--font);
  background: var(--white); color: var(--ink); font-weight: 600; font-size: 13.5px;
  display: flex; align-items: center; justify-content: center; gap: 7px; transition: all .2s var(--ease);
}
.lva-pos-add:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.lva-pos-add:disabled { opacity: 1; cursor: default; background: var(--green-soft); color: var(--green); border-color: transparent; }

.lva-composer { padding: 18px 28px 24px; background: var(--bg); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-end; }
.lva-composer textarea {
  flex: 1; resize: none; border-radius: var(--radius-sm); padding: 13px 16px; font-family: var(--font); font-size: 14.5px; line-height: 1.4;
  min-height: 48px; max-height: 150px; color: var(--ink); background: var(--white); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s;
}
.lva-composer textarea::placeholder { color: var(--muted); }
.lva-composer textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,29,35,.07); }
.lva-send {
  width: 48px; height: 48px; border-radius: var(--radius-sm); border: none; cursor: pointer; flex-shrink: 0;
  background: var(--accent); color: #fff; display: grid; place-items: center; transition: transform .2s var(--ease), opacity .2s;
}
.lva-send:hover { transform: translateY(-1px); opacity: .9; }
.lva-send:active { transform: translateY(0); }
.lva-send:disabled { opacity: .35; cursor: default; transform: none; }
.lva-send .lva-ico { width: 19px; height: 19px; stroke-width: 2; }

.lva-typing { display: flex; gap: 5px; padding: 5px 2px; }
.lva-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: lvaBlink 1.3s infinite; }
.lva-typing span:nth-child(2) { animation-delay: .18s; }
.lva-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes lvaBlink { 0%,60%,100% { opacity: .25; } 30% { opacity: 1; } }

/* ---- Willkommens-Zustand ---- */
.lva-welcome { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6% 24px; margin: auto 0; animation: lvaMsg .5s var(--ease); }
.lva-welcome-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 22px; background: var(--accent); color: #fff; }
.lva-welcome-icon svg { width: 30px; height: 30px; }
.lva-welcome-title { font-size: 25px; font-weight: 700; margin: 0 0 10px; color: var(--ink); letter-spacing: -.02em; }
.lva-welcome-sub { font-size: 14.5px; color: var(--muted); line-height: 1.6; max-width: 440px; margin: 0 0 30px; }
.lva-suggest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 540px; }
.lva-suggest {
  padding: 15px 17px; border-radius: var(--radius-sm); cursor: pointer; text-align: left; font-family: var(--font);
  font-size: 13.5px; font-weight: 500; color: var(--ink); line-height: 1.4; background: var(--white); border: 1px solid var(--line-2);
  transition: all .22s var(--ease); position: relative; overflow: hidden; animation: lvaMsg .45s var(--ease) both;
}
.lva-suggest:nth-child(2) { animation-delay: .06s; }
.lva-suggest:nth-child(3) { animation-delay: .12s; }
.lva-suggest:nth-child(4) { animation-delay: .18s; }
.lva-suggest::after { content: '→'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%) translateX(5px); opacity: 0; color: var(--ink); font-weight: 600; transition: all .22s var(--ease); }
.lva-suggest:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); padding-right: 32px; }
.lva-suggest:hover::after { opacity: 1; transform: translateY(-50%); }
.lva-suggest:active { transform: translateY(0); }

/* ---- LV-Panel ---- */
.lva-lv-head { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.lva-lv-head strong { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.lva-proj { display: flex; gap: 8px; margin-top: 14px; }
.lva-proj input { border-radius: 10px; padding: 9px 12px; font-size: 13px; font-family: var(--font); color: var(--ink); background: var(--white); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; }
.lva-proj input::placeholder { color: var(--muted); }
.lva-proj input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,29,35,.06); }
#lvaProjName { flex: 1; min-width: 0; } #lvaLvName { width: 84px; }
.lva-lv-body { flex: 1; overflow-y: auto; min-height: 0; padding: 6px 0; }
.lva-lv-empty { padding: 52px 28px; text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.lva-lv-table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--ink); }
.lva-lv-table th { position: sticky; top: 0; background: var(--white); text-align: left; padding: 11px 12px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); font-weight: 600; }
.lva-lv-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lva-lv-table tr { animation: lvaMsg .35s var(--ease) both; }
.lva-td-nr { font-weight: 600; color: var(--ink); white-space: nowrap; }
.lva-td-kurz { font-weight: 600; }
.lva-td-lang { color: var(--muted); font-size: 11.5px; margin-top: 3px; line-height: 1.4; }
.lva-td-price { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lva-qty { width: 60px; border-radius: 8px; padding: 7px 9px; font-family: var(--font); font-size: 12.5px; text-align: right; background: var(--white); border: 1px solid var(--line-2); color: var(--ink); }
.lva-qty:focus { outline: none; border-color: var(--accent); }
.lva-ep { width: 72px; }
.lva-ep-est { font-size: 10px; color: var(--amber); font-weight: 700; margin-right: 3px; }
.lva-price-badge { color: var(--muted); }
.lva-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 16px; transition: color .15s; }
.lva-del:hover { color: #d0463b; }
.lva-lv-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; background: var(--white); }
.lva-lv-foot #lvaPosCount { font-weight: 600; font-size: 14px; color: var(--ink); }
.lva-gaeb-btn {
  padding: 11px 18px; border: none; border-radius: 10px; cursor: pointer; font-family: var(--font); font-weight: 600; font-size: 13px;
  background: var(--accent); color: #fff; display: flex; align-items: center; gap: 8px; transition: transform .2s var(--ease), opacity .2s;
}
.lva-gaeb-btn:hover { transform: translateY(-1px); opacity: .9; }

/* ===================== Landingpage ===================== */
.lva-landing { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; max-width: 1080px; margin: 0 auto; padding: 7vh 28px; min-height: 100vh; }
.lva-landing-hero { animation: lvaIn .6s var(--ease) both; }
.lva-landing-logo { width: 60px; height: 60px; border-radius: 16px; margin-bottom: 26px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.lva-landing-hero h1 { font-size: 46px; line-height: 1.05; margin: 0 0 18px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.lva-landing-hero h1 em { font-style: normal; color: var(--muted); }
.lva-landing-tag { font-size: 17px; color: var(--ink-2); line-height: 1.6; margin: 0 0 32px; max-width: 440px; }
.lva-landing-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 15px; }
.lva-landing-feats li { padding-left: 34px; position: relative; font-size: 15px; line-height: 1.4; color: var(--ink); animation: lvaIn .5s var(--ease) both; }
.lva-landing-feats li:nth-child(2) { animation-delay: .08s; }
.lva-landing-feats li:nth-child(3) { animation-delay: .16s; }
.lva-landing-feats li::before {
  content: ''; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316181d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 13px;
}
.lva-auth-card { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 36px; box-shadow: var(--shadow-lg); animation: lvaIn .6s var(--ease) .1s both; }
.lva-auth-tabs { display: flex; gap: 4px; background: var(--accent-soft); padding: 4px; border-radius: 12px; margin-bottom: 26px; }
.lva-auth-tab { flex: 1; padding: 11px; border: none; background: transparent; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); font-family: var(--font); transition: all .2s var(--ease); }
.lva-auth-tab.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-xs); }
.lva-auth-form { display: flex; flex-direction: column; gap: 16px; }
.lva-auth-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); }
.lva-auth-form input[type="text"], .lva-auth-form input[type="email"], .lva-auth-form input[type="password"] {
  border-radius: 11px; padding: 13px 15px; font-size: 15px; font-family: var(--font); width: 100%; color: var(--ink); background: var(--white); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s;
}
.lva-auth-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,29,35,.07); }
.lva-remember { flex-direction: row !important; align-items: center; gap: 9px !important; font-weight: 400 !important; color: var(--muted) !important; }
.lva-remember input { width: auto; accent-color: var(--accent); }
.lva-auth-btn { margin-top: 8px; padding: 14px; border: none; border-radius: 11px; cursor: pointer; font-family: var(--font); font-weight: 600; font-size: 15px; background: var(--accent); color: #fff; transition: transform .2s var(--ease), opacity .2s; }
.lva-auth-btn:hover { transform: translateY(-1px); opacity: .92; }
.lva-auth-btn:active { transform: translateY(0); }
.lva-auth-error { background: #fbecea; border: 1px solid #f3d2cd; color: #c0392b; border-radius: 11px; padding: 12px 15px; font-size: 13.5px; margin-bottom: 18px; }
.lva-auth-forgot { text-align: center; font-size: 13px; color: var(--ink-2); text-decoration: none; margin-top: 4px; }
.lva-auth-forgot:hover { text-decoration: underline; }

/* ===================== Modal ===================== */
.lva-modal-overlay { position: fixed; inset: 0; background: rgba(20,24,31,.4); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 99999; padding: 20px; animation: lvaFade .25s var(--ease); }
@keyframes lvaFade { from { opacity: 0; } to { opacity: 1; } }
.lva-modal { background: var(--white); border-radius: 22px; width: 100%; max-width: 760px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); color: var(--ink); animation: lvaModal .35s var(--ease); }
@keyframes lvaModal { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.lva-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.lva-modal-head h2 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -.02em; }
.lva-modal-close { border: none; background: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; transition: color .2s, transform .2s; }
.lva-modal-close:hover { color: var(--ink); transform: rotate(90deg); }
.lva-modal-body { padding: 26px 28px; overflow-y: auto; }
.lva-modal-intro { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; background: var(--accent-soft); padding: 14px 16px; border-radius: 12px; margin: 0 0 24px; }
.lva-modal-body h3 { font-size: 15px; margin: 26px 0 14px; padding-top: 22px; border-top: 1px solid var(--line); font-weight: 700; letter-spacing: -.01em; }
.lva-modal-body h3:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.lva-rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.lva-rules-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; }
.lva-rules-grid input { border-radius: 10px; padding: 11px 13px; font-size: 14px; font-family: var(--font); background: var(--white); border: 1px solid var(--line-2); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.lva-rules-grid input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,29,35,.06); }
.lva-hint { font-size: 12.5px; color: var(--muted); margin: 0 0 13px; }
.lva-cost-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 4px; }
.lva-cost-table th { text-align: left; padding: 8px 9px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); font-weight: 600; }
.lva-cost-table td { padding: 5px 6px; }
.lva-cost-table input, .lva-cost-table select { width: 100%; border-radius: 9px; padding: 9px 11px; font-size: 13.5px; font-family: var(--font); background: var(--white); border: 1px solid var(--line-2); color: var(--ink); transition: border-color .2s; }
.lva-cost-table input:focus, .lva-cost-table select:focus { outline: none; border-color: var(--accent); }
.lva-cost-table select option { background: #fff; color: var(--ink); }
.lva-cost-table .col-unit { width: 92px; } .lva-cost-table .col-price { width: 104px; } .lva-cost-table .col-del { width: 40px; }
.lva-row-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 18px; transition: color .2s; }
.lva-row-del:hover { color: #d0463b; }
.lva-add-row { margin-top: 13px; padding: 10px 16px; border: 1px dashed var(--line-2); background: transparent; color: var(--ink-2); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; font-family: var(--font); transition: all .2s var(--ease); }
.lva-add-row:hover { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.lva-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 18px 28px; border-top: 1px solid var(--line); background: var(--bg); }
.lva-save-status { font-size: 13px; color: var(--green); font-weight: 600; }
.lva-save-btn { padding: 13px 26px; border: none; border-radius: 11px; cursor: pointer; font-family: var(--font); font-weight: 600; font-size: 14px; background: var(--accent); color: #fff; transition: transform .2s var(--ease), opacity .2s; }
.lva-save-btn:hover { transform: translateY(-1px); opacity: .92; }

/* Scrollbars */
.lva-conv-list::-webkit-scrollbar, .lva-messages::-webkit-scrollbar, .lva-lv-body::-webkit-scrollbar, .lva-modal-body::-webkit-scrollbar { width: 8px; }
.lva-conv-list::-webkit-scrollbar-thumb, .lva-messages::-webkit-scrollbar-thumb, .lva-lv-body::-webkit-scrollbar-thumb, .lva-modal-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 100px; }
.lva-conv-list::-webkit-scrollbar-thumb:hover, .lva-messages::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ===================== Responsive ===================== */
.lva-mobile-tabs { display: none; }
@media (max-width: 1180px) { .lva-app { grid-template-columns: 232px 1fr 324px; } }
@media (max-width: 1000px) { .lva-app { grid-template-columns: 208px 1fr 300px; } .lva-landing-hero h1 { font-size: 38px; } }

@media (max-width: 860px) {
  .lva-app {
    grid-template-columns: 1fr; grid-template-rows: 1fr;
    height: 100vh; height: 100dvh; gap: 0; padding: 0 0 64px;
    overflow: hidden;
  }
  .lva-sidebar, .lva-main, .lva-lv {
    grid-column: 1; grid-row: 1; display: none; border: none;
    height: 100%; min-height: 0; overflow: hidden;
  }
  .lva-app[data-pane="chats"] .lva-sidebar { display: flex; animation: lvaPane .3s var(--ease); }
  .lva-app[data-pane="chat"]  .lva-main    { display: flex; animation: lvaPane .3s var(--ease); }
  .lva-app[data-pane="lv"]    .lva-lv      { display: flex; animation: lvaPane .3s var(--ease); }
  @keyframes lvaPane { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

  /* Sidebar mobil: Kopf + scrollbare Liste, Buttons unten fix */
  .lva-conv-list { flex: 1; }

  /* Chat mobil: Trades fix oben, Nachrichten scrollen, Composer fix unten */
  .lva-trades { flex-shrink: 0; padding: 14px 16px 10px; }
  .lva-messages { padding: 16px; gap: 14px; }
  .lva-composer-wrap { flex-shrink: 0; }
  .lva-composer { padding: 12px 14px 14px; gap: 8px; }
  .lva-composer textarea { padding: 12px 14px; font-size: 16px; } /* 16px verhindert iOS-Zoom */
  /* Buttons mobil etwas kompakter, damit das Textfeld Platz hat */
  .lva-attach, .lva-voice-btn { width: 42px; height: 42px; }
  .lva-send { width: 42px; height: 42px; }

  /* LV-Panel mobil: Kopf fix, Liste scrollt, Fuß fix */
  .lva-lv-head { flex-shrink: 0; padding: 16px 18px 12px; }
  .lva-lv-body { flex: 1; }
  .lva-lv-foot { flex-shrink: 0; padding: 12px 18px; }
  .lva-lv-row { padding: 12px 18px; }

  /* Bild-/Sprachleiste mobil bündig */
  .lva-img-preview, .lva-voice-bar { margin: 0 14px 10px; }

  /* Mobile Tab-Leiste unten */
  .lva-mobile-tabs {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 64px; z-index: 1000;
    background: var(--white); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom); /* iPhone-Notch/Home-Leiste */
  }
  .lva-mtab { flex: 1; border: none; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-family: var(--font); font-size: 11px; font-weight: 600; transition: color .2s; }
  .lva-mtab .lva-ico { width: 22px; height: 22px; transition: transform .2s var(--ease); }
  .lva-mtab.active { color: var(--ink); }
  .lva-mtab.active .lva-ico { transform: translateY(-1px); }
  .lva-mtab:active { transform: scale(.94); }

  .lva-landing { grid-template-columns: 1fr; gap: 34px; padding: 6vh 22px; min-height: 100vh; }
}

@media (max-width: 560px) {
  .lva-landing { gap: 28px; padding: 5vh 18px; min-height: auto; }
  .lva-landing-hero h1 { font-size: 32px; }
  .lva-auth-card { padding: 26px; }
  .lva-rules-grid, .lva-suggest-grid { grid-template-columns: 1fr; }
  .lva-msg, .lva-pos-wrap { max-width: 100%; }
  .lva-modal { border-radius: 18px; max-height: 92vh; }
  .lva-modal-head, .lva-modal-body, .lva-modal-foot { padding-left: 18px; padding-right: 18px; }
  .lva-welcome-title { font-size: 21px; }
  .lva-welcome { padding: 10% 18px; }
}

@media (prefers-reduced-motion: reduce) { *, body.lva-standalone { animation: none !important; transition: none !important; } }

/* ---- Bild-Upload im Composer ---- */
.lva-composer-wrap { border-top: 1px solid var(--line); background: var(--bg); }
.lva-composer-wrap .lva-composer { border-top: none; }
.lva-attach {
  width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); cursor: pointer; flex-shrink: 0;
  background: var(--white); color: var(--ink-2); display: grid; place-items: center; transition: all .2s var(--ease);
}
.lva-attach:hover { border-color: var(--accent); color: var(--ink); }
.lva-attach .lva-ico { width: 19px; height: 19px; }
.lva-img-preview { display: flex; align-items: center; gap: 12px; padding: 14px 28px 0; position: relative; }
.lva-img-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); }
.lva-img-preview #lvaImgRemove { width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--ink); color: #fff; cursor: pointer; font-size: 15px; line-height: 1; display: grid; place-items: center; position: absolute; left: 64px; top: 8px; }
.lva-img-preview #lvaImgRemove:hover { background: #d0463b; }
.lva-img-status { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.lva-bubble-img { max-width: 220px; max-height: 220px; border-radius: 12px; margin-bottom: 8px; display: block; }
.lva-user .lva-bubble-img { border: 1px solid rgba(255,255,255,.25); }

/* ---- Bild-Upload ---- */
.lva-attach {
  width: 48px; height: 48px; border-radius: var(--radius-sm); flex-shrink: 0; cursor: pointer;
  background: var(--white); color: var(--ink-2); border: 1px solid var(--line-2);
  display: grid; place-items: center; transition: all .2s var(--ease);
}
.lva-attach:hover { border-color: var(--accent); color: var(--ink); }
.lva-attach .lva-ico { width: 19px; height: 19px; }
.lva-img-preview {
  display: none; align-items: center; gap: 12px; margin: 0 28px 12px; padding: 10px 12px;
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow-xs);
  animation: lvaMsg .3s var(--ease);
}
.lva-img-preview img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.lva-img-preview button { margin-left: auto; border: none; background: var(--accent-soft); color: var(--ink-2); width: 28px; height: 28px; border-radius: 8px; font-size: 18px; cursor: pointer; line-height: 1; transition: all .2s; }
.lva-img-preview button:hover { background: #fbecea; color: #d0463b; }
.lva-img-status { font-size: 12.5px; color: var(--muted); font-weight: 500; }

/* Bild in der Chat-Blase */
.lva-bubble-img { max-width: 220px; max-height: 200px; border-radius: 11px; display: block; margin-bottom: 8px; border: 1px solid rgba(255,255,255,.2); }
.lva-user .lva-bubble-img:last-child { margin-bottom: 0; }

/* ---- LV-Zeilen-Layout (Karten statt Tabelle) ---- */
.lva-lv-row { padding: 14px 22px; border-bottom: 1px solid var(--line); animation: lvaMsg .35s var(--ease) both; }
.lva-lv-row-top { display: flex; align-items: flex-start; gap: 10px; }
.lva-lv-row-top .lva-td-nr { font-weight: 600; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.lva-lv-row-top .lva-td-kurz { flex: 1; font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.lva-lv-row-top .lva-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 17px; line-height: 1; transition: color .15s; }
.lva-lv-row-top .lva-del:hover { color: #d0463b; }
.lva-lv-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 9px; padding-left: 0; }
.lva-lv-row-meta .lva-qty { width: 64px; }
.lva-lv-row-unit { font-size: 12px; color: var(--muted); font-weight: 500; min-width: 28px; }
.lva-lv-row-price { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; margin-left: auto; }
.lva-lv-row-price .lva-ep { width: 64px; text-align: right; }
.lva-ep-est { font-size: 11px; color: var(--amber); font-weight: 700; }
/* Netto-Summe-Zeile */
.lva-lv-row-sum { background: var(--accent-soft); }
.lva-lv-row-sum .lva-lv-row-top { align-items: center; }
.lva-lv-row-sum .lva-td-kurz { font-weight: 700; }
.lva-lv-row-sum .lva-lv-row-price { font-weight: 700; font-size: 14px; color: var(--ink); }

/* Einheitspreis-Zeile lesbar gegliedert */
.lva-ep-cur { font-size: 11.5px; color: var(--muted); }
.lva-ep-sum { font-weight: 600; color: var(--ink); margin-left: 4px; }

/* ---- Sprachmodus ---- */
.lva-voice-btn.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.lva-voice-bar[hidden] { display: none !important; }
.lva-voice-bar {
  display: flex; align-items: center; gap: 12px; margin: 0 28px 16px; padding: 12px 16px;
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow-xs);
  animation: lvaMsg .3s var(--ease);
}
.lva-voice-orb { width: 16px; height: 16px; border-radius: 50%; background: var(--muted); flex-shrink: 0; transition: background .3s; }
.lva-voice-orb.is-listening { background: var(--green); animation: lvaOrbPulse 1.6s ease-in-out infinite; }
.lva-voice-orb.is-thinking { background: var(--amber); animation: lvaOrbPulse 1s ease-in-out infinite; }
.lva-voice-orb.is-speaking { background: var(--accent); animation: lvaOrbPulse .7s ease-in-out infinite; }
.lva-voice-orb.is-error { background: #d0463b; }
@keyframes lvaOrbPulse { 0%,100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 currentColor; } 50% { transform: scale(1.15); opacity: .8; box-shadow: 0 0 0 6px rgba(0,0,0,.04); } }
.lva-voice-state { flex: 1; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.lva-voice-stop { border: 1px solid var(--line-2); background: var(--white); color: var(--ink); border-radius: 8px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: var(--font); transition: all .2s; }
.lva-voice-stop:hover { background: #fbecea; color: #d0463b; border-color: #f3d2cd; }

/* Speicher-Status im LV-Kopf */
.lva-lv-head .lva-save-status { font-size: 11.5px; font-weight: 600; color: var(--green); margin-left: 10px; opacity: 0; transition: opacity .3s; }

/* ---- Bearbeitbare LV-Texte (Kurztext/Titel + Langtext) ---- */
.lva-edit-kurz {
  flex: 1; min-width: 0; border: 1px solid transparent; background: transparent; border-radius: 7px;
  font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--ink); padding: 4px 7px; margin: -4px 0;
  transition: background .15s, border-color .15s;
}
.lva-edit-kurz:hover { background: var(--accent-soft); }
.lva-edit-kurz:focus { outline: none; background: var(--white); border-color: var(--accent); box-shadow: 0 0 0 2px rgba(26,29,35,.06); }
.lva-edit-lang {
  width: 100%; resize: none; border: 1px solid transparent; background: transparent; border-radius: 8px;
  font-family: var(--font); font-size: 12px; line-height: 1.45; color: var(--muted); padding: 6px 7px; margin-top: 6px;
  transition: background .15s, border-color .15s, color .15s; overflow: hidden;
}
.lva-edit-lang:hover { background: var(--accent-soft); }
.lva-edit-lang:focus { outline: none; background: var(--white); border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 2px rgba(26,29,35,.06); }
.lva-edit-lang::placeholder { color: var(--muted); opacity: .6; }

/* ---- Werkzeuge-Modal ---- */
.lva-tools-tabs { display: flex; gap: 4px; padding: 0 28px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.lva-tools-tab { border: none; background: none; padding: 13px 14px; font-family: var(--font); font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.lva-tools-tab:hover { color: var(--ink); }
.lva-tools-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.lva-tool-pane { display: none; animation: lvaMsg .3s var(--ease); }
.lva-tool-pane.active { display: block; }
.lva-tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.lva-tool-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); }
.lva-tool-grid input, .lva-tool-grid select { border-radius: 10px; padding: 12px 13px; font-size: 16px; font-family: var(--font); background: var(--white); border: 1px solid var(--line-2); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.lva-tool-grid input:focus, .lva-tool-grid select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,29,35,.06); }
.lva-tool-result { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 18px 20px; font-size: 15px; color: var(--ink); line-height: 1.6; text-align: center; }
.lva-tool-result strong { font-size: 18px; }
.lva-tool-note { font-size: 11.5px; color: var(--muted); font-weight: 500; }
@media (max-width: 560px) { .lva-tool-grid { grid-template-columns: 1fr; } .lva-tools-tabs { padding: 0 18px; } }

/* ---- Auswahl-Optionen (KI-Rückfragen) ---- */
.lva-options { display: flex; flex-wrap: wrap; gap: 8px; max-width: 84%; margin: -6px 0 2px; animation: lvaMsg .4s var(--ease); }
.lva-option {
  padding: 10px 16px; border-radius: 100px; cursor: pointer; font-family: var(--font); font-size: 13.5px; font-weight: 500;
  background: var(--white); color: var(--ink); border: 1px solid var(--line-2); transition: all .2s var(--ease);
}
.lva-option:hover { border-color: var(--accent); background: var(--accent); color: #fff; transform: translateY(-1px); }
.lva-option:disabled { cursor: default; opacity: .5; transform: none; }
.lva-option-chosen { background: var(--accent); color: #fff; border-color: var(--accent); opacity: 1 !important; }
@media (max-width: 560px) { .lva-options { max-width: 100%; } }
