:root {
  color-scheme: dark;
  --bg: #090d0d;
  --panel: #101717;
  --panel-raised: #151e1d;
  --line: #2a3936;
  --line-soft: rgba(147, 179, 169, 0.14);
  --text: #edf4f1;
  --muted: #91a19c;
  --muted-strong: #b7c3bf;
  --accent: #65dfc7;
  --accent-soft: #a8f0df;
  --accent-bg: rgba(101, 223, 199, 0.1);
  --danger: #ff9e98;
  --success: #86dfad;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

button { color: inherit; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(430px, 0.92fr) minmax(500px, 1.08fr);
  overflow: hidden;
}

.brand-panel {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: clamp(30px, 4vw, 62px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(101, 223, 199, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 223, 199, 0.035) 1px, transparent 1px),
    #0c1212;
  background-size: 44px 44px;
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.brand-panel::before {
  width: 430px;
  height: 430px;
  right: -180px;
  top: 28%;
  background: radial-gradient(circle, rgba(101, 223, 199, 0.12), transparent 68%);
}

.brand-panel::after {
  width: 260px;
  height: 260px;
  left: -110px;
  bottom: -70px;
  background: radial-gradient(circle, rgba(101, 223, 199, 0.08), transparent 70%);
}

.brand-top,
.brand,
.mobile-brand {
  display: flex;
  align-items: center;
}

.brand-top { justify-content: space-between; }

.brand {
  gap: 13px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid rgba(101, 223, 199, 0.35);
  border-radius: 12px;
  background: rgba(101, 223, 199, 0.06);
}

.brand-mark svg,
.agent-core svg {
  width: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark svg path,
.agent-core svg path {
  stroke-dasharray: 18 5;
  animation: mark-trace 4.8s ease-in-out infinite;
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-mark.small svg { width: 22px; }

.brand-copy {
  display: grid;
  line-height: 1;
  letter-spacing: 0.12em;
}

.brand-copy strong { font-size: 18px; }
.brand-copy span { margin-top: 6px; color: var(--accent); font-size: 10px; letter-spacing: 0.32em; }

.preview-badge {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(10, 15, 15, 0.48);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-message {
  width: min(490px, 100%);
  margin-top: clamp(74px, 13vh, 150px);
  animation: rise-in 720ms 80ms cubic-bezier(.2,.8,.2,1) backwards;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand-message h1 {
  max-width: 470px;
  margin: 0;
  font-size: clamp(42px, 5.3vw, 74px);
  font-weight: 630;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.brand-description {
  max-width: 470px;
  margin: 26px 0 0;
  color: var(--muted-strong);
  font-size: 16px;
  line-height: 1.7;
}

.agent-visual {
  position: absolute;
  right: clamp(-96px, -6vw, -40px);
  bottom: clamp(105px, 16vh, 180px);
  width: clamp(250px, 27vw, 390px);
  aspect-ratio: 1;
  opacity: 0.68;
  animation: hover-field 6s ease-in-out infinite;
}

.orbit,
.scan-line,
.agent-core,
.signal { position: absolute; border-radius: 50%; }

.orbit {
  inset: 50%;
  translate: -50% -50%;
  border: 1px solid rgba(101, 223, 199, 0.18);
}

.orbit-large { width: 100%; height: 100%; }
.orbit-medium { width: 68%; height: 68%; }
.orbit-small { width: 35%; height: 35%; border-color: rgba(101, 223, 199, 0.3); }

.scan-line {
  inset: 0;
  background: conic-gradient(from 16deg, transparent 0 75%, rgba(101, 223, 199, 0.15) 92%, transparent 100%);
  animation: scan 8s linear infinite;
}

.agent-core {
  inset: 50%;
  translate: -50% -50%;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: var(--accent-soft);
  border: 1px solid rgba(101, 223, 199, 0.45);
  background: #101a18;
  box-shadow: 0 0 42px rgba(101, 223, 199, 0.17);
}

.signal {
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

.signal-one { left: 18%; top: 41%; }
.signal-two { right: 19%; top: 28%; animation: pulse 2.4s ease-in-out infinite; }
.signal-three { right: 32%; bottom: 12%; animation: pulse 2.4s 0.8s ease-in-out infinite; }

.connection-state {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(134, 223, 173, 0.09);
  animation: status-pulse 2.8s ease-in-out infinite;
}

.status-divider { width: 1px; height: 12px; margin: 0 4px; background: var(--line); }

.form-panel {
  --pointer-x: 70%;
  --pointer-y: 18%;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(circle at 77% 9%, rgba(101, 223, 199, 0.05), transparent 27%),
    var(--bg);
  overflow: hidden;
}

.form-panel::before,
.form-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.form-panel::before {
  inset: 0;
  background: radial-gradient(circle 240px at var(--pointer-x) var(--pointer-y), rgba(101, 223, 199, 0.095), transparent 70%);
  opacity: 0.9;
  transition: opacity 300ms ease;
}

.form-panel::after {
  right: -120px;
  bottom: -150px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(101, 223, 199, 0.055);
  filter: blur(2px);
  animation: ambient-drift 11s ease-in-out infinite alternate;
}

.mobile-brand { display: none; }

.login-card { width: min(440px, 100%); }

.login-heading {
  margin-bottom: 36px;
  animation: rise-in 620ms 70ms cubic-bezier(.2,.8,.2,1) backwards;
}

.login-heading h2 {
  margin: 0;
  font-size: clamp(32px, 3.5vw, 45px);
  font-weight: 630;
  letter-spacing: -0.04em;
}

.login-heading > p:last-child {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.field-group {
  margin-bottom: 21px;
  animation: rise-in 580ms cubic-bezier(.2,.8,.2,1) backwards;
}

.field-group:nth-child(1) { animation-delay: 150ms; }
.field-group:nth-child(2) { animation-delay: 230ms; }

.field-group label {
  display: inline-block;
  margin: 0 0 9px 2px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 600;
}

.input-wrap { position: relative; }

.input-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  scale: 0 1;
  opacity: 0;
  transition: scale 220ms ease, opacity 220ms ease;
  pointer-events: none;
}

.input-wrap:focus-within::after { scale: 1 1; opacity: 0.75; }

.input-wrap input {
  width: 100%;
  height: 58px;
  padding: 0 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: var(--panel);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-wrap input::placeholder { color: #687772; }

.input-wrap input:hover { border-color: #3b4e49; }

.input-wrap input:focus {
  border-color: var(--accent);
  background: var(--panel-raised);
  box-shadow: 0 0 0 4px rgba(101, 223, 199, 0.09);
}

.input-wrap.is-invalid input {
  border-color: rgba(255, 158, 152, 0.68);
  box-shadow: 0 0 0 4px rgba(255, 158, 152, 0.07);
}

.input-wrap.is-invalid { animation: field-shake 300ms ease; }

.field-icon {
  position: absolute;
  z-index: 1;
  left: 18px;
  top: 50%;
  translate: 0 -50%;
  width: 19px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: color 180ms ease, scale 180ms ease;
}

.input-wrap:focus-within .field-icon { color: var(--accent); scale: 1.08; }

.password-toggle {
  position: absolute;
  right: 9px;
  top: 50%;
  translate: 0 -50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.password-toggle:hover,
.password-toggle:focus-visible { color: var(--text); background: rgba(255,255,255,0.04); outline: none; }

.password-toggle svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.clear-input {
  position: absolute;
  right: 9px;
  top: 50%;
  translate: 0 -50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  opacity: 0;
  scale: 0.75;
  pointer-events: none;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, opacity 150ms ease, scale 150ms ease;
}

.clear-input.is-visible { opacity: 1; scale: 1; pointer-events: auto; }
.clear-input:hover,
.clear-input:focus-visible { color: var(--text); background: rgba(255,255,255,0.04); outline: none; }
.clear-input svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.caps-warning {
  height: 0;
  margin: 0 2px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #e8c779;
  font-size: 12px;
  opacity: 0;
  translate: 0 -4px;
  transition: height 180ms ease, margin 180ms ease, opacity 180ms ease, translate 180ms ease;
}

.caps-warning.is-visible { height: 18px; margin-top: 7px; opacity: 1; translate: 0 0; }
.caps-warning svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.field-error {
  min-height: 17px;
  margin: 6px 2px 0;
  color: var(--danger);
  font-size: 12px;
}

.form-message {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0 solid transparent;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  transition: opacity 160ms ease, margin 160ms ease, padding 160ms ease;
}

.form-message.is-visible {
  min-height: 43px;
  margin: 0 0 16px;
  padding: 11px 13px;
  opacity: 1;
  animation: notice-in 300ms cubic-bezier(.2,.8,.2,1);
}

.form-message.is-success { color: var(--success); border-width: 1px; border-color: rgba(134, 223, 173, 0.2); background: rgba(134, 223, 173, 0.07); }
.form-message.is-error { color: var(--danger); border-width: 1px; border-color: rgba(255, 158, 152, 0.2); background: rgba(255, 158, 152, 0.07); }

.login-button {
  width: 100%;
  height: 58px;
  padding: 0 18px 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #74e5ce;
  border-radius: 12px;
  color: #07110f;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(101, 223, 199, 0.13);
  font-weight: 720;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: translate 150ms ease, background 150ms ease, box-shadow 150ms ease;
  animation: rise-in 580ms 310ms cubic-bezier(.2,.8,.2,1) backwards;
}

.login-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -80%;
  bottom: -80%;
  left: -40%;
  width: 22%;
  rotate: 18deg;
  background: rgba(255,255,255,0.34);
  filter: blur(8px);
  translate: -240% 0;
}

.login-button:hover { translate: 0 -1px; background: #75e7d0; box-shadow: 0 15px 34px rgba(101, 223, 199, 0.18); }
.login-button:hover::before { animation: button-sheen 700ms ease; }
.login-button:active { translate: 0 0; }
.login-button:focus-visible { outline: 3px solid rgba(101, 223, 199, 0.24); outline-offset: 3px; }
.login-button:disabled { cursor: wait; opacity: 0.78; translate: 0 0; }

.button-arrow {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate 150ms ease;
}

.login-button:hover .button-arrow { translate: 3px 0; }

.button-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(7, 17, 15, 0.28);
  border-top-color: #07110f;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.login-button.is-loading .button-loader { display: block; }
.login-button.is-loading .button-arrow { display: none; }

a.login-button { text-decoration: none; }

.setup-card { width: min(500px, 100%); }
.setup-shell .brand-message h1 { font-size: clamp(38px, 4.7vw, 66px); }
.setup-card .login-heading { margin-bottom: 24px; }
.setup-card .field-group { margin-bottom: 11px; }
.setup-card .field-error { min-height: 15px; margin-top: 4px; }
.setup-card .input-wrap input { height: 52px; }

.password-strength {
  margin: 8px 2px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.password-strength span {
  height: 3px;
  border-radius: 99px;
  background: var(--line);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.password-strength span.is-active { background: var(--accent); box-shadow: 0 0 10px rgba(101, 223, 199, 0.24); }

.setup-success { text-align: center; animation: rise-in 480ms cubic-bezier(.2,.8,.2,1); }
.success-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(134, 223, 173, 0.4);
  border-radius: 50%;
  color: var(--success);
  background: rgba(134, 223, 173, 0.09);
  box-shadow: 0 0 30px rgba(134, 223, 173, 0.12);
  font-size: 25px;
}
.setup-success h3 { margin: 0; font-size: 27px; }
.setup-success p { margin: 12px 0 24px; color: var(--muted); line-height: 1.6; }

.dashboard-body { min-height: 100vh; background: #0b1010; }
.dashboard-shell { min-height: 100vh; padding: clamp(22px, 4vw, 58px); background: linear-gradient(rgba(101,223,199,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(101,223,199,.025) 1px, transparent 1px); background-size: 44px 44px; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; }
.secondary-button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted-strong); background: var(--panel); cursor: pointer; }
.secondary-button:hover { border-color: var(--accent); color: var(--text); }
.welcome-panel { width: min(760px, 100%); margin: clamp(90px, 18vh, 180px) auto 0; padding: clamp(28px, 5vw, 58px); border: 1px solid var(--line); border-radius: 18px; background: rgba(16,23,23,.88); box-shadow: var(--shadow); animation: rise-in 650ms cubic-bezier(.2,.8,.2,1); }
.welcome-panel h1 { margin: 0; font-size: clamp(38px, 6vw, 72px); letter-spacing: -.05em; }
.welcome-panel > p:not(.eyebrow) { max-width: 610px; margin: 20px 0 28px; color: var(--muted-strong); line-height: 1.7; }
.role-chip { width: fit-content; padding: 10px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent-soft); background: var(--accent-bg); font-size: 13px; }

.access-note {
  margin-top: 26px;
  padding: 16px 17px;
  display: flex;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(21, 30, 29, 0.52);
  animation: rise-in 580ms 390ms cubic-bezier(.2,.8,.2,1) backwards;
}

.access-note svg {
  flex: 0 0 auto;
  width: 18px;
  margin-top: 1px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.access-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.form-footer {
  position: absolute;
  right: clamp(28px, 5vw, 76px);
  bottom: 27px;
  left: auto;
  width: min(440px, calc(100% - 56px));
  display: flex;
  justify-content: space-between;
  color: #687772;
  font-size: 11px;
}

/* Geschuetzter Anwendungsbereich */
.app-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% -8%, rgba(101, 223, 199, 0.09), transparent 30rem),
    linear-gradient(rgba(101, 223, 199, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 223, 199, 0.022) 1px, transparent 1px),
    #090e0e;
  background-size: auto, 44px 44px, 44px 44px;
}

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 82px;
  padding: 0 clamp(22px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 14, 14, 0.89);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(18px);
}

.app-actions { display: flex; align-items: center; gap: 11px; }

.admin-button,
.world-switch,
.app-footer a {
  text-decoration: none;
}

.admin-button {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(101, 223, 199, 0.32);
  border-radius: 11px;
  color: var(--accent-soft);
  background: rgba(101, 223, 199, 0.075);
  font-size: 13px;
  font-weight: 650;
  transition: border-color 160ms ease, background 160ms ease, translate 160ms ease;
}

.admin-button:hover,
.admin-button:focus-visible {
  border-color: var(--accent);
  background: rgba(101, 223, 199, 0.12);
  outline: none;
  translate: 0 -1px;
}

.account-chip {
  min-height: 46px;
  padding: 5px 12px 5px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(16, 23, 23, 0.76);
}

.account-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(101, 223, 199, 0.22);
  border-radius: 9px;
  color: var(--accent-soft);
  background: rgba(101, 223, 199, 0.09);
  font-size: 12px;
  font-weight: 700;
}

.account-chip > span:last-child { display: grid; line-height: 1.15; }
.account-chip strong { max-width: 160px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-chip small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted-strong);
  background: var(--panel);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.icon-button:hover,
.icon-button:focus-visible { color: var(--danger); border-color: rgba(255, 158, 152, 0.4); background: rgba(255, 158, 152, 0.06); outline: none; }
.icon-button svg,
.refresh-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-content {
  width: min(1240px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 86px) 0 70px;
  flex: 1;
}

.page-heading {
  margin-bottom: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  animation: rise-in 540ms cubic-bezier(.2,.8,.2,1) backwards;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 620;
  letter-spacing: -0.048em;
  line-height: 1.04;
}

.page-heading > div > p:last-child { max-width: 710px; margin: 15px 0 0; color: var(--muted-strong); line-height: 1.65; }

.refresh-button { min-height: 43px; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.refresh-button:active svg { animation: spin 450ms linear; }

.world-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.world-card {
  --card-accent: var(--accent);
  position: relative;
  min-height: 286px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(23, 34, 32, 0.94), rgba(14, 21, 20, 0.96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.13);
  text-decoration: none;
  overflow: hidden;
  animation: rise-in 540ms calc(80ms + var(--card-delay)) cubic-bezier(.2,.8,.2,1) backwards;
  transition: border-color 180ms ease, translate 180ms ease, box-shadow 180ms ease;
}

.world-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent), transparent);
  opacity: 0.6;
}

.world-card::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -110px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(101, 223, 199, 0.1), transparent 69%);
  transition: scale 220ms ease, opacity 220ms ease;
}

.world-card:hover,
.world-card:focus-visible { border-color: rgba(101, 223, 199, 0.48); translate: 0 -4px; box-shadow: 0 24px 62px rgba(0, 0, 0, 0.24); outline: none; }
.world-card:hover::after { scale: 1.18; opacity: 0.8; }
.world-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.world-monogram {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(101, 223, 199, 0.28);
  border-radius: 12px;
  color: var(--accent-soft);
  background: rgba(101, 223, 199, 0.08);
  font-size: 13px;
  font-weight: 730;
  letter-spacing: 0.05em;
}

.agent-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.agent-state i { width: 7px; height: 7px; border-radius: 50%; background: #70807b; }
.agent-state.online { color: var(--success); }
.agent-state.online i { background: var(--success); box-shadow: 0 0 0 4px rgba(134, 223, 173, 0.08), 0 0 13px rgba(134, 223, 173, 0.2); }
.agent-state.offline i { background: #7f8c88; }

.world-card-copy { margin: auto 0; }
.world-server { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.world-card-copy h2 { margin: 9px 0 7px; font-size: 27px; letter-spacing: -0.035em; }
.world-card-copy p { margin: 0; color: var(--muted-strong); font-size: 13px; }
.world-card-footer { padding-top: 17px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.world-card-footer span:last-child { color: var(--accent-soft); }
.world-card-footer b { display: inline-block; margin-left: 4px; transition: translate 160ms ease; }
.world-card:hover .world-card-footer b { translate: 4px 0; }

.empty-worlds {
  min-height: 410px;
  padding: 46px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
  background: rgba(16, 23, 23, 0.72);
  box-shadow: var(--shadow);
  animation: rise-in 560ms 80ms cubic-bezier(.2,.8,.2,1) backwards;
}

.empty-worlds h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.04em; }
.empty-worlds > p:not(.eyebrow) { max-width: 590px; margin: 15px 0 0; color: var(--muted-strong); line-height: 1.7; }
.empty-actions { margin-top: 27px; display: flex; align-items: center; gap: 12px; }
.login-button.compact { width: auto; min-width: 166px; height: 46px; }

.empty-orbit { position: relative; width: 92px; height: 92px; margin-bottom: 27px; border: 1px solid rgba(101, 223, 199, 0.18); border-radius: 50%; }
.empty-orbit span { position: absolute; inset: 15px; border: 1px solid rgba(101, 223, 199, 0.2); border-radius: 50%; }
.empty-orbit span + span { inset: 34px; border-color: rgba(101, 223, 199, 0.42); background: rgba(101, 223, 199, 0.07); }
.empty-orbit i { position: absolute; width: 7px; height: 7px; top: 9px; left: 42px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); transform-origin: 3px 36px; animation: scan 5s linear infinite; }

.app-footer {
  min-height: 52px;
  padding: 0 clamp(22px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(12, 18, 18, 0.92);
  font-size: 11px;
}
.app-footer > span { display: flex; align-items: center; gap: 9px; }
.app-footer a { color: var(--accent-soft); }

.board-heading { align-items: center; }
.board-heading .agent-state { padding: 12px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); white-space: nowrap; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.module-card {
  position: relative;
  min-height: 245px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--text);
  background: rgba(17, 25, 24, 0.9);
  text-decoration: none;
  transition: border-color 180ms ease, translate 180ms ease, background 180ms ease;
}
.module-card:hover,
.module-card:focus-visible { border-color: rgba(101, 223, 199, 0.42); background: rgba(21, 31, 29, 0.96); translate: 0 -3px; outline: none; }
.module-card.featured { background: linear-gradient(145deg, rgba(101, 223, 199, 0.11), rgba(17, 25, 24, 0.92)); }
.module-icon { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid rgba(101, 223, 199, 0.25); border-radius: 11px; color: var(--accent); background: rgba(101, 223, 199, 0.07); font-size: 20px; }
.module-status { position: absolute; top: 25px; right: 25px; padding: 5px 8px; border-radius: 7px; color: var(--success); background: rgba(134, 223, 173, 0.08); font-size: 10px; }
.module-status.muted { color: var(--muted); background: rgba(255,255,255,0.035); }
.module-card h2 { margin: 24px 0 8px; font-size: 22px; letter-spacing: -0.025em; }
.module-card p { max-width: 510px; margin: 0; color: var(--muted); line-height: 1.6; }
.module-link { margin-top: auto; padding-top: 23px; color: var(--accent-soft); font-size: 12px; }

.admin-body { background-color: #090d0e; }
.admin-header .brand-copy span { color: #99b8ff; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.admin-stats article { padding: 23px; display: grid; border: 1px solid var(--line); border-radius: 15px; background: rgba(17, 25, 24, 0.88); }
.admin-stats span { color: var(--muted); font-size: 12px; }
.admin-stats strong { margin: 12px 0 7px; font-size: 34px; font-weight: 620; letter-spacing: -0.04em; }
.admin-stats small { color: var(--muted); }
.admin-stats .status-word { color: var(--success); font-size: 27px; }
.admin-menu { display: grid; border: 1px solid var(--line); border-radius: 17px; background: rgba(17, 25, 24, 0.88); overflow: hidden; }
.admin-menu > a { min-height: 104px; padding: 20px 23px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; color: var(--text); text-decoration: none; transition: background 160ms ease; }
.admin-menu > a + a { border-top: 1px solid var(--line); }
.admin-menu > a:hover,
.admin-menu > a:focus-visible { background: rgba(101, 223, 199, 0.055); outline: none; }
.admin-menu h2 { margin: 0 0 6px; font-size: 17px; }
.admin-menu p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-menu b { color: var(--accent); font-size: 18px; transition: translate 160ms ease; }
.admin-menu a:hover b { translate: 4px 0; }

@media (max-width: 900px) {
  .world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-header { padding-block: 14px; align-items: flex-start; }
  .app-actions { flex-wrap: wrap; justify-content: flex-end; }
  .admin-stats { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .app-header { position: relative; align-items: center; }
  .app-header .brand-copy { display: none; }
  .app-actions { gap: 7px; }
  .account-chip { display: none; }
  .admin-button { padding-inline: 11px; }
  .world-switch { padding-inline: 11px; font-size: 12px; }
  .app-content { width: min(100% - 28px, 1240px); padding-top: 38px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .page-heading h1 { font-size: 37px; }
  .world-grid,
  .module-grid { grid-template-columns: 1fr; }
  .world-card { min-height: 255px; }
  .empty-actions { flex-direction: column; width: min(100%, 270px); }
  .empty-actions > * { width: 100% !important; }
  .app-footer { padding-block: 14px; align-items: flex-start; flex-direction: column; gap: 8px; }
}

@keyframes scan { to { rotate: 360deg; } }
@keyframes pulse { 50% { opacity: 0.25; scale: 0.75; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes rise-in { from { opacity: 0; translate: 0 18px; filter: blur(4px); } }
@keyframes notice-in { from { opacity: 0; translate: 0 -6px; scale: 0.98; } }
@keyframes field-shake { 25% { translate: -4px 0; } 50% { translate: 4px 0; } 75% { translate: -2px 0; } }
@keyframes status-pulse { 50% { box-shadow: 0 0 0 7px rgba(134, 223, 173, 0.04), 0 0 16px rgba(134, 223, 173, 0.2); } }
@keyframes hover-field { 50% { translate: 0 -9px; } }
@keyframes ambient-drift { to { translate: -90px -70px; scale: 1.22; opacity: 0.55; } }
@keyframes button-sheen { to { translate: 800% 0; } }
@keyframes mark-trace { 0%, 100% { stroke-dashoffset: 0; } 50% { stroke-dashoffset: 23; } }

@media (max-width: 920px) {
  .login-shell { display: block; }
  .brand-panel { display: none; }
  .form-panel { min-height: 100svh; padding: 28px 24px 82px; justify-content: flex-start; }
  .mobile-brand {
    display: flex;
    width: min(440px, 100%);
    margin-bottom: auto;
    gap: 10px;
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0.08em;
  }
  .mobile-brand strong { margin-right: 3px; }
  .mobile-brand .preview-badge { margin-left: auto; }
  .login-card { margin: 55px 0 auto; }
  .form-footer {
    position: static;
    width: min(440px, 100%);
    margin-top: 34px;
  }
}

@media (max-width: 520px) {
  .form-panel { padding-inline: 18px; }
  .login-card { margin-top: 40px; }
  .login-heading { margin-bottom: 30px; }
  .form-footer { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Admin: Welten und Mitglieder */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.admin-worlds-content { width: min(1440px, calc(100% - 44px)); padding-top: 26px; }
.admin-tabs { margin-bottom: 42px; display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.admin-tabs a { position: relative; padding: 14px 17px 16px; color: var(--muted); font-size: 13px; font-weight: 650; text-decoration: none; }
.admin-tabs a:hover { color: var(--text); }
.admin-tabs a.is-active { color: var(--accent-soft); }
.admin-tabs a.is-active::after { content: ""; position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; border-radius: 9px 9px 0 0; background: var(--accent); }
.worlds-heading { margin-bottom: 27px; }
.add-member-button { flex: 0 0 auto; min-width: 190px; }

.world-admin-toolbar {
  padding: 17px;
  display: grid;
  grid-template-columns: minmax(210px, .7fr) minmax(280px, 1.4fr) auto;
  align-items: end;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  background: rgba(17, 25, 24, 0.93);
}
.select-field { display: grid; gap: 7px; }
.select-field > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.select-field select,
.admin-search input,
.dialog-field input,
.invite-link input {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--text); background: #0d1414;
}
.select-field select:focus,
.admin-search input:focus,
.dialog-field input:focus,
.invite-link input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(101, 223, 199, .08); }
.admin-search { position: relative; }
.admin-search svg { position: absolute; left: 15px; top: 50%; width: 18px; translate: 0 -50%; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.admin-search input { padding-left: 45px; }
.world-admin-toolbar .refresh-button { height: 46px; }
.source-note { min-height: 43px; padding: 0 18px; display: flex; align-items: center; gap: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 0 0 13px 13px; color: var(--muted-strong); background: rgba(11, 18, 17, .86); font-size: 11px; }
.source-note small { margin-left: auto; color: var(--muted); }
.source-note.is-stale .status-dot { background: #e2bd70; }

.world-admin-layout { margin-top: 18px; display: grid; grid-template-columns: minmax(330px, .78fr) minmax(560px, 1.72fr); gap: 18px; align-items: start; }
.official-worlds-panel,
.world-members-panel { border: 1px solid var(--line); border-radius: 17px; background: rgba(17, 25, 24, .9); overflow: hidden; }
.official-worlds-panel { position: sticky; top: 100px; }
.official-worlds-panel > header { min-height: 88px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.official-worlds-panel h2,
.selected-world-header h2,
.world-unselected h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.official-worlds-panel .eyebrow,
.selected-world-header .eyebrow { margin-bottom: 5px; font-size: 10px; }
.count-chip { min-width: 34px; height: 30px; padding: 0 10px; display: grid; place-items: center; border-radius: 9px; color: var(--accent-soft); background: rgba(101,223,199,.08); font-size: 12px; font-weight: 700; }
.world-list { max-height: min(600px, calc(100vh - 300px)); overflow-y: auto; scrollbar-color: #344943 transparent; }
.official-world { width: 100%; min-height: 78px; padding: 13px 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; border: 0; border-bottom: 1px solid var(--line-soft); color: var(--text); background: transparent; text-align: left; cursor: pointer; transition: background 140ms ease, box-shadow 140ms ease; }
.official-world:hover { background: rgba(101,223,199,.04); }
.official-world.is-selected { background: rgba(101,223,199,.085); box-shadow: inset 3px 0 var(--accent); }
.world-code-badge { min-width: 57px; height: 37px; padding: 0 8px; display: grid; place-items: center; border: 1px solid rgba(101,223,199,.2); border-radius: 9px; color: var(--accent-soft); background: rgba(101,223,199,.06); font-size: 10px; font-weight: 730; }
.official-world > span:nth-child(2) { display: grid; gap: 5px; }
.official-world strong { font-size: 13px; }
.official-world small { color: var(--muted); font-size: 10px; }
.world-assignees { min-width: 55px; display: grid; gap: 3px; color: var(--muted-strong); font-size: 12px; text-align: right; }
.world-assignees small { font-size: 9px; }
.panel-loading,
.list-empty,
.list-error { min-height: 190px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); text-align: center; font-size: 12px; }
.panel-loading i { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 700ms linear infinite; }
.list-error strong { color: var(--danger); font-size: 14px; }

.world-members-panel { min-height: 430px; }
.world-unselected { min-height: 430px; padding: 35px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.world-unselected p { max-width: 430px; margin: 11px 0 0; color: var(--muted); line-height: 1.6; }
.empty-orbit.mini { width: 72px; height: 72px; margin-bottom: 20px; }
.empty-orbit.mini span { inset: 12px; }
.empty-orbit.mini span + span { inset: 27px; }
.empty-orbit.mini i { top: 6px; left: 32px; transform-origin: 3px 29px; }
.selected-world-header { min-height: 120px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, rgba(101,223,199,.07), transparent 60%); }
.selected-world-header > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.assignment-summary { padding: 8px 11px; border: 1px solid rgba(101,223,199,.2); border-radius: 999px; color: var(--accent-soft); background: rgba(101,223,199,.06); font-size: 10px; white-space: nowrap; }
.member-list-header { min-height: 44px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); background: rgba(255,255,255,.015); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.member-list { display: grid; }
.world-member { min-height: 94px; padding: 15px 20px; display: grid; grid-template-columns: auto minmax(140px, 1fr) minmax(190px, auto) minmax(145px, auto); align-items: center; gap: 13px; border-top: 1px solid var(--line-soft); }
.world-member.is-blocked { opacity: .66; }
.member-avatar { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(101,223,199,.2); border-radius: 11px; color: var(--accent-soft); background: rgba(101,223,199,.07); font-size: 11px; font-weight: 720; }
.member-copy { display: grid; gap: 6px; }
.member-copy strong { font-size: 13px; }
.member-state { width: fit-content; padding: 3px 6px; border-radius: 5px; color: var(--success); background: rgba(134,223,173,.07); font-size: 9px; }
.member-state.pending { color: #e5c16e; background: rgba(229,193,110,.08); }
.member-state.blocked { color: var(--danger); background: rgba(255,158,152,.07); }
.access-switch { min-width: 175px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; cursor: pointer; }
.access-switch input { position: absolute; opacity: 0; pointer-events: none; }
.access-switch > span { grid-row: 1 / span 2; position: relative; width: 38px; height: 22px; border: 1px solid var(--line); border-radius: 999px; background: #0c1313; transition: background 160ms ease, border-color 160ms ease; }
.access-switch > span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #71807c; transition: translate 160ms ease, background 160ms ease; }
.access-switch input:checked + span { border-color: rgba(101,223,199,.42); background: rgba(101,223,199,.15); }
.access-switch input:checked + span::after { translate: 16px 0; background: var(--accent); }
.access-switch input:focus-visible + span { outline: 3px solid rgba(101,223,199,.12); outline-offset: 2px; }
.access-switch b { font-size: 11px; font-weight: 600; }
.member-actions { display: flex; justify-content: flex-end; gap: 5px; }
.text-action { padding: 7px 8px; border: 0; border-radius: 7px; color: var(--muted-strong); background: transparent; font-size: 10px; cursor: pointer; }
.text-action:hover { color: var(--text); background: rgba(255,255,255,.035); }
.text-action.danger:hover { color: var(--danger); background: rgba(255,158,152,.06); }
.text-action:disabled { opacity: .25; cursor: not-allowed; }

.admin-dialog { width: min(510px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: #111918; box-shadow: 0 30px 100px rgba(0,0,0,.58); }
.admin-dialog::backdrop { background: rgba(2,6,6,.78); backdrop-filter: blur(5px); }
.admin-dialog form,
.admin-dialog > section { position: relative; padding: 31px; }
.admin-dialog h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.admin-dialog h2 + p { margin: 12px 0 24px; color: var(--muted); line-height: 1.6; }
.dialog-close { position: absolute; top: 16px; right: 16px; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: transparent; font-size: 21px; cursor: pointer; }
.dialog-field,
.invite-link { display: grid; gap: 8px; }
.dialog-field span,
.invite-link span { color: var(--muted-strong); font-size: 11px; font-weight: 650; }
.dialog-error { min-height: 19px; margin: 7px 0; color: var(--danger); font-size: 11px; }
.invite-result { text-align: center; }
.invite-result .success-mark { margin-bottom: 17px; }
.invite-result .invite-link { margin: 23px 0 12px; text-align: left; }
.invite-result .secondary-button { width: 100%; margin-top: 9px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.danger-button { min-height: 42px; padding: 0 16px; border: 1px solid rgba(255,158,152,.35); border-radius: 10px; color: #ffd0cc; background: rgba(255,158,152,.1); font-weight: 650; cursor: pointer; }
.danger-button:hover { border-color: var(--danger); background: rgba(255,158,152,.15); }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: min(410px, calc(100% - 48px)); padding: 13px 16px; border: 1px solid rgba(134,223,173,.24); border-radius: 11px; color: var(--success); background: #121d19; box-shadow: 0 16px 50px rgba(0,0,0,.35); font-size: 12px; opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity 170ms ease, translate 170ms ease; }
.toast.is-visible { opacity: 1; translate: 0 0; }
.toast.is-error { color: var(--danger); border-color: rgba(255,158,152,.24); background: #211716; }

@media (max-width: 1100px) {
  .world-admin-layout { grid-template-columns: minmax(280px, .75fr) minmax(450px, 1.25fr); }
  .world-member { grid-template-columns: auto 1fr auto; }
  .member-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 820px) {
  .world-admin-toolbar { grid-template-columns: 1fr 1fr; }
  .world-admin-toolbar .refresh-button { grid-column: 1 / -1; justify-content: center; }
  .world-admin-layout { grid-template-columns: 1fr; }
  .official-worlds-panel { position: static; }
  .world-list { max-height: 340px; }
}

@media (max-width: 560px) {
  .admin-worlds-content { width: calc(100% - 28px); }
  .admin-tabs { margin-bottom: 30px; }
  .worlds-heading .add-member-button { width: 100%; }
  .world-admin-toolbar { grid-template-columns: 1fr; }
  .world-admin-toolbar .refresh-button { grid-column: auto; }
  .source-note { padding-block: 10px; align-items: flex-start; flex-wrap: wrap; }
  .source-note small { width: 100%; margin-left: 17px; }
  .selected-world-header { align-items: flex-start; flex-direction: column; }
  .member-list-header { display: none; }
  .world-member { padding: 17px; grid-template-columns: auto 1fr; }
  .access-switch,
  .member-actions { grid-column: 1 / -1; }
  .member-actions { padding-left: 0; }
  .admin-dialog form,
  .admin-dialog > section { padding: 26px 21px; }
}

/* Weltarbeitsbereich: bewusst kompakt und werkzeugartig */
.world-body { overflow-x: hidden; background: #0b100f; }
.world-app-header { min-height: 70px; background: #0b1110; box-shadow: none; }
.plain-header-link { min-height: 36px; padding: 0 11px; display: inline-flex; align-items: center; border-radius: 6px; color: var(--muted-strong); font-size: 12px; font-weight: 600; text-decoration: none; }
.plain-header-link:hover,
.plain-header-link:focus-visible { color: var(--text); background: rgba(255,255,255,.035); outline: none; }
.admin-link-quiet { color: var(--accent-soft); }
.compact-account { min-height: 40px; padding-block: 3px; border-radius: 8px; background: transparent; }
.compact-account .account-avatar { width: 30px; height: 30px; border-radius: 7px; }
.world-app-header .icon-button { width: 38px; height: 38px; border-radius: 8px; background: transparent; }

.world-workspace { min-width: 0; min-height: calc(100vh - 70px); display: grid; grid-template-columns: 250px minmax(0, 1fr); flex: 1; }
.world-sidebar { position: sticky; top: 70px; height: calc(100vh - 70px); padding: 24px 15px 18px; display: flex; flex-direction: column; border-right: 1px solid #24312e; background: #0d1413; }
.world-identity { min-height: 61px; padding: 7px 8px 18px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #23302d; }
.world-identity-code { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid #31443f; border-radius: 7px; color: #a8d8ce; background: #14201e; font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.world-identity > div { min-width: 0; display: grid; gap: 5px; }
.world-identity strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.world-identity small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.world-navigation { margin-top: 17px; display: grid; gap: 2px; }
.world-navigation > p { margin: 17px 10px 6px; color: #65736f; font-size: 9px; font-weight: 720; letter-spacing: .11em; text-transform: uppercase; }
.world-navigation > p:first-child { margin-top: 0; }
.world-navigation a { min-height: 39px; padding: 0 10px; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 9px; border-radius: 6px; color: #a9b6b2; font-size: 11px; font-weight: 600; text-decoration: none; }
.world-navigation a:hover { color: var(--text); background: rgba(255,255,255,.025); }
.world-navigation a.is-active { color: var(--text); background: #182320; box-shadow: inset 2px 0 #65dfc7; }
.world-navigation a.is-muted { color: #6f7c78; }
.world-navigation svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.world-navigation i { padding: 2px 5px; border-radius: 4px; color: #89caba; background: rgba(101,223,199,.055); font-size: 8px; font-style: normal; font-weight: 600; }
.world-navigation a.is-muted i { color: #7a8783; background: rgba(255,255,255,.025); }
.nav-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #65736f; }
.nav-status-dot.online { background: var(--success); }
.sidebar-meta { margin-top: auto; padding: 16px 9px 0; display: grid; gap: 6px; border-top: 1px solid #23302d; }
.sidebar-meta span { color: var(--muted-strong); font-size: 10px; font-weight: 650; }
.sidebar-meta small { color: #687672; font-size: 9px; line-height: 1.5; }

.world-main { min-width: 0; width: min(1120px, calc(100% - 64px)); margin: 0 auto; padding: 38px 0 70px; }
.world-context-header { min-height: 91px; margin-bottom: 25px; display: flex; align-items: flex-start; justify-content: space-between; gap: 26px; }
.world-breadcrumb { margin-bottom: 12px; display: flex; align-items: center; gap: 7px; color: #71807b; font-size: 10px; }
.world-breadcrumb a { color: #91a39e; text-decoration: none; }
.world-context-header h1 { margin: 0; font-size: 28px; font-weight: 620; letter-spacing: -.035em; }
.world-context-header > div > p { margin: 8px 0 0; display: flex; gap: 7px; color: var(--muted); font-size: 11px; }
.world-context-header > div > p strong { color: var(--muted-strong); font-weight: 600; }
.agent-connection { min-width: 175px; padding: 9px 11px; display: flex; align-items: center; gap: 10px; border-left: 1px solid #33433f; }
.connection-led { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #6b7874; }
.agent-connection.online .connection-led { background: var(--success); box-shadow: 0 0 0 3px rgba(134,223,173,.08); }
.agent-connection > div { display: grid; gap: 4px; }
.agent-connection strong { font-size: 10px; font-weight: 650; }
.agent-connection small { color: var(--muted); font-size: 9px; }

.agent-notice { min-height: 68px; margin-bottom: 28px; padding: 13px 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 1px solid #3a4037; border-radius: 7px; background: #171b17; }
.agent-notice > svg { width: 19px; fill: none; stroke: #d4bd82; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.agent-notice > div { display: grid; gap: 4px; }
.agent-notice strong { color: #d9d4c7; font-size: 11px; }
.agent-notice span { color: #928f85; font-size: 10px; line-height: 1.5; }
.agent-notice button { min-height: 32px; padding: 0 10px; border: 1px solid #3b4038; border-radius: 5px; color: #878a80; background: transparent; font-size: 9px; }

.settings-group { min-width: 0; margin-bottom: 27px; border: 1px solid #273531; border-radius: 8px; background: #101716; overflow: hidden; scroll-margin-top: 20px; }
.settings-group > header { min-height: 67px; padding: 13px 18px; display: flex; align-items: center; border-bottom: 1px solid #273531; background: #111918; }
.settings-group h2 { margin: 0; font-size: 13px; font-weight: 680; }
.settings-group header p { margin: 5px 0 0; color: #75837f; font-size: 9px; }
.settings-row { min-height: 82px; padding: 14px 17px; display: grid; grid-template-columns: auto minmax(230px, 1fr) minmax(130px, auto) auto; align-items: center; gap: 14px; }
.settings-row + .settings-row { border-top: 1px solid #22302c; }
.settings-row.is-disabled { opacity: .55; }
.settings-icon { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #31433e; border-radius: 6px; color: #a4bab4; background: #131e1b; }
.settings-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.settings-copy { min-width: 0; display: grid; gap: 5px; }
.settings-copy strong { font-size: 11px; font-weight: 650; }
.settings-copy p { margin: 0; color: #798783; font-size: 10px; }
.text-status { color: #7f8c88; font-size: 9px; text-align: right; }
.text-status.ready { color: #90c8bb; }
.row-action { min-width: 87px; min-height: 33px; padding: 0 11px; border: 1px solid #344640; border-radius: 5px; color: #c4d0cc; background: #111a18; font-size: 9px; font-weight: 620; cursor: pointer; }
.row-action:hover:not(:disabled) { border-color: #4c6760; color: var(--text); background: #16211e; }
.row-action:disabled { color: #697570; cursor: not-allowed; }

@media (max-width: 860px) {
  .world-workspace { grid-template-columns: 1fr; }
  .world-sidebar { position: static; height: auto; padding: 12px 14px; border-right: 0; border-bottom: 1px solid #24312e; }
  .world-identity { min-height: 52px; padding: 2px 4px 11px; }
  .world-navigation { display: flex; gap: 4px; overflow-x: auto; }
  .world-navigation { scrollbar-width: none; }
  .world-navigation::-webkit-scrollbar { display: none; }
  .world-navigation > p,
  .sidebar-meta { display: none; }
  .world-navigation a { flex: 0 0 auto; min-height: 35px; }
  .world-navigation a i,
  .nav-status-dot { display: none; }
  .world-main { width: min(100% - 32px, 1120px); padding-top: 27px; }
}

@media (max-width: 620px) {
  .world-app-header .plain-header-link { padding-inline: 7px; font-size: 10px; }
  .world-context-header { min-height: 0; align-items: flex-start; flex-direction: column; }
  .agent-connection { padding-left: 0; border-left: 0; }
  .agent-notice { grid-template-columns: auto 1fr; }
  .agent-notice button { grid-column: 1 / -1; }
  .settings-row { padding-inline: 12px; grid-template-columns: 35px minmax(0, 1fr) 82px; gap: 10px; }
  .text-status { grid-column: 2; text-align: left; }
  .row-action { grid-column: 3; grid-row: 1 / span 2; min-width: 72px; padding-inline: 7px; }
  .settings-copy p { line-height: 1.45; }
}
