/* dBrixXFX4u — dark cockpit theme, layered on top of industry.css.
   Tokens and component base classes (.blueprint/.corner/.btn/.tag/.card/.table/.input/.seg/.dialog)
   come from industry.css unmodified. This file adds the dark "authorized field"
   variant described in the handoff README (--color-accent-900 as full background,
   type reversed to paper) plus the cockpit shell layout and screen-specific helpers. */

html, body { margin: 0; background: #0d141b; height: 100%; }
body { font-size: 15px; }

@keyframes dbxMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes dbxPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes dbxIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes dbxSpin { to { transform: rotate(360deg); } }
@keyframes dbxSpinRev { to { transform: rotate(-360deg); } }
@keyframes dbxCore { 0% { transform: scale(1); opacity: .8; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes dbxScanBand { 0% { transform: translateY(-100%); } 100% { transform: translateY(420%); } }
@keyframes dbxTrace { from { stroke-dashoffset: 440; } to { stroke-dashoffset: 0; } }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(148, 188, 227, .22); }
::-webkit-scrollbar-track { background: transparent; }
a { color: #94bce3; }
a:hover { color: #b5d9fd; }
button { font-family: var(--font-body); }

/* ---------- shared dark tokens (mirrors README "Cores do tema escuro") ---------- */
.dark-field {
  --color-text: #e8eef4;
  --color-divider: rgba(180, 210, 240, .16);
}
.dark-field .corner { color: rgba(232, 238, 244, .55); }

.grid-overlay {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(148, 188, 227, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 188, 227, .045) 1px, transparent 1px);
  background-size: 56px 56px;
}
.grid-overlay.steel { background-size: 44px 44px; }

/* ---------- pre-auth (login/signup/planos/pagamento) ---------- */
.preauth {
  position: fixed; inset: 0; z-index: 50;
  display: grid; grid-template-columns: minmax(300px, 420px) 1fr;
  background: #0d141b; color: #e8eef4; font-family: var(--font-body);
  overflow: auto;
}
.preauth-steel {
  position: relative; background: #1d2d3d; display: flex; flex-direction: column;
  justify-content: space-between; padding: 40px 40px 32px; overflow: hidden;
}
.preauth-form {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.wordmark { font-family: var(--font-heading); font-weight: 600; font-size: 26px; letter-spacing: -.01em; }
.wordmark .xfx { color: #94bce3; }
.wordmark-sub {
  margin-top: 6px; font: 400 9.5px/1.6 ui-monospace, Menlo, monospace;
  letter-spacing: .2em; color: rgba(232, 238, 244, .45);
}
.diamond { width: 14px; height: 14px; border: 1px solid #94bce3; transform: rotate(45deg); }

/* ---------- cockpit shell ---------- */
.cockpit {
  position: relative; display: grid; grid-template-columns: 224px 1fr;
  height: 100vh; width: 100%; min-width: 1180px;
  background: #0d141b; color: #e8eef4; font-family: var(--font-body);
  overflow: hidden;
}
.cockpit-glow {
  position: absolute; top: -30%; left: 12%; width: 60%; height: 80%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(89, 128, 166, .22), transparent 62%);
  filter: blur(20px);
}
.sidebar {
  position: relative; z-index: 2; display: flex; flex-direction: column;
  border-right: 1px solid var(--color-divider);
  background: rgba(8, 13, 18, .72); backdrop-filter: blur(6px);
  overflow: hidden;
}
.sidebar-head { padding: 20px 18px 16px; border-bottom: 1px solid var(--color-divider); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0;
  background: transparent; color: rgba(232, 238, 244, .55); cursor: pointer; text-align: left;
  font: 500 12.5px/1 var(--font-body); border-left: 2px solid transparent; width: 100%;
}
.nav-item:hover { background: rgba(148, 188, 227, .06); }
.nav-item.active { background: rgba(148, 188, 227, .09); color: #e8eef4; border-left-color: #94bce3; }
.nav-item .ico { flex: none; width: 15px; height: 15px; opacity: .85; }
.sidebar-foot { padding: 14px 16px 16px; border-top: 1px solid var(--color-divider); }
.broker-ping { display: flex; align-items: center; gap: 8px; padding: 5px 0; font: 400 11px/1 ui-monospace, monospace; color: rgba(232, 238, 244, .5); }
.broker-dot { width: 6px; height: 6px; flex: none; background: #7fd4b0; animation: dbxPulse 2s infinite; }

.main-col { position: relative; z-index: 2; display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow: hidden; }
.ticker-tape {
  height: 34px; overflow: hidden; border-bottom: 1px solid var(--color-divider);
  background: rgba(8, 13, 18, .55); display: flex; align-items: center; flex: none;
}
.ticker-track { display: flex; gap: 26px; white-space: nowrap; animation: dbxMarquee 46s linear infinite; padding-left: 20px; }
.ticker-item { display: flex; align-items: center; gap: 7px; font: 400 11.5px/1 ui-monospace, monospace; color: rgba(232, 238, 244, .6); }
.content { flex: 1; overflow-y: auto; padding: 22px 26px 40px; }

/* ---------- reusable bits ---------- */
.section-label { font: 400 9px/1 ui-monospace, monospace; letter-spacing: .24em; color: rgba(232, 238, 244, .42); margin-bottom: 7px; text-transform: uppercase; }
.kicker { font: 400 9px/1 ui-monospace, monospace; letter-spacing: .18em; color: rgba(232, 238, 244, .42); text-transform: uppercase; }
.text-dim { color: rgba(232, 238, 244, .55); }
.text-dim2 { color: rgba(232, 238, 244, .42); }
.text-dim3 { color: rgba(232, 238, 244, .35); }
.text-up { color: #7fd4b0; }
.text-down { color: #e0705f; }
.text-acc { color: #94bce3; }
.mono { font-family: ui-monospace, Menlo, monospace; }

.kpi { padding: 15px 16px; background: rgba(148, 188, 227, .03); }
.kpi .k { font: 400 9px/1.4 ui-monospace, monospace; letter-spacing: .16em; color: rgba(232, 238, 244, .42); text-transform: uppercase; }
.kpi .v { margin-top: 9px; font-family: var(--font-heading); font-size: 28px; line-height: 1; }
.kpi-grid { display: grid; gap: 14px; margin-bottom: 16px; }

.pulse-dot { width: 7px; height: 7px; border-radius: 0; animation: dbxPulse 2s infinite; }

.dark-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--color-divider);
  background: rgba(255, 255, 255, .03); color: #e8eef4; font: 400 13px/1.2 var(--font-body);
}
.dark-input.mono-input { font-family: ui-monospace, Menlo, monospace; }
.dark-input::placeholder { color: rgba(232, 238, 244, .3); }
.dark-label { display: block; font: 400 9px/1 ui-monospace, monospace; letter-spacing: .16em; color: rgba(232, 238, 244, .42); text-transform: uppercase; margin-bottom: 8px; }

.seg-row { display: inline-flex; gap: 1px; border: 1px solid var(--color-divider); }
.seg-btn { padding: 8px 16px; border: 0; background: transparent; color: rgba(232, 238, 244, .6); font: 500 11.5px/1 var(--font-body); cursor: pointer; }
.seg-btn.on { background: #5980a6; color: #f2f2f3; }
.seg-btn:not(.on):hover { background: rgba(148, 188, 227, .08); }

.chip { padding: 9px 14px; border: 1px solid rgba(180, 210, 240, .18); background: transparent; color: rgba(232, 238, 244, .55); font: 400 12px/1 ui-monospace, monospace; cursor: pointer; }
.chip.on { border-color: #94bce3; background: rgba(148, 188, 227, .14); color: #e8eef4; }

.btn-dark-primary { padding: 11px 20px; border: 1px solid #5980a6; background: #5980a6; color: #f2f2f3; font: 600 12px/1 var(--font-body); letter-spacing: .06em; cursor: pointer; }
.btn-dark-primary:hover { background: #416180; }
.btn-dark-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-dark-ghost { padding: 10px 16px; border: 1px solid rgba(148, 188, 227, .3); background: transparent; color: #94bce3; font: 500 11.5px/1 var(--font-body); letter-spacing: .04em; cursor: pointer; }
.btn-dark-ghost:hover { background: rgba(148, 188, 227, .1); }
.btn-dark-danger { padding: 10px 16px; border: 1px solid rgba(224, 112, 95, .4); background: transparent; color: #e0705f; font: 500 11.5px/1 var(--font-body); letter-spacing: .04em; cursor: pointer; }
.btn-dark-danger:hover { background: rgba(224, 112, 95, .09); }
.btn-dark-outline { padding: 9px 14px; border: 1px solid rgba(180, 210, 240, .22); background: transparent; color: rgba(232, 238, 244, .6); font: 500 11px/1 var(--font-body); cursor: pointer; }
.btn-dark-outline:hover { border-color: #94bce3; color: #94bce3; }

.dark-table { width: 100%; border-collapse: collapse; font: 400 12.5px/1.3 ui-monospace, Menlo, monospace; }
.dark-table th { text-align: left; font: 400 9px/1 ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: rgba(232, 238, 244, .4); padding: 8px 8px; border-bottom: 1px solid var(--color-divider); }
.dark-table td { padding: 9px 8px; border-bottom: 1px solid rgba(180, 210, 240, .07); }
.dark-table tbody tr:hover { background: rgba(148, 188, 227, .03); }
.num { text-align: right; }

.toggle { width: 44px; height: 22px; padding: 0; border: 1px solid rgba(180, 210, 240, .22); background: transparent; cursor: pointer; position: relative; }
.toggle .dot { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: rgba(232, 238, 244, .35); transition: left .18s; }
.toggle.on { border-color: #94bce3; background: rgba(148, 188, 227, .2); }
.toggle.on .dot { left: 24px; background: #94bce3; }

.dialog-backdrop-dark {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(6, 10, 14, .78); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  color: #e8eef4; font-family: var(--font-body);
}
.dialog-dark {
  background: #0d141b; border: 1px solid var(--color-divider); padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  color: #e8eef4;
}
.dialog-progress { display: flex; gap: 4px; }
.dialog-progress span { flex: 1; height: 2px; background: rgba(180, 210, 240, .14); }
.dialog-progress span.on { background: #94bce3; }

.enter-anim { animation: dbxIn .35s ease; }

.card-clickable { cursor: pointer; }
.card-clickable:hover { border-color: rgba(148, 188, 227, .45) !important; }

.placeholder-cell {
  border: 1px dashed rgba(180, 210, 240, .22); display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px; font: 400 10.5px/1.5 ui-monospace, monospace; letter-spacing: .1em;
  color: rgba(232, 238, 244, .35); text-transform: uppercase;
}

/* ---------- public landing / pricing page (stage: 'planos') ---------- */
.landing { position: fixed; inset: 0; z-index: 45; background: #0d141b; color: #e8eef4; font-family: var(--font-body); overflow-y: auto; overflow-x: auto; }
.landing-inner { position: relative; min-height: 100%; min-width: 980px; }
.landing-header { position: relative; display: flex; align-items: center; gap: 20px; padding: 20px 46px; border-bottom: 1px solid var(--color-divider); }
.landing-section { position: relative; padding: 56px 46px; border-bottom: 1px solid var(--color-divider); }

/* responsive floor per spec: cockpit has a 1180px floor and scrolls horizontally below it */
@media (max-width: 1180px) {
  .cockpit-wrap { overflow-x: auto; }
}
