:root {
  --teal: #12141a;
  --teal-dark: #090a0c;
  --teal-soft: #eaf6b8;
  --signal: #d4ff3f;
  --signal-ink: #101208;
  --gauge: #0b6b5c;
  --gauge-end: #1aa88f;
  --bg: #eceef2;
  --bg-soft: #f4f5f7;
  --card: #ffffff;
  --text: #12141a;
  --muted: #6b7280;
  --line: #e2e5eb;
  --green: #1f9d6c;
  --green-soft: #e8f7ef;
  --amber: #d97706;
  --amber-soft: #fff4e5;
  --blue: #3b82c4;
  --shadow: 0 10px 32px rgba(18, 20, 26, 0.07);
  --radius: 12px;
  --sidebar: 248px;
  --font: "Manrope", system-ui, sans-serif;
  --font-display: "Unbounded", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: #090a0c;
}

button,
input,
select {
  font: inherit;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar ? Signal Atlas */
.sidebar {
  padding: 24px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #090a0c;
  color: #e9ebf0;
  min-height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  color: #fff;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
  line-height: 1.1;
}

.sidebar .brand-elius {
  padding: 4px 8px 8px;
  color: #fff;
}

.sidebar .brand-elius .brand-logo-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  overflow: visible;
}

.sidebar .brand-elius .brand-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: #fff;
}

.sidebar .brand-elius .brand-name {
  font-size: 0.92rem;
  letter-spacing: -0.015em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #8b919e;
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  transition: 0.18s ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: color-mix(in srgb, var(--signal) 14%, transparent);
  color: #fff;
}

.nav-item.active {
  background: var(--signal);
  color: var(--signal-ink);
  box-shadow: none;
  font-weight: 700;
}

.nav-item.active:hover {
  background: var(--signal);
  color: var(--signal-ink);
}

.sidebar-card {
  margin-top: auto;
  background-color: #14161c;
  background-image: none;
  border: none;
  border-radius: 1rem;
  padding: 16px;
  box-shadow:
    rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset,
    rgba(0, 0, 0, 0.15) 0px -36px 30px 0px inset,
    rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset,
    rgba(0, 0, 0, 0.06) 0px 2px 1px,
    rgba(0, 0, 0, 0.09) 0px 4px 2px,
    rgba(0, 0, 0, 0.09) 0px 8px 4px,
    rgba(0, 0, 0, 0.09) 0px 16px 8px,
    rgba(0, 0, 0, 0.09) 0px 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sidebar-card-label {
  margin: 0;
  color: #8b919e;
  font-size: 0.78rem;
  font-weight: 600;
}

.sidebar-card-value {
  margin: 6px 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-up {
  background: color-mix(in srgb, var(--signal) 18%, transparent);
  color: var(--signal);
}

.sidebar .btn-ghost {
  margin-top: 12px;
  width: 100%;
  border: 1px solid rgba(233, 235, 240, 0.16);
  background: transparent;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 650;
  color: #e9ebf0;
}

.sidebar .btn-ghost:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.btn-ghost {
  margin-top: 12px;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.btn-ghost.compact {
  margin: 0;
  width: auto;
  padding: 6px 10px;
  font-size: 0.78rem;
}

/* ??? Main ??? */
.main {
  padding: 28px 32px 40px;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  background:
    radial-gradient(1000px 520px at 8% -8%, rgba(212, 255, 63, 0.08) 0%, transparent 50%),
    radial-gradient(800px 420px at 100% 0%, rgba(18, 20, 26, 0.06) 0%, transparent 50%),
    var(--bg);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.subtitle strong {
  color: var(--teal);
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.icon-btn .dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e11d48;
  border: 2px solid #fff;
}

.icon-btn.is-open {
  border-color: var(--teal);
}

.notif-wrap {
  position: relative;
  z-index: 40;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 28px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(18, 20, 26, 0.16);
  padding: 12px;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.notif-panel-head strong {
  font-size: 0.92rem;
}

.notif-inbox {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: min(380px, 60vh);
  overflow-y: auto;
}

.notif-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.notif-item:hover {
  border-color: var(--line);
}

.notif-item.is-unread {
  background: color-mix(in srgb, #d97706 12%, var(--bg-soft));
}

.notif-item.is-empty {
  cursor: default;
  background: transparent;
}

.notif-item strong {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 3px;
}

.notif-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.config-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 3px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: var(--shadow);
}

.config-top-btn svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.config-top-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.config-top-btn:hover svg {
  color: var(--teal);
}

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.date-chip svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

/* ??? Cards / grids ??? */
.card {
  background: var(--card);
  border: 1px solid rgba(228, 233, 238, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.card-head h2 {
  margin: 0;
}

.tx-legend {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  min-width: 0;
}

.tx-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.tx-legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tx-legend-item.is-paid i {
  background: #15803d;
  box-shadow: 0 0 0 3px rgba(167, 217, 176, 0.7);
}

.tx-legend-item.is-pending i {
  background: #b91c1c;
  box-shadow: 0 0 0 3px rgba(248, 162, 162, 0.7);
}

@media (max-width: 834px) {
  .card-head:has(.tx-legend) {
    flex-wrap: wrap;
  }

  .tx-legend {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

.chip {
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
}

.grid-top {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 18px;
  margin-bottom: 18px;
}

.grid-mid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

/* G?meo */
.card-gemeo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 35%, rgba(255, 255, 255, 0.78) 100%),
    linear-gradient(135deg, #cfe4de 0%, #d7e3ec 45%, #e8eef2 100%);
}

.card-gemeo::before {
  content: "";
  position: absolute;
  inset: auto -10% -30% 20%;
  height: 70%;
  background:
    radial-gradient(ellipse at 40% 60%, rgba(11, 107, 92, 0.18), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(59, 130, 196, 0.16), transparent 55%);
  pointer-events: none;
}

.gemeo-body {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr 140px;
  gap: 12px;
  align-items: center;
  min-height: 150px;
  z-index: 1;
}

.gemeo-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.gemeo-person span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.gemeo-person strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.gemeo-person strong.teal {
  color: var(--teal);
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(26, 35, 48, 0.12);
  background-color: #d7e3ec;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.avatar-now {
  background-image: none;
}

.avatar-future {
  filter: saturate(0.88) contrast(1.04) brightness(1.05);
  opacity: 0.92;
}

.gemeo-timeline {
  padding: 8px 8px 0;
}

.timeline-track {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.timeline-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(11, 107, 92, 0.15);
}

.timeline-progress {
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #1aa88f);
}

.timeline-knob {
  position: absolute;
  top: 50%;
  left: 42%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--teal);
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(11, 107, 92, 0.35);
}

.timeline-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
}

.gemeo-footer {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.pill-freedom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.84rem;
  color: var(--muted);
}

.pill-freedom strong {
  color: var(--teal);
}

/* Humor gauge */
.card-humor {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-humor h2 {
  align-self: flex-start;
  width: 100%;
}

.gauge-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 4px auto 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.gauge-wrap canvas {
  display: block;
  grid-area: 1 / 1;
}

.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
  z-index: 1;
}

.gauge-score {
  font-size: 2.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}

.gauge-max {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1;
}

.humor-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.humor-trend {
  margin: 6px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.humor-trend .down {
  color: var(--green);
  font-weight: 800;
}

/* Opportunity */
.opp-purchase {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-soft);
  margin-bottom: 14px;
}

.opp-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 1.3rem;
}

.opp-name {
  margin: 0;
  font-weight: 700;
}

.opp-price {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.opp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.opp-list li {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--text);
  font-size: 0.9rem;
}

.opp-list strong {
  color: var(--teal);
}

/* Subscriptions */
.sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.sub-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.sub-list li:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.sub-list li.warn {
  background: var(--amber-soft);
  border-color: rgba(217, 119, 6, 0.15);
  border-radius: 10px;
  padding: 6px 8px;
  margin: 3px 0;
  border-bottom: 1px solid rgba(217, 119, 6, 0.15);
}

.sub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sub-dot.green {
  background: var(--green);
}

.sub-dot.amber {
  background: var(--amber);
}

.sub-list strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.2;
}

.sub-list small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag {
  font-size: 0.65rem;
  font-weight: 750;
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.tag-ok {
  background: var(--green-soft);
  color: var(--green);
}

.tag-warn {
  background: #ffe8cc;
  color: #b45309;
}

.sub-foot {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.sub-foot strong {
  color: var(--text);
}

/* Harmony */
.harmony-row {
  display: flex;
  gap: 14px;
  align-items: center;
}

.harmony-ring {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.harmony-ring canvas {
  display: block;
  grid-area: 1 / 1;
}

.harmony-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--gauge, #0b6b5c);
  pointer-events: none;
  z-index: 1;
}

.meta-label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.meta-title {
  margin: 2px 0 8px;
  font-weight: 750;
  font-size: 0.95rem;
}

.progress {
  height: 8px;
  background: #e8eef2;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gauge, #0b6b5c), var(--gauge-end, #1aa88f));
  border-radius: inherit;
}

.meta-values {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.btn-link {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Chart */
.card-chart {
  padding-bottom: 16px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lg {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  display: inline-block;
}

.lg.blue {
  background: var(--blue);
}

.lg.green {
  background: var(--green);
}

.lg.amber {
  background: var(--amber);
}

.chart-box {
  margin-top: 8px;
  height: 220px;
}

.chart-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-primary {
  border: 0;
  background: var(--teal);
  color: #fff;
  font-weight: 750;
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
}

/* Secondary pages */
.page[hidden] {
  display: none !important;
}

.page-panel {
  max-width: 820px;
}

.page-panel > p {
  color: var(--muted);
  margin-top: 0;
}

.slider-block {
  margin: 18px 0;
}

.slider-block label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.slider-block input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-row > div {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 14px;
}

.stat-row span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.stat-row strong {
  font-size: 1.25rem;
  color: var(--teal);
}

.gemeo-form {
  grid-template-columns: 1.2fr 140px 1.2fr;
  margin-bottom: 8px;
}

.gemeo-hero {
  margin-top: 0;
}

.gemeo-hero .card-head {
  position: relative;
  z-index: 1;
}

.gemeo-kpis {
  margin-top: 18px;
}

.gemeo-kpis .sum-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

@media (min-width: 900px) {
  .month-summary.gemeo-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .month-summary.gemeo-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gemeo-meter {
  position: relative;
  z-index: 1;
  margin-top: 20px;
}

.gemeo-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.gemeo-meter-head strong {
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.gemeo-meter-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(18, 20, 26, 0.1);
  overflow: hidden;
}

.gemeo-meter-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gauge), var(--gauge-end));
  transition: width 0.45s ease, background 0.3s ease;
}

.gemeo-meter.is-behind .gemeo-meter-fill {
  background: linear-gradient(90deg, #c2410c, #d97706);
}

.gemeo-meter.is-near .gemeo-meter-fill {
  background: linear-gradient(90deg, #d97706, #ca8a04);
}

.gemeo-grid {
  margin-top: 18px;
}

.gemeo-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 4px;
}

.gemeo-letter-kicker {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gauge);
}

.gemeo-letter {
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.gemeo-sign {
  margin: 14px 0 10px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--gauge);
}

.gemeo-letter-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.82) 100%),
    linear-gradient(135deg, #e8f3ef 0%, #eef3f8 100%);
  border-left: 4px solid var(--gauge);
}

.gemeo-letter-card::after {
  content: "“";
  position: absolute;
  top: 6px;
  right: 16px;
  font-size: 5.2rem;
  line-height: 1;
  color: rgba(11, 107, 92, 0.12);
  font-family: Georgia, "Times New Roman", serif;
  pointer-events: none;
}

.gemeo-plan-card,
.gemeo-path-card {
  margin-top: 18px;
}

.gemeo-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: gemeo-step;
}

.gemeo-plan li {
  counter-increment: gemeo-step;
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 16px 16px 16px 18px;
  font-weight: 650;
  line-height: 1.5;
  min-height: 100%;
}

.gemeo-plan li::before {
  content: counter(gemeo-step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gauge);
  margin-bottom: 8px;
}

.gemeo-path-now td {
  font-weight: 800;
}

.gemeo-path-goal td {
  font-weight: 700;
}

.gemeo-dist-ahead {
  color: var(--green);
  font-weight: 700;
}

.gemeo-dist-behind {
  color: #c2410c;
  font-weight: 700;
}

.gemeo-dist-ok {
  color: var(--gauge);
  font-weight: 700;
}

.chip-ok {
  background: var(--green-soft);
  color: var(--green);
}

@media (max-width: 900px) {
  .gemeo-plan {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .gemeo-form {
    grid-template-columns: 1fr;
  }
}

.insight-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--text);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}

.table th {
  color: var(--muted);
  font-size: 0.78rem;
}

.goal-card {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.goal-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.goal-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.chip-couple {
  background: var(--teal-soft);
  color: var(--teal);
}

.goals-couple-card .goal-card {
  background: color-mix(in srgb, var(--teal) 6%, var(--bg-soft));
}

.config-form {
  display: grid;
  gap: 14px;
  max-width: 420px;
}

.config-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.88rem;
}

.config-form input,
.config-form select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 32, 0.45);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 20px;
}

.modal[hidden] {
  display: none !important;
}

.modal-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.modal-card h3 {
  margin: 0 0 6px;
}

.modal-card > p {
  margin: 0 0 16px;
  color: var(--muted);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions .btn-ghost {
  width: auto;
  margin: 0;
}

/* Responsive */
@media (max-width: 1100px) {
  .grid-mid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-mid .card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  html,
  body {
    background: var(--bg);
  }

  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 16px;
  }

  .nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
  }

  .nav-item {
    white-space: nowrap;
  }

  .sidebar-card {
    display: none;
  }

  .grid-top,
  .grid-mid {
    grid-template-columns: 1fr;
  }

  .gemeo-body {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .main {
    padding: 20px 16px 32px;
  }

  .topbar {
    flex-direction: column;
  }
}

/* Month filter + gest?o mensal */
.month-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
}

.month-nav {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--teal);
  font-weight: 700;
}

.month-nav:hover {
  background: var(--teal-soft);
}

.month-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  justify-content: center;
  padding: 0 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: capitalize;
}

.month-current svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.month-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.sum-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.sum-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.sum-card strong {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.sum-card.income strong { color: var(--green); }
.sum-card.expense strong { color: #c2410c; }
.sum-card.balance strong.positive { color: var(--teal); }
.sum-card.balance strong.negative { color: #b91c1c; }

.sum-card.card-container {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, rgba(224, 224, 224, 0.35), rgba(192, 192, 192, 0.18));
  border: none;
  border-radius: 24px;
  box-shadow:
    6px 6px 12px rgba(0, 0, 0, 0.22),
    -6px -6px 12px rgba(255, 255, 255, 0.55),
    inset 2px 2px 4px rgba(255, 255, 255, 0.45),
    inset -2px -2px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sum-card.card-container > * {
  position: relative;
  z-index: 1;
}

.sum-card.card-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  background-size: 200% 200%;
  animation: dash-card-shine 2s infinite ease-in-out;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

@keyframes dash-card-shine {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .sum-card.card-container::before {
    animation: none;
  }
}

.gestao-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.page-lead {
  margin: 6px 0 0;
  color: var(--muted);
}

.gestao-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-carry {
  border: 2px solid var(--teal);
  background: transparent;
  color: var(--teal);
  font-weight: 750;
  border-radius: 12px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-carry:hover {
  background: var(--teal);
  color: #fff;
  transform: translateY(-1px);
}

.btn-carry.is-on {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 8px 16px color-mix(in srgb, var(--teal) 28%, transparent);
}

.btn-expense {
  border: 0;
  background: #c2410c;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(194, 65, 12, 0.22);
}

.btn-expense:hover { background: #9a3412; }

.gestao-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.chip-warn {
  background: #ffe8cc;
  color: #b45309;
}

.tx-list {
  display: grid;
  gap: 8px;
  min-height: 80px;
}

.tx-expense-grid {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
}

.tx-expense-card {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 0;
  background: rgba(217, 217, 217, 0.58);
  border: 1px solid white;
  box-shadow: 12px 17px 51px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
  border-radius: 17px;
  text-align: left;
  cursor: pointer;
  transition: all 0.5s;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  justify-content: stretch;
  user-select: none;
  font-weight: bolder;
  color: black;
  flex-direction: row;
  padding: 12px 14px;
  gap: 10px;
}

.tx-expense-card:hover {
  border: 1px solid black;
  transform: scale(1.05);
}

.tx-expense-card:active {
  transform: scale(0.95) rotateZ(1.7deg);
}

.tx-expense-card.is-pending {
  background: rgba(248, 162, 162, 0.58);
  color: #7f1d1d;
}

.tx-expense-card.is-paid {
  background: rgba(167, 217, 176, 0.58);
  color: #14532d;
}

.tx-expense-card strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
}

.tx-expense-card small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
  line-height: 1.3;
  margin-top: 2px;
}

.tx-expense-card .tx-card-status {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tx-expense-card.is-pending .tx-card-status,
.tx-expense-card.is-pending .tx-value {
  color: #b91c1c;
}

.tx-expense-card.is-paid .tx-card-status,
.tx-expense-card.is-paid .tx-value {
  color: #15803d;
}

.tx-expense-card .tx-value {
  font-size: 0.95rem;
  white-space: nowrap;
}

.tx-expense-card .tx-card-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.tx-expense-card .tx-item-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.tx-expense-card .tx-item-actions .btn-ghost {
  padding: 6px 10px;
  font-size: 0.75rem;
}

.tx-expense-card .tx-check input {
  accent-color: currentColor;
}

.tx-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 18px 8px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.tx-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-soft);
}

.tx-item.has-check {
  grid-template-columns: auto 1fr auto auto;
}

.tx-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tx-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}

.tx-item.is-unpaid {
  opacity: 0.72;
}

.tx-item.despesa.is-paid .tx-value {
  color: var(--green);
}

.tx-item.despesa.is-paid {
  box-shadow: inset 3px 0 0 var(--green);
}

.tx-paid-label {
  color: var(--green);
  font-weight: 700;
}

.tx-unpaid-label {
  color: #c2410c;
  font-weight: 700;
}

.tx-item.is-fixed {
  box-shadow: inset 3px 0 0 var(--teal);
}

.sum-pending {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.annual-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 8px 0 12px;
}

.annual-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.88rem;
}

.annual-form select {
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
}

.annual-summary {
  margin: 12px 0 16px;
}

.annual-subtitle {
  margin: 18px 0 8px;
  font-size: 1rem;
}

.tx-item strong { display: block; font-size: 0.92rem; }
.tx-item small { color: var(--muted); font-size: 0.75rem; }
.tx-item .tx-value { font-weight: 800; white-space: nowrap; }
.tx-item.receita .tx-value { color: var(--green); }
.tx-item.despesa .tx-value { color: #c2410c; }
.tx-item.subscription {
  box-shadow: inset 3px 0 0 var(--green);
}
.tx-item-actions { display: flex; gap: 6px; align-items: center; }

.tx-form { display: grid; gap: 12px; }
.tx-form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.88rem; }
.tx-form input,
.tx-form select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
}

.money-input {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.badge-down {
  background: #ffedd5;
  color: #c2410c;
}

@media (max-width: 900px) {
  .month-summary,
  .gestao-grid { grid-template-columns: 1fr; }
  .topbar-actions { flex-wrap: wrap; }
}

/* Assinaturas logos */
.svc-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.svc-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.svc-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.svc-cell small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.sub-list li {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.radar-card {
  padding: 14px 16px 12px;
}

.radar-card h2 {
  margin-bottom: 8px;
}

.subs-table .svc-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.subs-table td {
  vertical-align: middle;
}

.row-muted {
  opacity: 0.55;
}

.opp-intro {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.opp-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.opp-form label {
  display: grid;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.opp-form input,
.opp-form select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
}

.modal-opp {
  width: min(460px, 100%);
  text-align: center;
}

.opp-modal-kicker {
  margin: 0 0 8px;
  font-size: 1.6rem;
  line-height: 1;
}

.modal-opp h3 {
  margin: 0 0 10px;
}

.opp-modal-lead {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
}

.opp-modal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.opp-modal-stats div {
  padding: 12px 10px;
  border-radius: 14px;
  background: var(--teal-soft, #e6f4f1);
}

.opp-modal-stats span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.opp-modal-stats em {
  font-style: normal;
  font-weight: 700;
}

.opp-modal-stats strong {
  font-size: 1.15rem;
  color: var(--teal);
}

.modal-opp .hint {
  margin: 0 0 4px;
}

.modal-opp .modal-actions {
  justify-content: center;
}

.opp-recent-label {
  margin-top: 2px;
}

.cdi-live {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--teal-soft, #e6f4f1);
  min-width: 200px;
}

.cdi-live-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.cdi-live strong {
  font-size: 1.35rem;
  color: var(--teal);
  letter-spacing: -0.03em;
}

.cdi-live small {
  color: var(--muted);
  font-size: 0.75rem;
}

.cdi-live.stale {
  background: #ffe8cc;
}

.cdi-live.stale strong {
  color: #b45309;
}

.inv-period {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.inv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button.chip {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

button.chip.chip-active {
  background: var(--teal);
  color: #fff;
}

.tx-form .inv-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.month-summary.inv-result-summary {
  margin: 18px 0 0;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inv-result-summary .sum-card {
  min-width: 0;
  padding: 14px 14px;
}

.inv-result-summary .sum-card span {
  font-size: 0.74rem;
  line-height: 1.3;
}

.inv-result-summary .sum-card strong {
  font-size: clamp(0.98rem, 1.8vw, 1.2rem);
  overflow-wrap: anywhere;
}

@media (min-width: 835px) {
  .month-summary.inv-result-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .month-summary.inv-result-summary > :nth-child(-n+3) {
    grid-column: span 2;
  }

  .month-summary.inv-result-summary > :nth-child(n+4) {
    grid-column: span 3;
  }
}

@media (max-width: 768px) {
  .month-summary.inv-result-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .month-summary.inv-result-summary > :nth-child(n) {
    grid-column: auto;
  }
}

.inv-rate-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.75fr) minmax(120px, 0.75fr);
  gap: 12px;
  align-items: end;
}

.inv-cdi-eq {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  padding: 10px 12px;
  min-height: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.inv-cdi-eq span,
.inv-cdi-eq small {
  font-size: 0.72rem;
  color: var(--muted);
}

.inv-cdi-eq strong {
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--teal);
}

.inv-result-eq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}

.inv-result-eq > div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  padding: 10px 12px;
}

.inv-result-eq span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.inv-result-eq strong {
  font-size: 1.05rem;
}

@media (max-width: 480px) {
  .inv-rate-row,
  .inv-result-eq {
    grid-template-columns: 1fr;
  }
}

.inv-yield {
  font-weight: 700;
  margin: 0 0 8px;
}

.inv-cdi-share {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--teal);
}

.inv-chart-hint {
  margin: 0 0 8px;
}

.inv-charts {
  display: grid;
  gap: 8px;
}

.inv-donut-wrap {
  display: flex;
  justify-content: center;
}

.inv-donut-box {
  width: min(340px, 100%);
  height: 220px;
}

.inv-bar-box {
  height: 280px;
}

@media (max-width: 768px) {
  .inv-donut-box {
    height: 200px;
  }

  .inv-bar-box {
    height: 240px;
  }
}

.inv-table-wrap {
  margin-top: 18px;
  max-height: 420px;
  overflow: auto;
}

.inv-table {
  border: 1px solid var(--line);
}

.inv-table th,
.inv-table td {
  white-space: nowrap;
  text-align: center;
  border: 1px solid var(--line);
  padding: 10px 8px;
}

.inv-table thead th {
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 750;
}

.inv-table tbody tr:nth-child(even) td {
  background: var(--bg-soft);
}

.inv-table tbody tr:nth-child(odd) td {
  background: var(--card);
}

.inv-table th:last-child,
.inv-table td:last-child {
  background: var(--bg-soft);
  font-weight: 750;
}

.inv-table tbody tr:nth-child(even) td:last-child {
  background: color-mix(in srgb, var(--bg-soft) 80%, var(--line));
}

.inv-loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--teal-dark) 68%, transparent);
  backdrop-filter: blur(6px);
}

.inv-loader[hidden] {
  display: none !important;
}

.inv-loader .loader {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.inv-loader .loading-text {
  color: var(--signal);
  font-size: 14pt;
  font-weight: 600;
  margin-left: 10px;
}

.inv-loader .dot {
  margin-left: 3px;
  animation: inv-loader-blink 1.5s infinite;
}

.inv-loader .dot:nth-child(2) {
  animation-delay: 0.3s;
}

.inv-loader .dot:nth-child(3) {
  animation-delay: 0.6s;
}

.inv-loader .loading-bar-background {
  --height: 30px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 5px;
  width: 200px;
  height: var(--height);
  background-color: var(--teal-dark);
  box-shadow: color-mix(in srgb, #000 55%, var(--teal-dark)) -2px 2px 4px 0 inset;
  border-radius: calc(var(--height) / 2);
}

.inv-loader .loading-bar {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  --height: 20px;
  width: 0%;
  height: var(--height);
  overflow: hidden;
  background: linear-gradient(0deg, var(--teal) 0%, var(--signal) 100%);
  border-radius: calc(var(--height) / 2);
}

.inv-loader.is-on .loading-bar {
  animation: inv-loader-fill 4s ease-out infinite;
}

.inv-loader .white-bars-container {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 18px;
}

.inv-loader .white-bar {
  background: linear-gradient(-45deg, #fff 0%, rgba(255, 255, 255, 0) 70%);
  width: 10px;
  height: 45px;
  opacity: 0.3;
  rotate: 45deg;
}

@keyframes inv-loader-fill {
  0% {
    width: 0;
  }
  80% {
    width: 100%;
  }
  100% {
    width: 100%;
  }
}

@keyframes inv-loader-blink {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.sites-cat-list,
.sites-tip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.sites-cat-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.sites-cat-top span {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.sites-tip-list {
  grid-template-columns: 1fr;
  gap: 14px;
}

.sites-tip-list .notification {
  display: flex;
  flex-direction: column;
  isolation: isolate;
  position: relative;
  width: 100%;
  min-height: 8rem;
  background: #29292c;
  border-radius: 1rem;
  overflow: hidden;
  font-size: 16px;
  --gradient: linear-gradient(to bottom, #2eadff, #3d83ff, #7e61ff);
  --color: #32a6ff;
}

.sites-tip-list .notification:before {
  position: absolute;
  content: "";
  inset: 0.0625rem;
  border-radius: 0.9375rem;
  background: #18181b;
  z-index: 2;
}

.sites-tip-list .notification:after {
  position: absolute;
  content: "";
  width: 0.25rem;
  inset: 0.65rem auto 0.65rem 0.5rem;
  border-radius: 0.125rem;
  background: var(--gradient);
  transition: transform 300ms ease;
  z-index: 4;
}

.sites-tip-list .notification:hover:after {
  transform: translateX(0.15rem);
}

.sites-tip-list .notititle {
  color: var(--color);
  padding: 0.65rem 0.25rem 0.4rem 1.25rem;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.25;
  transition: transform 300ms ease;
  z-index: 5;
  position: relative;
}

.sites-tip-list .notification:hover .notititle {
  transform: translateX(0.15rem);
}

.sites-tip-list .notibody {
  color: #99999d;
  padding: 0 1.25rem;
  transition: transform 300ms ease;
  z-index: 5;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.45;
  flex: 1;
}

.sites-tip-list .notification:hover .notibody {
  transform: translateX(0.25rem);
}

.sites-tip-list .notiaction {
  position: relative;
  z-index: 5;
  align-self: flex-start;
  margin: 0.7rem 1.25rem 0.85rem;
  border: 0;
  background: transparent;
  color: var(--color);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
}

.sites-tip-list .notiglow,
.sites-tip-list .notiborderglow {
  position: absolute;
  width: 20rem;
  height: 20rem;
  left: var(--x, 0);
  top: var(--y, 0);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle closest-side at center, white, transparent);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.sites-tip-list .notiglow {
  z-index: 3;
}

.sites-tip-list .notiborderglow {
  z-index: 1;
}

.sites-tip-list .notification:hover .notiglow,
.sites-tip-list .notification:hover .notiborderglow {
  opacity: 0.1;
}

.sites-tip-list .sites-tip-alert {
  --gradient: linear-gradient(to bottom, #fb7185, #ef4444, #c2410c);
  --color: #fb7185;
}

.sites-tip-list .sites-tip-warn {
  --gradient: linear-gradient(to bottom, #fbbf24, #f59e0b, #d97706);
  --color: #fbbf24;
}

.sites-tip-list .sites-tip-ok {
  --gradient: linear-gradient(to bottom, #2dd4bf, #14b8a6, #0b6b5c);
  --color: #2dd4bf;
}

.sites-tip-list .sites-tip-info {
  --gradient: linear-gradient(to bottom, #2eadff, #3d83ff, #7e61ff);
  --color: #32a6ff;
}

/* Breakpoints: 480 / 768 / 834 / 1024 / 1440 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.table-wrap {
  max-width: 100%;
}

@media (min-width: 1440px) {
  .main {
    padding: 32px 40px 48px;
  }
}

@media (max-width: 1440px) {
  :root {
    --sidebar: 228px;
  }

  .topbar h1 {
    font-size: clamp(1.45rem, 2vw, 1.75rem);
  }

  .main {
    padding: 24px 24px 36px;
  }

  .sum-card strong {
    font-size: 1.22rem;
  }
}

@media (max-width: 1024px) {
  .app,
  .admin-app {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .admin-sidebar {
    min-height: 0;
    padding: 14px 12px 12px;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav,
  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .nav-item,
  .admin-nav-item {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .sidebar-card,
  .profile-chip {
    display: none;
  }

  .main,
  .admin-content {
    max-height: none;
    min-height: 0;
    padding: 20px 18px 32px;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .grid-top {
    grid-template-columns: 1fr;
  }

  .grid-mid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-mid .card:last-child {
    grid-column: 1 / -1;
  }

  .month-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .charts-row {
    grid-template-columns: 1fr;
  }

  .admin-charts,
  .admin-kpi {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 834px) {
  .grid-mid,
  .gestao-grid,
  .config-grid,
  .admin-charts,
  .admin-kpi,
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .grid-mid .card:last-child {
    grid-column: auto;
  }

  .gemeo-body,
  .gemeo-form {
    grid-template-columns: 1fr;
  }

  .month-summary {
    gap: 8px;
  }

  .sum-card {
    padding: 12px;
  }

  .sum-card strong {
    font-size: 1.08rem;
    word-break: break-word;
  }

  .gestao-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .gestao-actions {
    flex-wrap: wrap;
  }

  .table-wrap {
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  html,
  body {
    background: var(--bg, #eceef2);
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .subtitle {
    font-size: 0.88rem;
  }

  .month-summary {
    grid-template-columns: 1fr;
  }

  .tx-item {
    grid-template-columns: 1fr auto;
  }

  .tx-item.has-check {
    grid-template-columns: auto 1fr auto;
  }

  .tx-expense-card {
    grid-template-columns: auto 1fr;
  }

  .tx-expense-card .tx-value,
  .tx-expense-card .tx-item-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .modal-card,
  .modal-cancel-account {
    width: min(420px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }

  .modal-actions {
    flex-wrap: wrap;
  }

  .auth-card {
    width: min(440px, 100%);
  }
}

@media (max-width: 480px) {
  .sidebar,
  .admin-sidebar {
    padding: 10px 8px 8px;
    gap: 8px;
  }

  .sidebar .brand-elius {
    padding: 2px 4px;
  }

  .sidebar .brand-elius .brand-name,
  .admin-sidebar .brand-name {
    font-size: 0.78rem;
  }

  .nav-item,
  .admin-nav-item {
    padding: 8px 10px;
    font-size: 0.78rem;
    gap: 8px;
  }

  .nav-item svg {
    width: 16px;
    height: 16px;
  }

  .main,
  .admin-content {
    padding: 14px 12px 28px;
  }

  .topbar h1,
  .page-title {
    font-size: 1.28rem;
  }

  .subtitle,
  .page-lead {
    font-size: 0.82rem;
  }

  .user-chip,
  .config-top-btn span {
    display: none;
  }

  .month-filter {
    width: 100%;
    justify-content: space-between;
  }

  .month-current {
    flex: 1;
    justify-content: center;
  }

  .btn-primary,
  .btn-expense,
  .btn-carry,
  .sidebar .btn-ghost,
  .login-submit {
    min-height: 44px;
  }

  .sum-card.card-container {
    border-radius: 16px;
  }

  .card {
    padding: 14px;
  }
}

@media (max-width: 768px) and (max-height: 480px) {
  .sidebar .brand-elius .brand-name {
    display: none;
  }
}

.lgpd-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  max-width: 720px;
  margin: 0 auto;
  background: #12141a;
  color: #e9ebf0;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 18px 48px rgba(9, 10, 12, 0.35);
  display: grid;
  gap: 12px;
}

.lgpd-banner p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #c5c9d1;
}

.lgpd-banner a { color: #d4ff3f; }

.lgpd-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lgpd-banner button {
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lgpd-banner .lgpd-accept {
  background: #d4ff3f;
  color: #101208;
}

.lgpd-banner .lgpd-essentials {
  background: transparent;
  color: #e9ebf0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lgpd-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 10px 0 0;
}

.lgpd-check input {
  margin-top: 3px;
  flex-shrink: 0;
}

.lgpd-legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

.lgpd-legal h1 {
  margin: 8px 0 6px;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.lgpd-legal h2 {
  margin: 28px 0 8px;
  font-size: 1.05rem;
}

.lgpd-legal p,
.lgpd-legal li {
  color: #3f4550;
  line-height: 1.6;
  font-size: 0.95rem;
}

.lgpd-legal ul { padding-left: 18px; }
.lgpd-meta { color: #6b7280; font-size: 0.82rem; }
.lgpd-back {
  display: inline-block;
  margin-bottom: 8px;
  color: #12141a;
  font-weight: 700;
  text-decoration: none;
}
