/* FI Automation theme. Overrides Mantine variables so it survives Docmost releases. */

:root {
  --mantine-primary-color-0: #fff0f7;
  --mantine-primary-color-1: #ffd6ea;
  --mantine-primary-color-2: #ffadd4;
  --mantine-primary-color-3: #ff7ab8;
  --mantine-primary-color-4: #ff4aa3;
  --mantine-primary-color-5: #ff2e9a;
  --mantine-primary-color-6: #ff1f8f;
  --mantine-primary-color-7: #e01278;
  --mantine-primary-color-8: #b80d62;
  --mantine-primary-color-9: #6c0030;
  --mantine-primary-color-filled: #ff1f8f;
  --mantine-primary-color-filled-hover: #e01278;
  --mantine-primary-color-light: rgba(255, 31, 143, 0.12);
  --mantine-primary-color-light-hover: rgba(255, 31, 143, 0.2);
  --mantine-primary-color-light-color: #ff1f8f;
  --mantine-primary-color-contrast: #ffffff;
}

[data-mantine-color-scheme="dark"] {
  --mantine-color-body: #07060c;
  --mantine-color-text: #f4f1ff;
  --mantine-color-dimmed: #b6b0d6;
  --mantine-color-default-border: rgba(255, 31, 143, 0.22);
  --mantine-color-default-hover: #14121f;
  --mantine-color-dark-0: #f4f1ff;
  --mantine-color-dark-1: #d8d2f0;
  --mantine-color-dark-2: #b6b0d6;
  --mantine-color-dark-3: #8a83ad;
  --mantine-color-dark-4: #2a2438;
  --mantine-color-dark-5: #1c1828;
  --mantine-color-dark-6: #14121f;
  --mantine-color-dark-7: #0d0c18;
  --mantine-color-dark-8: #0b0e1a;
  --mantine-color-dark-9: #07060c;
  --mantine-primary-color-light-color: #ff7ab8;
}

::selection {
  background: rgba(255, 31, 143, 0.35);
  color: #ffffff;
}

a:hover {
  color: #ff1f8f;
}

[data-mantine-color-scheme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 31, 143, 0.45);
}

/* Login only. Port of the MeshCentral FIA theme (/opt/iot-stack/.../FIA/public/styles/theme.css). */
@font-face { font-family: "FIA Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "FIA Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "FIA Mono"; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-mono-400.woff2") format("woff2"); }
@font-face { font-family: "FIA Mono"; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-500.woff2") format("woff2"); }
@font-face { font-family: "FIA Bangers"; font-weight: 400; font-display: swap; src: url("fonts/bangers-400.woff2") format("woff2"); }

body:has(main #email):has(main #password) {
  background:
    radial-gradient(1200px 700px at 75% -10%, #1a0a23 0%, #07060c 55%) fixed,
    #07060c !important;
  color: #f4f1ff !important;
  min-height: 100vh;
}

body:has(main #email):has(main #password)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 31, 143, 0.16) 1px, transparent 1.4px);
  background-size: 9px 9px;
  mix-blend-mode: screen;
  opacity: 0.45;
}

body:has(main #email) #root {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

body:has(main #email) [class^="_logo_"] {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 4px !important;
  width: fit-content;
  margin: 22vh auto 0 !important;
  padding: 14px 26px 12px;
  background: #07060c;
  box-shadow: 0 0 26px rgba(255, 31, 143, 0.35);
}

body:has(main #email) [class^="_logo_"] > * {
  display: none !important;
}

body:has(main #email) [class^="_logo_"]::before {
  content: "FI/AUTOMATION";
  display: inline-block;
  font-family: "FIA Mono", ui-monospace, monospace;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
  background: linear-gradient(90deg, #f4f1ff 0 15.385%, #ff1f8f 15.385% 23.077%, #f4f1ff 23.077% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body:has(main #email) [class^="_logo_"]::after {
  content: "PROJECTS";
  font-family: "FIA Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #46f3e6;
}

body:has(main #email) main [class*="_container_"] {
  width: 368px !important;
  max-width: calc(100vw - 32px) !important;
  margin-top: 20px !important;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(255, 31, 143, 0.14), transparent 58%),
    linear-gradient(165deg, rgba(13, 12, 24, 0.94), rgba(7, 6, 12, 0.92)) !important;
  border: 1px solid rgba(255, 31, 143, 0.28) !important;
  border-radius: 16px !important;
  box-shadow: 4px 4px 0 #6c0030, 0 0 24px rgba(255, 31, 143, 0.22) !important;
}

body:has(main #email) main [class*="_containerBox_"] {
  margin-top: 0 !important;
  padding: 1.35rem 1.4rem 1.2rem !important;
}

body:has(main #email) main h1,
body:has(main #email) main h2,
body:has(main #email) main label {
  display: none !important;
}

body:has(main #email) main .mantine-InputWrapper-root {
  margin-top: 0.75rem !important;
}

body:has(main #email) main input {
  height: 42px !important;
  min-height: 42px !important;
  background: #0b0e1a !important;
  color: #f4f1ff !important;
  border: 1px solid rgba(255, 31, 143, 0.28) !important;
  border-radius: 8px !important;
  padding: 0 0.85rem !important;
  font-family: "FIA Inter", system-ui, sans-serif !important;
  font-size: 0.95rem !important;
}

body:has(main #email) main input:focus {
  border-color: rgba(255, 31, 143, 0.6) !important;
  outline: none !important;
}

body:has(main #email) main input::placeholder {
  color: #8a83ad !important;
  opacity: 1;
  font-family: "FIA Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body:has(main #email) main .mantine-PasswordInput-input {
  background: #0b0e1a !important;
  border: 1px solid rgba(255, 31, 143, 0.28) !important;
  border-radius: 8px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
}

body:has(main #email) main .mantine-PasswordInput-input input {
  height: 40px !important;
  min-height: 40px !important;
  border: 0 !important;
}

body:has(main #email) main .mantine-PasswordInput-visibilityToggle {
  color: #8a83ad !important;
}

body:has(main #email) main a {
  color: #9b94b8 !important;
  font-family: "FIA Mono", ui-monospace, monospace;
  font-size: 0.68rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body:has(main #email) main a:hover {
  color: #46f3e6 !important;
}

body:has(main #email) main button[type="submit"] {
  height: auto !important;
  margin-top: 0.9rem !important;
  padding: 0.7rem 1rem !important;
  background: linear-gradient(135deg, #ff1f8f, #c4106a) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-family: "FIA Bangers", cursive !important;
  font-size: 1.15rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.08em !important;
  overflow: visible !important;
  text-transform: uppercase !important;
  box-shadow: 4px 4px 0 #6c0030, 0 0 18px rgba(255, 31, 143, 0.45) !important;
}

body:has(main #email) main button[type="submit"]:hover {
  filter: brightness(1.08);
}
