/* emso Review: Emsenhuber Solutions CI */
:root {
  --color-purple: #4E36A3; --color-purple-light: #6B52C8; --color-purple-dark: #3A2880;
  --color-yellow: #E7E247; --color-yellow-dark: #C9C420; --color-coral: #EE6C4D; --color-teal: #4798B5; --color-gray-mid: #808F87;
  --purple-50: #f0eefb; --purple-100: #d9d3f5; --purple-200: #b8aded; --purple-300: #9080e2; --purple-400: #6B52C8;
  --purple-500: #4E36A3; --purple-600: #3A2880; --purple-700: #2a1d60; --purple-800: #1c1340;
  --bg-base: #0a0812; --bg-surface: #120f1e; --bg-elevated: #1a1530;
  --text-primary: #f4f2fb; --text-secondary: #b9b4cc; --text-muted: #8f9a94;
  --glass-bg: rgba(255,255,255,0.05); --glass-bg-dark: rgba(10,8,18,0.72);
  --glass-border: 1px solid rgba(110,86,200,0.30); --glass-blur: blur(18px) saturate(160%);
  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px; --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.30);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.55);
  --shadow-glow-purple: 0 0 32px rgba(78,54,163,0.60);
  --gradient-brand: linear-gradient(135deg, #4E36A3, #6B52C8, #4798B5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --dur-fast: 150ms; --dur-base: 250ms; --dur-slow: 400ms;
  --font-display: 'Tektur', 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--font-body); font-weight: 300; font-size: 15px; line-height: 1.55; color: var(--text-primary);
  background: radial-gradient(1200px 600px at 15% -10%, rgba(78,54,163,0.32), transparent 60%),
              radial-gradient(900px 500px at 100% 0%, rgba(71,152,181,0.12), transparent 60%), var(--bg-base);
  background-attachment: fixed; min-height: 100vh;
}
a { color: var(--purple-200); text-decoration: none; }
a:hover { color: var(--color-yellow); }
:focus-visible { outline: 2px solid var(--color-yellow); outline-offset: 2px; }
h1, h2 { font-family: var(--font-display); letter-spacing: 0.04em; font-weight: 600; margin: 0 0 .4em; }
h1 { font-size: 30px; } h2 { font-size: 20px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 .5em; }
code, .mono { font-family: var(--font-mono); font-size: 13px; }
.ic { flex: none; vertical-align: -3px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 12px 24px;
  background: var(--glass-bg-dark); backdrop-filter: var(--glass-blur); border-bottom: var(--glass-border); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
.brand .emso-logo { display: block; }
.brand .app { font-family: var(--font-display); letter-spacing: .08em; font-size: 15px; color: var(--color-yellow); margin-left: 6px; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; }
.topbar nav a { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: var(--radius-md); color: var(--text-secondary); font-weight: 500; font-size: 14px; }
.topbar nav a:hover, .topbar nav a.on { background: var(--glass-bg); color: var(--text-primary); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 32px 24px 80px; }
.crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.crumbs a { color: var(--text-secondary); }
.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--glass-bg); backdrop-filter: var(--glass-blur); border: var(--glass-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 22px; }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 1.4fr 1fr; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 860px) { .grid.two { grid-template-columns: 1fr; } }

/* Buttons und Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-md);
  border: 1px solid rgba(110,86,200,0.45); background: rgba(78,54,163,0.15); color: var(--text-primary); font: 500 14px var(--font-body);
  cursor: pointer; transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); white-space: nowrap; }
.btn:hover { background: rgba(78,54,163,0.32); color: var(--text-primary); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--gradient-brand); border-color: transparent; }
.btn.primary:hover { box-shadow: var(--shadow-glow-purple); transform: scale(1.02); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn.ghost:hover { background: var(--glass-bg); color: var(--text-primary); }
.btn.danger { border-color: rgba(238,108,77,.5); background: rgba(238,108,77,.1); }
.btn.danger:hover { background: rgba(238,108,77,.25); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
label { display: block; font-weight: 600; font-size: 13px; color: var(--text-secondary); margin: 12px 0 5px; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid rgba(110,86,200,0.35);
  background: rgba(10,8,18,0.6); color: var(--text-primary); font: 400 15px var(--font-body); }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--purple-300); outline: none; box-shadow: 0 0 0 3px rgba(107,82,200,.25); }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.row > .btn, .row > form { flex: none; }
.hint { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.flash { padding: 12px 16px; border-radius: var(--radius-md); background: rgba(71,152,181,.15); border: 1px solid rgba(71,152,181,.4); margin-bottom: 20px; }
.error { padding: 12px 16px; border-radius: var(--radius-md); background: rgba(238,108,77,.12); border: 1px solid rgba(238,108,77,.45); margin: 12px 0; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; letter-spacing: .02em; border: 1px solid transparent; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-draft { color: var(--text-secondary); background: rgba(255,255,255,.06); }
.st-review { color: var(--color-yellow); background: rgba(231,226,71,.1); border-color: rgba(231,226,71,.3); }
.st-submitted { color: #f39a83; background: rgba(238,108,77,.12); border-color: rgba(238,108,77,.35); }
.st-done { color: #7cc3dc; background: rgba(71,152,181,.12); border-color: rgba(71,152,181,.35); }
.fs-open { color: var(--color-yellow); } .fs-done { color: #7cc3dc; } .fs-wontfix { color: var(--text-muted); } .fs-question { color: #f39a83; }

/* Tabellen und Listen */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: 8px 10px; border-bottom: 1px solid rgba(110,86,200,.25); }
td { padding: 11px 10px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: rgba(255,255,255,.03); }

.proj { display: block; color: var(--text-primary); transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.proj:hover { transform: translateY(-2px); border-color: rgba(231,226,71,.45); color: var(--text-primary); }
.proj .client { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.proj h2 { font-size: 19px; margin: 4px 0 10px; }
.proj .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); }

.linkbox { display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 12px; border-radius: var(--radius-md); background: rgba(10,8,18,.6); border: 1px solid rgba(231,226,71,.35); }
.linkbox code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-yellow); }
pre.cmd { background: rgba(10,8,18,.7); border: 1px solid rgba(110,86,200,.3); border-radius: var(--radius-md); padding: 12px 14px; overflow-x: auto; font: 13px/1.6 var(--font-mono); color: var(--purple-100); margin: 8px 0; position: relative; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.shot { position: relative; border-radius: var(--radius-md); overflow: hidden; border: 1px solid rgba(110,86,200,.3); background: var(--bg-surface); }
.shot img { display: block; width: 100%; height: 190px; object-fit: cover; object-position: top; }
.shot .cap { padding: 7px 9px; font-size: 12px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.shot form { position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity var(--dur-fast); }
.shot:hover form { opacity: 1; }

.fb-type { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm); background: rgba(107,82,200,.2); color: var(--purple-100); white-space: nowrap; }
.fb-type.t-text { background: rgba(71,152,181,.2); color: #a9dcee; }
.fb-type.t-question { background: rgba(238,108,77,.15); color: #f6b4a3; }
.fb-type.t-ok { background: rgba(255,255,255,.07); color: var(--text-secondary); }
.fb-type.t-remove, .fb-type.t-image { background: rgba(231,226,71,.1); color: #efec9a; }
blockquote.newtext { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--color-teal); background: rgba(71,152,181,.08); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; white-space: pre-wrap; font-size: 14px; }
.el { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.el code { color: var(--purple-200); font-size: 12px; }

.auth { max-width: 420px; margin: 12vh auto; }
.auth h1 { font-size: 26px; }
.auth-logo { margin-bottom: 22px; line-height: 0; }
details summary { cursor: pointer; color: var(--text-secondary); font-weight: 500; }
.tabs-inline { display: inline-flex; gap: 4px; padding: 3px; border-radius: var(--radius-md); background: rgba(10,8,18,.6); border: 1px solid rgba(110,86,200,.25); }
.tabs-inline button { border: 0; background: transparent; color: var(--text-secondary); font: 500 13px var(--font-body); padding: 6px 12px; border-radius: 9px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tabs-inline button.on { background: var(--color-purple); color: #fff; }
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }

/* ============================================================ Liquid Glass */
:root {
  --lg-fill: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03) 45%, rgba(107,82,200,0.06));
  --lg-rim: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.08) 30%, rgba(107,82,200,0.25) 60%, rgba(231,226,71,0.35));
  --lg-shadow: 0 20px 50px -12px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.18), inset 0 -1px 0 rgba(255,255,255,0.04);
  --lg-blur: blur(24px) saturate(180%) brightness(1.06);
}
/* Bewegter Hintergrund: weiche Farbkugeln hinter dem Glas */
body::before, body::after {
  content: ''; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(70px); opacity: .55;
}
body::before { width: 46vmax; height: 46vmax; left: -10vmax; top: -14vmax; background: radial-gradient(circle at 30% 30%, #6B52C8, transparent 65%); animation: drift1 26s var(--ease) infinite alternate; }
body::after { width: 40vmax; height: 40vmax; right: -12vmax; bottom: -16vmax; background: radial-gradient(circle at 60% 40%, #4798B5, transparent 62%); animation: drift2 32s var(--ease) infinite alternate; opacity: .4; }
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, -10vmax) scale(.9); } }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } }

/* Glasfläche mit spiegelndem Rand (Gradient-Border per Maske) und Lichtkante */
.card, .topbar, .lg {
  position: relative; background: var(--lg-fill); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  border: 1px solid transparent; box-shadow: var(--lg-shadow); isolation: isolate;
}
.card::before, .topbar::before, .lg::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: var(--lg-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card::after, .lg::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(120% 60% at 15% 0%, rgba(255,255,255,0.12), transparent 50%);
}
.card > *, .lg > * { position: relative; z-index: 2; }
.card { border-radius: 22px; }

/* Schwebende Kopfzeile als Glas-Insel */
.topbar { margin: 12px 16px 0; border-radius: 18px; top: 12px; border-bottom: 0; }
.topbar > * { position: relative; z-index: 2; }

.btn.primary { background: linear-gradient(135deg, #5a40b8, #6B52C8 45%, #4798B5); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 18px -6px rgba(78,54,163,.8); }
.btn { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgba(255,255,255,.10); }
.proj:hover { box-shadow: var(--lg-shadow), 0 0 0 1px rgba(231,226,71,.35), 0 18px 40px -16px rgba(107,82,200,.7); }
h1 { background: linear-gradient(100deg, #fff 30%, var(--purple-100) 70%, var(--color-yellow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1 .badge { -webkit-text-fill-color: initial; vertical-align: 6px; }

/* ============================================================ Kontakt-Button (Kundenseiten) */
.ct { position: fixed; right: 22px; bottom: 22px; z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.ct-fab { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: var(--radius-full); cursor: pointer;
  color: #fff; font: 600 14px var(--font-body); letter-spacing: .02em;
  background: linear-gradient(135deg, #5a40b8, #6B52C8 45%, #4798B5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 30px -8px rgba(78,54,163,.9), 0 0 0 1px rgba(255,255,255,.08);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.ct-fab:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 14px 34px -8px rgba(78,54,163,1), 0 0 0 1px rgba(231,226,71,.4); }
.ct-fab .ic { vertical-align: 0; }
.ct-open, .ct-close { display: inline-flex; }
.ct-close, .ct.on .ct-open { display: none; }
.ct.on .ct-close { display: inline-flex; }
.ct-panel { width: 300px; max-width: calc(100vw - 32px); padding: 14px; border-radius: var(--radius-lg);
  background: linear-gradient(140deg, rgba(40,32,72,.9), rgba(20,16,38,.94)); transform-origin: bottom right; animation: ct-in var(--dur-base) var(--ease); }
@keyframes ct-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.ct-head { padding: 2px 4px 10px; }
.ct-head strong { display: block; font-family: var(--font-display); font-weight: 500; letter-spacing: .04em; font-size: 16px; }
.ct-head span { display: block; font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.ct-opt { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius-md); color: var(--text-primary); transition: background var(--dur-fast) var(--ease); }
.ct-opt:hover, .ct-opt:focus-visible { background: rgba(255,255,255,.07); color: var(--text-primary); }
.ct-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.ct-ic .ic { vertical-align: 0; }
.ct-whatsapp .ct-ic { background: #1fa855; }
.ct-teams .ct-ic { background: #5b5fc7; }
.ct-mail .ct-ic { background: var(--color-purple); }
.ct-call .ct-ic { background: var(--color-teal); }
.ct-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ct-txt b { font-weight: 600; font-size: 14px; }
.ct-txt small { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .ct { right: 14px; bottom: 14px; }
  .ct-fab { width: 52px; padding: 0; justify-content: center; }
  .ct-lbl { display: none; }
  body:has(.rv.side-open) .ct { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ct-panel { animation: none; } }
