/* IACell System — direção aprovada: finanças claras + operação escura. */
:root {
  --iac-motion: cubic-bezier(.2, 0, 0, 1);
  --iac-space: 24px;
}

html[data-theme="light"] {
  --iac-canvas: #eef1ed;
  --iac-side: #ffffff;
  --iac-surface: #ffffff;
  --iac-surface-2: #f6f8f5;
  --iac-line: #e1e7e1;
  --iac-text: #17221b;
  --iac-muted: #708075;
  --iac-accent: #138b59;
  --iac-accent-strong: #087548;
  --iac-accent-ink: #ffffff;
  --iac-positive: #0d8956;
  --iac-negative: #d75262;
}

html[data-theme="dark"] {
  --iac-canvas: #111212;
  --iac-side: #151716;
  --iac-surface: #1c1e1d;
  --iac-surface-2: #242725;
  --iac-line: #303532;
  --iac-text: #f3f5ee;
  --iac-muted: #a9afa7;
  --iac-accent: #b7f653;
  --iac-accent-strong: #d0ff7e;
  --iac-accent-ink: #17200d;
  --iac-positive: #b7f653;
  --iac-negative: #ff7d89;
}

html[data-theme] body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

/* Estrutura de trabalho: silenciosa no fundo, com a informação no centro. */
.workspace-app { grid-template-columns: 228px minmax(0, 1fr) !important; }
.workspace-app .sidebar { padding: 22px 14px !important; gap: 27px !important; }
.workspace-app .brand { font-size: 18px !important; font-weight: 760 !important; letter-spacing: -.7px !important; }
.workspace-app .brand img { width: 39px !important; height: 39px !important; }
.workspace-app .nav { gap: 5px !important; }
.workspace-app .nav button { min-height: 43px; font-size: 13px !important; font-weight: 640 !important; }
.workspace-app .nav button.active { box-shadow: none !important; }
.workspace-app .topbar { min-height: 72px !important; padding: 12px 32px !important; }
.workspace-app .workspace-search { max-width: 400px !important; }
.workspace-app .workspace-search input { height: 40px; padding-left: 14px !important; }
.workspace-app .page { max-width: 1530px !important; padding: 34px 38px 54px !important; }
.workspace-app .heading { margin-bottom: 30px !important; }
.workspace-app h1 { font-size: clamp(28px, 2.2vw, 35px) !important; line-height: 1.05 !important; letter-spacing: -1.45px !important; }
.workspace-app h1 + p, .workspace-app .heading .muted { max-width: 580px; font-size: 14px !important; }

/* Métricas deixam de parecer quatro blocos idênticos. */
.workspace-app .cards { gap: 18px !important; margin: 20px 0 28px !important; }
.workspace-app .card, .workspace-app .accounts .card {
  min-height: 142px;
  padding: 21px !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 26px rgba(19, 35, 25, .035) !important;
}
.workspace-app .card:hover { transform: translateY(-2px) !important; }
.workspace-app .metric-card:after { width: 88px !important; height: 88px !important; inset: auto -20px -34px auto !important; opacity: .72; }
.workspace-app .metric-icon {
  width: 36px !important;
  height: 36px !important;
  margin-bottom: 14px !important;
  border-radius: 11px !important;
}
.workspace-app .metric-label { font-size: 12px !important; font-weight: 590 !important; }
.workspace-app .metric { margin-top: 9px !important; font-size: clamp(23px, 2vw, 29px) !important; font-weight: 760 !important; letter-spacing: -1.15px !important; }
.workspace-app .accounts .card { min-height: 132px; }

/* Gráficos recebem a importância de uma área de decisão. */
.workspace-app .dashboard-charts { gap: 18px !important; margin-top: 30px !important; }
.workspace-app .chart-card {
  min-height: 325px;
  padding: 22px !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 28px rgba(19, 35, 25, .035) !important;
}
.workspace-app .chart-card header h2 { margin-bottom: 4px !important; font-size: 16px !important; letter-spacing: -.45px; }
.workspace-app .chart-card footer { padding-top: 16px !important; }
.workspace-app .cash-chart { min-height: 180px !important; padding: 13px 8px 0 !important; }
.workspace-app .donut { width: 166px !important; height: 166px !important; }
.workspace-app .donut > div { width: 116px !important; height: 116px !important; }
.workspace-app .donut > div b { font-size: 17px !important; letter-spacing: -.6px; }
.workspace-app .donut-legend p { border-radius: 11px; padding: 10px 11px; background: var(--iac-surface-2); }

/* Tabelas e formulários: densos o bastante para operação, ainda legíveis. */
.workspace-app .section { margin-top: 34px !important; padding-top: 27px !important; }
.workspace-app .section-head h2 { font-size: 19px !important; letter-spacing: -.45px; }
.workspace-app .table-wrap { border-radius: 14px !important; overflow: hidden !important; }
.workspace-app th { height: 49px; font-size: 10px !important; }
.workspace-app td, .workspace-app th { padding: 14px 16px !important; }
.workspace-app td { font-size: 13px; }
.workspace-app .tabs { gap: 16px !important; }
.workspace-app .tabs button { padding: 12px 4px !important; font-weight: 680; }
.workspace-app .button, .workspace-dialog .button { min-height: 40px; padding: 10px 15px !important; }
.workspace-app input, .workspace-app select, .workspace-dialog input, .workspace-dialog select { min-height: 42px; }

/* Tema escuro: o painel fica mais arquitetônico, inspirado na referência 2. */
html[data-theme="dark"] .workspace-app .sidebar,
html[data-theme="dark"] .workspace-app .topbar { background: #151716 !important; }
html[data-theme="dark"] .workspace-app .card,
html[data-theme="dark"] .workspace-app .chart-card { border-radius: 12px !important; box-shadow: none !important; }
html[data-theme="dark"] .workspace-app .card:hover,
html[data-theme="dark"] .workspace-app .chart-card:hover { border-color: #4d5947 !important; }
html[data-theme="dark"] .workspace-app .nav button.active { background: var(--iac-accent) !important; }
html[data-theme="dark"] .workspace-app .metric-card:after { background: rgba(183, 246, 83, .075) !important; }
html[data-theme="dark"] .workspace-app .cash-chart { background: repeating-linear-gradient(to bottom, transparent 0, transparent 38px, rgba(255,255,255,.045) 39px) !important; }
html[data-theme="dark"] .workspace-app .donut-legend p { background: #242725; }
html[data-theme="dark"] .workspace-app .table-wrap { background: #1c1e1d !important; }

/* Tema claro: superfície mais arejada, inspirado no painel financeiro. */
html[data-theme="light"] .workspace-app .sidebar { box-shadow: 10px 0 28px rgba(34, 54, 41, .035) !important; }
html[data-theme="light"] .workspace-app .topbar { background: rgba(255,255,255,.88) !important; }
html[data-theme="light"] .workspace-app .nav button.active { box-shadow: 0 9px 18px rgba(19,139,89,.16) !important; }
html[data-theme="light"] .workspace-app .card:first-child .metric-icon { background: #e7f8ee !important; color: #0d8956 !important; }
html[data-theme="light"] .workspace-app .card:nth-child(2) .metric-icon { background: #fcebed !important; color: #ce4d61 !important; }
html[data-theme="light"] .workspace-app .card:nth-child(3) .metric-icon { background: #e8f2ff !important; color: #3976c8 !important; }
html[data-theme="light"] .workspace-app .card:nth-child(4) .metric-icon { background: #fff3df !important; color: #b36b17 !important; }

/* Landing: menos efeitos e mais prova de produto. */
.premium-landing:before { opacity: .58; }
.premium-copy h1 { letter-spacing: -2.1px !important; }
.hero-product { border-radius: 22px !important; box-shadow: 0 24px 58px rgba(21, 41, 29, .1) !important; }
.feature-stage, .product-screen, .price-card, .closing-cta { border-radius: 18px !important; }

@media (max-width: 900px) {
  .workspace-app .page { padding: 26px 20px 46px !important; }
  .workspace-app .dashboard-charts { grid-template-columns: 1fr !important; }
}

@media (max-width: 600px) {
  .workspace-app .page { padding: 22px 15px 40px !important; }
  .workspace-app .topbar { padding: 10px 14px !important; }
  .workspace-app .cards { gap: 11px !important; }
  .workspace-app .card { min-height: 126px; padding: 16px !important; }
  .workspace-app .metric { font-size: 21px !important; }
  .workspace-app .chart-card { min-height: 290px; padding: 17px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-app *, .premium-landing * { transition: none !important; }
}
