:root {
  color-scheme: dark;
  --peipus-bg: #05070a;
  --peipus-card: rgba(9, 14, 21, 0.82);
  --peipus-line: rgba(151, 211, 244, 0.16);
  --peipus-text: #f4f8fb;
  --peipus-muted: rgba(224, 236, 246, 0.58);
  --peipus-cyan: #25c8e8;
  --peipus-blue: #1d78df;
}

html,
body,
#root {
  width: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: var(--peipus-bg) !important;
  color: var(--peipus-text) !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body.peipus-auth-themed::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 36%, rgba(37, 200, 232, 0.18), transparent 24%),
    radial-gradient(circle at 32% 18%, rgba(29, 120, 223, 0.16), transparent 25%),
    radial-gradient(circle at 78% 82%, rgba(37, 200, 232, 0.12), transparent 28%),
    linear-gradient(180deg, #0d1721 0%, #06090d 58%, #030507 100%) !important;
}

body.peipus-auth-themed::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at center, black, transparent 70%);
}

#root,
#root > div,
main {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  min-height: 100vh !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 30 !important;
  width: min(372px, calc(100vw - 32px)) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 34px 30px 30px !important;
  background: var(--peipus-card) !important;
  border: 1px solid var(--peipus-line) !important;
  border-radius: 22px !important;
  box-shadow:
    0 28px 86px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset,
    0 0 55px rgba(37, 200, 232, 0.10) !important;
  backdrop-filter: blur(20px) saturate(122%) !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] > div,
body.peipus-auth-themed [data-peipus-panel="true"] > form,
body.peipus-auth-themed [data-peipus-panel="true"] form > div {
  width: 100% !important;
  margin: 0 !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] form,
body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiBox-root"],
body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiStack-root"] {
  display: contents !important;
}

body.peipus-auth-themed [data-peipus-panel="true"]::before {
  content: "";
  display: block !important;
  align-self: center !important;
  width: 134px !important;
  height: 62px !important;
  margin: 0 0 10px !important;
  background: url("/peipus-auth-logo.png?v=202606270740") center / contain no-repeat !important;
  filter: drop-shadow(0 10px 20px rgba(37, 200, 232, 0.20)) !important;
}

body.peipus-auth-themed [data-peipus-hide="true"],
body.peipus-auth-themed .peipus-hide,
body.peipus-auth-themed h1,
body.peipus-auth-themed h2,
body.peipus-auth-themed h3,
body.peipus-auth-themed h4,
body.peipus-auth-themed h5,
body.peipus-auth-themed h6,
body.peipus-auth-themed legend,
body.peipus-auth-themed label,
body.peipus-auth-themed footer,
body.peipus-auth-themed [class*="MuiTypography-h"],
body.peipus-auth-themed [href*="authelia.com"],
body.peipus-auth-themed [aria-label*="Authelia"],
body.peipus-auth-themed [aria-label*="idioma"],
body.peipus-auth-themed [aria-label*="language"] {
  display: none !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] a,
body.peipus-auth-themed [data-peipus-panel="true"] p,
body.peipus-auth-themed [data-peipus-panel="true"] small {
  display: none !important;
}

body.peipus-auth-themed form {
  display: contents !important;
}

body.peipus-auth-themed [class*="MuiInputBase-root"],
body.peipus-auth-themed [class*="MuiOutlinedInput-root"] {
  width: 100% !important;
  min-height: 46px !important;
  box-sizing: border-box !important;
  background: rgba(2, 6, 11, 0.72) !important;
  color: var(--peipus-text) !important;
  border: 1px solid rgba(205, 226, 244, 0.20) !important;
  border-radius: 13px !important;
  outline: none !important;
  box-shadow: none !important;
}

body.peipus-auth-themed input:not([class*="Mui"]),
body.peipus-auth-themed textarea:not([class*="Mui"]),
body.peipus-auth-themed select:not([class*="Mui"]) {
  width: 100% !important;
  min-height: 46px !important;
  box-sizing: border-box !important;
  background: rgba(2, 6, 11, 0.72) !important;
  color: var(--peipus-text) !important;
  border: 1px solid rgba(205, 226, 244, 0.20) !important;
  border-radius: 13px !important;
  outline: none !important;
  box-shadow: none !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiFormControl-root"],
body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiTextField-root"] {
  width: 100% !important;
  margin: 0 !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiInputBase-root"],
body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiOutlinedInput-root"] {
  display: flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  overflow: hidden !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiInputBase-root"] input,
body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiOutlinedInput-root"] input,
body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiInputBase-input"],
body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiOutlinedInput-input"] {
  width: 100% !important;
  height: 46px !important;
  min-height: auto !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiOutlinedInput-notchedOutline"],
body.peipus-auth-themed [data-peipus-panel="true"] fieldset,
body.peipus-auth-themed [data-peipus-panel="true"] legend {
  display: none !important;
  border: 0 !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiInputAdornment-root"],
body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiIconButton-root"],
body.peipus-auth-themed [data-peipus-panel="true"] button[aria-label*="password" i],
body.peipus-auth-themed [data-peipus-panel="true"] button[aria-label*="contrase" i] {
  display: none !important;
}

body.peipus-auth-themed input,
body.peipus-auth-themed textarea,
body.peipus-auth-themed select {
  padding: 0 14px !important;
  font: inherit !important;
  font-size: 14px !important;
  caret-color: var(--peipus-cyan) !important;
}

body.peipus-auth-themed input:focus,
body.peipus-auth-themed textarea:focus,
body.peipus-auth-themed select:focus,
body.peipus-auth-themed [class*="Mui-focused"] [class*="MuiOutlinedInput-notchedOutline"],
body.peipus-auth-themed [class*="MuiOutlinedInput-root"][class*="Mui-focused"] [class*="MuiOutlinedInput-notchedOutline"] {
  border-color: rgba(37, 200, 232, 0.86) !important;
  box-shadow: 0 0 0 3px rgba(37, 200, 232, 0.12) !important;
}

body.peipus-auth-themed [class*="MuiOutlinedInput-notchedOutline"],
body.peipus-auth-themed fieldset {
  border: 0 !important;
}

body.peipus-auth-themed input::placeholder {
  color: var(--peipus-muted) !important;
  opacity: 1 !important;
}

body.peipus-auth-themed input[type="checkbox"],
body.peipus-auth-themed input[type="hidden"],
body.peipus-auth-themed [class*="MuiCheckbox-root"] {
  display: none !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] button[data-peipus-submit="true"],
body.peipus-auth-themed [data-peipus-panel="true"] button[type="submit"],
body.peipus-auth-themed [data-peipus-panel="true"] input[type="submit"],
body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiButton-contained"],
body.peipus-auth-themed [data-peipus-panel="true"] [class*="MuiButton-containedPrimary"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 46px !important;
  margin: 6px 0 0 !important;
  border: 0 !important;
  border-radius: 13px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--peipus-blue) 0%, var(--peipus-cyan) 100%) !important;
  box-shadow:
    0 14px 32px rgba(29, 120, 223, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.10) inset !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 14px !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] button[data-peipus-submit="true"]:hover,
body.peipus-auth-themed [data-peipus-panel="true"] button[type="submit"]:hover {
  filter: brightness(1.08) !important;
  box-shadow:
    0 18px 38px rgba(37, 200, 232, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.14) inset !important;
}

body.peipus-auth-themed [data-peipus-panel="true"] button[data-peipus-device-manager="true"],
body.peipus-auth-themed [data-peipus-panel="true"] [role="button"][data-peipus-device-manager="true"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 40px !important;
  margin: -2px 0 0 !important;
  border: 1px solid rgba(37, 200, 232, 0.22) !important;
  border-radius: 12px !important;
  color: rgba(232, 246, 255, 0.86) !important;
  background: rgba(37, 200, 232, 0.06) !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

body.peipus-auth-themed button *,
body.peipus-auth-themed [class*="MuiButton"] * {
  color: inherit !important;
}

body.peipus-auth-themed button[data-peipus-noise="true"],
body.peipus-auth-themed [role="button"][data-peipus-noise="true"],
body.peipus-auth-themed [data-peipus-panel="true"] button:not([data-peipus-submit="true"]):not([data-peipus-device-manager="true"]),
body.peipus-auth-themed [data-peipus-panel="true"] [role="button"]:not([data-peipus-submit="true"]):not([data-peipus-device-manager="true"]) {
  display: none !important;
}

body.peipus-auth-themed img,
body.peipus-auth-themed svg[viewBox][data-peipus-hide="true"] {
  display: none !important;
}

@media (max-width: 560px) {
  body.peipus-auth-themed [data-peipus-panel="true"] {
    width: min(326px, calc(100vw - 24px)) !important;
    padding: 26px 20px 24px !important;
  }

  body.peipus-auth-themed [data-peipus-panel="true"]::before {
    width: 112px !important;
    height: 52px !important;
  }
}
