/* ════════════════════════════════════════════════════════════════════════════
   Onflow · pele Zheus (Design System Playground do Zheus AI, linguagem de PRODUTO)
   Mesma base aplicada no MiraAds V2: preto real, Aeonik, rótulos em NB Architekt, prata como
   acento e a cor morando só na luz do vidro e do metal. Carregado DEPOIS das folhas do app:
   remapeia as variáveis do Onflow (--roxo, --card, --borda...) e as do Quasar para os tokens.
   ════════════════════════════════════════════════════════════════════════════ */

@import "./tokens.css";
@import "./x8-design.css";

@font-face { font-family: "Aeonik"; src: url("/zheus/fonts/Aeonik-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Aeonik"; src: url("/zheus/fonts/Aeonik-Medium.woff2") format("woff2"); font-weight: 500 800; font-style: normal; font-display: swap; }
@font-face { font-family: "NB Architekt"; src: url("/zheus/fonts/NBArchitektStd-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "NB Architekt"; src: url("/zheus/fonts/NBArchitektStd-Regular.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "NB Architekt"; src: url("/zheus/fonts/NBArchitektStd-Bold.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/zheus/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/zheus/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* ── Variáveis do Onflow → tokens Zheus (tema escuro, o padrão do produto) ─────── */
:root, html[data-theme="dark"] {
  --fonte-app: "Aeonik", "Geist", Arial, sans-serif;
  /* acento: prata. O azul da logo sai das telas (os nomes --roxo* ficam por compatibilidade) */
  --roxo: #e2e5e8; --roxo-rgb: 226,229,232; --roxo-2: #ffffff; --roxo-txt: #c0d3de; --roxo-txt-rgb: 192,211,222; --roxo-fundo: #131619;
  --fg-rgb: 255,255,255; --texto-forte: #fff; --sombra-k: 1;
  --bg: #000000; --bg-2: #000000; --card: #0b0c0e; --card-2: #101215; --popover: rgba(0,0,0,.5); --tile: #ffffff0a; --tile-2: #ffffff12;
  --borda: #ffffff14; --borda-2: #ffffff0e; --borda-forte: #ffffff2e; --linha: #ffffff12;
  --texto: #eeeef0; --texto-2: #bfc7ce; --texto-3: #92979c; --texto-4: #646b71; --menu-txt: #8b9399;
  /* estados dessaturados, sempre com texto ou ícone junto */
  --ok: #a9d6bd; --erro: #e9b1a8; --aviso: #e6cb94; --info: #a9c8e6;
  --t-ok: #a9d6bd; --t-erro: #e9b1a8; --t-aviso: #e6cb94; --t-info: #a9c8e6;
  --raio: 18px; --raio-sm: 12px;
  --q-primary: #e2e5e8; --q-secondary: #c0d3de; --q-accent: #a9c8e6; --q-positive: #a9d6bd; --q-negative: #e9b1a8; --q-warning: #e6cb94; --q-info: #a9c8e6;
  --q-dark: #0b0c0e; --q-dark-page: #000000;
  --background: #000000;
}
/* tema claro: só o acento e as fontes (o produto é escuro por padrão) */
html[data-theme="light"] {
  --fonte-app: "Aeonik", "Geist", Arial, sans-serif;
  --roxo: #1b1e21; --roxo-rgb: 27,30,33; --roxo-2: #000; --roxo-txt: #3a3f44; --roxo-txt-rgb: 58,63,68;
  --q-primary: #1b1e21;
  --raio: 18px; --raio-sm: 12px;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
html, body, button, input, textarea, select, .q-btn, .q-field, .q-item, .q-menu, .q-dialog, .q-notification { font-family: var(--x8-font) !important; }
.material-icons, .q-icon.material-icons { font-family: 'Material Icons' !important; }
html[data-theme="dark"] body, html[data-theme="dark"] #q-app { background: #000; color: var(--x8-text); }
::selection { background: rgba(192, 211, 222, .28); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: #ffffff1a transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: #ffffff1a; border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }
:where(button, a, input, textarea, select, [tabindex]):focus-visible { outline: 2px solid var(--x8-focus); outline-offset: 2px; }

.zh-label { font-family: var(--x8-label-font); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--z-ice); }
.zh-metal-text { background: linear-gradient(180deg, #fff 25%, #a9b4be 110%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.zh-btn-frost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid #ffffff1c; background: #ffffff03; color: #bfc7ce; font-size: 13px; cursor: pointer; text-decoration: none; transition: background .3s var(--ease-ui), border-color .3s var(--ease-ui), color .3s var(--ease-ui); }
.zh-btn-frost:hover { background: #ffffff08; border-color: #ffffff3a; color: #eeeef0; }
.zh-btn-ghost { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: #acbac5; font-size: 13px; cursor: pointer; transition: background .3s var(--ease-ui); }
.zh-btn-ghost:hover { background: #ffffff09; }

/* ── Atmosfera: cantos frios que respiram + poeira + grão ─────────────────────── */
.zh-atmo { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; mix-blend-mode: screen; }
.zh-atmo i { position: absolute; display: block; }
.zh-atmo .za-atmo__gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; transition: opacity .3s; }
.zh-atmo.is-gl .zh-atmo__corners, .zh-atmo.is-gl .zh-atmo__edge { display: none; }
.zh-atmo.is-off .za-atmo__gl, .zh-atmo.is-off .zh-atmo__dust, .zh-atmo.is-off .zh-atmo__corners, .zh-atmo.is-off .zh-atmo__edge { opacity: 0; }
.zh-atmo__corners { inset: -12%; will-change: transform, opacity; background:
  radial-gradient(44% 48% at 2% 4%, rgba(58,118,166,.42), rgba(58,118,166,.12) 45%, transparent 74%),
  radial-gradient(36% 42% at 98% 2%, rgba(58,118,166,.26), rgba(58,118,166,.06) 45%, transparent 70%),
  radial-gradient(48% 52% at 0% 100%, rgba(58,118,166,.36), rgba(58,118,166,.09) 48%, transparent 74%),
  radial-gradient(50% 54% at 100% 100%, rgba(58,118,166,.40), rgba(58,118,166,.10) 48%, transparent 76%);
  animation: zh-atmo-breathe 16s ease-in-out infinite alternate; }
.zh-atmo__edge { inset: 0; background:
  linear-gradient(90deg, rgba(46,96,138,.14), transparent 20%, transparent 80%, rgba(46,96,138,.12)),
  linear-gradient(180deg, rgba(46,96,138,.10), transparent 24%, transparent 76%, rgba(46,96,138,.12)); }
.zh-atmo__dust { inset: -40px; opacity: .45; will-change: transform; background-image:
  radial-gradient(1px 1px at 7% 12%, rgba(255,255,255,.55), transparent 60%),
  radial-gradient(1px 1px at 23% 64%, rgba(255,255,255,.35), transparent 60%),
  radial-gradient(1.4px 1.4px at 41% 28%, rgba(255,255,255,.45), transparent 60%),
  radial-gradient(1px 1px at 58% 83%, rgba(255,255,255,.3), transparent 60%),
  radial-gradient(1px 1px at 72% 41%, rgba(255,255,255,.5), transparent 60%),
  radial-gradient(1.2px 1.2px at 86% 9%, rgba(255,255,255,.4), transparent 60%),
  radial-gradient(1px 1px at 93% 71%, rgba(255,255,255,.35), transparent 60%),
  radial-gradient(1px 1px at 34% 92%, rgba(255,255,255,.3), transparent 60%);
  background-size: 520px 520px; animation: zh-atmo-drift 90s linear infinite; }
.zh-grain { position: fixed; inset: -100px; z-index: 9000; pointer-events: none; opacity: .05; mix-blend-mode: overlay; will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: zh-atmo-grain 1s steps(5) infinite; }
html[data-theme="light"] .zh-atmo, html[data-theme="light"] .zh-grain, html.zh-sem-atmosfera .zh-grain { display: none; }
@keyframes zh-atmo-breathe { 0% { opacity: .78; transform: translate3d(0,0,0) scale(1) } 50% { opacity: 1; transform: translate3d(1.2%,-.8%,0) scale(1.035) } 100% { opacity: .86; transform: translate3d(-.8%,1.2%,0) scale(1.02) } }
@keyframes zh-atmo-drift { to { transform: translate3d(-520px,-260px,0) } }
@keyframes zh-atmo-grain { 0% { transform: translate3d(0,0,0) } 20% { transform: translate3d(-38px,22px,0) } 40% { transform: translate3d(26px,-41px,0) } 60% { transform: translate3d(-17px,-29px,0) } 80% { transform: translate3d(43px,15px,0) } 100% { transform: translate3d(0,0,0) } }
@media (prefers-reduced-motion: reduce) { .zh-atmo i, .zh-grain { animation: none !important; } }

/* ── Botão principal promovido a metal líquido (o motor marca data-zh-promoted) ───── */
html[data-theme="dark"] [data-zh-promoted] {
  background: var(--x8-plate) !important;
  color: #eeeef0 !important;
  border: 1px solid #ffffff30 !important;
  border-radius: 999px !important;
  box-shadow: 0 5px 14px #0005, inset 0 1px 0 #ffffff10 !important;
  font-weight: 500 !important;
}
html[data-theme="dark"] [data-zh-promoted].x8-enhanced { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
html[data-theme="dark"] [data-zh-promoted] .q-btn__content, html[data-theme="dark"] [data-zh-promoted] .q-icon { color: #eeeef0 !important; }
html[data-theme="dark"] [data-zh-promoted]:disabled, html[data-theme="dark"] [data-zh-promoted].disabled { background: #101214 !important; color: #737a81 !important; opacity: .5 !important; }
.q-btn[data-x8-metal] .q-focus-helper, .q-btn[data-x8-metal] .q-ripple { display: none !important; }
.q-btn[data-x8-metal]::before { box-shadow: none !important; }

/* ── Quasar no material da casa ──────────────────────────────────────────────── */
html[data-theme="dark"] .q-btn { border-radius: 999px; font-weight: 500; letter-spacing: -.005em; }
html[data-theme="dark"] .q-btn--round { border-radius: 50%; }
html[data-theme="dark"] .q-btn.bg-primary:not([data-zh-promoted]) { background: linear-gradient(180deg, #f6f8fa, #c9d1d8) !important; }
html[data-theme="dark"] .q-btn.bg-primary:not([data-zh-promoted]) .q-btn__content, html[data-theme="dark"] .q-btn.bg-primary:not([data-zh-promoted]) .q-icon { color: #0b0c0e !important; }
html[data-theme="dark"] .q-btn--outline::before { border-color: #ffffff2e !important; }
html[data-theme="dark"] .q-btn--outline.text-primary { color: #dfe5ea !important; }
html[data-theme="dark"] .text-primary { color: #dfe5ea !important; }
html[data-theme="dark"] .bg-primary { background: #e2e5e8 !important; }
html[data-theme="dark"] .text-purple-3, html[data-theme="dark"] .text-purple-4, html[data-theme="dark"] .text-purple, html[data-theme="dark"] .text-deep-purple-4 { color: #c0d3de !important; }
html[data-theme="dark"] .bg-purple-3, html[data-theme="dark"] .bg-purple-4, html[data-theme="dark"] .bg-purple, html[data-theme="dark"] .bg-deep-purple-4 { background: #e2e5e8 !important; color: #0b0c0e !important; }
html[data-theme="dark"] .text-positive { color: #a9d6bd !important; } html[data-theme="dark"] .text-negative { color: #e9b1a8 !important; }
html[data-theme="dark"] .text-warning, html[data-theme="dark"] .text-orange { color: #e6cb94 !important; }
html[data-theme="dark"] .bg-positive { background: #a9d6bd !important; color: #0b0c0e !important; }
html[data-theme="dark"] .bg-negative { background: #e9b1a8 !important; color: #0b0c0e !important; }

/* flutuantes: um vidro preto só (menus, popovers, dicas, notificações) */
html[data-theme="dark"] .q-menu, html[data-theme="dark"] .q-tooltip, html[data-theme="dark"] .q-notification.bg-dark, html[data-theme="dark"] .cs-menu-perfil {
  background: var(--x8-float-bg) !important;
  border: 1px solid var(--x8-float-border) !important;
  -webkit-backdrop-filter: var(--x8-float-blur) !important;
  backdrop-filter: var(--x8-float-blur) !important;
  box-shadow: 0 18px 55px #000b !important;
  color: #eeeef0 !important;
}
html[data-theme="dark"] .q-menu { border-radius: 15px !important; }
html[data-theme="dark"] .q-menu .q-list { padding: 5px; }
html[data-theme="dark"] .q-menu .q-item { border-radius: 9px; font-size: 13px; min-height: 34px; }
html[data-theme="dark"] .q-tooltip { border-radius: 9px !important; font-size: 12px; padding: 6px 10px; }
html[data-theme="dark"] .q-notification { border-radius: 15px !important; }
html[data-theme="dark"] .q-item.q-manual-focusable--focused > .q-focus-helper, body.desktop html[data-theme="dark"] .q-hoverable:hover > .q-focus-helper { background: #fff; opacity: .05; }
html[data-theme="dark"] .q-item--active { color: #eeeef0; }
html[data-theme="dark"] .q-separator--dark { background: #ffffff12; }

/* diálogos: vidro de diálogo sobre véu desfocado */
html[data-theme="dark"] .q-dialog__backdrop { background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html[data-theme="dark"] .q-dialog .q-card { background: var(--x8-dialog-glass) !important; border: 1px solid var(--x8-dialog-border) !important; border-radius: var(--x8-radius-dialog) !important; -webkit-backdrop-filter: blur(var(--x8-dialog-blur)); backdrop-filter: blur(var(--x8-dialog-blur)); box-shadow: 0 30px 90px -20px #000, inset 0 1px 0 #ffffff12 !important; }
html[data-theme="dark"] .q-dialog .q-card .text-h6, html[data-theme="dark"] .q-dialog__title { font-weight: 500 !important; letter-spacing: -.03em !important; font-size: 19px !important; }
html[data-theme="dark"] .q-dialog .q-card__actions { border-top-color: #ffffff10 !important; }

/* campos: placa escura, luz só na borda */
html[data-theme="dark"] .q-field--outlined .q-field__control { border-radius: 12px; background: #ffffff04; }
html[data-theme="dark"] .q-field--outlined.q-field--dark .q-field__control:before { border-color: #ffffff1c; }
html[data-theme="dark"] .q-field--outlined.q-field--dark .q-field__control:hover:before { border-color: #ffffff38; }
html[data-theme="dark"] .q-field--outlined.q-field--highlighted .q-field__control:after { border-width: 1px; border-color: #d7e2ec77; }
html[data-theme="dark"] .q-field--dark.q-field--highlighted .q-field__label { color: #c0d3de; }
html[data-theme="dark"] .q-field--dark .q-field__label, html[data-theme="dark"] .q-field--dark .q-field__marginal { color: #7d858c; }
html[data-theme="dark"] .q-field--filled.q-field--dark .q-field__control { background: #ffffff08; border-radius: 12px 12px 0 0; }
html[data-theme="dark"] .q-field__native, html[data-theme="dark"] .q-field__input { color: #eeeef0; }

/* abas do Quasar: pílulas (x8-st-tabs) */
html[data-theme="dark"] .q-tabs { color: #92979c; }
html[data-theme="dark"] .q-tab { border-radius: 30px; min-height: 34px; padding: 0 14px; border: 1px solid transparent; }
html[data-theme="dark"] .q-tab--active { color: #fff; background: #ffffff0b; border-color: #ffffff21; }
html[data-theme="dark"] .q-tab__label { font-weight: 400; font-size: 13px; letter-spacing: 0; }
html[data-theme="dark"] .q-tab__indicator { display: none; }

/* tabelas: lâmina de vidro, cabeçalho em voz de terminal */
html[data-theme="dark"] .q-table--dark, html[data-theme="dark"] .q-table__card--dark { background: linear-gradient(160deg, #ffffff09, #ffffff02 58%, #ffffff05) !important; border: 1px solid #ffffff14; border-radius: 18px; box-shadow: inset 0 1px 0 #ffffff0d; }
html[data-theme="dark"] .q-table--dark th { color: #646b71; font-family: var(--x8-label-font); font-weight: 400; font-size: 9.5px; letter-spacing: .15em; text-transform: uppercase; }
html[data-theme="dark"] .q-table--dark td, html[data-theme="dark"] .q-table--dark th, html[data-theme="dark"] .q-table--dark tr { border-color: #ffffff0e; }

html[data-theme="dark"] .q-chip--dark { background: #ffffff08; color: #c9d0d5; border: 1px solid #ffffff1c; }
html[data-theme="dark"] .q-toggle__inner--truthy .q-toggle__track { opacity: .55; }
html[data-theme="dark"] .q-toggle__inner--truthy .q-toggle__thumb:after { background: #f2f4f6; }
html[data-theme="dark"] .q-checkbox__inner--truthy .q-checkbox__bg, html[data-theme="dark"] .q-radio__inner--truthy { color: #e2e5e8; }
html[data-theme="dark"] .q-checkbox__svg { color: #0b0c0e; }
html[data-theme="dark"] .q-linear-progress { border-radius: 99px; color: #c0d3de !important; }
html[data-theme="dark"] .q-spinner { color: #c0d3de !important; }
html[data-theme="dark"] .q-date--dark, html[data-theme="dark"] .q-time--dark { background: var(--x8-dialog-glass); }
html[data-theme="dark"] .q-pagination .q-btn.bg-primary { background: #ffffff0b !important; box-shadow: inset 0 0 0 1px #ffffff21 !important; }
html[data-theme="dark"] .q-pagination .q-btn.bg-primary .q-btn__content { color: #fff !important; }
