:root {
  --bg: #050509;
  --bg-2: #0b0e18;
  --panel: rgba(10, 14, 25, 0.78);
  --panel-strong: rgba(7, 10, 18, 0.94);
  --line: rgba(141, 255, 226, 0.18);
  --line-hot: rgba(255, 50, 111, 0.34);
  --text: #f2f6ff;
  --muted: #9ba8be;
  --cyan: #49ffd4;
  --magenta: #ff336f;
  --amber: #f7c96a;
  --danger: #ff5370;
  --success: #5affb4;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 16%, rgba(73, 255, 212, 0.16), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(255, 51, 111, 0.16), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(247, 201, 106, 0.08), transparent 30%),
    linear-gradient(135deg, #030407 0%, #070b15 48%, #110712 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(73, 255, 212, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 255, 212, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  opacity: 0.8;
}

.noise,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.noise {
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scanlines {
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.035), rgba(255,255,255,0.035) 1px, transparent 1px, transparent 4px);
  opacity: 0.18;
}

button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  place-items: center;
}

.auth-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.76fr);
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 12, 22, 0.86), rgba(8, 5, 12, 0.72));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-panel,
.auth-panel,
.dashboard-header,
.empty-dashboard {
  position: relative;
  border: 1px solid rgba(255,255,255,0.07);
}

.brand-panel {
  padding: clamp(28px, 4.6vw, 54px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  background:
    linear-gradient(130deg, rgba(73,255,212,0.06), transparent 32%),
    radial-gradient(circle at 70% 30%, rgba(255,51,111,0.13), transparent 32%),
    rgba(4, 6, 12, 0.52);
}

.brand-panel::after {
  content: "DECIFRE // INVOCAR O PADRÃO // 11:11";
  position: absolute;
  left: 24px;
  bottom: 18px;
  color: rgba(255,255,255,0.07);
  font-size: 10px;
  letter-spacing: 0.32em;
  white-space: nowrap;
}

.brand-orb {
  position: absolute;
  width: 320px;
  height: 320px;
  right: -86px;
  top: 40px;
  border-radius: 50%;
  border: 1px solid rgba(73,255,212,0.18);
  animation: float 9s ease-in-out infinite;
}
.brand-orb span {
  position: absolute;
  inset: 40px;
  border: 1px solid rgba(255, 51, 111, 0.22);
  border-radius: inherit;
  transform: rotate(18deg);
}
.brand-orb span:nth-child(2) { inset: 80px; border-color: rgba(247,201,106,0.24); transform: rotate(62deg); }
.brand-orb span:nth-child(3) { inset: 124px; border-color: rgba(73,255,212,0.26); transform: rotate(-24deg); }

.glyph-cluster {
  position: absolute;
  right: 42px;
  bottom: 116px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  opacity: 0.55;
}
.glyph-cluster span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  color: #dfe8ff;
}

.brand-copy-block { position: relative; z-index: 1; max-width: 640px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.glitch {
  position: relative;
  margin: 0;
  max-width: 760px;
  font-size: clamp(3.2rem, 8vw, 6.6rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 42px rgba(73, 255, 212, 0.18);
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
}
.glitch::before {
  color: var(--magenta);
  transform: translate(3px, -2px);
  clip-path: inset(0 0 55% 0);
  animation: glitchTop 3.7s infinite steps(2, end);
}
.glitch::after {
  color: var(--cyan);
  transform: translate(-2px, 2px);
  clip-path: inset(55% 0 0 0);
  animation: glitchBottom 4.2s infinite steps(2, end);
}
.brand-text {
  max-width: 560px;
  margin: 22px 0 0;
  color: #c8d3e7;
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.7;
}

.omen-grid,
.auth-panel,
.dashboard-header,
.empty-dashboard {
  background: linear-gradient(180deg, rgba(13, 17, 31, 0.82), rgba(8, 10, 18, 0.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.omen-grid {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  display: grid;
  gap: 12px;
}
.omen-grid article {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
}
.omen-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}
.omen-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.omen-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--amber);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  font-weight: 900;
}
.omen-quote p { color: #d5def0; font-style: italic; }

.auth-panel {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-width: 0 0 0 1px;
}
.panel-topline {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--amber));
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(0,0,0,0.22);
}
.tab {
  border: 0;
  border-radius: 13px;
  padding: 12px 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.tab.active {
  color: #081018;
  background: linear-gradient(135deg, var(--cyan), #d2fff6);
  box-shadow: 0 10px 24px rgba(73,255,212,0.16);
}

.auth-copy h2,
.dashboard-header h1,
.empty-dashboard h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  letter-spacing: -0.04em;
}
.auth-copy p:not(.eyebrow),
.dashboard-subtitle,
.empty-dashboard p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.forms-stage {
  position: relative;
  min-height: 320px;
  margin-top: 24px;
}
.auth-form {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.985);
  filter: blur(4px);
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
}
.auth-form.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.form-grid {
  display: grid;
  gap: 14px;
}
.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
label span {
  display: block;
  margin-bottom: 8px;
  color: #d8e2f5;
  font-size: 0.84rem;
  font-weight: 800;
}
input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  color: var(--text);
  background: rgba(0,0,0,0.34);
  transition: border 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
input:focus {
  border-color: rgba(73,255,212,0.72);
  box-shadow: 0 0 0 4px rgba(73,255,212,0.09);
  background: rgba(0,0,0,0.52);
}
.password-wrap { position: relative; }
.password-wrap input { padding-right: 86px; }
.ghost-action {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--cyan);
  background: rgba(73,255,212,0.08);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.primary-action {
  margin-top: 6px;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #061017;
  background: linear-gradient(135deg, var(--cyan), #f4fff9 56%, var(--amber));
  font-weight: 950;
  box-shadow: 0 18px 42px rgba(73,255,212,0.18);
  transition: transform 160ms ease, filter 160ms ease;
}
.primary-action:hover { transform: translateY(-1px); filter: brightness(1.05); }
.primary-action:disabled { cursor: wait; opacity: 0.72; transform: none; }
.primary-action i { font-style: normal; font-size: 1.2rem; }

.dashboard-layout {
  width: 100%;
  min-height: 640px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 20px;
}
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: 28px;
  backdrop-filter: blur(18px);
}
.user-chip {
  min-width: 250px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name button"
    "role button";
  gap: 2px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(0,0,0,0.22);
}
.user-chip span { grid-area: name; font-weight: 900; }
.user-chip small { grid-area: role; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.user-chip button {
  grid-area: button;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  background: rgba(255,51,111,0.18);
  font-weight: 900;
}
.empty-dashboard {
  min-height: 460px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px;
  border-radius: 28px;
  backdrop-filter: blur(18px);
}
.empty-dashboard > * { max-width: 680px; }
.empty-symbol {
  width: 90px;
  height: 90px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-hot);
  border-radius: 50%;
  color: var(--magenta);
  font-size: 3rem;
  box-shadow: 0 0 60px rgba(255,51,111,0.16), inset 0 0 40px rgba(255,51,111,0.08);
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(420px, calc(100% - 44px));
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  color: var(--text);
  background: rgba(7, 10, 18, 0.94);
  box-shadow: var(--shadow);
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast[data-type="success"] { border-color: rgba(90,255,180,0.42); }
.toast[data-type="error"] { border-color: rgba(255,83,112,0.54); }
.toast[data-type="info"] { border-color: rgba(73,255,212,0.34); }

.access-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 40%, rgba(73,255,212,0.18), transparent 28%),
    radial-gradient(circle at 50% 70%, rgba(255,51,111,0.15), transparent 34%),
    rgba(2, 4, 8, 0.92);
  backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}
.access-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.access-loader {
  width: min(560px, 100%);
  position: relative;
  text-align: center;
  padding: 42px 34px;
  border: 1px solid rgba(73,255,212,0.24);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(12, 18, 31, 0.86), rgba(5, 7, 14, 0.92)),
    repeating-linear-gradient(90deg, rgba(73,255,212,0.05) 0 1px, transparent 1px 22px);
  box-shadow: 0 28px 90px rgba(0,0,0,0.62), inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 260ms ease;
}
.access-overlay.visible .access-loader {
  transform: translateY(0) scale(1);
}
.access-loader::before,
.access-loader::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 24px;
  pointer-events: none;
}
.access-loader::after {
  inset: auto -20% 34%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
  border: 0;
  animation: loaderScan 1.35s ease-in-out infinite;
}
.loader-core {
  width: 132px;
  height: 132px;
  margin: 0 auto 26px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(73,255,212,0.28);
  box-shadow: 0 0 70px rgba(73,255,212,0.18), inset 0 0 50px rgba(255,51,111,0.08);
  animation: loaderPulse 1.2s ease-in-out infinite;
}
.loader-core::before {
  content: "EN";
  color: var(--cyan);
  font-weight: 950;
  letter-spacing: 0.12em;
  text-shadow: 0 0 24px rgba(73,255,212,0.5);
}
.loader-core span {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--cyan);
  border-right-color: rgba(255,51,111,0.65);
  animation: loaderSpin 1s linear infinite;
}
.loader-core span:nth-child(2) {
  inset: 24px;
  animation-duration: 1.6s;
  animation-direction: reverse;
  border-top-color: var(--amber);
  border-right-color: rgba(73,255,212,0.4);
}
.loader-core span:nth-child(3) {
  inset: 42px;
  animation-duration: 0.72s;
  border-top-color: rgba(255,255,255,0.85);
  border-right-color: rgba(73,255,212,0.65);
}
.access-loader h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.06em;
  text-transform: uppercase;
}
.loader-lines {
  margin: 24px auto 22px;
  display: grid;
  gap: 8px;
  max-width: 360px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: left;
}
.loader-lines span {
  display: block;
  padding-left: 18px;
  position: relative;
  opacity: 0;
  animation: loaderText 2.1s ease forwards;
}
.loader-lines span::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--cyan);
}
.loader-lines span:nth-child(2) { animation-delay: .32s; }
.loader-lines span:nth-child(3) { animation-delay: .62s; }
.loader-bar {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  background: rgba(0,0,0,0.3);
}
.loader-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--amber));
  transform-origin: left;
  animation: loaderBar 2.1s ease-in-out forwards;
}

@keyframes float {
  0%, 100% { transform: translate3d(0,0,0) rotate(0deg); }
  50% { transform: translate3d(-18px,22px,0) rotate(8deg); }
}
@keyframes glitchTop {
  0%, 86%, 100% { transform: translate(3px, -2px); }
  88% { transform: translate(10px, -4px); }
  90% { transform: translate(-8px, -1px); }
}
@keyframes glitchBottom {
  0%, 88%, 100% { transform: translate(-2px, 2px); }
  90% { transform: translate(-10px, 6px); }
  92% { transform: translate(8px, 1px); }
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}
@keyframes loaderPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.035); filter: brightness(1.28); }
}
@keyframes loaderScan {
  0%, 100% { transform: translateY(-90px); opacity: 0; }
  20%, 82% { opacity: 1; }
  50% { transform: translateY(120px); }
}
@keyframes loaderText {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes loaderBar {
  from { transform: scaleX(0.04); }
  to { transform: scaleX(1); }
}

@media (max-width: 980px) {
  .app-shell { padding: 18px 0; width: min(100% - 22px, 760px); }
  .auth-layout { grid-template-columns: 1fr; min-height: auto; }
  .brand-panel { min-height: 450px; }
  .auth-panel { border-width: 1px 0 0; }
  .dashboard-header { align-items: stretch; flex-direction: column; }
  .user-chip { width: 100%; }
}

@media (max-width: 620px) {
  .brand-panel, .auth-panel { padding: 22px; }
  .glyph-cluster { right: 26px; bottom: 110px; transform: scale(.9); }
  .form-grid-2 { grid-template-columns: 1fr; }
  .forms-stage { min-height: 430px; }
  .access-loader { padding: 34px 22px; }
  .loader-core { width: 112px; height: 112px; }
}


/* ==============================
   ENIGMAL — Fase 1: Núcleo inicial
   ============================== */
.dashboard-layout {
  min-height: auto;
  gap: 18px;
  align-content: start;
}

.nucleus-header {
  overflow: hidden;
  isolation: isolate;
}

.nucleus-header::before {
  content: "";
  position: absolute;
  inset: -45% -10% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(73,255,212,0.13), transparent 62%);
  filter: blur(2px);
  z-index: -1;
}

.nucleus-title-block { max-width: 740px; }
.nucleus-title-block h1 { text-transform: none; }

.nucleus-side-stack {
  display: grid;
  gap: 12px;
  min-width: min(100%, 280px);
}

.system-clock {
  border: 1px solid rgba(73,255,212,0.18);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.system-clock span {
  display: block;
  color: var(--cyan);
  font-size: 1.48rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.system-clock small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nucleus-hero {
  position: relative;
  min-height: 300px;
  padding: clamp(28px, 5vw, 48px);
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 45%, rgba(255,51,111,0.18), transparent 32%),
    radial-gradient(circle at 15% 10%, rgba(73,255,212,0.14), transparent 30%),
    linear-gradient(145deg, rgba(12, 18, 31, 0.88), rgba(5, 7, 14, 0.84));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
}
.nucleus-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(73,255,212,0.035) 0 1px, transparent 1px 34px);
  mask-image: linear-gradient(90deg, black, transparent 80%);
  pointer-events: none;
}
.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 1;
}
.hero-content h2 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
  text-transform: uppercase;
}
.hero-content p {
  max-width: 700px;
  margin: 22px 0 0;
  color: #c8d3e7;
  line-height: 1.7;
  font-size: 1.02rem;
}
.transmission-line {
  width: min(620px, 100%);
  margin-top: 26px;
  padding: 14px 16px;
  border: 1px solid rgba(73,255,212,0.22);
  border-radius: 16px;
  color: var(--success);
  background: rgba(0,0,0,0.36);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  box-shadow: inset 0 0 22px rgba(73,255,212,0.035);
}
.hero-orbit {
  position: absolute;
  right: clamp(-110px, -8vw, -40px);
  top: 50%;
  width: 360px;
  height: 360px;
  transform: translateY(-50%);
  border: 1px solid rgba(73,255,212,0.16);
  border-radius: 50%;
  animation: float 11s ease-in-out infinite;
}
.hero-orbit span {
  position: absolute;
  inset: 42px;
  border: 1px solid rgba(255,51,111,0.23);
  border-radius: inherit;
  transform: rotate(32deg);
}
.hero-orbit span:nth-child(2) { inset: 92px; border-color: rgba(247,201,106,0.22); transform: rotate(-18deg); }
.hero-orbit span:nth-child(3) { inset: 144px; border-color: rgba(73,255,212,0.28); }

.nucleus-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.nucleus-card {
  position: relative;
  min-height: 240px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(13, 17, 31, 0.84), rgba(8, 10, 18, 0.74)),
    radial-gradient(circle at 100% 0%, rgba(73,255,212,0.08), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 180ms ease, border 180ms ease, box-shadow 180ms ease;
}
.nucleus-card:hover {
  transform: translateY(-2px);
  border-color: rgba(73,255,212,0.22);
  box-shadow: 0 18px 60px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}
.nucleus-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(73,255,212,0.65), rgba(255,51,111,0.45), transparent);
  opacity: 0.46;
}
.dossier-card { grid-column: span 6; }
.terminal-card { grid-column: span 6; }
.answer-card, .ranking-card, .fragments-card, .operations-card { grid-column: span 3; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.card-code {
  color: var(--cyan);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 950;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: #d9e5f7;
  background: rgba(255,255,255,0.04);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.status-pill.waiting { border-color: rgba(247,201,106,0.28); color: var(--amber); }
.status-pill.locked { border-color: rgba(255,51,111,0.34); color: #ff9ab7; }
.status-pill.secure { border-color: rgba(90,255,180,0.32); color: var(--success); }
.status-pill.live { border-color: rgba(73,255,212,0.34); color: var(--cyan); box-shadow: 0 0 20px rgba(73,255,212,0.08); }
.nucleus-card h3 {
  margin: 0;
  font-size: 1.42rem;
  letter-spacing: -0.04em;
}
.nucleus-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.58;
}
.dossier-preview-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.dossier-preview-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: rgba(0,0,0,0.2);
}
.dossier-preview-list strong { font-size: 0.95rem; }
.dossier-preview-list small { color: var(--muted); text-align: right; }
.mini-terminal,
.system-log {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(73,255,212,0.18);
  border-radius: 16px;
  color: var(--success);
  background: rgba(0,0,0,0.34);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}
.mini-terminal span,
.system-log span {
  display: block;
  opacity: 0.86;
}
.security-runes,
.fragment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.security-runes span {
  padding: 8px 10px;
  border: 1px solid rgba(73,255,212,0.14);
  border-radius: 12px;
  color: #dbe8f8;
  background: rgba(73,255,212,0.06);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}
.ghost-ranking {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.ghost-ranking li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  background: rgba(0,0,0,0.2);
}
.ghost-ranking span { color: var(--amber); font-weight: 950; }
.ghost-ranking strong { color: rgba(242,246,255,0.76); font-size: 0.9rem; }
.ghost-ranking small { color: var(--muted); }
.fragment-strip span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  color: var(--amber);
  background: rgba(0,0,0,0.2);
  font-size: 1.2rem;
  box-shadow: inset 0 0 22px rgba(247,201,106,0.04);
}
.nucleus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}
.module-action {
  border: 1px solid rgba(73,255,212,0.18);
  border-radius: 16px;
  padding: 13px 16px;
  color: #071017;
  background: linear-gradient(135deg, var(--cyan), #eafff9);
  font-weight: 950;
}
.module-action.ghost {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

@media (max-width: 1080px) {
  .dossier-card, .terminal-card { grid-column: span 12; }
  .answer-card, .ranking-card, .fragments-card, .operations-card { grid-column: span 6; }
}
@media (max-width: 720px) {
  .nucleus-header { align-items: stretch; flex-direction: column; }
  .nucleus-side-stack { width: 100%; }
  .hero-orbit { opacity: .42; right: -170px; }
  .hero-content h2 { font-size: clamp(2.1rem, 12vw, 4rem); }
  .answer-card, .ranking-card, .fragments-card, .operations-card { grid-column: span 12; }
  .dossier-preview-list div { align-items: flex-start; flex-direction: column; }
  .dossier-preview-list small { text-align: left; }
  .nucleus-actions { justify-content: stretch; }
  .module-action { width: 100%; }
}


/* Fase 2 — Dossiês/Ciclos conectados ao banco */
.cycles-command-panel,
.admin-cycles-panel {
  position: relative;
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255,51,111,0.12), transparent 30%),
    linear-gradient(180deg, rgba(13, 17, 31, 0.84), rgba(8, 10, 18, 0.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), var(--shadow);
  overflow: hidden;
}

.cycles-command-panel::before,
.admin-cycles-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(73,255,212,0.08), transparent 18%, transparent 82%, rgba(255,51,111,0.08));
  opacity: .7;
}

.cycles-panel-head,
.admin-panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.cycles-panel-head h2,
.admin-panel-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.cycles-panel-head p,
.admin-panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.cycle-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.cycle-stats div {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(0,0,0,0.2);
}

.cycle-stats span {
  display: block;
  color: var(--amber);
  font-size: 1.7rem;
  font-weight: 950;
}

.cycle-stats small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
}

.cycles-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cycle-card {
  position: relative;
  min-height: 260px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(73,255,212,0.08), transparent 38%),
    rgba(0,0,0,0.22);
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.cycle-card:hover {
  transform: translateY(-2px);
  border-color: rgba(73,255,212,0.28);
  box-shadow: 0 16px 44px rgba(0,0,0,0.24);
}

.cycle-symbol {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-hot);
  border-radius: 22px;
  color: var(--magenta);
  font-size: 2rem;
  background: rgba(255,51,111,0.08);
  box-shadow: inset 0 0 28px rgba(255,51,111,0.08), 0 0 34px rgba(255,51,111,0.10);
}

.cycle-content h3,
.cycle-card h3 {
  margin: 10px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: -0.03em;
}

.cycle-content p,
.cycle-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.cycle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.cycle-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: #d8e2f5;
  background: rgba(255,255,255,0.035);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cycle-progress {
  height: 8px;
  margin: 8px 0 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.cycle-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  box-shadow: 0 0 22px rgba(73,255,212,.24);
}

.empty-cycle-card,
.skeleton-card {
  grid-column: 1 / -1;
  display: block;
  min-height: 180px;
}

.skeleton-card {
  animation: pulseCard 1.4s ease-in-out infinite;
}

.module-action.compact {
  width: auto;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .84rem;
}

.cycle-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

select,
textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  color: var(--text);
  background: rgba(0,0,0,0.34);
  transition: border 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

select:focus,
textarea:focus {
  border-color: rgba(73,255,212,0.72);
  box-shadow: 0 0 0 4px rgba(73,255,212,0.09);
  background: rgba(0,0,0,0.52);
}

textarea {
  resize: vertical;
  min-height: 112px;
  line-height: 1.5;
}

select option {
  color: #111827;
}

@keyframes pulseCard {
  0%, 100% { opacity: .72; }
  50% { opacity: 1; }
}

@media (max-width: 900px) {
  .cycles-list { grid-template-columns: 1fr; }
  .cycle-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cycles-panel-head,
  .admin-panel-head { flex-direction: column; }
  .form-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .cycle-card { grid-template-columns: 1fr; }
  .cycle-symbol { width: 62px; height: 62px; }
  .cycle-stats { grid-template-columns: 1fr; }
}


/* ==============================
   ENIGMAL — Ajuste Fase 2.1
   Dashboard compacta + prevenção de flash no refresh
   ============================== */
.app-shell.is-booting {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.app-shell.is-booting [data-screen] {
  visibility: hidden;
  opacity: 0;
}
.app-shell.is-booting::after {
  content: "sincronizando sessão // ENIGMAL";
  position: absolute;
  inset: auto auto 50% auto;
  transform: translateY(50%);
  padding: 14px 18px;
  border: 1px solid rgba(73,255,212,0.24);
  border-radius: 16px;
  color: var(--cyan);
  background: rgba(5, 8, 15, 0.86);
  box-shadow: 0 20px 70px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
  animation: bootPulse 1.1s ease-in-out infinite;
}
@keyframes bootPulse {
  0%, 100% { opacity: .65; filter: brightness(.9); }
  50% { opacity: 1; filter: brightness(1.35); }
}

body.dashboard-active .app-shell {
  width: min(1280px, calc(100% - 24px));
  padding: 14px 0 28px;
  place-items: start center;
}
.dashboard-compact {
  width: 100%;
  min-height: auto;
  display: grid;
  gap: 14px;
  align-content: start;
}
.top-console {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(73,255,212,0.18);
  border-radius: 22px;
  background: rgba(6, 9, 17, 0.86);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
}
.top-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 178px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,255,212,0.32);
  border-radius: 14px;
  color: var(--cyan);
  background: rgba(73,255,212,0.08);
  font-weight: 950;
  letter-spacing: .08em;
  box-shadow: inset 0 0 24px rgba(73,255,212,0.08);
}
.top-brand strong,
.top-brand small { display: block; }
.top-brand strong { letter-spacing: .12em; font-weight: 950; }
.top-brand small { margin-top: 2px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.top-nav button {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 9px 12px;
  color: #dbe8f8;
  background: rgba(255,255,255,0.035);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: border 160ms ease, color 160ms ease, background 160ms ease;
}
.top-nav button:hover {
  border-color: rgba(73,255,212,0.32);
  color: var(--cyan);
  background: rgba(73,255,212,0.07);
}
.top-identity {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.compact-clock {
  min-width: 118px;
  padding: 9px 11px;
  border-radius: 15px;
}
.compact-clock span { font-size: .98rem; }
.compact-clock small { font-size: .62rem; }
.compact-user-chip {
  min-width: 205px;
  padding: 9px;
  border-radius: 15px;
}
.compact-user-chip button { padding: 8px 10px; }

.console-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 14px;
  align-items: stretch;
}
.console-intro,
.transmission-compact,
.quick-metrics article,
.ops-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(13,17,31,.84), rgba(8,10,18,.74));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.console-intro {
  padding: 20px;
  min-height: 142px;
  background:
    radial-gradient(circle at 92% 10%, rgba(73,255,212,0.10), transparent 32%),
    linear-gradient(180deg, rgba(13,17,31,.84), rgba(8,10,18,.74));
}
.console-intro h1 {
  margin: 0;
  font-size: clamp(1.95rem, 4vw, 3.35rem);
  line-height: .95;
  letter-spacing: -.06em;
}
.console-intro p:not(.eyebrow) {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.52;
}
.transmission-compact {
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(73,255,212,0.035) 0 1px, transparent 1px 22px),
    rgba(0,0,0,0.26);
}
.transmission-compact span {
  color: var(--amber);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .18em;
}
.transmission-compact strong {
  color: var(--success);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88rem;
  line-height: 1.55;
}
.quick-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.quick-metrics article {
  padding: 14px 16px;
}
.quick-metrics span {
  display: block;
  color: var(--cyan);
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}
.quick-metrics small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.dashboard-compact .compact-panel {
  margin-top: 0;
  padding: 18px;
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 65px rgba(0,0,0,0.26);
}
.compact-head {
  margin-bottom: 14px;
}
.compact-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}
.compact-head p { font-size: .92rem; }
.dashboard-compact .cycle-stats { display: none; }
.compact-cycles-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.compact-cycles-list .cycle-card {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  min-height: 0;
}
.compact-cycles-list .cycle-symbol {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 1.55rem;
}
.compact-cycles-list .cycle-content h3,
.compact-cycles-list .cycle-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.compact-cycles-list .cycle-content p,
.compact-cycles-list .cycle-card p {
  font-size: .88rem;
  line-height: 1.45;
}
.compact-cycles-list .cycle-meta {
  gap: 6px;
  margin-top: 10px;
}
.compact-cycles-list .cycle-meta span {
  padding: 5px 7px;
  font-size: .68rem;
}
.compact-cycles-list .cycle-progress { margin: 10px 0; }
.ops-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.ops-card {
  grid-column: span 4;
  min-height: 178px;
  padding: 17px;
  position: relative;
  overflow: hidden;
}
.ops-card h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -.03em;
}
.ops-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.48;
}
.ops-card-wide { grid-column: span 6; }
.dossier-mini-card { grid-column: span 6; }
.ops-card .mini-terminal,
.ops-card .system-log {
  margin-top: 12px;
  padding: 11px;
  font-size: .76rem;
}
.ops-card .ghost-ranking { margin-top: 12px; gap: 7px; }
.ops-card .ghost-ranking li { padding: 8px; }
.ops-card .fragment-strip { margin-top: 14px; }
.ops-card .fragment-strip span { width: 38px; height: 38px; border-radius: 13px; }
.ops-card .dossier-preview-list { margin-top: 12px; }
.ops-card .dossier-preview-list div { padding: 10px; }
.compact-cycle-form {
  gap: 12px;
}
.compact-cycle-form textarea,
textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  resize: vertical;
  min-height: 96px;
  color: var(--text);
  background: rgba(0,0,0,0.34);
}
.compact-actions {
  margin-top: 0;
  justify-content: flex-end;
}

@media (max-width: 1120px) {
  .top-console { grid-template-columns: 1fr; }
  .top-nav { justify-content: flex-start; }
  .top-identity { justify-content: space-between; }
  .console-strip { grid-template-columns: 1fr; }
  .compact-cycles-list { grid-template-columns: 1fr; }
  .ops-card, .ops-card-wide, .dossier-mini-card { grid-column: span 6; }
}
@media (max-width: 720px) {
  body.dashboard-active .app-shell { width: min(100% - 16px, 760px); padding-top: 8px; }
  .top-console { position: relative; top: 0; border-radius: 18px; }
  .top-identity { align-items: stretch; flex-direction: column; }
  .compact-user-chip { width: 100%; }
  .quick-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-card, .ops-card-wide, .dossier-mini-card { grid-column: span 12; }
  .compact-cycles-list .cycle-card { grid-template-columns: 1fr; }
  .compact-cycles-list .cycle-symbol { width: 48px; height: 48px; }
}
@media (max-width: 520px) {
  .quick-metrics { grid-template-columns: 1fr; }
  .top-nav button { font-size: .72rem; padding: 8px 10px; }
  .console-intro h1 { font-size: 2rem; }
}

/* ==============================
   ENIGMAL — Fase 2.2
   Rotas reais por módulo, sem comportamento de landing page
   ============================== */
.app-dashboard {
  width: 100%;
  gap: 14px;
}

.top-brand-button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.top-brand-button:hover .brand-mark,
.top-brand-button.active .brand-mark {
  border-color: rgba(73,255,212,0.65);
  box-shadow: 0 0 24px rgba(73,255,212,0.18), inset 0 0 24px rgba(73,255,212,0.1);
}
.top-nav button.active,
.top-nav button[aria-current="page"] {
  border-color: rgba(73,255,212,0.62);
  color: #061017;
  background: linear-gradient(135deg, var(--cyan), #d6fff7);
  box-shadow: 0 10px 26px rgba(73,255,212,0.12);
}

.route-stage {
  width: 100%;
  min-height: 560px;
}
.route-panel {
  width: 100%;
  display: grid;
  gap: 14px;
  animation: routeIn 220ms ease both;
}
@keyframes routeIn {
  from { opacity: 0; transform: translateY(8px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.route-title-card,
.page-panel {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 8%, rgba(73,255,212,0.08), transparent 30%),
    linear-gradient(180deg, rgba(13,17,31,.84), rgba(8,10,18,.74));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 65px rgba(0,0,0,0.24);
}
.route-title-card {
  min-height: 136px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 410px);
  gap: 14px;
  align-items: stretch;
}
.route-title-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: .95;
  letter-spacing: -.06em;
}
.route-title-card p:not(.eyebrow) {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.route-transmission {
  margin: 0;
  min-height: auto;
}

.nucleo-grid-page {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.overview-card {
  min-height: 230px;
}
.overview-card .module-action {
  margin-top: 14px;
}
.system-log-card .system-log {
  margin-top: 12px;
}

.page-panel {
  padding: 18px;
}
.page-head {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.solo-head {
  display: block;
  margin-bottom: 16px;
}
.page-head h2,
.solo-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: .95;
  letter-spacing: -.06em;
}
.page-head p:not(.eyebrow),
.solo-head p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.module-page-grid {
  display: grid;
  gap: 14px;
}
.wide-card {
  min-height: 0;
}
.feature-board,
.fragment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.feature-board article,
.fragment-grid article {
  min-height: 120px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  background: rgba(0,0,0,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.feature-board strong,
.feature-board small,
.fragment-grid strong,
.fragment-grid small {
  display: block;
}
.feature-board strong,
.fragment-grid strong {
  color: #eaf2ff;
  font-size: 1rem;
}
.feature-board small,
.fragment-grid small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}
.fragment-grid article {
  min-height: 170px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}
.fragment-grid span {
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,255,212,0.24);
  border-radius: 22px;
  color: var(--cyan);
  background: rgba(73,255,212,0.06);
  font-size: 1.85rem;
}
.ranking-board article {
  border-color: rgba(247,201,106,0.16);
}
.clone-log {
  margin-top: 12px;
}

/* mantém as páginas realmente separadas no SPA */
.route-panel.hidden,
[data-route-panel].hidden,
[data-admin-only].hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .nucleo-grid-page,
  .feature-board,
  .fragment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .route-title-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .top-console {
    grid-template-columns: 1fr;
  }
  .top-brand {
    width: 100%;
  }
  .top-nav {
    justify-content: flex-start;
  }
  .top-identity {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }
  .nucleo-grid-page,
  .feature-board,
  .fragment-grid,
  .compact-cycles-list {
    grid-template-columns: 1fr;
  }
  .page-head {
    display: block;
  }
}

/* ===== FASE 3 — ENIGMAS JOGÁVEIS ===== */
.admin-route-grid {
  display: grid;
  gap: 18px;
}

.dossier-detail-stage,
.puzzle-stage {
  display: grid;
  gap: 18px;
}

.dossier-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  overflow: hidden;
}

.dossier-symbol {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-hot);
  border-radius: 28px;
  background: radial-gradient(circle at 50% 30%, rgba(255,51,111,0.14), rgba(73,255,212,0.04));
  color: var(--cyan);
  font-size: 4rem;
  box-shadow: inset 0 0 44px rgba(73,255,212,0.06), 0 0 54px rgba(255,51,111,0.12);
}

.dossier-meta {
  margin-top: 16px;
}

.dossier-progress {
  margin-top: 18px;
  max-width: 520px;
}

.puzzle-list-panel {
  display: grid;
  gap: 18px;
}

.puzzle-list,
.admin-puzzles-list {
  display: grid;
  gap: 12px;
}

.puzzle-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(7,10,18,0.84), rgba(12,16,28,0.62));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.puzzle-row.is-solved {
  border-color: rgba(90,255,180,0.28);
}

.puzzle-row.is-locked {
  opacity: 0.64;
}

.puzzle-index {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--amber);
  background: rgba(0,0,0,0.24);
  font-weight: 950;
}

.puzzle-row-content h3 {
  margin: 8px 0 6px;
  font-size: 1.16rem;
}

.puzzle-row-content p,
.locked-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.locked-note {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
}

.play-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.puzzle-play-card {
  display: grid;
  gap: 18px;
  min-height: 520px;
}

.puzzle-play-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.06em;
}

.puzzle-statement {
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  color: #d7e1f4;
  background: rgba(0,0,0,0.22);
  line-height: 1.72;
}

.puzzle-statement p {
  margin: 0 0 14px;
}

.puzzle-statement p:last-child {
  margin-bottom: 0;
}

.answer-form {
  display: grid;
  gap: 14px;
}

.answer-feedback {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  background: rgba(0,0,0,0.2);
  display: grid;
  gap: 4px;
}

.answer-feedback strong {
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--amber);
}

.answer-feedback span {
  color: var(--muted);
}

.answer-feedback.accepted {
  border-color: rgba(90,255,180,0.46);
  box-shadow: 0 0 42px rgba(90,255,180,0.1);
}

.answer-feedback.accepted strong {
  color: var(--success);
}

.answer-feedback.rejected {
  border-color: rgba(255,83,112,0.54);
  box-shadow: 0 0 42px rgba(255,83,112,0.1);
}

.answer-feedback.rejected strong {
  color: var(--danger);
}

.puzzle-side-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
}

.active-terminal {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(0,0,0,0.3);
}

.media-link {
  width: fit-content;
  text-decoration: none;
}

.admin-puzzles-panel {
  display: grid;
  gap: 18px;
}

.admin-list-head {
  margin-top: 6px;
}

.puzzle-admin-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(0,0,0,0.18);
}

.puzzle-admin-row > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--amber);
  font-weight: 900;
}

.puzzle-admin-row strong,
.puzzle-admin-row small {
  display: block;
}

.puzzle-admin-row small {
  color: var(--muted);
  margin-top: 3px;
}

.pulse-accepted {
  animation: acceptedPulse 900ms ease both;
}

.shake-rejected {
  animation: rejectedShake 420ms ease both;
}

@keyframes acceptedPulse {
  0% { transform: scale(0.985); filter: brightness(1); }
  45% { transform: scale(1.01); filter: brightness(1.25); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes rejectedShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@media (max-width: 980px) {
  .play-shell,
  .dossier-hero {
    grid-template-columns: 1fr;
  }

  .puzzle-side-panel {
    position: static;
  }

  .puzzle-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .puzzle-row .module-action,
  .puzzle-row .locked-note {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* === ENIGMAL Fase 4 — Admin Workbench + Arquivos === */
.admin-workbench {
  display: grid;
  gap: 18px;
}

.admin-workbench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.admin-workbench-head h2,
.workspace-head h3,
.explorer-head h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.admin-workbench-head p,
.workspace-head p,
.explorer-head small {
  color: var(--muted);
  line-height: 1.5;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-workbench-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-explorer,
.admin-workspace {
  padding: 18px;
}

.explorer-head {
  margin-bottom: 14px;
}

.archive-tree {
  display: grid;
  gap: 10px;
}

.archive-node {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 11px;
  color: var(--text);
  background: rgba(0,0,0,0.18);
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}

.archive-node:not(:disabled):hover,
.archive-node.is-active {
  transform: translateY(-1px);
  border-color: rgba(73,255,212,0.38);
  background: rgba(73,255,212,0.065);
}

.node-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(73,255,212,0.06);
  font-weight: 900;
}

.archive-node strong,
.archive-node small {
  display: block;
}

.archive-node small {
  color: var(--muted);
  margin-top: 2px;
}

.admin-tab-panel {
  display: none;
  animation: adminPanelIn 220ms ease both;
}

.admin-tab-panel.is-active {
  display: block;
}

.workspace-head {
  margin-bottom: 18px;
}

.split-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-smart-form {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.form-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-layer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 18px;
  align-items: start;
}

.layers-preview {
  position: sticky;
  top: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 14px;
  background: rgba(0,0,0,0.14);
}

.archive-layers-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.layer-row {
  grid-template-columns: 44px 1fr auto;
}

.admin-monitor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-monitor-grid article {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 16px;
  background: rgba(0,0,0,0.18);
}

.admin-monitor-grid span {
  display: block;
  color: var(--cyan);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 950;
  letter-spacing: -0.06em;
}

.admin-monitor-grid small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
}

.admin-monitor-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(0,0,0,0.16);
}

.ranking-row > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--amber);
  background: rgba(247,201,106,0.08);
  font-weight: 950;
}

.ranking-row strong,
.ranking-row small {
  display: block;
}

.ranking-row small {
  color: var(--muted);
  margin-top: 2px;
}

.ranking-row i {
  color: var(--cyan);
  font-style: normal;
  font-weight: 950;
}

.compact-attempt-log {
  max-height: 300px;
  overflow: auto;
}

.route-select,
select {
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(0,0,0,0.34);
  outline: none;
}

.ranking-page-panel {
  padding: 20px;
}

.full-ranking-list {
  margin-top: 18px;
}

.compact-system-title {
  padding: 20px;
}

.compact-nucleo-grid .ops-card {
  min-height: auto;
}

@keyframes adminPanelIn {
  from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (max-width: 1040px) {
  .admin-workbench-head,
  .split-head {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-head-actions {
    justify-content: flex-start;
  }
  .admin-workbench-grid,
  .admin-layer-layout,
  .admin-monitor-columns {
    grid-template-columns: 1fr;
  }
  .layers-preview {
    position: static;
  }
  .form-grid-4,
  .admin-monitor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .form-grid-4,
  .admin-monitor-grid,
  .archive-node,
  .ranking-row,
  .layer-row {
    grid-template-columns: 1fr;
  }
  .archive-node .status-pill {
    width: fit-content;
  }
}

/* === ENIGMAL Fase 5 — Sigilo de Camadas + Editor Visual === */
.puzzle-row.is-redacted {
  position: relative;
  overflow: hidden;
  opacity: 0.78;
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(255,51,111,0.055), rgba(7,10,18,0.84)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 8px, transparent 8px 18px);
}

.puzzle-row.is-redacted::after {
  content: "SIGILO";
  position: absolute;
  right: 18px;
  top: 10px;
  color: rgba(255,255,255,0.08);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.26em;
  pointer-events: none;
}

.puzzle-row.is-redacted .puzzle-index {
  border-color: rgba(255,51,111,0.28);
  color: rgba(255,255,255,0.74);
  background: rgba(255,51,111,0.08);
}

.puzzle-row.is-redacted h3 {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-layer-actions,
.editor-actions,
.layer-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.admin-layer-layout-editor {
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
}

.layer-structure-panel {
  order: 0;
}

.layer-editor-form {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 16px;
  background: rgba(0,0,0,0.14);
}

.layer-editor-banner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(73,255,212,0.08), transparent 42%),
    rgba(0,0,0,0.18);
}

.layer-editor-banner h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.layer-editor-banner small,
.field-note {
  color: var(--muted);
  line-height: 1.45;
}

.field-note {
  margin: -4px 0 0;
  font-size: 0.84rem;
}

.puzzle-admin-row.layer-row {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.puzzle-admin-row.layer-row.is-active {
  border-color: rgba(73,255,212,0.42);
  background: rgba(73,255,212,0.07);
  box-shadow: 0 0 30px rgba(73,255,212,0.08);
}

.puzzle-admin-row.layer-row .module-action {
  min-height: 34px;
  padding: 8px 10px;
}

@media (max-width: 980px) {
  .admin-layer-layout-editor {
    grid-template-columns: 1fr;
  }

  .layers-preview,
  .layer-structure-panel {
    position: static;
  }

  .puzzle-admin-row.layer-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .layer-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Fase 6 — Canais Terminal */
.channels-stage {
  width: 100%;
}

.channels-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.channel-archives,
.channel-terminal {
  min-height: 620px;
}

.channel-archives {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.channel-archive-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.channel-archive-node {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  color: var(--text);
  background: rgba(0,0,0,0.18);
  transition: border 160ms ease, transform 160ms ease, background 160ms ease;
}

.channel-archive-node:hover,
.channel-archive-node.active {
  border-color: rgba(73,255,212,0.42);
  background: rgba(73,255,212,0.07);
  transform: translateY(-1px);
}

.channel-archive-node .node-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--cyan);
  background: rgba(73,255,212,0.06);
  font-size: 1.2rem;
}

.channel-archive-node strong,
.channel-archive-node small {
  display: block;
}

.channel-archive-node small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.channel-terminal {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  gap: 14px;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.terminal-header h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}

.terminal-header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.terminal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 8px;
  min-width: min(390px, 100%);
}

.terminal-stats span {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 10px;
  background: rgba(0,0,0,0.18);
}

.terminal-stats strong,
.terminal-stats small {
  display: block;
}

.terminal-stats strong {
  color: var(--cyan);
  font-size: 0.95rem;
  text-transform: lowercase;
}

.terminal-stats small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.terminal-messages {
  min-height: 360px;
  max-height: 62vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(73,255,212,0.13);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.34), rgba(0,0,0,0.18)),
    repeating-linear-gradient(to bottom, rgba(73,255,212,0.035), rgba(73,255,212,0.035) 1px, transparent 1px, transparent 18px);
}

.terminal-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
}

.terminal-prompt {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,255,212,0.24);
  border-radius: 9px;
  color: var(--cyan);
  background: rgba(73,255,212,0.06);
  font-weight: 900;
}

.terminal-message-body {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(6, 9, 17, 0.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.terminal-message.mine .terminal-message-body {
  border-color: rgba(73,255,212,0.22);
  background: rgba(73,255,212,0.06);
}

.system-message .terminal-message-body {
  border-color: rgba(247,201,106,0.2);
  background: rgba(247,201,106,0.055);
}

.deleted-message {
  opacity: 0.58;
}

.error-message .terminal-message-body {
  border-color: rgba(255,83,112,0.34);
}

.terminal-message header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
}

.terminal-message strong {
  color: #e9f7ff;
}

.terminal-message time {
  color: var(--muted);
  font-size: 0.76rem;
}

.terminal-message p {
  margin: 0;
  color: #d6e1f3;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.terminal-message blockquote {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-left: 2px solid rgba(73,255,212,0.42);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(0,0,0,0.22);
  font-size: 0.86rem;
}

.terminal-message blockquote span {
  display: block;
  color: var(--cyan);
  font-weight: 800;
  margin-bottom: 3px;
}

.terminal-message footer {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.terminal-message footer button,
.reply-banner button {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--cyan);
  background: rgba(73,255,212,0.06);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.terminal-mention {
  color: var(--amber);
  font-weight: 900;
}

.terminal-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 4px;
}

.terminal-composer label span {
  margin-bottom: 8px;
}

.terminal-composer input:disabled {
  opacity: 0.58;
}

.compact-primary {
  min-height: 52px;
  white-space: nowrap;
}

.reply-banner {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(247,201,106,0.24);
  border-radius: 16px;
  padding: 10px 12px;
  color: #ffe2a1;
  background: rgba(247,201,106,0.07);
}

.head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .channels-layout { grid-template-columns: 1fr; }
  .channel-archives, .channel-terminal { min-height: auto; }
  .terminal-header { flex-direction: column; }
  .terminal-stats { width: 100%; min-width: 0; }
}

@media (max-width: 620px) {
  .terminal-stats { grid-template-columns: 1fr; }
  .terminal-composer { grid-template-columns: 1fr; }
  .terminal-messages { max-height: 58vh; padding: 10px; }
}

/* Fase 6.1 — Chat contextual dentro da Camada jogável */
.play-shell {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 16px;
}

.puzzle-live-chat {
  min-width: 0;
}

.puzzle-chat-panel {
  position: sticky;
  top: 16px;
  min-height: 620px;
  max-height: calc(100vh - 34px);
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.twitch-terminal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.twitch-terminal-header h3 {
  margin: 0;
  font-size: 1.16rem;
  letter-spacing: -0.03em;
}

.twitch-terminal-header p {
  font-size: 0.84rem;
  line-height: 1.42;
}

.terminal-mini-stats {
  display: grid;
  gap: 6px;
  min-width: 84px;
}

.terminal-mini-stats span {
  display: block;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 6px 8px;
  color: var(--cyan);
  background: rgba(73,255,212,0.05);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.twitch-terminal-messages {
  min-height: 320px;
  max-height: none;
  font-size: 0.88rem;
}

.twitch-terminal-composer {
  grid-template-columns: minmax(0, 1fr) auto;
}

.twitch-terminal-composer .compact-primary {
  min-height: 50px;
  padding-inline: 14px;
}

@media (max-width: 1100px) {
  .play-shell {
    grid-template-columns: 1fr;
  }

  .puzzle-chat-panel {
    position: relative;
    top: auto;
    min-height: 520px;
    max-height: none;
  }
}

@media (max-width: 620px) {
  .twitch-terminal-header {
    grid-template-columns: 1fr;
  }

  .terminal-mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .twitch-terminal-composer {
    grid-template-columns: 1fr;
  }
}

/* ===== FASE 6.2 — TERMINAL HACKER NO CHAT ===== */
.puzzle-chat-panel.terminal-window-shell {
  position: sticky;
  top: 16px;
  min-height: 680px;
  max-height: calc(100vh - 34px);
  grid-template-rows: auto auto minmax(340px, 1fr) auto;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(73,255,212,0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 0%, rgba(73,255,212,0.10), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(0,255,153,0.06), transparent 22%),
    linear-gradient(180deg, rgba(5,10,10,0.96), rgba(5,7,10,0.97));
  box-shadow: 0 28px 80px rgba(0,0,0,0.44), inset 0 1px 0 rgba(255,255,255,0.04), inset 0 0 48px rgba(73,255,212,0.04);
}

.puzzle-chat-panel.terminal-window-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 4px);
  opacity: 0.28;
  mix-blend-mode: screen;
  pointer-events: none;
}

.terminal-window-topbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(73,255,212,0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
}

.window-dots {
  display: inline-flex;
  gap: 7px;
}
.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  box-shadow: 0 0 10px rgba(255,255,255,0.07);
}
.window-dots span:nth-child(1) { background: #ff5f56; }
.window-dots span:nth-child(2) { background: #ffbd2e; }
.window-dots span:nth-child(3) { background: #27c93f; }

.terminal-window-title,
.terminal-window-state {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  font-size: 0.74rem;
}

.terminal-window-title {
  color: rgba(220,255,240,0.74);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-window-state {
  padding: 6px 10px;
  border: 1px solid rgba(73,255,212,0.16);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(73,255,212,0.06);
}

.terminal-window-state.sealed {
  color: #ff9ab7;
  border-color: rgba(255,51,111,0.22);
  background: rgba(255,51,111,0.08);
}

.hacker-terminal-header {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(73,255,212,0.10);
}

.terminal-heading-block h3 {
  margin: 3px 0 0;
  color: #e8fff3;
  font-size: 1.18rem;
  letter-spacing: -0.04em;
}

.terminal-boot-lines {
  margin-top: 12px;
  display: grid;
  gap: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: rgba(159,255,208,0.86);
}

.terminal-boot-lines span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-chip-stats {
  grid-template-columns: repeat(2, minmax(84px, 1fr));
  gap: 8px;
}

.terminal-chip-stats span {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(73,255,212,0.12);
  border-radius: 16px;
  background: rgba(73,255,212,0.04);
  text-align: center;
}

.terminal-chip-stats strong,
.terminal-chip-stats small {
  display: block;
  line-height: 1.1;
}

.terminal-chip-stats strong {
  color: #eafffb;
  font-size: 1rem;
}

.terminal-chip-stats small {
  color: rgba(159,255,208,0.72);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hacker-terminal-messages {
  position: relative;
  overflow: auto;
  min-height: 380px;
  max-height: none;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.12)),
    radial-gradient(circle at 50% 0%, rgba(73,255,212,0.06), transparent 42%);
}

.terminal-grid-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(73,255,212,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73,255,212,0.025) 1px, transparent 1px);
  background-size: 100% 32px, 32px 100%;
  opacity: 0.34;
  pointer-events: none;
}

.terminal-stream {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.terminal-line {
  display: grid;
  grid-template-columns: 40px 16px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  animation: terminalLineIn 180ms ease both;
}

.line-number {
  padding-top: 4px;
  color: rgba(120,180,160,0.55);
  font-size: 0.72rem;
  text-align: right;
  user-select: none;
}

.terminal-line .terminal-prompt {
  min-width: 0;
  padding-top: 3px;
  color: #69ffb8;
  font-size: 0.86rem;
  font-weight: 900;
}

.terminal-line-body {
  padding: 10px 12px 11px;
  border: 1px solid rgba(73,255,212,0.10);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(6,18,12,0.82), rgba(5,10,9,0.56));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.terminal-line.mine .terminal-line-body {
  border-color: rgba(73,255,212,0.24);
  background: linear-gradient(180deg, rgba(7,24,19,0.88), rgba(4,13,9,0.62));
}

.terminal-line.system-message .terminal-line-body {
  border-color: rgba(247,201,106,0.18);
  background: linear-gradient(180deg, rgba(27,20,5,0.82), rgba(14,11,3,0.52));
}

.terminal-line.deleted-message .terminal-line-body {
  opacity: 0.6;
  border-style: dashed;
}

.terminal-line.error-message .terminal-line-body {
  border-color: rgba(255,83,112,0.30);
  background: linear-gradient(180deg, rgba(26,8,12,0.86), rgba(18,6,8,0.58));
}

.terminal-line-body header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.terminal-line-body strong {
  color: #b4ffd9;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.terminal-line-body time {
  color: rgba(160,220,190,0.56);
  font-size: 0.68rem;
}

.terminal-line-body p {
  margin: 0;
  color: #e8fff4;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.86rem;
}

.terminal-line-body blockquote {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-left: 2px solid rgba(73,255,212,0.3);
  border-radius: 8px;
  background: rgba(73,255,212,0.05);
}

.terminal-line-body blockquote span,
.terminal-line-body blockquote code {
  display: block;
  font-family: inherit;
}

.terminal-line-body blockquote span {
  color: var(--cyan);
  font-size: 0.72rem;
  margin-bottom: 3px;
}

.terminal-line-body blockquote code {
  color: rgba(223,247,255,0.72);
  font-size: 0.77rem;
}

.terminal-line-body footer {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.terminal-line-body footer button {
  padding: 6px 9px;
  border: 1px solid rgba(73,255,212,0.14);
  border-radius: 10px;
  color: rgba(168,255,220,0.88);
  background: rgba(73,255,212,0.05);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.terminal-line-body footer button:hover {
  border-color: rgba(73,255,212,0.3);
  background: rgba(73,255,212,0.10);
}

.terminal-mention {
  color: #76fffd;
  font-weight: 800;
}

.terminal-hacker-composer {
  position: relative;
  z-index: 1;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(73,255,212,0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
}

.terminal-input-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(73,255,212,0.12);
  border-radius: 16px;
  background: rgba(4,9,8,0.78);
  box-shadow: inset 0 0 28px rgba(73,255,212,0.02);
}

.terminal-input-shell.is-disabled {
  opacity: 0.56;
}

.terminal-input-prompt {
  padding-top: 2px;
  color: #69ffb8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.5;
  word-break: break-all;
}

.terminal-hacker-composer textarea {
  min-height: 74px;
  resize: vertical;
  border: 0;
  outline: none;
  color: #ecfff5;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.55;
  font-size: 0.86rem;
}

.terminal-hacker-composer textarea::placeholder {
  color: rgba(160,220,190,0.44);
}

.terminal-hacker-composer textarea:disabled {
  cursor: not-allowed;
}

.terminal-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.terminal-composer-foot small {
  color: rgba(160,220,190,0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.69rem;
  letter-spacing: 0.04em;
}

.terminal-submit {
  min-height: 46px;
  padding-inline: 14px;
  letter-spacing: 0.08em;
}

.terminal-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(73,255,212,0.12);
  border-radius: 12px;
  color: rgba(168,255,220,0.9);
  background: rgba(73,255,212,0.05);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.terminal-reply-banner button {
  border: 0;
  color: #f7c96a;
  background: transparent;
  font-family: inherit;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.terminal-line.is-booting .terminal-line-body p,
.terminal-boot-lines span:first-child {
  animation: hackerBlink 1.35s steps(2, end) infinite;
}

@keyframes terminalLineIn {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes hackerBlink {
  0%, 48% { opacity: 1; }
  52%, 100% { opacity: 0.55; }
}

@media (max-width: 1100px) {
  .puzzle-chat-panel.terminal-window-shell {
    position: relative;
    top: auto;
    min-height: 560px;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .hacker-terminal-header,
  .terminal-window-topbar,
  .terminal-composer-foot,
  .terminal-input-shell {
    grid-template-columns: 1fr;
  }

  .terminal-window-topbar,
  .terminal-composer-foot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .terminal-chip-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-line {
    grid-template-columns: 34px 14px minmax(0, 1fr);
  }
}

/* ===== FASE 6.3 — LAYOUT AMPLO PARA CAMADA + TERMINAL ===== */
body.dashboard-active .app-shell {
  width: min(1540px, calc(100% - 18px));
  padding: 12px 0 28px;
}

body.dashboard-active .dashboard-compact {
  width: 100%;
}

body.dashboard-active .top-console {
  width: 100%;
  grid-template-columns: auto minmax(520px, 1fr) auto;
  gap: 14px;
  padding: 11px 12px;
}

body.dashboard-active .top-nav {
  justify-content: flex-start;
}

body.dashboard-active .route-stage,
body.dashboard-active .route-panel {
  width: 100%;
}

body.dashboard-active .play-shell {
  grid-template-columns: minmax(0, 1.58fr) minmax(430px, 520px);
  gap: 20px;
}

body.dashboard-active .puzzle-play-card {
  min-width: 0;
}

body.dashboard-active .puzzle-chat-panel.terminal-window-shell {
  min-width: 430px;
}

body.dashboard-active .hacker-terminal-messages {
  min-height: 430px;
}

@media (min-width: 1600px) {
  body.dashboard-active .app-shell {
    width: min(1660px, calc(100% - 24px));
  }

  body.dashboard-active .play-shell {
    grid-template-columns: minmax(0, 1.7fr) minmax(480px, 560px);
    gap: 22px;
  }

  body.dashboard-active .puzzle-chat-panel.terminal-window-shell {
    min-width: 480px;
  }
}

@media (max-width: 1320px) {
  body.dashboard-active .app-shell {
    width: min(100% - 18px, 1280px);
  }

  body.dashboard-active .top-console {
    grid-template-columns: auto minmax(360px, 1fr) auto;
  }

  body.dashboard-active .play-shell {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
    gap: 16px;
  }

  body.dashboard-active .puzzle-chat-panel.terminal-window-shell {
    min-width: 380px;
  }
}

@media (max-width: 1100px) {
  body.dashboard-active .top-console {
    grid-template-columns: 1fr;
  }

  body.dashboard-active .play-shell {
    grid-template-columns: 1fr;
  }

  body.dashboard-active .puzzle-chat-panel.terminal-window-shell {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 620px) {
  body.dashboard-active .app-shell {
    width: min(100% - 12px, 760px);
  }
}

/* ===== FASE 6.4 — REWORK DO TERMINAL LATERAL ===== */
body.dashboard-active .puzzle-chat-panel.terminal-window-shell,
.puzzle-chat-panel.terminal-window-shell {
  min-height: 0 !important;
  height: clamp(620px, calc(100vh - 132px), 760px) !important;
  max-height: calc(100vh - 132px) !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
}

.hacker-terminal-header {
  padding: 12px 14px 10px !important;
  gap: 10px !important;
}

.terminal-window-topbar {
  padding: 9px 12px !important;
}

.terminal-heading-block h3 {
  font-size: 1.02rem !important;
  line-height: 1.1;
}

.terminal-heading-block .eyebrow {
  margin-bottom: 6px;
  font-size: 0.66rem;
}

.terminal-boot-lines {
  margin-top: 8px !important;
  gap: 3px !important;
  font-size: 0.70rem !important;
}

.terminal-chip-stats {
  grid-template-columns: repeat(2, minmax(62px, 1fr)) !important;
  gap: 6px !important;
}

.terminal-chip-stats span {
  min-height: 46px !important;
  padding: 6px 8px !important;
  border-radius: 13px !important;
}

.terminal-chip-stats strong { font-size: 0.92rem !important; }
.terminal-chip-stats small { font-size: 0.60rem !important; }

.hacker-terminal-messages {
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  padding: 12px !important;
}

.terminal-stream {
  gap: 7px !important;
}

.terminal-line,
.terminal-line.terminal-line-compact {
  grid-template-columns: 32px 12px minmax(0, 1fr) !important;
  gap: 7px !important;
}

.line-number {
  padding-top: 3px !important;
  font-size: 0.64rem !important;
}

.terminal-line .terminal-prompt {
  padding-top: 2px !important;
  font-size: 0.76rem !important;
}

.terminal-line-body {
  padding: 8px 10px !important;
  border-radius: 12px !important;
}

.terminal-line-body header {
  margin-bottom: 4px !important;
}

.terminal-line-body strong {
  font-size: 0.70rem !important;
  letter-spacing: 0.10em !important;
}

.terminal-line-body time {
  font-size: 0.62rem !important;
}

.terminal-line-body p {
  font-size: 0.78rem !important;
  line-height: 1.42 !important;
}

.terminal-line-body blockquote {
  margin-bottom: 6px !important;
  padding: 6px 8px !important;
}

.terminal-line-body blockquote span,
.terminal-line-body blockquote code {
  font-size: 0.68rem !important;
}

.terminal-line-body footer {
  margin-top: 7px !important;
  gap: 6px !important;
}

.terminal-line-body footer button {
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: 0.62rem !important;
}

.terminal-hacker-composer.terminal-rework-composer {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  padding: 10px 12px 12px !important;
  border-top: 1px solid rgba(73,255,212,0.14) !important;
  background:
    linear-gradient(180deg, rgba(73,255,212,0.035), rgba(0,0,0,0)),
    rgba(2,7,6,0.90) !important;
}

.terminal-input-shell.terminal-input-reworked {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 9px 10px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

.terminal-command-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  min-width: 0;
}

.terminal-command-row .terminal-input-prompt {
  display: block;
  min-width: 0;
  color: #69ffb8;
  font-size: 0.70rem !important;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-command-hint {
  flex: 0 0 auto;
  color: rgba(160,220,190,0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-hacker-composer.terminal-rework-composer textarea {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 54px !important;
  max-height: 104px !important;
  padding: 0 !important;
  overflow-y: auto !important;
  resize: none !important;
  border: 0 !important;
  outline: none !important;
  color: #ecfff5 !important;
  background: transparent !important;
  font-size: 0.82rem !important;
  line-height: 1.45 !important;
}

.terminal-composer-foot.terminal-composer-foot-reworked {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
}

.terminal-composer-foot.terminal-composer-foot-reworked small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.62rem !important;
}

.terminal-submit {
  min-height: 40px !important;
  padding: 9px 12px !important;
  border-radius: 13px !important;
  font-size: 0.75rem !important;
}

.terminal-reply-banner {
  padding: 7px 9px !important;
  border-radius: 10px !important;
  font-size: 0.66rem !important;
}

@media (max-width: 1100px) {
  body.dashboard-active .puzzle-chat-panel.terminal-window-shell,
  .puzzle-chat-panel.terminal-window-shell {
    height: auto !important;
    min-height: 560px !important;
    max-height: none !important;
  }
}

@media (max-width: 620px) {
  .terminal-command-row,
  .terminal-composer-foot.terminal-composer-foot-reworked {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }

  .terminal-command-hint {
    display: none;
  }
}

/* ===== FASE 6.5 — CHAT REFEITO DO ZERO ===== */
#puzzle-live-chat.puzzle-live-chat {
  min-width: 0;
  align-self: start;
}

.enigma-chat-shell {
  position: sticky;
  top: 14px;
  width: 100%;
  min-width: 0;
  height: clamp(560px, calc(100vh - 132px), 760px);
  max-height: calc(100vh - 132px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(68, 255, 190, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px),
    #020403;
  background-size: 100% 28px, 28px 100%, auto;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255,255,255,0.025),
    inset 0 0 64px rgba(31, 255, 154, 0.035);
  color: #dfffe9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.enigma-chat-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 4px);
  opacity: 0.22;
  z-index: 0;
}

.enigma-chat-shell > * {
  position: relative;
  z-index: 1;
}

.ec-topbar {
  flex: 0 0 auto;
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(68, 255, 190, 0.14);
  background: #050706;
}

.ec-dots {
  display: inline-flex;
  gap: 6px;
}
.ec-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.24);
}
.ec-dots span:nth-child(1) { background: #ff5f56; }
.ec-dots span:nth-child(2) { background: #ffbd2e; }
.ec-dots span:nth-child(3) { background: #27c93f; }

.ec-title {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.ec-title strong,
.ec-title small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ec-title strong {
  color: #f2fff7;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ec-title small {
  color: rgba(180,255,215,0.56);
  font-size: 0.68rem;
}

.ec-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 5px 9px;
  border: 1px solid rgba(68, 255, 190, 0.20);
  border-radius: 999px;
  color: #64ffb5;
  background: rgba(68, 255, 190, 0.06);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.ec-status.sealed {
  color: #ff9ab7;
  border-color: rgba(255, 51, 111, 0.28);
  background: rgba(255, 51, 111, 0.07);
}

.ec-meta {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(68, 255, 190, 0.11);
  background: rgba(0,0,0,0.34);
}
.ec-meta .eyebrow {
  margin-bottom: 7px;
  color: rgba(180,255,215,0.76);
  font-size: 0.62rem;
}
.ec-meta h3 {
  margin: 0;
  color: #f4fff7;
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.ec-counters {
  display: grid;
  grid-template-columns: repeat(2, minmax(54px, 1fr));
  gap: 6px;
}
.ec-counters span {
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 6px 8px;
  border: 1px solid rgba(68, 255, 190, 0.12);
  border-radius: 13px;
  background: rgba(68, 255, 190, 0.035);
  text-align: center;
}
.ec-counters b,
.ec-counters small {
  display: block;
  line-height: 1;
}
.ec-counters b {
  color: #ffffff;
  font-size: 0.92rem;
}
.ec-counters small {
  color: rgba(180,255,215,0.56);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ec-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 12px 14px;
  background: #010202;
  scrollbar-color: rgba(68,255,190,0.35) rgba(255,255,255,0.05);
  scrollbar-width: thin;
}
.ec-messages::-webkit-scrollbar { width: 9px; }
.ec-messages::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.ec-messages::-webkit-scrollbar-thumb {
  background: rgba(68,255,190,0.30);
  border-radius: 999px;
}

.ec-stream {
  display: grid;
  gap: 8px;
}

.ec-line {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.ec-index {
  padding-top: 8px;
  color: rgba(151,215,180,0.42);
  font-size: 0.64rem;
  text-align: right;
  user-select: none;
}

.ec-bubble {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(68, 255, 190, 0.10);
  border-radius: 12px;
  background: rgba(5, 9, 7, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}
.ec-line.is-mine .ec-bubble {
  border-color: rgba(68, 255, 190, 0.22);
  background: rgba(5, 17, 12, 0.94);
}
.ec-line.ec-system .ec-bubble {
  border-color: rgba(247, 201, 106, 0.20);
  background: rgba(16, 12, 3, 0.92);
}
.ec-line.is-deleted .ec-bubble {
  opacity: 0.58;
  border-style: dashed;
}

.ec-bubble header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ec-bubble strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #88ffc8;
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ec-bubble time {
  flex: 0 0 auto;
  color: rgba(180,255,215,0.43);
  font-size: 0.60rem;
}
.ec-bubble p {
  margin: 0;
  color: #ecfff4;
  font-size: 0.78rem;
  line-height: 1.42;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ec-bubble blockquote {
  margin: 0 0 7px;
  padding: 6px 8px;
  border-left: 2px solid rgba(68, 255, 190, 0.34);
  border-radius: 8px;
  background: rgba(68, 255, 190, 0.045);
}
.ec-bubble blockquote span,
.ec-bubble blockquote code {
  display: block;
  font-family: inherit;
}
.ec-bubble blockquote span {
  margin-bottom: 2px;
  color: #64ffb5;
  font-size: 0.62rem;
}
.ec-bubble blockquote code {
  color: rgba(224,255,238,0.66);
  font-size: 0.66rem;
  line-height: 1.35;
}
.ec-bubble footer {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.ec-bubble footer button {
  border: 1px solid rgba(68,255,190,0.12);
  border-radius: 8px;
  padding: 4px 7px;
  color: rgba(180,255,215,0.75);
  background: rgba(68,255,190,0.045);
  font-family: inherit;
  font-size: 0.60rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ec-bubble footer button:hover {
  border-color: rgba(68,255,190,0.30);
  color: #ecfff4;
}
.ec-mention {
  color: #64f8ff;
  font-weight: 900;
}

.ec-composer {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(68, 255, 190, 0.16);
  background: #050706;
}
.ec-replying {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid rgba(68,255,190,0.12);
  border-radius: 10px;
  color: rgba(180,255,215,0.78);
  background: rgba(68,255,190,0.045);
  font-size: 0.66rem;
}
.ec-replying button {
  border: 0;
  color: #f7c96a;
  background: transparent;
  font-family: inherit;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ec-input-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(68, 255, 190, 0.16);
  border-radius: 14px;
  background: #010202;
}
.ec-input-row.is-disabled {
  opacity: 0.58;
}
.ec-prompt {
  padding-top: 2px;
  color: #64ffb5;
  font-size: 0.94rem;
  font-weight: 900;
}
.ec-input-row textarea {
  display: block;
  width: 100%;
  min-width: 0;
  height: 58px;
  min-height: 58px;
  max-height: 92px;
  padding: 0;
  margin: 0;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  color: #ecfff4;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
}
.ec-input-row textarea::placeholder {
  color: rgba(180,255,215,0.36);
}
.ec-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.ec-actions small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(180,255,215,0.45);
  font-size: 0.62rem;
}
.ec-actions button {
  min-width: 94px;
  min-height: 38px;
  border: 1px solid rgba(68,255,190,0.22);
  border-radius: 12px;
  color: #04130d;
  background: linear-gradient(135deg, #42ffc2, #dffff2);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(68,255,190,0.12);
}
.ec-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  filter: grayscale(0.5);
}

@media (max-width: 1100px) {
  .enigma-chat-shell {
    position: relative;
    top: auto;
    height: 640px;
    max-height: none;
  }
}

@media (max-width: 620px) {
  .ec-meta,
  .ec-topbar,
  .ec-actions {
    grid-template-columns: 1fr;
  }
  .ec-counters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ec-status {
    justify-self: start;
  }
}

/* ===== FASE 6.6 — CHAT AZUL COMPACTO ===== */
.enigma-chat-shell {
  border-color: rgba(90, 176, 255, 0.28) !important;
  background:
    linear-gradient(rgba(110,180,255,0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110,180,255,0.010) 1px, transparent 1px),
    #010207 !important;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.62),
    inset 0 0 0 1px rgba(255,255,255,0.025),
    inset 0 0 58px rgba(58, 137, 255, 0.045) !important;
  color: #eaf6ff !important;
}

.enigma-chat-shell::before {
  opacity: 0.16 !important;
  background: repeating-linear-gradient(180deg, rgba(105,180,255,0.020) 0 1px, transparent 1px 4px) !important;
}

.ec-topbar,
.ec-composer {
  border-color: rgba(90, 176, 255, 0.15) !important;
  background: #02040b !important;
}

.ec-meta {
  padding: 12px 12px 10px !important;
  border-color: rgba(90, 176, 255, 0.12) !important;
  background: rgba(0,0,0,0.42) !important;
}

.ec-meta .eyebrow {
  color: rgba(158, 212, 255, 0.82) !important;
}

.ec-meta h3,
.ec-title strong {
  color: #f3f9ff !important;
}

.ec-title small,
.ec-counters small,
.ec-actions small {
  color: rgba(170, 216, 255, 0.54) !important;
}

.ec-status {
  border-color: rgba(90, 176, 255, 0.28) !important;
  color: #77c8ff !important;
  background: rgba(90, 176, 255, 0.075) !important;
}

.ec-counters span {
  min-height: 42px !important;
  border-color: rgba(90, 176, 255, 0.15) !important;
  background: rgba(90, 176, 255, 0.040) !important;
}

.ec-counters b {
  color: #ffffff !important;
  font-size: 0.86rem !important;
}

.ec-messages {
  padding: 9px 9px 10px !important;
  background: #000104 !important;
  scrollbar-color: rgba(90,176,255,0.40) rgba(255,255,255,0.05) !important;
}

.ec-messages::-webkit-scrollbar-thumb {
  background: rgba(90,176,255,0.36) !important;
}

.ec-stream {
  gap: 5px !important;
}

.ec-line {
  grid-template-columns: 24px minmax(0, 1fr) !important;
  gap: 6px !important;
}

.ec-index {
  padding-top: 6px !important;
  color: rgba(145, 196, 240, 0.34) !important;
  font-size: 0.56rem !important;
}

.ec-bubble {
  padding: 6px 8px !important;
  border-color: rgba(90, 176, 255, 0.12) !important;
  border-radius: 10px !important;
  background: rgba(3, 7, 16, 0.92) !important;
}

.ec-line.is-mine .ec-bubble {
  border-color: rgba(90, 176, 255, 0.28) !important;
  background: rgba(4, 12, 26, 0.95) !important;
}

.ec-line.ec-system .ec-bubble {
  border-color: rgba(128, 170, 255, 0.28) !important;
  background: rgba(8, 10, 25, 0.94) !important;
}

.ec-bubble header {
  margin-bottom: 2px !important;
  gap: 6px !important;
}

.ec-bubble strong {
  color: #8dd2ff !important;
  font-size: 0.60rem !important;
  letter-spacing: 0.08em !important;
}

.ec-bubble time {
  color: rgba(173, 220, 255, 0.42) !important;
  font-size: 0.54rem !important;
}

.ec-bubble p {
  color: #eaf6ff !important;
  font-size: 0.70rem !important;
  line-height: 1.34 !important;
}

.ec-bubble blockquote {
  margin-bottom: 5px !important;
  padding: 5px 7px !important;
  border-left-color: rgba(90, 176, 255, 0.42) !important;
  background: rgba(90, 176, 255, 0.052) !important;
}

.ec-bubble blockquote span {
  color: #77c8ff !important;
  font-size: 0.56rem !important;
}

.ec-bubble blockquote code {
  color: rgba(225, 244, 255, 0.66) !important;
  font-size: 0.60rem !important;
}

.ec-bubble footer {
  margin-top: 5px !important;
  gap: 5px !important;
}

.ec-bubble footer button {
  padding: 3px 6px !important;
  border-color: rgba(90,176,255,0.16) !important;
  color: rgba(178,222,255,0.76) !important;
  background: rgba(90,176,255,0.045) !important;
  font-size: 0.54rem !important;
}

.ec-bubble footer button:hover {
  border-color: rgba(90,176,255,0.34) !important;
  color: #eef9ff !important;
}

.ec-mention {
  color: #71d4ff !important;
}

.ec-composer {
  gap: 7px !important;
  padding: 9px 10px 10px !important;
}

.ec-replying {
  border-color: rgba(90,176,255,0.16) !important;
  color: rgba(178,222,255,0.82) !important;
  background: rgba(90,176,255,0.045) !important;
}

.ec-input-row {
  grid-template-columns: 12px minmax(0, 1fr) !important;
  gap: 6px !important;
  padding: 8px 10px 8px 11px !important;
  border-color: rgba(90, 176, 255, 0.20) !important;
  background: #000104 !important;
}

.ec-prompt {
  color: #77c8ff !important;
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
}

.ec-input-row textarea {
  height: 48px !important;
  min-height: 48px !important;
  max-height: 76px !important;
  padding: 2px 2px 2px 4px !important;
  color: #eef9ff !important;
  font-size: 0.76rem !important;
  line-height: 1.38 !important;
  caret-color: #77c8ff !important;
}

.ec-input-row textarea::placeholder {
  color: rgba(170,216,255,0.36) !important;
}

.ec-actions {
  gap: 8px !important;
}

.ec-actions button {
  min-width: 86px !important;
  min-height: 34px !important;
  border-color: rgba(90,176,255,0.30) !important;
  color: #02050b !important;
  background: linear-gradient(135deg, #61c7ff, #e4f7ff) !important;
  font-size: 0.66rem !important;
  box-shadow: 0 10px 24px rgba(90,176,255,0.13) !important;
}

@media (max-width: 620px) {
  .ec-line {
    grid-template-columns: 20px minmax(0, 1fr) !important;
  }
  .ec-index {
    font-size: 0.52rem !important;
  }
}


/* ===== FASE 6.7 — MENSAGENS COM LARGURA ADAPTÁVEL ===== */
.ec-line {
  align-items: start !important;
}

.ec-bubble {
  width: fit-content !important;
  max-width: min(92%, 560px) !important;
  min-width: 0 !important;
  justify-self: start !important;
}

.ec-line.is-mine .ec-bubble {
  justify-self: end !important;
}

.ec-line.ec-system .ec-bubble {
  max-width: min(96%, 620px) !important;
}

.ec-bubble header {
  width: 100% !important;
  min-width: min(160px, 100%) !important;
}

.ec-bubble p {
  width: auto !important;
  max-width: 100% !important;
  display: block !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.ec-bubble blockquote {
  width: fit-content !important;
  max-width: 100% !important;
}

.ec-bubble footer {
  width: fit-content !important;
  max-width: 100% !important;
}

@media (max-width: 620px) {
  .ec-bubble,
  .ec-line.ec-system .ec-bubble {
    max-width: 100% !important;
  }
}

/* ===== REWORK VISUAL — NÚCLEO EM PEGADA TERMINAL AZUL ===== */
.nucleo-terminal-page {
  display: grid;
  gap: 16px;
}

.nucleo-console-frame,
.terminal-dashboard-card,
.nucleo-terminal-metrics article {
  border: 1px solid rgba(73, 161, 255, 0.16);
  background:
    radial-gradient(circle at 0% 0%, rgba(73, 161, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(3, 7, 13, 0.96), rgba(2, 4, 8, 0.97));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.035);
}

.nucleo-console-frame {
  overflow: hidden;
  border-radius: 24px;
}

.nucleo-console-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(73, 161, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(220, 238, 255, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}

.console-dots {
  display: inline-flex;
  gap: 7px;
}

.console-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(73, 161, 255, 0.5);
}

.console-dots span:nth-child(1) { background: rgba(255, 83, 112, 0.86); }
.console-dots span:nth-child(2) { background: rgba(247, 201, 106, 0.86); }
.console-dots span:nth-child(3) { background: rgba(73, 161, 255, 0.9); }

.nucleo-command-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 18px;
  align-items: end;
  padding: clamp(22px, 3vw, 32px);
}

.nucleo-title-terminal h1 {
  margin: 0;
  color: #f2f8ff;
  font-size: clamp(2rem, 4.2vw, 4.1rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

.nucleo-title-terminal p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(202, 220, 238, 0.76);
  line-height: 1.58;
}

.nucleo-session-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(73, 161, 255, 0.16);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.32);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.nucleo-session-card .session-label {
  color: rgba(103, 178, 255, 0.82);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nucleo-session-card strong {
  color: #ddecff;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.nucleo-session-card small {
  color: rgba(159, 205, 255, 0.72);
  line-height: 1.45;
}

.nucleo-terminal-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.nucleo-terminal-metrics article {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
}

.nucleo-terminal-metrics small,
.terminal-card-code,
.terminal-dashboard-card small {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.nucleo-terminal-metrics small {
  color: rgba(160, 204, 255, 0.62);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nucleo-terminal-metrics span {
  color: #eaf5ff;
  font-size: 1.8rem;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.nucleo-terminal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 14px;
  align-items: stretch;
}

.terminal-dashboard-card {
  position: relative;
  min-height: 250px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  overflow: hidden;
}

.terminal-dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(73,161,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73,161,255,0.018) 1px, transparent 1px);
  background-size: 100% 34px, 34px 100%;
  opacity: 0.34;
  pointer-events: none;
}

.terminal-dashboard-card > * {
  position: relative;
  z-index: 1;
}

.terminal-dashboard-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.terminal-card-code {
  display: block;
  margin-bottom: 6px;
  color: #67b2ff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.terminal-dashboard-card h2 {
  margin: 0;
  color: #f2f8ff;
  font-size: 1.22rem;
  letter-spacing: -0.035em;
}

.terminal-dashboard-card p {
  margin: 0;
  color: rgba(202, 220, 238, 0.68);
  line-height: 1.5;
  font-size: 0.92rem;
}

.terminal-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(73, 161, 255, 0.16);
  border-radius: 999px;
  color: #9dd0ff;
  background: rgba(73, 161, 255, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.terminal-badge.pulse {
  color: #d8ecff;
  box-shadow: 0 0 22px rgba(73, 161, 255, 0.08);
}

.terminal-mini-files {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.terminal-mini-files div {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid rgba(73, 161, 255, 0.10);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
}

.terminal-mini-files strong {
  color: #e8f5ff;
  font-size: 0.86rem;
}

.terminal-mini-files small {
  color: rgba(160, 204, 255, 0.60);
  font-size: 0.72rem;
}

.terminal-dashboard-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: end;
}

.terminal-route-button,
.terminal-module-grid button {
  border: 1px solid rgba(73, 161, 255, 0.18);
  border-radius: 14px;
  color: #ddecff;
  background: rgba(73, 161, 255, 0.07);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 150ms ease, border 150ms ease, background 150ms ease;
}

.terminal-route-button {
  min-height: 42px;
  padding: 10px 13px;
  font-size: 0.72rem;
}

.terminal-route-button:hover,
.terminal-module-grid button:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 161, 255, 0.34);
  background: rgba(73, 161, 255, 0.12);
}

.terminal-route-button.ghost {
  color: rgba(202, 220, 238, 0.72);
  background: rgba(255, 255, 255, 0.025);
}

.protocol-lines,
.terminal-system-log {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid rgba(73, 161, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.protocol-lines span,
.terminal-system-log span {
  color: rgba(210, 232, 255, 0.84);
  font-size: 0.78rem;
  line-height: 1.45;
}

.terminal-system-log span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
}

.terminal-system-log i {
  color: rgba(103, 178, 255, 0.55);
  font-style: normal;
  text-align: right;
}

.terminal-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.terminal-module-grid button {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  text-align: left;
}

.terminal-module-grid strong {
  color: #f2f8ff;
  font-size: 0.88rem;
}

.terminal-module-grid small {
  color: rgba(160, 204, 255, 0.62);
  font-size: 0.71rem;
  letter-spacing: 0.04em;
}

.files-card { min-height: 360px; }
.protocol-card,
.log-card,
.modules-card { min-height: 230px; }

@media (max-width: 1060px) {
  .nucleo-command-header,
  .nucleo-terminal-grid {
    grid-template-columns: 1fr;
  }

  .nucleo-terminal-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .nucleo-console-topbar,
  .terminal-system-log span,
  .terminal-module-grid {
    grid-template-columns: 1fr;
  }

  .nucleo-terminal-metrics {
    grid-template-columns: 1fr;
  }

  .nucleo-command-header {
    padding: 18px;
  }

  .terminal-dashboard-card header,
  .terminal-dashboard-card footer {
    display: grid;
  }
}

/* ===== REWORK VISUAL — ARQUIVOS COMO EXPLORADOR OCULTO ===== */
.terminal-files-page {
  display: grid;
  gap: 16px;
}

.file-explorer-frame,
.file-explorer-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(73, 161, 255, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(73, 161, 255, 0.10), transparent 30%),
    linear-gradient(180deg, rgba(3, 8, 14, 0.96), rgba(3, 5, 9, 0.98));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.035);
}

.file-explorer-frame::after,
.file-explorer-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(73, 161, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 161, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 34px, 34px 100%;
  opacity: 0.42;
  pointer-events: none;
}

.file-explorer-topbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(73, 161, 255, 0.11);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.file-explorer-topbar strong {
  color: rgba(220, 238, 255, 0.76);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-refresh-button {
  min-height: 34px;
  border: 1px solid rgba(73, 161, 255, 0.18);
  border-radius: 12px;
  padding: 7px 11px;
  color: #ddecff;
  background: rgba(73, 161, 255, 0.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-refresh-button:hover {
  border-color: rgba(73, 161, 255, 0.34);
  background: rgba(73, 161, 255, 0.12);
}

.file-explorer-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 18px;
  align-items: end;
  padding: clamp(18px, 3vw, 28px);
}

.file-explorer-header h1 {
  margin: 0;
  color: #f3f8ff;
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

.file-explorer-header p {
  max-width: 760px;
  margin: 12px 0 0;
  color: rgba(202, 220, 238, 0.72);
  line-height: 1.58;
}

.file-path-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(73, 161, 255, 0.13);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.file-path-card small {
  color: rgba(160, 204, 255, 0.58);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-path-card strong {
  color: #e8f5ff;
  font-size: 0.88rem;
  word-break: break-all;
}

.file-path-card span {
  color: rgba(103, 178, 255, 0.78);
  font-size: 0.76rem;
}

.terminal-file-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.terminal-file-stats article {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(73, 161, 255, 0.13);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(3, 8, 14, 0.94), rgba(0, 0, 0, 0.64));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.terminal-file-stats small {
  color: rgba(160, 204, 255, 0.62);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.terminal-file-stats span {
  color: #f3f8ff;
  font-size: 1.6rem;
  font-weight: 950;
  line-height: 1;
}

.file-explorer-panel {
  padding: 18px;
}

.file-list-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.file-list-toolbar h2 {
  margin: 2px 0 0;
  color: #f3f8ff;
  font-size: 1.32rem;
  letter-spacing: -0.045em;
}

.file-explorer-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.terminal-file-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(73, 161, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(5, 10, 16, 0.90), rgba(0, 0, 0, 0.58)),
    radial-gradient(circle at 100% 0%, rgba(73, 161, 255, 0.06), transparent 38%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  transition: transform 160ms ease, border 160ms ease, background 160ms ease;
}

.terminal-file-card:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 161, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(6, 13, 22, 0.94), rgba(0, 0, 0, 0.66)),
    radial-gradient(circle at 100% 0%, rgba(73, 161, 255, 0.10), transparent 38%);
}

.terminal-file-card.is-live {
  border-color: rgba(73, 161, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 38px rgba(73, 161, 255, 0.045);
}

.file-symbol {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73, 161, 255, 0.18);
  border-radius: 16px;
  color: #ddecff;
  background: rgba(73, 161, 255, 0.055);
  font-size: 1.7rem;
  box-shadow: inset 0 0 24px rgba(73, 161, 255, 0.035);
}

.file-symbol.muted {
  color: rgba(160, 204, 255, 0.58);
}

.file-card-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.file-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.file-card-code {
  color: rgba(103, 178, 255, 0.90);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.terminal-file-card h3 {
  margin: 0;
  color: #f3f8ff;
  font-size: 1.06rem;
  letter-spacing: -0.035em;
}

.terminal-file-card p {
  margin: 0;
  color: rgba(202, 220, 238, 0.68);
  line-height: 1.44;
  font-size: 0.86rem;
}

.file-path-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(160, 204, 255, 0.64);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.file-path-line span {
  color: rgba(103, 178, 255, 0.62);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-path-line code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(225, 242, 255, 0.78);
  font-family: inherit;
}

.file-meta-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.55fr 1fr;
  gap: 8px;
}

.file-meta-grid span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(73, 161, 255, 0.09);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
}

.file-meta-grid small {
  color: rgba(160, 204, 255, 0.56);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-meta-grid strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(232, 245, 255, 0.88);
  font-size: 0.75rem;
}

.file-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.file-progress-row small {
  color: rgba(160, 204, 255, 0.62);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  white-space: nowrap;
}

.file-progress {
  height: 8px;
  margin: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
}

.file-progress span {
  background: linear-gradient(90deg, rgba(73,161,255,0.95), rgba(128,195,255,0.74));
  box-shadow: 0 0 18px rgba(73, 161, 255, 0.14);
}

.file-card-actions {
  display: grid;
  justify-items: end;
}

.file-card-actions .terminal-route-button {
  min-width: 96px;
  text-align: center;
}

@media (max-width: 1120px) {
  .file-explorer-header,
  .terminal-file-card {
    grid-template-columns: 1fr;
  }

  .file-symbol {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
  }

  .file-card-actions {
    justify-items: stretch;
  }
}

@media (max-width: 780px) {
  .file-explorer-topbar,
  .terminal-file-stats,
  .file-meta-grid,
  .file-progress-row {
    grid-template-columns: 1fr;
  }

  .file-list-toolbar,
  .file-card-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-explorer-panel {
    padding: 14px;
  }
}

/* ===== VISUAL — ARQUIVO INTERNO / CAMADAS TERMINAL ===== */
.archive-terminal-detail {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-color: rgba(62, 169, 255, 0.18);
  background:
    radial-gradient(circle at 18% 0%, rgba(62,169,255,0.09), transparent 28%),
    linear-gradient(180deg, rgba(3,7,12,0.98), rgba(2,4,8,0.98));
  box-shadow: 0 22px 70px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.03);
}

.archive-terminal-detail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(62,169,255,0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62,169,255,0.018) 1px, transparent 1px);
  background-size: 100% 34px, 34px 100%;
  opacity: 0.5;
}

.archive-terminal-detail > * {
  position: relative;
  z-index: 1;
}

.archive-terminal-topline {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(62,169,255,0.12);
  color: rgba(214,235,255,0.76);
  background: rgba(255,255,255,0.018);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
}

.archive-terminal-topline span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-terminal-topline strong {
  padding: 5px 9px;
  border: 1px solid rgba(62,169,255,0.18);
  border-radius: 999px;
  color: #8fd0ff;
  background: rgba(62,169,255,0.06);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.archive-detail-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid rgba(62,169,255,0.10);
}

.archive-detail-symbol {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(62,169,255,0.22);
  border-radius: 24px;
  color: #8fd0ff;
  background: rgba(62,169,255,0.055);
  font-size: 3rem;
  box-shadow: inset 0 0 34px rgba(62,169,255,0.04), 0 0 34px rgba(62,169,255,0.08);
}

.archive-detail-copy h2 {
  margin: 0;
  color: #f1f7ff;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  letter-spacing: -0.075em;
  line-height: 0.95;
}

.archive-detail-copy p:not(.eyebrow) {
  max-width: 820px;
  margin: 10px 0 0;
  color: rgba(211,226,242,0.70);
  line-height: 1.55;
}

.archive-detail-path {
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(62,169,255,0.14);
  border-radius: 12px;
  color: #8fd0ff;
  background: rgba(0,0,0,0.32);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.archive-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid rgba(62,169,255,0.10);
  background: rgba(62,169,255,0.08);
}

.archive-metrics-strip article {
  padding: 14px 16px;
  background: rgba(3,7,12,0.92);
}

.archive-metrics-strip span,
.archive-metrics-strip small {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.archive-metrics-strip span {
  color: #eaf6ff;
  font-size: 1.34rem;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.archive-metrics-strip small {
  margin-top: 3px;
  color: rgba(143,208,255,0.70);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.archive-progress-terminal {
  height: 4px;
  background: rgba(62,169,255,0.08);
}

.archive-progress-terminal span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3ea9ff, #8fd0ff);
  box-shadow: 0 0 18px rgba(62,169,255,0.36);
}

.archive-layer-board {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.archive-layer-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.archive-layer-head h3 {
  margin: 0;
  font-size: 1.38rem;
  letter-spacing: -0.045em;
}

.archive-layer-head p {
  margin: 8px 0 0;
  color: rgba(211,226,242,0.64);
  line-height: 1.45;
}

.archive-layer-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(100%, 360px);
}

.archive-layer-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  color: rgba(214,235,255,0.72);
  background: rgba(255,255,255,0.025);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.34);
}
.legend-dot.available { background: #8fd0ff; box-shadow: 0 0 12px rgba(62,169,255,0.42); }
.legend-dot.solved { background: #7ad7ff; }
.legend-dot.sealed { background: #56667a; }

.archive-layer-list {
  display: grid;
  gap: 10px;
}

.archive-layer-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(62,169,255,0.105);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(5,11,18,0.86), rgba(3,7,12,0.74));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  transition: border 160ms ease, transform 160ms ease, background 160ms ease;
}

.archive-layer-row:hover {
  transform: translateY(-1px);
  border-color: rgba(62,169,255,0.22);
  background: linear-gradient(180deg, rgba(7,15,24,0.92), rgba(3,7,12,0.78));
}

.archive-layer-row.is-solved {
  border-color: rgba(143,208,255,0.24);
}

.archive-layer-row.is-available {
  border-color: rgba(62,169,255,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 0 28px rgba(62,169,255,0.055);
}

.archive-layer-row.is-sealed {
  opacity: 0.78;
  border-color: rgba(86,102,122,0.18);
  background: linear-gradient(180deg, rgba(5,8,12,0.82), rgba(3,5,8,0.72));
}

.archive-layer-index {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(62,169,255,0.16);
  border-radius: 14px;
  color: #8fd0ff;
  background: rgba(0,0,0,0.24);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 950;
}

.archive-layer-row.is-sealed .archive-layer-index {
  color: rgba(143,208,255,0.42);
  border-color: rgba(86,102,122,0.22);
}

.archive-layer-content {
  min-width: 0;
}

.archive-layer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
}

.archive-layer-meta span,
.archive-layer-meta strong {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.archive-layer-meta span {
  border: 1px solid rgba(62,169,255,0.12);
  color: rgba(143,208,255,0.76);
  background: rgba(62,169,255,0.045);
}

.archive-layer-meta strong {
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(242,247,255,0.72);
  background: rgba(255,255,255,0.025);
}

.archive-layer-content h3 {
  margin: 0;
  color: #eaf6ff;
  font-size: 1.02rem;
  letter-spacing: -0.035em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-layer-content p {
  margin: 4px 0 0;
  color: rgba(211,226,242,0.58);
  font-size: 0.82rem;
  line-height: 1.35;
}

.archive-layer-row.is-sealed .archive-layer-content h3,
.archive-layer-row.is-sealed .archive-layer-content p {
  color: rgba(211,226,242,0.36);
}

.archive-layer-signal {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.archive-layer-signal span {
  width: 6px;
  height: 24px;
  border-radius: 999px;
  background: rgba(62,169,255,0.18);
}

.archive-layer-row.is-available .archive-layer-signal span {
  background: #3ea9ff;
  box-shadow: 0 0 12px rgba(62,169,255,0.28);
}
.archive-layer-row.is-solved .archive-layer-signal span { background: rgba(143,208,255,0.72); }
.archive-layer-row.is-sealed .archive-layer-signal span { background: rgba(86,102,122,0.30); }
.archive-layer-signal span:nth-child(2) { height: 16px; opacity: 0.74; }
.archive-layer-signal span:nth-child(3) { height: 10px; opacity: 0.52; }

.terminal-layer-action,
.terminal-layer-lock {
  min-width: 94px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 13px;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.terminal-layer-action {
  border: 1px solid rgba(62,169,255,0.24);
  color: #dff3ff;
  background: rgba(62,169,255,0.08);
  cursor: pointer;
}

.terminal-layer-action:hover {
  border-color: rgba(62,169,255,0.42);
  background: rgba(62,169,255,0.14);
}

.terminal-layer-lock {
  border: 1px dashed rgba(86,102,122,0.26);
  color: rgba(211,226,242,0.40);
  background: rgba(255,255,255,0.015);
}

@media (max-width: 900px) {
  .archive-detail-header,
  .archive-layer-head {
    display: grid;
    grid-template-columns: 1fr;
  }
  .archive-detail-actions,
  .archive-layer-legend {
    justify-content: flex-start;
  }
  .archive-metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .archive-layer-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }
  .archive-layer-signal,
  .terminal-layer-action,
  .terminal-layer-lock {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .archive-terminal-topline {
    grid-template-columns: 1fr;
  }
  .archive-detail-header,
  .archive-layer-board {
    padding: 16px;
  }
  .archive-detail-symbol {
    width: 72px;
    height: 72px;
    font-size: 2.35rem;
  }
  .archive-metrics-strip {
    grid-template-columns: 1fr;
  }
}


/* ===== REWORK VISUAL — CAMADA JOGÁVEL EM TERMINAL AZUL ===== */
.play-shell.play-shell-terminal {
  grid-template-columns: minmax(0, 1.48fr) minmax(400px, 500px);
  gap: 18px;
  align-items: start;
}

.layer-play-terminal {
  min-width: 0;
  min-height: 620px;
  display: grid;
  grid-template-rows: auto auto minmax(0, auto) auto;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(73, 161, 255, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(rgba(73,161,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73,161,255,0.014) 1px, transparent 1px),
    radial-gradient(circle at 0% 0%, rgba(73,161,255,0.09), transparent 28%),
    #010207;
  background-size: 100% 34px, 34px 100%, auto, auto;
  box-shadow:
    0 24px 80px rgba(0,0,0,0.52),
    inset 0 0 0 1px rgba(255,255,255,0.025),
    inset 0 0 64px rgba(58,137,255,0.045);
}

.layer-terminal-topbar {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(73,161,255,0.13);
  background: #02040b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.layer-terminal-path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(190, 226, 255, 0.66);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.layer-terminal-state {
  padding: 5px 9px;
  border: 1px solid rgba(73,161,255,0.22);
  border-radius: 999px;
  color: #7dccff;
  background: rgba(73,161,255,0.06);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.layer-terminal-state.accepted {
  border-color: rgba(92, 210, 255, 0.34);
  color: #b6ecff;
}

.layer-play-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid rgba(73,161,255,0.11);
  background: rgba(0,0,0,0.22);
}

.layer-play-header h2 {
  margin: 0;
  color: #f3f9ff;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

.layer-command-line {
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid rgba(73,161,255,0.13);
  border-radius: 12px;
  color: #9dd5ff;
  background: rgba(0,0,0,0.38);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.layer-play-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 8px;
}

.layer-play-status span {
  min-height: 62px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid rgba(73,161,255,0.13);
  border-radius: 16px;
  background: rgba(73,161,255,0.045);
  text-align: center;
}

.layer-play-status strong,
.layer-play-status small {
  display: block;
  line-height: 1;
}

.layer-play-status strong {
  color: #ffffff;
  font-size: 1rem;
}

.layer-play-status small {
  color: rgba(170, 216, 255, 0.54);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.layer-evidence-panel {
  display: grid;
  gap: 12px;
  padding: clamp(18px, 2.4vw, 26px);
}

.terminal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(159, 205, 255, 0.68);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.terminal-section-head i {
  color: rgba(159, 205, 255, 0.44);
  font-style: normal;
  letter-spacing: 0.08em;
}

.puzzle-statement.layer-statement {
  min-height: 210px;
  padding: 18px;
  border-color: rgba(73,161,255,0.14);
  border-radius: 18px;
  color: #eaf6ff;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 0 34px rgba(73,161,255,0.025);
  font-size: 0.96rem;
  line-height: 1.72;
}

.layer-statement p::before {
  content: "> ";
  color: #75c7ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.layer-media-link {
  width: fit-content;
}

.answer-console {
  margin: 0 clamp(18px, 2.4vw, 26px) clamp(18px, 2.4vw, 26px);
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(73,161,255,0.15);
  border-radius: 20px;
  background: #000104;
}

.answer-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.answer-console-head span,
.answer-console-head strong {
  display: block;
  color: #8dd2ff;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.answer-console-head small {
  display: block;
  margin-top: 3px;
  color: rgba(170,216,255,0.48);
  font-size: 0.64rem;
}

.answer-console-head strong {
  color: rgba(234,246,255,0.8);
  text-align: right;
}

.answer-form.answer-form-terminal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.answer-input-line {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(73,161,255,0.18);
  border-radius: 14px;
  background: #02040b;
}

.answer-prompt {
  margin: 0 !important;
  color: #7dccff !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem !important;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.answer-input-line input {
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #f3f9ff;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  box-shadow: none;
}

.answer-input-line input:focus {
  box-shadow: none;
  background: transparent;
}

.answer-input-line input::placeholder {
  color: rgba(170,216,255,0.36);
}

.terminal-answer-button {
  min-width: 116px;
  border: 1px solid rgba(73,161,255,0.34);
  border-radius: 14px;
  color: #02050b;
  background: linear-gradient(135deg, #61c7ff, #e4f7ff);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(73,161,255,0.13);
}

.terminal-answer-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  filter: grayscale(0.4);
}

.answer-feedback.answer-feedback-terminal {
  padding: 10px 12px;
  border-color: rgba(73,161,255,0.13);
  border-radius: 14px;
  background: rgba(3, 7, 16, 0.92);
}

.answer-feedback.answer-feedback-terminal strong {
  color: #8dd2ff;
  font-size: 0.64rem;
}

.answer-feedback.answer-feedback-terminal span {
  color: rgba(218, 238, 255, 0.64);
  font-size: 0.78rem;
}

.answer-feedback.answer-feedback-terminal.accepted {
  border-color: rgba(125, 204, 255, 0.42);
  box-shadow: 0 0 32px rgba(73,161,255,0.10);
}

.answer-feedback.answer-feedback-terminal.accepted strong {
  color: #b6ecff;
}

.answer-feedback.answer-feedback-terminal.rejected {
  border-color: rgba(255,83,112,0.46);
  box-shadow: 0 0 32px rgba(255,83,112,0.08);
}

.answer-feedback.answer-feedback-terminal.rejected strong {
  color: #ff9ab7;
}

@media (max-width: 1320px) {
  body.dashboard-active .play-shell.play-shell-terminal {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
  }
}

@media (max-width: 1100px) {
  .play-shell.play-shell-terminal,
  body.dashboard-active .play-shell.play-shell-terminal {
    grid-template-columns: 1fr;
  }

  .layer-play-terminal {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .layer-terminal-topbar,
  .layer-play-header,
  .answer-form.answer-form-terminal,
  .answer-console-head {
    grid-template-columns: 1fr;
  }

  .layer-terminal-topbar,
  .answer-console-head {
    display: grid;
  }

  .layer-play-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-answer-button {
    min-height: 42px;
  }
}

/* ===== VISUAL TERMINAL — ADMIN / CONSOLE OPERACIONAL ===== */
.admin-console-page {
  display: grid;
  gap: 16px;
}

.admin-terminal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: clamp(18px, 2.4vw, 26px);
  border-color: rgba(73,161,255,0.14);
  background:
    radial-gradient(circle at 0% 0%, rgba(73,161,255,0.11), transparent 30%),
    linear-gradient(180deg, rgba(3,7,16,0.96), rgba(0,1,6,0.94));
}

.admin-terminal-title h2 {
  margin: 0;
  color: #f2f9ff;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

.admin-terminal-title p:not(.eyebrow) {
  max-width: 760px;
  margin: 12px 0 0;
  color: rgba(218,238,255,0.62);
  line-height: 1.55;
}

.admin-console-tabs,
.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-console-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(73,161,255,0.18);
  border-radius: 14px;
  padding: 10px 13px;
  color: #dff4ff;
  background: #02050b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 24px rgba(73,161,255,0.03);
}

.admin-console-tab span {
  color: #7dccff;
  opacity: 0.92;
}

.admin-console-tab.active {
  border-color: rgba(73,161,255,0.38);
  color: #04101b;
  background: linear-gradient(135deg, #62c7ff, #dff5ff);
  box-shadow: 0 14px 34px rgba(73,161,255,0.12);
}

.admin-console-tab.active span {
  color: #05111d;
}

.admin-console-tab.ghost {
  color: rgba(218,238,255,0.68);
  background: rgba(2,5,11,0.78);
}

.admin-console-tab.small {
  min-height: 38px;
  padding: 9px 11px;
  font-size: 0.68rem;
}

.admin-console-layout {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-console-explorer,
.admin-console-workspace {
  border-color: rgba(73,161,255,0.13);
  background:
    radial-gradient(circle at 0% 0%, rgba(73,161,255,0.065), transparent 26%),
    linear-gradient(180deg, rgba(3,7,16,0.96), rgba(0,1,6,0.94));
}

.admin-console-explorer {
  position: sticky;
  top: 14px;
  min-height: 520px;
  padding: 0;
  overflow: hidden;
}

.admin-console-windowbar {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(73,161,255,0.11);
  background: rgba(255,255,255,0.018);
}

.admin-console-windowbar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(125,204,255,0.35);
}

.admin-console-windowbar span:nth-child(1) { background: #ff5f56; }
.admin-console-windowbar span:nth-child(2) { background: #ffbd2e; }
.admin-console-windowbar span:nth-child(3) { background: #62c7ff; }

.admin-console-windowbar strong {
  min-width: 0;
  margin-left: 7px;
  color: rgba(218,238,255,0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-explorer-head {
  padding: 18px 18px 12px;
}

.terminal-explorer-head h3 {
  margin: 0;
  color: #f2f9ff;
  font-size: 1.2rem;
}

.terminal-explorer-head small {
  display: block;
  margin-top: 8px;
  color: rgba(218,238,255,0.52);
  line-height: 1.45;
}

.admin-terminal-tree {
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding: 0 12px 14px;
}

.admin-terminal-tree .archive-node,
.archive-tree .archive-node {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid rgba(73,161,255,0.11);
  border-radius: 16px;
  color: #eaf6ff;
  background: rgba(0,0,0,0.28);
  text-align: left;
}

.admin-terminal-tree .archive-node:hover,
.admin-terminal-tree .archive-node.is-active,
.archive-tree .archive-node:hover,
.archive-tree .archive-node.is-active {
  border-color: rgba(73,161,255,0.30);
  background: rgba(73,161,255,0.07);
}

.admin-terminal-tree .node-icon,
.archive-tree .node-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.18);
  border-radius: 13px;
  color: #8dd2ff;
  background: #02050b;
}

.admin-terminal-tree strong,
.admin-terminal-tree small,
.archive-tree strong,
.archive-tree small {
  display: block;
}

.admin-terminal-tree strong,
.archive-tree strong {
  color: #eaf6ff;
  font-size: 0.86rem;
}

.admin-terminal-tree small,
.archive-tree small {
  margin-top: 3px;
  color: rgba(170,216,255,0.50);
  font-size: 0.72rem;
}

.admin-console-workspace {
  min-height: 560px;
  padding: 0;
  overflow: hidden;
}

.admin-console-panel {
  display: none;
  padding: clamp(16px, 2.2vw, 24px);
}

.admin-console-panel.is-active {
  display: grid;
  gap: 18px;
}

.admin-console-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(73,161,255,0.10);
}

.admin-console-panel-head h3 {
  margin: 0;
  color: #f2f9ff;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: -0.055em;
}

.admin-console-panel-head p:not(.eyebrow) {
  max-width: 720px;
  margin: 8px 0 0;
  color: rgba(218,238,255,0.56);
  line-height: 1.5;
}

.admin-panel-hint {
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid rgba(73,161,255,0.13);
  border-radius: 14px;
  background: #000104;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: right;
}

.admin-panel-hint span,
.admin-panel-hint strong {
  display: block;
}

.admin-panel-hint span {
  color: rgba(170,216,255,0.48);
  font-size: 0.66rem;
}

.admin-panel-hint strong {
  margin-top: 4px;
  color: #8dd2ff;
  font-size: 0.82rem;
}

.admin-terminal-form {
  display: grid;
  gap: 14px;
}

.admin-form-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(73,161,255,0.11);
  border-radius: 18px;
  background: rgba(0,0,0,0.25);
}

.admin-form-section.compact-section {
  padding: 13px;
}

.admin-section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(218,238,255,0.76);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.admin-section-label span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.20);
  border-radius: 9px;
  color: #8dd2ff;
  background: #02050b;
}

.admin-terminal-form label span {
  color: rgba(218,238,255,0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.70rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.admin-terminal-form input,
.admin-terminal-form textarea,
.admin-terminal-form select {
  border-color: rgba(73,161,255,0.14);
  border-radius: 14px;
  color: #f3f9ff;
  background: #02050b;
  box-shadow: inset 0 0 24px rgba(73,161,255,0.02);
}

.admin-terminal-form input:focus,
.admin-terminal-form textarea:focus,
.admin-terminal-form select:focus {
  border-color: rgba(73,161,255,0.42);
  box-shadow: 0 0 0 3px rgba(73,161,255,0.08), inset 0 0 24px rgba(73,161,255,0.025);
}

.admin-terminal-form textarea {
  resize: vertical;
}

.admin-console-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-console-actions.inline-actions {
  align-items: center;
}

.admin-terminal-layer-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-terminal-layer-list {
  padding: 14px;
  border: 1px solid rgba(73,161,255,0.11);
  border-radius: 20px;
  background: rgba(0,0,0,0.22);
}

.admin-terminal-layer-list .admin-list-head {
  margin-bottom: 12px;
}

.admin-terminal-layer-list .admin-list-head small {
  display: block;
  color: rgba(170,216,255,0.50);
  line-height: 1.45;
}

.admin-puzzles-list {
  display: grid;
  gap: 9px;
}

.admin-puzzles-list .puzzle-admin-row,
.puzzle-admin-row.layer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(73,161,255,0.10);
  border-radius: 15px;
  background: #02050b;
}

.puzzle-admin-row.layer-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.puzzle-admin-row.layer-row.is-active,
.puzzle-admin-row.layer-row:hover {
  border-color: rgba(73,161,255,0.30);
  background: rgba(73,161,255,0.065);
}

.puzzle-admin-row > span {
  width: 34px;
  height: 34px;
  border-color: rgba(73,161,255,0.18);
  border-radius: 11px;
  color: #8dd2ff;
  background: #000104;
  font-size: 0.78rem;
}

.puzzle-admin-row strong {
  color: #eaf6ff;
  font-size: 0.82rem;
}

.puzzle-admin-row small {
  color: rgba(170,216,255,0.50);
  font-size: 0.72rem;
}

.layer-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.layer-row-actions .module-action,
.admin-console-actions .module-action {
  min-height: 34px;
  padding: 8px 10px;
  border-color: rgba(73,161,255,0.14);
  color: rgba(218,238,255,0.76);
  background: rgba(73,161,255,0.04);
  font-size: 0.68rem;
}

.admin-editor-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(73,161,255,0.13);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(73,161,255,0.05), rgba(0,0,0,0.16));
}

.admin-editor-banner .node-icon {
  width: 48px;
  height: 48px;
}

.admin-editor-banner h3 {
  margin: 0;
  color: #f2f9ff;
  font-size: 1.2rem;
}

.admin-editor-banner small,
.terminal-note {
  color: rgba(170,216,255,0.54);
}

.admin-terminal-monitor .ops-card,
.admin-monitoring-stage .ops-card {
  border-color: rgba(73,161,255,0.12);
  background: rgba(0,0,0,0.24);
}

@media (max-width: 1180px) {
  .admin-console-layout,
  .admin-terminal-layer-layout,
  .admin-terminal-hero {
    grid-template-columns: 1fr;
  }

  .admin-console-explorer {
    position: relative;
    top: auto;
    min-height: 0;
  }

  .admin-terminal-tree {
    max-height: 360px;
  }

  .admin-console-tabs {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .admin-console-panel-head,
  .admin-console-actions,
  .admin-console-tabs,
  .layer-row-actions {
    display: grid;
    justify-content: stretch;
  }

  .admin-panel-hint {
    text-align: left;
  }

  .puzzle-admin-row.layer-row,
  .admin-puzzles-list .puzzle-admin-row {
    grid-template-columns: 1fr;
  }
}

/* ===== REWORK VISUAL — FRAGMENTOS / COFRE TERMINAL ===== */
.fragmentos-terminal-route {
  display: grid;
  gap: 16px;
}

.fragmentos-terminal-shell {
  display: grid;
  gap: 16px;
}

.fragmentos-hero {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(73,161,255,0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(73,161,255,0.12), transparent 28%),
    linear-gradient(180deg, #020307, #000104);
  box-shadow: 0 22px 70px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.04);
}

.fragmentos-topbar {
  border-bottom-color: rgba(73,161,255,0.13);
}

.fragmentos-hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 22px;
}

.fragmentos-hero-content h2 {
  margin: 0;
  color: #f2f9ff;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.fragmentos-hero-content p:not(.eyebrow) {
  max-width: 720px;
  margin: 12px 0 0;
  color: rgba(194,222,255,0.66);
  line-height: 1.55;
}

.fragmentos-stats-grid {
  min-width: 280px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fragmentos-stats-grid span {
  min-height: 72px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(73,161,255,0.13);
  border-radius: 16px;
  background: rgba(0,0,0,0.26);
  text-align: center;
}

.fragmentos-stats-grid strong,
.fragmentos-stats-grid small {
  display: block;
  line-height: 1.1;
}

.fragmentos-stats-grid strong {
  color: #dff3ff;
  font-size: 1.25rem;
}

.fragmentos-stats-grid small {
  color: rgba(170,216,255,0.50);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fragmentos-console-grid {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.terminal-mini-panel,
.fragment-vault-panel {
  border: 1px solid rgba(73,161,255,0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(73,161,255,0.08), transparent 34%),
    linear-gradient(180deg, #03050a, #000104);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 18px 54px rgba(0,0,0,0.22);
}

.fragmentos-side-panel {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.fragmentos-log-lines {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(73,161,255,0.10);
  border-radius: 16px;
  background: #000;
  color: rgba(177,220,255,0.76);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.45;
}

.fragmentos-filter-shell {
  display: grid;
  gap: 8px;
}

.fragment-filter {
  min-height: 38px;
  border: 1px solid rgba(73,161,255,0.12);
  border-radius: 13px;
  color: rgba(214,235,255,0.68);
  background: rgba(73,161,255,0.035);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.fragment-filter.active,
.fragment-filter:hover {
  border-color: rgba(73,161,255,0.30);
  color: #dff3ff;
  background: rgba(73,161,255,0.10);
}

.fragment-vault-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.fragment-vault-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(73,161,255,0.10);
}

.fragment-vault-head h3 {
  margin: 0;
  color: #f2f9ff;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.vault-path {
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(73,161,255,0.12);
  border-radius: 999px;
  color: rgba(170,216,255,0.62);
  background: rgba(0,0,0,0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fragment-vault-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fragment-vault-card {
  position: relative;
  min-height: 250px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(73,161,255,0.13);
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(73,161,255,0.08), transparent 34%),
    linear-gradient(180deg, #04070d, #000104);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.fragment-vault-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.022) 0 1px, transparent 1px 5px);
  opacity: 0.24;
  pointer-events: none;
}

.fragment-vault-card.preview {
  border-color: rgba(73,161,255,0.34);
  box-shadow: 0 0 42px rgba(73,161,255,0.10), inset 0 1px 0 rgba(255,255,255,0.04);
}

.fragment-vault-card.sealed {
  border-style: dashed;
  opacity: 0.78;
}

.fragment-card-topline,
.fragment-meta,
.fragment-content,
.fragment-symbol {
  position: relative;
  z-index: 1;
}

.fragment-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fragment-code {
  color: #73bfff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.70rem;
  letter-spacing: 0.14em;
  font-weight: 950;
}

.fragment-state {
  padding: 5px 8px;
  border: 1px solid rgba(73,161,255,0.14);
  border-radius: 999px;
  color: rgba(214,235,255,0.72);
  background: rgba(73,161,255,0.05);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.fragment-state.preview {
  color: #9ed8ff;
  border-color: rgba(73,161,255,0.30);
}

.fragment-state.sealed {
  color: rgba(255,154,183,0.78);
  border-color: rgba(255,51,111,0.22);
  background: rgba(255,51,111,0.06);
}

.fragment-symbol {
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.10);
  border-radius: 18px;
  color: #9ed8ff;
  background: #000;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 950;
  text-shadow: 0 0 24px rgba(73,161,255,0.24);
}

.fragment-vault-card.locked .fragment-symbol,
.fragment-vault-card.sealed .fragment-symbol {
  filter: grayscale(0.2);
  opacity: 0.72;
}

.fragment-content h3 {
  margin: 0;
  color: #edf8ff;
  font-size: 1.02rem;
  letter-spacing: -0.025em;
}

.fragment-content p {
  margin: 8px 0 0;
  color: rgba(194,222,255,0.58);
  line-height: 1.45;
  font-size: 0.82rem;
}

.fragment-meta {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(73,161,255,0.09);
}

.fragment-meta div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.fragment-meta dt,
.fragment-meta dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.69rem;
  line-height: 1.25;
}

.fragment-meta dt {
  color: rgba(170,216,255,0.42);
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.fragment-meta dd {
  color: rgba(224,243,255,0.70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1180px) {
  .fragmentos-console-grid {
    grid-template-columns: 1fr;
  }

  .fragmentos-side-panel {
    position: relative;
    top: auto;
  }

  .fragmentos-filter-shell {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .fragment-vault-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .fragmentos-hero-content,
  .fragment-vault-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .fragmentos-stats-grid,
  .fragmentos-filter-shell,
  .fragment-vault-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== REWORK VISUAL — REGISTROS / MATRIZ DE PROGRESSÃO ===== */
.registers-route {
  display: grid;
  gap: 16px;
}

.terminal-registers-hero {
  padding: 0;
  overflow: hidden;
  border-color: rgba(62, 178, 255, 0.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(62,178,255,0.10), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(104,145,255,0.08), transparent 28%),
    linear-gradient(180deg, rgba(4,8,14,0.98), rgba(2,3,7,0.98));
  box-shadow: 0 20px 70px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.035);
}

.registers-topbar {
  border-bottom-color: rgba(62,178,255,0.12);
}

.registers-hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  gap: 22px;
  align-items: end;
  padding: 22px;
}

.registers-hero-body h1 {
  margin: 0;
  color: #eef7ff;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}

.registers-hero-body p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(210,229,248,0.76);
  line-height: 1.62;
}

.registers-status-stack {
  display: grid;
  gap: 8px;
}

.registers-status-stack span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(62,178,255,0.14);
  border-radius: 14px;
  background: rgba(0,0,0,0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.registers-status-stack strong {
  color: #8ed4ff;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.registers-status-stack small {
  color: rgba(218,238,255,0.62);
  font-size: 0.68rem;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.registers-grid {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.registers-side,
.registers-main .ranking-page-panel {
  border-color: rgba(62,178,255,0.16);
  background:
    radial-gradient(circle at 0% 0%, rgba(62,178,255,0.07), transparent 32%),
    linear-gradient(180deg, rgba(5,9,16,0.96), rgba(2,3,7,0.96));
}

.terminal-section-head h2 {
  margin: 0;
  color: #edf7ff;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.registers-log-stack {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(62,178,255,0.12);
  border-radius: 16px;
  background: #020408;
  box-shadow: inset 0 0 30px rgba(62,178,255,0.025);
}

.registers-log-stack span {
  display: block;
  color: rgba(206,234,255,0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.35;
}

.terminal-ranking-stage .ranking-page-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  overflow: hidden;
}

.terminal-ranking-stage .page-head {
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(62,178,255,0.12);
}

.terminal-ranking-stage .page-head h2 {
  color: #eef7ff;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  letter-spacing: -0.06em;
}

.terminal-ranking-stage .page-head p {
  color: rgba(210,229,248,0.68);
}

.terminal-ranking-stage .route-select,
.registers-route .route-select {
  min-height: 44px;
  border-color: rgba(62,178,255,0.18);
  border-radius: 14px;
  color: #dff3ff;
  background: #03060b;
  box-shadow: inset 0 0 24px rgba(62,178,255,0.025);
}

.terminal-ranking-stage .full-ranking-list {
  display: grid;
  gap: 9px;
}

.terminal-ranking-stage .ranking-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(62,178,255,0.13);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(7,13,22,0.92), rgba(3,6,11,0.86));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.terminal-ranking-stage .ranking-row:hover {
  border-color: rgba(62,178,255,0.28);
  box-shadow: 0 12px 34px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.04);
}

.terminal-ranking-stage .ranking-row > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(62,178,255,0.2);
  border-radius: 13px;
  color: #8ed4ff;
  background: rgba(62,178,255,0.055);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 900;
}

.terminal-ranking-stage .ranking-row strong {
  display: block;
  color: #edf7ff;
  font-size: 0.98rem;
}

.terminal-ranking-stage .ranking-row small {
  display: block;
  margin-top: 3px;
  color: rgba(210,229,248,0.60);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.terminal-ranking-stage .ranking-row i {
  min-width: 76px;
  padding: 8px 10px;
  border: 1px solid rgba(62,178,255,0.14);
  border-radius: 999px;
  color: #dff3ff;
  background: rgba(62,178,255,0.055);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 980px) {
  .registers-hero-body,
  .registers-grid {
    grid-template-columns: 1fr;
  }

  .registers-status-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .registers-status-stack {
    grid-template-columns: 1fr;
  }

  .terminal-ranking-stage .ranking-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .terminal-ranking-stage .ranking-row i {
    grid-column: 2;
    justify-self: start;
  }
}


/* ===== VISUAL LOGIN — TERMINAL ENIGMAL ===== */
.auth-terminal-layout {
  width: min(1240px, 100%);
  min-height: 668px;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 0.72fr);
  border-color: rgba(66, 184, 255, 0.18);
  background:
    radial-gradient(circle at 12% 12%, rgba(66,184,255,0.10), transparent 30%),
    linear-gradient(135deg, rgba(2,4,8,0.96), rgba(4,7,13,0.94));
  box-shadow: 0 32px 90px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
}

.auth-terminal-brand {
  isolation: isolate;
  background:
    radial-gradient(circle at 72% 30%, rgba(66,184,255,0.10), transparent 30%),
    linear-gradient(180deg, rgba(5,8,14,0.96), rgba(1,3,7,0.96));
}

.auth-terminal-brand::after {
  content: "ACCESS // FILESYSTEM // BLUE NODE // 11:11";
  color: rgba(118,199,255,0.12);
}

.auth-terminal-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(66,184,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66,184,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 36% 48%, black, transparent 82%);
  opacity: 0.9;
}

.terminal-orb {
  border-color: rgba(66,184,255,0.20);
  box-shadow: 0 0 90px rgba(66,184,255,0.06);
}

.terminal-orb span {
  border-color: rgba(66,184,255,0.16);
}

.terminal-orb span:nth-child(2) {
  border-color: rgba(118,199,255,0.14);
}

.terminal-orb span:nth-child(3) {
  border-color: rgba(177,222,255,0.18);
}

.terminal-brand-copy {
  max-width: 690px;
}

.auth-glitch {
  text-shadow: 0 0 44px rgba(66,184,255,0.18);
}

.auth-glitch::before {
  color: rgba(42,129,255,0.82);
}

.auth-glitch::after {
  color: rgba(131,215,255,0.88);
}

.auth-terminal-brand .eyebrow,
.auth-terminal-panel .eyebrow {
  color: #72caff;
}

.auth-terminal-brand .brand-text {
  max-width: 610px;
  color: rgba(224,242,255,0.78);
}

.access-terminal-window,
.auth-protocol-card,
.access-node-grid article {
  border: 1px solid rgba(66,184,255,0.16);
  background: linear-gradient(180deg, rgba(3,8,15,0.88), rgba(0,0,0,0.68));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 18px 60px rgba(0,0,0,0.22);
}

.access-terminal-window {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  margin-top: 22px;
  border-radius: 22px;
  overflow: hidden;
}

.access-terminal-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(66,184,255,0.10);
  background: rgba(255,255,255,0.025);
}

.access-terminal-top strong {
  margin-left: 8px;
  color: rgba(224,242,255,0.76);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.access-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(114,202,255,0.65);
  box-shadow: 0 0 12px rgba(66,184,255,0.18);
}

.access-dot:nth-child(1) { background: rgba(255,83,112,0.72); }
.access-dot:nth-child(2) { background: rgba(247,201,106,0.72); }

.access-terminal-lines {
  display: grid;
  gap: 8px;
  padding: 16px;
  color: rgba(218,239,255,0.82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.45;
}

.access-terminal-lines span {
  display: block;
}

.access-terminal-lines i {
  color: #72caff;
  font-style: normal;
  font-weight: 900;
}

.cursor-blink {
  display: inline-block;
  color: #72caff;
  animation: hackerBlink 1.15s steps(2, end) infinite;
}

.access-node-grid {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.access-node-grid article {
  padding: 14px;
  border-radius: 18px;
}

.access-node-grid span,
.access-node-grid strong,
.access-node-grid small {
  display: block;
}

.access-node-grid span {
  color: #72caff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 950;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.access-node-grid strong {
  margin-top: 7px;
  color: #ecf8ff;
  font-size: 0.92rem;
}

.access-node-grid small {
  margin-top: 4px;
  color: rgba(185,218,242,0.58);
  font-size: 0.75rem;
  line-height: 1.35;
}

.auth-terminal-panel {
  padding: clamp(24px, 3.4vw, 38px);
  border-left-color: rgba(66,184,255,0.14);
  background:
    radial-gradient(circle at 80% 0%, rgba(66,184,255,0.08), transparent 30%),
    linear-gradient(180deg, rgba(4,8,15,0.92), rgba(0,0,0,0.72));
}

.terminal-topline {
  background: linear-gradient(90deg, transparent, #42b8ff, #8fd8ff, transparent);
  opacity: 0.85;
}

.auth-protocol-card {
  position: relative;
  padding: 18px;
  border-radius: 26px;
  overflow: hidden;
}

.auth-protocol-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.018) 1px, transparent 1px, transparent 4px);
  opacity: 0.24;
  pointer-events: none;
}

.auth-protocol-card > * {
  position: relative;
  z-index: 1;
}

.auth-protocol-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: rgba(224,242,255,0.66);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-protocol-head small {
  color: #72caff;
}

.terminal-auth-tabs {
  margin-bottom: 22px;
  border-color: rgba(66,184,255,0.12);
  background: rgba(0,0,0,0.38);
}

.terminal-auth-tabs .tab {
  color: rgba(218,239,255,0.62);
}

.terminal-auth-tabs .tab.active {
  color: #00111f;
  background: linear-gradient(135deg, #42b8ff, #d9f4ff);
  box-shadow: 0 14px 34px rgba(66,184,255,0.14);
}

.terminal-auth-copy h2 {
  color: #f0f9ff;
}

.terminal-auth-copy p:not(.eyebrow) {
  color: rgba(185,218,242,0.66);
}

.terminal-forms-stage {
  min-height: 320px;
}

.terminal-auth-form {
  gap: 13px;
}

.terminal-auth-form label span {
  color: rgba(224,242,255,0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-auth-form input {
  border-color: rgba(66,184,255,0.13);
  border-radius: 14px;
  color: #f1faff;
  background: rgba(0,0,0,0.52);
  box-shadow: inset 0 0 24px rgba(66,184,255,0.015);
}

.terminal-auth-form input:focus {
  border-color: rgba(66,184,255,0.72);
  box-shadow: 0 0 0 4px rgba(66,184,255,0.08), inset 0 0 24px rgba(66,184,255,0.025);
  background: rgba(0,0,0,0.72);
}

.terminal-auth-form input::placeholder {
  color: rgba(185,218,242,0.38);
}

.auth-terminal-panel .ghost-action {
  color: #72caff;
  background: rgba(66,184,255,0.08);
  border-color: rgba(66,184,255,0.14);
}

.terminal-primary-action {
  color: #00111f;
  border: 1px solid rgba(66,184,255,0.24);
  background: linear-gradient(135deg, #42b8ff, #d9f4ff 72%, #87d7ff);
  box-shadow: 0 18px 44px rgba(66,184,255,0.13);
}

.terminal-primary-action:hover {
  filter: brightness(1.06);
  box-shadow: 0 20px 50px rgba(66,184,255,0.18);
}

@media (max-width: 980px) {
  .auth-terminal-layout {
    grid-template-columns: 1fr;
    width: min(100%, 760px);
  }

  .auth-terminal-panel {
    border-left: 0;
    border-top: 1px solid rgba(66,184,255,0.14);
  }

  .access-node-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .auth-protocol-card {
    padding: 14px;
  }

  .access-terminal-lines {
    font-size: 0.76rem;
  }

  .terminal-forms-stage {
    min-height: 440px;
  }
}

/* ===== REWORK FINAL — FUNDO, SIDEBAR E RODAPÉ ===== */
:root {
  --bg: #02040a;
  --bg-2: #08111f;
  --panel: rgba(6, 11, 20, 0.84);
  --panel-strong: rgba(4, 8, 16, 0.95);
  --line: rgba(97, 171, 255, 0.16);
  --line-hot: rgba(97, 171, 255, 0.34);
  --cyan: #61abff;
  --success: #7dc7ff;
}

body {
  background:
    radial-gradient(circle at 16% 12%, rgba(97, 171, 255, 0.16), transparent 24%),
    radial-gradient(circle at 85% 14%, rgba(64, 128, 255, 0.11), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(97, 171, 255, 0.08), transparent 32%),
    linear-gradient(135deg, #010208 0%, #040913 46%, #07101d 100%);
}

body::before {
  background-image:
    linear-gradient(rgba(97, 171, 255, 0.040) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 171, 255, 0.030) 1px, transparent 1px);
}

body::after {
  content: "";
  position: fixed;
  inset: -12% -10%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(97,171,255,0.14), transparent 18%),
    radial-gradient(circle at 72% 20%, rgba(97,171,255,0.10), transparent 20%),
    radial-gradient(circle at 58% 74%, rgba(35,85,180,0.12), transparent 24%);
  filter: blur(18px);
  opacity: 0.9;
  animation: enigmalAmbientDrift 18s ease-in-out infinite alternate;
}

@keyframes enigmalAmbientDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -18px, 0) scale(1.05); }
}

.scanlines {
  opacity: 0.12;
}

.auth-layout {
  background: linear-gradient(135deg, rgba(4, 8, 16, 0.92), rgba(3, 6, 12, 0.84));
}

.brand-panel,
.auth-terminal-brand {
  background:
    radial-gradient(circle at 18% 18%, rgba(97,171,255,0.10), transparent 22%),
    radial-gradient(circle at 85% 22%, rgba(97,171,255,0.08), transparent 22%),
    linear-gradient(180deg, rgba(3, 6, 11, 0.96), rgba(5, 10, 18, 0.86));
  border-color: rgba(97,171,255,0.12);
}

.auth-terminal-grid {
  background: repeating-linear-gradient(90deg, rgba(97,171,255,0.028) 0 1px, transparent 1px 34px);
}

.terminal-orb,
.brand-orb {
  filter: hue-rotate(165deg) saturate(0.9);
}

.access-terminal-window {
  border-color: rgba(97,171,255,0.14);
  background: linear-gradient(180deg, rgba(1, 3, 8, 0.94), rgba(5, 10, 18, 0.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 16px 40px rgba(0,0,0,0.24);
}

.access-terminal-top,
.auth-protocol-head,
.terminal-topline {
  border-color: rgba(97,171,255,0.14);
}

.access-node-grid article,
.auth-protocol-card {
  border-color: rgba(97,171,255,0.12);
  background: rgba(0,0,0,0.24);
}

.primary-action,
.terminal-primary-action,
.top-brand,
.top-nav button.active,
.top-nav button[aria-current="page"] {
  box-shadow: 0 10px 30px rgba(97,171,255,0.18);
}

.top-console {
  background: linear-gradient(180deg, rgba(4, 7, 14, 0.92), rgba(5, 9, 18, 0.78));
  border-color: rgba(97,171,255,0.14);
}

.top-brand {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(8, 14, 24, 0.58));
  border-color: rgba(97,171,255,0.12);
}

.top-brand:hover {
  border-color: rgba(97,171,255,0.22);
  background: linear-gradient(180deg, rgba(5, 10, 18, 0.52), rgba(8, 14, 24, 0.72));
}

.brand-mark {
  background: linear-gradient(135deg, rgba(97,171,255,0.22), rgba(97,171,255,0.07));
  border-color: rgba(97,171,255,0.16);
  color: #dff1ff;
}

.top-nav {
  padding: 6px;
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 18px;
  background: rgba(0,0,0,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.top-nav button {
  min-height: 42px;
  border-radius: 12px;
  border-color: transparent;
  color: rgba(220,235,255,0.76);
  background: transparent;
}

.top-nav button:hover {
  color: #eff7ff;
  background: rgba(97,171,255,0.08);
}

.top-nav button.active,
.top-nav button[aria-current="page"] {
  border-color: rgba(97,171,255,0.18);
  background: linear-gradient(135deg, rgba(97,171,255,0.18), rgba(97,171,255,0.08));
  color: #f5fbff;
}

.dashboard-layout {
  row-gap: 18px;
}

.route-stage {
  position: relative;
}

.route-stage::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 20%),
    radial-gradient(circle at 50% 0%, rgba(97,171,255,0.08), transparent 40%);
  z-index: -1;
  pointer-events: none;
}

.global-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  margin: -4px auto 22px;
}

.global-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0,0,0,0.34), rgba(4,8,16,0.62));
  box-shadow: 0 12px 30px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.03);
}

.global-footer__brand {
  display: grid;
  gap: 2px;
}

.global-footer__brand strong {
  font-size: 0.84rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #eff7ff;
}

.global-footer__brand small,
.global-footer__meta {
  color: rgba(195,214,240,0.64);
  font-size: 0.76rem;
}

.global-footer__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-divider {
  color: rgba(97,171,255,0.44);
}

@media (max-width: 880px) {
  .global-footer {
    width: min(100% - 18px, 1180px);
    margin-bottom: 14px;
  }

  .global-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .global-footer__meta {
    justify-content: flex-start;
  }
}

/* ===== FASE 7 — FRAGMENTOS FUNCIONAIS ===== */
.fragment-loading-panel,
.error-fragment-panel {
  padding: 24px;
  border: 1px solid rgba(73, 161, 255, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(3, 8, 16, 0.92), rgba(0,0,0,0.62));
}

.functional-fragment-grid {
  align-items: start;
}

.fragment-vault-status {
  position: sticky;
  top: 92px;
}

.compact-fragment-stats {
  grid-template-columns: 1fr;
  margin: 14px 0;
}

.compact-fragment-stats span {
  min-height: 58px;
}

.small-terminal-button {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  font-size: 0.78rem;
}

.live-fragment-vault-grid {
  align-items: start;
}

.fragment-vault-card.unlocked {
  border-color: rgba(73, 161, 255, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(73,161,255,0.12), transparent 34%),
    linear-gradient(180deg, rgba(3, 9, 18, 0.94), rgba(0, 0, 0, 0.70));
  box-shadow: 0 14px 34px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.04);
}

.fragment-vault-card.locked {
  opacity: 0.78;
  border-style: dashed;
}

.fragment-state.unlocked {
  color: #a9d8ff;
  border-color: rgba(73,161,255,0.24);
  background: rgba(73,161,255,0.08);
}

.fragment-state.locked {
  color: rgba(191, 212, 238, 0.70);
}

.fragment-lore {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(73,161,255,0.10);
  border-radius: 14px;
  background: rgba(73,161,255,0.045);
}

.fragment-lore strong {
  display: block;
  margin-bottom: 4px;
  color: rgba(195,225,255,0.80);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fragment-lore p {
  margin: 0;
  color: rgba(226, 241, 255, 0.78);
  font-size: 0.84rem;
  line-height: 1.45;
}

.wide-fragment-card {
  grid-column: 1 / -1;
  min-height: 220px;
  justify-content: center;
}

.admin-fragments-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 18px;
  align-items: start;
}

.fragment-admin-form {
  min-width: 0;
}

.admin-fragments-list-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(73,161,255,0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(3,8,16,0.90), rgba(0,0,0,0.58));
}

.admin-fragments-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.fragment-admin-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(73,161,255,0.12);
  border-radius: 16px;
  background: rgba(0,0,0,0.24);
}

.fragment-admin-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.22);
  border-radius: 14px;
  color: #a9d8ff;
  background: rgba(73,161,255,0.07);
  font-weight: 900;
}

.fragment-admin-row strong,
.fragment-admin-row small {
  display: block;
}

.fragment-admin-row strong {
  color: #eef8ff;
  font-size: 0.9rem;
}

.fragment-admin-row small,
.fragment-admin-row i {
  color: rgba(198,218,240,0.66);
  font-size: 0.76rem;
  font-style: normal;
}

.fragment-unlock-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.fragment-unlock-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.fragment-unlock-card {
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid rgba(73,161,255,0.28);
  border-radius: 26px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(73,161,255,0.18), transparent 36%),
    linear-gradient(180deg, rgba(3,8,16,0.98), rgba(0,0,0,0.92));
  box-shadow: 0 30px 90px rgba(0,0,0,0.54), inset 0 1px 0 rgba(255,255,255,0.05);
  transform: translateY(12px) scale(0.98);
  transition: transform 220ms ease;
}

.fragment-unlock-overlay.visible .fragment-unlock-card {
  transform: translateY(0) scale(1);
}

.fragment-unlock-symbol {
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.32);
  border-radius: 28px;
  color: #a9d8ff;
  background: rgba(73,161,255,0.08);
  font-size: 2.7rem;
  box-shadow: 0 0 44px rgba(73,161,255,0.13), inset 0 0 30px rgba(73,161,255,0.07);
}

.fragment-unlock-card h3 {
  margin: 0;
  color: #f1f8ff;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.fragment-unlock-card p {
  margin: 10px 0 0;
  color: rgba(220,235,255,0.72);
  line-height: 1.55;
}

.fragment-unlock-card > span {
  display: inline-flex;
  margin-top: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(73,161,255,0.14);
  border-radius: 999px;
  color: #a9d8ff;
  background: rgba(73,161,255,0.06);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.fragment-unlock-card button {
  width: 100%;
  margin-top: 18px;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  color: #03101f;
  background: linear-gradient(135deg, #61abff, #e5f4ff);
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .admin-fragments-layout {
    grid-template-columns: 1fr;
  }

  .admin-fragments-list-panel,
  .fragment-vault-status {
    position: relative;
    top: auto;
  }
}

/* ===== FASE 8 — SHELL COMPACTO + ÁREA DE TRABALHO ===== */
body.dashboard-active .app-shell {
  width: min(1520px, calc(100% - 28px));
  padding: 18px 0 14px;
  display: block;
}

.desktop-shell {
  width: 100%;
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.enigmal-rail.top-console {
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 118px);
  height: calc(100vh - 118px);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border-radius: 26px;
  border: 1px solid rgba(97,171,255,0.14);
  background:
    linear-gradient(180deg, rgba(2, 5, 12, 0.96), rgba(0, 0, 0, 0.76)),
    radial-gradient(circle at 50% 0%, rgba(97,171,255,0.10), transparent 42%);
  box-shadow: 0 22px 70px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.035);
  overflow: hidden;
}

.enigmal-rail.top-console::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(97,171,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97,171,255,0.018) 1px, transparent 1px);
  background-size: 100% 28px, 28px 100%;
  opacity: 0.34;
  pointer-events: none;
}

.rail-brand.top-brand {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 18px;
  text-align: center;
}

.rail-brand .brand-mark {
  width: 44px;
  height: 44px;
  margin: 0;
  font-size: 0.95rem;
}

.rail-brand-copy {
  display: grid;
  gap: 2px;
}

.rail-brand-copy strong {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.rail-brand-copy small {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.rail-nav.top-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rail-nav.top-nav button {
  width: 100%;
  min-height: 64px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 9px 6px;
  border: 1px solid rgba(97,171,255,0.08);
  border-radius: 18px;
  background: rgba(0,0,0,0.20);
  color: rgba(220,235,255,0.68);
  font-size: 0.62rem;
  line-height: 1;
}

.rail-nav .rail-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(97,171,255,0.10);
  border-radius: 10px;
  color: rgba(144,199,255,0.9);
  background: rgba(97,171,255,0.045);
  font-size: 0.95rem;
}

.rail-nav.top-nav button:hover {
  transform: translateY(-1px);
  border-color: rgba(97,171,255,0.18);
  background: rgba(97,171,255,0.07);
}

.rail-nav.top-nav button.active,
.rail-nav.top-nav button[aria-current="page"] {
  border-color: rgba(97,171,255,0.28);
  color: #f2f8ff;
  background: linear-gradient(180deg, rgba(97,171,255,0.16), rgba(97,171,255,0.06));
  box-shadow: 0 0 28px rgba(97,171,255,0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}

.rail-identity.top-identity {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.rail-identity .system-clock,
.rail-identity .user-chip {
  width: 100%;
  min-width: 0;
  border-radius: 16px;
  padding: 9px;
  background: rgba(0,0,0,0.24);
}

.rail-identity .system-clock span {
  font-size: 0.88rem;
  text-align: center;
}

.rail-identity .system-clock small {
  display: none;
}

.rail-identity .user-chip {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: none;
  text-align: center;
}

.rail-identity .user-chip span,
.rail-identity .user-chip small,
.rail-identity .user-chip button {
  grid-area: auto;
}

.rail-identity .user-chip span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
}

.rail-identity .user-chip small {
  font-size: 0.58rem;
}

.rail-identity .user-chip button {
  padding: 7px 8px;
  font-size: 0.62rem;
}

.desktop-workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.workspace-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(0,0,0,0.34), rgba(4,8,16,0.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.workspace-statusbar div {
  display: grid;
  gap: 2px;
}

.workspace-statusbar strong {
  color: #f2f8ff;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.workspace-path,
.workspace-statusbar small {
  color: rgba(195,214,240,0.64);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.desktop-workspace .route-stage {
  min-width: 0;
}

body.dashboard-active .global-footer {
  width: min(1520px, calc(100% - 28px));
  padding-left: 110px;
  margin-top: 0;
}

body.dashboard-active .global-footer__inner {
  min-height: 54px;
}

/* Núcleo como ambiente operacional */
.nucleus-os-page {
  display: grid;
  gap: 16px;
}

.os-boot-panel,
.os-panel,
.desktop-area-shell,
.desktop-canvas {
  border: 1px solid rgba(97,171,255,0.12);
  background:
    linear-gradient(180deg, rgba(3, 8, 15, 0.92), rgba(0, 0, 0, 0.62)),
    radial-gradient(circle at 100% 0%, rgba(97,171,255,0.07), transparent 34%);
  box-shadow: 0 18px 48px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.035);
}

.os-boot-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
}

.os-boot-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(97,171,255,0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97,171,255,0.018) 1px, transparent 1px);
  background-size: 100% 34px, 34px 100%;
  opacity: 0.42;
  pointer-events: none;
}

.os-boot-topline,
.desktop-canvas-topbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(97,171,255,0.10);
  color: rgba(220,235,255,0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
}

.os-boot-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.os-boot-copy h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(2.1rem, 5vw, 4.7rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
  color: #f7fbff;
}

.os-boot-copy p {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(207,225,245,0.72);
  line-height: 1.6;
}

.os-command-line {
  width: min(620px, 100%);
  margin-top: 18px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  border: 1px solid rgba(97,171,255,0.14);
  border-radius: 14px;
  background: rgba(0,0,0,0.32);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: rgba(210,232,255,0.84);
}

.os-command-line span {
  color: #61abff;
}

.os-status-orb {
  position: relative;
  width: 188px;
  height: 188px;
  margin-left: auto;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(97,171,255,0.20);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(97,171,255,0.09), rgba(0,0,0,0.2) 68%);
  box-shadow: inset 0 0 42px rgba(97,171,255,0.06), 0 0 48px rgba(97,171,255,0.10);
}

.os-status-orb span {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(97,171,255,0.16);
  border-radius: inherit;
  animation: desktopOrbit 10s linear infinite;
}

.os-status-orb span:nth-child(2) {
  inset: 42px;
  animation-duration: 14s;
  animation-direction: reverse;
}

.os-status-orb strong {
  color: #f2f8ff;
  font-size: 3.3rem;
  line-height: 0.9;
}

.os-status-orb small {
  color: rgba(195,214,240,0.66);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.66rem;
}

@keyframes desktopOrbit {
  to { transform: rotate(360deg); }
}

.os-quick-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.os-quick-row button,
.os-mini-folders button {
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 18px;
  background: rgba(0,0,0,0.28);
  color: #eef7ff;
  text-align: left;
  transition: transform 150ms ease, border 150ms ease, background 150ms ease;
}

.os-quick-row button {
  min-height: 96px;
  padding: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon title" "icon desc";
  gap: 4px 12px;
  align-items: center;
}

.os-quick-row button:hover,
.os-mini-folders button:hover,
.folder-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(97,171,255,0.24);
  background: rgba(97,171,255,0.065);
}

.os-quick-row span {
  grid-area: icon;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97,171,255,0.14);
  border-radius: 14px;
  color: #8fc8ff;
  background: rgba(97,171,255,0.06);
  font-size: 1.1rem;
}

.os-quick-row strong { grid-area: title; }
.os-quick-row small { grid-area: desc; color: rgba(195,214,240,0.62); }

.os-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.os-panel {
  min-height: 150px;
  padding: 16px;
  border-radius: 22px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.os-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.os-panel header span {
  color: #61abff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.os-panel header strong {
  color: #eef7ff;
  font-size: 0.95rem;
}

.os-panel-metrics,
.os-panel-files { grid-column: span 6; }
.os-panel-protocol,
.os-panel-log { grid-column: span 6; }

.os-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.os-metric-strip div {
  padding: 14px;
  border: 1px solid rgba(97,171,255,0.10);
  border-radius: 16px;
  background: rgba(0,0,0,0.26);
}

.os-metric-strip small,
.os-protocol-list span,
.os-system-log span,
.os-mini-folders small {
  color: rgba(195,214,240,0.62);
}

.os-metric-strip span {
  display: block;
  margin-top: 4px;
  color: #eef7ff;
  font-size: 1.8rem;
  font-weight: 900;
}

.os-mini-folders,
.os-protocol-list,
.os-system-log {
  display: grid;
  gap: 8px;
}

.os-mini-folders button {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon title" "icon desc";
  gap: 2px 10px;
  padding: 10px;
}

.os-mini-folders span {
  grid-area: icon;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(97,171,255,0.06);
}
.os-mini-folders strong { grid-area: title; }
.os-mini-folders small { grid-area: desc; }

.os-protocol-list span,
.os-system-log span {
  padding: 9px 10px;
  border: 1px solid rgba(97,171,255,0.08);
  border-radius: 12px;
  background: rgba(0,0,0,0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.os-system-log i {
  margin-right: 8px;
  color: #61abff;
  font-style: normal;
}

/* Área de Trabalho com pastas */
.desktop-area-page {
  min-height: 100%;
}

.desktop-area-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.desktop-area-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(97,171,255,0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97,171,255,0.018) 1px, transparent 1px);
  background-size: 100% 34px, 34px 100%;
  opacity: 0.42;
  pointer-events: none;
}

.desktop-area-header,
.desktop-system-strip,
.desktop-canvas {
  position: relative;
  z-index: 1;
}

.desktop-area-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: end;
}

.desktop-area-header h1 {
  margin: 0;
  color: #f7fbff;
  font-size: clamp(2.2rem, 4.5vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.desktop-area-header p {
  max-width: 780px;
  margin: 14px 0 0;
  color: rgba(207,225,245,0.72);
  line-height: 1.58;
}

.desktop-path-card {
  padding: 14px;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 18px;
  background: rgba(0,0,0,0.26);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.desktop-path-card small,
.desktop-path-card span { color: rgba(195,214,240,0.62); }
.desktop-path-card strong { color: #eef7ff; font-size: 0.9rem; }
.desktop-path-card button {
  margin-top: 8px;
  min-height: 36px;
  border: 1px solid rgba(97,171,255,0.16);
  border-radius: 12px;
  color: #dff1ff;
  background: rgba(97,171,255,0.07);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.desktop-system-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.desktop-system-strip article {
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid rgba(97,171,255,0.10);
  border-radius: 16px;
  background: rgba(0,0,0,0.24);
}

.desktop-system-strip small {
  color: rgba(195,214,240,0.62);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: 0.66rem;
}

.desktop-system-strip span {
  display: block;
  margin-top: 4px;
  color: #f2f8ff;
  font-size: 1.5rem;
  font-weight: 900;
}

.desktop-canvas {
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
}

.desktop-canvas-topbar {
  background: rgba(0,0,0,0.20);
}

.folder-grid {
  min-height: 420px;
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  align-content: start;
  background:
    radial-gradient(circle at 30% 0%, rgba(97,171,255,0.06), transparent 30%),
    rgba(0,0,0,0.18);
}

.folder-tile {
  position: relative;
  min-height: 238px;
  padding: 22px 16px 16px;
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid rgba(97,171,255,0.13);
  border-radius: 22px;
  color: #eef7ff;
  background: linear-gradient(180deg, rgba(4,10,18,0.88), rgba(0,0,0,0.64));
  box-shadow: 0 14px 34px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.03);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition: transform 160ms ease, border 160ms ease, background 160ms ease, box-shadow 160ms ease;
  animation: folderBootIn 260ms ease both;
}

.folder-tile::after {
  content: "";
  position: absolute;
  inset: auto 14px 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(97,171,255,0.6), transparent);
  opacity: 0.42;
}

.folder-tab {
  position: absolute;
  left: 18px;
  top: -1px;
  width: 78px;
  height: 18px;
  border: 1px solid rgba(97,171,255,0.13);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: rgba(97,171,255,0.08);
}

.folder-icon {
  width: 58px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97,171,255,0.16);
  border-radius: 16px;
  color: #8fc8ff;
  background: rgba(97,171,255,0.06);
  font-size: 1.4rem;
}

.folder-body {
  display: grid;
  gap: 8px;
}

.folder-topline,
.folder-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.folder-topline span,
.folder-body code,
.folder-body em,
.folder-meta span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.folder-topline span {
  color: #61abff;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.folder-body strong {
  font-size: 1.02rem;
  line-height: 1.15;
}

.folder-body small {
  min-height: 34px;
  color: rgba(207,225,245,0.68);
  line-height: 1.4;
}

.folder-body code {
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(97,171,255,0.08);
  border-radius: 10px;
  color: rgba(223,242,255,0.78);
  background: rgba(0,0,0,0.24);
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}

.folder-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #61abff, #dff1ff);
}

.folder-meta span,
.folder-body em {
  color: rgba(195,214,240,0.56);
  font-size: 0.68rem;
  font-style: normal;
}

.folder-tile.is-live {
  border-color: rgba(97,171,255,0.24);
  box-shadow: 0 0 42px rgba(97,171,255,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}

.folder-tile.is-waiting { opacity: 0.86; }
.folder-tile.is-closed { opacity: 0.72; }
.folder-tile.folder-empty { cursor: default; }

@keyframes folderBootIn {
  0% { opacity: 0; transform: translateY(8px) scale(0.98); filter: blur(3px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@media (max-width: 1120px) {
  .desktop-shell {
    grid-template-columns: 1fr;
  }

  .enigmal-rail.top-console {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
  }

  .rail-brand.top-brand {
    width: auto;
    min-width: 90px;
  }

  .rail-nav.top-nav {
    flex-direction: row;
    justify-content: center;
  }

  .rail-nav.top-nav button {
    min-height: 54px;
  }

  .rail-identity.top-identity {
    grid-template-columns: auto auto;
  }

  body.dashboard-active .global-footer {
    padding-left: 0;
  }

  .os-boot-grid,
  .desktop-area-header {
    grid-template-columns: 1fr;
  }

  .os-status-orb {
    margin: 0;
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 760px) {
  body.dashboard-active .app-shell,
  body.dashboard-active .global-footer {
    width: min(100% - 16px, 1520px);
  }

  .enigmal-rail.top-console {
    grid-template-columns: 1fr;
  }

  .rail-nav.top-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rail-nav.top-nav button {
    min-height: 52px;
  }

  .rail-brand-copy,
  .workspace-statusbar small,
  .rail-identity .system-clock {
    display: none;
  }

  .workspace-statusbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .os-quick-row,
  .desktop-system-strip,
  .os-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .os-panel-metrics,
  .os-panel-files,
  .os-panel-protocol,
  .os-panel-log {
    grid-column: span 12;
  }

  .folder-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }
}

/* ===== FASE 8.1b — CORREÇÃO: MENU SUPERIOR, SEM LATERAL ===== */
body.dashboard-active .app-shell {
  width: min(1380px, calc(100% - 28px));
  padding: 18px 0 14px;
  display: block;
}

.desktop-shell.top-shell {
  width: 100%;
  min-height: calc(100vh - 104px);
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 14px;
  align-items: stretch;
}

.enigmal-topbar.top-console {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: 100%;
  min-height: 72px;
  height: auto !important;
  display: grid !important;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto !important;
  grid-template-rows: 1fr !important;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(97,171,255,0.14);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(2, 5, 12, 0.94), rgba(0, 0, 0, 0.70)),
    radial-gradient(circle at 50% 0%, rgba(97,171,255,0.09), transparent 55%);
  box-shadow: 0 22px 70px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.035);
  overflow: visible;
}

.enigmal-topbar.top-console::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(rgba(97,171,255,0.020) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97,171,255,0.014) 1px, transparent 1px);
  background-size: 100% 28px, 28px 100%;
  opacity: 0.34;
  pointer-events: none;
}

.enigmal-topbar .top-brand {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: auto;
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 16px;
  text-align: left;
}

.enigmal-topbar .brand-mark {
  width: 38px;
  height: 38px;
  margin: 0;
  display: grid;
  place-items: center;
  font-size: .86rem;
}

.top-brand-copy,
.enigmal-topbar .top-brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.top-brand-copy strong {
  font-size: .82rem;
  letter-spacing: .16em;
}

.top-brand-copy small {
  color: rgba(195,214,240,.62);
  font-size: .66rem;
  letter-spacing: .06em;
  white-space: nowrap;
}

.shell-top-nav.top-nav {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 18px;
  background: rgba(0,0,0,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.shell-top-nav.top-nav button {
  width: auto !important;
  min-width: 0;
  min-height: 44px !important;
  display: inline-flex !important;
  grid-template-columns: none !important;
  place-items: initial !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: rgba(220,235,255,0.76);
  font-size: .78rem;
  line-height: 1;
  white-space: nowrap;
}

.shell-top-nav .top-nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97,171,255,0.10);
  border-radius: 9px;
  color: rgba(144,199,255,0.92);
  background: rgba(97,171,255,0.045);
  font-size: .86rem;
  flex: 0 0 auto;
}

.shell-top-nav.top-nav button:hover {
  transform: translateY(-1px);
  border-color: rgba(97,171,255,0.18);
  background: rgba(97,171,255,0.075);
  color: #eff7ff;
}

.shell-top-nav.top-nav button.active,
.shell-top-nav.top-nav button[aria-current="page"] {
  border-color: rgba(97,171,255,0.28) !important;
  color: #f2f8ff !important;
  background: linear-gradient(180deg, rgba(97,171,255,0.17), rgba(97,171,255,0.07)) !important;
  box-shadow: 0 0 26px rgba(97,171,255,0.10), inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

.shell-top-identity.top-identity {
  position: relative;
  z-index: 1;
  min-width: 252px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.shell-top-identity .system-clock,
.shell-top-identity .user-chip {
  width: auto;
  min-width: 0;
  border-radius: 15px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.24);
}

.shell-top-identity .system-clock span {
  font-size: .92rem;
  text-align: left;
}

.shell-top-identity .system-clock small {
  display: block;
  font-size: .58rem;
}

.shell-top-identity .user-chip {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto;
  grid-template-areas:
    "name button"
    "role button";
  text-align: left;
}

.shell-top-identity .user-chip span { grid-area: name; }
.shell-top-identity .user-chip small { grid-area: role; }
.shell-top-identity .user-chip button { grid-area: button; }

.workspace-top-shell.desktop-workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

body.dashboard-active .global-footer {
  width: min(1380px, calc(100% - 28px));
  padding-left: 0 !important;
  margin-top: 0;
}

body.dashboard-active .global-footer__inner {
  min-height: 54px;
}

@media (max-width: 1120px) {
  .enigmal-topbar.top-console {
    position: relative;
    top: 0;
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .enigmal-topbar .top-brand {
    width: 100%;
  }

  .shell-top-nav.top-nav {
    max-width: none;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .shell-top-identity.top-identity {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }
}

@media (max-width: 760px) {
  body.dashboard-active .app-shell,
  body.dashboard-active .global-footer {
    width: min(100% - 16px, 1380px);
  }

  .shell-top-nav.top-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .shell-top-nav.top-nav button {
    width: 100% !important;
    white-space: normal;
  }

  .shell-top-identity .system-clock {
    display: none;
  }

  .shell-top-identity.top-identity {
    display: block;
  }

  .shell-top-identity .user-chip {
    width: 100%;
  }

  .workspace-statusbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== FASE 8.1c — MENU SUPERIOR COMPACTO E ALINHADO ===== */
body.dashboard-active .app-shell {
  width: min(1220px, calc(100% - 24px)) !important;
  padding: 14px 0 12px !important;
}

.desktop-shell.top-shell {
  gap: 12px !important;
}

.enigmal-topbar.top-console {
  position: sticky;
  top: 10px;
  min-height: 58px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border-radius: 18px !important;
  overflow: visible !important;
}

.enigmal-topbar .top-brand {
  flex: 0 0 auto;
  min-height: 42px !important;
  max-width: 218px;
  padding: 6px 9px !important;
  gap: 8px !important;
  border-radius: 13px !important;
}

.enigmal-topbar .brand-mark {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  font-size: .76rem !important;
}

.top-brand-copy strong {
  font-size: .74rem !important;
  letter-spacing: .13em !important;
  line-height: 1.05 !important;
}

.top-brand-copy small {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .58rem !important;
  line-height: 1.1 !important;
  white-space: nowrap;
}

.shell-top-nav.top-nav {
  flex: 1 1 auto;
  width: auto !important;
  max-width: 560px !important;
  min-width: 0;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 4px !important;
  border-radius: 15px !important;
  overflow: visible !important;
  scrollbar-width: none !important;
}

.shell-top-nav.top-nav::-webkit-scrollbar {
  display: none !important;
}

.shell-top-nav.top-nav button {
  flex: 0 1 auto;
  min-height: 36px !important;
  height: 36px !important;
  padding: 6px 8px !important;
  gap: 5px !important;
  border-radius: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: .70rem !important;
  letter-spacing: .03em !important;
}

.shell-top-nav .top-nav-icon {
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  border-radius: 7px !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: .72rem !important;
  line-height: 1 !important;
  transform: translateY(0) !important;
}

.shell-top-nav.top-nav button > span:not(.top-nav-icon) {
  display: inline-flex !important;
  align-items: center !important;
  height: 19px !important;
  line-height: 1 !important;
  transform: translateY(0) !important;
}

.shell-top-identity.top-identity {
  flex: 0 0 auto;
  min-width: 0 !important;
  gap: 6px !important;
}

.shell-top-identity .system-clock,
.shell-top-identity .user-chip {
  padding: 7px 8px !important;
  border-radius: 13px !important;
}

.shell-top-identity .system-clock span {
  font-size: .78rem !important;
  line-height: 1 !important;
}

.shell-top-identity .system-clock small {
  font-size: .50rem !important;
  line-height: 1.1 !important;
}

.shell-top-identity .user-chip {
  grid-template-columns: minmax(58px, 1fr) auto !important;
  gap: 0 7px !important;
}

.shell-top-identity .user-chip span {
  font-size: .72rem !important;
  line-height: 1.05 !important;
}

.shell-top-identity .user-chip small {
  font-size: .54rem !important;
  line-height: 1.05 !important;
}

.shell-top-identity .user-chip button {
  min-height: 28px !important;
  padding: 6px 8px !important;
  border-radius: 9px !important;
  font-size: .68rem !important;
}

body.dashboard-active .global-footer {
  width: min(1220px, calc(100% - 24px)) !important;
}

@media (max-width: 1180px) {
  .enigmal-topbar.top-console {
    flex-wrap: wrap !important;
    top: 0;
  }

  .enigmal-topbar .top-brand {
    max-width: none;
    flex: 1 1 220px;
  }

  .shell-top-identity.top-identity {
    flex: 0 0 auto;
  }

  .shell-top-nav.top-nav {
    order: 3;
    flex: 1 0 100%;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px !important;
    justify-content: stretch !important;
  }

  .shell-top-nav.top-nav button {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 720px) {
  body.dashboard-active .app-shell,
  body.dashboard-active .global-footer {
    width: min(100% - 14px, 1220px) !important;
  }

  .enigmal-topbar.top-console {
    padding: 7px !important;
  }

  .shell-top-nav.top-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shell-top-nav.top-nav button {
    justify-content: flex-start !important;
    padding: 7px 9px !important;
  }

  .shell-top-identity.top-identity {
    width: 100%;
    display: block !important;
  }

  .shell-top-identity .system-clock {
    display: none !important;
  }

  .shell-top-identity .user-chip {
    width: 100% !important;
  }
}

/* ===== FASE 8.2 — ÁREA DE TRABALHO INTERATIVA ===== */
.desktop-workstation-page {
  min-height: 0;
}

.desktop-workstation-shell {
  display: grid;
  gap: 14px;
}

.terminal-panel-flat,
.workstation-header,
.desktop-window {
  border: 1px solid rgba(73, 161, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(3, 8, 16, 0.92), rgba(0, 0, 0, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(73, 161, 255, 0.08), transparent 34%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 16px 40px rgba(0,0,0,0.16);
}

.workstation-header {
  min-height: 168px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 18px;
  align-items: stretch;
  padding: 20px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.workstation-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(73,161,255,0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73,161,255,0.022) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: .55;
}

.workstation-title-block,
.workstation-console-card {
  position: relative;
  z-index: 1;
}

.workstation-title-block {
  display: grid;
  align-content: center;
}

.workstation-title-block h1 {
  margin: 0;
  max-width: 760px;
  color: #f3f8ff;
  font-size: clamp(2rem, 4.2vw, 4.2rem);
  line-height: .92;
  letter-spacing: -.075em;
  text-transform: uppercase;
}

.workstation-title-block p:not(.eyebrow) {
  max-width: 660px;
  margin: 14px 0 0;
  color: rgba(210,226,244,.72);
  line-height: 1.62;
}

.workstation-console-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid rgba(73,161,255,.13);
  border-radius: 18px;
  overflow: hidden;
  background: #01040a;
}

.workstation-console-top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(73,161,255,.10);
  color: rgba(216,235,255,.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
}

.workstation-console-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(73,161,255,.45);
}
.workstation-console-top span:nth-child(1) { background: rgba(255,83,112,.82); }
.workstation-console-top span:nth-child(2) { background: rgba(247,201,106,.78); }
.workstation-console-top span:nth-child(3) { background: rgba(73,161,255,.86); }

.workstation-console-lines {
  display: grid;
  gap: 7px;
  align-content: center;
  padding: 14px;
  color: rgba(150,203,255,.86);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .76rem;
}

.workstation-console-lines span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.workspace-stats-strip article {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(73,161,255,.11);
  border-radius: 18px;
  background: rgba(0,0,0,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.workspace-stats-strip small {
  color: rgba(193,216,245,.58);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.workspace-stats-strip strong {
  color: #f4f9ff;
  font-size: 1.28rem;
  line-height: 1;
}

.desktop-window {
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
}

.desktop-window-toolbar {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(73,161,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent);
}

.desktop-window-toolbar strong {
  color: rgba(226,239,255,.76);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-mini-button {
  min-height: 32px;
  border: 1px solid rgba(73,161,255,.16);
  border-radius: 10px;
  padding: 7px 10px;
  color: rgba(231,244,255,.88);
  background: rgba(73,161,255,.06);
  font-size: .70rem;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.terminal-mini-button:hover {
  border-color: rgba(73,161,255,.28);
  background: rgba(73,161,255,.10);
}

.desktop-window-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 350px);
  gap: 0;
  min-height: 560px;
}

.desktop-canvas-grid {
  position: relative;
  min-height: 560px;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(73,161,255,.075), transparent 34%),
    linear-gradient(rgba(73,161,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73,161,255,.018) 1px, transparent 1px),
    #00030a;
  background-size: auto, 34px 34px, 34px 34px, auto;
}

.desktop-canvas-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.018) 0 1px, transparent 1px 4px);
  opacity: .42;
}

.desktop-canvas-boot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(145,200,255,.62);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.desktop-canvas-boot i {
  width: 24px;
  height: 1px;
  display: block;
  background: rgba(73,161,255,.22);
}

.desktop-folder-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(134px, 1fr));
  gap: 16px;
  align-content: start;
}

.desktop-folder {
  position: relative;
  min-height: 152px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  padding: 14px 10px 12px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: #eaf5ff;
  background: transparent;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, border 160ms ease, background 160ms ease, box-shadow 160ms ease;
  animation: desktopFolderBoot 360ms ease both;
  animation-delay: calc(var(--folder-delay, 0) * 30ms);
}

.desktop-folder:hover,
.desktop-folder.is-selected {
  transform: translateY(-2px);
  border-color: rgba(73,161,255,.18);
  background: rgba(73,161,255,.045);
  box-shadow: 0 16px 34px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.035);
}

.desktop-folder:focus-visible {
  outline: 2px solid rgba(73,161,255,.50);
  outline-offset: 3px;
}

.desktop-folder[data-folder-index="0"] { --folder-delay: 1; }
.desktop-folder[data-folder-index="1"] { --folder-delay: 2; }
.desktop-folder[data-folder-index="2"] { --folder-delay: 3; }
.desktop-folder[data-folder-index="3"] { --folder-delay: 4; }
.desktop-folder[data-folder-index="4"] { --folder-delay: 5; }
.desktop-folder[data-folder-index="5"] { --folder-delay: 6; }
.desktop-folder[data-folder-index="6"] { --folder-delay: 7; }
.desktop-folder[data-folder-index="7"] { --folder-delay: 8; }
.desktop-folder[data-folder-index="8"] { --folder-delay: 9; }
.desktop-folder[data-folder-index="9"] { --folder-delay: 10; }

.desktop-folder-icon {
  position: relative;
  width: 78px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,.20);
  border-radius: 12px 15px 15px 15px;
  color: #cfeaff;
  background: linear-gradient(180deg, rgba(73,161,255,.20), rgba(73,161,255,.055));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 24px rgba(73,161,255,.06);
}

.desktop-folder-icon::before {
  content: "";
  position: absolute;
  left: 9px;
  top: -8px;
  width: 34px;
  height: 12px;
  border: 1px solid rgba(73,161,255,.18);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: rgba(73,161,255,.16);
}

.desktop-folder-icon span {
  position: relative;
  z-index: 1;
  font-size: 1.5rem;
  line-height: 1;
}

.desktop-folder.is-waiting .desktop-folder-icon {
  border-color: rgba(247,201,106,.22);
  background: linear-gradient(180deg, rgba(247,201,106,.16), rgba(73,161,255,.04));
}

.desktop-folder.is-closed .desktop-folder-icon,
.desktop-folder.is-neutral .desktop-folder-icon {
  opacity: .76;
  filter: saturate(.65);
}

.desktop-folder-label {
  width: 100%;
  display: grid;
  gap: 4px;
}

.desktop-folder-label strong {
  display: -webkit-box;
  min-height: 2.4em;
  overflow: hidden;
  color: #f2f8ff;
  font-size: .84rem;
  line-height: 1.2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.desktop-folder-label small {
  display: block;
  color: rgba(190,215,246,.58);
  font-size: .62rem;
  line-height: 1.2;
}

.desktop-folder-foot {
  width: min(104px, 100%);
  display: grid;
  gap: 5px;
}

.desktop-folder-foot span {
  color: rgba(219,236,255,.68);
  font-size: .63rem;
  font-weight: 900;
}

.desktop-folder-foot i {
  position: relative;
  height: 3px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.desktop-folder-foot i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--folder-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #49a1ff, #a8dcff);
}

.desktop-detail-panel {
  min-width: 0;
  border-left: 1px solid rgba(73,161,255,.10);
  background:
    linear-gradient(180deg, rgba(1,4,10,.92), rgba(3,8,16,.86)),
    radial-gradient(circle at 50% 0%, rgba(73,161,255,.08), transparent 34%);
}

.desktop-folder-detail,
.desktop-detail-empty {
  min-height: 100%;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
}

.desktop-detail-empty {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.desktop-detail-empty span {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,.14);
  border-radius: 22px;
  color: #93cdff;
  background: rgba(73,161,255,.04);
  font-size: 2rem;
}

.desktop-detail-empty strong,
.desktop-folder-detail h2 {
  color: #f3f8ff;
}

.desktop-detail-empty small,
.desktop-folder-detail p {
  color: rgba(200,220,245,.68);
  line-height: 1.55;
}

.detail-symbol {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,.18);
  border-radius: 24px;
  color: #dff2ff;
  background: rgba(73,161,255,.055);
  font-size: 2.35rem;
}

.desktop-folder-detail h2 {
  margin: -4px 0 0;
  font-size: 1.48rem;
  line-height: 1.05;
  letter-spacing: -.045em;
}

.desktop-folder-detail code {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 7px 9px;
  border: 1px solid rgba(73,161,255,.12);
  border-radius: 10px;
  color: #91c8ff;
  background: rgba(73,161,255,.04);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-meta-grid span {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(73,161,255,.10);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.detail-meta-grid small {
  color: rgba(190,215,246,.56);
  font-size: .60rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.detail-meta-grid strong {
  color: #f4f9ff;
  font-size: .86rem;
}

.detail-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}

.detail-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #49a1ff, #d2edff);
}

.detail-terminal-lines {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(73,161,255,.10);
  border-radius: 14px;
  color: rgba(146,205,255,.82);
  background: #00040a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
}

.detail-terminal-lines span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-open-action {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
}

@keyframes desktopFolderBoot {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1040px) {
  .workstation-header {
    grid-template-columns: 1fr;
  }

  .desktop-window-body {
    grid-template-columns: 1fr;
  }

  .desktop-detail-panel {
    border-left: 0;
    border-top: 1px solid rgba(73,161,255,.10);
  }
}

@media (max-width: 720px) {
  .workspace-stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desktop-window-toolbar {
    grid-template-columns: 1fr;
  }

  .desktop-folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .desktop-folder {
    min-height: 142px;
  }

  .workstation-title-block h1 {
    font-size: 2rem;
  }
}

/* ===== FASE 8.3 — PASTA / CAMADAS COMO DIRETÓRIO INTERATIVO ===== */
.folder-workspace {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 0;
  border-color: rgba(73, 161, 255, 0.15);
  background:
    radial-gradient(circle at 18% 0%, rgba(73,161,255,0.10), transparent 26%),
    radial-gradient(circle at 95% 18%, rgba(73,161,255,0.06), transparent 22%),
    linear-gradient(180deg, rgba(2, 6, 12, 0.96), rgba(0, 0, 0, 0.70));
}

.folder-workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(73,161,255,0.030) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73,161,255,0.024) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.36;
  mask-image: radial-gradient(circle at 50% 24%, black, transparent 86%);
}

.folder-workspace > * {
  position: relative;
  z-index: 1;
}

.folder-workspace-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(73,161,255,0.12);
  background: rgba(0,0,0,0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: rgba(216, 235, 255, 0.76);
  font-size: 0.78rem;
}

.folder-workspace-topbar > span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.folder-workspace-topbar strong {
  padding: 5px 9px;
  border: 1px solid rgba(73,161,255,0.15);
  border-radius: 999px;
  color: #9fd2ff;
  background: rgba(73,161,255,0.055);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.folder-hero-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px 22px 4px;
}

.folder-big-icon {
  width: 86px;
  height: 76px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(73,161,255,0.13), rgba(2,7,16,0.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 16px 34px rgba(0,0,0,0.24);
}

.folder-big-icon::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -10px;
  width: 34px;
  height: 14px;
  border: 1px solid rgba(73,161,255,0.18);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: rgba(73,161,255,0.12);
}

.folder-big-icon span {
  color: #dff2ff;
  font-size: 2rem;
  filter: drop-shadow(0 0 12px rgba(73,161,255,0.25));
}

.folder-hero-copy h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  letter-spacing: -0.07em;
}

.folder-hero-copy p {
  margin: 8px 0 0;
  max-width: 820px;
  color: rgba(206, 222, 244, 0.72);
  line-height: 1.55;
}

.folder-command-line {
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(73,161,255,0.14);
  border-radius: 12px;
  color: #9fd2ff;
  background: rgba(0,0,0,0.30);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.folder-system-strip {
  margin: 0 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.folder-system-strip article {
  min-height: 72px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(73,161,255,0.11);
  border-radius: 16px;
  background: rgba(0,0,0,0.24);
  text-align: center;
}

.folder-system-strip strong {
  color: #eef8ff;
  font-size: 1.18rem;
  font-weight: 950;
}

.folder-system-strip span {
  color: rgba(188, 211, 239, 0.58);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.folder-progress-line {
  height: 5px;
  margin: -2px 22px 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.045);
}

.folder-progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(73,161,255,0.18), rgba(100,198,255,0.88));
  box-shadow: 0 0 22px rgba(73,161,255,0.20);
}

.folder-directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 340px);
  gap: 16px;
  padding: 0 22px 22px;
  align-items: start;
}

.folder-directory-main,
.folder-inspector {
  border: 1px solid rgba(73,161,255,0.12);
  border-radius: 22px;
  background: rgba(0,0,0,0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.folder-directory-main {
  min-height: 460px;
  padding: 18px;
}

.folder-directory-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.folder-directory-toolbar h3 {
  margin: 0;
  font-size: 1.16rem;
}

.folder-toolbar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.folder-toolbar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(207,225,248,0.62);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.folder-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 14px;
  align-items: start;
}

.folder-file-tile {
  position: relative;
  min-height: 136px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 14px 10px;
  border: 1px solid rgba(73,161,255,0.11);
  border-radius: 18px;
  color: #eaf5ff;
  background: rgba(2,7,16,0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  text-align: center;
  cursor: pointer;
  animation: folderFileBoot 420ms ease both;
  animation-delay: calc(var(--boot-delay, 0) * 50ms);
  transition: transform 150ms ease, border 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.folder-file-tile[data-boot-index="0"] { --boot-delay: 0; }
.folder-file-tile[data-boot-index="1"] { --boot-delay: 1; }
.folder-file-tile[data-boot-index="2"] { --boot-delay: 2; }
.folder-file-tile[data-boot-index="3"] { --boot-delay: 3; }
.folder-file-tile[data-boot-index="4"] { --boot-delay: 4; }
.folder-file-tile[data-boot-index="5"] { --boot-delay: 5; }
.folder-file-tile[data-boot-index="6"] { --boot-delay: 6; }
.folder-file-tile[data-boot-index="7"] { --boot-delay: 7; }
.folder-file-tile[data-boot-index="8"] { --boot-delay: 8; }
.folder-file-tile[data-boot-index="9"] { --boot-delay: 9; }

.folder-file-tile:hover,
.folder-file-tile.is-selected {
  transform: translateY(-2px);
  border-color: rgba(73,161,255,0.30);
  background: rgba(6,18,34,0.88);
  box-shadow: 0 14px 36px rgba(0,0,0,0.24), 0 0 0 1px rgba(73,161,255,0.08) inset;
}

.folder-file-tile.is-selected::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(114,198,255,0.34);
  pointer-events: none;
}

.folder-file-tile.is-sealed {
  opacity: 0.68;
  filter: grayscale(0.25);
}

.folder-file-tile.is-solved {
  border-color: rgba(114,198,255,0.24);
}

.file-icon {
  width: 54px;
  height: 48px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.18);
  border-radius: 13px;
  color: #dff3ff;
  background: linear-gradient(180deg, rgba(73,161,255,0.12), rgba(0,0,0,0.12));
  font-weight: 950;
  font-size: 1.18rem;
}

.file-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -7px;
  width: 22px;
  height: 9px;
  border: 1px solid rgba(73,161,255,0.16);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(73,161,255,0.10);
}

.folder-file-tile strong {
  width: 100%;
  min-height: 30px;
  color: #eaf5ff;
  font-size: 0.74rem;
  line-height: 1.2;
  word-break: break-word;
}

.folder-file-tile small {
  color: rgba(188, 211, 239, 0.56);
  font-size: 0.67rem;
  line-height: 1.2;
}

.folder-inspector {
  position: sticky;
  top: 86px;
  min-height: 460px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.folder-inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(73,161,255,0.10);
}

.folder-inspector-head span,
.folder-inspector-head strong {
  font-size: 0.70rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.folder-inspector-head span {
  color: rgba(188, 211, 239, 0.56);
}

.folder-inspector-head strong {
  color: #9fd2ff;
}

.inspector-file-preview {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px 14px;
  border: 1px solid rgba(73,161,255,0.12);
  border-radius: 18px;
  background: rgba(0,0,0,0.24);
  text-align: center;
}

.inspector-file-icon {
  width: 70px;
  height: 62px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.20);
  border-radius: 16px;
  color: #e8f7ff;
  background: linear-gradient(180deg, rgba(73,161,255,0.14), rgba(0,0,0,0.18));
  font-size: 1.45rem;
  font-weight: 950;
}

.inspector-file-icon::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -8px;
  width: 28px;
  height: 10px;
  border: 1px solid rgba(73,161,255,0.18);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(73,161,255,0.11);
}

.inspector-file-preview h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.inspector-file-preview p {
  margin: 0;
  color: rgba(207,225,248,0.64);
  line-height: 1.45;
  font-size: 0.84rem;
}

.inspector-meta-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.inspector-meta-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(73,161,255,0.08);
  border-radius: 12px;
  background: rgba(0,0,0,0.16);
}

.inspector-meta-list dt,
.inspector-meta-list dd {
  margin: 0;
  font-size: 0.76rem;
}

.inspector-meta-list dt {
  color: rgba(188,211,239,0.50);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.inspector-meta-list dd {
  color: rgba(238,248,255,0.82);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-actions {
  display: grid;
  gap: 9px;
  margin-top: 2px;
}

.inspector-actions .module-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@keyframes folderFileBoot {
  0% { opacity: 0; transform: translateY(8px) scale(0.98); filter: blur(2px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@media (max-width: 1120px) {
  .folder-hero-shell,
  .folder-directory-layout {
    grid-template-columns: 1fr;
  }

  .folder-hero-actions {
    justify-content: flex-start;
  }

  .folder-inspector {
    position: relative;
    top: auto;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .folder-workspace-topbar,
  .folder-directory-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .folder-hero-shell,
  .folder-directory-layout,
  .folder-directory-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .folder-system-strip {
    margin-left: 14px;
    margin-right: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .folder-progress-line {
    margin-left: 14px;
    margin-right: 14px;
  }

  .folder-file-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  }

  .inspector-meta-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ===== FASE 8.4 — INTERAÇÃO SEM REFRESH + EXECUÇÃO DE CAMADA ===== */
.desktop-folder,
.folder-file-tile {
  will-change: transform, opacity, box-shadow;
}

.desktop-folder.is-selected,
.folder-file-tile.is-selected {
  animation: none !important;
}

.desktop-folder.is-opening {
  border-color: rgba(97,171,255,0.56) !important;
  box-shadow: 0 0 0 1px rgba(97,171,255,0.18), 0 24px 80px rgba(97,171,255,0.16) !important;
  animation: folderOpenPulse 360ms ease both !important;
}

.folder-file-tile.is-executing,
.module-action.is-executing {
  border-color: rgba(97,171,255,0.62) !important;
  box-shadow: 0 0 0 1px rgba(97,171,255,0.22), 0 0 44px rgba(97,171,255,0.16) !important;
  animation: layerExecutePulse 520ms ease infinite alternate !important;
}

@keyframes folderOpenPulse {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  42% { transform: translateY(-4px) scale(1.025); filter: brightness(1.22); }
  100% { transform: translateY(0) scale(1); filter: brightness(1.04); }
}

@keyframes layerExecutePulse {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  100% { transform: translateY(-2px) scale(1.012); filter: brightness(1.18); }
}

.layer-execution-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(97,171,255,0.16), transparent 34%),
    rgba(0, 1, 6, 0.72);
  backdrop-filter: blur(8px);
  transition: opacity 180ms ease;
}

.layer-execution-overlay.is-visible {
  opacity: 1;
}

.layer-execution-window {
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid rgba(97,171,255,0.22);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(2, 5, 12, 0.98), rgba(0, 0, 0, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(97,171,255,0.12), transparent 42%);
  box-shadow: 0 34px 110px rgba(0,0,0,0.52), 0 0 80px rgba(97,171,255,0.12), inset 0 1px 0 rgba(255,255,255,0.04);
  transform: translateY(10px) scale(0.985);
  animation: executionWindowIn 260ms ease forwards;
}

.execution-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(97,171,255,0.12);
  background: rgba(255,255,255,0.025);
}

.execution-topbar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(97,171,255,0.32);
}

.execution-topbar span:nth-child(1) { background: rgba(255,83,112,0.86); }
.execution-topbar span:nth-child(2) { background: rgba(247,201,106,0.86); }
.execution-topbar span:nth-child(3) { background: rgba(97,171,255,0.9); }

.execution-topbar strong,
.execution-lines,
.execution-bar {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.execution-topbar strong {
  margin-left: 4px;
  color: rgba(225,241,255,0.72);
  font-size: 0.76rem;
  font-weight: 800;
}

.layer-execution-window .eyebrow {
  margin: 22px 24px 8px;
}

.layer-execution-window h2 {
  margin: 0 24px;
  color: #f2f8ff;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  letter-spacing: -0.06em;
}

.execution-lines {
  display: grid;
  gap: 7px;
  margin: 22px 24px;
  color: rgba(190,224,255,0.78);
  font-size: 0.84rem;
}

.execution-lines span {
  animation: executionLineBlink 1.2s steps(2, end) infinite;
}

.execution-lines span:nth-child(2) { animation-delay: 160ms; }
.execution-lines span:nth-child(3) { animation-delay: 320ms; }

.execution-bar {
  height: 6px;
  margin: 0 24px 24px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(97,171,255,0.10);
}

.execution-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(97,171,255,0.18), rgba(97,171,255,0.98), rgba(230,246,255,0.92));
  animation: executionProgress 760ms cubic-bezier(.2,.7,.2,1) forwards;
}

@keyframes executionWindowIn {
  to { transform: translateY(0) scale(1); }
}

@keyframes executionLineBlink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0.62; }
}

@keyframes executionProgress {
  0% { width: 0%; }
  72% { width: 78%; }
  100% { width: 100%; }
}

/* ===== FASE 8.5 — AJUSTE FINO: SELEÇÃO ESTÁVEL + LAYOUT DA CAMADA ===== */
.desktop-folder-grid.is-ready .desktop-folder,
.folder-file-grid.is-ready .folder-file-tile {
  animation: none !important;
}

.desktop-folder:not(.is-opening),
.folder-file-tile:not(.is-executing) {
  backface-visibility: hidden;
  transform: translateZ(0);
}

.desktop-folder.is-selected:not(.is-opening),
.folder-file-tile.is-selected:not(.is-executing) {
  transform: translateZ(0) !important;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease, filter 120ms ease !important;
}

.desktop-folder:hover:not(.is-opening) {
  transform: translateY(-1px) translateZ(0);
}

.folder-file-tile:hover:not(.is-executing) {
  transform: translateY(-1px) translateZ(0);
}

.desktop-folder.is-selected:not(.is-opening) {
  border-color: rgba(73,161,255,.30) !important;
  background: rgba(73,161,255,.060) !important;
  box-shadow: 0 12px 26px rgba(0,0,0,.18), inset 0 0 0 1px rgba(73,161,255,.08) !important;
}

.folder-file-tile.is-selected:not(.is-executing) {
  border-color: rgba(73,161,255,0.34) !important;
  background: rgba(6,18,34,0.86) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(73,161,255,0.08) !important;
}

body.dashboard-active .play-shell.play-shell-terminal,
.play-shell.play-shell-terminal {
  grid-template-columns: minmax(0, 1.88fr) minmax(330px, 390px) !important;
  gap: clamp(22px, 2.4vw, 34px) !important;
}

#puzzle-live-chat.puzzle-live-chat {
  justify-self: end;
  width: 100%;
  max-width: 390px;
}

.enigma-chat-shell {
  max-width: 390px;
}

.layer-play-terminal {
  min-width: 0;
}

@media (max-width: 1320px) {
  body.dashboard-active .play-shell.play-shell-terminal,
  .play-shell.play-shell-terminal {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 370px) !important;
    gap: 22px !important;
  }

  #puzzle-live-chat.puzzle-live-chat,
  .enigma-chat-shell {
    max-width: 370px;
  }
}

@media (max-width: 1100px) {
  body.dashboard-active .play-shell.play-shell-terminal,
  .play-shell.play-shell-terminal {
    grid-template-columns: 1fr !important;
  }

  #puzzle-live-chat.puzzle-live-chat,
  .enigma-chat-shell {
    max-width: none;
  }
}

/* ===== FASE 8.6 — BLOQUEIOS ANIMADOS + RESPOSTA MAIS COMPACTA ===== */
.desktop-folder.is-access-corrupted .desktop-folder-icon {
  border-color: rgba(255,83,112,0.24) !important;
  background: linear-gradient(180deg, rgba(255,83,112,0.12), rgba(73,161,255,0.04)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 26px rgba(255,83,112,.06) !important;
}

.desktop-folder.is-access-sealed .desktop-folder-icon {
  border-color: rgba(247,201,106,0.22) !important;
  background: linear-gradient(180deg, rgba(247,201,106,0.12), rgba(73,161,255,0.035)) !important;
}

.desktop-folder.is-infected {
  animation: corruptedFolderGlitch 1150ms steps(2, end) both !important;
}

.desktop-folder.is-seal-pulse,
.folder-file-tile.is-seal-denied {
  animation: sealedAccessPulse 1200ms ease both !important;
}

@keyframes corruptedFolderGlitch {
  0%, 100% { transform: translate3d(0,0,0); filter: brightness(1); }
  18% { transform: translate3d(-3px,1px,0); filter: brightness(1.28) saturate(1.2); }
  32% { transform: translate3d(3px,-1px,0); filter: hue-rotate(18deg) brightness(1.1); }
  46% { transform: translate3d(-2px,-2px,0); filter: contrast(1.22); }
  62% { transform: translate3d(2px,2px,0); filter: brightness(1.18); }
}

@keyframes sealedAccessPulse {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  42% { transform: translateY(-2px) scale(1.012); filter: brightness(1.22); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

.folder-access-overlay,
.sealed-layer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 1, 8, 0.66);
  backdrop-filter: blur(7px);
  transition: opacity 260ms ease;
}

.folder-access-overlay.is-visible,
.sealed-layer-overlay.is-visible {
  opacity: 1;
}

.folder-access-window,
.sealed-layer-window {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid rgba(73,161,255,0.22);
  border-radius: 24px;
  background:
    linear-gradient(rgba(73,161,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73,161,255,0.020) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(73,161,255,0.12), transparent 42%),
    #010207;
  background-size: 100% 32px, 32px 100%, auto, auto;
  box-shadow: 0 34px 120px rgba(0,0,0,0.58), 0 0 82px rgba(73,161,255,0.10), inset 0 1px 0 rgba(255,255,255,0.04);
  transform: translateY(10px) scale(0.985);
  animation: executionWindowIn 320ms ease forwards;
}

.folder-access-overlay.is-corrupted .folder-access-window {
  border-color: rgba(255,83,112,0.28);
  box-shadow: 0 34px 120px rgba(0,0,0,0.58), 0 0 90px rgba(255,83,112,0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}

.folder-access-window h2,
.sealed-layer-window h2 {
  margin: 0 24px 6px;
  color: #f4f9ff;
  font-size: clamp(1.55rem, 3.4vw, 2.45rem);
  letter-spacing: -0.055em;
}

.folder-access-window p:not(.eyebrow),
.sealed-layer-window p:not(.eyebrow) {
  margin: 0 24px 18px;
  color: rgba(203,225,248,0.68);
  line-height: 1.5;
}

.infection-grid,
.seal-runes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 0 24px 24px;
}

.infection-grid i,
.seal-runes i {
  height: 4px;
  border-radius: 999px;
  background: rgba(73,161,255,0.22);
  animation: infectionBar 980ms steps(2, end) infinite;
}

.folder-access-overlay.is-corrupted .infection-grid i {
  background: rgba(255,83,112,0.34);
}

.seal-runes i {
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.16);
  border-radius: 12px;
  color: rgba(168,215,255,0.72);
  background: rgba(73,161,255,0.045);
  font-style: normal;
}

.infection-grid i:nth-child(2),
.seal-runes i:nth-child(2) { animation-delay: 90ms; }
.infection-grid i:nth-child(3),
.seal-runes i:nth-child(3) { animation-delay: 180ms; }
.infection-grid i:nth-child(4),
.seal-runes i:nth-child(4) { animation-delay: 270ms; }
.infection-grid i:nth-child(5),
.seal-runes i:nth-child(5) { animation-delay: 360ms; }
.infection-grid i:nth-child(6),
.seal-runes i:nth-child(6) { animation-delay: 450ms; }

@keyframes infectionBar {
  0%, 100% { opacity: 0.3; transform: scaleX(0.42); }
  50% { opacity: 1; transform: scaleX(1); }
}

/* Área operacional da resposta mais compacta, sem remover informações */
.layer-play-header {
  padding: clamp(14px, 2.2vw, 22px) !important;
  align-items: center !important;
}

.layer-play-header .eyebrow {
  margin-bottom: 7px !important;
  font-size: 0.64rem !important;
}

.layer-play-header h2 {
  font-size: clamp(1.55rem, 3vw, 2.55rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.055em !important;
}

.layer-command-line {
  margin-top: 10px !important;
  padding: 7px 9px !important;
  font-size: 0.68rem !important;
}

.layer-play-status {
  gap: 6px !important;
}

.layer-play-status span {
  min-height: 48px !important;
  padding: 7px 9px !important;
  border-radius: 13px !important;
}

.layer-play-status strong {
  font-size: 0.86rem !important;
}

.layer-play-status small {
  font-size: 0.56rem !important;
}

.layer-evidence-panel {
  gap: 9px !important;
  padding: clamp(14px, 2vw, 20px) !important;
}

.terminal-section-head {
  font-size: 0.62rem !important;
}

.puzzle-statement.layer-statement {
  min-height: 150px !important;
  padding: 14px !important;
  font-size: 0.88rem !important;
  line-height: 1.58 !important;
  border-radius: 15px !important;
}

.answer-console {
  margin: 0 clamp(14px, 2vw, 20px) clamp(14px, 2vw, 20px) !important;
  gap: 9px !important;
  padding: 11px !important;
  border-radius: 16px !important;
}

.answer-console-head {
  gap: 10px !important;
}

.answer-console-head span,
.answer-console-head strong {
  font-size: 0.58rem !important;
  letter-spacing: 0.12em !important;
}

.answer-console-head small {
  margin-top: 2px !important;
  font-size: 0.56rem !important;
}

.answer-form.answer-form-terminal {
  gap: 8px !important;
}

.answer-input-line {
  padding: 8px 10px !important;
  border-radius: 12px !important;
}

.answer-prompt {
  font-size: 0.72rem !important;
}

.answer-input-line input {
  min-height: 36px !important;
  padding: 6px 4px !important;
  font-size: 0.88rem !important;
}

.terminal-answer-button {
  min-height: 44px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 0.72rem !important;
}

.answer-feedback.answer-feedback-terminal {
  padding: 10px 12px !important;
  gap: 2px !important;
  border-radius: 13px !important;
}

.answer-feedback.answer-feedback-terminal strong {
  font-size: 0.62rem !important;
}

.answer-feedback.answer-feedback-terminal span {
  font-size: 0.78rem !important;
  line-height: 1.35 !important;
}

.layer-play-terminal {
  min-height: 560px !important;
}


/* ===== FASE 8.7 — BLOQUEIOS SOMENTE EM TENTATIVA REAL ===== */
.folder-access-window,
.sealed-layer-window {
  animation-duration: 360ms !important;
}

.folder-access-window .execution-lines span,
.sealed-layer-window .execution-lines span {
  animation: executionLineRead 620ms ease both;
}

.folder-access-window .execution-lines span:nth-child(2),
.sealed-layer-window .execution-lines span:nth-child(2) { animation-delay: 160ms; }
.folder-access-window .execution-lines span:nth-child(3),
.sealed-layer-window .execution-lines span:nth-child(3) { animation-delay: 320ms; }
.folder-access-window .execution-lines span:nth-child(4),
.sealed-layer-window .execution-lines span:nth-child(4) { animation-delay: 480ms; }

@keyframes executionLineRead {
  0% { opacity: 0; transform: translateX(-8px); filter: blur(2px); }
  100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}

/* ===== FASE 9.1 — TENTATIVAS DA COMUNIDADE + MONITORAMENTO ===== */
.community-attempts-console {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(73, 161, 255, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(73,161,255,0.08), transparent 30%),
    linear-gradient(180deg, rgba(0,0,0,0.34), rgba(3,8,16,0.66));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.community-attempts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.community-attempts-grid article {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(73, 161, 255, 0.10);
  border-radius: 14px;
  background: rgba(0,0,0,0.26);
}

.community-attempts-grid strong {
  color: #eaf6ff;
  font-size: 1.05rem;
  line-height: 1;
}

.community-attempts-grid small {
  color: rgba(196,220,244,0.62);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.community-attempt-stream,
.community-attempts-loading {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(73, 161, 255, 0.10);
  border-radius: 14px;
  background: #000104;
  color: rgba(210,235,255,0.82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.45;
  max-height: 162px;
  overflow: auto;
}

.community-signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(73, 161, 255, 0.08);
  border-radius: 10px;
  background: rgba(73,161,255,0.035);
  color: rgba(224,242,255,0.82);
  overflow-wrap: anywhere;
}

.community-signal.mine {
  border-color: rgba(73,161,255,0.22);
  color: #dff1ff;
  background: rgba(73,161,255,0.085);
}

.community-signal.accepted {
  border-color: rgba(125,199,255,0.28);
  color: #b9e5ff;
  background: rgba(73,161,255,0.10);
}

.community-signal.pending {
  color: rgba(180,205,230,0.62);
}

.community-signal small {
  color: rgba(170,195,220,0.48);
}

.admin-monitor-grid-extended {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-monitor-columns-wide {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.monitor-terminal-card {
  border-color: rgba(73, 161, 255, 0.13);
  background:
    radial-gradient(circle at 100% 0%, rgba(73,161,255,0.07), transparent 24%),
    linear-gradient(180deg, rgba(3,8,16,0.92), rgba(0,0,0,0.56));
}

.layer-friction-list {
  display: grid;
  gap: 9px;
}

.layer-friction-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(73, 161, 255, 0.10);
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
}

.layer-friction-row.empty {
  display: block;
}

.layer-friction-index {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.16);
  border-radius: 12px;
  color: #9ad2ff;
  background: rgba(73,161,255,0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 900;
}

.layer-friction-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.layer-friction-main strong {
  color: #eaf6ff;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layer-friction-main small,
.layer-friction-row em {
  color: rgba(196,220,244,0.62);
  font-size: 0.72rem;
  font-style: normal;
}

.layer-friction-main i {
  display: block;
  width: min(100%, 320px);
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,0.055);
}

.layer-friction-main i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(73,161,255,0.32), rgba(154,210,255,0.92));
}

.layer-friction-row em {
  justify-self: end;
  padding: 5px 8px;
  border: 1px solid rgba(73,161,255,0.10);
  border-radius: 999px;
  background: rgba(73,161,255,0.045);
  white-space: nowrap;
}

.monitor-attempt-feed {
  margin-top: 14px;
}

.community-admin-log {
  max-height: 260px;
  overflow: auto;
  background: #000104;
  border-color: rgba(73,161,255,0.12);
}

.admin-attempt-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(73,161,255,0.08);
  border-radius: 10px;
  background: rgba(73,161,255,0.035);
  color: rgba(225,240,255,0.80);
  overflow-wrap: anywhere;
}

.admin-attempt-line.is-correct {
  border-color: rgba(125,199,255,0.28);
  color: #dff1ff;
}

.admin-attempt-line.is-wrong {
  border-color: rgba(255,83,112,0.12);
}

.admin-attempt-line small {
  color: rgba(180,205,230,0.52);
}

@media (max-width: 1050px) {
  .admin-monitor-grid-extended,
  .community-attempts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-monitor-columns-wide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .community-attempts-grid,
  .admin-monitor-grid-extended {
    grid-template-columns: 1fr;
  }
  .layer-friction-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .layer-friction-row em {
    grid-column: 2;
    justify-self: start;
  }
}

/* ===== FASE 10 — PERFIL DO INVESTIGADOR ===== */
.shell-top-nav {
  gap: 5px;
}

.shell-top-nav button {
  min-width: 0;
  padding-inline: 11px;
}

.profile-stage,
.profile-shell {
  display: grid;
  gap: 16px;
}

.terminal-panel-card {
  position: relative;
  border: 1px solid rgba(73, 161, 255, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(73, 161, 255, 0.075), transparent 28%),
    linear-gradient(180deg, rgba(3, 8, 14, 0.94), rgba(0, 0, 0, 0.66));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 18px 44px rgba(0,0,0,0.22);
  overflow: hidden;
}

.profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73, 161, 255, 0.22);
  border-radius: 24px;
  color: #dff1ff;
  background:
    linear-gradient(135deg, rgba(73,161,255,0.18), rgba(73,161,255,0.05)),
    #030712;
  font-weight: 950;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 28px rgba(73,161,255,0.08);
}

.profile-kicker {
  display: inline-flex;
  color: rgba(143, 198, 255, 0.86);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.profile-identity-main h2 {
  margin: 6px 0 4px;
  color: #f5fbff;
  font-size: clamp(1.8rem, 3.3vw, 3rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.profile-identity-main p {
  margin: 0;
  color: rgba(210, 226, 246, 0.68);
  line-height: 1.45;
}

.profile-command-line {
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(73,161,255,0.13);
  border-radius: 12px;
  color: rgba(194, 224, 255, 0.86);
  background: rgba(0,0,0,0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-rank-chip {
  min-width: 112px;
  padding: 14px 16px;
  border: 1px solid rgba(73,161,255,0.15);
  border-radius: 18px;
  background: rgba(0,0,0,0.26);
  text-align: center;
}

.profile-rank-chip span,
.profile-rank-chip small {
  display: block;
}

.profile-rank-chip span {
  color: #dff1ff;
  font-size: 1.7rem;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.profile-rank-chip small {
  color: rgba(166, 201, 235, 0.64);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.profile-stat-card {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(73,161,255,0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(3, 8, 14, 0.92), rgba(0, 0, 0, 0.48));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.profile-stat-card span,
.profile-stat-card strong {
  display: block;
}

.profile-stat-card span {
  color: rgba(166, 201, 235, 0.68);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-stat-card strong {
  margin-top: 10px;
  color: #f7fbff;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.profile-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 16px;
}

.profile-progress-panel,
.profile-side-panel,
.profile-activity-panel,
.profile-error,
.profile-loading-card {
  padding: 18px;
}

.profile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-panel-head h3 {
  margin: 4px 0 0;
  color: #f5fbff;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.profile-panel-head.compact h3 {
  font-size: 1.1rem;
}

.profile-cycle-list,
.profile-activity-feed,
.profile-fragment-mini-grid,
.profile-boot-lines {
  display: grid;
  gap: 10px;
}

.profile-cycle-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(73,161,255,0.10);
  border-radius: 16px;
  color: inherit;
  background: rgba(0,0,0,0.20);
  text-align: left;
  transition: transform 150ms ease, border 150ms ease, background 150ms ease;
}

.profile-cycle-row:hover {
  transform: translateY(-1px);
  border-color: rgba(73,161,255,0.22);
  background: rgba(73,161,255,0.055);
}

.profile-cycle-symbol {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.14);
  border-radius: 15px;
  color: #9bd0ff;
  background: rgba(73,161,255,0.05);
  font-size: 1.25rem;
}

.profile-cycle-info {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.profile-cycle-info strong,
.profile-cycle-info small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-cycle-info strong {
  color: #f5fbff;
  font-size: 0.98rem;
}

.profile-cycle-info small {
  color: rgba(190, 215, 242, 0.62);
  font-size: 0.76rem;
}

.profile-cycle-info i {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}

.profile-cycle-info i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(73,161,255,0.9), rgba(151,213,255,0.72));
}

.profile-cycle-row em {
  color: #9bd0ff;
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 900;
}

.profile-fragment-mini {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(73,161,255,0.10);
  border-radius: 15px;
  background: rgba(0,0,0,0.20);
}

.profile-fragment-mini > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.14);
  border-radius: 14px;
  color: #dff1ff;
  background: rgba(73,161,255,0.05);
  font-size: 1.15rem;
}

.profile-fragment-mini strong,
.profile-fragment-mini small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-fragment-mini strong {
  color: #f4fbff;
  font-size: 0.86rem;
}

.profile-fragment-mini small {
  margin-top: 2px;
  color: rgba(190, 215, 242, 0.60);
  font-size: 0.72rem;
}

.profile-activity-line {
  display: grid;
  grid-template-columns: 36px 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(73,161,255,0.10);
  border-radius: 15px;
  background: rgba(0,0,0,0.18);
}

.activity-index {
  color: rgba(155, 208, 255, 0.52);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  text-align: right;
}

.activity-symbol {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,0.13);
  border-radius: 13px;
  color: #9bd0ff;
  background: rgba(73,161,255,0.045);
}

.profile-activity-line strong,
.profile-activity-line small {
  display: block;
}

.profile-activity-line strong {
  color: #f5fbff;
  font-size: 0.9rem;
}

.profile-activity-line small {
  margin-top: 3px;
  color: rgba(190, 215, 242, 0.60);
  font-size: 0.76rem;
}

.profile-empty-state {
  padding: 16px;
  border: 1px dashed rgba(73,161,255,0.16);
  border-radius: 16px;
  background: rgba(0,0,0,0.16);
}

.profile-empty-state strong,
.profile-empty-state p {
  display: block;
  margin: 0;
}

.profile-empty-state strong {
  color: #f5fbff;
}

.profile-empty-state p {
  margin-top: 6px;
  color: rgba(190, 215, 242, 0.62);
  line-height: 1.45;
}

.profile-boot-lines {
  margin-top: 12px;
  color: rgba(155, 208, 255, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

@media (max-width: 980px) {
  .profile-identity,
  .profile-main-grid {
    grid-template-columns: 1fr;
  }

  .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-rank-chip {
    width: fit-content;
  }
}

@media (max-width: 620px) {
  .profile-stat-grid {
    grid-template-columns: 1fr;
  }

  .profile-panel-head {
    display: grid;
  }

  .profile-cycle-row,
  .profile-activity-line {
    grid-template-columns: 1fr;
  }

  .activity-index {
    text-align: left;
  }
}

/* ===== FASE 9.1B — Tentativas compactas na Camada ===== */
.community-attempts-console {
  display: none !important;
}

.layer-play-status.layer-play-status-with-community {
  grid-template-columns: minmax(58px, .72fr) minmax(70px, .82fr) minmax(170px, 1.7fr) !important;
  gap: 6px !important;
  align-items: stretch !important;
}

.community-compact-metrics {
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0;
}

.community-compact-metrics span,
.layer-play-status.layer-play-status-with-community > span {
  min-height: 48px !important;
  padding: 6px 7px !important;
  border: 1px solid rgba(73,161,255,0.13);
  border-radius: 13px;
  background: rgba(73,161,255,0.040);
  text-align: center;
  display: grid;
  place-items: center;
  gap: 2px;
}

.community-compact-metrics strong,
.community-compact-metrics small {
  display: block;
  line-height: 1;
}

.community-compact-metrics strong {
  color: #ffffff;
  font-size: 0.82rem;
}

.community-compact-metrics small {
  color: rgba(170,216,255,0.56);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .layer-play-status.layer-play-status-with-community {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .community-compact-metrics {
    grid-column: 1 / -1;
  }
}

/* ===== FASE 10.2 — Métricas da Camada no topo global ===== */
.workspace-statusbar.workspace-statusbar-dynamic {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 14px !important;
  min-height: 50px !important;
  padding: 9px 12px !important;
}

.workspace-statusbar-dynamic .workspace-context-main {
  min-width: 0;
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.workspace-statusbar-dynamic .workspace-path {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(180, 218, 255, 0.72) !important;
}

.workspace-context-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.workspace-context-metrics[hidden] {
  display: none !important;
}

.workspace-context-metrics span {
  min-width: 58px;
  min-height: 34px;
  padding: 5px 8px;
  display: grid;
  place-items: center;
  gap: 1px;
  border: 1px solid rgba(73, 161, 255, 0.14);
  border-radius: 11px;
  background: rgba(73, 161, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  text-align: center;
}

.workspace-context-metrics strong,
.workspace-context-metrics small {
  display: block;
  line-height: 1;
}

.workspace-context-metrics strong {
  color: #f4fbff;
  font-size: 0.78rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.workspace-context-metrics small {
  color: rgba(170,216,255,0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.48rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.workspace-statusbar-dynamic.is-puzzle-context {
  border-color: rgba(73,161,255,0.18) !important;
  background: linear-gradient(180deg, rgba(0,0,0,0.38), rgba(3,8,18,0.76)) !important;
}

/* remove as métricas grandes de dentro do cabeçalho da questão */
.layer-play-status.layer-play-status-minimal {
  width: auto !important;
  min-width: 84px !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

.layer-play-status.layer-play-status-minimal span {
  min-height: 38px !important;
  padding: 6px 8px !important;
  border-radius: 11px !important;
}

.layer-play-header {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
}

.layer-play-header h2 {
  max-width: 100% !important;
  word-break: normal !important;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .workspace-statusbar.workspace-statusbar-dynamic {
    grid-template-columns: 1fr !important;
  }

  .workspace-context-metrics {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .workspace-context-metrics span {
    flex: 0 0 auto;
  }
}

@media (max-width: 720px) {
  .layer-play-header {
    grid-template-columns: 1fr !important;
  }

  .layer-play-status.layer-play-status-minimal {
    width: fit-content !important;
  }
}

/* ===== FASE 10.3 — Métricas horizontais da Camada ===== */
.workspace-statusbar.workspace-statusbar-dynamic {
  grid-template-columns: minmax(0, 1fr) auto !important;
  min-height: 42px !important;
  padding: 7px 10px !important;
  gap: 10px !important;
  overflow: hidden !important;
}

.workspace-context-metrics {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.workspace-context-metrics span {
  width: auto !important;
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 5px 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
  border-radius: 999px !important;
}

.workspace-context-metrics small,
.workspace-context-metrics strong {
  display: inline !important;
  line-height: 1 !important;
}

.workspace-context-metrics small {
  order: 1;
  font-size: 0.54rem !important;
  letter-spacing: 0.08em !important;
}

.workspace-context-metrics strong {
  order: 2;
  font-size: 0.74rem !important;
}

@media (max-width: 980px) {
  .workspace-statusbar.workspace-statusbar-dynamic {
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }

  .workspace-context-metrics {
    justify-content: flex-start !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
  }
}

/* ===== FASE 11 — REGISTROS / RANKING AVANÇADO ===== */
.ranking-advanced-route {
  display: grid;
  gap: 18px;
}

.ranking-advanced-hero {
  overflow: hidden;
  padding: 0;
  border-color: rgba(97,171,255,0.14);
  background:
    radial-gradient(circle at 18% 0%, rgba(97,171,255,0.13), transparent 26%),
    linear-gradient(180deg, rgba(2, 7, 15, 0.96), rgba(0, 0, 0, 0.72));
}

.ranking-hero-body {
  padding: 24px;
}

.ranking-hero-body h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2rem, 4.4vw, 4.1rem);
  line-height: .92;
  letter-spacing: -0.075em;
}

.ranking-hero-body p {
  max-width: 760px;
}

.ranking-status-stack span {
  border-color: rgba(97,171,255,0.13);
  background: rgba(0,0,0,0.28);
}

.ranking-advanced-stage {
  display: grid;
  gap: 18px;
}

.ranking-console-loading {
  padding: 0;
  overflow: hidden;
}

.ranking-boot-lines {
  display: grid;
  gap: 9px;
  padding: 20px;
  color: rgba(214,235,255,0.86);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86rem;
  background: #000104;
}

.ranking-boot-lines span:first-child {
  color: #7bc7ff;
}

.ranking-boot-lines.error-lines span {
  color: #ff9ab7;
}

.ranking-matrix-shell {
  display: grid;
  gap: 16px;
}

.ranking-control-panel,
.ranking-scope-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-color: rgba(97,171,255,0.13);
  background:
    linear-gradient(180deg, rgba(3,8,16,0.94), rgba(0,0,0,0.62)),
    radial-gradient(circle at 100% 0%, rgba(97,171,255,0.10), transparent 30%);
}

.ranking-control-panel h2,
.ranking-scope-card h3,
.ranking-section-head h3 {
  margin: 0;
  letter-spacing: -0.05em;
}

.ranking-control-panel p,
.ranking-scope-card p {
  margin: 8px 0 0;
  color: rgba(206,224,248,0.68);
  line-height: 1.55;
}

.ranking-cycle-picker {
  min-width: min(360px, 100%);
  display: grid;
  gap: 8px;
}

.ranking-cycle-picker span {
  color: rgba(214,235,255,0.74);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ranking-cycle-picker select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(97,171,255,0.16);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  color: #edf7ff;
  background: #000104;
  font: inherit;
}

.ranking-scope-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.ranking-scope-symbol {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97,171,255,0.20);
  border-radius: 20px;
  color: #7bc7ff;
  background: rgba(97,171,255,0.055);
  font-size: 2rem;
  box-shadow: inset 0 0 24px rgba(97,171,255,0.04);
}

.ranking-scope-tags {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 280px;
}

.ranking-scope-tags span {
  padding: 8px 10px;
  border: 1px solid rgba(97,171,255,0.13);
  border-radius: 999px;
  color: rgba(227,240,255,0.76);
  background: rgba(0,0,0,0.28);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ranking-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.ranking-stat-card {
  min-height: 94px;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(4,10,20,0.92), rgba(0,0,0,0.58));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.ranking-stat-card strong,
.ranking-stat-card span,
.ranking-stat-card small {
  display: block;
}

.ranking-stat-card strong {
  color: #f2fbff;
  font-size: 1.36rem;
  font-weight: 950;
  line-height: 1;
}

.ranking-stat-card span {
  color: #7bc7ff;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ranking-stat-card small {
  color: rgba(206,224,248,0.55);
  font-size: .72rem;
}

.ranking-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ranking-board,
.ranking-panel {
  border-color: rgba(97,171,255,0.12);
  background:
    linear-gradient(180deg, rgba(3,8,16,0.94), rgba(0,0,0,0.64)),
    radial-gradient(circle at 100% 0%, rgba(97,171,255,0.07), transparent 28%);
}

.ranking-section-head {
  margin-bottom: 14px;
}

.ranking-section-head h3 {
  font-size: 1.18rem;
}

.compact-ranking-table {
  display: grid;
  gap: 8px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(97,171,255,0.10);
  border-radius: 15px;
  background: rgba(0,0,0,0.24);
}

.ranking-row.is-podium {
  border-color: rgba(97,171,255,0.20);
  background: rgba(97,171,255,0.055);
}

.rank-pos {
  color: #7bc7ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 950;
}

.rank-user strong,
.rank-user small,
.rank-metrics span,
.rank-metrics small {
  display: block;
}

.rank-user strong {
  color: #eff8ff;
  font-size: .94rem;
}

.rank-user small,
.rank-metrics small {
  color: rgba(206,224,248,0.55);
  font-size: .75rem;
}

.rank-metrics {
  text-align: right;
  min-width: 140px;
}

.rank-metrics span {
  color: #dcefff;
  font-size: .9rem;
  font-weight: 950;
}

.ranking-list-lines,
.ranking-snapshot,
.ranking-activity-feed {
  display: grid;
  gap: 8px;
}

.ranking-list-lines > div,
.ranking-snapshot > div,
.ranking-feed-line {
  padding: 11px 12px;
  border: 1px solid rgba(97,171,255,0.10);
  border-radius: 15px;
  background: rgba(0,0,0,0.22);
}

.ranking-list-lines > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
}

.ranking-list-lines span {
  color: #7bc7ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 950;
}

.ranking-list-lines strong,
.ranking-list-lines small,
.ranking-snapshot span,
.ranking-snapshot strong,
.ranking-snapshot small,
.ranking-feed-line span,
.ranking-feed-line strong,
.ranking-feed-line small {
  display: block;
}

.ranking-list-lines strong,
.ranking-snapshot strong,
.ranking-feed-line strong {
  color: #f1f8ff;
}

.ranking-list-lines small,
.ranking-snapshot small,
.ranking-feed-line small {
  margin-top: 3px;
  color: rgba(206,224,248,0.56);
  font-size: .75rem;
}

.friction-lines > div:first-child {
  border-color: rgba(255,83,112,0.18);
}

.ranking-snapshot span,
.ranking-feed-line span {
  color: #7bc7ff;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ranking-feed-line.is-solve {
  border-color: rgba(97,171,255,0.18);
  background: rgba(97,171,255,0.045);
}

.ranking-empty-line {
  padding: 16px;
  border: 1px dashed rgba(97,171,255,0.14);
  border-radius: 16px;
  color: rgba(206,224,248,0.62);
  background: rgba(0,0,0,0.18);
}

@media (max-width: 1120px) {
  .ranking-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-content-grid,
  .ranking-control-panel,
  .ranking-scope-card {
    grid-template-columns: 1fr;
  }

  .ranking-scope-tags {
    max-width: none;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .ranking-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-metrics {
    grid-column: 2;
    text-align: left;
    min-width: 0;
  }
}

/* ===== FASE 12 — EDITOR AVANÇADO DE CAMADAS E BLOCOS ===== */
.layer-content-blocks {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.layer-content-head {
  margin-bottom: 0;
}

.layer-block-stack {
  display: grid;
  gap: 10px;
}

.layer-content-block {
  border: 1px solid rgba(73, 161, 255, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(3, 8, 16, 0.64));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  padding: 14px;
  overflow: hidden;
}

.layer-content-block .block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.layer-content-block .block-head span {
  min-width: 42px;
  padding: 5px 8px;
  border: 1px solid rgba(73, 161, 255, 0.18);
  border-radius: 10px;
  color: #a9d8ff;
  background: rgba(73, 161, 255, 0.06);
  font: 800 .68rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
  letter-spacing: .12em;
}

.layer-content-block .block-head strong {
  color: #edf7ff;
  font-size: .92rem;
}

.layer-content-block p,
.block-text-body p {
  margin: 0 0 9px;
  color: rgba(225, 238, 255, 0.82);
  line-height: 1.55;
  font-size: .9rem;
}

.layer-content-block p:last-child,
.block-text-body p:last-child {
  margin-bottom: 0;
}

.layer-content-block figure {
  margin: 0;
  display: grid;
  gap: 8px;
}

.layer-content-block img,
.layer-content-block video {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid rgba(73, 161, 255, 0.14);
  border-radius: 14px;
  background: #000;
}

.layer-content-block audio {
  width: 100%;
  filter: saturate(.8);
}

.layer-content-block figcaption {
  color: rgba(195, 214, 240, 0.62);
  font-size: .78rem;
}

.layer-content-block pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #b9dcff;
  background: #000104;
  border: 1px solid rgba(73, 161, 255, 0.14);
  border-radius: 14px;
  padding: 12px;
  font: .82rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.block-html-hint {
  border-style: dashed;
  opacity: .82;
}

.advanced-layer-content-editor {
  border-color: rgba(73, 161, 255, 0.16) !important;
  background: linear-gradient(180deg, rgba(0,0,0,0.22), rgba(3, 8, 16, 0.42));
}

.advanced-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  gap: 14px;
}

.content-editor-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(73, 161, 255, 0.12);
  border-radius: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.content-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.content-editor-head strong,
.content-editor-head small {
  display: block;
}

.content-editor-head strong {
  color: #edf7ff;
  font-size: .9rem;
}

.content-editor-head small {
  margin-top: 3px;
  color: rgba(195, 214, 240, 0.62);
  font-size: .74rem;
  line-height: 1.35;
}

.content-blocks-editor,
.hidden-artifacts-editor {
  display: grid;
  gap: 10px;
}

.content-block-row,
.hidden-artifact-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
}

.content-row-head {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 96px auto;
  gap: 8px;
  align-items: center;
}

.hidden-artifact-row .content-row-head {
  grid-template-columns: 150px minmax(0, 1fr) 96px 88px auto;
}

.content-block-row input,
.content-block-row select,
.content-block-row textarea,
.hidden-artifact-row input,
.hidden-artifact-row select,
.hidden-artifact-row textarea {
  border-color: rgba(73, 161, 255, 0.12);
  background: rgba(0, 0, 0, 0.34);
}

.empty-editor-note {
  margin: 0;
  color: rgba(195, 214, 240, 0.56);
  font-size: .82rem;
  border: 1px dashed rgba(73, 161, 255, 0.14);
  border-radius: 12px;
  padding: 12px;
}

.enigmal-hidden-artifacts {
  display: none !important;
}

@media (max-width: 1180px) {
  .advanced-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .content-row-head,
  .hidden-artifact-row .content-row-head {
    grid-template-columns: 1fr;
  }

  .content-editor-head {
    flex-direction: column;
  }
}

/* ===== FASE 13 — UPLOAD REAL DE MÍDIAS ===== */
.content-upload-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.content-upload-field input[name="content_block_url"] {
  min-width: 0;
}

.content-upload-button {
  position: relative;
  min-width: 92px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(73, 161, 255, 0.20);
  border-radius: 13px;
  padding: 0 13px;
  color: #b7dcff;
  background: rgba(73, 161, 255, 0.065);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}

.content-upload-button:hover {
  border-color: rgba(73, 161, 255, 0.34);
  background: rgba(73, 161, 255, 0.12);
  transform: translateY(-1px);
}

.content-upload-button input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.content-upload-status {
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(190, 218, 245, 0.62);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.70rem;
  letter-spacing: 0.04em;
}

.content-block-row.is-uploading {
  border-color: rgba(73, 161, 255, 0.32);
  box-shadow: 0 0 0 1px rgba(73, 161, 255, 0.08), 0 0 28px rgba(73, 161, 255, 0.08);
}

.content-block-row.is-uploading .content-upload-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #61abff;
  box-shadow: 0 0 14px rgba(97, 171, 255, 0.65);
  animation: uploadPulse 900ms ease-in-out infinite alternate;
}

@keyframes uploadPulse {
  from { opacity: 0.38; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.18); }
}

@media (max-width: 760px) {
  .content-upload-field {
    grid-template-columns: 1fr;
  }

  .content-upload-button {
    min-height: 42px;
  }
}

/* ===== FASE 14 — MODERAÇÃO E CONTROLE OPERACIONAL ===== */
.moderation-console-page {
  display: grid;
  gap: 18px;
}

.moderation-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid rgba(73, 161, 255, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(73, 161, 255, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(3, 8, 16, 0.92), rgba(0, 0, 0, 0.58));
  box-shadow: 0 16px 40px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.03);
}

.moderation-hero h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.06em;
}

.moderation-hero p:not(.eyebrow) {
  margin: 10px 0 0;
  color: rgba(211,226,246,.72);
  line-height: 1.55;
}

.moderation-hero-terminal {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(73, 161, 255, 0.14);
  border-radius: 18px;
  background: #00040b;
  color: rgba(169, 211, 255, 0.86);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  box-shadow: inset 0 0 32px rgba(73, 161, 255, .035);
}

.moderation-stage {
  display: grid;
  gap: 16px;
}

.mod-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.mod-summary-card {
  min-height: 92px;
  padding: 13px;
  border: 1px solid rgba(73, 161, 255, 0.13);
  border-radius: 18px;
  background: rgba(0,0,0,.30);
  display: grid;
  align-content: center;
  gap: 3px;
}

.mod-summary-card strong {
  color: #eaf6ff;
  font-size: 1.55rem;
  line-height: 1;
}

.mod-summary-card span,
.mod-summary-card small {
  display: block;
}

.mod-summary-card span {
  color: rgba(188, 219, 255, 0.82);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.mod-summary-card small {
  color: rgba(188, 219, 255, 0.52);
  font-size: .72rem;
}

.mod-grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 16px;
  align-items: start;
}

.mod-side-stack {
  display: grid;
  gap: 16px;
}

.mod-panel {
  padding: 16px;
  border-color: rgba(73, 161, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(3, 8, 16, 0.94), rgba(0,0,0,.55)),
    radial-gradient(circle at 100% 0%, rgba(73,161,255,.08), transparent 30%);
}

.mod-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.mod-panel-head h3 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -.04em;
}

.mod-panel-head small {
  display: block;
  margin-top: 4px;
  color: rgba(205,225,247,.62);
}

.mod-panel-head.simple {
  display: block;
}

.mod-message-list,
.mod-alert-list,
.mod-log-list {
  display: grid;
  gap: 9px;
}

.mod-message-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(73, 161, 255, 0.10);
  border-radius: 16px;
  background: rgba(0,0,0,.22);
}

.mod-message-row.is-muted,
.mod-user-card.is-muted {
  opacity: .68;
  border-style: dashed;
}

.mod-message-code {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(73, 161, 255, 0.10);
  border-radius: 13px;
  background: #00040b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.mod-message-code strong {
  color: #9fd0ff;
  font-size: .76rem;
}

.mod-message-code small {
  color: rgba(190,218,247,.56);
  text-transform: uppercase;
  letter-spacing: .10em;
  font-size: .66rem;
}

.mod-message-body header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(210,231,255,.70);
  font-size: .76rem;
}

.mod-message-body header strong {
  color: #eaf6ff;
}

.mod-message-body p {
  margin: 7px 0 0;
  color: rgba(229,240,255,.80);
  line-height: 1.48;
  font-size: .88rem;
}

.mod-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: center;
  justify-content: flex-end;
}

.mod-row-actions button,
.mod-alert-row button {
  border: 1px solid rgba(73, 161, 255, 0.14);
  border-radius: 10px;
  padding: 7px 9px;
  color: rgba(221,238,255,.86);
  background: rgba(73,161,255,.06);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mod-row-actions button:hover,
.mod-alert-row button:hover {
  border-color: rgba(73, 161, 255, 0.28);
  background: rgba(73,161,255,.12);
}

.mod-alert-row,
.mod-log-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(247, 201, 106, .14);
  border-radius: 14px;
  background: rgba(247, 201, 106, .045);
}

.mod-alert-icon,
.mod-log-row > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #f7c96a;
  background: rgba(247,201,106,.08);
  font-weight: 950;
}

.mod-alert-row strong,
.mod-log-row strong {
  display: block;
  color: #fff6df;
}

.mod-alert-row small,
.mod-log-row small {
  display: block;
  margin-top: 3px;
  color: rgba(255,241,208,.62);
  line-height: 1.35;
}

.mod-user-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mod-user-card {
  padding: 12px;
  border: 1px solid rgba(73, 161, 255, 0.12);
  border-radius: 18px;
  background: rgba(0,0,0,.22);
}

.mod-user-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.mod-user-head > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,161,255,.16);
  border-radius: 14px;
  color: #9fd0ff;
  background: rgba(73,161,255,.07);
  font-weight: 950;
}

.mod-user-head strong,
.mod-user-head small {
  display: block;
}

.mod-user-head strong {
  color: #eef7ff;
}

.mod-user-head small,
.mod-user-last {
  color: rgba(205,225,247,.58);
  font-size: .72rem;
}

.mod-user-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 6px;
  margin: 12px 0 8px;
}

.mod-user-metrics span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(73,161,255,.045);
}

.mod-user-metrics strong {
  color: #eaf6ff;
  line-height: 1;
}

.mod-user-metrics small {
  color: rgba(205,225,247,.56);
  font-size: .65rem;
  text-transform: uppercase;
}

.mod-user-actions {
  justify-content: flex-start;
  margin-top: 10px;
}

.mod-empty-box {
  min-height: 120px;
  padding: 18px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  border: 1px dashed rgba(73, 161, 255, .16);
  border-radius: 18px;
  background: rgba(0,0,0,.18);
}

.mod-empty-box span {
  color: rgba(73, 161, 255, .7);
  font-size: 1.6rem;
}

.mod-empty-box strong,
.mod-empty-box small {
  display: block;
}

.mod-empty-box strong {
  margin-top: 8px;
  color: #eff7ff;
}

.mod-empty-box small {
  margin-top: 4px;
  color: rgba(205,225,247,.56);
}

@media (max-width: 1180px) {
  .mod-summary-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .mod-grid-main { grid-template-columns: 1fr; }
  .mod-user-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .moderation-hero,
  .mod-message-row,
  .mod-user-grid,
  .mod-summary-grid {
    grid-template-columns: 1fr;
  }

  .mod-panel-head,
  .mod-row-actions {
    align-items: stretch;
    justify-content: flex-start;
  }
}

/* ===== FASE 15 — EVENTOS / TEMPORADAS ESPECIAIS ===== */
.events-stage {
  display: grid;
  gap: 18px;
}

.events-console-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.events-board,
.event-inspector,
.event-admin-panel {
  border-color: rgba(97, 171, 255, 0.14) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(97,171,255,0.08), transparent 26%),
    linear-gradient(180deg, rgba(3, 8, 15, 0.94), rgba(0, 0, 0, 0.72)) !important;
}

.terminal-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.terminal-section-head h2 {
  margin: 0;
  letter-spacing: -0.05em;
}

.terminal-section-head p:not(.eyebrow) {
  margin: 8px 0 0;
  color: rgba(205, 224, 248, 0.68);
  line-height: 1.5;
}

.events-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.events-summary-grid span {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 16px;
  background: rgba(0,0,0,0.26);
}

.events-summary-grid strong,
.events-summary-grid small {
  display: block;
}

.events-summary-grid strong {
  color: #eff8ff;
  font-size: 1.25rem;
}

.events-summary-grid small {
  color: rgba(186,210,238,0.62);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.66rem;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.event-folder-card {
  position: relative;
  min-height: 150px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 10px 12px;
  align-items: start;
  width: 100%;
  padding: 15px;
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 18px;
  color: inherit;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(6, 12, 24, 0.88), rgba(0, 0, 0, 0.48)),
    radial-gradient(circle at 100% 0%, rgba(97,171,255,0.10), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  cursor: pointer;
  animation: eventBoot 420ms ease both;
  animation-delay: var(--boot-delay, 0ms);
}

.event-folder-card:hover,
.event-folder-card.is-selected {
  transform: translateY(-1px);
  border-color: rgba(97,171,255,0.28);
  background:
    linear-gradient(180deg, rgba(9, 18, 34, 0.92), rgba(0, 0, 0, 0.52)),
    radial-gradient(circle at 100% 0%, rgba(97,171,255,0.16), transparent 36%);
}

.event-folder-card.is-live::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(97,171,255,0.9), transparent);
}

.event-folder-symbol {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97,171,255,0.16);
  border-radius: 15px;
  color: #b8dcff;
  background: rgba(97,171,255,0.06);
  font-size: 1.55rem;
}

.event-folder-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.event-folder-code {
  color: rgba(97,171,255,0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.event-folder-main strong {
  color: #f4f9ff;
  line-height: 1.12;
}

.event-folder-main small {
  color: rgba(196, 216, 240, 0.62);
  font-size: 0.78rem;
}

.event-folder-card .status-pill {
  grid-column: 1 / -1;
  justify-self: start;
}

.event-inspector {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.event-inspector h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.event-inspector p {
  margin: 0;
  color: rgba(206,226,248,0.7);
  line-height: 1.55;
}

.event-inspector-symbol {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97,171,255,0.18);
  border-radius: 22px;
  color: #cce8ff;
  background: rgba(97,171,255,0.06);
  font-size: 2.2rem;
}

.event-inspector-grid {
  display: grid;
  gap: 8px;
}

.event-inspector-grid span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(97,171,255,0.10);
  border-radius: 14px;
  background: rgba(0,0,0,0.24);
}

.event-inspector-grid small {
  color: rgba(180,205,235,0.58);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.64rem;
}

.event-inspector-grid strong,
.event-inspector-grid code {
  color: #edf7ff;
  font-size: 0.82rem;
  word-break: break-word;
}

.event-admin-panel {
  margin-top: 16px;
}

.event-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.event-form-grid label {
  display: grid;
}

.event-form-grid .span-2 {
  grid-column: span 2;
}

.event-form-grid textarea,
.event-form-grid select {
  width: 100%;
  border: 1px solid rgba(97,171,255,0.14);
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
  color: var(--text);
  background: rgba(0,0,0,0.34);
}

.event-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes eventBoot {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1120px) {
  .events-console-layout {
    grid-template-columns: 1fr;
  }
  .event-inspector {
    position: relative;
    top: auto;
  }
  .event-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .terminal-section-head,
  .event-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .events-summary-grid,
  .event-form-grid {
    grid-template-columns: 1fr;
  }
  .event-form-grid .span-2 {
    grid-column: auto;
  }
}

/* ===== FASE 15/17 — EVENTOS E NOTIFICAÇÕES INTERNAS ===== */
.notification-bell {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(97, 171, 255, 0.16);
  border-radius: 14px;
  color: #dceeff;
  background: rgba(0, 0, 0, 0.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  transition: border 150ms ease, transform 150ms ease, background 150ms ease;
}

.notification-bell:hover,
.notification-bell.active,
.notification-bell[aria-current="page"] {
  transform: translateY(-1px);
  border-color: rgba(97, 171, 255, 0.34);
  background: rgba(97, 171, 255, 0.09);
}

.notification-bell.has-unread {
  box-shadow: 0 0 22px rgba(97,171,255,0.12), inset 0 1px 0 rgba(255,255,255,0.03);
}

.notification-bell__icon {
  font-size: 1rem;
  line-height: 1;
}

.notification-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: #00101b;
  background: linear-gradient(135deg, #61abff, #e8f7ff);
  font-size: 0.66rem;
  font-weight: 950;
}

.events-stage,
.notifications-stage {
  display: grid;
  gap: 16px;
}

.events-console,
.notifications-console {
  display: grid;
  gap: 16px;
}

.events-head,
.notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.events-layout,
.notifications-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  gap: 16px;
  align-items: start;
}

.events-list,
.notification-feed {
  display: grid;
  gap: 10px;
}

.event-node,
.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px;
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 16px;
  background: rgba(0,0,0,0.24);
  transition: transform 150ms ease, border 150ms ease, background 150ms ease;
}

.event-node:hover,
.event-node.is-selected,
.notification-item:hover {
  transform: translateY(-1px);
  border-color: rgba(97,171,255,0.28);
  background: rgba(97,171,255,0.055);
}

.event-symbol,
.notification-marker {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97,171,255,0.18);
  border-radius: 14px;
  color: #8fd0ff;
  background: rgba(97,171,255,0.055);
  font-weight: 950;
}

.event-node h3,
.notification-item h3 {
  margin: 4px 0 4px;
  color: #f3f9ff;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.event-node p,
.notification-item p,
.notification-side p {
  margin: 0;
  color: rgba(207,224,244,0.72);
  line-height: 1.45;
  font-size: 0.86rem;
}

.event-node header,
.notification-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(162,204,245,0.78);
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.event-node footer,
.notification-item footer {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-node footer button,
.notification-item footer button {
  border: 1px solid rgba(97,171,255,0.14);
  border-radius: 10px;
  padding: 7px 9px;
  color: #bde3ff;
  background: rgba(97,171,255,0.05);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.event-node footer button:hover,
.notification-item footer button:hover {
  border-color: rgba(97,171,255,0.30);
  background: rgba(97,171,255,0.10);
}

.notification-item.is-read {
  opacity: 0.72;
}

.notification-item.is-unread {
  border-color: rgba(97,171,255,0.25);
}

.notification-item.severity-success .notification-marker { color: #9bdcff; }
.notification-item.severity-warning .notification-marker { color: #f7c96a; border-color: rgba(247,201,106,0.22); }
.notification-item.severity-danger .notification-marker { color: #ff8fa8; border-color: rgba(255,83,112,0.26); }

.event-inspector,
.notification-side,
.admin-event-editor,
.admin-notification-composer {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 12px;
}

.event-inspector h3,
.notification-side h3,
.admin-notification-composer h3 {
  margin: 0;
  color: #f5fbff;
  font-size: 1.1rem;
}

.event-mini-stats,
.notification-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.event-mini-stats span,
.notification-mini-stats span {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 9px;
  border: 1px solid rgba(97,171,255,0.12);
  border-radius: 14px;
  background: rgba(97,171,255,0.045);
  text-align: center;
}

.event-mini-stats strong,
.notification-mini-stats strong {
  color: #f0f8ff;
  font-size: 1rem;
}

.event-mini-stats small,
.notification-mini-stats small {
  color: rgba(195,215,238,0.64);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.notification-empty {
  padding: 20px;
  border: 1px dashed rgba(97,171,255,0.16);
  border-radius: 16px;
  background: rgba(0,0,0,0.20);
}

@media (max-width: 980px) {
  .events-layout,
  .notifications-layout {
    grid-template-columns: 1fr;
  }

  .events-head,
  .notifications-head {
    align-items: stretch;
    flex-direction: column;
  }

  .event-inspector,
  .notification-side,
  .admin-event-editor,
  .admin-notification-composer {
    position: relative;
    top: auto;
  }
}

/* ===== PATCH FASE 15.2 — TOPO PADRÃO PRESERVADO + EVENTOS ===== */
body.dashboard-active .app-shell {
  width: min(1260px, calc(100% - 24px)) !important;
  padding: 14px 0 12px !important;
}

.dashboard-layout.top-shell {
  gap: 12px !important;
}

.enigmal-topbar.top-console {
  position: sticky !important;
  top: 10px !important;
  z-index: 30 !important;
  min-height: 58px !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: minmax(170px, 210px) minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 10px !important;
  border-radius: 18px !important;
  overflow: visible !important;
}

.enigmal-topbar .top-brand {
  min-height: 42px !important;
  max-width: 210px !important;
  padding: 6px 9px !important;
  gap: 8px !important;
  border-radius: 13px !important;
}

.enigmal-topbar .brand-mark {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  font-size: .76rem !important;
}

.enigmal-topbar .top-brand-copy strong {
  font-size: .72rem !important;
  letter-spacing: .13em !important;
  line-height: 1.05 !important;
}

.enigmal-topbar .top-brand-copy small {
  max-width: 138px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: .56rem !important;
  line-height: 1.1 !important;
}

.shell-top-nav.top-nav {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 4px !important;
  border-radius: 15px !important;
  overflow: visible !important;
  scrollbar-width: none !important;
}

.shell-top-nav.top-nav::-webkit-scrollbar {
  display: none !important;
}

.shell-top-nav.top-nav button {
  flex: 0 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 5px 7px !important;
  border-radius: 10px !important;
  font-size: .66rem !important;
  line-height: 1 !important;
  letter-spacing: .025em !important;
  white-space: nowrap !important;
}

.shell-top-nav .top-nav-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 6px !important;
  font-size: .68rem !important;
  line-height: 1 !important;
  transform: none !important;
}

.shell-top-nav.top-nav button > span:not(.top-nav-icon) {
  display: inline-flex !important;
  align-items: center !important;
  height: 18px !important;
  line-height: 1 !important;
  transform: none !important;
}

.shell-top-identity.top-identity {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

.shell-top-identity .system-clock,
.shell-top-identity .user-chip {
  padding: 7px 8px !important;
  border-radius: 13px !important;
}

.shell-top-identity .system-clock span {
  font-size: .76rem !important;
  line-height: 1 !important;
}

.shell-top-identity .system-clock small {
  font-size: .50rem !important;
  line-height: 1.1 !important;
}

.notification-bell {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: inline-grid !important;
  place-items: center !important;
}

.shell-top-identity .user-chip {
  grid-template-columns: minmax(54px, 1fr) auto !important;
  gap: 0 6px !important;
}

.shell-top-identity .user-chip span {
  font-size: .70rem !important;
  line-height: 1.05 !important;
}

.shell-top-identity .user-chip small {
  font-size: .52rem !important;
  line-height: 1.05 !important;
}

.shell-top-identity .user-chip button {
  min-height: 27px !important;
  padding: 5px 7px !important;
  border-radius: 9px !important;
  font-size: .66rem !important;
}

body.dashboard-active .global-footer {
  width: min(1260px, calc(100% - 24px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 1160px) {
  .enigmal-topbar.top-console {
    position: relative !important;
    top: 0 !important;
    grid-template-columns: minmax(160px, 1fr) auto !important;
    grid-template-areas:
      "brand identity"
      "nav nav" !important;
  }

  .enigmal-topbar .top-brand { grid-area: brand; }
  .shell-top-identity.top-identity { grid-area: identity; }

  .shell-top-nav.top-nav {
    grid-area: nav;
    justify-content: center !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
  }

  .shell-top-nav.top-nav button {
    flex: 0 0 auto !important;
  }
}

@media (max-width: 720px) {
  body.dashboard-active .app-shell,
  body.dashboard-active .global-footer {
    width: min(100% - 14px, 1260px) !important;
  }

  .enigmal-topbar.top-console {
    grid-template-columns: 1fr !important;
    grid-template-areas: "brand" "nav" "identity" !important;
    padding: 7px !important;
  }

  .shell-top-nav.top-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .shell-top-nav.top-nav button {
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 7px 9px !important;
  }

  .shell-top-identity.top-identity {
    width: 100% !important;
  }

  .shell-top-identity .system-clock {
    display: none !important;
  }

  .shell-top-identity .user-chip {
    width: 100% !important;
  }
}

/* ===== HOTFIX FINAL — manter menu validado + esconder itens administrativos ===== */
.shell-top-nav.top-nav [data-admin-only].hidden,
.shell-top-nav.top-nav [data-admin-only][hidden],
.enigmal-topbar [data-admin-only].hidden,
.enigmal-topbar [data-admin-only][hidden],
[data-admin-only].hidden,
[data-admin-only][hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ENIGMAL — Núcleo rework visual */
.shell-top-nav.top-nav button[data-route="nucleo"],
.enigmal-topbar .top-brand[data-route="nucleo"] {
  position: relative;
}

.shell-top-nav.top-nav button[data-route="nucleo"] {
  border-color: rgba(255, 77, 77, 0.18);
  background:
    linear-gradient(180deg, rgba(42, 8, 13, 0.72), rgba(14, 12, 18, 0.92));
  color: #ffe9ee;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(255,77,77,0.04);
}

.shell-top-nav.top-nav button[data-route="nucleo"] .top-nav-icon {
  color: #ff909f;
  text-shadow: 0 0 16px rgba(255, 92, 92, 0.3);
}

.shell-top-nav.top-nav button[data-route="nucleo"]:hover,
.shell-top-nav.top-nav button[data-route="nucleo"].active,
.shell-top-nav.top-nav button[data-route="nucleo"][aria-current="page"] {
  border-color: rgba(255, 77, 77, 0.28);
  background:
    radial-gradient(circle at top left, rgba(255, 84, 84, 0.18), transparent 44%),
    linear-gradient(180deg, rgba(56, 10, 18, 0.88), rgba(16, 13, 18, 0.96));
  color: #fff3f6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 28px rgba(255, 84, 84, 0.08);
}

/* ENIGMAL 24.0.0 — Conhecimentos, Conquistas e Legado integrados */
.nucleus-progression-filterline {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin:14px 0 12px;
  color:rgba(224,239,255,.72);
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.nucleus-progression-filterline button,
.nucleus-knowledge-card button,
.nucleus-legacy-node button,
.nucleus-legacy-warning-panel + .nucleus-panel-actions button {
  border:1px solid rgba(94,183,255,.26);
  background:linear-gradient(180deg, rgba(18,34,50,.9), rgba(6,12,21,.94));
  color:#dff3ff;
  border-radius:999px;
  padding:8px 12px;
  font-size:.72rem;
  letter-spacing:.05em;
  text-transform:uppercase;
  cursor:pointer;
}
.nucleus-progression-filterline button:hover,
.nucleus-knowledge-card button:not(:disabled):hover,
.nucleus-legacy-node button:not(:disabled):hover,
.nucleus-legacy-warning-panel + .nucleus-panel-actions button:not(:disabled):hover {
  border-color:rgba(118,207,255,.66);
  box-shadow:0 0 18px rgba(77,174,255,.18);
  transform:translateY(-1px);
}
.nucleus-knowledge-card button:disabled,
.nucleus-legacy-node button:disabled,
.nucleus-legacy-warning-panel + .nucleus-panel-actions button:disabled {
  cursor:not-allowed;
  opacity:.52;
  filter:saturate(.65);
}
.nucleus-knowledge-catalog {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
  gap:12px;
  max-height:min(58vh, 620px);
  overflow:auto;
  padding-right:4px;
}
.nucleus-knowledge-card {
  display:grid;
  gap:9px;
  padding:13px;
  border:1px solid rgba(88,178,255,.16);
  background:linear-gradient(180deg, rgba(12,22,34,.92), rgba(5,9,16,.96));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04), 0 14px 42px rgba(0,0,0,.22);
  border-radius:16px;
  min-height:210px;
}
.nucleus-knowledge-card.is-affordable { border-color:rgba(107,208,255,.48); box-shadow:0 0 28px rgba(45,154,255,.12), inset 0 1px 0 rgba(255,255,255,.05); }
.nucleus-knowledge-card.is-owned { border-color:rgba(101,255,207,.28); background:linear-gradient(180deg, rgba(16,42,48,.88), rgba(6,14,21,.96)); }
.nucleus-knowledge-card.is-locked { opacity:.68; filter:saturate(.72); }
.nucleus-knowledge-card__head { display:grid; gap:4px; }
.nucleus-knowledge-card__head span,
.nucleus-legacy-node span {
  color:rgba(128,207,255,.72);
  font-size:.62rem;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.nucleus-knowledge-card__head strong,
.nucleus-legacy-node strong {
  color:#f4fbff;
  font-family:Georgia, 'Times New Roman', serif;
  font-size:1rem;
  line-height:1.15;
}
.nucleus-knowledge-card p,
.nucleus-legacy-node p {
  margin:0;
  color:rgba(226,239,255,.78);
  font-size:.78rem;
  line-height:1.4;
}
.nucleus-knowledge-card small,
.nucleus-legacy-node small {
  color:rgba(214,232,250,.58);
  line-height:1.35;
}
.nucleus-knowledge-card__meta {
  display:grid;
  gap:5px;
  font-size:.68rem;
  color:rgba(191,224,255,.68);
}
.nucleus-knowledge-card__meta span {
  display:block;
  padding:6px 8px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(255,255,255,.035);
  border-radius:10px;
}
.nucleus-achievement-catalog--expanded { grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); max-height:min(58vh, 620px); overflow:auto; padding-right:4px; }
.nucleus-achievement-card.is-new { animation:nucleus-progress-pulse 1.6s ease both; }
.nucleus-legacy-warning-panel {
  display:grid;
  gap:4px;
  margin:12px 0;
  padding:12px 14px;
  border:1px solid rgba(255,205,118,.26);
  background:linear-gradient(180deg, rgba(44,31,12,.7), rgba(11,12,16,.92));
  color:rgba(255,241,207,.84);
  border-radius:16px;
}
.nucleus-legacy-warning-panel strong { color:#fff4d7; }
.nucleus-legacy-tree {
  position:relative;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
  gap:12px;
  max-height:min(58vh, 620px);
  overflow:auto;
  padding:4px 4px 10px;
}
.nucleus-legacy-tree::before {
  content:'';
  position:absolute;
  inset:10px;
  pointer-events:none;
  background:
    linear-gradient(90deg, transparent 49%, rgba(63,169,255,.08) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(63,169,255,.06) 50%, transparent 51%);
  background-size:80px 80px;
  opacity:.65;
}
.nucleus-legacy-node {
  position:relative;
  z-index:1;
  display:grid;
  gap:8px;
  padding:13px;
  border-radius:18px;
  border:1px solid rgba(75,159,255,.18);
  background:radial-gradient(circle at 20% 0%, rgba(49,142,255,.12), transparent 34%), linear-gradient(180deg, rgba(10,19,31,.94), rgba(5,9,15,.97));
  box-shadow:0 18px 50px rgba(0,0,0,.28);
}
.nucleus-legacy-node.is-available { border-color:rgba(105,210,255,.48); }
.nucleus-legacy-node.is-owned { border-color:rgba(122,255,214,.34); background:radial-gradient(circle at 20% 0%, rgba(69,255,210,.13), transparent 34%), linear-gradient(180deg, rgba(10,30,34,.94), rgba(4,10,15,.97)); }
.nucleus-legacy-node.is-locked { opacity:.66; filter:saturate(.7); }
@keyframes nucleus-progress-pulse {
  0% { box-shadow:0 0 0 rgba(89,203,255,0); transform:translateY(0); }
  35% { box-shadow:0 0 34px rgba(89,203,255,.24); transform:translateY(-2px); }
  100% { box-shadow:0 0 0 rgba(89,203,255,0); transform:translateY(0); }
}

/* ENIGMAL 24.0.1 — Rework visual da Loja/Conhecimentos/Conquistas do Núcleo */
.nucleus-shop-section-title--knowledge {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}
.nucleus-shop-section-title__link {
  appearance: none !important;
  border: 1px solid rgba(142, 203, 255, .28) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, rgba(12, 28, 44, .92), rgba(4, 12, 22, .96)) !important;
  color: #dff5ff !important;
  font-size: .62rem !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  padding: 5px 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  box-shadow: inset 0 0 14px rgba(68, 174, 255, .08) !important;
}
.nucleus-shop-section-title__link:hover {
  filter: brightness(1.16) !important;
  border-color: rgba(180, 225, 255, .48) !important;
}
.nucleus-shop-section-title__link i {
  font-style: normal !important;
  color: #74d8ff !important;
  opacity: .92 !important;
}
.nucleus-knowledge-shop-tile {
  height: 58px !important;
  border-radius: 4px !important;
  border: 2px solid rgba(190, 118, 48, .8) !important;
  outline: 1px solid rgba(255, 226, 160, .18) !important;
  background:
    linear-gradient(180deg, rgba(72, 44, 25, .35), rgba(12, 10, 8, .86)),
    radial-gradient(circle at 50% 24%, rgba(66, 191, 255, .22), transparent 60%) !important;
  box-shadow: inset 0 0 0 2px rgba(13, 5, 0, .72), 0 4px 9px rgba(0, 0, 0, .32) !important;
  transition: transform .12s ease, filter .12s ease, opacity .12s ease, box-shadow .12s ease !important;
}
.nucleus-knowledge-shop-tile:hover,
.nucleus-knowledge-shop-tile:focus-visible {
  transform: translateY(-1px) !important;
  filter: brightness(1.14) saturate(1.1) !important;
  box-shadow: inset 0 0 0 2px rgba(13, 5, 0, .72), 0 0 18px rgba(77, 199, 255, .25), 0 8px 16px rgba(0, 0, 0, .36) !important;
}
.nucleus-knowledge-shop-tile.is-affordable {
  animation: nucleusKnowledgeReady 1.9s ease-in-out infinite !important;
  border-color: rgba(255, 184, 76, .95) !important;
}
.nucleus-knowledge-shop-tile.is-unaffordable {
  filter: saturate(.82) brightness(.82) !important;
}
.nucleus-knowledge-shop-tile.is-locked {
  opacity: .48 !important;
  filter: grayscale(.72) brightness(.64) !important;
  border-color: rgba(119, 83, 55, .72) !important;
}
.nucleus-knowledge-shop-tile .nucleus-upgrade-tile__icon {
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  margin: 2px auto 0 !important;
}
.nucleus-progression-icon,
.nucleus-knowledge-shop-tile .nucleus-upgrade-tile__icon img,
.nucleus-tooltip-card__img {
  width: 34px !important;
  height: 34px !important;
  display: block !important;
  object-fit: contain !important;
  image-rendering: auto !important;
  pointer-events: none !important;
  user-select: none !important;
}
.nucleus-knowledge-shop-tile__cost {
  position: absolute !important;
  left: 3px !important;
  right: 3px !important;
  top: 2px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: rgba(255, 238, 181, .92) !important;
  font-size: .46rem !important;
  line-height: 1 !important;
  text-align: center !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8) !important;
}
.nucleus-knowledge-shop-tile .nucleus-upgrade-tile__era {
  top: auto !important;
  bottom: 12px !important;
  font-size: .42rem !important;
  opacity: .64 !important;
}
.nucleus-knowledge-shop-tile .nucleus-upgrade-tile__status {
  bottom: 2px !important;
  color: rgba(240, 249, 255, .86) !important;
  font-size: .47rem !important;
  letter-spacing: .05em !important;
}
.nucleus-empty-note--shop {
  grid-column: 1 / -1 !important;
  align-self: center !important;
  font-size: .72rem !important;
  text-align: center !important;
  color: rgba(231, 242, 255, .62) !important;
}
@keyframes nucleusKnowledgeReady {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(13, 5, 0, .72), 0 0 0 rgba(90, 203, 255, 0), 0 5px 11px rgba(0,0,0,.34); }
  50% { box-shadow: inset 0 0 0 2px rgba(13, 5, 0, .72), 0 0 18px rgba(90, 203, 255, .24), 0 8px 14px rgba(0,0,0,.38); }
}
.nucleus-owned-knowledge-list,
.nucleus-knowledge-next-list {
  display: grid !important;
  gap: 8px !important;
}
.nucleus-owned-knowledge-card {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
  border: 1px solid rgba(120, 196, 255, .16) !important;
  border-radius: 13px !important;
  padding: 10px !important;
  background: linear-gradient(180deg, rgba(10, 26, 43, .86), rgba(4, 11, 20, .9)) !important;
}
.nucleus-owned-knowledge-card__icon,
.nucleus-knowledge-mini,
.nucleus-knowledge-next-list article span {
  display: grid !important;
  place-items: center !important;
}
.nucleus-owned-knowledge-card__img {
  width: 42px !important;
  height: 42px !important;
}
.nucleus-owned-knowledge-card small,
.nucleus-owned-knowledge-card em,
.nucleus-knowledge-next-list small {
  color: rgba(213, 230, 244, .64) !important;
  font-size: .68rem !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}
.nucleus-owned-knowledge-card strong {
  display: block !important;
  margin-top: 3px !important;
  color: #f6fbff !important;
}
.nucleus-owned-knowledge-card p {
  margin: 5px 0 !important;
  color: rgba(224, 238, 255, .78) !important;
  font-size: .8rem !important;
}
.nucleus-owned-knowledge-card em {
  display: block !important;
  font-style: normal !important;
  color: #7bd6ff !important;
}
.nucleus-knowledge-mini-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
  gap: 8px !important;
}
.nucleus-knowledge-mini {
  grid-template-columns: 30px minmax(0, 1fr) !important;
  gap: 8px !important;
  min-height: 44px !important;
  text-align: left !important;
  border: 1px solid rgba(117, 197, 255, .18) !important;
  border-radius: 11px !important;
  background: rgba(6, 18, 32, .84) !important;
  color: #edf8ff !important;
  padding: 7px 8px !important;
}
.nucleus-knowledge-mini__img,
.nucleus-knowledge-next-list__img {
  width: 30px !important;
  height: 30px !important;
}
.nucleus-knowledge-mini span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: .74rem !important;
}
.nucleus-knowledge-next-list article {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  padding: 6px 2px !important;
}
.nucleus-knowledge-next-list article strong {
  color: rgba(240, 249, 255, .84) !important;
  font-size: .8rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.nucleus-knowledge-next-list article small {
  grid-column: 2 !important;
  margin-top: -4px !important;
}
.nucleus-achievement-float {
  pointer-events: auto !important;
  width: min(360px, calc(100% - 24px)) !important;
  right: 18px !important;
  top: 58px !important;
  bottom: auto !important;
  z-index: 9 !important;
}
.nucleus-achievement-toast-stack {
  display: grid !important;
  gap: 7px !important;
  align-items: start !important;
}
.nucleus-achievement-toast {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 22px !important;
  gap: 10px !important;
  align-items: center !important;
  min-height: 70px !important;
  padding: 9px 30px 9px 10px !important;
  border: 2px solid rgba(187, 111, 48, .9) !important;
  border-radius: 4px !important;
  background:
    linear-gradient(180deg, rgba(21, 26, 31, .97), rgba(8, 12, 18, .98)),
    radial-gradient(circle at 14% 50%, rgba(84, 201, 255, .2), transparent 60%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 220, 158, .16), 0 10px 22px rgba(0, 0, 0, .36) !important;
  animation: nucleusAchievementIn .22s ease both !important;
}
.nucleus-achievement-toast__close {
  position: absolute !important;
  top: 4px !important;
  right: 6px !important;
  width: 20px !important;
  height: 20px !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(255, 255, 255, .78) !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
}
.nucleus-achievement-toast__close:hover { color: #fff !important; transform: scale(1.08) !important; }
.nucleus-achievement-toast__img {
  width: 44px !important;
  height: 44px !important;
}
.nucleus-achievement-toast__body small {
  display: block !important;
  color: rgba(238, 239, 237, .8) !important;
  font-size: .74rem !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  font-weight: 800 !important;
}
.nucleus-achievement-toast__body strong {
  display: block !important;
  color: #f8f8f5 !important;
  font-size: 1.05rem !important;
  line-height: 1.08 !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.8) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.nucleus-achievement-toast__body em {
  display: block !important;
  margin-top: 4px !important;
  color: rgba(215, 229, 240, .72) !important;
  font-size: .72rem !important;
  font-style: normal !important;
  line-height: 1.22 !important;
  max-height: 1.5em !important;
  overflow: hidden !important;
}
.nucleus-achievement-toast-more {
  justify-self: end !important;
  border: 1px solid rgba(174, 119, 57, .6) !important;
  background: rgba(9, 13, 19, .8) !important;
  color: rgba(232, 240, 247, .8) !important;
  border-radius: 4px !important;
  padding: 5px 8px !important;
  font-size: .7rem !important;
}
.nucleus-tooltip-card__img {
  width: 32px !important;
  height: 32px !important;
}
@keyframes nucleusAchievementIn {
  from { opacity: 0; transform: translateX(22px) scale(.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@media (max-width: 860px) {
  .nucleus-achievement-float { position: fixed !important; right: 10px !important; top: 74px !important; width: min(330px, calc(100vw - 20px)) !important; }
  .nucleus-knowledge-shop-tile { height: 50px !important; }
  .nucleus-knowledge-shop-tile .nucleus-upgrade-tile__icon img { width: 30px !important; height: 30px !important; }
}
.nucleus-achievement-card__img { width: 34px !important; height: 34px !important; display:block !important; }

/* ENIGMAL 24.0.5 — Estabilização do aviso de Era + ajuste de comida */
.nucleus-era-ready-callout {
  position: absolute !important;
  z-index: 7 !important;
  top: 70px !important;
  left: 50% !important;
  width: min(560px, calc(100% - 28px)) !important;
  transform: translateX(-50%) !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  text-align: left !important;
  border: 1px solid rgba(112, 210, 255, .58) !important;
  border-radius: 18px !important;
  padding: 10px 12px !important;
  background:
    radial-gradient(circle at 9% 44%, rgba(97, 220, 255, .24), transparent 32%),
    linear-gradient(180deg, rgba(7, 24, 38, .94), rgba(4, 8, 15, .96)) !important;
  color: #f3fbff !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .42), 0 0 34px rgba(52, 172, 255, .16), inset 0 1px 0 rgba(255,255,255,.08) !important;
  cursor: pointer !important;
  animation: nucleusEraCalloutIn .26s ease both !important;
}
.nucleus-era-ready-callout:hover {
  border-color: rgba(161, 231, 255, .9) !important;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .5), 0 0 44px rgba(74, 194, 255, .25), inset 0 1px 0 rgba(255,255,255,.12) !important;
  transform: translateX(-50%) translateY(-1px) !important;
}
.nucleus-era-ready-callout:disabled,
.nucleus-era-ready-callout.is-claiming {
  opacity: .66 !important;
  cursor: wait !important;
  filter: saturate(.8) !important;
}
.nucleus-era-ready-callout__sigil {
  width: 42px !important;
  height: 42px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  border: 1px solid rgba(145, 222, 255, .46) !important;
  background: radial-gradient(circle, rgba(128, 223, 255, .28), rgba(8, 26, 42, .96) 68%) !important;
  color: #b7efff !important;
  font-size: 1.15rem !important;
  text-shadow: 0 0 16px rgba(125, 220, 255, .78) !important;
}
.nucleus-era-ready-callout__body { min-width: 0 !important; display: grid !important; gap: 2px !important; }
.nucleus-era-ready-callout__body small,
.nucleus-era-confirm__kicker,
.nucleus-legacy-ascension-modal__kicker {
  color: rgba(169, 223, 255, .78) !important;
  font-size: .63rem !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  letter-spacing: .14em !important;
  font-weight: 800 !important;
}
.nucleus-era-ready-callout__body strong {
  color: #ffffff !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 1.02rem !important;
  line-height: 1.12 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.nucleus-era-ready-callout__body em {
  color: rgba(216, 239, 255, .72) !important;
  font-size: .74rem !important;
  font-style: normal !important;
  line-height: 1.22 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.nucleus-era-ready-callout__action {
  border: 1px solid rgba(255, 220, 136, .35) !important;
  border-radius: 999px !important;
  padding: 7px 10px !important;
  background: linear-gradient(180deg, rgba(64, 43, 15, .74), rgba(17, 15, 18, .88)) !important;
  color: #fff4d5 !important;
  font-size: .68rem !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  font-weight: 900 !important;
}
.nucleus-era-confirm-overlay,
.nucleus-era-milestone-overlay,
.nucleus-legacy-ascension-overlay,
.nucleus-legacy-ritual-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: grid !important;
  place-items: center !important;
  padding: 18px !important;
  background: radial-gradient(circle at 50% 34%, rgba(33, 143, 210, .16), transparent 34%), rgba(0, 0, 0, .64) !important;
  backdrop-filter: blur(8px) !important;
}
.nucleus-era-confirm,
.nucleus-era-milestone,
.nucleus-legacy-ascension-modal,
.nucleus-legacy-ritual {
  width: min(560px, calc(100vw - 28px)) !important;
  border: 1px solid rgba(119, 205, 255, .36) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(72, 190, 255, .18), transparent 42%),
    linear-gradient(180deg, rgba(9, 23, 36, .97), rgba(4, 7, 13, .985)) !important;
  color: #ecf9ff !important;
  box-shadow: 0 34px 90px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.08) !important;
  padding: 24px !important;
  text-align: center !important;
}
.nucleus-era-confirm strong,
.nucleus-era-milestone strong,
.nucleus-legacy-ascension-modal strong,
.nucleus-legacy-ritual strong {
  display: block !important;
  margin-top: 8px !important;
  color: #fff !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: clamp(1.65rem, 4vw, 2.55rem) !important;
  line-height: 1.02 !important;
  text-shadow: 0 0 24px rgba(90, 205, 255, .18) !important;
}
.nucleus-era-confirm p,
.nucleus-era-milestone p,
.nucleus-legacy-ascension-modal p,
.nucleus-legacy-ritual p {
  margin: 10px auto 0 !important;
  max-width: 48ch !important;
  color: rgba(222, 239, 255, .78) !important;
  line-height: 1.45 !important;
}
.nucleus-era-confirm__effects {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 18px 0 0 !important;
}
.nucleus-era-confirm__effects span {
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.045) !important;
  color: rgba(234, 245, 255, .78) !important;
  padding: 7px 10px !important;
  font-size: .75rem !important;
}
.nucleus-era-confirm__actions,
.nucleus-legacy-ascension-modal__actions {
  display: flex !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-top: 22px !important;
}
.nucleus-era-confirm__actions button,
.nucleus-era-milestone button,
.nucleus-legacy-ascension-modal__actions button,
.nucleus-legacy-ritual button {
  border: 1px solid rgba(133, 215, 255, .36) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, rgba(18, 43, 62, .94), rgba(6, 13, 23, .96)) !important;
  color: #e8f8ff !important;
  padding: 9px 15px !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}
.nucleus-era-confirm__actions button:last-child,
.nucleus-legacy-ascension-modal__actions button:last-child,
.nucleus-era-milestone button,
.nucleus-legacy-ritual button {
  border-color: rgba(255, 221, 139, .46) !important;
  color: #fff4d3 !important;
  background: linear-gradient(180deg, rgba(68, 45, 14, .94), rgba(14, 13, 17, .96)) !important;
}
.nucleus-era-confirm__actions button:disabled,
.nucleus-legacy-ascension-modal__actions button:disabled { opacity: .46 !important; cursor: not-allowed !important; }
.nucleus-era-milestone-overlay,
.nucleus-legacy-ritual-overlay { opacity: 0 !important; transition: opacity .26s ease !important; }
.nucleus-era-milestone-overlay.is-visible,
.nucleus-legacy-ritual-overlay.is-visible { opacity: 1 !important; }
.nucleus-era-milestone,
.nucleus-legacy-ritual { transform: translateY(10px) scale(.98) !important; transition: transform .26s ease !important; }
.nucleus-era-milestone-overlay.is-visible .nucleus-era-milestone,
.nucleus-legacy-ritual-overlay.is-visible .nucleus-legacy-ritual { transform: translateY(0) scale(1) !important; }
.nucleus-era-milestone__sigil {
  display: grid !important;
  place-items: center !important;
  width: 74px !important;
  height: 74px !important;
  margin: 0 auto 10px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(137, 223, 255, .42) !important;
  background: radial-gradient(circle, rgba(109, 219, 255, .28), rgba(5, 17, 28, .98) 70%) !important;
  color: #c9f5ff !important;
  font-size: 2rem !important;
  box-shadow: 0 0 40px rgba(90, 205, 255, .22) !important;
}
.nucleus-era-milestone small,
.nucleus-legacy-ritual small {
  display: block !important;
  color: rgba(170, 225, 255, .86) !important;
  text-transform: uppercase !important;
  letter-spacing: .18em !important;
  font-weight: 900 !important;
  font-size: .7rem !important;
}
.nucleus-legacy-ascension-modal__stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 9px !important;
  margin-top: 18px !important;
}
.nucleus-legacy-ascension-modal__stats article,
.nucleus-legacy-ascension-modal__columns div {
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.04) !important;
  padding: 10px !important;
}
.nucleus-legacy-ascension-modal__stats small {
  display: block !important;
  color: rgba(219, 236, 255, .62) !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  font-size: .62rem !important;
}
.nucleus-legacy-ascension-modal__stats b {
  display: block !important;
  margin-top: 4px !important;
  color: #fff3cd !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 1.25rem !important;
}
.nucleus-legacy-ascension-modal__columns {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-top: 12px !important;
  text-align: left !important;
}
.nucleus-legacy-ascension-modal__columns span {
  display: block !important;
  color: #fff4d3 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  font-size: .68rem !important;
  font-weight: 900 !important;
}
.nucleus-legacy-ascension-modal__columns p { margin: 6px 0 0 !important; font-size: .78rem !important; }
.nucleus-legacy-ritual__halo {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 90px !important;
  height: 90px !important;
  margin: 0 auto 10px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(255, 231, 154, .26), rgba(39, 115, 170, .1) 46%, transparent 70%) !important;
}
.nucleus-legacy-ritual__halo::before,
.nucleus-legacy-ritual__halo::after {
  content: '' !important;
  position: absolute !important;
  inset: 7px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(151, 225, 255, .35) !important;
  animation: nucleusLegacyHalo 3.4s linear infinite !important;
}
.nucleus-legacy-ritual__halo::after { inset: 20px !important; animation-direction: reverse !important; border-color: rgba(255, 224, 143, .38) !important; }
.nucleus-legacy-ritual__halo i {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: #fff4cf !important;
  box-shadow: 0 0 34px rgba(255, 229, 158, .82), 0 0 58px rgba(87, 205, 255, .34) !important;
}
.nucleus-legacy-ritual__gain {
  display: inline-grid !important;
  gap: 2px !important;
  margin-top: 16px !important;
  border: 1px solid rgba(255, 221, 139, .32) !important;
  border-radius: 18px !important;
  background: rgba(255, 221, 139, .06) !important;
  padding: 10px 18px !important;
}
.nucleus-legacy-ritual__gain span {
  color: #fff2c9 !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 2rem !important;
  line-height: 1 !important;
}
.nucleus-legacy-ritual__gain em { color: rgba(241, 235, 220, .72) !important; font-style: normal !important; font-size: .78rem !important; }
.nucleus-legacy-ritual b { display:block !important; margin-top:12px !important; color:rgba(185,231,255,.86) !important; }
.nucleus-newsbar__button.is-legacy-ready,
.nucleus-legacy-ascension-button.is-ready {
  border-color: rgba(255, 220, 132, .56) !important;
  color: #fff3d1 !important;
  box-shadow: 0 0 18px rgba(255, 208, 105, .14), inset 0 1px 0 rgba(255,255,255,.08) !important;
  animation: nucleusLegacyReadyPulse 2.2s ease-in-out infinite !important;
}
.nucleus-newsbar__button.is-legacy-ready::after {
  content: '!' !important;
  display: inline-grid !important;
  place-items: center !important;
  min-width: 16px !important;
  height: 16px !important;
  margin-left: 5px !important;
  border-radius: 50% !important;
  background: rgba(255, 218, 125, .95) !important;
  color: #1b1410 !important;
  font-size: .66rem !important;
  font-weight: 900 !important;
}
@keyframes nucleusEraCalloutIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(.98); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes nucleusEraCalloutPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.13); }
}
@keyframes nucleusLegacyHalo {
  to { transform: rotate(360deg); }
}
@keyframes nucleusLegacyReadyPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.16); }
}
@media (max-width: 760px) {
  .nucleus-era-ready-callout {
    top: 60px !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
  }
  .nucleus-era-ready-callout__action { grid-column: 1 / -1 !important; justify-self: start !important; }
  .nucleus-legacy-ascension-modal__stats,
  .nucleus-legacy-ascension-modal__columns { grid-template-columns: 1fr !important; }
  .nucleus-era-confirm,
  .nucleus-era-milestone,
  .nucleus-legacy-ascension-modal,
  .nucleus-legacy-ritual { padding: 18px !important; }
}

/* ENIGMAL 25.0.0 — Consolidação do Núcleo 24 */
.nucleus-admin-tools {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 14px !important;
}
.nucleus-admin-card {
  border: 1px solid rgba(116, 210, 255, .17) !important;
  border-radius: 18px !important;
  padding: 14px !important;
  background: linear-gradient(180deg, rgba(6, 17, 30, .82), rgba(3, 8, 15, .88)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 14px 34px rgba(0,0,0,.24) !important;
}
.nucleus-admin-card--wide {
  grid-column: 1 / -1 !important;
}
.nucleus-admin-card > strong {
  display: block !important;
  color: #e7f8ff !important;
  letter-spacing: .02em !important;
  margin-bottom: 5px !important;
}
.nucleus-admin-card p,
.nucleus-admin-card small {
  color: rgba(210, 237, 255, .68) !important;
}
.nucleus-admin-form,
.nucleus-admin-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 10px !important;
}
.nucleus-admin-form input,
.nucleus-admin-form select {
  flex: 1 1 180px !important;
  min-width: 0 !important;
  border: 1px solid rgba(126, 212, 255, .18) !important;
  border-radius: 12px !important;
  background: rgba(0, 8, 16, .58) !important;
  color: #eefbff !important;
  padding: 9px 10px !important;
}
.nucleus-admin-form button,
.nucleus-admin-actions button {
  border: 1px solid rgba(126, 212, 255, .22) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(39, 125, 183, .32), rgba(7, 30, 50, .48)) !important;
  color: #eafbff !important;
  padding: 9px 12px !important;
  cursor: pointer !important;
}
.nucleus-admin-form button:hover,
.nucleus-admin-actions button:hover {
  border-color: rgba(154, 226, 255, .52) !important;
  box-shadow: 0 0 22px rgba(62, 188, 255, .12) !important;
}
.nucleus-admin-diagnostics-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
  gap: 8px !important;
  margin: 12px 0 !important;
}
.nucleus-admin-diagnostics-grid span {
  display: grid !important;
  gap: 3px !important;
  border: 1px solid rgba(108, 198, 255, .14) !important;
  border-radius: 14px !important;
  padding: 9px 10px !important;
  background: rgba(0, 10, 18, .46) !important;
}
.nucleus-admin-diagnostics-grid small {
  text-transform: uppercase !important;
  letter-spacing: .09em !important;
  font-size: .64rem !important;
  color: rgba(170, 218, 245, .58) !important;
}
.nucleus-admin-diagnostics-grid b {
  color: #f4fdff !important;
  font-size: .98rem !important;
}
.nucleus-admin-diagnostics-warnings {
  display: grid !important;
  gap: 6px !important;
  margin: 10px 0 !important;
}
.nucleus-admin-diagnostics-warnings em {
  display: block !important;
  border-left: 2px solid rgba(255, 198, 112, .72) !important;
  border-radius: 10px !important;
  padding: 7px 9px !important;
  background: rgba(255, 172, 74, .08) !important;
  color: rgba(255, 231, 194, .88) !important;
  font-style: normal !important;
}
.nucleus-era-ready-callout {
  animation: nucleusEraCalloutIn .24s ease both !important;
  will-change: transform, opacity !important;
}
.nucleus-era-ready-callout:not(.is-claiming) .nucleus-era-ready-callout__sigil {
  animation: none !important;
}


/* ENIGMAL 26.0.1 — Hotfix Era callout fixo + botão visível */
#nucleus-clicker-stage .nucleus-era-ready-callout,
body > .nucleus-era-ready-callout {
  position: fixed !important;
  z-index: 9998 !important;
  top: 86px !important;
  left: 50% !important;
  width: min(620px, calc(100vw - 28px)) !important;
  transform: translateX(-50%) !important;
  grid-template-columns: 48px minmax(0, 1fr) auto !important;
  pointer-events: auto !important;
}
.nucleus-era-ready-callout__action,
button.nucleus-era-ready-callout__action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 112px !important;
  min-height: 34px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  appearance: none !important;
}
.nucleus-era-ready-callout.is-claiming .nucleus-era-ready-callout__action,
.nucleus-era-ready-callout__action:disabled {
  opacity: .62 !important;
  cursor: wait !important;
}
@media (max-width: 720px) {
  #nucleus-clicker-stage .nucleus-era-ready-callout,
  body > .nucleus-era-ready-callout {
    top: 72px !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }
  .nucleus-era-ready-callout__action,
  button.nucleus-era-ready-callout__action {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
}

/* ENIGMAL 26.0.2 — Hotfix profundo da notificação de Era
   O aviso agora é global/fixo no body para não depender do canvas PixiJS ou de containers com overflow. */
body > .nucleus-era-ready-callout,
.nucleus-era-ready-callout--global {
  position: fixed !important;
  z-index: 2147483000 !important;
  top: 86px !important;
  left: 50% !important;
  width: min(640px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  transform: translateX(-50%) !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow: visible !important;
  isolation: isolate !important;
}
body > .nucleus-era-ready-callout:hover,
.nucleus-era-ready-callout--global:hover {
  transform: translateX(-50%) translateY(-1px) !important;
}
.nucleus-era-ready-callout--global .nucleus-era-ready-callout__action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 118px !important;
  min-height: 36px !important;
  white-space: nowrap !important;
}
@media (max-width: 720px) {
  body > .nucleus-era-ready-callout,
  .nucleus-era-ready-callout--global {
    top: 72px !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }
  .nucleus-era-ready-callout--global .nucleus-era-ready-callout__action {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
}

/* ENIGMAL 27.0.0 — Rework profundo do Legado / Árvore de Ascensão */
.nucleus-legacy-rework-shell {
  display: grid !important;
  gap: 16px !important;
  min-height: min(76vh, 820px) !important;
}
.nucleus-legacy-rework-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px) !important;
  gap: 14px !important;
  align-items: stretch !important;
  padding: 16px !important;
  border: 1px solid rgba(146, 222, 255, .18) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(72, 173, 255, .14), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(255, 217, 122, .10), transparent 36%),
    linear-gradient(180deg, rgba(6, 15, 26, .96), rgba(2, 4, 10, .98)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 22px 70px rgba(0,0,0,.36) !important;
}
.nucleus-legacy-rework-kicker {
  display: inline-flex !important;
  width: fit-content !important;
  border: 1px solid rgba(157, 225, 255, .24) !important;
  border-radius: 999px !important;
  padding: 5px 9px !important;
  color: rgba(185, 233, 255, .86) !important;
  background: rgba(103, 190, 255, .06) !important;
  text-transform: uppercase !important;
  letter-spacing: .16em !important;
  font-size: .62rem !important;
  font-weight: 900 !important;
}
.nucleus-legacy-rework-top h2 {
  margin: 10px 0 4px !important;
  color: #fff8de !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: clamp(1.8rem, 4vw, 3.1rem) !important;
  line-height: .98 !important;
  text-shadow: 0 0 26px rgba(255, 219, 139, .12), 0 0 44px rgba(92, 194, 255, .10) !important;
}
.nucleus-legacy-rework-top p {
  max-width: 76ch !important;
  margin: 0 !important;
  color: rgba(229, 242, 255, .72) !important;
  line-height: 1.45 !important;
}
.nucleus-legacy-prestige-card {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 9px !important;
  align-content: center !important;
  border: 1px solid rgba(255, 222, 143, .22) !important;
  border-radius: 20px !important;
  padding: 12px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 216, 122, .16), transparent 46%),
    linear-gradient(180deg, rgba(29, 18, 9, .92), rgba(5, 7, 12, .96)) !important;
}
.nucleus-legacy-prestige-card article {
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 14px !important;
  padding: 9px !important;
  background: rgba(255,255,255,.04) !important;
}
.nucleus-legacy-prestige-card article:first-child { grid-column: 1 / -1 !important; text-align:center !important; }
.nucleus-legacy-prestige-card small,
.nucleus-legacy-side-panel small {
  display:block !important;
  color: rgba(226, 241, 255, .62) !important;
  font-size: .62rem !important;
  letter-spacing:.10em !important;
  text-transform:uppercase !important;
  font-weight:900 !important;
}
.nucleus-legacy-prestige-card strong {
  display:block !important;
  margin-top: 3px !important;
  color: #fff2c2 !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
}
.nucleus-legacy-prestige-card article:first-child strong { font-size: 2.1rem !important; }
.nucleus-legacy-prestige-card .nucleus-legacy-ascension-button {
  grid-column: 1 / -1 !important;
  justify-content: center !important;
  min-height: 42px !important;
}
.nucleus-legacy-rework-grid {
  display: grid !important;
  grid-template-columns: minmax(220px, 285px) minmax(0, 1fr) !important;
  gap: 14px !important;
  min-height: 640px !important;
}
.nucleus-legacy-rework-side {
  display: grid !important;
  align-content: start !important;
  gap: 11px !important;
}
.nucleus-legacy-side-panel {
  border: 1px solid rgba(127, 205, 255, .15) !important;
  border-radius: 18px !important;
  padding: 12px !important;
  background: linear-gradient(180deg, rgba(8, 21, 35, .92), rgba(3, 7, 13, .97)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045) !important;
}
.nucleus-legacy-side-panel strong {
  display:block !important;
  margin-top: 5px !important;
  color: #f7fbff !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 1.05rem !important;
  line-height: 1.12 !important;
}
.nucleus-legacy-side-panel p,
.nucleus-legacy-side-panel li {
  color: rgba(225, 241, 255, .70) !important;
  font-size: .76rem !important;
  line-height: 1.36 !important;
}
.nucleus-legacy-side-panel ul { margin: 10px 0 0 !important; padding-left: 17px !important; }
.nucleus-legacy-side-panel em {
  display:block !important;
  margin-top: 8px !important;
  color: #bdeeff !important;
  font-size: .76rem !important;
  font-style: normal !important;
}
.nucleus-legacy-side-panel span:not(.nucleus-legacy-rework-kicker) {
  display:block !important;
  margin-top: 8px !important;
  color: rgba(255, 226, 155, .70) !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-style: italic !important;
  font-size: .77rem !important;
}
.nucleus-legacy-preview-bars {
  position: relative !important;
  height: 8px !important;
  margin: 10px 0 8px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.07) !important;
}
.nucleus-legacy-preview-bars span {
  display:block !important;
  width: var(--legacy-progress, 0%) !important;
  height: 100% !important;
  background: linear-gradient(90deg, rgba(101, 207, 255, .92), rgba(255, 218, 132, .95)) !important;
  box-shadow: 0 0 20px rgba(116, 210, 255, .25) !important;
}
.nucleus-legacy-map-wrap {
  min-width: 0 !important;
  overflow: auto !important;
  border: 1px solid rgba(138, 212, 255, .16) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(108, 190, 255, .18), transparent 18%),
    radial-gradient(circle at 30% 70%, rgba(255, 228, 150, .11), transparent 20%),
    radial-gradient(circle at 82% 24%, rgba(128, 255, 219, .08), transparent 20%),
    linear-gradient(180deg, rgba(4, 8, 17, .98), rgba(1, 2, 8, .99)) !important;
  box-shadow: inset 0 0 80px rgba(94, 180, 255, .06), 0 24px 90px rgba(0,0,0,.38) !important;
}
.nucleus-legacy-map {
  position: relative !important;
  width: var(--legacy-map-width, 1000px) !important;
  height: var(--legacy-map-height, 760px) !important;
  min-width: var(--legacy-map-width, 1000px) !important;
  min-height: var(--legacy-map-height, 760px) !important;
  isolation: isolate !important;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.32) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(128, 212, 255,.22) 0 1px, transparent 1.8px) !important;
  background-size: 83px 83px, 137px 137px !important;
  background-position: 0 0, 29px 47px !important;
}
.nucleus-legacy-map::before {
  content: '' !important;
  position: absolute !important;
  inset: 120px 180px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(173, 228, 255, .15), rgba(107, 195, 255, .07) 22%, transparent 62%) !important;
  filter: blur(10px) !important;
  z-index: 0 !important;
}
.nucleus-legacy-map-lines {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  overflow: visible !important;
}
.nucleus-legacy-link {
  stroke: rgba(77, 139, 188, .24) !important;
  stroke-width: 4 !important;
  stroke-linecap: round !important;
  filter: drop-shadow(0 0 6px rgba(80, 186, 255, .08)) !important;
}
.nucleus-legacy-link.is-revealed { stroke: rgba(112, 207, 255, .34) !important; }
.nucleus-legacy-link.is-open { stroke: rgba(255, 219, 133, .58) !important; stroke-width: 5 !important; }
.nucleus-legacy-link.is-owned { stroke: rgba(135, 255, 220, .62) !important; stroke-width: 5 !important; }
.nucleus-legacy-skill-node {
  position: absolute !important;
  left: var(--node-x) !important;
  top: var(--node-y) !important;
  transform: translate(-50%, -50%) !important;
  z-index: 3 !important;
  width: 62px !important;
  height: 62px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(118, 184, 231, .28) !important;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.10), transparent 20%),
    radial-gradient(circle, rgba(48, 81, 113, .82), rgba(10, 16, 25, .98) 68%) !important;
  color: rgba(220, 237, 255, .72) !important;
  cursor: pointer !important;
  box-shadow: 0 0 0 7px rgba(255,255,255,.025), 0 12px 28px rgba(0,0,0,.42), inset 0 1px 1px rgba(255,255,255,.18) !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
}
.nucleus-legacy-skill-node i {
  font-style: normal !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  text-shadow: 0 0 16px currentColor !important;
}
.nucleus-legacy-skill-node > span {
  position: absolute !important;
  right: -5px !important;
  bottom: -4px !important;
  min-width: 19px !important;
  height: 19px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 226, 149, .5) !important;
  background: rgba(12, 10, 10, .92) !important;
  color: #ffe6a2 !important;
  font-size: .62rem !important;
  font-weight: 900 !important;
}
.nucleus-legacy-skill-node.is-locked {
  filter: grayscale(.8) brightness(.52) saturate(.55) !important;
  opacity: .72 !important;
  cursor: help !important;
}
.nucleus-legacy-skill-node.is-available {
  border-color: rgba(149, 218, 255, .58) !important;
  color: #c8f2ff !important;
  filter: saturate(1.05) !important;
}
.nucleus-legacy-skill-node.is-buyable {
  border-color: rgba(255, 223, 139, .82) !important;
  color: #fff0ba !important;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.18), transparent 18%),
    radial-gradient(circle, rgba(255, 204, 96, .38), rgba(31, 38, 53, .96) 66%) !important;
  box-shadow: 0 0 0 8px rgba(255, 218, 126, .055), 0 0 34px rgba(255, 208, 104, .22), 0 16px 32px rgba(0,0,0,.48), inset 0 1px 1px rgba(255,255,255,.22) !important;
  animation: nucleusLegacyNodeReady 2.6s ease-in-out infinite !important;
}
.nucleus-legacy-skill-node.is-owned {
  border-color: rgba(122, 255, 221, .78) !important;
  color: #a8ffe8 !important;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.16), transparent 18%),
    radial-gradient(circle, rgba(56, 255, 209, .32), rgba(13, 37, 42, .96) 67%) !important;
  box-shadow: 0 0 0 8px rgba(90, 255, 212, .045), 0 0 38px rgba(92, 255, 211, .20), 0 16px 32px rgba(0,0,0,.48), inset 0 1px 1px rgba(255,255,255,.22) !important;
}
.nucleus-legacy-skill-node:disabled { cursor: help !important; }
.nucleus-legacy-skill-node:not(:disabled):hover,
.nucleus-legacy-skill-node.is-owned:hover,
.nucleus-legacy-skill-node.is-available:hover {
  transform: translate(-50%, -50%) scale(1.08) !important;
  z-index: 8 !important;
}
.nucleus-legacy-node-tooltip {
  position: absolute !important;
  left: calc(100% + 14px) !important;
  top: 50% !important;
  transform: translateY(-50%) scale(.96) !important;
  transform-origin: left center !important;
  width: min(340px, 72vw) !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  padding: 12px !important;
  border: 1px solid rgba(255, 220, 133, .42) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(16, 18, 23, .98), rgba(4, 6, 10, .99)) !important;
  color: #f1f8ff !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.08) !important;
  text-align: left !important;
  transition: opacity .12s ease, transform .12s ease, visibility .12s ease !important;
}
.nucleus-legacy-skill-node:nth-child(n+30) .nucleus-legacy-node-tooltip,
.nucleus-legacy-skill-node[style*="--node-x:850"] .nucleus-legacy-node-tooltip,
.nucleus-legacy-skill-node[style*="--node-x:900"] .nucleus-legacy-node-tooltip {
  left: auto !important;
  right: calc(100% + 14px) !important;
  transform-origin: right center !important;
}
.nucleus-legacy-skill-node:hover .nucleus-legacy-node-tooltip,
.nucleus-legacy-skill-node:focus-visible .nucleus-legacy-node-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-50%) scale(1) !important;
}
.nucleus-legacy-node-tooltip small {
  color: rgba(161, 219, 255, .74) !important;
  font-size: .63rem !important;
  text-transform: uppercase !important;
  letter-spacing: .10em !important;
  font-weight: 900 !important;
}
.nucleus-legacy-node-tooltip strong {
  display:block !important;
  margin-top: 5px !important;
  color: #fff5d4 !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 1.05rem !important;
  line-height: 1.12 !important;
}
.nucleus-legacy-node-tooltip p,
.nucleus-legacy-node-tooltip em,
.nucleus-legacy-node-tooltip b,
.nucleus-legacy-node-tooltip q {
  display:block !important;
  margin-top: 7px !important;
  color: rgba(231, 243, 255, .78) !important;
  font-size: .75rem !important;
  line-height: 1.34 !important;
  font-style: normal !important;
}
.nucleus-legacy-node-tooltip em { color: #bfeeff !important; }
.nucleus-legacy-node-tooltip b { color: #ffdca0 !important; }
.nucleus-legacy-node-tooltip q { color: rgba(255, 226, 158, .68) !important; font-family: Georgia, 'Times New Roman', serif !important; font-style: italic !important; }
.nucleus-legacy-reset-rules {
  display:grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
.nucleus-legacy-reset-rules article,
.nucleus-legacy-history-list article {
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 16px !important;
  padding: 11px !important;
  background: rgba(255,255,255,.035) !important;
}
.nucleus-legacy-reset-rules small,
.nucleus-legacy-history-list small {
  display:block !important;
  color: rgba(170, 224, 255, .70) !important;
  text-transform: uppercase !important;
  letter-spacing: .09em !important;
  font-size:.62rem !important;
  font-weight: 900 !important;
}
.nucleus-legacy-reset-rules strong,
.nucleus-legacy-history-list strong {
  display:block !important;
  margin-top: 4px !important;
  color: rgba(249, 253, 255, .88) !important;
  font-size:.82rem !important;
  line-height: 1.35 !important;
}
.nucleus-legacy-history-list {
  display:grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 10px !important;
}
.nucleus-legacy-history-list p {
  margin: 6px 0 0 !important;
  color: rgba(226, 240, 255, .66) !important;
  font-size: .74rem !important;
}
@keyframes nucleusLegacyNodeReady {
  0%,100% { box-shadow: 0 0 0 8px rgba(255, 218, 126, .04), 0 0 26px rgba(255, 208, 104, .14), 0 16px 32px rgba(0,0,0,.48), inset 0 1px 1px rgba(255,255,255,.22); }
  50% { box-shadow: 0 0 0 11px rgba(255, 218, 126, .09), 0 0 46px rgba(255, 208, 104, .28), 0 16px 32px rgba(0,0,0,.48), inset 0 1px 1px rgba(255,255,255,.22); }
}
.branch-centelha { --branch-color: #fff0aa; }
.branch-clareira { --branch-color: #9fe8ff; }
.branch-producao { --branch-color: #b7cbff; }
.branch-populacao { --branch-color: #aaffdf; }
.branch-construcao { --branch-color: #ffd08d; }
.branch-eras { --branch-color: #dfc5ff; }
.branch-conhecimento { --branch-color: #b5f0ff; }
.branch-anomalia { --branch-color: #ff9bd9; }
@media (max-width: 980px) {
  .nucleus-legacy-rework-top,
  .nucleus-legacy-rework-grid,
  .nucleus-legacy-reset-rules { grid-template-columns: 1fr !important; }
  .nucleus-legacy-rework-grid { min-height: auto !important; }
  .nucleus-legacy-map-wrap { max-height: 64vh !important; }
}

/* ENIGMAL 27.0.2 — Legado em tela cheia: árvore como foco absoluto */
body.nucleus-legacy-panel-open {
  overflow: hidden !important;
}
.nucleus-panel-overlay.is-legacy-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147482600 !important;
  display: block !important;
  padding: 0 !important;
  background:
    radial-gradient(circle at 50% 44%, rgba(72, 181, 255, .18), transparent 28%),
    radial-gradient(circle at 70% 24%, rgba(255, 217, 122, .10), transparent 22%),
    radial-gradient(circle at 22% 72%, rgba(117, 255, 218, .08), transparent 23%),
    linear-gradient(180deg, rgba(2, 5, 11, .96), rgba(0, 0, 3, .995)) !important;
  backdrop-filter: blur(9px) !important;
  overflow: hidden !important;
}
.nucleus-panel-overlay.is-legacy-fullscreen[hidden] {
  display: none !important;
}
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel-modal {
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(51, 171, 255, .12), transparent 32%),
    linear-gradient(180deg, rgba(3, 7, 15, .96), rgba(0, 1, 6, .99)) !important;
  box-shadow: none !important;
}
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel-content {
  height: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel-close {
  position: fixed !important;
  top: 18px !important;
  right: 20px !important;
  z-index: 30 !important;
  float: none !important;
  width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  border: 1px solid rgba(255, 232, 166, .44) !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 34% 20%, rgba(255,255,255,.15), transparent 28%),
    rgba(9, 10, 15, .86) !important;
  color: #fff2c7 !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  box-shadow: 0 0 34px rgba(255, 218, 126, .15), 0 18px 45px rgba(0,0,0,.52) !important;
  cursor: pointer !important;
}
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel-close:hover {
  transform: translateY(-1px) scale(1.04) !important;
  border-color: rgba(255, 232, 166, .78) !important;
  box-shadow: 0 0 42px rgba(255, 218, 126, .24), 0 20px 50px rgba(0,0,0,.58) !important;
}
.nucleus-legacy-fullscreen-shell {
  height: 100dvh !important;
  min-height: 100dvh !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
}
.nucleus-legacy-dream-top {
  min-height: 76px !important;
  display: grid !important;
  grid-template-columns: minmax(190px, auto) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: center !important;
  padding: 14px 78px 12px 22px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(142, 222, 255, .17) !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(91, 194, 255, .13), transparent 38%),
    linear-gradient(180deg, rgba(4, 10, 19, .92), rgba(2, 5, 11, .72)) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.24), inset 0 -1px 0 rgba(255,255,255,.035) !important;
}
.nucleus-legacy-dream-title {
  min-width: 0 !important;
}
.nucleus-legacy-dream-title h2 {
  margin: 6px 0 0 !important;
  font-size: clamp(1.25rem, 2.2vw, 2.05rem) !important;
  letter-spacing: -.035em !important;
  white-space: nowrap !important;
}
.nucleus-legacy-dream-top p,
.nucleus-legacy-fullscreen-shell .nucleus-legacy-reset-rules,
.nucleus-legacy-fullscreen-shell .nucleus-legacy-history,
.nucleus-legacy-fullscreen-shell .nucleus-legacy-rework-side {
  display: none !important;
}
.nucleus-legacy-dream-bar {
  justify-self: end !important;
  width: auto !important;
  min-width: min(720px, 62vw) !important;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 9px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.nucleus-legacy-dream-bar article,
.nucleus-legacy-dream-bar article:first-child {
  grid-column: auto !important;
  min-width: 112px !important;
  text-align: left !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.045) !important;
}
.nucleus-legacy-dream-bar article small {
  font-size: .56rem !important;
}
.nucleus-legacy-dream-bar article strong,
.nucleus-legacy-dream-bar article:first-child strong {
  margin-top: 2px !important;
  font-size: 1rem !important;
}
.nucleus-legacy-dream-bar .nucleus-legacy-ascension-button {
  grid-column: auto !important;
  min-height: 39px !important;
  padding-inline: 16px !important;
  white-space: nowrap !important;
}
.nucleus-legacy-fullscreen-stage {
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map-wrap {
  height: 100% !important;
  max-height: none !important;
  width: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: auto !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(108, 190, 255, .20), transparent 18%),
    radial-gradient(circle at 32% 70%, rgba(255, 228, 150, .10), transparent 20%),
    radial-gradient(circle at 82% 24%, rgba(128, 255, 219, .075), transparent 20%),
    linear-gradient(180deg, rgba(4, 8, 17, .94), rgba(1, 2, 8, .99)) !important;
  box-shadow: inset 0 0 120px rgba(94, 180, 255, .07) !important;
  scrollbar-color: rgba(142, 222, 255, .36) rgba(255,255,255,.04) !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map {
  margin: 42px auto 100px !important;
  transform-origin: center center !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map::after {
  content: 'arraste a barra/role para navegar pela memória' !important;
  position: absolute !important;
  left: 50% !important;
  bottom: 28px !important;
  transform: translateX(-50%) !important;
  padding: 6px 10px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 999px !important;
  background: rgba(0,0,0,.25) !important;
  color: rgba(222, 241, 255, .48) !important;
  font-size: .62rem !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node {
  width: 72px !important;
  height: 72px !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node i {
  font-size: 1.58rem !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node > span {
  right: -6px !important;
  bottom: -4px !important;
  min-width: 22px !important;
  height: 22px !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-link {
  stroke-width: 5 !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-node-tooltip {
  width: min(360px, 78vw) !important;
  z-index: 40 !important;
}
@media (max-width: 860px) {
  .nucleus-legacy-dream-top {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 12px 64px 12px 14px !important;
  }
  .nucleus-legacy-dream-title h2 {
    white-space: normal !important;
  }
  .nucleus-legacy-dream-bar {
    justify-self: stretch !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    padding-bottom: 2px !important;
  }
  .nucleus-legacy-dream-bar article {
    min-width: 96px !important;
  }
  .nucleus-legacy-fullscreen-shell .nucleus-legacy-map {
    margin-top: 24px !important;
  }
}

/* ENIGMAL 27.0.3 — Legado navegável: pan/drag + zoom leve */
.nucleus-legacy-fullscreen-stage {
  position: relative !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map-wrap[data-legacy-pan] {
  cursor: grab !important;
  user-select: none !important;
  touch-action: none !important;
  overscroll-behavior: contain !important;
  scroll-behavior: auto !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map-wrap[data-legacy-pan].is-panning {
  cursor: grabbing !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map-wrap[data-legacy-pan].is-panning * {
  cursor: grabbing !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map {
  transform: scale(var(--legacy-tree-scale, 1)) !important;
  transform-origin: center center !important;
  will-change: transform !important;
  transition: transform .18s ease, margin .18s ease !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map-wrap.is-panning .nucleus-legacy-map {
  transition: none !important;
}
.nucleus-legacy-map-controls {
  position: fixed !important;
  right: 22px !important;
  bottom: 22px !important;
  z-index: 38 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px !important;
  border: 1px solid rgba(142, 222, 255, .18) !important;
  border-radius: 999px !important;
  background: rgba(4, 8, 14, .72) !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06) !important;
  backdrop-filter: blur(10px) !important;
}
.nucleus-legacy-map-controls button {
  width: 38px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.055) !important;
  color: rgba(236, 248, 255, .92) !important;
  font-weight: 900 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
}
.nucleus-legacy-map-controls button:hover {
  border-color: rgba(255, 225, 144, .44) !important;
  background: rgba(255, 221, 126, .10) !important;
  color: #fff1bf !important;
  transform: translateY(-1px) !important;
}
.nucleus-legacy-map-controls [data-legacy-zoom-reset] {
  width: auto !important;
  min-width: 58px !important;
  padding-inline: 12px !important;
  font-size: .72rem !important;
  letter-spacing: .04em !important;
}
.nucleus-legacy-map-hint {
  position: fixed !important;
  left: 50% !important;
  bottom: 28px !important;
  transform: translateX(-50%) !important;
  z-index: 36 !important;
  padding: 7px 12px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 999px !important;
  background: rgba(0,0,0,.28) !important;
  color: rgba(224, 242, 255, .54) !important;
  font-size: .66rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  pointer-events: none !important;
  backdrop-filter: blur(8px) !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map::after {
  display: none !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node {
  user-select: none !important;
  -webkit-user-drag: none !important;
}
@media (max-width: 760px) {
  .nucleus-legacy-map-hint {
    display: none !important;
  }
  .nucleus-legacy-map-controls {
    right: 12px !important;
    bottom: 12px !important;
  }
  .nucleus-legacy-map-controls button {
    width: 34px !important;
    height: 34px !important;
  }
}

/* ENIGMAL 27.0.4 — Legado realmente fullscreen fora do mapa/canvas */
html:has(body.nucleus-legacy-panel-open),
body.nucleus-legacy-panel-open {
  width: 100% !important;
  min-width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}
body > .nucleus-panel-overlay.is-legacy-fullscreen,
.nucleus-panel-overlay.is-legacy-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 100vw !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  transform: none !important;
  translate: none !important;
  contain: none !important;
  clip-path: none !important;
  z-index: 2147483640 !important;
}
body > .nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel-modal,
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel-modal,
body > .nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel-content,
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel-content,
body > .nucleus-panel-overlay.is-legacy-fullscreen .nucleus-legacy-fullscreen-shell,
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-legacy-fullscreen-shell {
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 100vw !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  transform: none !important;
}
body > .nucleus-panel-overlay.is-legacy-fullscreen .nucleus-legacy-fullscreen-stage,
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-legacy-fullscreen-stage {
  width: 100vw !important;
  max-width: 100vw !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body > .nucleus-panel-overlay.is-legacy-fullscreen .nucleus-legacy-map-wrap,
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-legacy-map-wrap {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100% !important;
}

/* ENIGMAL 27.0.5 — Árvore de Legado expandida, espaçada e navegável */
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map-wrap {
  overflow: auto !important;
  scroll-behavior: auto !important;
  overscroll-behavior: contain !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(120, 205, 255, .18), transparent 16%),
    radial-gradient(circle at 20% 25%, rgba(255, 222, 145, .08), transparent 18%),
    radial-gradient(circle at 82% 70%, rgba(111, 255, 220, .07), transparent 18%),
    linear-gradient(180deg, rgba(3, 7, 15, .98), rgba(0, 1, 6, .995)) !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(151, 225, 255, .34) rgba(255,255,255,.035) !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map {
  transform-origin: top left !important;
  background-size: 120px 120px, 210px 210px !important;
  background-position: 0 0, 54px 71px !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map::before {
  inset: 18% 22% !important;
  background: radial-gradient(circle, rgba(173, 228, 255, .13), rgba(107, 195, 255, .05) 22%, transparent 68%) !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-link {
  stroke-width: 4.6 !important;
  filter: drop-shadow(0 0 10px rgba(80, 186, 255, .10)) !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-link.is-open,
.nucleus-legacy-fullscreen-shell .nucleus-legacy-link.is-owned {
  stroke-width: 5.6 !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node {
  width: 78px !important;
  height: 78px !important;
  box-shadow: 0 0 0 10px rgba(255,255,255,.022), 0 18px 40px rgba(0,0,0,.50), inset 0 1px 1px rgba(255,255,255,.18) !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node i {
  font-size: 1.72rem !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node > span {
  min-width: 26px !important;
  max-width: 42px !important;
  padding-inline: 4px !important;
  height: 24px !important;
  font-size: .58rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node.is-buyable {
  animation: nucleusLegacyNodeReady 3.4s ease-in-out infinite !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-node-tooltip {
  width: min(390px, 78vw) !important;
  padding: 14px !important;
}
.nucleus-legacy-map-controls {
  right: 24px !important;
  bottom: 24px !important;
  padding: 8px !important;
}
.nucleus-legacy-map-controls button {
  width: 42px !important;
  height: 42px !important;
}
.nucleus-legacy-map-controls [data-legacy-zoom-reset] {
  min-width: 76px !important;
}
.nucleus-legacy-map-hint {
  bottom: 33px !important;
  opacity: .86 !important;
}
.nucleus-legacy-dream-top {
  min-height: 70px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
.nucleus-legacy-dream-bar article:nth-of-type(n+3) {
  display: none !important;
}

/* ENIGMAL 27.0.6 — Ascensão real: árvore grande, aberta e legível */
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel,
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel__body,
.nucleus-panel-overlay.is-legacy-fullscreen .nucleus-panel__content,
.nucleus-panel-overlay.is-legacy-fullscreen [data-panel-content] {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}
.nucleus-legacy-ascension-board {
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 0 !important;
  background:
    radial-gradient(circle at 50% 52%, rgba(56, 136, 190, .18), transparent 38%),
    radial-gradient(circle at 18% 18%, rgba(255, 217, 126, .08), transparent 26%),
    linear-gradient(180deg, #020612, #000208 76%, #000) !important;
}
.nucleus-legacy-minimal-top {
  min-height: 74px !important;
  padding: 10px 76px 10px 18px !important;
  grid-template-columns: minmax(180px, .35fr) minmax(460px, 1fr) !important;
  align-items: center !important;
  border-radius: 0 !important;
  border-width: 0 0 1px !important;
  background: linear-gradient(180deg, rgba(3, 11, 22, .96), rgba(2, 5, 12, .88)) !important;
  box-shadow: 0 14px 50px rgba(0,0,0,.42) !important;
}
.nucleus-legacy-minimal-top h2 {
  margin: 3px 0 0 !important;
  font-size: clamp(1.35rem, 2.2vw, 2.25rem) !important;
}
.nucleus-legacy-minimal-top .nucleus-legacy-rework-kicker {
  padding: 4px 8px !important;
  font-size: .56rem !important;
}
.nucleus-legacy-minimal-bar {
  grid-template-columns: repeat(4, minmax(88px, 1fr)) minmax(150px, .9fr) !important;
  gap: 7px !important;
  padding: 7px !important;
  border-radius: 16px !important;
  background: rgba(9, 12, 18, .7) !important;
}
.nucleus-legacy-minimal-bar article,
.nucleus-legacy-minimal-bar article:first-child {
  grid-column: auto !important;
  text-align: left !important;
  padding: 7px 9px !important;
}
.nucleus-legacy-minimal-bar small { font-size: .52rem !important; }
.nucleus-legacy-minimal-bar strong,
.nucleus-legacy-minimal-bar article:first-child strong {
  font-size: 1.05rem !important;
}
.nucleus-legacy-minimal-bar .nucleus-legacy-ascension-button {
  grid-column: auto !important;
  min-height: 36px !important;
  padding-inline: 12px !important;
}
.nucleus-legacy-true-stage {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(97, 186, 255, .10), transparent 36%),
    radial-gradient(circle at 12% 76%, rgba(255, 228, 149, .055), transparent 22%),
    #01040b !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-map-wrap {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: 0 !important;
  overflow: auto !important;
  cursor: grab !important;
  scrollbar-width: thin !important;
  background:
    radial-gradient(circle at center, rgba(98, 184, 255, .07), transparent 34%),
    linear-gradient(180deg, rgba(1,4,10,.98), rgba(0,0,0,.99)) !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-map-wrap.is-panning { cursor: grabbing !important; }
.nucleus-legacy-true-stage .nucleus-legacy-map {
  transform-origin: 0 0 !important;
  will-change: transform !important;
  background-size: 120px 120px, 240px 240px !important;
  background-position: 0 0, 62px 82px !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-map::before {
  inset: 22% 24% !important;
  background: radial-gradient(circle, rgba(176, 230, 255, .12), rgba(85, 172, 255, .06) 18%, transparent 68%) !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-link {
  stroke-width: 6 !important;
  opacity: .92 !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-link.is-open,
.nucleus-legacy-true-stage .nucleus-legacy-link.is-owned { stroke-width: 7 !important; }
.nucleus-legacy-true-stage .nucleus-legacy-skill-node {
  width: 82px !important;
  height: 82px !important;
  border-width: 3px !important;
  box-shadow:
    0 0 0 12px rgba(255,255,255,.022),
    0 20px 42px rgba(0,0,0,.52),
    inset 0 1px 1px rgba(255,255,255,.22) !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-skill-node i { font-size: 1.85rem !important; }
.nucleus-legacy-true-stage .nucleus-legacy-skill-node > span {
  right: -12px !important;
  bottom: -9px !important;
  min-width: 30px !important;
  height: 24px !important;
  padding: 0 7px !important;
  font-size: .58rem !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-node-tooltip {
  width: min(390px, 78vw) !important;
  z-index: 2147483000 !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-map-controls {
  right: 18px !important;
  bottom: 18px !important;
  top: auto !important;
  z-index: 20 !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-map-hint {
  left: 18px !important;
  bottom: 18px !important;
  top: auto !important;
  z-index: 20 !important;
  opacity: .78 !important;
}
@media (max-width: 860px) {
  .nucleus-legacy-minimal-top {
    grid-template-columns: 1fr !important;
    padding-right: 58px !important;
  }
  .nucleus-legacy-minimal-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .nucleus-legacy-minimal-bar .nucleus-legacy-ascension-button { grid-column: 1 / -1 !important; }
}


/* ENIGMAL 27.1.0 — Ajuste final: Conquistas no centro inferior + Legado compacto com ícones */
.nucleus-achievement-float {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 18px !important;
  transform: translateX(-50%) !important;
  width: min(500px, calc(100vw - 24px)) !important;
  z-index: 2147482500 !important;
  pointer-events: none !important;
}
.nucleus-achievement-float .nucleus-achievement-toast-stack {
  pointer-events: auto !important;
  justify-items: center !important;
}
.nucleus-achievement-toast {
  width: 100% !important;
  min-height: 86px !important;
  grid-template-columns: 58px minmax(0, 1fr) 28px !important;
  gap: 12px !important;
  padding: 12px 34px 12px 12px !important;
  border-radius: 10px !important;
  backdrop-filter: blur(10px) !important;
  animation: nucleusAchievementBottomIn .22s ease both !important;
}
.nucleus-achievement-toast__img {
  width: 52px !important;
  height: 52px !important;
}
.nucleus-achievement-toast__body strong {
  font-size: 1.08rem !important;
  white-space: normal !important;
  max-height: 2.3em !important;
  overflow: hidden !important;
}
.nucleus-achievement-toast__body em {
  font-size: .78rem !important;
  line-height: 1.28 !important;
  max-height: 2.7em !important;
  overflow: hidden !important;
}
.nucleus-achievement-toast__body small {
  font-size: .68rem !important;
}
@keyframes nucleusAchievementBottomIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node {
  width: 70px !important;
  height: 70px !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node i {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  font-size: 0 !important;
}
.nucleus-legacy-skill-node__img {
  width: 34px !important;
  height: 34px !important;
  display: block !important;
  filter: drop-shadow(0 0 10px rgba(128, 220, 255, .18)) !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node.is-locked .nucleus-legacy-skill-node__img {
  filter: grayscale(.9) brightness(.55) saturate(.65) !important;
  opacity: .72 !important;
}
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map {
  background-size: 96px 96px, 168px 168px !important;
}
.nucleus-legacy-node-tooltip {
  pointer-events: none !important;
}
@media (max-width: 760px) {
  .nucleus-achievement-float {
    bottom: 10px !important;
    width: min(460px, calc(100vw - 18px)) !important;
  }
  .nucleus-achievement-toast {
    min-height: 78px !important;
    grid-template-columns: 50px minmax(0, 1fr) 26px !important;
  }
  .nucleus-achievement-toast__img {
    width: 46px !important;
    height: 46px !important;
  }
}

/* ENIGMAL 27.1.1 — Legado mais compacto e navegável */
.nucleus-legacy-true-stage .nucleus-legacy-map {
  background-size: 84px 84px, 150px 150px !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-skill-node,
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node {
  width: 64px !important;
  height: 64px !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-skill-node i,
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node i {
  width: 38px !important;
  height: 38px !important;
}
.nucleus-legacy-skill-node__img {
  width: 30px !important;
  height: 30px !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-skill-node > span,
.nucleus-legacy-fullscreen-shell .nucleus-legacy-skill-node > span {
  right: -10px !important;
  bottom: -8px !important;
  min-width: 26px !important;
  height: 22px !important;
  font-size: .54rem !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-link,
.nucleus-legacy-fullscreen-shell .nucleus-legacy-link {
  stroke-width: 4.2px !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-link.is-open,
.nucleus-legacy-true-stage .nucleus-legacy-link.is-owned,
.nucleus-legacy-fullscreen-shell .nucleus-legacy-link.is-open,
.nucleus-legacy-fullscreen-shell .nucleus-legacy-link.is-owned {
  stroke-width: 5px !important;
}
.nucleus-legacy-true-stage .nucleus-legacy-map-wrap {
  scroll-padding: 260px !important;
}
.nucleus-legacy-map-hint {
  max-width: min(520px, calc(100vw - 210px)) !important;
}

/* ENIGMAL 28.0.0 — marco de Era mais baixo, sem cobrir menu superior */
body > .nucleus-era-ready-callout,
.nucleus-era-ready-callout--global,
#nucleus-clicker-stage .nucleus-era-ready-callout {
  top: 132px !important;
}
@media (max-width: 720px) {
  body > .nucleus-era-ready-callout,
  .nucleus-era-ready-callout--global,
  #nucleus-clicker-stage .nucleus-era-ready-callout {
    top: 104px !important;
  }
}


/* ENIGMAL 28.0.3 — Hotfix ritual de Ascensão / modal acima do Legado fullscreen */
.nucleus-legacy-ascension-overlay,
body > .nucleus-legacy-ascension-overlay {
  z-index: 2147483646 !important;
  position: fixed !important;
  inset: 0 !important;
}
.nucleus-legacy-ascension-modal {
  position: relative !important;
  z-index: 2147483647 !important;
}
.nucleus-legacy-ascension-button,
.nucleus-legacy-dream-bar .nucleus-legacy-ascension-button,
.nucleus-legacy-minimal-bar .nucleus-legacy-ascension-button {
  opacity: 1 !important;
  color: #fff3cc !important;
  text-shadow: 0 0 18px rgba(255, 225, 145, .24) !important;
  border-color: rgba(255, 226, 145, .56) !important;
  background: linear-gradient(180deg, rgba(87, 56, 18, .98), rgba(13, 14, 21, .98)) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.36), 0 0 28px rgba(255, 206, 105, .13) !important;
}
.nucleus-legacy-ascension-button.is-ready {
  opacity: 1 !important;
  filter: none !important;
  color: #fff7d7 !important;
  border-color: rgba(255, 226, 145, .82) !important;
  box-shadow: 0 16px 42px rgba(0,0,0,.42), 0 0 44px rgba(255, 211, 112, .22) !important;
}
.nucleus-legacy-ascension-button:disabled {
  opacity: .42 !important;
  filter: grayscale(.38) !important;
  cursor: not-allowed !important;
}
.nucleus-legacy-ascension-modal__actions button[data-legacy-ascension-accept]:not(:disabled) {
  opacity: 1 !important;
  color: #fff6d5 !important;
  border-color: rgba(255, 226, 145, .78) !important;
  background: linear-gradient(180deg, rgba(92, 58, 16, .98), rgba(18, 14, 16, .98)) !important;
}

/* ENIGMAL 28.0.5 — Marco de Era mais baixo, sem cobrir HUD/recursos
   Ajuste apenas visual. Não altera pré-requisitos, eras, economia ou legado. */
body > .nucleus-era-ready-callout,
.nucleus-era-ready-callout--global,
#nucleus-clicker-stage .nucleus-era-ready-callout {
  top: 182px !important;
}
body > .nucleus-era-ready-callout:hover,
.nucleus-era-ready-callout--global:hover,
#nucleus-clicker-stage .nucleus-era-ready-callout:hover {
  transform: translateX(-50%) translateY(-1px) !important;
}
@media (max-width: 980px) {
  body > .nucleus-era-ready-callout,
  .nucleus-era-ready-callout--global,
  #nucleus-clicker-stage .nucleus-era-ready-callout {
    top: 156px !important;
  }
}
@media (max-width: 720px) {
  body > .nucleus-era-ready-callout,
  .nucleus-era-ready-callout--global,
  #nucleus-clicker-stage .nucleus-era-ready-callout {
    top: 128px !important;
  }
}

/* ENIGMAL 28.0.8 — Nome da Clareira */
.materia-civilization-topbar__brand--editable {
  gap: 2px;
}
.materia-clearing-name-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, 42vw);
}
.materia-clearing-name-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.materia-clearing-rename-button {
  border: 1px solid rgba(121, 198, 255, .28);
  border-radius: 999px;
  background: rgba(8, 23, 39, .58);
  color: rgba(214, 239, 255, .82);
  font: 700 9px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 7px;
  cursor: pointer;
  box-shadow: inset 0 0 12px rgba(74, 171, 255, .08);
}
.materia-clearing-rename-button:hover,
.materia-clearing-rename-button:focus-visible {
  color: #f8fcff;
  border-color: rgba(133, 213, 255, .62);
  background: rgba(18, 70, 112, .72);
}

/* ENIGMAL 28.0.13 — Botão renomear Clareira clicável acima do canvas */
.materia-civilization-topbar,
.materia-civilization-topbar__brand,
.materia-civilization-topbar__brand--editable,
.materia-clearing-name-row {
  position: relative;
  z-index: 80;
  pointer-events: auto;
}
.materia-clearing-rename-button {
  position: relative;
  z-index: 90;
  pointer-events: auto !important;
  user-select: none;
}
.materia-clearing-rename-button:disabled {
  opacity: .55;
  cursor: wait;
}

/* 28.0.13 — ajustes finais: Legado sem "puxão" e renomear clicável */
.nucleus-legacy-fullscreen-shell .nucleus-legacy-map,
.nucleus-legacy-true-stage .nucleus-legacy-map {
  transition: none !important;
}

.nucleus-legacy-skill-node.is-buying {
  pointer-events: none !important;
  filter: brightness(1.25) saturate(1.1) !important;
}

.materia-clearing-name-row,
.materia-clearing-rename-button,
[data-clearing-rename] {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 80 !important;
}

.materia-clearing-rename-button,
[data-clearing-rename] {
  cursor: pointer !important;
  user-select: none !important;
}

/* 28.0.14 — Admin de Fragmentos de Legado */
.nucleus-admin-card--legacy {
  border-color: rgba(92, 183, 255, 0.24);
  background: linear-gradient(145deg, rgba(11, 22, 38, 0.94), rgba(5, 10, 18, 0.98));
}

.nucleus-admin-legacy-wallet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.nucleus-admin-legacy-wallet span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(92, 183, 255, 0.16);
  border-radius: 12px;
  background: rgba(3, 12, 24, 0.68);
}

.nucleus-admin-legacy-wallet small {
  color: rgba(207, 232, 255, 0.68);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nucleus-admin-legacy-wallet b {
  color: #dff5ff;
  font-size: 1rem;
}

.nucleus-admin-form--legacy-points {
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
}

.nucleus-admin-form--legacy-points input {
  min-width: 0;
}

.nucleus-admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.nucleus-admin-quick-actions button {
  min-width: auto;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(92, 183, 255, 0.22);
  background: rgba(12, 34, 58, 0.72);
  color: #d7f3ff;
  font-weight: 700;
  cursor: pointer;
}

.nucleus-admin-quick-actions button:hover {
  border-color: rgba(107, 211, 255, 0.5);
  box-shadow: 0 0 16px rgba(38, 168, 255, 0.16);
}

/* ENIGMAL // Sala Escura */
.adarkroom-route {
  min-height: calc(100vh - 190px);
}

.adarkroom-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(100vh - 220px);
  overflow: hidden;
}

.adarkroom-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(92, 225, 255, 0.14);
}

.adarkroom-hero h2 {
  margin: 4px 0 8px;
}

.adarkroom-hero p {
  max-width: 780px;
  color: var(--muted);
}

.adarkroom-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.adarkroom-actions .danger {
  border-color: rgba(255, 83, 112, 0.38);
  color: #ff9aae;
}

.adarkroom-license-note {
  padding: 12px 14px;
  border: 1px solid rgba(92, 225, 255, 0.12);
  border-radius: 16px;
  background: rgba(2, 8, 18, 0.72);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.adarkroom-license-note strong {
  color: var(--text);
}

.adarkroom-license-note code {
  color: #b7f2ff;
  font-size: 0.84rem;
}

.adarkroom-frame-wrap {
  position: relative;
  flex: 1;
  min-height: 680px;
  border: 1px solid rgba(92, 225, 255, 0.18);
  border-radius: 20px;
  overflow: hidden;
  background: #0b0b0b;
  box-shadow: inset 0 0 40px rgba(92, 225, 255, 0.05), 0 24px 80px rgba(0, 0, 0, 0.32);
}

.adarkroom-frame-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  z-index: 1;
}

.adarkroom-frame {
  width: 100%;
  height: min(78vh, 900px);
  min-height: 680px;
  border: 0;
  display: block;
  background: #0b0b0b;
}

@media (max-width: 900px) {
  .adarkroom-hero {
    flex-direction: column;
  }

  .adarkroom-actions {
    justify-content: flex-start;
  }

  .adarkroom-frame,
  .adarkroom-frame-wrap {
    min-height: 620px;
  }
}

/* ENIGMAL // Sala Escura Universo Limpo */
body.adarkroom-universe {
  background: #ffffff !important;
  color: #111111 !important;
  overflow-x: hidden !important;
}

body.adarkroom-universe::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(0, 0, 0, 0.18), transparent 0 2px, transparent 34px),
    radial-gradient(circle at 72% 16%, rgba(0, 0, 0, 0.12), transparent 0 1px, transparent 42px),
    radial-gradient(circle at 48% 52%, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.92) 24%, rgba(255, 255, 255, 0) 64%),
    repeating-conic-gradient(from 0deg, rgba(0,0,0,0.10) 0 4deg, transparent 4deg 11deg);
  mix-blend-mode: multiply;
}

body.adarkroom-universe.adarkroom-universe-entering::before {
  animation: adarkroomRift 1400ms cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes adarkroomRift {
  0% {
    opacity: 1;
    filter: blur(18px) contrast(1.8) brightness(2.8);
    transform: scale(1.2) rotate(0.001turn);
    clip-path: polygon(50% 50%, 51% 51%, 50% 52%, 49% 51%);
  }
  24% {
    opacity: .92;
    filter: blur(7px) contrast(1.5) brightness(2.3);
    transform: scale(1.05) rotate(-0.004turn);
    clip-path: polygon(0 0, 100% 7%, 92% 100%, 8% 92%);
  }
  55% {
    opacity: .42;
    filter: blur(2px) contrast(1.15) brightness(1.55);
    transform: scale(1.01) rotate(0.002turn);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  100% {
    opacity: 0;
    filter: blur(0) contrast(1) brightness(1);
    transform: scale(1);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

body.adarkroom-universe .app-shell,
body.dashboard-active.adarkroom-universe .app-shell {
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  background: #ffffff !important;
}

body.adarkroom-universe .app-shell::before,
body.adarkroom-universe .app-shell::after,
body.adarkroom-universe .dashboard-layout::before,
body.adarkroom-universe .dashboard-layout::after,
body.adarkroom-universe .desktop-workspace::before,
body.adarkroom-universe .route-stage::before {
  display: none !important;
  content: none !important;
}

body.adarkroom-universe .dashboard-layout.top-shell,
body.adarkroom-universe .desktop-shell.top-shell {
  width: 100% !important;
  min-height: 100vh !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 0 !important;
  background: #ffffff !important;
}

body.adarkroom-universe .enigmal-topbar.top-console {
  position: sticky !important;
  top: 0 !important;
  z-index: 120 !important;
  width: 100% !important;
  min-height: 46px !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 6px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.075) !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #111111 !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) saturate(1.05) !important;
}

body.adarkroom-universe .enigmal-topbar.top-console::before,
body.adarkroom-universe .enigmal-topbar.top-console::after {
  display: none !important;
  content: none !important;
}

body.adarkroom-universe .enigmal-topbar .top-brand {
  min-width: 0 !important;
  max-width: none !important;
  min-height: 34px !important;
  padding: 0 7px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #111111 !important;
  box-shadow: none !important;
}

body.adarkroom-universe .enigmal-topbar .brand-mark {
  width: 26px !important;
  height: 26px !important;
  border: 1px solid rgba(0,0,0,.22) !important;
  border-radius: 50% !important;
  color: #111111 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font-size: .62rem !important;
}

body.adarkroom-universe .enigmal-topbar .top-brand-copy {
  display: none !important;
}

body.adarkroom-universe .shell-top-identity.top-identity,
body.adarkroom-universe .workspace-statusbar,
body.adarkroom-universe .workspace-statusbar-dynamic,
body.adarkroom-universe .global-footer {
  display: none !important;
}

body.adarkroom-universe .shell-top-nav.top-nav {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow-x: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  scrollbar-width: none !important;
}

body.adarkroom-universe .shell-top-nav.top-nav::-webkit-scrollbar {
  display: none !important;
}

body.adarkroom-universe .shell-top-nav.top-nav button,
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="nucleo"] {
  height: 34px !important;
  min-height: 34px !important;
  padding: 5px 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(0,0,0,.52) !important;
  box-shadow: none !important;
  font-size: .66rem !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
}

body.adarkroom-universe .shell-top-nav .top-nav-icon {
  display: none !important;
}

body.adarkroom-universe .shell-top-nav.top-nav button:hover,
body.adarkroom-universe .shell-top-nav.top-nav button.active,
body.adarkroom-universe .shell-top-nav.top-nav button[aria-current="page"],
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="nucleo"]:hover,
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="nucleo"].active,
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="nucleo"][aria-current="page"] {
  transform: none !important;
  color: #111111 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: inset 0 -1px 0 #111111 !important;
}

body.adarkroom-universe .workspace-top-shell.desktop-workspace {
  min-height: calc(100vh - 47px) !important;
  display: block !important;
  gap: 0 !important;
  background: #ffffff !important;
}

body.adarkroom-universe .desktop-workspace .route-stage,
body.adarkroom-universe .route-stage {
  width: 100% !important;
  min-height: calc(100vh - 47px) !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  background: #ffffff !important;
}

body.adarkroom-universe .adarkroom-route,
body.adarkroom-universe .adarkroom-universe-route {
  width: 100% !important;
  min-height: calc(100vh - 47px) !important;
  height: calc(100vh - 47px) !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

body.adarkroom-universe .adarkroom-frame,
body.adarkroom-universe .adarkroom-universe-frame {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: block !important;
  border: 0 !important;
  background: #ffffff !important;
}

@media (max-width: 720px) {
  body.adarkroom-universe .enigmal-topbar.top-console {
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-areas: none !important;
  }

  body.adarkroom-universe .enigmal-topbar .top-brand,
  body.adarkroom-universe .shell-top-nav.top-nav {
    grid-area: auto !important;
  }

  body.adarkroom-universe .shell-top-nav.top-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
  }

  body.adarkroom-universe .shell-top-nav.top-nav button {
    width: auto !important;
    justify-content: center !important;
    padding: 5px 7px !important;
  }
}

/* ENIGMAL // Sala Escura — mesmo menu, tema branco */
body.adarkroom-universe {
  background: #ffffff !important;
  color: #111111 !important;
}

body.adarkroom-universe .app-shell,
body.dashboard-active.adarkroom-universe .app-shell {
  width: min(1220px, calc(100% - 24px)) !important;
  max-width: min(1220px, calc(100% - 24px)) !important;
  min-height: 100vh !important;
  padding: 14px 0 0 !important;
  margin: 0 auto !important;
  display: block !important;
  background: #ffffff !important;
}

body.adarkroom-universe .dashboard-layout.top-shell,
body.adarkroom-universe .desktop-shell.top-shell {
  width: 100% !important;
  min-height: calc(100vh - 14px) !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 0 !important;
  background: #ffffff !important;
}

body.adarkroom-universe .enigmal-topbar.top-console {
  position: sticky !important;
  top: 10px !important;
  z-index: 120 !important;
  width: 100% !important;
  min-height: 58px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #111111 !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(14px) saturate(1.05) !important;
  overflow: visible !important;
}

body.adarkroom-universe .enigmal-topbar.top-console::before,
body.adarkroom-universe .enigmal-topbar.top-console::after {
  display: none !important;
  content: none !important;
}

body.adarkroom-universe .enigmal-topbar .top-brand {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  min-height: 42px !important;
  max-width: 218px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 9px !important;
  border: 1px solid rgba(0, 0, 0, 0.055) !important;
  border-radius: 13px !important;
  background: rgba(0, 0, 0, 0.018) !important;
  color: #111111 !important;
  box-shadow: none !important;
}

body.adarkroom-universe .enigmal-topbar .brand-mark {
  width: 32px !important;
  height: 32px !important;
  border: 1px solid rgba(0, 0, 0, 0.16) !important;
  border-radius: 10px !important;
  color: #111111 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font-size: .76rem !important;
}

body.adarkroom-universe .enigmal-topbar .top-brand-copy,
body.adarkroom-universe .top-brand-copy {
  display: grid !important;
  gap: 1px !important;
  min-width: 0 !important;
}

body.adarkroom-universe .top-brand-copy strong {
  color: #111111 !important;
  font-size: .74rem !important;
  letter-spacing: .13em !important;
  line-height: 1.05 !important;
}

body.adarkroom-universe .top-brand-copy small {
  max-width: 150px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: rgba(0, 0, 0, 0.48) !important;
  font-size: .58rem !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body.adarkroom-universe .shell-top-nav.top-nav {
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: 560px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 4px !important;
  border: 1px solid rgba(0, 0, 0, 0.065) !important;
  border-radius: 15px !important;
  overflow: visible !important;
  background: rgba(0, 0, 0, 0.025) !important;
  box-shadow: none !important;
  scrollbar-width: none !important;
}

body.adarkroom-universe .shell-top-nav.top-nav button,
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="nucleo"] {
  flex: 0 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 36px !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 6px 8px !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: rgba(0, 0, 0, 0.60) !important;
  box-shadow: none !important;
  font-size: .70rem !important;
  letter-spacing: .03em !important;
  line-height: 1 !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

body.adarkroom-universe .shell-top-nav .top-nav-icon {
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
  border-radius: 7px !important;
  color: rgba(0, 0, 0, 0.62) !important;
  background: #ffffff !important;
  font-size: .72rem !important;
  line-height: 1 !important;
}

body.adarkroom-universe .shell-top-nav.top-nav button:hover,
body.adarkroom-universe .shell-top-nav.top-nav button.active,
body.adarkroom-universe .shell-top-nav.top-nav button[aria-current="page"],
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="nucleo"]:hover,
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="nucleo"].active,
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="nucleo"][aria-current="page"] {
  transform: translateY(-1px) !important;
  color: #111111 !important;
  background: rgba(0, 0, 0, 0.045) !important;
  border-color: rgba(0, 0, 0, 0.095) !important;
  box-shadow: none !important;
}

body.adarkroom-universe .shell-top-identity.top-identity {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

body.adarkroom-universe .shell-top-identity .system-clock,
body.adarkroom-universe .shell-top-identity .user-chip {
  display: grid !important;
  padding: 7px 8px !important;
  border: 1px solid rgba(0, 0, 0, 0.055) !important;
  border-radius: 13px !important;
  color: #111111 !important;
  background: rgba(0, 0, 0, 0.025) !important;
  box-shadow: none !important;
}

body.adarkroom-universe .shell-top-identity .system-clock span,
body.adarkroom-universe .shell-top-identity .user-chip span {
  color: #111111 !important;
}

body.adarkroom-universe .shell-top-identity .system-clock small,
body.adarkroom-universe .shell-top-identity .user-chip small {
  color: rgba(0, 0, 0, 0.50) !important;
}

body.adarkroom-universe .shell-top-identity .user-chip button,
body.adarkroom-universe .notification-bell {
  border-color: rgba(0, 0, 0, 0.075) !important;
  color: #111111 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.adarkroom-universe .notification-bell:hover,
body.adarkroom-universe .notification-bell.active,
body.adarkroom-universe .notification-bell[aria-current="page"] {
  background: rgba(0, 0, 0, 0.045) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}

body.adarkroom-universe .workspace-statusbar,
body.adarkroom-universe .workspace-statusbar-dynamic,
body.adarkroom-universe .global-footer {
  display: none !important;
}

body.adarkroom-universe .workspace-top-shell.desktop-workspace {
  min-height: calc(100vh - 72px) !important;
  display: block !important;
  gap: 0 !important;
  background: #ffffff !important;
}

body.adarkroom-universe .desktop-workspace .route-stage,
body.adarkroom-universe .route-stage {
  width: 100% !important;
  min-height: calc(100vh - 86px) !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  background: #ffffff !important;
}

body.adarkroom-universe .adarkroom-route,
body.adarkroom-universe .adarkroom-universe-route {
  width: 100% !important;
  min-height: calc(100vh - 86px) !important;
  height: calc(100vh - 86px) !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

body.adarkroom-universe .adarkroom-frame,
body.adarkroom-universe .adarkroom-universe-frame {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: block !important;
  border: 0 !important;
  background: #ffffff !important;
}

@media (max-width: 1180px) {
  body.adarkroom-universe .enigmal-topbar.top-console {
    flex-wrap: wrap !important;
    top: 0 !important;
  }

  body.adarkroom-universe .enigmal-topbar .top-brand {
    max-width: none !important;
    flex: 1 1 220px !important;
  }

  body.adarkroom-universe .shell-top-nav.top-nav {
    order: 3 !important;
    flex: 1 0 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 5px !important;
    justify-content: stretch !important;
  }

  body.adarkroom-universe .shell-top-nav.top-nav button {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 720px) {
  body.adarkroom-universe .app-shell,
  body.dashboard-active.adarkroom-universe .app-shell {
    width: min(100% - 14px, 1220px) !important;
    max-width: min(100% - 14px, 1220px) !important;
    padding-top: 7px !important;
  }

  body.adarkroom-universe .enigmal-topbar.top-console {
    padding: 7px !important;
  }

  body.adarkroom-universe .shell-top-nav.top-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* ENIGMAL // Sala Escura — botão branco no menu principal */
body.dashboard-active:not(.adarkroom-universe) .shell-top-nav.top-nav button[data-route="adarkroom"] {
  border-color: rgba(255, 255, 255, 0.42) !important;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72) 44%, rgba(232, 236, 238, 0.82) 100%) !important;
  color: #0a0d10 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 0 24px rgba(255, 255, 255, 0.08) !important;
}

body.dashboard-active:not(.adarkroom-universe) .shell-top-nav.top-nav button[data-route="adarkroom"] .top-nav-icon {
  color: #0a0d10 !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  background: rgba(255, 255, 255, 0.78) !important;
  text-shadow: none !important;
}

body.dashboard-active:not(.adarkroom-universe) .shell-top-nav.top-nav button[data-route="adarkroom"]:hover {
  border-color: rgba(255, 255, 255, 0.68) !important;
  background:
    radial-gradient(circle at top left, #ffffff, rgba(255, 255, 255, 0.84) 48%, rgba(235, 239, 241, 0.94) 100%) !important;
  color: #000000 !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 0 30px rgba(255, 255, 255, 0.12) !important;
}

/* ENIGMAL // Sala Escura — apagar luzes afeta o universo abaixo da top bar */
body.adarkroom-universe.adarkroom-lights-off {
  background: #050505 !important;
  color: #eeeeea !important;
}

body.adarkroom-universe.adarkroom-lights-off::before {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 0 1px, transparent 38px),
    radial-gradient(circle at 18% 78%, rgba(255, 255, 255, 0.055), transparent 0 1px, transparent 44px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.28));
  mix-blend-mode: normal;
}

body.adarkroom-universe.adarkroom-lights-off .app-shell,
body.dashboard-active.adarkroom-universe.adarkroom-lights-off .app-shell,
body.adarkroom-universe.adarkroom-lights-off .dashboard-layout.top-shell,
body.adarkroom-universe.adarkroom-lights-off .desktop-shell.top-shell,
body.adarkroom-universe.adarkroom-lights-off .workspace-top-shell.desktop-workspace,
body.adarkroom-universe.adarkroom-lights-off .desktop-workspace .route-stage,
body.adarkroom-universe.adarkroom-lights-off .route-stage,
body.adarkroom-universe.adarkroom-lights-off .adarkroom-route,
body.adarkroom-universe.adarkroom-lights-off .adarkroom-universe-route {
  background: #050505 !important;
  color: #eeeeea !important;
}

body.adarkroom-universe.adarkroom-lights-off .adarkroom-route,
body.adarkroom-universe.adarkroom-lights-off .adarkroom-universe-route {
  box-shadow: inset 0 16px 42px rgba(0, 0, 0, 0.18) !important;
}

body.adarkroom-universe.adarkroom-lights-off .adarkroom-frame,
body.adarkroom-universe.adarkroom-lights-off .adarkroom-universe-frame {
  background: #0d0f0d !important;
}

body.adarkroom-universe.adarkroom-lights-off .enigmal-topbar.top-console {
  background: rgba(255, 255, 255, 0.96) !important;
  color: #111111 !important;
}

/* Candy Box 2 integration */
.shell-top-nav.top-nav button[data-route="candybox"],
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="candybox"] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.55) !important;
  color: #ffffff !important;
  background:
    linear-gradient(90deg, #ff3b6b 0%, #ff9f1c 18%, #ffe156 34%, #2ee66b 50%, #2ec4ff 66%, #7b61ff 82%, #ff3bdb 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.16) inset,
    0 10px 28px rgba(255, 90, 170, 0.24),
    0 0 24px rgba(46, 196, 255, 0.22) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

.shell-top-nav.top-nav button[data-route="candybox"]::before,
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="candybox"]::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.5) 32%, transparent 62%);
  transform: translateX(-140%);
  animation: candyRainbowSweep 3.8s ease-in-out infinite;
}

.shell-top-nav.top-nav button[data-route="candybox"]:hover,
.shell-top-nav.top-nav button[data-route="candybox"].active,
.shell-top-nav.top-nav button[data-route="candybox"][aria-current="page"] {
  transform: translateY(-1px);
  filter: saturate(1.2) brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.3) inset,
    0 14px 34px rgba(255, 90, 170, 0.32),
    0 0 34px rgba(46, 196, 255, 0.3) !important;
}

@keyframes candyRainbowSweep {
  0%, 42% { transform: translateX(-140%); }
  72%, 100% { transform: translateX(140%); }
}

body.candybox-universe {
  background: #ffffff;
  color: #111111;
}

body.candybox-universe::before {
  opacity: 0;
}

body.candybox-universe .app-shell,
body.dashboard-active.candybox-universe .app-shell {
  width: 100%;
  max-width: none;
  padding: 0;
  background: #ffffff;
}

body.candybox-universe .dashboard-layout.top-shell,
body.candybox-universe .desktop-shell.top-shell {
  width: 100%;
  min-height: 100vh;
  border-radius: 0;
  border: 0;
  background: #ffffff;
  box-shadow: none;
}

body.candybox-universe .workspace-top-shell.desktop-workspace,
body.candybox-universe .desktop-workspace .route-stage,
body.candybox-universe .route-stage {
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  background: #ffffff;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

body.candybox-universe .workspace-statusbar,
body.candybox-universe .workspace-statusbar-dynamic,
body.candybox-universe .global-footer {
  display: none !important;
}

.candybox-route,
.candybox-universe-route {
  width: 100%;
  height: calc(100vh - 86px);
  min-height: 640px;
  background: #ffffff;
  overflow: hidden;
}

.candybox-frame,
.candybox-universe-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

/* Box: stronger rainbow menu button */
.shell-top-nav.top-nav button[data-route="candybox"],
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="candybox"] {
  border: 1px solid rgba(255,255,255,0.74) !important;
  color: #ffffff !important;
  background:
    linear-gradient(#111827, #111827) padding-box,
    linear-gradient(110deg, #ff2f6d, #ffb000, #fff85a, #35ff7f, #21d4ff, #816bff, #ff44e7, #ff2f6d) border-box !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.18) inset,
    0 0 16px rgba(255, 47, 109, 0.60),
    0 0 28px rgba(33, 212, 255, 0.46),
    0 0 42px rgba(129, 107, 255, 0.32) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.75), 0 0 10px rgba(255,255,255,0.55);
  animation: boxRainbowGlow 2.6s linear infinite;
}

.shell-top-nav.top-nav button[data-route="candybox"]::after,
body.adarkroom-universe .shell-top-nav.top-nav button[data-route="candybox"]::after {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -2;
  opacity: .72;
  background: conic-gradient(from 0deg, #ff2f6d, #ffb000, #fff85a, #35ff7f, #21d4ff, #816bff, #ff44e7, #ff2f6d);
  filter: blur(18px);
  animation: boxRainbowSpin 4.2s linear infinite;
}

.shell-top-nav.top-nav button[data-route="candybox"]:hover,
.shell-top-nav.top-nav button[data-route="candybox"].active,
.shell-top-nav.top-nav button[data-route="candybox"][aria-current="page"] {
  filter: saturate(1.38) brightness(1.14) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.32) inset,
    0 0 22px rgba(255, 47, 109, 0.76),
    0 0 38px rgba(33, 212, 255, 0.60),
    0 0 58px rgba(129, 107, 255, 0.42) !important;
}

@keyframes boxRainbowGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes boxRainbowSpin {
  to { transform: rotate(360deg); }
}

/* Box text map route */
.box-texts-route {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.box-texts-panel {
  display: grid;
  gap: 18px;
}

.box-texts-hero h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.06em;
}

.box-texts-hero p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.box-texts-paths {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.box-texts-paths code {
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: #dce6ff;
}

.box-texts-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.box-texts-toolbar label {
  flex: 1 1 360px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.box-texts-toolbar input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(3,6,12,0.74);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.box-texts-toolbar input:focus {
  border-color: rgba(73,255,212,.5);
  box-shadow: 0 0 0 3px rgba(73,255,212,.12);
}

.box-texts-toolbar button,
.box-texts-actions button {
  min-height: 40px;
  border: 1px solid rgba(73,255,212,.28);
  border-radius: 14px;
  background: rgba(73,255,212,.1);
  color: var(--cyan);
  font-weight: 800;
  padding: 0 14px;
}

.box-texts-summary {
  color: var(--amber);
  font-weight: 800;
}

.box-texts-table-wrap {
  max-height: 64vh;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  background: rgba(3,6,12,0.58);
}

.box-texts-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: .92rem;
}

.box-texts-table th,
.box-texts-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: top;
  text-align: left;
  line-height: 1.55;
}

.box-texts-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(7,10,18,0.96);
  color: var(--cyan);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.box-texts-key code {
  color: var(--amber);
  white-space: nowrap;
}

.box-texts-empty {
  color: var(--muted);
  text-align: center !important;
}
