:root {
  --bg: #ece9e4;
  --bg-soft: #f6f3ef;
  --surface: #ffffff;
  --surface-alt: #f7f4ef;
  --line: rgba(40, 38, 34, 0.08);
  --line-strong: rgba(40, 38, 34, 0.14);
  --text-main: #1f1d19;
  --text-soft: #68655f;
  --text-muted: #989186;
  --brand: #f4bb28;
  --brand-deep: #f28f32;
  --brand-dark: #221f17;
  --brand-soft: #fff4d8;
  --success: #219653;
  --danger: #df6d4c;
  --shadow-lg: 0 28px 60px rgba(36, 31, 24, 0.1);
  --shadow-md: 0 18px 36px rgba(36, 31, 24, 0.07);
  --radius-2xl: 34px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(244, 187, 40, 0.18), transparent 24%),
    linear-gradient(180deg, #f2efea 0%, #e9e5df 100%);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.overline {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #bf8842;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
}

.auth-visual,
.auth-card,
.auth-brand,
.auth-preview,
.auth-card__inner,
.auth-footer,
.topbar,
.topbar-nav,
.topbar-tools,
.profile-pill,
.hero-actions,
.hero-mini-grid,
.section-head,
.section-head--table,
.database-note,
.dialog-head,
.dialog-actions,
.form-summary,
.sidebar,
.sidebar-brand,
.sidebar-nav,
.sidebar-bottom,
.month-filter-row,
.insight-list {
  display: flex;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 34px;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(160deg, #fffaf2 0%, #fff2d7 46%, #f6d097 100%);
}

.auth-sun,
.auth-copy,
.auth-preview,
.auth-brand {
  pointer-events: none;
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-visual::before {
  width: 520px;
  height: 520px;
  right: -120px;
  top: -180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent 72%);
}

.auth-visual::after {
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(242, 143, 50, 0.16), transparent 74%);
}

.auth-brand {
  position: relative;
  z-index: 1;
  align-items: center;
  gap: 20px;
}

.auth-brand img {
  width: 170px;
}

.auth-brand strong {
  display: block;
  margin-top: 8px;
  font-size: 1.15rem;
}

.auth-sun {
  position: absolute;
  right: 8%;
  top: 18%;
  width: clamp(250px, 28vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 251, 236, 0.98), rgba(255, 223, 147, 0.94) 24%, rgba(244, 187, 40, 0.94) 58%, rgba(242, 143, 50, 0.92) 100%);
  box-shadow:
    0 0 0 26px rgba(255, 232, 179, 0.28),
    0 0 0 64px rgba(255, 232, 179, 0.18),
    0 26px 60px rgba(242, 143, 50, 0.18);
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.auth-copy h1,
.auth-card h2,
.hero-card h1,
.hero-balance strong,
.section-head h2,
.dialog-head h2,
.metric-card strong {
  margin: 0;
  font-family: "Fraunces", serif;
  letter-spacing: -0.03em;
}

.auth-copy h1 {
  margin-top: 18px;
  font-size: clamp(3rem, 5.1vw, 5.3rem);
  line-height: 0.92;
}

.auth-copy p:last-child {
  margin: 18px 0 0;
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(31, 29, 25, 0.72);
}

.auth-preview {
  position: relative;
  z-index: 1;
  gap: 16px;
  flex-wrap: wrap;
}

.preview-card {
  min-width: 180px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(40, 38, 34, 0.08);
  box-shadow: var(--shadow-md);
}

.preview-card span {
  display: block;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.preview-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.1rem;
}

.preview-card--accent {
  background: linear-gradient(135deg, #fff1c7, #ffd17d);
}

.auth-card {
  position: relative;
  z-index: 2;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(250, 248, 244, 0.92);
}

.auth-card__inner {
  width: min(100%, 470px);
  flex-direction: column;
  gap: 18px;
  padding: 34px;
  border-radius: var(--radius-2xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.auth-card h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 0.95;
}

.auth-lead,
.auth-feedback,
.auth-footer span,
.metric-card p,
.database-note span,
.client-cell small,
.table-empty p,
.insight-card span {
  color: var(--text-soft);
}

.auth-lead {
  margin: 0;
  line-height: 1.75;
}

.auth-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.auth-toggle__button,
.primary-button,
.dark-button,
.ghost-button,
.topbar-pill,
.sidebar-nav__item,
.filter-chip,
.dialog-close {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
}

.auth-toggle__button {
  padding: 14px 16px;
  border-radius: 999px;
  color: var(--text-soft);
  background: transparent;
}

.auth-toggle__button.is-active {
  color: #fffdf8;
  background: linear-gradient(135deg, #f4bb28, #f28f32);
  box-shadow: 0 10px 24px rgba(242, 143, 50, 0.22);
}

.auth-form,
.project-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4f4b44;
}

.field input,
.field select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--surface-alt);
  color: var(--text-main);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(242, 143, 50, 0.42);
  box-shadow: 0 0 0 4px rgba(244, 187, 40, 0.14);
}

#aReceberInput {
  font-weight: 700;
  color: #be6c19;
  background: #fff6e6;
  border-color: rgba(242, 143, 50, 0.3);
}

.primary-button,
.dark-button,
.ghost-button {
  padding: 15px 20px;
  border-radius: 18px;
}

.primary-button {
  color: #fffdf8;
  background: linear-gradient(135deg, #f4bb28, #f28f32);
  box-shadow: 0 14px 30px rgba(242, 143, 50, 0.24);
}

.dark-button {
  color: #fffaf1;
  background: #222018;
}

.ghost-button {
  color: var(--text-main);
  background: #f4f1ec;
  border: 1px solid var(--line);
}

.primary-button:hover,
.dark-button:hover,
.ghost-button:hover,
.topbar-pill:hover,
.sidebar-nav__item:hover,
.filter-chip:hover,
.dialog-close:hover,
.auth-toggle__button:hover {
  transform: translateY(-1px);
}

.auth-feedback {
  min-height: 22px;
  margin: 0;
  font-size: 0.9rem;
}

.auth-feedback.is-error {
  color: var(--danger);
}

.auth-feedback.is-success {
  color: var(--success);
}

.auth-footer {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}

.auth-footer a,
.database-note a {
  color: #bf8842;
  text-decoration: none;
}

.dashboard-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 22px;
}

.sidebar,
.topbar,
.hero-card,
.metric-card,
.chart-card,
.health-card,
.table-card,
.project-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.sidebar {
  padding: 18px 14px;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  border-radius: var(--radius-2xl);
}

.sidebar-brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  font-size: 0.92rem;
}

.sidebar-brand img {
  width: 82px;
}

.sidebar-nav {
  flex-direction: column;
  gap: 14px;
}

.sidebar-nav__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f5f2ed;
  color: #8a8478;
  font-weight: 700;
  text-align: left;
}

.sidebar-nav__item.is-active {
  color: #fffdf8;
  background: linear-gradient(135deg, #f4bb28, #f28f32);
}

.sidebar-nav__item--ghost {
  background: #faf7f1;
}

.sidebar-nav__item--text {
  justify-content: flex-start;
}

.sidebar-nav__marker {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.65;
}

.sidebar-nav__item.is-active .sidebar-nav__marker {
  opacity: 1;
}

.sidebar-nav__label {
  font-size: 0.96rem;
}

.workspace {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 20px;
}

.dashboard-views,
.dashboard-view {
  display: grid;
  gap: 20px;
}

.sidebar,
.topbar,
.hero-card,
.metric-card,
.chart-card,
.health-card,
.table-card,
.project-dialog,
.table-shell,
.database-note {
  position: relative;
  z-index: 2;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-radius: var(--radius-2xl);
}

.topbar-nav {
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-pill {
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--text-soft);
  background: #f4f1ec;
}

.topbar-pill.is-active {
  color: #fffdf8;
  background: #1f1d19;
}

.topbar-tools {
  align-items: center;
  gap: 14px;
}

.top-search {
  min-width: 260px;
  display: grid;
  gap: 6px;
}

.top-search span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.top-search input {
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #faf8f4;
  outline: none;
}

.top-search input:focus {
  border-color: rgba(242, 143, 50, 0.42);
  box-shadow: 0 0 0 4px rgba(244, 187, 40, 0.12);
}

.profile-pill {
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: #faf8f4;
}

.profile-pill__avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fffdf8;
  background: linear-gradient(135deg, #f4bb28, #f28f32);
  font-weight: 700;
}

.profile-pill strong,
.profile-pill span {
  display: block;
}

.profile-pill span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-grid,
.stats-grid,
.bottom-grid,
.dialog-grid {
  display: grid;
  gap: 20px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.92fr) minmax(300px, 0.88fr);
}

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

.hero-card,
.chart-card,
.health-card,
.table-card {
  padding: 24px;
  border-radius: var(--radius-2xl);
}

.hero-card h1 {
  margin-top: 10px;
  font-size: clamp(2.6rem, 4vw, 4rem);
  line-height: 0.95;
}

.hero-card__copy {
  max-width: 520px;
  margin: 16px 0 0;
  line-height: 1.75;
  color: var(--text-soft);
}

.hero-balance {
  margin-top: 22px;
}

.hero-balance span,
.mini-card span,
.metric-card span,
.summary-chip span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-balance strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(2.3rem, 3.6vw, 3.5rem);
  line-height: 0.9;
}

.hero-actions {
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.hero-mini-grid {
  gap: 12px;
  margin-top: 22px;
}

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

.mini-card,
.metric-card,
.summary-chip,
.insight-card {
  border-radius: 22px;
}

.mini-card {
  padding: 16px 18px;
  background: #faf7f2;
  border: 1px solid var(--line);
}

.mini-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.16rem;
}

.mini-card--accent {
  background: linear-gradient(135deg, #fff1c7, #ffd27e);
}

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

.metric-card {
  padding: 22px;
  min-height: 164px;
}

.metric-card--accent {
  color: #fffdf8;
  background: linear-gradient(160deg, #f4bb28, #f28f32);
}

.metric-card--accent span,
.metric-card--accent p {
  color: rgba(255, 248, 238, 0.88);
}

.metric-card strong {
  display: block;
  margin: 16px 0 10px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 0.9;
}

.chart-card {
  display: grid;
  align-content: start;
}

.section-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.section-head h2 {
  margin-top: 8px;
  font-size: 2rem;
  line-height: 0.95;
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  min-height: 280px;
  margin-top: 18px;
}

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

.chart-bar__track {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: end;
  border-radius: 999px;
  background: #f4f1ec;
  overflow: hidden;
}

.chart-bar__stack {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 4px;
}

.chart-bar__segment {
  width: 100%;
  border-radius: 999px;
}

.chart-bar__segment--cost {
  background: #1f1d19;
}

.chart-bar__segment--receivable {
  background: linear-gradient(180deg, #f4bb28, #f28f32);
}

.chart-bar span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.chart-bar strong {
  font-size: 0.84rem;
}

.bottom-grid {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
}

.bottom-grid--single {
  grid-template-columns: 1fr;
}

.table-card--full {
  width: 100%;
}

.progress-block {
  margin-top: 16px;
}

.progress-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #f2eee8;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #f4bb28, #f28f32);
}

.progress-meta {
  margin-top: 14px;
}

.progress-meta strong {
  display: block;
  font-size: 1.2rem;
}

.progress-meta span {
  color: var(--text-soft);
}

.insight-list {
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.insight-card {
  padding: 16px;
  background: #faf7f2;
  border: 1px solid var(--line);
}

.insight-card strong {
  display: block;
  margin-bottom: 4px;
}

.insight-card small {
  display: block;
  margin-top: 8px;
}

.table-empty {
  padding: 24px;
}

.table-empty strong {
  display: block;
  color: var(--text-main);
}

.month-filter-row {
  gap: 10px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f4f1ec;
  color: var(--text-soft);
}

.filter-chip.is-active {
  color: #fffdf8;
  background: linear-gradient(135deg, #f4bb28, #f28f32);
  box-shadow: 0 12px 24px rgba(242, 143, 50, 0.18);
}

.table-shell {
  overflow: auto;
  margin-top: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px 18px;
  text-align: left;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  background: #fbf8f3;
}

tbody td {
  padding: 18px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

tbody tr:hover {
  background: #fcfaf6;
}

.client-cell {
  display: grid;
  gap: 5px;
}

.client-cell strong {
  color: var(--text-main);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill.em-producao {
  color: #b56615;
  background: #fff2dd;
}

.status-pill.em-instalacao {
  color: #ca6f29;
  background: #fff0e3;
}

.status-pill.a-receber {
  color: #1f8b4d;
  background: #e8f7ee;
}

.status-pill.finalizado {
  color: #667085;
  background: #eef2f7;
}

.value-good {
  color: var(--success);
  font-weight: 700;
}

.value-risk {
  color: var(--danger);
  font-weight: 700;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.action-button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf7f2;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.action-button:hover {
  transform: translateY(-1px);
}

.action-button--danger {
  color: #c45334;
  background: #fff1ec;
}

.database-note {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #faf7f2;
  border: 1px solid var(--line);
}

.database-note strong,
.summary-chip strong {
  display: block;
}

.project-dialog {
  width: min(1080px, calc(100% - 24px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-2xl);
}

.project-dialog::backdrop {
  background: rgba(34, 31, 23, 0.35);
  backdrop-filter: blur(6px);
}

.project-form {
  padding: 24px;
}

.dialog-head,
.dialog-actions,
.form-summary,
.database-note {
  align-items: center;
  justify-content: space-between;
}

.dialog-close {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--text-main);
  background: #f4f1ec;
}

.form-summary {
  gap: 14px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.summary-chip {
  flex: 1;
  min-width: 220px;
  padding: 18px 20px;
  background: #faf7f2;
  border: 1px solid var(--line);
}

.summary-chip strong {
  margin-top: 8px;
  font-size: 1.36rem;
}

.summary-chip--accent {
  background: linear-gradient(135deg, #fff1c7, #ffd27e);
}

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

.dialog-actions {
  margin-top: 22px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  min-width: 220px;
  max-width: 340px;
  padding: 16px 18px;
  border-radius: 18px;
  color: #fffdf8;
  background: #1f1d19;
  box-shadow: var(--shadow-lg);
}

.toast.is-success {
  background: #1f8b4d;
}

.toast.is-error {
  background: #cf5e3e;
}

.toast.is-neutral {
  background: #1f1d19;
}

@media (max-width: 1260px) {
  .hero-grid,
  .bottom-grid,
  .reports-grid {
    grid-template-columns: 1fr;
  }

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

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

  .dashboard-shell {
    padding: 16px;
  }

  .sidebar {
    flex-direction: row;
    justify-content: space-between;
    padding: 14px 18px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-brand {
    align-items: center;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .top-search {
    min-width: 100%;
  }
}

@media (max-width: 760px) {
  .auth-visual,
  .auth-card,
  .workspace,
  .project-form {
    padding: 20px;
  }

  .auth-copy h1 {
    font-size: clamp(2.4rem, 11vw, 3.8rem);
  }

  .auth-card__inner,
  .hero-card,
  .metric-card,
  .chart-card,
  .health-card,
  .table-card,
  .topbar,
  .sidebar {
    border-radius: 24px;
  }

  .sidebar {
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar-nav {
    flex-direction: column;
  }

  .hero-mini-grid,
  .stats-grid,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .dialog-head,
  .dialog-actions,
  .database-note,
  .auth-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .month-filter-row {
    justify-content: flex-start;
  }
}

/* Visual refresh - Solaire premium dashboard */
:root {
  --surface: rgba(255, 252, 246, 0.88);
  --surface-alt: rgba(248, 240, 229, 0.92);
  --line: rgba(72, 63, 51, 0.1);
  --line-strong: rgba(72, 63, 51, 0.18);
  --text-main: #1f2529;
  --text-soft: #5f655f;
  --text-muted: #8b8578;
  --brand: #f7b733;
  --brand-deep: #de7a24;
  --shadow-lg: 0 30px 72px rgba(40, 34, 27, 0.14);
  --shadow-md: 0 18px 40px rgba(40, 34, 27, 0.09);
  --radius-2xl: 32px;
  --radius-xl: 26px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(255, 222, 150, 0.42), transparent 24%),
    radial-gradient(circle at right center, rgba(222, 122, 36, 0.12), transparent 22%),
    linear-gradient(180deg, #f7f0e4 0%, #ebdfcd 100%);
}

.auth-copy h1,
.auth-card h2,
.hero-card h1,
.hero-card h2,
.hero-balance strong,
.section-head h2,
.dialog-head h2,
.metric-card strong,
.topbar-copy h1,
.scene-card__copy h2,
.sidebar-summary strong,
.report-summary-item strong {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.overline {
  color: #bf7d31;
}

.auth-shell {
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
}

.auth-visual {
  gap: 28px;
  padding: 38px;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 247, 223, 0.95), transparent 28%),
    linear-gradient(145deg, #fff8ea 0%, #f7d7a7 48%, #d99152 100%);
}

.auth-card {
  background: rgba(248, 243, 235, 0.86);
  backdrop-filter: blur(10px);
}

.auth-card__inner {
  width: min(100%, 500px);
  padding: 36px;
  border-radius: 38px;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(85, 65, 34, 0.12);
  box-shadow: var(--shadow-lg);
}

.auth-card h2 {
  margin-top: 10px;
  font-size: clamp(2.8rem, 4.6vw, 3.8rem);
  line-height: 0.92;
}

.auth-lead {
  margin-top: 14px;
  line-height: 1.75;
}

.brand-lockup,
.topbar-copy,
.sidebar-brand__content,
.sidebar-nav__content,
.receivable-item__title,
.receivable-item__value,
.metric-card,
.scene-card__copy,
.report-action,
.report-summary-item,
.ranking-item,
.breakdown-item {
  display: grid;
}

.brand-lockup {
  align-items: center;
  gap: 18px;
  grid-template-columns: auto 1fr;
}

.brand-lockup__badge,
.sidebar-brand__badge {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(255, 242, 214, 0.95));
  box-shadow: 0 22px 42px rgba(77, 53, 21, 0.12);
}

.brand-lockup__badge {
  width: 88px;
  height: 88px;
}

.brand-lockup__badge img {
  width: 62px;
}

.brand-lockup__text,
.sidebar-brand__content,
.sidebar-nav__content {
  gap: 4px;
}

.brand-lockup__text strong,
.sidebar-brand__content strong {
  font-size: 1.4rem;
  font-weight: 800;
}

.brand-lockup__text span,
.sidebar-brand__content span,
.topbar-copy span,
.scene-card__copy p,
.receivable-item__meta,
.ranking-item__meta,
.breakdown-item__meta,
.sidebar-summary small,
.report-action p {
  color: var(--text-soft);
}

.auth-copy {
  max-width: 700px;
}

.auth-copy h1 {
  font-size: clamp(3.2rem, 5vw, 5.6rem);
  line-height: 0.9;
}

.auth-copy p:last-child {
  max-width: 620px;
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(31, 37, 41, 0.76);
}

.preview-card {
  min-width: 200px;
  border-radius: 24px;
  background: rgba(255, 252, 246, 0.72);
  border: 1px solid rgba(79, 58, 31, 0.12);
}

.preview-card--highlight {
  background: linear-gradient(135deg, rgba(255, 249, 234, 0.95), rgba(255, 221, 151, 0.92));
}

.auth-toggle {
  margin-top: 24px;
  background: rgba(239, 230, 215, 0.75);
}

.auth-toggle__button.is-active {
  background: linear-gradient(135deg, #2f3438, #1f2529);
}

.dashboard-shell {
  grid-template-columns: 300px 1fr;
}

.sidebar,
.topbar,
.hero-card,
.scene-card,
.metric-card,
.chart-card,
.status-card,
.receivable-card,
.filter-panel,
.table-card,
.health-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card,
.project-dialog {
  background: var(--surface);
  border: 1px solid rgba(83, 71, 51, 0.1);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.sidebar {
  position: sticky;
  top: 22px;
  min-height: calc(100vh - 44px);
  padding: 22px;
  gap: 20px;
  border-radius: 38px;
  overflow: hidden;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0;
}

.sidebar-brand__badge {
  width: 82px;
  height: 82px;
}

.sidebar-brand__badge img {
  width: 56px;
}

.sidebar-summary {
  padding: 18px 18px 20px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(38, 45, 49, 0.96), rgba(57, 62, 68, 0.92));
  color: #fdf7ef;
}

.sidebar-summary__label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 245, 224, 0.72);
}

.sidebar-summary strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  line-height: 0.94;
}

.sidebar-nav {
  gap: 10px;
}

.sidebar-nav__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.84);
  color: #5a5f58;
}

.sidebar-nav__item.is-active {
  color: #fffdf8;
  background: linear-gradient(135deg, #f7b733, #de7a24);
  box-shadow: 0 18px 30px rgba(217, 122, 46, 0.18);
}

.sidebar-nav__item--ghost {
  background: rgba(251, 246, 238, 0.92);
}

.sidebar-nav__icon {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(247, 183, 51, 0.12);
}

.sidebar-nav__icon::before,
.sidebar-nav__icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
}

.sidebar-nav__icon::before {
  width: 16px;
  height: 16px;
  background: currentColor;
  opacity: 0.16;
}

.sidebar-nav__icon::after {
  width: 8px;
  height: 8px;
  background: currentColor;
}

.sidebar-solar {
  padding: 16px;
  border-radius: 26px;
  background: rgba(255, 249, 240, 0.82);
  border: 1px solid rgba(83, 71, 51, 0.08);
}

.sidebar-solar p {
  margin: 12px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.topbar {
  padding: 22px 24px;
  border-radius: 38px;
}

.topbar-copy {
  gap: 6px;
}

.topbar-copy h1 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 0.94;
}

.topbar-nav {
  padding: 8px;
  border-radius: 999px;
  background: rgba(245, 237, 226, 0.88);
}

.topbar-pill {
  font-weight: 700;
}

.topbar-pill.is-active {
  background: #22292d;
  box-shadow: 0 14px 24px rgba(34, 41, 45, 0.18);
}

.top-search {
  min-width: 320px;
}

.profile-pill {
  border-radius: 18px;
  background: rgba(250, 245, 237, 0.92);
  border: 1px solid rgba(82, 68, 46, 0.08);
}

.profile-pill__avatar {
  border-radius: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #f7b733, #de7a24);
}

.dashboard-view,
.overview-hero,
.overview-grid,
.finance-grid,
.reports-grid,
.report-summary-grid,
.status-board,
.receivable-list,
.breakdown-list,
.ranking-list,
.report-actions-list {
  display: grid;
  gap: 22px;
}

.overview-hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.overview-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
}

.overview-grid--single {
  grid-template-columns: 1fr;
}

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

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

.chart-bars {
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
}

.hero-card,
.scene-card,
.metric-card,
.chart-card,
.status-card,
.receivable-card,
.filter-panel,
.table-card,
.health-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card {
  padding: 24px;
  border-radius: 38px;
}

.status-card,
.receivable-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card {
  display: grid;
  align-content: start;
}

.scene-card {
  overflow: hidden;
  color: #fff9f0;
  background: linear-gradient(180deg, rgba(34, 41, 45, 0.97) 0%, rgba(53, 58, 63, 0.94) 38%, rgba(239, 175, 102, 0.9) 100%);
}

.scene-card__copy .overline {
  color: rgba(255, 231, 182, 0.82);
}

.scene-card__copy h2 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 0.94;
}

.scene-card__copy p {
  margin: 0;
  max-width: 440px;
  line-height: 1.75;
  color: rgba(255, 249, 240, 0.78);
}

.metric-card {
  background: rgba(255, 252, 246, 0.92);
}

.metric-card--accent {
  background: linear-gradient(155deg, #2d3438 0%, #3b4146 48%, #f1a63f 180%);
}

.metric-card--accent span,
.metric-card--accent p {
  color: rgba(255, 247, 236, 0.78);
}

.status-card__item,
.receivable-item,
.breakdown-item,
.ranking-item,
.report-summary-item,
.report-action {
  padding: 18px;
  border-radius: 24px;
  background: rgba(249, 243, 233, 0.9);
  border: 1px solid rgba(83, 71, 51, 0.08);
}

.status-card__item {
  cursor: pointer;
  text-align: left;
}

.status-card__item span {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.6);
}

.status-card__item strong,
.status-card__item small,
.report-summary-item small {
  display: block;
}

.status-card__item strong {
  font-size: 1.04rem;
}

.status-card__item small {
  color: var(--text-soft);
  line-height: 1.5;
}

.report-summary-item small {
  margin-top: 0.4rem;
  color: var(--text-soft);
}

.status-card__item.is-active {
  border-color: rgba(217, 122, 46, 0.26);
  box-shadow: inset 0 0 0 1px rgba(247, 183, 51, 0.24);
}

.status-card__item.is-em-producao span { color: #bc6e23; }
.status-card__item.is-em-instalacao span { color: #c2612c; }
.status-card__item.is-a-receber span { color: #277f53; }
.status-card__item.is-finalizado span { color: #58616b; }

.receivable-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.receivable-list--compact .receivable-item {
  grid-template-columns: 1fr;
}

.breakdown-item__top,
.ranking-item__top,
.breakdown-item__meta,
.ranking-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.breakdown-item__bar,
.ranking-item__bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(245, 237, 226, 0.94);
}

.breakdown-item__bar span,
.ranking-item__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.breakdown-item__bar span { background: linear-gradient(135deg, #f7b733, #de7a24); }
.ranking-item__bar span { background: linear-gradient(135deg, #2f3438, #de7a24); }

.filter-panel {
  gap: 18px;
}

.results-pill {
  align-self: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(249, 243, 233, 0.92);
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-soft);
}

.filter-stack {
  gap: 16px;
}

.filter-group {
  display: grid;
  gap: 10px;
}

.filter-group__title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sort-button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.28;
}

.sort-button.is-active {
  color: var(--text-main);
}

.sort-button.is-active::after {
  opacity: 1;
}

.sort-button.is-desc::after {
  transform: rotate(225deg) translateY(-1px);
}

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

.brand-lockup__text,
.filter-stack {
  display: grid;
}

.status-filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-summary-item strong {
  margin-top: 10px;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  line-height: 0.92;
}

.report-action strong {
  display: block;
  font-size: 1rem;
}

.report-action p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.receivable-item__value strong {
  display: block;
  font-size: 1.06rem;
}

.receivable-item__value small {
  color: var(--text-muted);
}

.solar-scene,
.brand-lockup,
.auth-copy,
.auth-preview,
.scene-card__copy {
  position: relative;
  z-index: 2;
}

.solar-scene {
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.solar-scene--auth,
.solar-scene--dashboard {
  background: linear-gradient(180deg, rgba(28, 35, 40, 0.96) 0%, rgba(68, 73, 79, 0.92) 34%, rgba(244, 174, 97, 0.82) 78%, rgba(92, 61, 44, 0.96) 100%);
}

.solar-scene--auth {
  min-height: 320px;
  border-radius: 34px;
}

.solar-scene--dashboard {
  min-height: 300px;
  border-radius: 30px;
}

.solar-scene--mini {
  min-height: 150px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(34, 41, 45, 0.98) 0%, rgba(74, 70, 69, 0.88) 50%, rgba(230, 160, 87, 0.72) 100%);
}

.solar-scene__sun,
.solar-scene__glow,
.solar-scene__horizon,
.solar-scene__panel,
.solar-scene__mountain {
  position: absolute;
}

.solar-scene__sun {
  left: 66%;
  top: 18%;
  width: clamp(110px, 22vw, 180px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 248, 0.96), rgba(255, 226, 149, 0.96) 28%, rgba(247, 183, 51, 0.96) 62%, rgba(222, 122, 36, 0.92) 100%);
  box-shadow:
    0 0 0 26px rgba(255, 229, 170, 0.14),
    0 0 80px rgba(247, 183, 51, 0.46);
  transform: translate(-50%, 0);
  animation: sunset 12s ease-in-out infinite;
}

.solar-scene__glow {
  left: 66%;
  top: 28%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 213, 134, 0.22), transparent 72%);
  animation: glow-pulse 12s ease-in-out infinite;
}

.solar-scene__horizon {
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(53, 40, 33, 0) 0%, rgba(43, 35, 31, 0.48) 34%, rgba(31, 29, 30, 0.94) 100%);
}

.solar-scene__panel {
  bottom: 10%;
  width: 36%;
  height: 18%;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(62, 85, 106, 0.98), rgba(30, 43, 59, 0.98));
  border: 1px solid rgba(202, 222, 255, 0.08);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

.solar-scene__panel::before {
  content: "";
  position: absolute;
  inset: 10% 8%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 100%);
  background-size: 16px 100%, 100% 14px;
  opacity: 0.8;
}

.solar-scene__panel--left {
  left: 8%;
  transform: perspective(400px) rotateX(62deg) rotateZ(-12deg);
}

.solar-scene__panel--right {
  right: 8%;
  transform: perspective(400px) rotateX(62deg) rotateZ(10deg);
}

.solar-scene__mountain {
  bottom: 24%;
  width: 38%;
  height: 26%;
  background: linear-gradient(180deg, rgba(54, 49, 46, 0.18), rgba(33, 31, 34, 0.72));
  clip-path: polygon(0 100%, 18% 62%, 34% 74%, 54% 28%, 80% 68%, 100% 100%);
}

.solar-scene__mountain--left { left: -4%; }
.solar-scene__mountain--right { right: -4%; transform: scaleX(-1); }

@keyframes sunset {
  0%,
  100% { transform: translate(-50%, -4%); }
  50% { transform: translate(-50%, 34%); }
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.94);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -48%) scale(1.04);
  }
}

@media (max-width: 1480px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-tools {
    justify-content: space-between;
  }
}

@media (max-width: 1260px) {
  .auth-shell,
  .dashboard-shell,
  .overview-hero,
  .overview-grid,
  .finance-grid,
  .reports-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-shell {
    padding: 18px;
  }

  .sidebar {
    position: relative;
    top: auto;
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .hero-mini-grid,
  .report-summary-grid,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .topbar-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-pill {
    align-self: flex-start;
  }
}

@media (max-width: 760px) {
  .auth-shell,
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .brand-lockup,
  .sidebar-brand {
    grid-template-columns: 1fr;
  }

  .brand-lockup__badge,
  .sidebar-brand__badge {
    margin: 0 auto;
  }

  .brand-lockup__text,
  .sidebar-brand__content,
  .topbar-copy {
    text-align: center;
  }

  .topbar-nav {
    justify-content: center;
  }
}

@media (max-width: 580px) {
  .topbar,
  .sidebar,
  .hero-card,
  .scene-card,
  .metric-card,
  .chart-card,
  .status-card,
  .receivable-card,
  .filter-panel,
  .table-card,
  .health-card,
  .composition-card,
  .supplier-card,
  .report-summary-card,
  .report-actions-card {
    border-radius: 24px;
  }

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

  .hero-actions,
  .topbar-nav,
  .month-filter-row,
  .status-filter-row {
    flex-direction: column;
  }

  .hero-actions > *,
  .topbar-nav > *,
  .month-filter-row > *,
  .status-filter-row > * {
    width: 100%;
  }
}

/* Stitch alignment */
:root {
  --surface: #f8f9fa;
  --surface-alt: #f3f4f5;
  --line: rgba(131, 117, 96, 0.15);
  --line-strong: rgba(131, 117, 96, 0.24);
  --text-main: #191c1d;
  --text-soft: #5f5e5e;
  --text-muted: #504533;
  --brand: #fdb813;
  --brand-deep: #7c5800;
  --success: #3f6653;
  --danger: #ba1a1a;
  --shadow-md: 0 18px 36px rgba(25, 28, 29, 0.06);
}

body {
  font-family: "Inter", sans-serif;
  background: #f8f9fa;
  color: var(--text-main);
}

.auth-copy h1,
.auth-card h2,
.hero-card h1,
.hero-card h2,
.hero-balance strong,
.section-head h2,
.dialog-head h2,
.metric-card strong,
.topbar-copy h1,
.scene-card__copy h2,
.sidebar-summary strong,
.report-summary-item strong,
.sidebar-brand__content strong {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.overline,
.filter-group__title,
thead th,
.sort-button,
.results-pill,
.hero-balance span,
.mini-card span,
.metric-card span,
.summary-chip span,
.report-summary-item span,
.sidebar-summary__label {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.auth-shell {
  background: linear-gradient(140deg, #fffaf1 0%, #f5e8ce 50%, #e2ba74 100%);
}

.auth-visual {
  background: transparent;
}

.auth-card {
  background: rgba(255, 255, 255, 0.45);
}

.auth-card__inner,
.sidebar,
.topbar,
.hero-card,
.metric-card,
.chart-card,
.status-card,
.receivable-card,
.filter-panel,
.table-card,
.health-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card,
.project-dialog {
  background: #ffffff;
  border: 1px solid transparent;
  box-shadow: var(--shadow-md);
}

.dashboard-shell {
  display: block;
  padding: 0;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 16rem;
  min-height: 100vh;
  height: 100vh;
  border-radius: 0;
  box-shadow: none;
  background: #f8fafc;
  border-right: 1px solid rgba(131, 117, 96, 0.08);
}

.sidebar-summary,
.sidebar-solar {
  display: none;
}

.sidebar-brand {
  gap: 12px;
}

.sidebar-brand__badge {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: var(--brand);
  box-shadow: none;
}

.sidebar-brand__badge img {
  width: 1.9rem;
}

.sidebar-brand__content .overline {
  color: var(--text-soft);
  font-size: 0.56rem;
}

.sidebar-brand__content strong {
  color: var(--brand-deep);
  font-size: 1.45rem;
}

.sidebar-nav__item {
  border-radius: 0.9rem;
  background: transparent;
  box-shadow: none;
  color: #6b7280;
}

.sidebar-nav__item.is-active {
  color: var(--brand-deep);
  background: #ffffff;
  box-shadow: inset 4px 0 0 0 var(--brand);
}

.sidebar-nav__item--ghost {
  background: var(--surface-alt);
  color: var(--text-main);
}

.sidebar-nav__icon {
  background: var(--surface-alt);
}

.sidebar-nav__item.is-active .sidebar-nav__icon {
  background: rgba(253, 184, 19, 0.18);
}

.workspace {
  margin-left: 16rem;
  padding: 1.75rem 2rem 3rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
}

.topbar-copy h1 {
  font-size: 2.2rem;
}

.topbar-nav {
  padding: 0;
  background: transparent;
}

.topbar-pill {
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  color: #6b7280;
}

.topbar-pill.is-active {
  background: #ffffff;
  color: var(--brand-deep);
  box-shadow: inset 0 -3px 0 0 var(--brand);
}

.profile-pill,
.top-search input,
.filter-chip,
.action-button,
.dialog-close,
.field input,
.field select,
.ghost-button {
  background: var(--surface-alt);
  border-color: transparent;
}

.profile-pill__avatar,
.primary-button,
.summary-chip--accent,
.mini-card--accent,
.metric-card--accent {
  background: var(--brand);
  color: #271900;
  box-shadow: none;
}

.primary-button {
  font-weight: 800;
}

.scene-card,
.sidebar-solar {
  display: none;
}

.overview-hero {
  grid-template-columns: 1fr;
}

.hero-card {
  padding-bottom: 1.5rem;
}

.hero-card__copy {
  max-width: 46rem;
}

.stats-grid {
  gap: 1rem;
}

.metric-card {
  min-height: 0;
}

.metric-card strong {
  font-size: 2rem;
}

.chart-bar__track,
.progress-track,
.breakdown-item__bar,
.ranking-item__bar {
  background: var(--surface-alt);
}

.chart-bar__segment--cost {
  background: #d9dadb;
}

.chart-bar__segment--receivable,
.progress-track span,
.breakdown-item__bar span {
  background: var(--brand);
}

.ranking-item__bar span {
  background: var(--success);
}

.status-card__item,
.receivable-item,
.breakdown-item,
.ranking-item,
.report-summary-item,
.report-action,
.insight-card,
.summary-chip,
.mini-card {
  background: var(--surface-alt);
  border: 0;
  box-shadow: none;
}

.status-pill.a-receber,
.value-good {
  color: var(--success);
}

.status-pill.finalizado {
  color: #6b7280;
}

.status-pill.em-producao,
.status-pill.em-instalacao {
  color: var(--brand-deep);
}

.table-shell {
  background: var(--surface-alt);
  border: 0;
}

thead th {
  background: transparent;
}

tbody td {
  border-top-color: rgba(131, 117, 96, 0.08);
}

.installation-column {
  border-radius: 1.25rem;
  background: var(--surface-alt);
  padding: 1rem;
}

.installation-column .section-head {
  margin-bottom: 0.75rem;
}

@media (max-width: 1260px) {
  .sidebar {
    position: relative;
    width: auto;
    height: auto;
    min-height: auto;
    border-radius: 1.25rem;
    border-right: 0;
  }

  .workspace {
    margin-left: 0;
  }
}

/* Dark mode refinement aligned to Stitch */
:root {
  --surface: #0d131a;
  --surface-alt: #111924;
  --surface-soft: #151f2c;
  --surface-strong: #0b1016;
  --line: rgba(213, 196, 172, 0.1);
  --line-strong: rgba(213, 196, 172, 0.16);
  --text-main: #f3f5f7;
  --text-soft: rgba(232, 236, 240, 0.72);
  --text-muted: rgba(232, 236, 240, 0.5);
  --brand: #fdb813;
  --brand-deep: #ffcf55;
  --success: #79c49d;
  --danger: #ff9a88;
  --shadow-md: 0 24px 50px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 34px 80px rgba(0, 0, 0, 0.34);
}

html {
  color-scheme: dark;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(253, 184, 19, 0.12), transparent 24%),
    linear-gradient(180deg, #090d12 0%, #0d131a 100%);
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.auth-copy h1,
.auth-card h2,
.hero-card h1,
.hero-card h2,
.hero-balance strong,
.section-head h2,
.dialog-head h2,
.metric-card strong,
.topbar-copy h1,
.sidebar-brand__content strong,
.report-summary-item strong {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.overline {
  color: rgba(253, 184, 19, 0.78);
}

.auth-shell {
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 500px);
  background: linear-gradient(135deg, #080c11 0%, #0e141d 54%, #121b27 100%);
}

.auth-visual {
  justify-content: center;
  gap: 32px;
  padding: 56px 64px;
  background:
    radial-gradient(circle at top left, rgba(253, 184, 19, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(11, 16, 22, 0.92), rgba(13, 19, 26, 0.98));
}

.auth-visual::before,
.auth-visual::after {
  display: none;
}

.solar-scene,
.solar-scene--auth,
.solar-scene--dashboard,
.solar-scene--mini,
.scene-card,
.sidebar-solar {
  display: none !important;
}

.brand-lockup {
  align-items: center;
}

.brand-lockup__badge,
.sidebar-brand__badge {
  background: linear-gradient(180deg, rgba(253, 184, 19, 0.16), rgba(253, 184, 19, 0.06));
  border: 1px solid rgba(253, 184, 19, 0.16);
  box-shadow: none;
}

.brand-lockup__badge img,
.sidebar-brand__badge img {
  filter: saturate(1.04) brightness(1.02);
}

.brand-lockup__text strong,
.sidebar-brand__content strong {
  color: #ffffff;
}

.brand-lockup__text span,
.sidebar-brand__content span,
.topbar-copy span,
.scene-card__copy p,
.receivable-item__meta,
.ranking-item__meta,
.breakdown-item__meta,
.sidebar-summary small,
.report-action p,
.auth-copy p:last-child,
.auth-lead,
.auth-feedback,
.auth-footer span,
.profile-pill span,
.progress-meta span,
.table-empty p,
.database-note span,
.client-cell small,
.insight-card small {
  color: var(--text-soft);
}

.auth-copy {
  max-width: 760px;
}

.auth-copy h1 {
  margin-top: 0;
  max-width: 12ch;
  font-size: clamp(3rem, 5vw, 5.6rem);
  line-height: 0.92;
  color: #ffffff;
}

.auth-copy p:last-child {
  margin: 0;
  max-width: 52ch;
}

.auth-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(900px, 100%);
}

.preview-card {
  min-width: 0;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(18, 27, 39, 0.9);
  border: 1px solid rgba(213, 196, 172, 0.1);
  box-shadow: none;
}

.preview-card span {
  color: var(--text-muted);
}

.preview-card strong {
  color: #ffffff;
}

.preview-card--highlight {
  background: linear-gradient(135deg, rgba(253, 184, 19, 0.18), rgba(253, 184, 19, 0.08));
  border-color: rgba(253, 184, 19, 0.18);
}

.auth-card {
  background: linear-gradient(180deg, rgba(8, 12, 17, 0.72), rgba(8, 12, 17, 0.94));
}

.auth-card__inner {
  background: rgba(13, 19, 26, 0.92);
  border: 1px solid rgba(213, 196, 172, 0.1);
  box-shadow: var(--shadow-lg);
}

.auth-toggle {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(213, 196, 172, 0.08);
}

.auth-toggle__button {
  color: var(--text-soft);
}

.auth-toggle__button.is-active {
  color: #11151c;
  background: linear-gradient(135deg, #fdb813, #f3c852);
  box-shadow: none;
}

.field span {
  color: rgba(255, 255, 255, 0.9);
}

.field input,
.field select,
.top-search input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(213, 196, 172, 0.08);
  color: #ffffff;
}

.field input::placeholder,
.top-search input::placeholder {
  color: rgba(232, 236, 240, 0.42);
}

.field input:focus,
.field select:focus,
.top-search input:focus {
  border-color: rgba(253, 184, 19, 0.34);
  box-shadow: 0 0 0 4px rgba(253, 184, 19, 0.12);
}

#aReceberInput {
  background: rgba(253, 184, 19, 0.12);
  border-color: rgba(253, 184, 19, 0.16);
  color: #ffe19b;
}

.primary-button {
  color: #12161d;
  background: linear-gradient(135deg, #fdb813, #f3c852);
  box-shadow: none;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(213, 196, 172, 0.08);
  color: #ffffff;
}

.dashboard-shell {
  background: linear-gradient(180deg, #090d12 0%, #0d131a 100%);
}

.sidebar {
  background: rgba(8, 12, 17, 0.94);
  border-right: 1px solid rgba(213, 196, 172, 0.08);
}

.sidebar-summary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(213, 196, 172, 0.08);
  box-shadow: none;
}

.sidebar-summary__label {
  color: var(--text-muted);
}

.sidebar-brand {
  align-items: center;
}

.sidebar-brand__badge {
  width: 52px;
  height: 52px;
  border-radius: 18px;
}

.sidebar-brand__content .overline {
  font-size: 0.58rem;
}

.sidebar-nav__item {
  background: transparent;
  color: rgba(232, 236, 240, 0.62);
  border: 1px solid transparent;
}

.sidebar-nav__item:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: none;
}

.topbar-pill:hover,
.filter-chip:hover,
.action-button:hover,
.dialog-close:hover {
  transform: none;
}

.sidebar-nav__item.is-active {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  box-shadow: inset 3px 0 0 0 var(--brand);
}

.sidebar-nav__item--ghost {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 1.15rem;
}

.sidebar-nav__icon::before,
.sidebar-nav__icon::after {
  content: none;
}

.sidebar-nav__item.is-active .sidebar-nav__icon {
  background: rgba(253, 184, 19, 0.16);
  color: #ffe39b;
}

.workspace {
  background: transparent;
}

.topbar,
.hero-card,
.metric-card,
.chart-card,
.status-card,
.receivable-card,
.filter-panel,
.table-card,
.health-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card,
.project-dialog {
  background: rgba(16, 23, 32, 0.94);
  border: 1px solid rgba(213, 196, 172, 0.08);
  box-shadow: none;
}

.topbar {
  background: rgba(13, 19, 26, 0.86);
  border-color: rgba(213, 196, 172, 0.06);
}

.topbar-tools {
  align-items: center;
}

.topbar-copy h1 {
  color: #ffffff;
}

.topbar-nav {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar-nav::-webkit-scrollbar {
  display: none;
}

.topbar-pill {
  color: var(--text-soft);
  white-space: nowrap;
}

.topbar-pill.is-active {
  background: rgba(253, 184, 19, 0.14);
  color: #ffe39b;
  box-shadow: none;
}

.profile-pill,
.top-search input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(213, 196, 172, 0.08);
}

.top-search span {
  color: var(--text-muted);
}

.profile-pill__avatar {
  background: linear-gradient(135deg, #fdb813, #f3c852);
  color: #11151c;
}

.overview-hero {
  grid-template-columns: 1fr;
}

.hero-card,
.chart-card,
.status-card,
.receivable-card,
.health-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card,
.table-card,
.filter-panel {
  padding: 26px;
  border-radius: 30px;
}

.hero-card__copy {
  color: var(--text-soft);
}

.hero-balance span,
.mini-card span,
.metric-card span,
.summary-chip span,
.report-summary-item span,
.results-pill {
  color: var(--text-muted);
}

.results-pill {
  background: rgba(255, 255, 255, 0.04);
}

.filter-chip {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  border: 1px solid rgba(213, 196, 172, 0.06);
}

.filter-chip.is-active {
  background: rgba(253, 184, 19, 0.14);
  color: #ffe39b;
  border-color: rgba(253, 184, 19, 0.16);
  box-shadow: none;
}

.mini-card,
.status-card__item,
.receivable-item,
.breakdown-item,
.ranking-item,
.report-summary-item,
.report-action,
.insight-card,
.summary-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(213, 196, 172, 0.06);
}

.mini-card--accent,
.summary-chip--accent,
.metric-card--accent {
  background: linear-gradient(135deg, rgba(253, 184, 19, 0.18), rgba(253, 184, 19, 0.08));
  color: #fff6dd;
  border-color: rgba(253, 184, 19, 0.12);
}

.metric-card--accent span,
.metric-card--accent p {
  color: rgba(255, 246, 221, 0.74);
}

.metric-card p,
.results-pill,
.report-action p,
.database-note span,
.progress-meta span {
  color: var(--text-soft);
}

.chart-bar__track,
.progress-track,
.breakdown-item__bar,
.ranking-item__bar,
.table-shell {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(213, 196, 172, 0.06);
}

.chart-bar__segment--cost {
  background: rgba(255, 255, 255, 0.22);
}

.chart-bar__segment--receivable,
.progress-track span,
.breakdown-item__bar span {
  background: linear-gradient(180deg, #fdb813, #e3a200);
}

.ranking-item__bar span {
  background: linear-gradient(180deg, #7fc89f, #4d8d69);
}

.status-card__item span {
  background: rgba(255, 255, 255, 0.05);
}

.status-card__item.is-active {
  border-color: rgba(253, 184, 19, 0.16);
  box-shadow: inset 0 0 0 1px rgba(253, 184, 19, 0.16);
}

.table-shell {
  border: 1px solid rgba(213, 196, 172, 0.06);
}

thead th {
  background: rgba(255, 255, 255, 0.02);
  color: rgba(232, 236, 240, 0.46);
}

.sort-button {
  color: inherit;
}

.sort-button::after {
  border-color: currentColor;
}

tbody td {
  color: var(--text-soft);
  border-top: 1px solid rgba(213, 196, 172, 0.06);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.action-button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(213, 196, 172, 0.06);
  color: #ffffff;
}

.action-button--danger {
  background: rgba(255, 154, 136, 0.08);
  color: #ffc4b8;
}

.database-note {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(213, 196, 172, 0.06);
}

.auth-footer a,
.database-note a {
  color: #ffe39b;
}

.value-good {
  color: #97dbb2;
}

.value-risk {
  color: #ffb0a1;
}

.status-pill.em-producao,
.status-pill.em-instalacao {
  background: rgba(253, 184, 19, 0.1);
  color: #ffd86f;
}

.status-pill.a-receber {
  background: rgba(127, 200, 159, 0.12);
  color: #a9dfc2;
}

.status-pill.finalizado {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.66);
}

.project-dialog {
  background: rgba(13, 19, 26, 0.98);
  border: 1px solid rgba(213, 196, 172, 0.08);
}

.project-dialog::backdrop {
  background: rgba(3, 6, 10, 0.74);
  backdrop-filter: blur(10px);
}

.project-form {
  background: transparent;
}

.dialog-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(213, 196, 172, 0.08);
  color: #ffffff;
}

.toast {
  background: #111722;
  color: #ffffff;
  border: 1px solid rgba(213, 196, 172, 0.08);
  box-shadow: var(--shadow-md);
}

.toast.is-success {
  background: #153322;
}

.toast.is-error {
  background: #3c1814;
}

.installation-column {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(213, 196, 172, 0.06);
}

.report-summary-item strong,
.metric-card strong,
.hero-balance strong,
.sidebar-summary strong,
.auth-card h2 {
  color: #ffffff;
}

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

  .auth-visual {
    padding: 40px 28px 20px;
  }

  .auth-preview {
    grid-template-columns: 1fr;
  }

  .sidebar {
    background: rgba(8, 12, 17, 0.9);
    border-radius: 0 0 24px 24px;
  }
}

/* Logo refinement + nav contrast */
.brand-lockup {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
}

.brand-lockup__media {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 158px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  flex-shrink: 0;
}

.brand-lockup__logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: none;
}

.brand-lockup__text {
  display: grid;
  gap: 0.45rem;
}

.sidebar-brand {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}

.sidebar-brand__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 11px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(253, 184, 19, 0.18), rgba(253, 184, 19, 0.05)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(253, 184, 19, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 28px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.sidebar-brand__logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: none;
}

.sidebar-brand__content .overline {
  font-size: 0.62rem;
  color: rgba(253, 184, 19, 0.8);
}

.sidebar-brand__content strong {
  font-size: 1.12rem;
  color: #ffffff;
}

.sidebar-brand__content span {
  color: var(--text-soft);
}

.topbar-nav {
  gap: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(213, 196, 172, 0.08);
  border-radius: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 0;
  padding: 0.75rem 1.05rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(232, 236, 240, 0.86);
  font-weight: 700;
  white-space: nowrap;
}

.topbar-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.topbar-pill.is-active {
  background: rgba(253, 184, 19, 0.16);
  border-color: rgba(253, 184, 19, 0.24);
  color: #ffe08e;
}

.sidebar-nav__item {
  min-height: 60px;
  border-radius: 18px;
}

.sidebar-nav__content strong {
  color: inherit;
}

.sidebar-nav__content small {
  color: inherit;
  opacity: 0.72;
}

@media (max-width: 760px) {
  .brand-lockup {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 18px;
  }

  .brand-lockup__media {
    width: 132px;
  }

  .sidebar-brand {
    grid-template-columns: auto 1fr;
  }

  .topbar-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

/* Final layout calibration */
html,
body {
  overflow-x: hidden;
}

body,
input,
select,
button,
textarea {
  font-family: "Inter", sans-serif;
}

body {
  font-size: 15px;
  line-height: 1.5;
}

.auth-copy h1,
.auth-card h2,
.topbar-copy h1,
.hero-card h2,
.hero-balance strong,
.section-head h2,
.dialog-head h2,
.metric-card strong,
.sidebar-summary strong,
.report-summary-item strong {
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.04em;
}

.auth-shell {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: 24px;
  gap: 24px;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 430px);
  align-items: stretch;
}

.auth-visual {
  min-width: 0;
  padding: 40px 42px;
  border-radius: 32px;
}

.brand-lockup__media {
  width: 150px;
}

.brand-lockup__text strong {
  font-size: 1.5rem;
  color: #ffffff;
}

.brand-lockup__text span {
  color: var(--text-soft);
  line-height: 1.55;
}

.auth-copy {
  max-width: 620px;
}

.auth-copy h1 {
  max-width: 10ch;
  margin-top: 14px;
  font-size: clamp(2.7rem, 4vw, 4.35rem);
  line-height: 0.98;
}

.auth-copy p:last-child {
  max-width: 58ch;
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.7;
}

.auth-preview {
  gap: 14px;
}

.preview-card,
.preview-card--highlight {
  min-width: 0;
  flex: 1 1 180px;
}

.preview-card--highlight {
  background: linear-gradient(135deg, rgba(253, 184, 19, 0.22), rgba(253, 184, 19, 0.08));
  border-color: rgba(253, 184, 19, 0.18);
}

.auth-card {
  padding: 0;
  background: transparent;
}

.auth-card__inner {
  width: min(100%, 430px);
  min-height: 100%;
  padding: 32px;
  gap: 16px;
  border-radius: 32px;
}

.auth-card h2 {
  font-size: clamp(2.2rem, 3vw, 3rem);
  line-height: 0.98;
}

.auth-lead {
  font-size: 0.98rem;
  line-height: 1.65;
}

.auth-form {
  gap: 14px;
}

.field span {
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.field input,
.field select,
.primary-button,
.ghost-button,
.dark-button {
  min-height: 52px;
}

.auth-footer {
  justify-content: flex-start;
  font-size: 0.82rem;
}

.dashboard-shell {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 24px;
  gap: 22px;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  min-width: 0;
  gap: 18px;
  padding: 18px;
  border-radius: 28px;
}

.workspace {
  min-width: 0;
  gap: 22px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px 20px;
  align-items: start;
  padding: 20px 22px;
  border-radius: 28px;
}

.topbar-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.topbar-copy h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1;
}

.topbar-copy span {
  max-width: 68ch;
  line-height: 1.55;
}

.topbar-tools {
  grid-column: 2;
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.top-search {
  min-width: 0;
  width: 100%;
}

.top-search input {
  width: 100%;
  min-height: 52px;
}

.profile-pill {
  width: 100%;
  min-width: 0;
}

.profile-pill > div:last-child {
  min-width: 0;
}

.profile-pill strong,
.profile-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-nav {
  grid-column: 1 / -1;
  width: 100%;
  justify-content: flex-start;
  flex-wrap: wrap;
  overflow: visible;
  gap: 8px;
}

.topbar-pill {
  min-height: 44px;
  padding: 0.72rem 1rem;
  font-size: 0.94rem;
  line-height: 1;
}

.hero-card,
.chart-card,
.status-card,
.receivable-card,
.filter-panel,
.table-card,
.health-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card,
.project-dialog {
  padding: 22px;
  border-radius: 28px;
}

.hero-card__copy,
.metric-card p,
.report-summary-item span,
.insight-card small {
  line-height: 1.65;
}

.section-head h2 {
  font-size: 1.55rem;
  line-height: 1.05;
}

.table-card {
  min-width: 0;
  overflow: hidden;
}

.table-shell,
.projects-table {
  min-width: 0;
}

.projects-table {
  width: 100%;
}

@media (max-width: 1260px) {
  .auth-shell,
  .dashboard-shell {
    padding: 18px;
  }

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

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

  .topbar-tools {
    grid-column: 1;
  }
}

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

  .auth-visual {
    padding: 32px 24px;
  }

  .auth-card__inner {
    width: 100%;
    padding: 28px;
  }

  .hero-grid,
  .stats-grid,
  .reports-grid,
  .bottom-grid,
  .dialog-grid,
  .overview-hero {
    grid-template-columns: 1fr;
  }

  .topbar-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topbar-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .brand-lockup {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .brand-lockup__media {
    width: 126px;
  }

  .auth-copy h1 {
    font-size: clamp(2.15rem, 11vw, 2.9rem);
  }

  .topbar-copy h1 {
    font-size: 1.72rem;
  }

  .hero-mini-grid {
    grid-template-columns: 1fr;
  }
}

/* Financial product polish v2 */
:root {
  --bg: #0b1016;
  --bg-elevated: #101720;
  --surface: rgba(18, 25, 34, 0.94);
  --surface-alt: rgba(23, 32, 43, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.03);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(253, 184, 19, 0.18);
  --text-main: #f3f6fa;
  --text-soft: #a4afbb;
  --text-muted: #738191;
  --brand: #fdb813;
  --brand-deep: #c98c07;
  --success: #53c98a;
  --danger: #ff8a7a;
  --shadow-md: 0 18px 44px rgba(2, 6, 12, 0.28);
  --shadow-lg: 0 28px 64px rgba(2, 6, 12, 0.38);
}

body,
input,
select,
button,
textarea {
  font-family: "Inter", sans-serif;
}

body {
  margin: 0;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(253, 184, 19, 0.14), transparent 22%),
    radial-gradient(circle at right 12%, rgba(253, 184, 19, 0.07), transparent 18%),
    linear-gradient(180deg, #0b1016 0%, #0d131b 100%);
}

.auth-copy h1,
.auth-card h2,
.topbar-copy h1,
.hero-card h2,
.hero-balance strong,
.section-head h2,
.dialog-head h2,
.metric-card strong,
.sidebar-summary strong,
.report-summary-item strong {
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.045em;
}

.overline {
  color: rgba(253, 184, 19, 0.82);
}

.auth-shell {
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 24px;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  align-items: stretch;
}

.auth-visual,
.auth-card__inner {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.auth-visual {
  min-width: 0;
  padding: 40px 42px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(253, 184, 19, 0.12), transparent 24%),
    linear-gradient(160deg, rgba(17, 24, 33, 0.98), rgba(13, 19, 27, 0.98));
}

.auth-copy {
  max-width: 660px;
}

.auth-copy h1 {
  margin-top: 14px;
  max-width: 10ch;
  font-size: clamp(2.85rem, 4.4vw, 4.75rem);
  line-height: 0.96;
}

.auth-copy p:last-child {
  max-width: 58ch;
  color: var(--text-soft);
}

.auth-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.preview-card {
  min-width: 0;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.preview-card--highlight {
  background: linear-gradient(145deg, rgba(253, 184, 19, 0.16), rgba(253, 184, 19, 0.06));
  border-color: rgba(253, 184, 19, 0.18);
}

.auth-card {
  padding: 0;
  background: transparent;
}

.auth-card__inner {
  width: 100%;
  padding: 32px;
  gap: 16px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(16, 23, 32, 0.98), rgba(12, 18, 26, 0.98));
}

.auth-card h2 {
  font-size: clamp(2.2rem, 3vw, 2.9rem);
  line-height: 0.98;
}

.auth-lead,
.auth-feedback,
.auth-footer span {
  color: var(--text-soft);
}

.field span {
  color: #d9e0e7;
}

.field input,
.field select {
  min-height: 52px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.field input::placeholder {
  color: #7f8b98;
}

.field input:focus,
.field select:focus {
  border-color: rgba(253, 184, 19, 0.26);
  box-shadow: 0 0 0 4px rgba(253, 184, 19, 0.08);
}

.primary-button {
  color: #241806;
  background: linear-gradient(135deg, #fdb813, #ffd46c);
  box-shadow: 0 14px 26px rgba(253, 184, 19, 0.18);
}

.ghost-button,
.dark-button,
.dialog-close,
.action-button {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

#aReceberInput {
  color: #ffd770;
  background: rgba(253, 184, 19, 0.08);
  border-color: rgba(253, 184, 19, 0.16);
}

.dashboard-shell {
  display: grid;
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 24px;
  gap: 24px;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 24px;
  left: auto;
  width: auto;
  height: auto;
  min-height: calc(100vh - 48px);
  gap: 18px;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(16, 23, 32, 0.98), rgba(12, 18, 26, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-md);
}

.sidebar-brand {
  align-items: center;
  gap: 14px;
}

.sidebar-brand__media {
  width: 54px;
  height: 54px;
  padding: 10px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(253, 184, 19, 0.18), rgba(253, 184, 19, 0.06)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(253, 184, 19, 0.18);
  box-shadow: none;
}

.sidebar-brand__content strong,
.topbar-copy h1,
.section-head h2 {
  color: #ffffff;
}

.sidebar-summary {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(253, 184, 19, 0.16), rgba(253, 184, 19, 0.05));
  border: 1px solid rgba(253, 184, 19, 0.12);
}

.sidebar-summary__label {
  color: rgba(255, 227, 171, 0.82);
}

.sidebar-summary strong {
  margin-top: 8px;
  font-size: 1.85rem;
}

.sidebar-nav {
  gap: 8px;
}

.sidebar-nav__item {
  min-height: 56px;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: transparent;
  border: 1px solid transparent;
  color: #9aa7b5;
}

.sidebar-nav__item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #eef3f8;
}

.sidebar-nav__item.is-active {
  color: #fff9ef;
  background: rgba(253, 184, 19, 0.13);
  border-color: rgba(253, 184, 19, 0.16);
  box-shadow: inset 3px 0 0 0 var(--brand);
}

.sidebar-nav__icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
}

.sidebar-nav__item.is-active .sidebar-nav__icon {
  background: rgba(253, 184, 19, 0.14);
  color: #ffe39b;
}

.workspace {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 24px;
}

.dashboard-views,
.dashboard-view,
.overview-hero,
.overview-grid,
.finance-grid,
.reports-grid,
.report-summary-grid,
.status-board,
.receivable-list,
.breakdown-list,
.ranking-list,
.report-actions-list,
.insight-list {
  display: grid;
  gap: 16px;
}

.dashboard-view,
.overview-hero,
.overview-grid,
.finance-grid,
.reports-grid {
  align-items: start;
}

.overview-hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.overview-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
}

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

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

.topbar,
.hero-card,
.scene-card,
.metric-card,
.chart-card,
.status-card,
.receivable-card,
.filter-panel,
.table-card,
.health-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card,
.project-dialog {
  min-width: 0;
  background: linear-gradient(180deg, rgba(18, 25, 34, 0.96), rgba(14, 20, 28, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.topbar {
  position: relative;
  top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "copy tools"
    "nav nav";
  gap: 18px 20px;
  align-items: center;
  padding: 24px 28px;
  border-radius: 28px;
}

.topbar-copy {
  grid-area: copy;
  min-width: 0;
  gap: 6px;
}

.topbar-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 3vw, 2.85rem);
  line-height: 0.98;
}

.topbar-copy span {
  max-width: 68ch;
  color: var(--text-soft);
  line-height: 1.55;
}

.topbar-tools {
  grid-area: tools;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
  min-width: 0;
  width: min(100%, 680px);
}

.top-search {
  position: relative;
  min-width: 0;
  flex: 1 1 380px;
  width: clamp(320px, 30vw, 420px);
}

.top-search span:not(.top-search__icon) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.top-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #7f8b97;
  pointer-events: none;
}

.top-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 44px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.top-search input::placeholder {
  color: #7f8b98;
}

.profile-pill {
  min-width: 220px;
  max-width: 280px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-pill__avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #221907;
  background: linear-gradient(135deg, #fdb813, #ffd46c);
  font-weight: 800;
}

.profile-pill > div:last-child {
  min-width: 0;
}

.profile-pill strong,
.profile-pill span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-pill span {
  color: var(--text-soft);
}

.topbar-nav {
  grid-area: nav;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  flex-wrap: wrap;
  overflow: visible;
}

.topbar-pill,
.filter-chip {
  min-height: 42px;
  padding: 0.72rem 1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: #b2bcc8;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-pill:hover,
.filter-chip:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.topbar-pill.is-active,
.filter-chip.is-active {
  background: rgba(253, 184, 19, 0.14);
  border-color: rgba(253, 184, 19, 0.2);
  color: #ffd770;
  box-shadow: none;
}

.hero-card,
.scene-card,
.metric-card,
.chart-card,
.status-card,
.receivable-card,
.filter-panel,
.table-card,
.health-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card,
.project-dialog {
  padding: 22px;
  border-radius: 24px;
}

.hero-card {
  background: linear-gradient(180deg, rgba(17, 24, 33, 0.98), rgba(14, 20, 28, 0.96));
}

.hero-card__copy {
  margin: 14px 0 0;
  max-width: 56ch;
  color: var(--text-soft);
  line-height: 1.65;
}

.hero-balance span,
.mini-card span,
.metric-card span,
.summary-chip span {
  color: var(--text-muted);
}

.hero-balance strong {
  margin-top: 8px;
  font-size: clamp(2.2rem, 3vw, 3rem);
  line-height: 0.95;
  color: #ffffff;
}

.hero-actions {
  gap: 12px;
  margin-top: 20px;
}

.hero-mini-grid {
  gap: 12px;
  margin-top: 20px;
}

.mini-card,
.metric-card,
.status-card__item,
.receivable-item,
.breakdown-item,
.ranking-item,
.report-summary-item,
.report-action,
.insight-card,
.summary-chip {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.mini-card {
  padding: 16px 18px;
}

.mini-card--accent,
.metric-card--accent,
.summary-chip--accent {
  background: linear-gradient(145deg, rgba(253, 184, 19, 0.16), rgba(253, 184, 19, 0.06));
  border-color: rgba(253, 184, 19, 0.18);
}

.metric-card {
  min-height: 0;
  padding: 20px;
}

.metric-card strong {
  margin: 14px 0 8px;
  font-size: clamp(1.9rem, 2.5vw, 2.4rem);
  line-height: 0.98;
  color: #ffffff;
}

.metric-card p {
  color: var(--text-soft);
  line-height: 1.6;
}

.scene-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 100%;
  color: #ffffff;
  background: linear-gradient(160deg, rgba(18, 25, 34, 0.98), rgba(20, 30, 41, 0.98));
}

.scene-card__copy {
  gap: 10px;
}

.scene-card__copy h2 {
  margin: 0;
  font-size: clamp(1.85rem, 2.5vw, 2.45rem);
  line-height: 1.02;
  color: #ffffff;
}

.scene-card__copy p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.chart-card,
.status-card,
.receivable-card,
.health-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card,
.filter-panel {
  align-content: start;
}

.section-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  margin-top: 6px;
  font-size: 1.46rem;
  line-height: 1.06;
}

.chart-bars {
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 12px;
  min-height: 250px;
}

.chart-bar__track {
  height: 172px;
  background: rgba(255, 255, 255, 0.04);
}

.chart-bar__segment--cost {
  background: #617282;
}

.chart-bar__segment--receivable {
  background: linear-gradient(180deg, #fdb813, #ffd46c);
}

.status-board,
#installationSummary,
.report-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.status-card__item {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 154px;
  padding: 18px 20px;
  text-align: left;
}

.status-card__item span {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  color: #d7dee6;
}

.status-card__item strong {
  font-family: "Manrope", sans-serif;
  font-size: 2.4rem;
  line-height: 0.96;
  color: #ffffff;
}

.status-card__item small {
  color: var(--text-soft);
  line-height: 1.45;
}

.status-card__item em {
  font-style: normal;
  font-size: 0.82rem;
  color: #d2dbe5;
}

.status-card__item.is-active {
  border-color: rgba(253, 184, 19, 0.22);
  box-shadow: inset 0 0 0 1px rgba(253, 184, 19, 0.16);
}

.status-card__item.is-em-producao span {
  color: #ffbf59;
  background: rgba(255, 191, 89, 0.12);
  border-color: rgba(255, 191, 89, 0.18);
}

.status-card__item.is-em-instalacao span {
  color: #ff9e62;
  background: rgba(255, 158, 98, 0.12);
  border-color: rgba(255, 158, 98, 0.16);
}

.status-card__item.is-a-receber span {
  color: #6cd29d;
  background: rgba(108, 210, 157, 0.12);
  border-color: rgba(108, 210, 157, 0.16);
}

.status-card__item.is-finalizado span {
  color: #aeb8c5;
  background: rgba(174, 184, 197, 0.12);
  border-color: rgba(174, 184, 197, 0.16);
}

.progress-track,
.breakdown-item__bar,
.ranking-item__bar {
  background: rgba(255, 255, 255, 0.05);
}

.progress-track span,
.breakdown-item__bar span {
  background: linear-gradient(90deg, #fdb813, #ffd46c);
}

.ranking-item__bar span {
  background: linear-gradient(90deg, rgba(253, 184, 19, 0.86), rgba(253, 184, 19, 0.3));
}

.receivable-item,
.breakdown-item,
.ranking-item,
.report-summary-item,
.report-action,
.insight-card {
  padding: 18px 20px;
  border-radius: 20px;
}

.receivable-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.receivable-item__title,
.receivable-item__value {
  gap: 4px;
}

.receivable-item__title strong,
.breakdown-item__top strong:first-child,
.ranking-item__top strong:first-child,
.report-action strong,
.insight-card strong {
  color: #ffffff;
}

.receivable-item__meta,
.breakdown-item__meta,
.ranking-item__meta,
.report-action p,
.insight-card span,
.insight-card small {
  color: var(--text-soft);
}

.value-good {
  color: #7ee4ab;
}

.value-risk {
  color: #ff9b8d;
}

.results-pill,
.database-note,
.summary-chip {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-stack,
.filter-group {
  display: grid;
  gap: 12px;
}

.month-filter-row,
.status-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-group__title,
.sort-button,
thead th {
  color: #7f8c9a;
}

.table-card {
  overflow: hidden;
}

.table-shell {
  margin-top: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

table {
  min-width: 980px;
}

thead th {
  background: rgba(18, 25, 34, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tbody td {
  color: #d9e1ea;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

tbody tr {
  background: transparent;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.client-cell small,
.database-note span {
  color: var(--text-soft);
}

.status-pill {
  border: 1px solid transparent;
}

.status-pill.em-producao {
  color: #ffbf59;
  background: rgba(255, 191, 89, 0.12);
}

.status-pill.em-instalacao {
  color: #ff9e62;
  background: rgba(255, 158, 98, 0.12);
}

.status-pill.a-receber {
  color: #6cd29d;
  background: rgba(108, 210, 157, 0.12);
}

.status-pill.finalizado {
  color: #b2bfcd;
  background: rgba(178, 191, 205, 0.12);
}

.action-button {
  min-height: 38px;
}

.action-button--danger {
  color: #ffb19f;
  background: rgba(255, 110, 110, 0.08);
  border-color: rgba(255, 110, 110, 0.12);
}

.project-dialog {
  width: min(1080px, calc(100% - 32px));
  background: linear-gradient(180deg, rgba(16, 23, 32, 0.98), rgba(12, 18, 26, 0.98));
}

.project-dialog::backdrop {
  background: rgba(3, 6, 10, 0.76);
  backdrop-filter: blur(10px);
}

.project-form {
  padding: 28px;
}

.dialog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.summary-chip strong,
.report-summary-item strong {
  color: #ffffff;
}

#installationBoard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.installation-column {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.installation-column .section-head {
  margin: 0;
}

.installation-column .insight-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.toast {
  background: rgba(17, 23, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-md);
}

.toast.is-success {
  background: #143021;
}

.toast.is-error {
  background: #3c1916;
}

@media (max-width: 1280px) {
  .dashboard-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .overview-hero,
  .overview-grid,
  .finance-grid,
  .reports-grid {
    grid-template-columns: 1fr;
  }

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

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

  .sidebar {
    position: relative;
    top: auto;
    min-height: 0;
  }

  .topbar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "tools"
      "nav";
  }

  .topbar-tools {
    justify-self: stretch;
    flex-wrap: wrap;
  }

  .top-search {
    flex: 1 1 320px;
    width: 100%;
  }
}

@media (max-width: 960px) {
  .auth-shell,
  .dashboard-shell {
    padding: 18px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    padding: 32px 24px;
  }

  .auth-preview,
  .stats-grid,
  #installationBoard,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .topbar-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topbar-nav::-webkit-scrollbar {
    display: none;
  }

  .profile-pill {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .topbar,
  .hero-card,
  .scene-card,
  .metric-card,
  .chart-card,
  .status-card,
  .receivable-card,
  .filter-panel,
  .table-card,
  .health-card,
  .composition-card,
  .supplier-card,
  .report-summary-card,
  .report-actions-card,
  .project-form {
    padding: 18px;
  }

  .topbar-copy h1 {
    font-size: 1.8rem;
  }

  .hero-mini-grid {
    grid-template-columns: 1fr;
  }

  .database-note,
  .dialog-head,
  .dialog-actions,
  .auth-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Premium dashboard refinements */
body {
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(253, 184, 19, 0.14), transparent 18%),
    radial-gradient(circle at left 20%, rgba(42, 79, 110, 0.14), transparent 24%),
    linear-gradient(180deg, #050a10 0%, #091119 100%);
}

.auth-copy h1,
.auth-card h2,
.hero-card h1,
.hero-card h2,
.hero-balance strong,
.section-head h2,
.dialog-head h2,
.metric-card strong,
.topbar-copy h1,
.summary-chip strong {
  font-family: "Sora", "Manrope", sans-serif;
  letter-spacing: -0.05em;
}

.workspace {
  gap: 18px;
}

.dashboard-views,
.dashboard-view,
.overview-grid,
.finance-grid,
.reports-grid,
.report-summary-grid,
.status-board,
.receivable-list,
.breakdown-list,
.ranking-list,
.report-actions-list,
.insight-list {
  gap: 14px;
}

.topbar {
  gap: 16px 18px;
  padding: 22px 24px;
  border-radius: 26px;
}

.topbar-copy span {
  max-width: 58ch;
}

.topbar-nav {
  gap: 6px;
  padding: 5px;
}

.topbar-pill,
.filter-chip {
  min-height: 40px;
  padding: 0.68rem 0.95rem;
}

.overview-hero {
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 18px;
}

.stats-grid {
  gap: 14px;
}

.hero-card,
.executive-card,
.metric-card,
.chart-card,
.status-card,
.receivable-card,
.filter-panel,
.table-card,
.health-card,
.composition-card,
.supplier-card,
.report-summary-card,
.report-actions-card,
.project-dialog {
  border-radius: 26px;
}

.hero-card {
  padding: 24px;
}

.hero-card__copy {
  max-width: 46ch;
}

.hero-actions {
  flex-wrap: wrap;
}

.hero-mini-grid {
  gap: 10px;
}

.mini-card {
  min-height: 0;
}

.metric-card {
  padding: 18px;
}

.metric-card p {
  font-size: 0.94rem;
}

.executive-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(253, 184, 19, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(16, 23, 32, 0.98), rgba(10, 17, 24, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-md);
}

.section-head--compact {
  align-items: flex-start;
  gap: 14px;
}

.executive-card__context {
  align-self: start;
  white-space: nowrap;
  color: #dce6ef;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.executive-chart {
  display: grid;
  gap: 12px;
}

.executive-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.executive-chart__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #d3dde6;
  font-size: 0.84rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.executive-chart__legend-item i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--series-color, #fdb813);
}

.executive-chart__canvas {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.executive-chart__canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 26%),
    radial-gradient(circle at top right, rgba(253, 184, 19, 0.12), transparent 26%);
  pointer-events: none;
}

.executive-chart__canvas svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.executive-chart__grid line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-dasharray: 6 8;
}

.executive-chart__grid text {
  fill: rgba(201, 214, 226, 0.7);
  font-size: 11px;
  font-family: "Manrope", sans-serif;
}

.executive-chart__area {
  fill: rgba(253, 184, 19, 0.12);
}

.executive-chart__line {
  fill: none;
  stroke: var(--series-color, #fdb813);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.executive-chart__canvas circle {
  fill: var(--series-color, #fdb813);
  stroke: #0c141c;
  stroke-width: 2;
}

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

.executive-chart__footer span {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.executive-chart__footer strong {
  color: #ffffff;
  font-size: 0.88rem;
}

.executive-chart__footer small {
  color: var(--text-soft);
}

.executive-chart__empty {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.09);
}

.executive-chart__empty strong {
  color: #ffffff;
}

.executive-chart__empty p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

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

.summary-chip {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 18px 18px 16px;
}

.summary-chip strong {
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  line-height: 1;
  color: #ffffff;
}

.summary-chip small {
  color: var(--text-soft);
  line-height: 1.55;
}

@media (max-width: 1280px) {
  .executive-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .executive-card__context {
    white-space: normal;
  }
}

@media (max-width: 720px) {
  .executive-summary,
  .executive-chart__footer {
    grid-template-columns: 1fr;
  }
}

/* Native select contrast fix for Windows dropdowns */
.field select {
  color-scheme: dark;
  background-color: rgba(255, 255, 255, 0.035);
}

.field select option,
.field select optgroup {
  color: #eef4fb;
  background: #0f1720;
}

.field select option:checked,
.field select option:hover,
.field select option:focus {
  color: #081018;
  background: #ffd46c;
  box-shadow: inset 0 0 0 999px #ffd46c;
}

.field select option:disabled {
  color: #7f8b97;
}
