/* Ellus Infinity — design system web (Windows claro / escuro / sistema) */



:root {

  color-scheme: light dark;



  --ellus-red: #9a050d;

  --ellus-red-bright: #b1060f;

  --ellus-gold: #c49258;

  --ellus-gold-soft: #e8d4b8;



  --bg-app: #f3f3f3;

  --bg-elevated: #ffffff;

  --bg-hero-start: #5c0a10;

  --bg-hero-end: #b1060f;



  --text-primary: #1a1a1a;

  --text-secondary: #2d2d2d;

  --text-muted: #5c5c5c;

  --text-on-hero: #ffffff;

  --text-on-hero-muted: #f5ebe3;



  --border-subtle: #d1d1d1;

  --focus-ring: #c49258;



  --safe-top: env(safe-area-inset-top, 0px);

  --safe-bottom: env(safe-area-inset-bottom, 0px);



  --font-sans: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system,

    Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-md: 12px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);

  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);

}



[data-theme="light"] {

  color-scheme: light;

  --bg-app: #f3f3f3;

  --bg-elevated: #ffffff;

  --text-primary: #1a1a1a;

  --text-secondary: #2d2d2d;

  --text-muted: #5c5c5c;

  --border-subtle: #d1d1d1;

}



[data-theme="dark"] {

  color-scheme: dark;

  --bg-app: #202020;

  --bg-elevated: #2b2b2b;

  --text-primary: #f3f3f3;

  --text-secondary: #e0e0e0;

  --text-muted: #b0b0b0;

  --border-subtle: #454545;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);

  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);

}



/* Sistema — segue preferência do Windows quando data-theme-pref=system */

@media (prefers-color-scheme: light) {

  :root:not([data-theme="dark"]) {

    color-scheme: light;

    --bg-app: #f3f3f3;

    --bg-elevated: #ffffff;

    --text-primary: #1a1a1a;

    --text-secondary: #2d2d2d;

    --text-muted: #5c5c5c;

    --border-subtle: #d1d1d1;

  }

}



@media (prefers-color-scheme: dark) {

  :root:not([data-theme="light"]) {

    color-scheme: dark;

    --bg-app: #202020;

    --bg-elevated: #2b2b2b;

    --text-primary: #f3f3f3;

    --text-secondary: #e0e0e0;

    --text-muted: #b0b0b0;

    --border-subtle: #454545;

  }

}



html {

  height: 100%;

  scroll-behavior: smooth;

  -webkit-font-smoothing: antialiased;

  -moz-osx-font-smoothing: grayscale;

  text-rendering: optimizeLegibility;

  background-color: var(--bg-app);

  color: var(--text-primary);

}



html,

body {

  margin: 0;

  min-height: 100%;

  font-family: var(--font-sans);

  font-size: 16px;

  line-height: 1.5;

  color: var(--text-primary);

  background-color: var(--bg-app);

}



body:not(.ellus-flutter-ready) {

  background: linear-gradient(

    165deg,

    #2a0809 0%,

    var(--bg-hero-start) 42%,

    var(--bg-hero-end) 100%

  );

}



body:not(.ellus-flutter-ready) .ellus-loading__title,

body:not(.ellus-flutter-ready) .ellus-loading__hint {

  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(0, 0, 0, 0.35);

}



body:not(.ellus-flutter-ready) .ellus-loading__title {

  color: var(--text-on-hero);

}



body:not(.ellus-flutter-ready) .ellus-loading__hint {

  color: var(--text-on-hero-muted);

}



body.ellus-flutter-ready {

  background: var(--bg-app);

  color: var(--text-primary);

}



@supports (padding: env(safe-area-inset-top)) {

  body {

    padding-top: var(--safe-top);

    padding-left: env(safe-area-inset-left);

    padding-right: env(safe-area-inset-right);

    padding-bottom: var(--safe-bottom);

  }

}



flt-glass-pane,

flutter-view,

#flutter_view,

#flt-glass-pane {

  background-color: var(--bg-app) !important;

  color: var(--text-primary) !important;

  display: block !important;

  width: 100% !important;

  height: 100% !important;

  min-height: 100dvh !important;

}



.ellus-loading {

  position: fixed;

  inset: 0;

  z-index: 0;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 0.65rem;

  pointer-events: none;

  text-align: center;

  padding: 1.75rem;

  max-width: 28rem;

  margin: 0 auto;

}



.ellus-loading__title {

  margin: 0;

  font-family: var(--font-sans);

  font-size: 1.5rem;

  font-weight: 800;

  letter-spacing: 0.02em;

  line-height: 1.25;

}



.ellus-loading__hint {

  margin: 0;

  font-family: var(--font-sans);

  font-size: 1rem;

  font-weight: 500;

  line-height: 1.45;

}



body.ellus-flutter-ready #ellus-loading {

  display: none;

}



body.ellus-flutter-ready flt-glass-pane,

body.ellus-flutter-ready flutter-view {

  z-index: 1;

}



::selection {

  background: rgba(196, 146, 88, 0.45);

  color: var(--text-primary);

}



:focus-visible {

  outline: 3px solid var(--focus-ring);

  outline-offset: 2px;

}



@media (prefers-reduced-motion: reduce) {

  html {

    scroll-behavior: auto;

  }

  :root {

    transition: none;

  }

}



@media (prefers-contrast: more) {

  :root {

    --text-muted: #2d3540;

    --border-subtle: #6b7280;

  }

  [data-theme="dark"] {

    --text-muted: #e5e7eb;

  }

}



body.ellus-capture-blocked flt-glass-pane,

body.ellus-capture-blocked flutter-view,

body.ellus-obscured flt-glass-pane,

body.ellus-obscured flutter-view {

  filter: blur(28px) brightness(0.15) !important;

  pointer-events: none !important;

}



body.ellus-capture-blocked::after,

body.ellus-obscured::after {

  content: "Conteúdo protegido — capturas não permitidas";

  position: fixed;

  inset: 0;

  z-index: 99999;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 2rem;

  text-align: center;

  font-family: var(--font-sans);

  font-size: 1.05rem;

  font-weight: 700;

  color: #ffffff;

  background: rgba(0, 0, 0, 0.88);

  pointer-events: none;

}

