/* Cores semânticas do painel. Os temas e a composição dos slides são independentes. */
:root {
  color-scheme: light;
  --body: #efefef;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --surface-raised: #fff;
  --ink: #191919;
  --muted: #606060;
  --line: #d8d8d8;
  --blue: #006c95;
  --blue2: #005476;
  --brand: #006c95;
  --tint: #e4f5fc;
  --positive: #22705c;
  --positive-bg: #e0efe8;
  --warning: #895516;
  --warning-bg: #f3e8d5;
  --negative: #a33e49;
  --negative-bg: #f7e3e6;
  --shadow: 0 4px 18px #00000005;
  --action: #006c95;
  --action-hover: #005476;
  --on-action: #ffffff;
  --control-line: #929292;
  --chrome: #080808;
  --on-chrome: #f5f5f5;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --body: #090909;
  --surface: #141414;
  --surface-alt: #1c1c1c;
  --surface-raised: #222222;
  --ink: #f5f5f5;
  --muted: #b6b6b6;
  --line: #363636;
  --blue: #79d9ff;
  --blue2: #45bce9;
  --brand: #79d9ff;
  --tint: #222222;
  --positive: #8dd8b6;
  --positive-bg: #234038;
  --warning: #f2cd8e;
  --warning-bg: #443927;
  --negative: #ffa5b0;
  --negative-bg: #472e37;
  --shadow: 0 8px 28px #00000018;
  --action: #79d9ff;
  --action-hover: #a7e6ff;
  --on-action: #080808;
  --control-line: #707070;
}
body {
  background: var(--body);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.sidebar {
  background: #060606;
  border-color: #292929;
  padding-top: 24px;
}
.brand {
  display: block;
  margin: 0 4px 24px;
  text-align: center;
}
.panel-brand-title {
  display: block;
  color: var(--on-chrome);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 750;
  letter-spacing: -0.4px;
  text-wrap: balance;
}
.panel-brand-owner {
  display: block;
  color: #bcbcbc;
  font-size: 13px;
  margin-top: 8px;
}
.header-identity .app-title {
  display: block;
  color: var(--on-chrome);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -0.4px;
  overflow-wrap: anywhere;
}
.brand-logo-plate {
  display: flex;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
}
.brand-logo {
  display: block;
  width: 100%;
  height: 76px;
  object-fit: contain;
}
.brand-sub {
  color: #bcbcbc;
  font-size: 10px;
  text-align: center;
  margin-top: 12px;
  letter-spacing: 1px;
}
.side-label {
  color: #a6a6a6;
  font-size: 10px;
}
.nav {
  color: #d6d6d6;
  min-height: 44px;
  font-size: 12px;
}
.nav:hover {
  color: #fff;
  background: #1a1a1a;
}
.nav.active {
  color: #fff;
  background: #242424;
  box-shadow: inset 3px 0 #79d9ff;
}
.side-status,
.side-credit {
  color: #bcbcbc;
  line-height: 1.5;
}
.side-bottom {
  border-color: #292929;
}
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  background: var(--chrome);
  color: var(--on-chrome);
  border-bottom: 1px solid #292929;
  min-height: 100px;
  gap: 20px;
  padding: 16px 32px;
  box-shadow: none;
}
.header-identity {
  display: block;
  min-width: 0;
}
.header-brand {
  display: grid;
  place-items: center;
  justify-self: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 4px 0;
  width: 180px;
  min-height: 60px;
}
.header-brand img {
  display: block;
  width: 180px;
  height: 60px;
  object-fit: contain;
}
.crumb {
  min-width: 0;
  color: var(--muted);
  white-space: normal;
}
.owner-name {
  color: #bcbcbc;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  margin-top: 5px;
}
.owner-name small {
  color: #bcbcbc;
  font-size: 11px;
  margin: 2px 0 6px;
}
.app-caption {
  display: block;
  color: #a6a6a6;
  font-size: 11px;
  line-height: 1.45;
}
.head-actions {
  flex-shrink: 0;
  gap: 8px;
}
.theme-toggle,
.small-icon-btn,
.top-assistant {
  border: 1px solid var(--line);
  background: var(--surface-alt);
  color: var(--ink);
  min-width: 44px;
  min-height: 44px;
}
.content {
  width: 100%;
  padding: 28px;
}
.content > * {
  animation: none;
}
.title {
  color: var(--ink);
  font-size: clamp(28px, 2.5vw, 36px);
  letter-spacing: -1.1px;
  line-height: 1.25;
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
}
.subtitle,
.panel-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.overview-head {
  margin-bottom: 24px;
}
.card,
.studio-panel,
.sector-tile,
.library-card,
.studio-stage {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow);
}
.card:hover,
.sector-tile:hover {
  box-shadow: var(--shadow);
}
.panel {
  padding: 24px;
}
.panel h3,
.panel-title,
.studio-panel h3 {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}
.panel-sub {
  margin-top: 6px;
}
.btn {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 42px;
  font-size: 12px;
  font-weight: 650;
  border-radius: 8px !important;
}
.btn:hover {
  transform: none;
  border-color: var(--brand);
  background: var(--tint);
}
.btn-primary {
  color: var(--on-action);
  background: var(--action);
  border-color: var(--action);
  box-shadow: none;
}
.btn-primary:hover {
  background: var(--action-hover);
  color: var(--on-action);
}
.btn-quiet {
  background: var(--surface-alt);
}
.control,
.studio-field input,
.studio-field select,
.studio-field textarea,
.searchbox {
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  min-height: 42px;
  font-size: 13px;
}
.searchbox input {
  color: var(--ink);
}
.searchbox input::placeholder {
  color: var(--muted);
}
.filter-row label,
.import-fields label,
.mapping-grid label,
.report-controls label,
.studio-field label,
.studio-hint,
.field label,
.settings-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.period {
  background: var(--surface);
  border-color: var(--line);
}
.period button {
  color: var(--muted);
  min-height: 34px;
  font-size: 12px;
}
.period button.selected {
  color: var(--ink);
  background: var(--tint);
}
.compact {
  min-height: 36px;
}
.notice,
.info-box {
  background: var(--surface-alt);
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.65;
}
.notice {
  margin-bottom: 18px;
}
.badge.info {
  color: var(--ink);
  background: var(--tint);
}
.badge.ok {
  color: var(--positive);
  background: var(--positive-bg);
}
.badge.warning {
  color: var(--warning);
  background: var(--warning-bg);
}
.badge.danger,
.import-errors {
  color: var(--negative);
  background: var(--negative-bg);
  border-color: var(--negative);
}
.hero {
  background: #161616;
  color: #fff;
  border: 1px solid #363636;
  border-radius: 16px !important;
  box-shadow: none;
  margin: 24px 0 18px;
}
.hero h2 {
  font-size: 26px;
}
.hero p,
.hero-tag,
.hero-metric small {
  color: #bdbdbd;
}
.hero-tag {
  background: #ffffff0d;
  border-color: #ffffff24;
}
.hero:before,
.hero:after {
  display: none;
}
.stat {
  background: var(--surface);
  padding: 20px;
  min-height: 146px;
}
.stat-label {
  color: var(--muted);
  font-size: 12px;
}
.stat-value {
  color: var(--ink);
  font-size: 34px;
}
.stat-icon {
  background: var(--surface-alt);
  color: var(--brand);
  border: 1px solid var(--line);
}
.stat-footer {
  font-size: 12px;
  color: var(--muted);
}
.stat {
  border-top-color: var(--line) !important;
}
.content > .card.panel:first-of-type .insight,
.insight {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 16px;
}
.insight h4 {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}
.insight p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.insight-icon {
  color: var(--brand);
  background: var(--tint);
}
.studio-promo {
  background: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  box-shadow: none;
  padding: 22px;
}
.studio-promo strong {
  color: var(--ink);
  font-size: 17px;
}
.studio-promo span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.studio-promo-icon {
  color: var(--brand);
  background: var(--tint);
  border-color: var(--line);
}
.tile-top,
.tile-bottom small,
.ranking-row span,
.pagination,
.legend,
.donut-label {
  color: var(--muted);
}
.tile-bottom strong {
  color: var(--ink);
}
.sector-tile {
  padding: 18px;
  min-height: 110px;
}
.tile-top,
.tile-bottom small {
  font-size: 12px;
}
.tbl {
  font-size: 12px;
}
.tbl th {
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 11px;
}
.tbl td {
  color: var(--ink);
  border-color: var(--line);
}
.tbl tr:hover td {
  background: var(--surface-alt);
}
.table-wrap {
  max-width: 100%;
  overflow: auto;
}
.chart text {
  fill: var(--muted);
}
.empty,
.empty-state,
.flow-list,
.report-meta p,
.footer {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.footer {
  border-color: var(--line);
}
.file-row,
.settings-item,
.ranking-row {
  border-color: var(--line);
}
.file-row strong {
  color: var(--ink);
  font-size: 13px;
}
.file-row small {
  color: var(--muted);
  font-size: 12px;
}
.appearance-field {
  margin: 20px 0;
}
.dropzone {
  padding: 0;
  background: var(--surface-alt);
  border: 1px dashed #8da3b3;
  text-align: left;
  border-radius: 12px;
  overflow: hidden;
}
.dropzone.dragging {
  background: var(--tint);
  border-color: var(--brand);
}
.upload-prompt {
  padding: 26px 22px;
  text-align: center;
}
.drop-symbol {
  color: var(--brand);
  background: var(--tint);
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
}
.dropzone h3 {
  color: var(--ink);
  font-size: 17px;
}
.dropzone p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.dropzone .upload-formats {
  font-size: 11px;
  margin: 8px 0 18px;
}
.upload-file-list {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.upload-list-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 16px;
  color: var(--muted);
  font-size: 12px;
}
.upload-list-heading span {
  background: var(--surface-alt);
  padding: 3px 8px;
  border-radius: 6px;
}
.upload-file {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
}
.upload-file.is-selected {
  background: var(--tint);
}
.upload-file-icon {
  flex: none;
  width: 36px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--surface-alt);
  border-radius: 8px;
}
.is-imported .upload-file-icon {
  color: var(--positive);
  background: var(--positive-bg);
}
.has-error .upload-file-icon {
  color: var(--negative);
  background: var(--negative-bg);
}
.upload-file-info {
  min-width: 0;
  flex: 1;
}
.upload-file-info strong {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.upload-file-info small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 4px;
}
.upload-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.upload-file-actions .btn {
  min-height: 36px;
  font-size: 11px;
  padding: 0 10px;
}
.dropzone .upload-file-error {
  color: var(--negative);
  font-size: 12px;
  margin: 8px 0;
}
.dropzone .upload-empty {
  padding: 0 16px 20px;
  font-size: 12px;
}
.upload-confirm {
  display: flex;
  margin: 18px;
  width: calc(100% - 36px);
}
.dropzone .upload-hint {
  padding: 0 18px 18px;
  font-size: 12px;
}
.import-filename {
  margin-top: 10px;
  font-weight: 650;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.import-fields,
.mapping-grid {
  min-width: 0;
}
.import-fields > label,
.mapping-grid > label {
  min-width: 0;
}
.backup-actions {
  margin-top: 18px;
}
.library-card {
  color: var(--ink);
}
.library-card > strong {
  font-size: 13px;
}
.library-card > small {
  color: var(--muted);
  font-size: 11px;
}
.element-editor,
.position-dialog {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.studio-intro {
  background: #161616;
  border-color: #363636;
}
.studio-intro h2 {
  color: #fff;
}
.studio-intro p,
.studio-intro .caption-over {
  color: #bdbdbd;
}
.studio-preview-head,
.studio-preview-head small {
  color: var(--muted);
}
.studio-thumb {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}
.studio-thumb.active {
  background: var(--tint);
}
.studio-sector-chip,
.metric-option {
  background: var(--surface-alt);
  color: var(--ink);
  border-color: var(--line);
}
.studio-save-status,
.studio-note {
  color: var(--muted);
}
.assistant-window,
.assistant-full-card {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}
.assistant-window-header,
.assistant-bottom,
.assistant-modes,
.assistant-form,
.assistant-bubble {
  background: var(--surface-alt);
  color: var(--ink);
  border-color: var(--line);
}
.assistant-identity strong,
.assistant-identity small,
.assistant-context,
.assistant-disclaimer {
  color: var(--muted);
}
.assistant-mode,
.assistant-quick button,
.assistant-form textarea {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}
.assistant-mode.is-current {
  color: var(--ink);
  background: var(--tint);
}
.assistant-line.user .assistant-bubble {
  color: var(--on-action);
  background: var(--action);
}
.assistant-fab {
  background: #161616;
  color: #fff;
  border-color: #484848;
  box-shadow: none;
}
.toast {
  background: #292929;
  color: #fff;
}
.toast.error {
  background: #773840;
}
.mobile-nav {
  display: none;
}
@media (max-width: 1500px) {
  .head-actions .searchbox,
  .head-actions > .badge,
  .head-actions > .avatar {
    display: none;
  }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .studio-top-button {
    font-size: 0;
    width: 44px;
    padding: 0;
  }
  .studio-top-button svg {
    width: 20px;
    height: 20px;
  }
  .top-assistant span {
    display: none;
  }
  .topbar {
    gap: 12px;
    padding: 16px 20px;
  }
}
@media (max-width: 700px) {
  body {
    font-size: 15px;
  }
  .sidebar {
    width: min(310px, 88vw);
    padding: 24px 16px;
  }
  .sidebar .nav {
    min-height: 48px;
    font-size: 14px;
  }
  .sidebar .brand-logo {
    height: 78px;
  }
  .main {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 16px !important;
    min-height: 126px;
    gap: 6px 8px;
    align-items: start;
    position: relative;
  }
  .header-identity {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 6px 10px;
  }
  .header-brand {
    display: block;
    width: 112px;
    align-self: center;
  }
  .header-brand img {
    width: 102px;
    height: 38px;
  }
  .header-identity .crumb {
    grid-column: 1 / -1;
  }
  .owner-name {
    font-size: 14px;
  }
  .owner-name small {
    font-size: 10px;
    margin: 2px 0 4px;
    max-width: none;
  }
  .app-caption {
    font-size: 10px;
  }
  .crumb-page {
    display: none;
  }
  .head-actions {
    gap: 6px;
    margin: 0;
    padding: 0;
  }
  .head-actions .btn,
  .head-actions .small-icon-btn,
  .head-actions .top-assistant {
    min-width: 44px;
    width: 44px;
    min-height: 48px;
    height: 48px;
    padding: 0;
    border-radius: 9px !important;
  }
  .head-actions .studio-top-button {
    font-size: 0;
    display: inline-flex;
  }
  .head-actions .studio-top-button svg {
    width: 20px;
    height: 20px;
  }
  .head-actions .top-assistant {
    display: none;
  }
  .content {
    padding: 24px 16px !important;
  }
  .title {
    font-size: 26px;
    line-height: 1.3;
    letter-spacing: -0.7px;
  }
  .subtitle,
  .panel-sub {
    font-size: 14px;
    line-height: 1.6;
  }
  .overview-head {
    margin-bottom: 24px;
    gap: 18px;
  }
  .eyebrow {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .header-buttons {
    gap: 10px;
  }
  .filter-row {
    gap: 12px;
    width: 100%;
  }
  .filter-row label {
    font-size: 12px;
    display: grid;
    flex: 1;
  }
  .filter-row .compact {
    width: 100%;
    padding: 8px !important;
  }
  .period {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }
  .period button {
    min-height: 44px;
    padding: 4px;
    font-size: 13px;
  }
  .panel,
  .studio-panel {
    padding: 20px;
  }
  .panel h3,
  .panel-title,
  .studio-panel h3 {
    font-size: 17px;
  }
  .btn,
  .control,
  .studio-field input,
  .studio-field select,
  .studio-field textarea {
    min-height: 48px;
    font-size: 14px;
    white-space: normal;
    line-height: 1.4;
  }
  .control,
  .studio-field input,
  .studio-field select,
  .studio-field textarea {
    font-size: 16px;
    padding: 10px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .stat {
    min-height: 160px;
    padding: 16px;
  }
  .stat-top {
    align-items: flex-start;
    gap: 6px;
  }
  .stat-label {
    font-size: 12px;
    line-height: 1.5;
  }
  .stat-value {
    font-size: 28px;
    margin-top: 16px;
  }
  .stat-icon {
    width: 28px;
    height: 28px;
    flex: none;
  }
  .stat-icon svg {
    width: 15px;
    height: 15px;
  }
  .stat-footer {
    font-size: 11px;
    line-height: 1.6;
  }
  .hero {
    display: block;
    padding: 24px 20px;
  }
  .hero h2 {
    font-size: 23px;
  }
  .hero p {
    font-size: 13px;
    line-height: 1.6;
  }
  .hero-right {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #ffffff26;
  }
  .hero-metric b {
    font-size: 25px;
  }
  .hero-metric small {
    font-size: 10px;
  }
  .content > .card.panel:first-of-type .insight,
  .insight {
    padding: 16px;
    gap: 10px;
  }
  .insight h4 {
    font-size: 14px;
  }
  .insight p {
    font-size: 14px;
    line-height: 1.7;
  }
  .insight-icon {
    width: 30px;
    height: 30px;
    flex: none;
  }
  .studio-promo {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    padding: 20px;
  }
  .studio-promo .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .studio-promo strong {
    font-size: 16px;
  }
  .studio-promo span {
    font-size: 13px;
  }
  .sector-grid {
    gap: 12px;
  }
  .sector-tile {
    min-height: 130px;
    padding: 16px;
  }
  .tile-top {
    font-size: 13px;
  }
  .tile-bottom small {
    font-size: 12px;
  }
  .tbl {
    font-size: 13px;
  }
  .tbl th {
    font-size: 12px;
  }
  .badge {
    font-size: 11px;
    line-height: 1.5;
  }
  .chart {
    height: 230px;
  }
  .page-grid,
  .studio-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .import-fields,
  .mapping-grid,
  .report-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .mapping-grid {
    max-height: 440px;
  }
  .import-fields label,
  .mapping-grid label,
  .report-controls label,
  .studio-field label {
    font-size: 13px;
  }
  .upload-prompt {
    padding: 24px 16px;
  }
  .upload-prompt .btn {
    width: 100%;
  }
  .dropzone p {
    font-size: 14px;
  }
  .upload-list-heading {
    font-size: 13px;
    padding: 16px 12px;
  }
  .upload-file {
    padding: 16px 12px;
    gap: 10px;
  }
  .upload-file-icon {
    width: 30px;
    height: 36px;
  }
  .upload-file-info strong {
    font-size: 14px;
  }
  .upload-file-info small {
    font-size: 12px;
  }
  .upload-file-actions .btn {
    min-height: 48px;
    font-size: 12px;
  }
  .upload-file-actions {
    gap: 8px;
  }
  .backup-actions {
    display: grid;
    gap: 10px;
  }
  .file-row {
    gap: 12px;
  }
  .file-row .row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .studio-intro {
    padding: 24px 20px;
  }
  .studio-intro h2 {
    font-size: 23px;
  }
  .studio-intro p,
  .studio-hint,
  .studio-save-status {
    font-size: 13px;
  }
  .studio-preview-head {
    flex-wrap: wrap;
  }
  .studio-preview-head .row {
    flex-wrap: wrap;
  }
  .position-dialog {
    width: calc(100% - 24px);
    padding: 16px;
  }
  .position-tools button {
    min-height: 48px;
    min-width: 48px;
  }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -5px 20px #0001;
  }
  .mobile-nav button {
    min-height: 52px;
    border: 0;
    display: grid;
    gap: 4px;
    justify-items: center;
    align-content: center;
    background: transparent;
    color: var(--muted);
    border-radius: 8px;
    padding: 4px;
    font-size: 10px;
    font-weight: 650;
  }
  .mobile-nav button.active {
    background: var(--tint);
    color: var(--ink);
  }
  .assistant-fab {
    bottom: calc(84px + env(safe-area-inset-bottom));
    right: 16px;
    min-height: 48px;
  }
  .assistant-fab .fab-label {
    display: none;
  }
  .assistant-window {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom));
    max-width: calc(100% - 32px);
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .transition-fade,
  .transition-slide,
  .transition-zoom,
  .transition-reveal {
    animation: none;
  }
}
@media print {
  .mobile-nav,
  .theme-toggle,
  .header-brand {
    display: none !important;
  }
}

.insight {
  margin: 10px 0;
}
.nav-scroll {
  scrollbar-color: #737373 #060606;
  scrollbar-width: thin;
}
.nav-scroll::-webkit-scrollbar {
  width: 5px;
}
.nav-scroll::-webkit-scrollbar-track {
  background: #060606;
}
.nav-scroll::-webkit-scrollbar-thumb {
  background: #737373;
  border-radius: 8px;
}
.studio-container
  .studio-panel
  input:not([type="checkbox"]):not([type="color"]),
.studio-container .studio-panel select,
.studio-container .studio-panel textarea {
  background: var(--surface-raised);
  color: var(--ink);
  border-color: var(--line);
  font-size: 13px;
  min-height: 42px;
}
.studio-container .studio-panel label {
  color: var(--muted);
  font-size: 12px;
}
.studio-container .studio-panel .btn {
  color: var(--ink);
  font-size: 12px;
}
.studio-container .studio-panel .btn-primary {
  color: var(--on-action);
}
.studio-container .checkbox-field {
  background: var(--surface-alt);
  color: var(--ink);
  border-color: var(--line);
}
@media (max-width: 700px) {
  .studio-container
    .studio-panel
    input:not([type="checkbox"]):not([type="color"]),
  .studio-container .studio-panel select,
  .studio-container .studio-panel textarea {
    font-size: 16px;
    min-height: 48px;
  }
  .studio-container .studio-panel label,
  .studio-container .studio-panel .btn {
    font-size: 14px;
  }
  .studio-container .studio-panel .btn {
    min-height: 48px;
  }
}

.page-grid {
  align-items: start;
}
.sidebar .sidebar-search {
  display: flex;
  width: 100%;
  margin: 0 0 20px;
  background: #161616;
  color: #d6d6d6;
  border-color: #3c3c3c;
  flex: none;
  min-height: 44px;
}
.sidebar .sidebar-search input {
  color: #fff;
  width: 100%;
  min-width: 0;
  font-size: 13px;
}
.sidebar .sidebar-search input::placeholder {
  color: #b9b9b9;
}
.active-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .sidebar .sidebar-search {
    min-height: 48px;
  }
  .sidebar .sidebar-search input {
    font-size: 16px;
  }
}

/* Identidade Horizon: superfícies neutras, marca transparente e destaques celestes. */
.sidebar-close {
  display: none;
}
.sidebar {
  color: #d6d6d6;
  box-shadow: none;
}
.sidebar .nav {
  border-radius: 10px;
  gap: 12px;
  font-weight: 500;
}
.sidebar .nav.active {
  font-weight: 650;
}
.side-label {
  letter-spacing: 1.5px;
  margin: 22px 14px 10px;
}
.side-bottom {
  padding: 16px 8px 0;
}
.brand-sub {
  font-size: 9px;
  letter-spacing: 1.6px;
}
.topbar .head-actions {
  justify-self: end;
  gap: 8px;
}
.topbar .small-icon-btn,
.topbar .studio-top-button,
.topbar .top-assistant {
  color: #e6e6e6;
  background: #191919;
  border-color: #404040;
  min-height: 44px;
  border-radius: 10px !important;
}
.topbar .small-icon-btn:hover,
.topbar .studio-top-button:hover,
.topbar .top-assistant:hover {
  background: #262626;
  border-color: #79d9ff;
  transform: none;
  box-shadow: none;
}
.head-actions > .badge,
.head-actions > .avatar {
  display: none;
}
.content {
  padding: 32px;
}
.overview-head > div:first-child {
  min-width: 0;
}
.eyebrow {
  color: var(--brand);
  font-size: 10px;
  letter-spacing: 1.8px;
}
.subtitle {
  max-width: 64ch;
  margin-top: 10px;
}
.central-dashboard {
  min-width: 0;
  margin-bottom: 24px;
}
.dashboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  margin-bottom: 24px;
  color: #f5f5f5;
  background: #101010;
  border: 1px solid #353535;
  border-radius: 16px;
}
.dashboard-head > div {
  min-width: 0;
}
.dashboard-eyebrow {
  color: #79d9ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
}
.dashboard-head h2 {
  margin: 8px 0 10px;
  color: #f5f5f5;
  font-size: 28px;
  letter-spacing: -0.8px;
}
.dashboard-head p,
.dashboard-import small {
  color: #bcbcbc;
  font-size: 13px;
  line-height: 1.7;
}
.dashboard-import {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dashboard-import .btn-primary {
  color: #080808;
  background: #79d9ff;
  border-color: #79d9ff;
}
.dashboard-import .btn-primary:hover {
  background: #a7e6ff;
  border-color: #a7e6ff;
}
.dashboard-filters {
  flex: 1 0 100%;
  border-top: 1px solid #353535;
  padding-top: 18px;
}
.dashboard-filters .filter-row {
  justify-content: flex-start;
}
.dashboard-filters .filter-row > label {
  color: #bcbcbc;
}
.dashboard-filters .period,
.dashboard-filters .control {
  color: #f5f5f5;
  background: #1c1c1c;
  border-color: #626262;
  color-scheme: dark;
}
.dashboard-filters .period button {
  color: #bcbcbc;
}
.dashboard-filters .period button.selected {
  color: #f5f5f5;
  background: #363636;
}
.btn {
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 10px !important;
  transition:
    background-color 160ms,
    border-color 160ms;
}
.btn-primary,
.studio-container .studio-panel .btn-primary {
  color: var(--on-action);
}
.btn-primary:hover {
  background: var(--action-hover);
  color: var(--on-action);
}
.control,
.studio-container
  .studio-panel
  input:not([type="checkbox"]):not([type="color"]):not([type="range"]),
.studio-container .studio-panel select,
.studio-container .studio-panel textarea {
  border-color: var(--control-line);
  border-radius: 9px;
}
input,
select {
  accent-color: var(--brand);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.searchbox:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}
.sidebar .sidebar-search:focus-within {
  outline-color: #79d9ff;
}
.operational-insights {
  padding: 24px;
}
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 14px;
}
.operational-insights .insight {
  display: flex;
  min-width: 0;
  margin: 0;
  gap: 12px;
  border-left: 1px solid var(--line);
  border-top: 2px solid var(--brand);
  padding: 18px;
  align-items: flex-start;
  background: var(--surface-alt);
  border-radius: 12px;
}
.insight > div {
  min-width: 0;
}
.insight-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  color: var(--brand);
  background: var(--surface-raised);
  border-radius: 9px;
}
.insight h4 {
  font-size: 13px;
}
.insight p {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.7;
}
.insight-link {
  background: transparent;
  padding: 8px 0;
  border: 0;
  color: var(--brand);
  min-height: 40px;
}
.hero,
.studio-intro {
  background: #101010;
  border-color: #353535;
  border-radius: 16px !important;
  box-shadow: none;
}
.hero-tag {
  color: #79d9ff;
  background: #202020;
  border-color: #3a3a3a;
}
.hero h2,
.studio-intro h2 {
  color: #f5f5f5;
  letter-spacing: -0.8px;
}
.hero p,
.studio-intro p,
.studio-intro .caption-over {
  color: #bcbcbc;
}
.studio-intro:before,
.studio-intro:after {
  display: none;
}
.stat {
  min-height: 156px;
  padding: 22px;
}
.stats > .card.stat {
  border-top-color: var(--line) !important;
}
.stat-label {
  line-height: 1.5;
}
.stat-value {
  margin: 16px 0 10px;
  letter-spacing: -1px;
}
.studio-promo {
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-top: 2px solid var(--brand);
  padding: 24px;
}
.studio-promo-icon {
  color: var(--brand);
  background: var(--surface-alt);
}
.sector-tile:hover,
.library-card:hover {
  border-color: var(--brand) !important;
}
.sector-tile .tile-top,
.sector-tile .tile-bottom small {
  color: var(--muted);
}
.library-card.selected {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 2px var(--brand);
}
.library-thumb {
  background: var(--surface-alt);
  border-radius: 10px;
  overflow: hidden;
}
.studio-empty {
  background: var(--surface-alt);
  color: var(--ink);
  border-color: var(--line);
}
.studio-empty p {
  color: var(--muted);
}
.studio-thumb-screen {
  background: #171717;
  color: #f5f5f5;
}
.studio-thumb.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand);
}
.table-detail {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.tbl td strong,
.donut-center strong,
.donut-legend strong {
  color: var(--ink);
}
.donut-center span,
.donut-legend .line {
  color: var(--muted);
}
.tbl th,
.tbl td {
  padding: 14px 16px;
}
.chart {
  margin-top: 18px;
}
.chart svg text {
  fill: var(--muted);
}
.dropzone {
  border-color: var(--control-line);
  border-radius: 14px;
}
.upload-prompt {
  padding: 32px 24px;
}
.upload-prompt h3 {
  margin-bottom: 8px;
}
.upload-file-actions .btn {
  min-height: 40px;
}
.upload-file-icon {
  border: 1px solid var(--line);
}
.upload-file-info strong {
  font-weight: 600;
}
.notice {
  border-radius: 10px;
}
.flow-list {
  line-height: 1.8;
}
.flow-list li + li {
  margin-top: 12px;
}
#position-dialog {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  border-radius: 16px;
}
#position-dialog p {
  color: var(--muted);
  margin: 12px 0 18px;
}
#position-dialog::backdrop,
.backdrop.open {
  background: #000000a8;
}
.position-tools input {
  color: var(--ink);
  background: var(--surface-raised);
  border-color: var(--control-line);
}
.position-tools button {
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--control-line);
}
.studio-container .studio-panel .studio-hint,
.studio-container .studio-panel .studio-save-status {
  color: var(--muted);
  font-size: 13px;
}
.studio-container .studio-panel input,
.studio-container .studio-panel select,
.studio-container .studio-panel textarea {
  box-shadow: none;
}
.settings-item strong,
.settings-item small,
.field label {
  color: var(--ink);
}
.settings-item small,
.field label {
  color: var(--muted);
}
.progress {
  background: var(--surface-alt);
}
.progress > div {
  background: var(--brand);
}
.assistant-emblem,
.assistant-mini-avatar,
.fab-emblem {
  color: var(--brand);
  background: var(--surface-raised);
  border-color: var(--line);
}
.assistant-emblem img {
  border-radius: 8px;
}
.assistant-form button {
  color: var(--on-action);
  background: var(--action);
}
.assistant-header-actions button {
  color: var(--ink);
}
.assistant-line.user .assistant-bubble {
  color: var(--on-action);
}
.assistant-fab {
  background: #161616;
  border-color: #5a5a5a;
  border-radius: 14px;
}
.assistant-fab:before,
.assistant-fab:after {
  display: none;
}
.assistant-fab:hover {
  background: #242424;
  border-color: #79d9ff;
  transform: none;
  box-shadow: none;
}
.assistant-fab .fab-emblem {
  color: #79d9ff;
  background: #262626;
  border-color: #404040;
}
.development-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.development-credit img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  background: #080808;
  border-radius: 5px;
}
.theme-graphite {
  background: linear-gradient(130deg, #202020, #090909) !important;
  color: #f5f5f5;
}
.clean-tv {
  background: #000 !important;
}
@media (max-width: 1450px) {
  .topbar .studio-top-button {
    width: 44px;
    padding: 0;
    font-size: 0;
  }
  .topbar .studio-top-button svg {
    width: 20px;
    height: 20px;
  }
  .topbar .top-assistant span {
    display: none;
  }
  .topbar .top-assistant {
    min-width: 44px;
    padding: 0;
    justify-content: center;
  }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px 20px;
    gap: 12px;
  }
  .header-brand,
  .header-brand img {
    width: 140px;
  }
  .header-brand img {
    height: 47px;
  }
  .owner-name small {
    font-size: 10px;
  }
  .content {
    padding: 24px;
  }
  .insights-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 700px) {
  .topbar {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    grid-template-rows: auto auto;
    min-height: 132px;
    padding: 12px 16px 16px !important;
    gap: 12px 8px;
    align-items: center;
  }
  .mob-toggle {
    grid-column: 1;
    grid-row: 1;
    width: 48px;
    height: 48px;
  }
  .header-brand {
    grid-column: 2;
    grid-row: 1;
    width: min(180px, 100%);
    min-height: 48px;
    padding: 0;
  }
  .header-brand img {
    width: 100%;
    height: 54px;
  }
  .header-identity {
    grid-column: 2;
    grid-row: 1 / 3;
    display: block;
  }
  .header-identity .app-title {
    font-size: 17px;
    line-height: 1.3;
  }
  .owner-name {
    font-size: 14px;
  }
  .owner-name small {
    font-size: 10px;
    line-height: 1.5;
  }
  .app-caption {
    font-size: 10px;
  }
  .topbar .head-actions {
    display: contents;
  }
  .head-actions .theme-toggle {
    grid-column: 3;
    grid-row: 1;
  }
  .head-actions .studio-top-button {
    grid-column: 3;
    grid-row: 2;
    align-self: center;
  }
  .head-actions .small-icon-btn,
  .head-actions .studio-top-button {
    width: 48px;
    min-width: 48px;
    height: 48px;
  }
  .sidebar .brand {
    margin-top: 20px;
  }
  .sidebar {
    visibility: hidden;
  }
  .sidebar.open {
    visibility: visible;
  }
  .app:has(.sidebar.open) ~ .assistant-fab,
  .app:has(.sidebar.open) ~ .assistant-layer {
    visibility: hidden;
  }
  .sidebar .brand-logo {
    height: 76px;
    max-width: 220px;
  }
  .sidebar-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    width: 44px;
    height: 44px;
    color: #f5f5f5;
    background: #1a1a1a;
    border-color: #454545;
  }
  .content {
    padding: 24px 16px !important;
  }
  .dashboard-head {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 22px;
  }
  .dashboard-head h2 {
    font-size: 24px;
  }
  .dashboard-import {
    align-items: stretch;
  }
  .dashboard-import small {
    text-align: center;
  }
  .dashboard-filters {
    flex: auto;
  }
  .insights-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 16px;
  }
  .operational-insights {
    padding: 20px;
  }
  .operational-insights .insight {
    padding: 16px;
    gap: 10px;
  }
  .insight h4 {
    font-size: 14px;
  }
  .insight p {
    font-size: 13px;
  }
  .insight-link {
    min-height: 48px;
    padding: 8px 0;
  }
  .title {
    font-size: 28px;
  }
  .stat {
    padding: 16px;
    min-height: 158px;
  }
  .stat-value {
    font-size: 28px;
  }
  .hero h2 {
    font-size: 24px;
  }
  .btn,
  .upload-file-actions .btn {
    min-height: 48px;
  }
  .upload-prompt {
    padding: 26px 16px;
  }
  .upload-list-heading {
    align-items: flex-start;
  }
  .mobile-nav {
    background: var(--chrome);
    border-color: #343434;
    padding-top: 10px;
  }
  .mobile-nav button {
    color: #bcbcbc;
    min-height: 54px;
    font-size: 10px;
    font-weight: 500;
    gap: 6px;
  }
  .mobile-nav button.active {
    background: #242424;
    color: #79d9ff;
    font-weight: 650;
  }
  .assistant-header-actions button {
    min-height: 44px;
    min-width: 44px;
  }
  .assistant-quick button,
  .assistant-mode {
    min-height: 44px;
  }
}
@media (max-width: 360px) {
  .stats,
  .sector-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio-mini-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
