/* copied from public/assets/css/styles.css for root-webroot hosting */

/* Dark business theme (Anthrazit/Grau/Silber + dezentes Blau‑Grau)
   Single-file CSS to keep hosting simple. */

:root {
  --bg-0: #121416;
  --bg-1: #191c20;

  --surface-0: rgba(255, 255, 255, 0.06);
  --surface-1: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.10);

  --text: #e9edf3;
  --muted: rgba(233, 237, 243, 0.70);

  --accent: #8ea2bd;
  --accent-strong: #b8cce6;
  --accent-2: #6f87a6;

  --danger: #ff6b6b;

  --shadow: rgba(0, 0, 0, 0.65);
  --shadow-soft: rgba(0, 0, 0, 0.35);

  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.12);
  --focus: rgba(142, 162, 189, 0.55);

  --radius: 14px;
  --radius-sm: 10px;
  --blur: 18px;
}

* { box-sizing: border-box; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% 10%, rgba(142, 162, 189, 0.22), transparent 55%),
    radial-gradient(760px 520px at 82% 18%, rgba(111, 135, 166, 0.16), transparent 58%),
    radial-gradient(700px 420px at 85% 20%, rgba(233, 237, 243, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

/* --- Login --- */
.login-wrap { display: grid; place-items: center; min-height: 100vh; padding: 16px; }

.login-card {
  width: min(420px, calc(100vw - 32px));
  padding: 34px;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-0));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 18px 48px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateZ(0);
  transition: transform 520ms ease, filter 520ms ease, opacity 520ms ease;
}

body.is-login.leaving .login-card {
  transform: translateY(-4px) scale(1.06);
  filter: blur(3px);
  opacity: 0;
}

body.is-login.leaving .bg {
  filter: blur(8px);
  opacity: 0.65;
  transition: filter 520ms ease, opacity 520ms ease;
}

.logo {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid; place-items: center;
  margin: 0 auto;
  background: radial-gradient(circle at 30% 25%, rgba(184, 204, 230, 0.36), rgba(111, 135, 166, 0.14));
  border: 1px solid rgba(142, 162, 189, 0.30);
  box-shadow: 0 14px 30px var(--shadow-soft);
}

h1 { margin: 14px 0 6px; font-weight: 650; letter-spacing: 0.2px; text-align: center; }
.sub { margin: 0 0 18px; color: var(--muted); font-size: 13px; text-align: center; }

.form { text-align: left; }
.field { margin-bottom: 12px; }

.label {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px;
  margin: 0 0 7px;
  font-size: 12px;
  color: var(--muted);
}

.link { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
.link:hover { color: var(--text); }

.input-wrap { position: relative; }
.input-wrap input { padding-left: 40px; padding-right: 14px; }
.input-wrap.has-trailing input { padding-right: 52px; }

.leading {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: rgba(233, 237, 243, 0.70);
  font-size: 14px;
}

.trailing {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  color: rgba(233, 237, 243, 0.72);
  width: 38px; height: 38px; padding: 0;
  border-radius: 10px;
}

.trailing:hover { color: var(--text); background: rgba(255,255,255,0.06); }

input {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--input-border);
  outline: none;
  background: var(--input-bg);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus), 0 0 24px rgba(142, 162, 189, 0.10);
  background: rgba(255,255,255,0.075);
}

.hint { margin-top: 8px; font-size: 12px; color: rgba(233,237,243,0.70); }

.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0 16px; }

.check { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; user-select: none; }
.check input { width: 16px; height: 16px; }
.meta { color: rgba(233,237,243,0.55); font-size: 12px; }

.primary {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(142, 162, 189, 0.32);
  cursor: pointer;
  background: linear-gradient(180deg, rgba(184, 204, 230, 0.92), rgba(111, 135, 166, 0.92));
  font-weight: 700;
  color: #0f1114;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 14px 30px var(--shadow-soft), 0 0 0 1px rgba(184, 204, 230, 0.14) inset;
}

.primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.primary:active { transform: translateY(0); }
.primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-in { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(15, 17, 20, 0.25);
  border-top-color: rgba(15, 17, 20, 0.8);
  display: none;
  animation: spin 0.9s linear infinite;
}

.loading .spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

.error { margin: 12px 0 0; font-size: 13px; color: var(--danger); }

/* --- Toast (top center) --- */
.toast {
  position: fixed;
  left: 50%;
  top: 16px;
  transform: translateX(-50%) translateY(-6px);
  z-index: 30;
  width: min(380px, calc(100vw - 32px));
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(20, 22, 25, 0.70);
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.40);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(184, 204, 230, 0.9), rgba(111, 135, 166, 0.9)); box-shadow: 0 0 0 3px rgba(142, 162, 189, 0.12); }
.msg { color: rgba(233, 237, 243, 0.92); font-size: 13px; }

/* --- App --- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(20, 22, 25, 0.72);
  backdrop-filter: blur(var(--blur));
  padding: 14px 18px;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.header-actions { display: flex; align-items: center; gap: 10px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.2px; }
.brand-badge {
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(142, 162, 189, 0.16);
  border: 1px solid rgba(142, 162, 189, 0.25);
}

.menu { display: flex; gap: 10px; align-items: center; }
.menu-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  color: rgba(233, 237, 243, 0.86);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.menu-item:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); transform: translateY(-2px); }
.menu-item.active { background: rgba(142, 162, 189, 0.16); border-color: rgba(142, 162, 189, 0.20); color: var(--text); box-shadow: 0 10px 24px rgba(0,0,0,0.18); }

.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(184, 204, 230, 0.14); /* matches login button tone */
  color: rgba(233, 237, 243, 0.96);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, filter 0.2s ease;
  box-shadow: 0 14px 30px rgba(0,0,0,0.25);
}

.icon-btn.notif {
  background: linear-gradient(180deg, rgba(184, 204, 230, 0.26), rgba(111, 135, 166, 0.16));
  border-color: rgba(184, 204, 230, 0.26);
  box-shadow: 0 16px 40px rgba(0,0,0,0.30), 0 0 0 1px rgba(184, 204, 230, 0.10) inset;
}
.icon-btn.notif i {
  text-shadow: 0 0 18px rgba(184, 204, 230, 0.18);
}
.icon-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.icon-btn i { font-size: 17px; }

.badge {
  position: absolute;
  top: 5px; right: 5px;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  background: rgba(184, 204, 230, 0.95);
  color: #0f1114;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 1px solid rgba(0,0,0,0.25);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(233, 237, 243, 0.90);
  border-radius: 999px;
  padding: 8px 10px 8px 8px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.chip:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }
.chip-name { font-size: 13px; }

.avatar {
  width: 28px; height: 28px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(184, 204, 230, 0.55), rgba(111, 135, 166, 0.25));
  border: 1px solid rgba(142, 162, 189, 0.25);
  font-weight: 800;
  font-size: 12px;
}

.popover {
  position: fixed;
  top: 66px;
  right: 18px;
  z-index: 12;
  width: min(360px, calc(100vw - 32px));
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(20, 22, 25, 0.78);
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  padding: 12px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.popover.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

.popover h3 { margin: 0 0 8px; font-size: 13px; color: rgba(233,237,243,0.86); }

.item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
}

.title { font-size: 13px; color: rgba(233,237,243,0.92); font-weight: 650; }
.muted, .meta { color: rgba(233,237,243,0.65); font-size: 12px; }

.divider { height: 1px; background: rgba(255,255,255,0.08); margin: 12px 0; }

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(233, 237, 243, 0.90);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }

.content { padding: 92px 18px 22px; max-width: 1100px; margin: 0 auto; }

/* Smooth app entrance (after login redirect) */
body.is-app .header,
body.is-app .content {
  transition: opacity 520ms ease, transform 520ms ease;
}

body.is-app:not(.loaded) .header {
  opacity: 0;
  transform: translateY(-8px);
}

body.is-app:not(.loaded) .content {
  opacity: 0;
  transform: translateY(12px) scale(0.992);
}

body.is-app.loaded .header,
body.is-app.loaded .content {
  opacity: 1;
  transform: none;
}
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }

.panel {
  background: linear-gradient(180deg, var(--surface-1), var(--surface-0));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(var(--blur));
  padding: 16px;
}
.panel h2 { margin: 0 0 6px; font-size: 18px; font-weight: 650; }

.stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.value { font-size: 22px; font-weight: 800; letter-spacing: 0.2px; margin-top: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  color: rgba(233, 237, 243, 0.86);
  background: rgba(111, 135, 166, 0.12);
  border: 1px solid rgba(142, 162, 189, 0.20);
  font-size: 12px;
}

.stack { display: grid; gap: 10px; }

.spark {
  margin-top: 12px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.spark svg { width: 100%; height: 44px; display: block; }

.table { width: 100%; border-collapse: collapse; margin-top: 10px; overflow: hidden; border-radius: var(--radius); }
.table th, .table td { text-align: left; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.07); color: rgba(233,237,243,0.86); font-size: 13px; }
.table th { color: rgba(233,237,243,0.70); font-weight: 650; }
.table tr:hover td { background: rgba(255,255,255,0.04); }

.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; font-size: 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); }
.status.ok { border-color: rgba(142,162,189,0.26); background: rgba(142,162,189,0.12); }
.status.important { border-color: rgba(255, 209, 102, 0.22); background: rgba(255, 209, 102, 0.09); }

/* skeleton */
.skel .sk { border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06); height: 12px; overflow: hidden; position: relative; }
.skel .sk::after { content:""; position:absolute; inset:-2px; background: linear-gradient(90deg, transparent, rgba(184,204,230,0.10), transparent); transform: translateX(-30%); animation: shimmer 1.1s infinite; }
@keyframes shimmer { 0%{ transform: translateX(-40%);} 100%{ transform: translateX(120%);} }
.skel .sk.h { height: 18px; width: 52%; }
.skel .sk.m { height: 12px; width: 72%; }
.skel .sk.l { height: 12px; width: 90%; }

/* transition layer */
.transition {
  position: fixed; inset: 0; z-index: 15; pointer-events: none;
  opacity: 0; backdrop-filter: blur(0px);
  background: radial-gradient(800px 420px at 50% 50%, rgba(184, 204, 230, 0.10), transparent 60%), rgba(10, 12, 14, 0.0);
  transition: opacity 520ms ease, backdrop-filter 520ms ease;
}
.transition.on {
  opacity: 1; backdrop-filter: blur(12px);
  background: radial-gradient(800px 420px at 50% 50%, rgba(184, 204, 230, 0.12), transparent 60%), rgba(10, 12, 14, 0.22);
}

/* --- Chat --- */
.chat-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 21;
  width: 56px; height: 56px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(184, 204, 230, 0.20), rgba(111, 135, 166, 0.10));
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 22px 60px rgba(0,0,0,0.45);
  cursor: pointer;
  display: grid; place-items: center;
  color: rgba(233,237,243,0.92);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.chat-fab:hover { transform: translateY(-2px); filter: brightness(1.05); }
.chat-fab i { font-size: 24px; }

.fab-badge {
  position: absolute; top: 9px; right: 9px;
  min-width: 16px; height: 16px; border-radius: 999px;
  background: rgba(184,204,230,0.95); color: #0f1114;
  font-size: 11px; font-weight: 800;
  display: none; place-items: center; padding: 0 5px;
  border: 1px solid rgba(0,0,0,0.25);
}
.chat-fab.has-unread .fab-badge { display: grid; }

.chat-panel {
  position: fixed; right: 18px; bottom: 90px; z-index: 21;
  width: min(420px, calc(100vw - 36px)); height: 520px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(20, 22, 25, 0.74);
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 26px 80px rgba(0,0,0,0.55);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.chat-panel.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-head { display:flex; align-items:center; justify-content: space-between; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.10); }
.chat-title { display:flex; align-items:center; gap: 10px; }
.chat-title .bot { width: 34px; height: 34px; border-radius: 12px; display:grid; place-items:center; background: rgba(184,204,230,0.12); border: 1px solid rgba(184,204,230,0.18); }
.chat-title .name { font-weight: 800; font-size: 13px; }
.chat-title .state { font-size: 12px; color: rgba(233,237,243,0.65); margin-top: 1px; }

.chat-actions { display:flex; gap: 8px; }
.chat-actions button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.05); color: rgba(233,237,243,0.90); cursor:pointer; transition: background 0.2s ease, transform 0.2s ease; }
.chat-actions button:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }

.chat-body { padding: 12px; overflow:auto; display:flex; flex-direction: column; gap: 10px; }

.bubble { max-width: 82%; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.06); color: rgba(233,237,243,0.92); font-size: 13px; line-height: 1.45; animation: bubbleIn 180ms ease-out; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: translateY(0);} }

.bubble.me { align-self:flex-end; background: rgba(184,204,230,0.14); border-color: rgba(184,204,230,0.20); }
.bubble.bot { align-self:flex-start; }

.bubble-row { display:flex; gap: 10px; align-items: flex-start; }
.bubble-ico { width: 18px; display:grid; place-items:center; margin-top: 1px; opacity: 0.85; }
.bubble-msg { flex: 1; white-space: pre-wrap; }
.bubble-time { display:block; margin-top: 6px; font-size: 11px; color: rgba(233,237,243,0.62); }

.typing { display:inline-flex; gap: 6px; align-items:center; }
.typing .dot { width:7px; height:7px; border-radius: 50%; background: rgba(233,237,243,0.55); animation: blink 1.05s infinite ease-in-out; }
.typing .dot:nth-child(2) { animation-delay: 0.15s; }
.typing .dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes blink { 0%,100% { opacity: 0.25; transform: translateY(0);} 50%{ opacity: 0.95; transform: translateY(-2px);} }

.chat-foot { padding: 10px; border-top: 1px solid rgba(255,255,255,0.10); display:grid; grid-template-rows: auto auto; gap: 10px; }
.quick { display:flex; flex-wrap: wrap; gap: 8px; }
.quick button { border-radius: 999px; border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.05); color: rgba(233,237,243,0.86); padding: 8px 10px; font-size: 12px; cursor:pointer; transition: background 0.2s ease, transform 0.2s ease; }
.quick button:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }

.chat-send-row { display:grid; grid-template-columns: 1fr auto; gap: 10px; }
.chat-input { border-radius: 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); color: rgba(233,237,243,0.92); padding: 12px; outline:none; font-size: 13px; }
.chat-input:focus { border-color: rgba(184,204,230,0.30); box-shadow: 0 0 0 3px rgba(142,162,189,0.35); }
.chat-send { border-radius: 12px; border: 1px solid rgba(184,204,230,0.28); background: rgba(184,204,230,0.18); color: rgba(233,237,243,0.92); cursor:pointer; padding: 0 14px; transition: transform 0.2s ease, background 0.2s ease; }
.chat-send:hover { transform: translateY(-1px); background: rgba(184,204,230,0.22); }

@media (max-width: 720px) {
  .menu-item span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
