/* ================================================================
   QCE GATEWAY CLOUD — FireEdge Deep White-Label Overlay v4.0.0
   2026-10-22 — ROZEN QCE (Tier 1)
   Definitive palette enforcement. Appended after qce-brand.css.
   ================================================================ */

:root {
  --qce-canvas: #020617;
  --qce-surface: #0B1528;
  --qce-border: #1E293B;
  --qce-primary: #00C2FF;
  --qce-cyan: #00D2FF;
  --qce-sky: #00A3FF;
  --qce-text: #FFFFFF;
  --qce-text-dim: #94A3B8;
  --qce-glow-primary: rgba(0, 194, 255, 0.28);
  --qce-glow-cyan: rgba(0, 210, 255, 0.22);
}

/* ---------- 1. KILL VENDOR CANVAS / GRADIENT (max specificity) ---------- */
html, body, #root, #app,
.MuiCssBaseline-body,
[class*="SunstoneApp"],
[class*="LoginPage"], [class*="loginPage"],
[class*="Login"][class*="Container"],
[class*="login"][class*="container"],
[class*="Login"][class*="Wrapper"],
[class*="login"][class*="wrapper"] {
  background: var(--qce-canvas) !important;
  background-color: var(--qce-canvas) !important;
  background-image: none !important;
  color: var(--qce-text) !important;
}

body {
  background-image:
    radial-gradient(ellipse 900px 600px at 0% 0%, rgba(0,194,255,0.10), transparent 62%),
    radial-gradient(ellipse 800px 600px at 100% 100%, rgba(0,210,255,0.08), transparent 62%) !important;
  background-attachment: fixed !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Neutralize MUI Paper backgrounds that carry the vendor gradient */
.MuiPaper-root,
.MuiCard-root,
.MuiDialog-paper,
[class*="MuiPaper"] {
  background-color: var(--qce-surface) !important;
  background-image: none !important;
  color: var(--qce-text) !important;
}

/* ---------- 2. LOGIN CARD — Nebula Glass + Floating Sphere border ---------- */
form,
[class*="Login"][class*="Form"],
[class*="login"][class*="form"],
[class*="Login"][class*="Card"],
[class*="login"][class*="card"],
[class*="SignIn"],
[class*="signIn"] {
  background-color: var(--qce-surface) !important;
  border: 1px solid var(--qce-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65) !important;
}

/* ---------- 3. TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6,
.MuiTypography-h1, .MuiTypography-h2, .MuiTypography-h3,
.MuiTypography-h4, .MuiTypography-h5, .MuiTypography-h6 {
  color: var(--qce-text) !important;
  font-family: 'Inter Tight', 'Inter', sans-serif !important;
  font-weight: 600 !important;
}
.MuiTypography-body1, .MuiTypography-body2,
.MuiTypography-caption, .MuiFormLabel-root,
label, .MuiInputLabel-root {
  color: var(--qce-text) !important;
  font-family: 'Inter', sans-serif !important;
}
.MuiTypography-caption, .MuiFormHelperText-root,
.MuiInputBase-input::placeholder,
input::placeholder {
  color: var(--qce-text-dim) !important;
  opacity: 1 !important;
}

/* ---------- 4. INPUTS ---------- */
.MuiOutlinedInput-notchedOutline {
  border-color: var(--qce-border) !important;
}
.MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {
  border-color: var(--qce-primary) !important;
}
.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
  border-color: var(--qce-cyan) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.22) !important;
}
.MuiInputBase-input,
input[type="text"], input[type="password"], input[type="email"] {
  background-color: rgba(11, 21, 40, 0.85) !important;
  color: var(--qce-text) !important;
  font-family: 'Inter', sans-serif !important;
}

/* ---------- 5. BUTTONS — Action Aqua ---------- */
.MuiButton-root,
button[type="submit"],
.btn-primary {
  border-radius: 8px !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  text-transform: none !important;
  transition: all 0.2s ease !important;
}
.MuiButton-containedPrimary,
.MuiButton-contained.MuiButton-containedPrimary,
button[type="submit"],
.btn-primary {
  background-color: var(--qce-primary) !important;
  background-image: linear-gradient(135deg, var(--qce-primary) 0%, var(--qce-cyan) 100%) !important;
  color: var(--qce-canvas) !important;
  border: none !important;
  box-shadow: 0 4px 16px var(--qce-glow-primary) !important;
}
.MuiButton-containedPrimary:hover,
.MuiButton-contained.MuiButton-containedPrimary:hover,
button[type="submit"]:hover,
.btn-primary:hover {
  background-image: linear-gradient(135deg, var(--qce-cyan) 0%, var(--qce-sky) 100%) !important;
  box-shadow: 0 6px 24px var(--qce-glow-cyan) !important;
  transform: translateY(-1px) !important;
}
.MuiButton-text, .MuiButton-outlined {
  color: var(--qce-sky) !important;
  border-color: var(--qce-border) !important;
}

/* ---------- 6. LINKS ---------- */
a, .MuiLink-root, .MuiLink-underlineHover {
  color: var(--qce-sky) !important;
  transition: color 0.2s ease !important;
}
a:hover, .MuiLink-root:hover {
  color: var(--qce-cyan) !important;
}

/* ---------- 7. HIDE VENDOR FOOTER / SUPPORT BLOCKS ---------- */
footer,
[class*="footer" i],
[class*="Footer"],
[class*="support" i],
[class*="Support"][class*="link" i] {
  display: none !important;
}

/* Hide any lingering vendor logo SVG */
img[alt*="OpenNebula" i],
img[alt*="Sunstone" i],
img[alt*="FireEdge" i] {
  visibility: hidden !important;
}

/* ---------- 8. WATERMARK ---------- */
body::after {
  content: 'QCE GATEWAY CLOUD';
  position: fixed;
  bottom: 8px;
  right: 12px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(0, 194, 255, 0.28);
  pointer-events: none;
  z-index: 9999;
  font-weight: 600;
}

/* ---------- 9. SCROLLBARS ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--qce-canvas); }
::-webkit-scrollbar-thumb {
  background: rgba(0, 194, 255, 0.3);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--qce-primary); }
