/* landing-demo.css — Demo shell styles for the Ponte Contábil landing page.
   Self-contained: the landing no longer loads styles_presentation.css.
   Dark theme is the default; .is-light-theme inverts colors per the demo toggle. */

/* ─── DEMO SHELL ─────────────────────────────────────────────────────────── */
.demo-shell {
  position: relative;
  --shell-tilt-x: 0deg;
  --shell-tilt-y: 0deg;
  width: 100%;
  padding: 18px;
  border-radius: 20px;
  /* Dark default */
  background: #171615;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.4);
  color: #f7f5ee;
  transform:
    perspective(1600px)
    rotateX(var(--shell-tilt-x))
    rotateY(var(--shell-tilt-y));
  transform-origin: center top;
  transition: box-shadow 0.28s ease, border-color 0.28s ease;
  will-change: transform;
}

/* Light theme: demo toggle class added by landing_demo.js */
.demo-shell.is-light-theme {
  background: linear-gradient(180deg, #f7f5ee 0%, #efede3 100%);
  border-color: rgba(17, 17, 17, 0.12);
  box-shadow: 0 24px 54px rgba(17, 17, 17, 0.10);
  color: #111111;
}

/* ─── SHELL FRAME ─────────────────────────────────────────────────────────── */
.demo-shell-frame {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .demo-shell-frame { grid-template-columns: 1fr; }
}

/* ─── SIDEBAR ─────────────────────────────────────────────────────────────── */
.demo-sidebar-mini {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 10px;
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.92);
  border: 1px solid rgba(250, 211, 43, 0.22);
}

/* The sidebar is part of the interactive demo, so it must follow its theme
   rather than retaining the dark shell when the demo is switched to light. */
.demo-shell.is-light-theme .demo-sidebar-mini {
  background: #ffffff;
  border-color: rgba(17, 17, 17, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.demo-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 4px;
}
.demo-shell.is-light-theme .demo-sidebar-brand { border-bottom-color: rgba(17,17,17,.10); }
.demo-sidebar-brand img {
  width: 28px; height: auto;
  flex-shrink: 0;
}
.demo-sidebar-brand span {
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  color: #fad32b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-shell.is-light-theme .demo-sidebar-brand span { color: #1c1b18; }

.demo-sidebar-kicker {
  margin: 8px 0 4px 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.66rem; font-weight: 700;
  color: #77736c;
  font-family: 'Sora', sans-serif;
}
.demo-shell.is-light-theme .demo-sidebar-kicker { color: #6b6b67; }

.demo-sidebar-nav {
  display: flex; flex-direction: column; gap: 3px;
}

/* Module menu items — icon + label style */
.demo-module-menu .demo-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #aaa69e;
  font: 600 0.82rem 'Inter', 'Segoe UI', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.demo-module-menu .demo-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e2ddd1;
}
.demo-shell.is-light-theme .demo-module-menu .demo-sidebar-item {
  color: #4d4d49;
}
.demo-shell.is-light-theme .demo-module-menu .demo-sidebar-item:hover {
  background: rgba(17,17,17,.05);
  color: #171715;
}
.demo-module-menu .demo-sidebar-item.is-active {
  background: rgba(250, 211, 43, 0.12);
  color: #fad32b;
  border-color: rgba(250, 211, 43, 0.18);
}
.demo-shell.is-light-theme .demo-module-menu .demo-sidebar-item.is-active {
  background: rgba(250,211,43,.22);
  border-color: rgba(190,150,0,.35);
  color: #5a4600;
}
.demo-module-menu .demo-sidebar-item:focus-visible {
  outline: 2px solid #fad32b;
  outline-offset: 2px;
}

.demo-sidebar-icon {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #918d85;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.demo-shell.is-light-theme .demo-sidebar-icon {
  background: rgba(17,17,17,.07);
  color: #595955;
}
.demo-module-menu .demo-sidebar-item.is-active .demo-sidebar-icon {
  background: rgba(250, 211, 43, 0.22);
  color: #fad32b;
}
.demo-shell.is-light-theme .demo-module-menu .demo-sidebar-item.is-active .demo-sidebar-icon {
  background: #fad32b;
  color: #3b3000;
}
.demo-sidebar-icon .lp-icon {
  width: 0.9rem; height: 0.9rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── WORKSPACE ───────────────────────────────────────────────────────────── */
.demo-workspace { min-width: 0; }

.demo-shell-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.demo-shell-header h3 {
  margin: 2px 0 0;
  font-size: 1.35rem;
  font-family: 'Sora', sans-serif;
  color: #f7f5ee;
}
.demo-shell.is-light-theme .demo-shell-header h3 { color: #111111; }

.demo-shell-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 0.74rem;
  color: #d4a700;
}

/* ─── TOPBAR PILLS ────────────────────────────────────────────────────────── */
.demo-topbar-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.demo-company-pill,
.demo-shell-badge,
.demo-toolbar-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.8rem;
}
.demo-company-pill {
  padding: 8px 12px;
  background: #201f1d;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #e2ddd1;
}
.demo-shell.is-light-theme .demo-company-pill {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(17, 17, 17, 0.14);
  color: #111111;
}

.demo-shell-badge {
  padding: 8px 12px;
  background: rgba(250, 211, 43, 0.14);
  border: 1px solid rgba(250, 211, 43, 0.20);
  color: #f7e98b;
}
.demo-shell.is-light-theme .demo-shell-badge { color: #111111; }

/* ─── DEMO THEME TOGGLE ───────────────────────────────────────────────────── */
.demo-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: #1c1b1a;
  color: #d7d2c7;
  font: 600 0.7rem 'Inter', 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.demo-theme-toggle:hover { background: #2a2826; }
.demo-theme-toggle:focus-visible { outline: 2px solid #fad32b; outline-offset: 2px; }

.demo-shell.is-light-theme .demo-theme-toggle {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(17, 17, 17, 0.14);
  color: #111111;
}

.demo-theme-track {
  display: inline-flex; align-items: center;
  width: 28px; height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 2px;
  transition: background 0.2s;
}
.demo-theme-track span {
  display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #888;
  transition: transform 0.2s, background 0.2s;
}
.demo-shell.is-light-theme .demo-theme-track { background: #fad32b; border-color: #d4a700; }
.demo-shell.is-light-theme .demo-theme-track span { transform: translateX(12px); background: #111; }

.demo-theme-icon { font-size: 0.82rem; line-height: 1; }
.demo-theme-label { white-space: nowrap; }
@media (max-width: 900px) { .demo-theme-label { display: none; } }

/* ─── TOOLBAR ─────────────────────────────────────────────────────────────── */
.demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #1c1b1a;
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.demo-shell.is-light-theme .demo-toolbar {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(17, 17, 17, 0.10);
}

.demo-toolbar-chip {
  padding: 7px 11px;
  background: #201f1d;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #e2ddd1;
}
.demo-shell.is-light-theme .demo-toolbar-chip {
  background: rgba(17, 17, 17, 0.05);
  border-color: rgba(17, 17, 17, 0.10);
  color: #111111;
}

.demo-toolbar-cta {
  margin-left: auto;
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f4c21d 0%, #d4a700 100%);
  color: #111111;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(212, 167, 0, 0.18);
}
.demo-toolbar-cta:disabled { opacity: 1; cursor: default; }

/* ─── STATS ───────────────────────────────────────────────────────────────── */
.demo-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .demo-stats { grid-template-columns: 1fr; gap: 8px; }
}

.demo-stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #1c1b1a;
  box-shadow: none;
}
.demo-shell.is-light-theme .demo-stat-card {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(17, 17, 17, 0.12);
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.05);
}

.demo-stat-copy { min-width: 0; }
.demo-stat-copy span {
  display: block;
  margin-bottom: 6px;
  color: #aaa69e;
  font-size: 0.84rem;
}
.demo-stat-copy strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
  color: #f7f5ee;
}
.demo-stat-copy small {
  display: inline-block;
  margin-top: 6px;
  color: #aaa69e;
  font-size: 0.79rem;
}
.demo-shell.is-light-theme .demo-stat-copy span,
.demo-shell.is-light-theme .demo-stat-copy small { color: #6b6b6b; }
.demo-shell.is-light-theme .demo-stat-copy strong { color: #111111; }

.demo-stat-icon {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}
.demo-stat-icon svg { width: 22px; height: 22px; display: block; }

.demo-stat-card.is-entry .demo-stat-icon { background: rgba(250, 211, 43, 0.16); color: #fad32b; }
.demo-stat-card.is-exit   .demo-stat-icon { background: rgba(255, 255, 255, 0.08); color: #aaa69e; }
.demo-stat-card.is-balance .demo-stat-icon { background: rgba(255, 255, 255, 0.08); color: #aaa69e; }
.demo-shell.is-light-theme .demo-stat-card.is-entry .demo-stat-icon { color: #111111; }
.demo-shell.is-light-theme .demo-stat-card.is-exit  .demo-stat-icon { color: #111111; }
.demo-shell.is-light-theme .demo-stat-card.is-balance .demo-stat-icon { color: #111111; }
.demo-shell.is-light-theme .demo-stat-card.is-exit .demo-stat-icon,
.demo-shell.is-light-theme .demo-stat-card.is-balance .demo-stat-icon { background: rgba(17,17,17,.07); }

/* ─── DEMO BODY ───────────────────────────────────────────────────────────── */
.demo-body {
  display: grid;
  grid-template-columns: minmax(340px, 390px) minmax(0, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .demo-body { grid-template-columns: 1fr; }
}

/* ─── PANELS ──────────────────────────────────────────────────────────────── */
.demo-form-panel,
.demo-table-panel {
  background: #1c1b1a;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 18px;
  box-shadow: none;
  color: #f7f5ee;
}
.demo-shell.is-light-theme .demo-form-panel,
.demo-shell.is-light-theme .demo-table-panel {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(17, 17, 17, 0.12);
  color: #111111;
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.05);
}

.demo-panel-heading,
.demo-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.demo-panel-kicker {
  margin: 0 0 4px;
  color: #aaa69e;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.demo-shell.is-light-theme .demo-panel-kicker { color: #6b6b6b; }

.demo-form-panel h4,
.demo-table-panel h4 {
  margin: 0;
  font-size: 1rem;
  color: #f7f5ee;
}
.demo-shell.is-light-theme .demo-form-panel h4,
.demo-shell.is-light-theme .demo-table-panel h4 { color: #111111; }

/* ─── FORM ────────────────────────────────────────────────────────────────── */
.demo-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.demo-form label {
  display: grid;
  gap: 6px;
  color: #f7f5ee;
  font-size: 0.86rem;
}
.demo-shell.is-light-theme .demo-form label { color: #111111; }

.demo-form input,
.demo-form select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #201e1e;
  color: #f7f5ee;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}
.demo-shell.is-light-theme .demo-form input,
.demo-shell.is-light-theme .demo-form select {
  background: rgba(255, 255, 255, 0.96);
  color: #111111;
  border-color: rgba(17, 17, 17, 0.14);
}

.demo-form input::placeholder { color: #77736c; }
.demo-shell.is-light-theme .demo-form input::placeholder { color: #6b6b6b; }

.demo-form-wide { grid-column: 1 / -1; }

.demo-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.demo-form-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Primary button — new class name used in the new template */
.demo-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  border: 0;
  background: linear-gradient(135deg, #fad32b 0%, #d4a700 100%);
  color: #111111;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(212, 167, 0, 0.18);
  transition: background 0.15s, box-shadow 0.15s, transform 0.14s;
}
.demo-primary-button:hover {
  background: linear-gradient(135deg, #ffe36b 0%, #fad32b 100%);
  box-shadow: 0 14px 28px rgba(212, 167, 0, 0.28);
}
.demo-primary-button:active { transform: scale(0.97); }
.demo-primary-button:focus-visible { outline: 2px solid #111; outline-offset: 2px; }

.demo-cancel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #201e1e;
  color: #f7f5ee;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.demo-cancel-button:hover { background: rgba(250, 211, 43, 0.10); }
.demo-shell.is-light-theme .demo-cancel-button {
  background: #ffffff;
  border-color: rgba(17, 17, 17, 0.14);
  color: #111111;
}

.demo-feedback {
  color: #d4a700;
  font-size: 0.86rem;
}

.demo-count {
  color: #aaa69e;
  font-size: 0.82rem;
}
.demo-shell.is-light-theme .demo-count { color: #6b6b6b; }

/* ─── TABLE ───────────────────────────────────────────────────────────────── */
.demo-table-columns {
  display: grid;
  grid-template-columns: 92px 96px minmax(0, 1fr) 148px 108px;
  gap: 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #aaa69e;
  font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.demo-shell.is-light-theme .demo-table-columns {
  border-color: rgba(17, 17, 17, 0.12);
  color: #6b6b6b;
}

.demo-transaction-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}
.demo-transaction-list::-webkit-scrollbar { width: 6px; }
.demo-transaction-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 999px; }
.demo-shell.is-light-theme .demo-transaction-list::-webkit-scrollbar-thumb { background: rgba(17,17,17,.15); }

.demo-transaction-row {
  display: grid;
  grid-template-columns: 92px 96px minmax(0, 1fr) 148px 108px;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.demo-shell.is-light-theme .demo-transaction-row { border-color: rgba(17,17,17,.08); }

@media (max-width: 900px) {
  .demo-transaction-row,
  .demo-table-columns {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .demo-table-columns { display: none; }
}

.demo-row-col { min-width: 0; }
.demo-row-date { color: #f7f5ee; font-size: 0.88rem; }
.demo-shell.is-light-theme .demo-row-date { color: #111111; }

.demo-row-actions {
  display: flex;
  justify-content: flex-end;
}

.demo-transaction-main { flex: 1 1 auto; min-width: 0; }

.demo-transaction-side { text-align: right; }
.demo-transaction-side.is-editing .demo-transaction-value {
  text-decoration: underline;
  text-decoration-color: rgba(250, 211, 43, 0.7);
  text-underline-offset: 5px;
}

.demo-transaction-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
}

.demo-row-button {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #201e1e;
  color: #f7f5ee;
  cursor: pointer;
  transition: background 0.15s;
}
.demo-row-button > span[aria-hidden="true"] { display: inline-flex; align-items: center; justify-content: center; }
.demo-row-button svg { width: 15px; height: 15px; display: block; }
.demo-row-button:hover { background: rgba(250, 211, 43, 0.12); }
.demo-row-button.is-danger { color: #f7f5ee; }
.demo-row-button.is-danger:hover { background: rgba(255, 255, 255, 0.07); }

.demo-shell.is-light-theme .demo-row-button {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(17,17,17,.14);
  color: #111111;
}
.demo-shell.is-light-theme .demo-row-button:hover { background: rgba(250, 211, 43, 0.12); }
.demo-shell.is-light-theme .demo-row-button.is-danger:hover { background: rgba(17,17,17,.06); }

.demo-transaction-title {
  display: block;
  color: #f7f5ee;
  font-size: 0.96rem;
}
.demo-shell.is-light-theme .demo-transaction-title { color: #111111; }

.demo-transaction-detail {
  margin: 0 0 8px;
  color: #aaa69e;
  font-size: 0.88rem; line-height: 1.45;
}
.demo-shell.is-light-theme .demo-transaction-detail { color: #6b6b6b; }

.demo-transaction-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #aaa69e;
  font-size: 0.76rem;
}
.demo-shell.is-light-theme .demo-transaction-meta { color: #6b6b6b; }

.demo-transaction-type {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
}

.demo-transaction-type.is-entry,
.demo-transaction-value.is-entry { color: #f7f5ee; }
.demo-transaction-type.is-entry { background: rgba(250, 211, 43, 0.14); }

.demo-transaction-type.is-exit,
.demo-transaction-value.is-exit { color: #f7f5ee; }
.demo-transaction-type.is-exit  { background: rgba(255, 255, 255, 0.08); }

.demo-shell.is-light-theme .demo-transaction-type.is-entry,
.demo-shell.is-light-theme .demo-transaction-value.is-entry { color: #111111; }
.demo-shell.is-light-theme .demo-transaction-type.is-exit,
.demo-shell.is-light-theme .demo-transaction-value.is-exit  { color: #111111; }

.demo-transaction-value {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.96rem;
  white-space: nowrap;
}

/* ─── MODULE PREVIEW ──────────────────────────────────────────────────────── */
.demo-module-preview[hidden],
.demo-cash-view[hidden] { display: none; }

.demo-module-preview {
  animation: demo-module-enter 0.28s ease both;
}
@media (prefers-reduced-motion: reduce) {
  .demo-module-preview { animation: none; }
}
@keyframes demo-module-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.demo-module-table {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: #1c1b1a;
  overflow: auto;
}
.demo-module-table::-webkit-scrollbar { width: 7px; height: 7px; }
.demo-module-table::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 999px; }

.demo-shell.is-light-theme .demo-module-table {
  background: rgba(255,255,255,.90);
  border-color: rgba(17,17,17,.12);
}
.demo-shell.is-light-theme .demo-module-table::-webkit-scrollbar-thumb { background: rgba(17,17,17,.15); }

.demo-module-table h4 { color: #f7f5ee; margin: 0 0 12px; font-size: 1rem; }
.demo-shell.is-light-theme .demo-module-table h4 { color: #111111; }

/* Module rows */
.demo-module-rows { display: grid; gap: 8px; }
.demo-module-rows article {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(100px, .9fr) minmax(110px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #aaa69e;
  font-size: 0.78rem;
}
.demo-module-rows article:last-child { border-bottom: 0; }
.demo-module-rows strong { color: #f7f5ee; font-size: 0.84rem; }
.demo-module-rows b { color: #fad32b; font-size: 0.73rem; font-weight: 700; }

.demo-shell.is-light-theme .demo-module-rows article { border-color: #d8e0e5; color: #6b6b6b; }
.demo-shell.is-light-theme .demo-module-rows strong { color: #111111; }

/* Status colours */
.demo-module-status.is-active    { color: #86efac; }
.demo-module-status.is-attention { color: #fca5a5; }
.demo-module-status.is-authorized { color: #86efac; font-weight: 700; }
.demo-module-status.is-processing { color: #fde68a; font-weight: 700; }
.demo-module-status.is-canceled   { color: #fca5a5; font-weight: 700; }

.demo-shell.is-light-theme .demo-module-status.is-active     { color: #15803d; }
.demo-shell.is-light-theme .demo-module-status.is-attention  { color: #dc2626; }
.demo-shell.is-light-theme .demo-module-status.is-authorized { color: #15803d; }
.demo-shell.is-light-theme .demo-module-status.is-processing { color: #a16207; }
.demo-shell.is-light-theme .demo-module-status.is-canceled   { color: #dc2626; }

.demo-module-preview[data-module="estoque"] .demo-panel-kicker,
.demo-module-preview[data-module="estoque"] .demo-module-table h4 { color: #fad32b; }

.demo-module-preview:is([data-module="cheques"],[data-module="financeiro"]) .demo-module-rows b { color: #aaa69e; }
.demo-module-preview:is([data-module="cheques"],[data-module="financeiro"]) .demo-module-rows b.is-active    { color: #86efac; }
.demo-module-preview:is([data-module="cheques"],[data-module="financeiro"]) .demo-module-rows b.is-attention { color: #fca5a5; }

.demo-shell.is-light-theme .demo-module-preview:is([data-module="cheques"],[data-module="financeiro"]) .demo-module-rows b.is-active    { color: #15803d; }
.demo-shell.is-light-theme .demo-module-preview:is([data-module="cheques"],[data-module="financeiro"]) .demo-module-rows b.is-attention { color: #dc2626; }

/* Module table panel kicker/h4 in dark mode */
.demo-shell:not(.is-light-theme) .demo-module-table .demo-panel-kicker,
.demo-shell:not(.is-light-theme) .demo-module-table h4 { color: #d0cbc0; }

/* ─── DIALOGS ─────────────────────────────────────────────────────────────── */
.demo-module-dialog {
  position: absolute; inset: 0; z-index: 20;
  display: none;
  width: auto; height: auto; max-width: none;
  margin: 0; padding: 20px;
  border: 0; border-radius: 22px;
  background: rgba(8, 7, 6, 0.74);
  color: inherit;
  align-items: center;
  justify-content: center;
}
.demo-module-dialog[open] { display: flex; }
.demo-module-dialog[open] { animation: demo-dialog-in 0.2s ease both; }
@keyframes demo-dialog-in { from { opacity: 0; transform: scale(0.97); } }
@media (prefers-reduced-motion: reduce) { .demo-module-dialog[open] { animation: none; } }

.demo-module-dialog form {
  display: flex; flex-direction: column;
  width: min(420px, 100%);
  max-height: calc(100% - 8px);
  overflow: auto;
  background: #262423;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.45);
}

.demo-module-dialog header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 0;
}
.demo-module-dialog header div { display: flex; flex-direction: column; gap: 2px; }
.demo-module-dialog header p { margin: 0; font-size: 0.75rem; color: #aaa69e; }
.demo-module-dialog header h3 { margin: 0; font-size: 1.1rem; color: #f7f5ee; }
.demo-module-dialog header button {
  display: grid; place-items: center;
  width: 1.8rem; height: 1.8rem;
  border-radius: 50%;
  border: 0;
  font: 700 1.2rem/1 inherit;
  color: #aaa69e;
  background: rgba(255,255,255,.07);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.demo-module-dialog header button:hover { background: rgba(255,255,255,.12); color: #f7f5ee; }

.demo-dialog-fields { padding: 16px 20px; }

.demo-module-dialog footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* record dialog variant */
.demo-record-dialog form {
  background: #262423;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  display: flex; flex-direction: column;
  padding: 20px;
  gap: 12px;
  width: min(380px, 100%);
}
.demo-record-dialog footer { border-top: 0; padding: 0; }

.demo-record-message { font-size: 0.88rem; color: #aaa69e; margin: 0; }

.demo-record-field {
  display: grid; gap: 6px;
  color: #f7f5ee; font-size: 0.86rem;
}

/* ─── SHELL DEMO DIALOG — covers desktop frame (as used in the landing demo) */
/* The demo-module-dialog is absolutely positioned inside .demo-shell-frame */
.demo-shell-frame { position: relative; }

/* ─── DEMO-SHELL-WIDE ─────────────────────────────────────────────────────── */
.demo-shell-wide {
  width: 100%;
  padding: 24px;
}
.demo-shell-wide .demo-shell-frame {
  grid-template-columns: 220px minmax(0, 1fr);
}
.demo-shell-wide .demo-body {
  grid-template-columns: minmax(340px, 390px) minmax(0, 1fr);
}
.demo-shell-wide .demo-table-columns,
.demo-shell-wide .demo-transaction-row {
  grid-template-columns: 92px 96px minmax(280px, 1fr) 148px 108px;
}
.demo-shell-wide .demo-transaction-list { max-height: 520px; }

@media (max-width: 900px) {
  .demo-shell-wide .demo-shell-frame,
  .demo-shell-wide .demo-body { grid-template-columns: 1fr; }
  .demo-shell-wide .demo-table-columns,
  .demo-shell-wide .demo-transaction-row { grid-template-columns: 1fr auto; gap: 8px; }
}

/* ─── RECORD ACTIONS (inline edit/delete in module rows) ──────────────────── */
.demo-record-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.demo-record-actions button {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: #201e1e;
  color: #f7f5ee;
  cursor: pointer;
  font-size: .85rem;
  transition: background .15s;
}
.demo-record-actions button:hover { background: rgba(250,211,43,.12); }
.demo-record-actions button.is-danger:hover { background: rgba(255,255,255,.07); }
.demo-record-actions button svg { width: 14px; height: 14px; display: block; }

.demo-shell.is-light-theme .demo-record-actions button {
  background: rgba(255,255,255,.92);
  border-color: rgba(17,17,17,.14);
  color: #111111;
}
.demo-shell.is-light-theme .demo-record-actions button:hover { background: rgba(250,211,43,.12); }

/* Row type column */
.demo-row-type { min-width: 0; }

/* ─── STOCK MODULE ────────────────────────────────────────────────────────── */
.demo-stock-toolbar { align-items: center; }
.demo-stock-category-field {
  display: flex; align-items: center; gap: 8px;
  color: #aaa69e; font-size: .72rem;
}
.demo-stock-category-field select {
  min-height: 34px;
  padding: 7px 28px 7px 9px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: #201e1e;
  color: #f7f5ee;
  font: inherit;
}
.demo-shell.is-light-theme .demo-stock-category-field { color: #6b6b6b; }
.demo-shell.is-light-theme .demo-stock-category-field select {
  background: #fff; border-color: rgba(17,17,17,.14); color: #111;
}

.demo-stock-columns {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) 1.1fr .7fr .85fr 1.1fr .65fr auto;
  gap: 12px;
  padding: 11px 0 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #aaa69e; font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.demo-stock-rows { display: grid; gap: 6px; }
.demo-stock-row {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) 1.1fr .7fr .85fr 1.1fr .65fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #d8d4cb; font-size: .78rem;
}
.demo-stock-row:last-child { border-bottom: 0; }
.demo-stock-row strong { display: block; color: #f7f5ee; font-size: .8rem; }
.demo-stock-row small { display: block; margin-top: 4px; color: #aaa69e; font-size: .68rem; }

@media (max-width: 900px) {
  .demo-stock-columns { display: none; }
  .demo-stock-row { grid-template-columns: 1fr auto; }
}

/* ─── FISCAL MODULE ───────────────────────────────────────────────────────── */
.demo-fiscal-table { padding: 0; overflow-x: auto; }
.demo-fiscal-columns,
.demo-fiscal-rows article {
  display: grid;
  grid-template-columns: 1fr .7fr 1.4fr .8fr .8fr auto;
  gap: 14px;
  align-items: center;
}
.demo-fiscal-columns {
  padding: 13px 16px;
  background: rgba(250,211,43,.12);
  border-bottom: 1px solid rgba(255,255,255,.09);
  color: #f7f5ee; font-size: .7rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
}
.demo-fiscal-rows article {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #d8d4cb; font-size: .78rem;
}
.demo-fiscal-rows article:last-child { border-bottom: 0; }
.demo-fiscal-rows strong { color: #f7f5ee; font-size: .8rem; }
.demo-fiscal-rows small { display: block; margin-top: 5px; color: #aaa69e; font-size: .68rem; }

.demo-fiscal-type,
.demo-fiscal-status {
  display: inline-flex; width: fit-content; align-items: center;
  justify-content: center; min-height: 28px; padding: 0 11px;
  border-radius: 999px; font-size: .7rem; font-weight: 800;
}
.demo-fiscal-type {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: #e2ddd1;
}
.demo-fiscal-status.is-authorized { background: rgba(34,197,94,.2);  color: #86efac; }
.demo-fiscal-status.is-processing { background: rgba(250,211,43,.16); color: #fde68a; }
.demo-fiscal-status.is-canceled   { background: rgba(239,68,68,.2);   color: #fca5a5; }

.demo-shell.is-light-theme .demo-fiscal-columns {
  background: #fff8dd; border-color: #e1bb18; color: #202a33;
}
.demo-shell.is-light-theme .demo-fiscal-rows article { border-color: #e0e5e8; color: #4a5561; }
.demo-shell.is-light-theme .demo-fiscal-rows strong { color: #202a33; }
.demo-shell.is-light-theme .demo-fiscal-rows small  { color: #64707c; }
.demo-shell.is-light-theme .demo-fiscal-status.is-authorized { color: #15803d; background: rgba(21,128,61,.12); }
.demo-shell.is-light-theme .demo-fiscal-status.is-processing { color: #a16207; background: rgba(161,98,7,.10); }
.demo-shell.is-light-theme .demo-fiscal-status.is-canceled   { color: #dc2626; background: rgba(220,38,38,.10); }

/* ─── CHEQUES MODULE ──────────────────────────────────────────────────────── */
.demo-cheques-table { padding: 0; overflow-x: auto; }
.demo-cheques-columns,
.demo-cheques-rows article {
  width: 100%;
  min-width: 800px;
  display: grid;
  grid-template-columns: 90px minmax(140px, 1.35fr) minmax(115px, 1fr) minmax(100px, .9fr) minmax(100px, .9fr) minmax(92px, .8fr) 70px;
  gap: 10px;
  align-items: center;
}
.demo-cheques-columns {
  padding: 12px 16px;
  background: rgba(250,211,43,.12);
  border-bottom: 1px solid rgba(255,255,255,.09);
  color: #f7f5ee; font-size: .66rem; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
}
.demo-cheques-rows article {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #d8d4cb; font-size: .78rem;
}
.demo-cheques-rows article:last-child { border-bottom: 0; }
.demo-cheques-columns > *,
.demo-cheques-rows article > * { min-width: 0; }
.demo-cheques-rows article strong { display: block; color: #f7f5ee; font-size: .76rem; line-height: 1.35; overflow-wrap: anywhere; }
.demo-cheques-rows article small { display: block; margin-top: 4px; color: #aaa69e; font-size: .66rem; line-height: 1.3; }
.demo-cheque-number { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-family: monospace; font-size: .75rem; color: #aaa69e; }
.demo-cheque-number > strong { color: #fad32b; }
.demo-cheque-bank { display: flex; min-width: 0; align-items: center; gap: 7px; }
.demo-cheque-bank > strong { line-height: 1.2; }

.demo-cheque-bank-logo-wrap {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: 0 0 34px;
  overflow: visible;
}
.demo-cheque-bank-logo {
  width: 34px;
  height: 34px;
  padding: 3px;
  object-fit: contain;
  border-radius: 7px;
  flex-shrink: 0;
  transform-origin: center;
}
.demo-cheque-bank-logo-bancodobrasil { transform: scale(3.6); }
.demo-cheque-bank-logo-bradesco { transform: scale(2.45); }
.demo-cheque-bank-logo-caixa { transform: scale(1); }
.demo-cheque-bank-logo-cresol { transform: scale(.9); }
.demo-cheque-bank-logo-sicredi { transform: scale(2.8); }
.demo-cheque-bank-logo-sicoob { transform: scale(3.2); }
.demo-cheque-value  { font-weight: 700; color: #f7f5ee; }
.demo-cheque-type,
.demo-cheque-status {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: .7rem; font-weight: 700;
}
.demo-cheque-type   { background: rgba(255,255,255,.07); color: #d8d4cb; }
.demo-cheque-status { background: rgba(250,211,43,.14);  color: #fde68a; }

/* ─── FINANCE MODULE ──────────────────────────────────────────────────────── */
.demo-finance-table { padding: 0; overflow-x: auto; }
.demo-finance-columns,
.demo-finance-rows article {
  width: 100%;
  min-width: 740px;
  display: grid;
  grid-template-columns: 72px minmax(125px, 1.35fr) minmax(120px, 1.3fr) minmax(88px, .9fr) minmax(90px, .9fr) minmax(82px, .8fr) 70px;
  gap: 10px;
  align-items: center;
}
.demo-finance-columns {
  padding: 12px 16px;
  background: rgba(250,211,43,.12);
  border-bottom: 1px solid rgba(255,255,255,.09);
  color: #f7f5ee; font-size: .66rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
}
.demo-finance-rows article {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #d8d4cb; font-size: .78rem;
}
.demo-finance-rows article:last-child { border-bottom: 0; }
.demo-finance-columns > *,
.demo-finance-rows article > * { min-width: 0; }
.demo-finance-rows strong { display: block; color: #f7f5ee; font-size: .76rem; line-height: 1.35; overflow-wrap: anywhere; }
.demo-finance-rows small { display: block; margin-top: 4px; color: #aaa69e; font-size: .66rem; line-height: 1.3; overflow-wrap: anywhere; }

.demo-finance-type,
.demo-finance-status {
  display: inline-flex; align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 4px 8px; border-radius: 999px;
  font-size: .66rem; font-weight: 700;
  line-height: 1.2; text-align: center;
}
.demo-finance-type   { background: rgba(255,255,255,.07); color: #d8d4cb; }
.demo-finance-status { background: rgba(250,211,43,.14);  color: #fde68a; }
.demo-finance-status.is-active    { background: rgba(34,197,94,.18);  color: #86efac; }
.demo-finance-status.is-attention { background: rgba(239,68,68,.18);   color: #fca5a5; }
.demo-finance-status.is-overdue { background: rgba(239,68,68,.2); color: #fca5a5; }
.demo-finance-status.is-open { background: rgba(34,197,94,.18); color: #86efac; }

/* ─── ASSOCIATES MODULE ───────────────────────────────────────────────────── */
.demo-associates-table { padding: 0; overflow-x: auto; }
.demo-associates-columns,
.demo-associates-rows article {
  display: grid;
  grid-template-columns: 1fr 1.8fr 1fr .8fr 1fr 1.1fr auto;
  gap: 12px;
  align-items: center;
}
.demo-associates-columns {
  padding: 13px 16px;
  background: rgba(250,211,43,.12);
  border-bottom: 1px solid rgba(255,255,255,.09);
  color: #f7f5ee; font-size: .7rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
}
.demo-associates-rows article {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #d8d4cb; font-size: .78rem;
}
.demo-associates-rows article:last-child { border-bottom: 0; }
.demo-associates-rows strong { display: block; color: #f7f5ee; font-size: .8rem; }
.demo-associates-rows small  { display: block; margin-top: 4px; color: #aaa69e; font-size: .68rem; }

/* Complete light theme for module tables and their overlays.  The module
   previews are rendered dynamically, so each table family needs explicit
   colours instead of inheriting the dark default palette. */
.demo-shell.is-light-theme .demo-stock-columns,
.demo-shell.is-light-theme .demo-cheques-columns,
.demo-shell.is-light-theme .demo-finance-columns,
.demo-shell.is-light-theme .demo-associates-columns {
  background: #fff8dd;
  border-color: #e7c64e;
  color: #5d4a00;
}

.demo-shell.is-light-theme .demo-stock-row,
.demo-shell.is-light-theme .demo-cheques-rows article,
.demo-shell.is-light-theme .demo-finance-rows article,
.demo-shell.is-light-theme .demo-associates-rows article {
  border-color: #e2e0d8;
  color: #4e4e49;
}

.demo-shell.is-light-theme .demo-stock-row strong,
.demo-shell.is-light-theme .demo-cheques-rows strong,
.demo-shell.is-light-theme .demo-finance-rows strong,
.demo-shell.is-light-theme .demo-associates-rows strong {
  color: #20201d;
}

.demo-shell.is-light-theme .demo-stock-row small,
.demo-shell.is-light-theme .demo-cheques-rows small,
.demo-shell.is-light-theme .demo-finance-rows small,
.demo-shell.is-light-theme .demo-associates-rows small,
.demo-shell.is-light-theme .demo-cheque-number {
  color: #686861;
}

.demo-shell.is-light-theme .demo-cheque-value { color: #20201d; }
.demo-shell.is-light-theme .demo-cheque-type,
.demo-shell.is-light-theme .demo-finance-type {
  background: #f0efeb;
  color: #4e4e49;
}
.demo-shell.is-light-theme .demo-cheque-status,
.demo-shell.is-light-theme .demo-finance-status {
  background: #fff4c8;
  color: #856300;
}
.demo-shell.is-light-theme .demo-finance-status.is-active {
  background: #e7f5eb;
  color: #15803d;
}
.demo-shell.is-light-theme .demo-finance-status.is-attention {
  background: #fde8e8;
  color: #dc2626;
}
.demo-shell.is-light-theme .demo-finance-status.is-overdue {
  background: #fde8e8;
  color: #dc2626;
}
.demo-shell.is-light-theme .demo-finance-status.is-open {
  background: #e7f5eb;
  color: #15803d;
}
.demo-shell.is-light-theme .demo-cheque-bank-logo {
  background: #ffffff;
  border: 1px solid #e2e0d8;
}

.demo-shell.is-light-theme .demo-module-dialog {
  background: rgba(25, 24, 20, 0.54);
}
.demo-shell.is-light-theme .demo-module-dialog form,
.demo-shell.is-light-theme .demo-record-dialog form {
  background: #ffffff;
  border-color: #dedbd1;
  box-shadow: 0 28px 60px rgba(17, 17, 17, 0.22);
}
.demo-shell.is-light-theme .demo-module-dialog header p,
.demo-shell.is-light-theme .demo-record-message { color: #686861; }
.demo-shell.is-light-theme .demo-module-dialog header h3,
.demo-shell.is-light-theme .demo-record-field { color: #20201d; }
.demo-shell.is-light-theme .demo-module-dialog header button {
  border: 1px solid #a9a69c;
  background: #f4f3ef;
  color: #4e4e49;
}
.demo-shell.is-light-theme .demo-module-dialog header button:hover {
  background: #fff4c8;
  color: #20201d;
}
.demo-shell.is-light-theme .demo-module-dialog footer { border-top-color: #e2e0d8; }
.demo-shell.is-light-theme .demo-module-dialog .demo-form label,
.demo-shell.is-light-theme .demo-record-field label { color: #20201d; }
.demo-shell.is-light-theme .demo-module-dialog input,
.demo-shell.is-light-theme .demo-module-dialog select,
.demo-shell.is-light-theme .demo-record-dialog input {
  background: #fbfaf7;
  border-color: #cfcac0;
  color: #20201d;
}
.demo-shell.is-light-theme .demo-module-dialog input::placeholder,
.demo-shell.is-light-theme .demo-record-dialog input::placeholder { color: #77756f; }

/* ─── ACCESSIBILITY UTILITY ───────────────────────────────────────────────── */
.demo-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
