/* Lumme Design System â ponte visual (preto-marrom, laranja sinal, Outfit).
   Carrega depois de styles.css para recolorir o app inteiro sem reescrever cada tela. */

:root {
  --sidebar-width: 232px;
}

:root,
html.light {
  --lm-black: #130600;
  --lm-dark-orange: #1b0b03;
  --lm-umber: #22150d;
  --lm-rust: #521e05;
  --lm-signal: #ff5300;
  --lm-peach: #f9c4ae;
  --lm-salmon: #f59b6c;
  --lm-negative: #f0443a;
  --lm-ai: #e8247c;

  --hz-background: #fbf6f3;
  --hz-surface: #ffffff;
  --hz-surface-bright: #fbf6f3;
  --hz-surface-dim: #f1e6e1;
  --hz-surface-variant: #f8f1ee;
  --hz-surface-container-lowest: #ffffff;
  --hz-surface-container-low: #f8f1ee;
  --hz-surface-container: #f1e6e1;
  --hz-surface-container-high: #e6d9d3;
  --hz-surface-container-highest: #e6d9d3;
  --hz-on-surface: #130600;
  --hz-on-background: #130600;
  --hz-on-surface-variant: #5b4d47;
  --hz-outline: #a3928b;
  --hz-outline-variant: rgba(19, 6, 0, 0.08);
  --hz-primary: #ff5300;
  --hz-primary-container: #521e05;
  --hz-on-primary: #ffffff;
  --hz-on-primary-container: #fff7f3;
  --hz-primary-fixed: #fce3d8;
  --hz-primary-fixed-dim: #f9c4ae;
  --hz-on-primary-fixed: #130600;
  --hz-on-primary-fixed-variant: #521e05;
  --hz-inverse-primary: #ff7433;
  --hz-secondary: #f59b6c;
  --hz-secondary-container: #fce3d8;
  --hz-on-secondary: #130600;
  --hz-on-secondary-container: #521e05;
  --hz-secondary-fixed: #fce3d8;
  --hz-secondary-fixed-dim: #f9c4ae;
  --hz-on-secondary-fixed: #130600;
  --hz-on-secondary-fixed-variant: #521e05;
  --hz-tertiary: #e8247c;
  --hz-tertiary-container: #fce3d8;
  --hz-on-tertiary: #ffffff;
  --hz-on-tertiary-container: #130600;
  --hz-tertiary-fixed: #fce3d8;
  --hz-tertiary-fixed-dim: #f9c4ae;
  --hz-on-tertiary-fixed: #130600;
  --hz-on-tertiary-fixed-variant: #521e05;
  --hz-error: #f0443a;
  --hz-error-container: #fde8e6;
  --hz-on-error: #ffffff;
  --hz-on-error-container: #7a1d18;
  --hz-inverse-surface: #130600;
  --hz-inverse-on-surface: #f8f1ee;
  --hz-surface-tint: #ff5300;
  color-scheme: light;
}

html.dark {
  --hz-background: #130600;
  --hz-surface: #130600;
  --hz-surface-bright: #130600;
  --hz-surface-dim: #0e0400;
  --hz-surface-variant: #2a170c;
  --hz-surface-container-lowest: #1f0e05;
  --hz-surface-container-low: #1b0b03;
  --hz-surface-container: #22150d;
  --hz-surface-container-high: #2a170c;
  --hz-surface-container-highest: #331c10;
  --hz-on-surface: #ffffff;
  --hz-on-background: #ffffff;
  --hz-on-surface-variant: rgba(255, 255, 255, 0.72);
  --hz-outline: rgba(255, 255, 255, 0.28);
  --hz-outline-variant: rgba(255, 255, 255, 0.1);
  --hz-primary: #ff5300;
  --hz-primary-container: #521e05;
  --hz-on-primary: #ffffff;
  --hz-on-primary-container: #fff7f3;
  --hz-primary-fixed: #521e05;
  --hz-primary-fixed-dim: #ff7433;
  --hz-on-primary-fixed: #ffffff;
  --hz-on-primary-fixed-variant: #f9c4ae;
  --hz-inverse-primary: #ff5300;
  --hz-secondary: #f59b6c;
  --hz-secondary-container: #521e05;
  --hz-on-secondary: #130600;
  --hz-on-secondary-container: #f9c4ae;
  --hz-secondary-fixed: #2a170c;
  --hz-secondary-fixed-dim: #f59b6c;
  --hz-on-secondary-fixed: #ffffff;
  --hz-on-secondary-fixed-variant: #f9c4ae;
  --hz-tertiary: #e8247c;
  --hz-tertiary-container: #3a1024;
  --hz-on-tertiary: #ffffff;
  --hz-on-tertiary-container: #f9c4ae;
  --hz-tertiary-fixed: #3a1024;
  --hz-tertiary-fixed-dim: #e8247c;
  --hz-on-tertiary-fixed: #ffffff;
  --hz-on-tertiary-fixed-variant: #f9c4ae;
  --hz-error: #f0443a;
  --hz-error-container: #5c1814;
  --hz-on-error: #ffffff;
  --hz-on-error-container: #ffd4d0;
  --hz-inverse-surface: #f8f1ee;
  --hz-inverse-on-surface: #130600;
  --hz-surface-tint: #ff5300;
  color-scheme: dark;
}

html,
body {
  font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
  background: var(--hz-background);
  color: var(--hz-on-surface);
}

body {
  background-image: radial-gradient(80% 50% at 100% 0%, rgba(255, 83, 0, 0.08), transparent 55%);
}

.font-headline-lg,
.font-headline-md,
.font-headline-sm,
.app-topbar-title,
.sidebar-brand h1 {
  font-weight: 500;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .app-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 80 !important;
    background: var(--hz-background) !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .app-topbar-inner {
    display: grid !important;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 18px;
    min-height: 56px !important;
    padding: 6px 22px 6px 16px !important;
    max-width: none !important;
  }

  .sidebar {
    top: 56px !important;
    left: 0 !important;
    height: calc(100vh - 56px) !important;
    width: var(--sidebar-width) !important;
    border-radius: 0 !important;
    border: 0 !important;
    border-right: 1px solid var(--hz-outline-variant) !important;
    background: var(--hz-background) !important;
    box-shadow: none !important;
    z-index: 40 !important;
  }

  .sidebar-brand {
    display: none !important;
  }

  .app-main {
    margin-left: var(--sidebar-width) !important;
    padding-top: 56px !important;
    background: var(--hz-background) !important;
  }

  .lm-search {
    width: min(520px, 100%);
    margin-inline: auto;
  }

  body.sidebar-collapsed .lm-top-name {
    display: none;
  }

  body.sidebar-collapsed .lm-top-brand {
    justify-content: center;
    padding-right: 0;
  }
}

.lm-top-brand {
  display: none;
  align-items: center;
  gap: 10px;
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding-left: 8px;
  color: inherit;
  text-decoration: none;
}

@media (min-width: 768px) {
  .lm-top-brand {
    display: flex;
  }
}

.lm-top-mark {
  width: 34px;
  height: 34px;
  border-radius: 0;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.lm-top-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.lm-top-name strong {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--hz-on-surface);
}

.lm-top-name small {
  margin-top: 2px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}

.app-logo {
  display: block;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.sidebar-brand h1 {
  font-size: 20px;
  color: var(--hz-on-surface);
}

.sidebar-brand p {
  color: var(--hz-on-surface-variant);
  letter-spacing: 0.02em;
}

.nav-link {
  border-radius: 10px;
  color: var(--hz-on-surface);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

html.light .nav-link:hover {
  background: rgba(19, 6, 0, 0.04);
}

.nav-link.active,
html.dark .nav-link.active,
html.light .nav-link.active {
  background: #521e05 !important;
  color: #ffffff !important;
  border-left: 0 !important;
  box-shadow: none !important;
}

html.light .nav-link.active {
  background: #130600 !important;
}

.nav-link.active .material-symbols-outlined,
body.sidebar-collapsed .nav-link.active .material-symbols-outlined {
  color: #ffffff !important;
}

#btn-new-entry,
#btn-mobile-fab .rounded-full {
  background: #ff5300 !important;
  color: #ffffff !important;
  border-radius: 10px;
}

#btn-new-entry:hover {
  background: #ff6a1f !important;
  box-shadow: 0 8px 24px -8px rgba(255, 83, 0, 0.55);
}

#btn-mobile-fab .rounded-full {
  border-radius: 999px;
}

.app-topbar {
  background: color-mix(in srgb, var(--hz-background) 78%, transparent);
  border-bottom-color: var(--hz-outline-variant);
}

#global-search {
  border-radius: 999px;
  background: var(--hz-surface-container);
  border-color: var(--hz-outline-variant);
}

.app-topbar-avatar {
  background: #ff5300;
  color: #ffffff;
}

.card-shadow,
.feed-card-shadow,
.shadow-soft {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px -18px rgba(0, 0, 0, 0.45);
}

html.dark [class*="border-outline-variant"],
html.dark .border-outline-variant,
html.dark .border-outline {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .glass-card,
html.dark .dash-v2 .glass-card {
  background: #1f0e05;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rounded-2xl,
.rounded-xl {
  border-radius: 20px;
}

.mobile-bottom-nav {
  background: color-mix(in srgb, var(--hz-surface-container-low) 92%, transparent);
}

.mobile-nav-item.is-active,
a.mobile-nav-item[aria-current="page"] {
  color: #ff5300;
}

/* Home â mesma composiÃ§Ã£o do design system (saudaÃ§Ã£o, widgets, calendÃ¡rio, carga). */
.lm-home {
  --lm-ink: #130600;
  --lm-muted: #a3928b;
  --lm-soft: #5b4d47;
  color: var(--lm-ink);
  background:
    radial-gradient(70% 42% at 78% 0%, rgba(255, 140, 66, 0.18), transparent 58%),
    linear-gradient(180deg, #fffdfb 0%, #fbf6f3 42%, #f6eee9 100%);
  border-radius: 28px;
  padding: 16px 16px 12px;
  min-height: 0;
}

.lm-greet {
  margin: 0 0 10px;
  font: 500 28px/1.15 Outfit, sans-serif;
  letter-spacing: -0.02em;
  color: var(--lm-ink);
}

.lm-greet span {
  color: var(--lm-muted);
  font-weight: 400;
}

.lm-grid-top,
.lm-grid-bot {
  display: grid;
  gap: 12px;
}

.lm-grid-top {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: stretch;
}

.lm-grid-bot {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  margin-top: 12px;
}

.lm-span-2 {
  grid-row: span 2;
  min-height: 0;
}

.lm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  border-radius: 20px;
  background: #fff radial-gradient(120% 90% at 100% 100%, rgba(255, 116, 51, 0.14), transparent 62%);
  border: 1px solid rgba(19, 6, 0, 0.06);
  box-shadow: 0 10px 30px -18px rgba(82, 30, 5, 0.28);
  color: var(--lm-ink);
}

.lm-card.is-tall {
  min-height: 0;
}

.lm-card.is-hot {
  background: linear-gradient(135deg, #1f0e05 8%, #521e05 62%, #ff5300 140%);
  color: #fff;
  border-color: transparent;
}

.lm-card.is-hot .lm-card-title,
.lm-card.is-hot .lm-metric,
.lm-card.is-hot .lm-delta {
  color: #fff;
}

.lm-card.is-hot .lm-disc {
  background: #fff;
  color: #130600;
}

.lm-card.is-hot .lm-pill,
.lm-card.is-hot .lm-iconbtn {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.lm-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lm-disc {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #130600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lm-disc .material-symbols-outlined {
  font-size: 16px;
}

.lm-card-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lm-pill,
.lm-iconbtn,
.lm-cta,
.lm-cal-nav {
  border: 0;
  cursor: pointer;
  font-family: Outfit, sans-serif;
}

.lm-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(19, 6, 0, 0.05);
  color: var(--lm-ink);
  font-size: 13px;
  text-decoration: none;
}

.lm-iconbtn,
.lm-cal-nav {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(19, 6, 0, 0.05);
  color: var(--lm-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lm-iconbtn .material-symbols-outlined,
.lm-cal-nav .material-symbols-outlined {
  font-size: 16px;
}

.lm-metric {
  font: 400 32px/1 Outfit, sans-serif;
  letter-spacing: -0.02em;
}

.lm-caption {
  margin-top: 6px;
  font-size: 14px;
  color: var(--lm-muted);
}

.lm-delta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--lm-muted);
}

.lm-delta b {
  font-weight: 500;
  color: #ff5300;
}

.lm-delta b.is-down {
  color: #f0443a;
}

.lm-hatch {
  margin-top: auto;
  min-width: 0;
}

.lm-hatch-row {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 96px;
  min-width: 0;
}

.lm-hatch-bar {
  position: relative;
  border-radius: 24px;
  height: 72%;
  min-width: 28px;
  background: repeating-linear-gradient(115deg, #f9c4ae 0 2px, transparent 2px 6px);
  background-color: #fce3d8;
}

.lm-hatch-bar.is-solid {
  height: 82%;
  background: #ff5300;
}

.lm-callout {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%) translateY(4px);
  z-index: 2;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px -16px rgba(82, 30, 5, 0.45);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.lm-hatch-bar:only-child .lm-callout {
  left: 8px;
  transform: translateY(4px);
}

.lm-hatch-bar:hover .lm-callout,
.lm-hatch-bar:focus-visible .lm-callout {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.lm-hatch-bar:only-child:hover .lm-callout,
.lm-hatch-bar:only-child:focus-visible .lm-callout {
  transform: translateY(0);
}

.lm-callout small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.lm-callout small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5300;
  display: inline-block;
}

.lm-callout strong {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 400;
}

.lm-hatch-labels {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--lm-ink);
}

.lm-hatch-labels > div {
  min-width: 28px;
  text-align: center;
}

.lm-hatch-labels > div.is-start {
  text-align: left;
}

.lm-hatch-labels > div.is-end {
  text-align: right;
}

.lm-promo {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border-radius: 20px;
  background: #1b0b03 center 30% / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lm-promo-copy {
  max-width: 300px;
  text-align: center;
  padding: 20px 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
  color: #fff;
}

.lm-promo-copy strong {
  display: block;
  font: 500 22px/1.2 Outfit, sans-serif;
}

.lm-promo-copy p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

.lm-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 14px;
  flex-shrink: 0;
}

.lm-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  row-gap: 2px;
  flex-shrink: 0;
}

.lm-cal-grid span {
  font-size: 12px;
  color: var(--lm-muted);
}

.lm-cal-grid button {
  justify-self: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--lm-ink);
  font: 400 13px/26px Outfit, sans-serif;
  cursor: pointer;
}

.lm-cal-grid button.is-on {
  background: #ff5300;
  color: #fff;
}

.lm-task {
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(19, 6, 0, 0.04);
  border: 1px solid rgba(19, 6, 0, 0.06);
  flex-shrink: 0;
}

.lm-task-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.lm-task-top span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-task-top a {
  color: var(--lm-soft);
  display: inline-flex;
}

.lm-task p {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--lm-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lm-task-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.lm-task-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--lm-soft);
}

.lm-task-time .material-symbols-outlined {
  font-size: 14px;
}

.lm-cta {
  margin-top: auto;
  width: 100%;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #ff5300;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}

.lm-cta:hover {
  background: #ff6a1f;
}

.lm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 13px;
}

.lm-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.lm-heat {
  display: grid;
  grid-template-columns: 52px repeat(7, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}

.lm-heat b,
.lm-heat em {
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  text-align: center;
}

.lm-heat b {
  text-align: left;
}

.lm-cell {
  height: 16px;
  border-radius: 6px;
  background: repeating-linear-gradient(115deg, rgba(249, 196, 174, 0.9) 0 2px, transparent 2px 6px);
  background-color: #f8efe9;
}

.lm-cell.l1 {
  background: repeating-linear-gradient(115deg, #f9c4ae 0 2px, transparent 2px 5px);
  background-color: #fce3d8;
}

.lm-cell.l2 {
  background: #f59b6c;
}

.lm-cell.l3 {
  background: #ff5300;
}

@media (max-width: 1280px) {
  .lm-pill {
    display: none;
  }

  .lm-card-head {
    gap: 6px;
  }

  .lm-card-title {
    font-size: 14px;
  }

  .lm-disc {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 860px) {
  .lm-grid-top,
  .lm-grid-bot {
    grid-template-columns: 1fr;
  }

  .lm-span-2 {
    grid-row: auto;
  }

  .lm-greet {
    font-size: 24px;
  }

  .lm-promo,
  .lm-card.is-tall {
    min-height: 240px;
  }
}

@media (min-width: 900px) {
  .page-section:has(#page-dashboard:not(.hidden-page)) {
    max-width: none;
    padding: 0 16px 12px;
  }

  .lm-home {
    height: calc(100dvh - 88px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 2px 2px 0;
  }

  .lm-greet {
    flex: none;
  }

  .lm-grid-top,
  .lm-grid-bot {
    min-height: 0;
    overflow: hidden;
    gap: 10px;
  }

  .lm-grid-top {
    flex: 1.05;
  }

  .lm-grid-bot {
    flex: 0.95;
    margin-top: 10px;
  }

  .lm-grid-top > *,
  .lm-grid-bot > * {
    min-height: 0;
    overflow: hidden;
  }

  .lm-grid-top > .lm-card.is-tall:first-child {
    overflow: visible;
  }

  .lm-card.is-tall,
  .lm-promo,
  .lm-span-2 {
    height: 100%;
  }

  .lm-card.is-tall {
    overflow: hidden;
    gap: 6px;
  }
}

/* Barra superior no formato do template: busca, perÃ­odo, Ã­cones, avatar. */
.app-topbar {
  background: var(--hz-background) !important;
  border-bottom: 0 !important;
  backdrop-filter: none !important;
}

.app-topbar-inner {
  gap: 12px;
  min-height: 52px !important;
  padding: 6px 8px 4px !important;
}

.app-topbar-actions {
  margin-left: auto;
  gap: 14px;
  align-items: center;
}

.app-topbar-cluster {
  background: transparent;
  border: 0;
  padding: 0;
  gap: 6px;
}

.lm-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 6px 0 18px;
  border-radius: 999px;
  background: rgba(19, 6, 0, 0.05);
  border: 1px solid transparent;
}

.lm-search:focus-within {
  border-color: #ff5300;
}

.lm-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: 400 14px/1 Outfit, sans-serif;
}

.lm-search-go,
.lm-period-ico,
.lm-period-chev {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(19, 6, 0, 0.05);
  flex-shrink: 0;
}

.lm-search-go .material-symbols-outlined,
.lm-period-ico .material-symbols-outlined,
.lm-period-chev .material-symbols-outlined {
  font-size: 16px;
}

.lm-period {
  position: relative;
  flex-shrink: 0;
}

.lm-period-btn {
  height: 40px;
  padding: 0 12px 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(19, 6, 0, 0.06);
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: 400 14px/1 Outfit, sans-serif;
}

.lm-period-ico,
.lm-period-chev {
  width: auto;
  height: auto;
  background: transparent;
}

.lm-period-btn #topbar-period-label {
  min-width: 52px;
  text-align: left;
}

.lm-period-btn[aria-expanded="true"] .lm-period-chev {
  transform: rotate(180deg);
}

.lm-period-menu {
  position: absolute;
  top: 48px;
  right: 0;
  left: auto;
  z-index: 30;
  min-width: 100%;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(19, 6, 0, 0.08);
  box-shadow: 0 16px 40px -20px rgba(19, 6, 0, 0.45);
}

.lm-period-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font: 400 14px/1.2 Outfit, sans-serif;
  color: #130600;
}

.lm-period-menu button.is-on {
  color: #ff5300;
  background: rgba(255, 83, 0, 0.1);
}

.app-topbar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit;
  padding: 0;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.app-topbar-icon:hover,
.app-topbar-icon:focus,
.app-topbar-icon:focus-visible,
.app-topbar-icon:active {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.app-topbar-icon .material-symbols-outlined {
  font-size: 22px;
  background: transparent !important;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* Tema claro/escuro: sem “caixinha” nativa do color-scheme */
#btn-theme-toggle {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  color: inherit !important;
}
#btn-theme-toggle:hover,
#btn-theme-toggle:focus,
#btn-theme-toggle:focus-visible,
#btn-theme-toggle:active {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
#btn-theme-toggle .material-symbols-outlined {
  background: transparent !important;
  color: inherit !important;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.app-topbar-avatar {
  width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background-color: #3a2a22;
  color: #fff;
  font-weight: 500;
  box-shadow: none !important;
}

#btn-notifications {
  position: relative;
}

.app-topbar-dot:not(.hidden) {
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  width: auto;
  padding: 0 4px;
  background: #ff5300;
  color: #fff;
  font: 600 10px/16px Outfit, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

/* Escuro homogÃªneo: fundo, barra, menu e cards na mesma famÃ­lia. */
html.dark,
html.dark body,
html.dark .app-main {
  background: #130600;
  color: #fff;
}

html.dark .sidebar {
  background: #130600 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .lm-search,
html.dark .lm-search-go {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

html.dark .lm-period-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html.dark .lm-period-ico,
html.dark .lm-period-chev,
html.dark .app-topbar-icon {
  background: transparent;
  color: #fff;
}

html.dark .lm-search input {
  color: #fff;
}

html.dark .lm-search input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

html.dark .lm-period-menu {
  background: #2a170c;
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark .lm-period-menu button {
  color: #fff;
}

html.dark .app-topbar-icon {
  color: #fff;
}

html.dark .lm-home {
  --lm-ink: #fff;
  --lm-muted: rgba(255, 255, 255, 0.45);
  --lm-soft: rgba(255, 255, 255, 0.72);
  background: transparent;
  color: #fff;
}

html.dark .lm-card {
  background: #1c1008 radial-gradient(120% 90% at 100% 100%, rgba(255, 83, 0, 0.16), transparent 60%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: #fff;
}

html.dark .lm-card.is-hot {
  background: linear-gradient(135deg, #1f0e05 8%, #521e05 62%, #ff5300 140%);
}

html.dark .lm-disc {
  background: #f4ece7;
  color: #130600;
}

html.dark .lm-pill,
html.dark .lm-iconbtn,
html.dark .lm-cal-nav {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html.dark .lm-hatch-bar {
  background: repeating-linear-gradient(115deg, rgba(255, 83, 0, 0.55) 0 2px, transparent 2px 6px);
  background-color: transparent;
}

html.dark .lm-hatch-bar.is-solid {
  background: #ff5300;
}

html.dark .lm-callout {
  background: rgba(20, 6, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

html.dark .lm-task {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark .lm-cal-grid button {
  color: #fff;
}

html.dark .lm-cell {
  background: repeating-linear-gradient(115deg, rgba(255, 83, 0, 0.28) 0 2px, transparent 2px 6px);
  background-color: transparent;
}

html.dark .lm-cell.l1 {
  background: repeating-linear-gradient(115deg, rgba(255, 83, 0, 0.55) 0 2px, transparent 2px 5px);
  background-color: transparent;
}

html.dark .lm-cell.l2 {
  background: #c2410c;
}

html.dark .lm-cell.l3 {
  background: #ff5300;
}

/* Celular no formato do app: perÃ­odo Ã  esquerda, sino e avatar Ã  direita,
   home em coluna e navegaÃ§Ã£o sÃ³ de Ã­cones, com o ativo no quadrado laranja. */
@media (max-width: 767px) {
  .app-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
    background: var(--hz-background) !important;
  }

  .app-topbar-inner {
    display: flex !important;
    align-items: center;
    min-height: 56px !important;
    padding: 8px 16px 4px !important;
    gap: 8px !important;
  }

  .app-topbar-actions {
    display: contents;
  }

  .lm-top-brand,
  .lm-search,
  .lm-top-extra,
  #btn-theme-toggle,
  #btn-mobile-menu,
  #header-greeting {
    display: none !important;
  }

  .lm-period {
    display: block !important;
    margin-right: auto;
  }

  .lm-period-btn {
    height: 44px;
    padding: 0 14px;
    background: var(--hz-surface-container);
  }

  #btn-notifications,
  #user-avatar {
    width: 44px;
    height: 44px;
  }

  .page-section {
    padding: 4px 16px 20px !important;
  }

  .lm-home {
    background: transparent;
    border-radius: 0;
    padding: 0;
  }

  .lm-greet {
    margin: 12px 0 4px;
    font-size: 24px;
    line-height: 1.25;
  }

  .lm-grid-top,
  .lm-grid-bot {
    gap: 12px;
  }

  .lm-promo,
  .lm-card.is-tall {
    min-height: 0;
  }

  nav[aria-label="NavegaÃ§Ã£o principal"] {
    background: var(--hz-background) !important;
    border-top: 1px solid var(--hz-outline-variant) !important;
    backdrop-filter: none !important;
  }

  .mobile-bottom-nav {
    height: auto;
    padding: 10px 20px 8px;
    background: transparent;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-nav-item,
  .mobile-nav-fab {
    flex: 0 0 48px !important;
    width: 48px;
    height: 48px;
    margin: 0 !important;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--hz-on-surface-variant);
    gap: 0;
  }

  .mobile-nav-item span:not(.material-symbols-outlined) {
    display: none;
  }

  .mobile-nav-item .material-symbols-outlined,
  #btn-mobile-fab .material-symbols-outlined {
    font-size: 22px;
  }

  #btn-mobile-fab .rounded-full {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    background: transparent !important;
    color: var(--hz-on-surface-variant) !important;
    box-shadow: none !important;
  }

  .mobile-nav-item.active,
  a.mobile-nav-item[aria-current="page"],
  html.dark .mobile-nav-item.active,
  html:not(.dark) .mobile-nav-item.active {
    background: #ff5300 !important;
    color: #fff !important;
  }

  .mobile-nav-item.active .material-symbols-outlined {
    color: #fff !important;
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
  }
}

/* Modulo financeiro — kit Lumme Design System (ui_kits/finance). */
.fn-page {
  --fn-ink: #130600;
  --fn-muted: #5b4d47;
  --fn-card: #ffffff;
  --fn-panel: #fbf6f3;
  --fn-line: rgba(19, 6, 0, 0.06);
  --fn-line-2: rgba(19, 6, 0, 0.12);
  --fn-soft: rgba(19, 6, 0, 0.05);
  --fn-orange: #ff5300;
  --fn-orange-deep: #b83a00;
  --fn-peach: #f9c4ae;
  --fn-salmon: #f59b6c;
  --fn-hatch: repeating-linear-gradient(115deg, var(--fn-peach) 0 2px, transparent 2px 6px);
  --fn-glow: radial-gradient(120% 90% at 100% 100%, rgba(255, 116, 51, 0.16) 0%, rgba(255, 116, 51, 0) 65%);
  --fn-shadow: 0 10px 30px -18px rgba(82, 30, 5, 0.25);
  color: var(--fn-ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: Outfit, sans-serif;
}

.fn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fn-head h2 {
  margin: 0;
  font: 500 22px/1.2 Outfit, sans-serif;
  letter-spacing: -0.02em;
}

.fn-head p,
.fn-note,
.fn-empty {
  margin: 4px 0 0;
  color: var(--fn-muted);
  font-size: 13px;
}

.fn-head-actions,
.fn-balance-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fn-btn {
  border: 0;
  border-radius: 999px;
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font: 500 13px/1 Outfit, sans-serif;
  text-decoration: none;
  color: inherit;
  transition: background 160ms cubic-bezier(.2,.8,.2,1), transform 120ms ease;
}

.fn-btn:active { transform: scale(.98); }
.fn-btn .material-symbols-outlined { font-size: 18px; }
.fn-btn-ghost { background: var(--fn-soft); color: var(--fn-ink); }
.fn-btn-solid,
.fn-btn-ink { background: #130600; color: #fff; }
.fn-btn-light { background: #fff; color: #130600; }
.fn-btn-accent { background: var(--fn-orange); color: #fff; }

.fn-rows { display: flex; flex-direction: column; gap: 12px; }
.fn-row { display: grid; gap: 12px; }
.fn-r1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1fr); }
.fn-r2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fn-r3 { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr) minmax(0, 1fr); }
.fn-r4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fn-r5 { grid-template-columns: minmax(0, 1fr); }

.fn-card,
.fn-balance {
  border-radius: 20px;
  padding: 16px;
  min-width: 0;
}

.fn-card {
  background: var(--fn-card);
  background-image: var(--fn-glow);
  border: 1px solid var(--fn-line);
  box-shadow: var(--fn-shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fn-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fn-card-head h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font: 400 18px/1.2 Outfit, sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fn-widicon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #130600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fn-widicon .material-symbols-outlined { font-size: 16px; }

.fn-balance {
  position: relative;
  overflow: hidden;
  background: var(--fn-orange);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 170px;
}

.fn-balance::before {
  content: "";
  position: absolute;
  right: -50px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.22) 0 2px, transparent 2px 7px);
  pointer-events: none;
}

.fn-balance-top,
.fn-balance-actions,
.fn-balance-meta { position: relative; z-index: 1; }

.fn-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fn-balance p,
.fn-stat p,
.fn-score p,
.fn-balance-meta {
  margin: 0;
  font-size: 13px;
  color: #130600;
}

.fn-balance strong {
  display: block;
  margin-top: 2px;
  font: 500 34px/1 Outfit, sans-serif;
  letter-spacing: -0.02em;
  color: #fff;
}
.fn-balance strong small {
  font-size: 16px;
  font-weight: 400;
}

.fn-balance-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.fn-balance-actions .fn-btn { width: 100%; height: 40px; border-radius: 12px; }

.fn-plus,
.fn-icon {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #130600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.fn-icon { background: transparent; color: var(--fn-muted); }
.fn-icon .material-symbols-outlined,
.fn-plus .material-symbols-outlined { font-size: 18px; }

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

.fn-mini-stat {
  border: 1px solid var(--fn-line-2);
  border-radius: 14px;
  padding: 12px;
  min-width: 0;
  background: rgba(255,255,255,.55);
}

.fn-mini-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--fn-muted);
}

.fn-mini-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 83, 0, 0.1);
  color: var(--fn-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fn-mini-ico .material-symbols-outlined { font-size: 16px; }

.fn-mini-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.fn-mini-value strong {
  font: 400 22px/1 Outfit, sans-serif;
  color: var(--fn-ink);
}
.fn-mini-delta { font-size: 12px; color: var(--fn-orange); }
.fn-mini-delta.is-neg { color: #f0443a; }

.fn-score { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 4px; }
.fn-score strong,
.fn-score b { font: 500 26px/1.1 Outfit, sans-serif; }
.fn-score-bar { display: flex; gap: 6px; margin-top: 12px; height: 26px; }
.fn-score-bar i { display: block; border-radius: 8px; height: 100%; }
.fn-score-bar .is-fill { background: var(--fn-orange); }
.fn-score-bar .is-rest { background: var(--fn-hatch); min-width: 22px; }

.fn-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--fn-muted);
  flex-wrap: wrap;
}
.fn-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}
.fn-legend .is-in { background: var(--fn-orange); }
.fn-legend .is-out {
  background: var(--fn-hatch);
  border: 1px solid var(--fn-peach);
  box-sizing: border-box;
}

.fn-cash-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.fn-cash-metric { font: 400 28px/1.1 Outfit, sans-serif; margin-top: 4px; }

.fn-bars {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 220px;
}
.fn-bar {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr 1fr auto;
  min-width: 0;
  position: relative;
}
.fn-bar-up,
.fn-bar-dn { display: flex; justify-content: center; }
.fn-bar-up { align-items: flex-end; }
.fn-bar-dn { align-items: flex-start; border-top: 1px solid var(--fn-line-2); }
.fn-bar-up span,
.fn-bar-dn span {
  width: 64%;
  max-width: 30px;
  display: block;
  min-height: 0;
}
.fn-bar-up span { background: var(--fn-orange); border-radius: 8px 8px 2px 2px; }
.fn-bar-dn span {
  background: var(--fn-hatch);
  border: 1px solid var(--fn-peach);
  border-top: none;
  border-radius: 2px 2px 8px 8px;
}
.fn-bar em {
  font-style: normal;
  text-align: center;
  font-size: 12px;
  color: var(--fn-muted);
  padding-top: 8px;
}

.fn-donut-wrap { display: flex; justify-content: center; }
.fn-donut {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fn-donut span {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--fn-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: 400 18px/1.2 Outfit, sans-serif;
  padding: 8px;
  gap: 2px;
}
.fn-donut small { font-size: 11px; color: var(--fn-muted); font-weight: 400; }

.fn-cats,
.fn-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fn-cats li,
.fn-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.fn-cats i {
  width: 38px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #130600;
  flex-shrink: 0;
}
.fn-cats span,
.fn-list div { flex: 1; min-width: 0; }
.fn-list strong,
.fn-table strong { display: block; font-weight: 500; }
.fn-list small,
.fn-table small {
  display: block;
  color: var(--fn-muted);
  font-size: 12px;
}
.fn-list .fn-stat-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 83, 0, 0.1);
  color: var(--fn-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.fn-list .fn-stat-ico .material-symbols-outlined { font-size: 16px; }
.fn-list li.is-off { opacity: 0.5; }

.fn-recurring-panel { min-height: 100%; }
.fn-recurring-cta { margin-top: auto; width: 100%; border-radius: 12px; height: 40px; }

.fn-ai {
  position: relative;
  overflow: hidden;
  align-items: center;
  text-align: center;
  min-height: 320px;
  justify-content: center;
  gap: 10px;
}
.fn-ai h3 {
  margin: 0;
  font: 400 18px/1.3 Outfit, sans-serif;
}
.fn-ai-kicker {
  margin: 0;
  font-size: 13px;
  color: var(--fn-muted);
}
.fn-ai-orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: -8px 0;
  background:
    radial-gradient(circle at 35% 30%, #ffd0b8 0%, #ff7a33 38%, #ff5300 68%, #9a2e00 100%);
  box-shadow:
    0 0 0 12px rgba(255, 83, 0, 0.08),
    0 18px 40px rgba(255, 83, 0, 0.28);
  animation: fn-orb-pulse 3.2s ease-in-out infinite;
}
@keyframes fn-orb-pulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.03); }
}
.fn-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.fn-ai-chip {
  border: 0;
  background: var(--fn-soft);
  color: var(--fn-ink);
  border-radius: 999px;
  padding: 0 12px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.fn-ai-form {
  width: 100%;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: var(--fn-soft);
}
.fn-ai-form input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  background: transparent;
  padding: 0 8px;
  color: var(--fn-ink);
  outline: none;
  font: 400 14px/1 Outfit, sans-serif;
}
.fn-ai-mic {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 83, 0, 0.12);
  color: var(--fn-orange-deep);
  text-decoration: none;
}

.fn-table-wrap { overflow-x: auto; }
.fn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.fn-table thead tr { background: var(--fn-soft); }
.fn-table th {
  text-align: left;
  font-weight: 500;
  color: var(--fn-muted);
  font-size: 12px;
  padding: 8px 10px;
}
.fn-table th:first-child { border-radius: 8px 0 0 8px; }
.fn-table th:last-child { border-radius: 0 8px 8px 0; }
.fn-table td {
  padding: 10px;
  border-top: 1px solid var(--fn-line);
  vertical-align: middle;
}
.fn-table .is-in { color: var(--fn-orange); font-weight: 500; }
.fn-table .is-out,
.fn-list .is-out { color: #f0443a; font-weight: 500; }
.fn-list .is-in { color: var(--fn-orange); font-weight: 500; }

.fn-chip {
  font-size: 11px;
  background: rgba(255, 83, 0, 0.12);
  color: var(--fn-orange-deep);
  border-radius: 999px;
  padding: 3px 8px;
}

.fn-figure {
  display: block;
  margin: 0;
  font: 400 28px/1.1 Outfit, sans-serif;
  letter-spacing: -0.02em;
}

.fn-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.fn-page .benefit-card {
  background: var(--fn-soft);
  border: 0;
  border-radius: 14px;
  box-shadow: none;
}

html.dark .fn-page {
  --fn-ink: #fff;
  --fn-muted: rgba(255, 255, 255, 0.72);
  --fn-card: #1f0e05;
  --fn-panel: #1b0b03;
  --fn-line: rgba(255, 255, 255, 0.08);
  --fn-line-2: rgba(255, 255, 255, 0.16);
  --fn-soft: rgba(255, 255, 255, 0.07);
  --fn-hatch: repeating-linear-gradient(115deg, rgba(255, 83, 0, 0.45) 0 2px, transparent 2px 6px);
  --fn-glow: radial-gradient(120% 90% at 100% 100%, rgba(255, 83, 0, 0.10) 0%, rgba(255, 83, 0, 0) 60%);
  --fn-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px -12px rgba(0,0,0,.5);
}
html.dark .fn-widicon { background: #fff; color: #130600; }
html.dark .fn-balance p,
html.dark .fn-balance-meta { color: #130600; }
html.dark .fn-btn-ghost,
html.dark .fn-mini-stat,
html.dark .fn-ai-chip,
html.dark .fn-ai-form,
html.dark .fn-page .benefit-card,
html.dark .fn-table thead tr { background: rgba(255, 255, 255, 0.06); }
html.dark .fn-donut span { background: #2a170c; color: #fff; }
html.dark .fn-btn-solid,
html.dark .fn-btn-ink { background: #f9c4ae; color: #130600; }
html.dark .fn-balance .fn-btn-ink { background: #130600; color: #fff; }
html.dark .fn-balance .fn-btn-light { background: #fff; color: #130600; }
html.dark .fn-ai-mic { background: rgba(255, 83, 0, 0.2); color: #ffb48a; }

@media (max-width: 1100px) {
  .fn-r1, .fn-r3, .fn-r4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fn-r1 > :last-child,
  .fn-r3 > :first-child { grid-column: 1 / -1; }
  .fn-benefits { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .fn-r1, .fn-r2, .fn-r3, .fn-r4, .fn-mini { grid-template-columns: minmax(0, 1fr); }
  .fn-r1 > :last-child,
  .fn-r3 > :first-child { grid-column: auto; }
  .fn-head h2 { font-size: 22px; }
  .fn-bars { height: 180px; }
}


/* Layout exacto do Finance.dc.html */
.fn-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.fn-col-sm { flex: 1 1 280px; min-width: 0; }
.fn-col-md { flex: 1 1 440px; min-width: 0; }
.fn-col-lg { flex: 2 1 480px; min-width: 0; }
.fn-col-wide { flex: 2 1 700px; min-width: 0; }
.fn-col-full { flex: 1 1 100%; min-width: 0; }

.fn-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--fn-soft);
  min-width: min(300px, 100%);
}
.fn-search .material-symbols-outlined { font-size: 18px; opacity: .55; }
.fn-search input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  color: var(--fn-ink);
  font: 400 14px Outfit, sans-serif;
}
.fn-iconbtn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--fn-soft);
  color: var(--fn-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.fn-btn-accent {
  background: var(--fn-orange);
  color: #fff;
  border-radius: 999px;
}
.fn-btn-accent:hover { background: #ff6a1f; }

.fn-cash-plot {
  display: flex;
  gap: 10px;
}
.fn-ylabels {
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 11px;
  color: var(--fn-muted);
  text-align: right;
  line-height: 1;
}
.fn-ai-brand {
  font: 500 36px/1 Outfit, sans-serif;
  letter-spacing: -0.03em;
  color: var(--fn-orange);
  padding: 10px 0 4px;
}
.fn-ai .fn-ai-orb { display: none; }

.fn-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.fn-chipbtn {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(19,6,0,.5);
  background: transparent;
  color: var(--fn-ink);
  font: 400 12px Outfit, sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
}
.fn-chipbtn.is-on {
  background: #130600;
  color: #fff;
  border-color: transparent;
}

.fn-txgrid {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(120px, 1.1fr) 96px 110px 96px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--fn-line);
  font-size: 13px;
}
.fn-txhead {
  border: 0;
  border-radius: 8px;
  background: var(--fn-soft);
  color: var(--fn-muted);
  font-size: 12px;
  padding: 8px 10px;
}
.fn-muted { color: var(--fn-muted); }
.fn-status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--fn-soft);
  color: var(--fn-muted);
}
.fn-status.is-done {
  background: rgba(255, 83, 0, 0.12);
  color: var(--fn-orange);
}

.fn-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.fn-tab {
  height: 36px;
  border: 0;
  border-bottom: 2px solid var(--fn-line-2);
  background: none;
  color: var(--fn-muted);
  font: 400 13px Outfit, sans-serif;
  cursor: pointer;
}
.fn-tab.is-on {
  border-bottom-color: var(--fn-orange);
  color: var(--fn-ink);
}
.fn-tab small { font-size: 11px; opacity: .7; }

.fn-week-bars {
  display: flex;
  gap: 10px;
  height: 140px;
  border-bottom: 1px solid var(--fn-line-2);
  align-items: flex-end;
}
.fn-week-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.fn-week-pair {
  width: 100%;
  height: 120px;
  display: flex;
  gap: 4px;
  align-items: flex-end;
  justify-content: center;
}
.fn-week-pair span {
  flex: 1;
  max-width: 18px;
  border-radius: 6px;
  min-height: 4px;
}
.fn-week-pair .is-inc { background: var(--fn-orange); }
.fn-week-pair .is-exp {
  background: var(--fn-hatch);
  border: 1px solid var(--fn-peach);
}
.fn-week-col em {
  font-style: normal;
  font-size: 12px;
  color: var(--fn-muted);
}
.fn-mini-3 { margin-top: 6px; }
.fn-week-cats { display: grid; gap: 10px; margin-top: auto; }
.fn-week-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.fn-week-cat > span:first-child { flex: 0 0 92px; }
.fn-week-track {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: var(--fn-soft);
  overflow: hidden;
}
.fn-week-track i { display: block; height: 100%; border-radius: 5px; }
.fn-week-cat em { flex: 0 0 34px; text-align: right; color: var(--fn-muted); font-style: normal; }
.fn-week-cat b { flex: 0 0 82px; text-align: right; font-weight: 500; }

.fn-strip {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 2px;
}
.fn-strip-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.fn-strip-dow { font-size: 10px; color: var(--fn-muted); }
.fn-strip-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fn-strip-num.is-today {
  background: var(--fn-orange);
  color: #fff;
}
.fn-strip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
}
.fn-strip-dot.is-on { background: var(--fn-orange); }

.fn-agenda { display: flex; flex-direction: column; }
.fn-agenda-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--fn-line);
}
.fn-agenda-date {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--fn-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
}
.fn-agenda-date b { font: 500 16px/1 Outfit, sans-serif; }
.fn-agenda-date small {
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--fn-muted);
}
.fn-agenda-row > div { flex: 1; min-width: 0; }
.fn-agenda-row strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fn-agenda-row small { display: block; font-size: 12px; color: var(--fn-muted); }
.fn-agenda-row small.is-late { color: #f0443a; }
.fn-agenda-row small.is-soon { color: var(--fn-orange); }
.fn-agenda-row > b { font-size: 14px; font-weight: 500; white-space: nowrap; }
.fn-agenda-row .fn-btn { height: 36px; padding: 0 14px; flex-shrink: 0; }

.fn-remind {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 14px;
  background: var(--fn-soft);
}
.fn-remind p { margin: 0; flex: 1 1 200px; font-size: 13px; color: var(--fn-muted); }
.fn-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.fn-switch input {
  width: 42px;
  height: 24px;
  accent-color: var(--fn-orange);
}

@media (max-width: 1100px) {
  .fn-txgrid { min-width: 660px; }
}
@media (max-width: 760px) {
  .fn-col-sm, .fn-col-md, .fn-col-lg, .fn-col-wide { flex: 1 1 100%; }
  .fn-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}


/* —— Assistente FAB / chat —— */
#assistant-fab-root {
  position: fixed;
  z-index: 88;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(84px, calc(68px + env(safe-area-inset-bottom, 0px)));
  left: auto;
  pointer-events: none;
}

@media (min-width: 768px) {
  #assistant-fab-root {
    bottom: 24px;
    right: 24px;
  }
}

body:has(#pomodoro-root .pomodoro-widget) #assistant-fab-root:not(.is-open),
body:has(#pomodoro-root .pomo-focus-overlay) #assistant-fab-root:not(.is-open) {
  bottom: max(148px, calc(132px + env(safe-area-inset-bottom, 0px)));
}

@media (min-width: 768px) {
  body:has(#pomodoro-root .pomodoro-widget) #assistant-fab-root:not(.is-open),
  body:has(#pomodoro-root .pomo-focus-overlay) #assistant-fab-root:not(.is-open) {
    bottom: 96px;
  }
}

#assistant-fab-root.is-open {
  z-index: 96;
}

.lm-as-fab,
.lm-as-panel,
.lm-as-form,
.lm-as-chip,
.lm-as-btn,
.lm-as-iconbtn,
.lm-as-send {
  pointer-events: auto;
}

.lm-as-fab {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, #ff7433 0%, #ff5300 55%, #c43d00 100%);
  box-shadow: 0 12px 28px -10px rgba(255, 83, 0, 0.65);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lm-as-fab:hover {
  transform: translateY(-2px) scale(1.03);
}

.lm-as-fab .material-symbols-outlined {
  font-size: 24px;
}

.lm-as-panel {
  position: absolute;
  right: 0;
  bottom: calc(56px + 12px);
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100dvh - 120px));
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: #fff radial-gradient(120% 90% at 100% 0%, rgba(255, 116, 51, 0.16), transparent 58%);
  border: 1px solid rgba(19, 6, 0, 0.08);
  box-shadow: 0 24px 48px -20px rgba(82, 30, 5, 0.45);
  overflow: hidden;
  color: var(--lm-ink, #130600);
}

.lm-as-panel[hidden] {
  display: none !important;
}

.lm-as-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(19, 6, 0, 0.06);
}

.lm-as-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lm-as-head-text strong {
  font-size: 15px;
  font-weight: 600;
}

.lm-as-head-text span {
  font-size: 12px;
  color: var(--lm-muted, #8a7a72);
}

.lm-as-iconbtn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(19, 6, 0, 0.05);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.lm-as-iconbtn .material-symbols-outlined {
  font-size: 18px;
}

.lm-as-log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lm-as-empty {
  margin: auto 0;
  text-align: left;
  color: var(--lm-muted, #8a7a72);
  font-size: 14px;
  line-height: 1.45;
}

.lm-as-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.lm-as-chip {
  border: 1px solid rgba(19, 6, 0, 0.08);
  background: rgba(255, 255, 255, 0.7);
  color: var(--lm-ink, #130600);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.lm-as-chip:hover {
  border-color: rgba(255, 83, 0, 0.35);
  background: #fff;
}

.lm-as-msg {
  display: flex;
  max-width: 100%;
}

.lm-as-msg--user {
  justify-content: flex-end;
}

.lm-as-msg--bot {
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.lm-as-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.lm-as-msg--user .lm-as-bubble {
  background: #ff5300;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.lm-as-msg--bot .lm-as-bubble {
  background: rgba(19, 6, 0, 0.05);
  border-bottom-left-radius: 4px;
}

.lm-as-bubble--thinking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lm-muted, #8a7a72);
}

.lm-as-dots {
  display: inline-flex;
  gap: 3px;
}

.lm-as-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff5300;
  opacity: 0.35;
  animation: lm-as-dot 1s ease-in-out infinite;
}

.lm-as-dots i:nth-child(2) { animation-delay: 0.15s; }
.lm-as-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes lm-as-dot {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.lm-as-action {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 83, 0, 0.22);
  box-shadow: 0 8px 20px -14px rgba(82, 30, 5, 0.4);
}

.lm-as-action.is-done {
  font-size: 12px;
  color: var(--lm-muted, #8a7a72);
  border-color: rgba(19, 6, 0, 0.08);
  box-shadow: none;
}

.lm-as-action-sum {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.lm-as-action-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.lm-as-btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.lm-as-btn--ghost {
  background: rgba(19, 6, 0, 0.05);
  color: inherit;
}

.lm-as-btn--primary {
  background: #ff5300;
  color: #fff;
}

.lm-as-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(19, 6, 0, 0.06);
}

.lm-as-form input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(19, 6, 0, 0.1);
  background: rgba(255, 255, 255, 0.9);
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  color: inherit;
}

.lm-as-form input:disabled {
  opacity: 0.6;
}

.lm-as-send {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #130600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lm-as-send:disabled {
  opacity: 0.45;
  cursor: default;
}

.lm-as-send .material-symbols-outlined {
  font-size: 18px;
}

html.dark .lm-as-panel {
  background: #1a100c radial-gradient(120% 90% at 100% 0%, rgba(255, 83, 0, 0.18), transparent 58%);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html.dark .lm-as-head {
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark .lm-as-iconbtn,
html.dark .lm-as-btn--ghost,
html.dark .lm-as-msg--bot .lm-as-bubble {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html.dark .lm-as-chip,
html.dark .lm-as-form input,
html.dark .lm-as-action {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

html.dark .lm-as-form {
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark .lm-as-send {
  background: #ff5300;
}
