:root {
  color-scheme: light;
  --zenex-border: #e2e8f0;
  --zenex-foreground: #0f172a;
  --zenex-muted: #64748b;
  --zenex-background: #f8fafc;
  --zenex-primary: #0ea5e9;
  --zenex-primary-hover: #0284c7;
  --zenex-primary-active: #0369a1;
  --zenex-ring: rgba(14, 165, 233, 0.28);
}

body.zenex-login-active #root * {
  visibility: hidden !important;
}

body.zenex-login-active #root .zenex-login-form,
body.zenex-login-active #root .zenex-login-form * {
  visibility: visible !important;
}

.zenex-brand-visual {
  position: fixed;
  inset: 0;
  z-index: 8999;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.07), transparent 34%),
    var(--zenex-background);
}

.zenex-login-form {
  position: fixed !important;
  inset: 50% auto auto 50% !important;
  z-index: 9002 !important;
  box-sizing: border-box !important;
  width: min(calc(100vw - 32px), 420px) !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 32px !important;
  border: 1px solid var(--zenex-border) !important;
  border-radius: 14px !important;
  visibility: visible !important;
  background: #fff !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 45px rgba(15, 23, 42, 0.08) !important;
  transform: translate(-50%, -40%) !important;
}

.zenex-login-form * {
  visibility: visible !important;
}

.zenex-login-form input {
  color: var(--zenex-foreground) !important;
  background: #fff !important;
  border-color: var(--zenex-border) !important;
}

.zenex-login-form input::placeholder {
  color: var(--zenex-muted) !important;
  opacity: 1 !important;
}

.zenex-login-form button[type="submit"],
.zenex-login-form button[id="login"] {
  color: #fff !important;
  border-color: var(--zenex-primary) !important;
  background: var(--zenex-primary) !important;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 80ms ease !important;
}

.zenex-login-form button[type="submit"]:hover,
.zenex-login-form button[id="login"]:hover {
  border-color: var(--zenex-primary-hover) !important;
  background: var(--zenex-primary-hover) !important;
}

.zenex-login-form button[type="submit"]:active,
.zenex-login-form button[id="login"]:active {
  border-color: var(--zenex-primary-active) !important;
  background: var(--zenex-primary-active) !important;
  transform: translateY(1px) !important;
}

.zenex-login-form button:focus-visible,
.zenex-login-form input:focus-visible {
  outline: 2px solid transparent !important;
  border-color: var(--zenex-primary) !important;
  box-shadow: 0 0 0 3px var(--zenex-ring) !important;
}

.zenex-login-form button:not([type="submit"]):not([id="login"]) {
  color: var(--zenex-foreground) !important;
  border-color: var(--zenex-border) !important;
  background: #fff !important;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease !important;
}

.zenex-login-form button:not([type="submit"]):not([id="login"]):hover {
  color: var(--zenex-primary-active) !important;
  border-color: #bae6fd !important;
  background: #f0f9ff !important;
}

.zenex-brand-logo {
  position: fixed;
  top: calc(50% - 238px);
  left: 50%;
  z-index: 9004;
  width: 300px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transform: translateX(-50%);
}

.zenex-brand-logo img {
  width: 260px;
  max-height: 72px;
  height: auto;
  object-fit: contain;
}

.zenex-brand-logo::after {
  content: none;
}

.zenex-brand-footer {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 9004;
  color: var(--zenex-muted);
  font: 400 12px/1.5 Inter, sans-serif;
  pointer-events: none;
  transform: translateX(-50%);
}

.zenex-console-mark {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 248px;
  height: 102px;
  padding: 20px 26px;
  border: 0;
  border-radius: 0;
  background: #062b4f;
  box-shadow: none;
  pointer-events: none;
}

.zenex-console-mark img {
  width: 190px;
  height: auto;
  max-height: 56px;
  object-fit: contain;
}

.zenex-restricted-menu {
  cursor: not-allowed !important;
  opacity: 0.52 !important;
  filter: grayscale(0.35);
}

.zenex-restricted-menu * {
  cursor: not-allowed !important;
}

@media (max-height: 680px) {
  .zenex-brand-logo {
    top: 20px;
  }

  .zenex-login-form {
    transform: translate(-50%, -36%) !important;
  }

  .zenex-brand-footer {
    display: none;
  }
}
