:root {
  --bg: #eef3ef;
  --bg-accent: #dbe7de;
  --surface: #ffffff;
  --surface-alt: #f7faf7;
  --surface-strong: #e8f0ea;
  --sidebar: #13261d;
  --sidebar-soft: #1b3428;
  --line: #d6e1d9;
  --line-strong: #b8c9bc;
  --text: #16231b;
  --muted: #607267;
  --brand: #117a65;
  --brand-strong: #0d5f4f;
  --brand-soft: #d9f1ea;
  --accent: #c47a2c;
  --accent-soft: #f7e6d3;
  --danger: #b94a48;
  --danger-soft: #f8dfdd;
  --success: #1d8f67;
  --success-soft: #def4ea;
  --shadow-sm: 0 10px 30px rgba(24, 43, 31, 0.06);
  --shadow-md: 0 22px 60px rgba(19, 38, 29, 0.10);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(219, 231, 222, 0.85), rgba(238, 243, 239, 0.96)),
    linear-gradient(90deg, rgba(17, 122, 101, 0.04), rgba(196, 122, 44, 0.04));
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(19, 38, 29, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 38, 29, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 82%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(19, 38, 29, 0.98), rgba(20, 45, 33, 0.94));
  color: #eef7f1;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f4d8a8, #f0b35b);
  color: #193027;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.brand-mark-image {
  overflow: hidden;
  background: #ffffff;
  padding: 6px;
}

.brand-mark-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-block h1,
.topbar h2,
.hero h3,
.card h4,
.auth-card h1 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0;
}

.brand-block h1 {
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar .eyebrow,
.sidebar-card span,
.sidebar-card .eyebrow,
.sidebar .nav-item {
  color: rgba(238, 247, 241, 0.78);
}

.nav {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.nav-item,
.ghost-btn,
.primary-btn,
select,
input,
textarea,
button {
  font: inherit;
}

.nav-item,
.ghost-btn,
.primary-btn {
  cursor: pointer;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: transparent;
  transition: background-color 160ms ease, transform 160ms ease, color 160ms ease;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  transform: translateX(3px);
}

.sidebar-card {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-card strong {
  font-size: 20px;
  color: #fff;
}

.sidebar-card.alt {
  background: rgba(240, 179, 91, 0.12);
  border-color: rgba(240, 179, 91, 0.22);
}

.content {
  padding: 28px;
}

.topbar,
.hero,
.kpi-grid,
.panel-grid,
.dashboard-grid,
.module-grid,
.client-grid {
  display: grid;
}

.topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.topbar h2 {
  max-width: 820px;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.02;
}

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

.ghost-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
  border: 1px solid transparent;
}

.ghost-btn {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.ghost-btn:hover {
  background: var(--surface-alt);
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #f5fffb;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(17, 122, 101, 0.18);
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 18px;
  margin: 0 0 18px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(17, 122, 101, 0.10), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #fdfefd, #f3f8f4);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.hero h3 {
  max-width: 16ch;
  font-size: clamp(26px, 2.9vw, 38px);
  margin-bottom: 10px;
}

.hero p {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-metrics {
  display: grid;
  gap: 10px;
}

.hero-stat {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.hero-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-stat strong {
  font-size: 24px;
}

.anchor-grid {
  margin: 18px 0;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.kpi-card,
.card,
.client-card {
  border-radius: 16px;
}

.kpi-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kpi-card p,
.kpi-card span {
  margin: 0;
  color: var(--muted);
}

.kpi-card strong {
  font-size: 30px;
  line-height: 1;
}

.tone-emerald {
  background: linear-gradient(180deg, #ffffff, #eef9f4);
}

.tone-amber {
  background: linear-gradient(180deg, #ffffff, #fdf4ea);
}

.tone-sky {
  background: linear-gradient(180deg, #ffffff, #eef7fb);
}

.tone-rose {
  background: linear-gradient(180deg, #ffffff, #fdf0ef);
}

.tone-emerald strong {
  color: var(--success);
}

.tone-amber strong {
  color: var(--accent);
}

.tone-sky strong {
  color: #2c6f9a;
}

.tone-rose strong {
  color: var(--danger);
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.spotlight {
  grid-row: span 2;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.deal-stack,
.late-list,
.bullet-metrics,
.entity-list,
.sales-ledger {
  display: grid;
  gap: 10px;
}

.deal-row,
.late-item,
.entity-item,
.summary-card,
.ledger-card,
.installment-item,
.hero-stat,
.demo-box {
  box-shadow: none;
}

.deal-row,
.late-item {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.deal-row span,
.deal-row small,
.late-item span {
  display: block;
  color: var(--muted);
}

.deal-row b,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.bullet-metrics {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bullet-metrics li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.bullet-metrics li:last-child {
  border-bottom: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.module-grid,
.client-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stack-form {
  display: grid;
  gap: 12px;
}

.stack-form label,
.inline-edit-form label,
.pix-copy-field {
  display: grid;
  gap: 6px;
}

.stack-form span,
.inline-edit-form span,
.pix-copy-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stack-form input,
.stack-form select,
.filter-form input,
.filter-form select,
.inline-edit-form input,
.pix-copy-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  outline: none;
}

.stack-form input:focus,
.stack-form select:focus,
.filter-form input:focus,
.filter-form select:focus,
.inline-edit-form input:focus,
.pix-copy-field textarea:focus {
  border-color: rgba(17, 122, 101, 0.42);
  box-shadow: 0 0 0 4px rgba(17, 122, 101, 0.10);
}

.wide {
  width: 100%;
  justify-content: center;
}

.fiscal-review-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}

.fiscal-review-box summary {
  cursor: pointer;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.fiscal-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.fiscal-review-grid > div,
.fiscal-review-alert {
  display: grid;
  gap: 5px;
}

.fiscal-review-grid strong,
.fiscal-review-alert strong {
  color: var(--text);
  font-size: 13px;
}

.fiscal-review-grid span,
.fiscal-review-alert span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.fiscal-review-alert {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.center-btn {
  display: inline-flex;
  align-items: center;
}

.flash {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.flash-success {
  background: var(--success-soft);
  color: #1f654f;
  border-color: #b6e2d0;
}

.flash-error {
  background: var(--danger-soft);
  color: #8d3534;
  border-color: #efc1bc;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(214, 171, 81, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(214, 171, 81, 0.08), transparent 26%),
    linear-gradient(135deg, #040404 0%, #0c0c0d 46%, #141214 100%);
}

.auth-shell {
  width: min(560px, 100%);
}

.auth-card {
  display: grid;
  gap: 28px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  font-size: 42px;
}

.auth-copy {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.demo-box {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7faf7, #eef6f0);
  border: 1px solid var(--line);
  color: var(--muted);
}

.auth-card-luxe {
  position: relative;
  gap: 22px;
  padding: 34px;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(17, 17, 18, 0.96), rgba(11, 11, 12, 0.94));
  border: 1px solid rgba(214, 171, 81, 0.24);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 233, 188, 0.05);
}

.auth-orb {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(8px);
  opacity: 0.8;
}

.auth-orb-one {
  top: -60px;
  right: -10px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(214, 171, 81, 0.28), rgba(214, 171, 81, 0));
}

.auth-orb-two {
  bottom: -80px;
  left: -30px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(214, 171, 81, 0.14), rgba(214, 171, 81, 0));
}

.auth-luxe-head {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.auth-brandline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brandmark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(243, 216, 153, 0.22), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f5dfad;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-brandmark-luxe {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  color: #f1cf83;
  background:
    linear-gradient(145deg, rgba(214, 171, 81, 0.24), rgba(255, 245, 214, 0.06)),
    #121212;
  border: 1px solid rgba(214, 171, 81, 0.30);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.auth-luxe-head .eyebrow {
  margin: 0;
  color: #b9964f;
}

.auth-luxe-head h1 {
  margin: 0;
  font-size: 48px;
  line-height: 0.96;
  letter-spacing: -0.05em;
  color: #f6f1e8;
}

.auth-luxe-head .auth-copy {
  margin: 0;
  max-width: 32ch;
  color: rgba(236, 226, 210, 0.68);
  font-size: 16px;
}

.auth-main-luxe {
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(25, 25, 27, 0.94), rgba(16, 16, 17, 0.96));
  border: 1px solid rgba(214, 171, 81, 0.14);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 223, 161, 0.04);
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 7px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 171, 81, 0.10);
}

.auth-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  color: #9f988d;
  text-decoration: none;
  font-weight: 800;
}

.auth-switch-btn.is-active {
  color: #161311;
  background: linear-gradient(180deg, #e0b86e, #c89b4a);
  box-shadow: 0 10px 24px rgba(200, 155, 74, 0.24);
}

.auth-main-luxe .eyebrow {
  color: #b9964f;
}

.auth-form-luxe input {
  min-height: 52px;
  border-radius: 16px;
  border-color: rgba(214, 171, 81, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #f6f1e8;
  box-shadow: inset 0 1px 0 rgba(255, 223, 161, 0.03);
}

.auth-form-luxe input::placeholder {
  color: #80786e;
}

.auth-form-luxe span {
  color: #d2c2a4;
}

.auth-submit {
  min-height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f0c97c, #c89945 62%, #b68434);
  color: #16110b;
  box-shadow: 0 16px 30px rgba(200, 155, 74, 0.24);
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(200, 155, 74, 0.30);
}

.auth-main-luxe .auth-copy,
.auth-helper {
  color: #95897a;
}

.auth-main-luxe .flash-success {
  background: rgba(214, 171, 81, 0.12);
  color: #f0cf8c;
  border-color: rgba(214, 171, 81, 0.22);
}

.auth-main-luxe .flash-error {
  background: rgba(140, 55, 52, 0.18);
  color: #f0c1ba;
  border-color: rgba(239, 193, 188, 0.20);
}

.dashboard-luxe {
  background:
    radial-gradient(circle at top, rgba(214, 171, 81, 0.12), transparent 22%),
    radial-gradient(circle at bottom right, rgba(214, 171, 81, 0.07), transparent 26%),
    linear-gradient(135deg, #040404 0%, #0b0b0c 48%, #121012 100%);
  color: #f3ede3;
}

.dashboard-luxe::before {
  background-image:
    linear-gradient(rgba(214, 171, 81, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 171, 81, 0.05) 1px, transparent 1px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.40), transparent 86%);
}

.dashboard-luxe .sidebar {
  background: linear-gradient(180deg, rgba(10, 10, 11, 0.98), rgba(18, 16, 18, 0.96));
  border-right: 1px solid rgba(214, 171, 81, 0.10);
}

.dashboard-luxe .brand-mark {
  background: linear-gradient(135deg, #f1ca7c, #c89945);
  color: #17120c;
  box-shadow: 0 18px 34px rgba(200, 155, 74, 0.22);
}

.dashboard-luxe .sidebar .eyebrow,
.dashboard-luxe .sidebar-card span,
.dashboard-luxe .sidebar-card .eyebrow,
.dashboard-luxe .sidebar .nav-item {
  color: rgba(241, 231, 214, 0.70);
}

.dashboard-luxe .nav-item:hover,
.dashboard-luxe .nav-item.is-active {
  background: rgba(214, 171, 81, 0.12);
  color: #fff4de;
}

.dashboard-luxe .sidebar-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(214, 171, 81, 0.10);
}

.dashboard-luxe .sidebar-card strong {
  color: #f7e3b6;
}

.dashboard-luxe .sidebar-card.alt {
  background: rgba(214, 171, 81, 0.10);
  border-color: rgba(214, 171, 81, 0.18);
}

.dashboard-luxe .content {
  color: #efe8dd;
}

.dashboard-luxe .topbar h2,
.dashboard-luxe .hero h3,
.dashboard-luxe .kpi-card strong,
.dashboard-luxe .card h4 {
  color: #f6f1e7;
}

.dashboard-luxe .eyebrow {
  color: #b9964f;
}

.dashboard-luxe .ghost-btn {
  background: rgba(255, 255, 255, 0.03);
  color: #d7c7a7;
  border-color: rgba(214, 171, 81, 0.12);
}

.dashboard-luxe .ghost-btn:hover {
  background: rgba(214, 171, 81, 0.09);
}

.dashboard-luxe .primary-btn {
  background: linear-gradient(135deg, #efc879, #c69642 62%, #b78533);
  color: #18120c;
  box-shadow: 0 16px 30px rgba(200, 155, 74, 0.24);
}

.dashboard-luxe .hero {
  background:
    radial-gradient(circle at top right, rgba(214, 171, 81, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(18, 18, 19, 0.94), rgba(12, 12, 13, 0.96));
  border-color: rgba(214, 171, 81, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.dashboard-luxe .hero p,
.dashboard-luxe .kpi-card span,
.dashboard-luxe .kpi-card p,
.dashboard-luxe .hero-stat span {
  color: #9d907c;
}

.dashboard-luxe .hero-stat {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(214, 171, 81, 0.10);
}

.dashboard-luxe .hero-stat strong {
  color: #f0d59f;
}

.dashboard-luxe .kpi-card,
.dashboard-luxe .card,
.dashboard-luxe .client-card {
  background: linear-gradient(180deg, rgba(19, 19, 20, 0.96), rgba(12, 12, 13, 0.94));
  border-color: rgba(214, 171, 81, 0.10);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.20);
}

.dashboard-luxe .tone-emerald,
.dashboard-luxe .tone-amber,
.dashboard-luxe .tone-sky,
.dashboard-luxe .tone-rose {
  background: linear-gradient(180deg, rgba(19, 19, 20, 0.98), rgba(12, 12, 13, 0.95));
}

.dashboard-luxe .tone-emerald strong,
.dashboard-luxe .tone-amber strong,
.dashboard-luxe .tone-sky strong,
.dashboard-luxe .tone-rose strong {
  color: #f0c97c;
}

.dashboard-luxe .flash-success {
  background: rgba(214, 171, 81, 0.12);
  color: #f1d08d;
  border-color: rgba(214, 171, 81, 0.18);
}

.dashboard-luxe .flash-error {
  background: rgba(140, 55, 52, 0.20);
  color: #efc1bc;
  border-color: rgba(239, 193, 188, 0.18);
}

.dashboard-editorial {
  background:
    radial-gradient(circle at top left, rgba(198, 142, 71, 0.12), transparent 20%),
    radial-gradient(circle at bottom right, rgba(43, 61, 56, 0.08), transparent 22%),
    linear-gradient(135deg, #f5efe6 0%, #fbf8f3 48%, #f3ede4 100%);
  color: #1c1a18;
}

.dashboard-editorial::before {
  background-image:
    linear-gradient(rgba(28, 26, 24, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 26, 24, 0.03) 1px, transparent 1px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent 84%);
}

.dashboard-editorial .sidebar {
  background:
    linear-gradient(180deg, rgba(29, 31, 35, 0.98), rgba(20, 24, 28, 0.96));
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-editorial .brand-mark {
  background: linear-gradient(135deg, #f0d6a6, #d79f5f);
  color: #27211a;
  box-shadow: 0 18px 34px rgba(37, 28, 20, 0.22);
}

.dashboard-editorial .sidebar .eyebrow,
.dashboard-editorial .sidebar-card span,
.dashboard-editorial .sidebar-card .eyebrow,
.dashboard-editorial .sidebar .nav-item {
  color: rgba(243, 238, 231, 0.74);
}

.dashboard-editorial .nav-item:hover,
.dashboard-editorial .nav-item.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dashboard-editorial .sidebar-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.dashboard-editorial .sidebar-card strong {
  color: #fff;
}

.dashboard-editorial .sidebar-card.alt {
  background: rgba(215, 159, 95, 0.10);
  border-color: rgba(215, 159, 95, 0.18);
}

.dashboard-editorial .eyebrow {
  color: #9a6a3d;
}

.dashboard-editorial .topbar h2,
.dashboard-editorial .hero h3,
.dashboard-editorial .kpi-card strong,
.dashboard-editorial .card h4 {
  color: #201b17;
}

.dashboard-editorial .ghost-btn {
  background: rgba(255, 255, 255, 0.72);
  color: #4a4036;
  border-color: rgba(95, 76, 57, 0.10);
  box-shadow: 0 10px 24px rgba(56, 41, 28, 0.05);
}

.dashboard-editorial .ghost-btn:hover {
  background: rgba(255, 255, 255, 0.92);
}

.dashboard-editorial .primary-btn {
  background: linear-gradient(135deg, #2e6154, #1c443a 62%, #15352d);
  color: #f8f4ee;
  box-shadow: 0 16px 30px rgba(28, 68, 58, 0.18);
}

.dashboard-editorial .hero {
  background:
    radial-gradient(circle at top right, rgba(215, 159, 95, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 241, 233, 0.94));
  border-color: rgba(95, 76, 57, 0.10);
  box-shadow: 0 24px 60px rgba(56, 41, 28, 0.08);
}

.dashboard-editorial .hero p,
.dashboard-editorial .kpi-card span,
.dashboard-editorial .kpi-card p,
.dashboard-editorial .hero-stat span {
  color: #766556;
}

.dashboard-editorial .late-item strong,
.dashboard-editorial .late-item b,
.dashboard-editorial .card strong {
  color: #201b17;
}

.dashboard-editorial .late-item span,
.dashboard-editorial .card span {
  color: #766556;
}

.dashboard-editorial .hero-stat {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(95, 76, 57, 0.10);
}

.dashboard-editorial .hero-stat strong {
  color: #2a5a4f;
}

.dashboard-editorial .kpi-card,
.dashboard-editorial .card,
.dashboard-editorial .client-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 239, 231, 0.92));
  border-color: rgba(95, 76, 57, 0.10);
  box-shadow: 0 22px 50px rgba(56, 41, 28, 0.07);
}

.dashboard-editorial .tone-emerald {
  background: linear-gradient(180deg, #ffffff, #eef6f2);
}

.dashboard-editorial .tone-amber {
  background: linear-gradient(180deg, #fffdf9, #f8efe3);
}

.dashboard-editorial .tone-sky {
  background: linear-gradient(180deg, #ffffff, #eff4f3);
}

.dashboard-editorial .tone-rose {
  background: linear-gradient(180deg, #fffdfb, #f7ece8);
}

.dashboard-editorial .tone-emerald strong {
  color: #1f6d59;
}

.dashboard-editorial .tone-amber strong {
  color: #a8662d;
}

.dashboard-editorial .tone-sky strong {
  color: #3c5e58;
}

.dashboard-editorial .tone-rose strong {
  color: #b15c4e;
}

.dashboard-editorial .flash-success {
  background: rgba(29, 143, 103, 0.10);
  color: #245949;
  border-color: rgba(29, 143, 103, 0.16);
}

.dashboard-editorial .flash-error {
  background: rgba(185, 74, 72, 0.10);
  color: #8f3736;
  border-color: rgba(185, 74, 72, 0.14);
}

.dashboard-editorial .installment-item.is-paid {
  background: linear-gradient(180deg, #efe3cf, #e6d4b8);
  border-color: rgba(154, 106, 61, 0.24);
  box-shadow: 0 14px 28px rgba(122, 89, 55, 0.10);
}

.dashboard-editorial .installment-item.is-paid strong,
.dashboard-editorial .installment-item.is-paid b {
  color: #5b3c22;
}

.dashboard-editorial .installment-item.is-paid span,
.dashboard-editorial .installment-item.is-paid small,
.dashboard-editorial .installment-item.is-paid code {
  color: #7a5a3a;
}

.detail-grid {
  margin-bottom: 18px;
}

.client-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-card,
.entity-item,
.ledger-card,
.installment-item {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.summary-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.summary-head span,
.summary-metrics small,
.entity-item span {
  color: var(--muted);
}

.summary-metrics {
  display: grid;
  gap: 5px;
}

.entity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.audit-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.audit-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.audit-title,
.audit-meta,
.audit-details {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.audit-title strong {
  font-size: 16px;
}

.audit-main p {
  margin: 0;
  color: var(--text);
}

.audit-meta {
  color: var(--muted);
  font-size: 13px;
}

.audit-details span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.entity-actions,
.sale-actions,
.installment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-form {
  display: inline-flex;
}

.danger-btn {
  border-color: #efc1bc;
  color: #8f3736;
  background: #fff7f6;
}

.danger-confirm-input {
  min-width: 110px;
  max-width: 140px;
  border: 1px solid #efc1bc;
  background: #fffdfc;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.danger-confirm-input::placeholder {
  color: #b06e69;
  text-transform: none;
}

.filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.muted-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.info-strip {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
}

.customer-hero h3 {
  max-width: none;
}

.ledger-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ledger-summary {
  display: grid;
  gap: 4px;
  text-align: right;
  color: var(--muted);
}

.sale-actions {
  margin-bottom: 14px;
}

.inline-edit-form {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.sale-edit-form {
  flex: 1 1 640px;
}

.installment-edit-form {
  display: grid;
  gap: 8px;
}

.charge-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: #f4faf7;
  border: 1px dashed #bdd7c6;
}

.receipt-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px;
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.receipt-grid div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.receipt-grid span,
.receipt-note {
  color: var(--muted);
}

.receipt-note {
  margin-top: 18px;
}

@media print {
  .sidebar,
  .topbar-actions {
    display: none !important;
  }

  body,
  .content,
  .receipt-page {
    background: #fff !important;
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
  }
}

.charge-box code {
  white-space: pre-wrap;
  word-break: break-all;
  color: #215648;
  font-size: 12px;
}

.charge-qr,
.pix-modal-qr {
  width: min(100%, 220px);
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.pix-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 23, 17, 0.52);
  backdrop-filter: blur(6px);
}

.pix-modal.is-hidden {
  display: none;
}

.pix-modal-card {
  width: min(540px, 100%);
  padding: 22px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.pix-modal-content {
  display: grid;
  gap: 14px;
}

.pix-modal-qr {
  width: min(280px, 100%);
  justify-self: center;
}

.pix-copy-field textarea {
  min-height: 108px;
  resize: vertical;
  font-size: 12px;
}

.pix-status {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pix-status.is-paid {
  background: var(--success-soft);
  color: #1f6d55;
}

.installment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.installment-item {
  display: grid;
  gap: 10px;
}

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

.installment-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.installment-state.is-open {
  background: #eef4f3;
  color: #365952;
}

.installment-state.is-late {
  background: #f7e0dc;
  color: #9a433d;
}

.installment-state.is-paid {
  background: #dcefe5;
  color: #245949;
}

.installment-item > b {
  font-size: 18px;
}

.installment-item.is-paid {
  background: #eff9f3;
  border-color: #bfe2cf;
}

.chart-card {
  min-height: 340px;
}

.bars {
  height: 250px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.chart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.bar {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.bar span {
  width: 100%;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #2aa487, var(--brand-strong));
}

.bar label {
  color: var(--muted);
  font-size: 12px;
}

.cashflow-bars {
  grid-template-columns: repeat(6, minmax(84px, 1fr));
}

.cashflow-bar-group {
  align-items: stretch;
}

.cashflow-bar-stack {
  height: 190px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  width: 100%;
}

.cashflow-bar {
  width: 100%;
  border-radius: 10px 10px 4px 4px;
}

.cashflow-bar.receipts {
  background: linear-gradient(180deg, #32aa86, #1f6d59);
}

.cashflow-bar.expenses {
  background: linear-gradient(180deg, #d78162, #b15c4e);
}

.cashflow-bar.net.positive {
  background: linear-gradient(180deg, #d6b072, #9a6a3d);
}

.cashflow-bar.net.negative {
  background: linear-gradient(180deg, #8d6a62, #604842);
}

.cashflow-pill-expense {
  background: #f7e0dc;
  color: #9a433d;
}

.cashflow-pill-net {
  background: #efe3cf;
  color: #7a5a3a;
}

.client-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

#menuToggle {
  display: none;
}

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

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(320px, 88vw);
    z-index: 40;
    transform: translateX(-104%);
    transition: transform 200ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  #menuToggle {
    display: inline-flex;
  }
}

@media (max-width: 1024px) {
  .hero,
  .panel-grid,
  .dashboard-grid,
  .module-grid,
  .client-grid,
  .auth-card,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .spotlight {
    grid-row: auto;
  }

  .auth-shell {
    width: min(620px, 100%);
  }

  .auth-card-luxe {
    padding: 26px;
  }

  .auth-luxe-head h1 {
    font-size: 40px;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 18px;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .topbar-actions > * {
    flex: 1 1 100%;
  }

  .topbar-actions .ghost-btn,
  .topbar-actions .primary-btn {
    width: 100%;
    justify-content: center;
  }

  .deal-row,
  .late-item,
  .entity-item {
    grid-template-columns: 1fr;
  }

  .card-head,
  .entity-item,
  .audit-item,
  .ledger-head,
  .installment-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-head {
    gap: 12px;
  }

  .ledger-summary {
    gap: 6px;
    text-align: left;
  }

  .ledger-summary span {
    display: block;
  }

  .ledger-summary,
  .installment-meta {
    width: 100%;
  }

  .ledger-summary span,
  .installment-meta small {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(95, 76, 57, 0.08);
  }

  .inline-edit-form {
    width: 100%;
  }

  .filter-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filter-form > * {
    width: 100%;
  }

  .inline-edit-form {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .inline-edit-form label,
  .inline-edit-form button,
  .inline-edit-form a {
    width: 100%;
  }

  .sale-actions,
  .entity-actions,
  .installment-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .sale-actions form,
  .entity-actions form,
  .installment-actions form {
    width: 100%;
  }

  .sale-actions .ghost-btn,
  .sale-actions .primary-btn,
  .installment-actions .ghost-btn,
  .installment-actions .primary-btn,
  .installment-actions .danger-btn,
  .entity-actions .ghost-btn,
  .entity-actions .primary-btn {
    width: 100%;
    justify-content: center;
  }

  .sale-edit-form,
  .installment-edit-form {
    gap: 12px;
  }

  .sale-edit-form label,
  .installment-edit-form label {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
  }

  .sale-edit-form button,
  .installment-edit-form button {
    min-height: 46px;
  }

  .finance-filter {
    gap: 12px;
  }

  .finance-filter select,
  .finance-filter input,
  .finance-filter .ghost-btn {
    min-height: 46px;
  }

  .info-strip {
    padding: 14px;
  }

  .ledger-card,
  .installment-item,
  .summary-card,
  .entity-item {
    padding: 16px;
  }

  .charge-box {
    gap: 10px;
    padding: 14px;
  }

  .charge-box .entity-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .charge-box .entity-actions > * {
    width: 100%;
  }

  .pix-modal {
    padding: 14px;
  }

  .pix-modal-card {
    padding: 18px;
    border-radius: 16px;
  }

  .pix-copy-field textarea {
    min-height: 132px;
  }

  .chart-scroll {
    margin: 0 -4px;
    padding: 0 4px 4px;
  }

  .bars {
    min-width: 560px;
  }

  .cashflow-bars {
    min-width: 620px;
  }

  .bar strong {
    font-size: 12px;
    white-space: nowrap;
  }

  .receipt-page {
    padding: 18px 0;
  }

  .receipt-grid div {
    padding: 16px;
  }

  .receipt-grid strong {
    word-break: break-word;
  }

  .table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  .content {
    padding: 14px;
  }

  .hero,
  .card,
  .ledger-card,
  .entity-item,
  .installment-item,
  .summary-card,
  .module-card {
    border-radius: 18px;
  }

  .kpi-grid,
  .summary-grid,
  .client-summary-grid,
  .receipt-grid,
  .installment-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h2,
  .hero-copy h3,
  .topbar h2,
  .card-head h4 {
    word-break: break-word;
  }

  .entity-actions,
  .installment-actions {
    gap: 10px;
  }

  .installment-item > b,
  .ledger-summary strong {
    font-size: 20px;
  }

  .card-head .tag-pill {
    align-self: flex-start;
  }

  .receipt-note {
    line-height: 1.6;
  }

  .charge-qr,
  .pix-modal-qr {
    width: min(100%, 240px);
  }
}
