/* Financeiro do Lume Web (prévia de 01/12/2026). Usa as cores do tema do perfil (--lume-blue-*). */
.lf-page, .lf-panel, .lf-tabs, .lf-dialog, .lf-toast {
  --lf-950: var(--lume-blue-950, #10234c); --lf-900: var(--lume-blue-900, #173768); --lf-700: var(--lume-blue-700, #28558a);
  --lf-500: var(--lume-blue-500, #668dbb); --lf-300: var(--lume-blue-300, #a9c3df); --lf-200: var(--lume-blue-200, #c6d8eb);
  --lf-100: var(--lume-blue-100, #dce8f4); --lf-50: var(--lume-blue-50, #edf3f9);
  --lf-open-bg: #f6e1d7; --lf-open: #8b3a17; --lf-part-bg: #f6ead0; --lf-part: #7a5200; --lf-paid-bg: #d9ede0; --lf-paid: #24603d;
  --lf-muted: #5d7392;
}
.lf-page { display: flex; flex-direction: column; gap: 16px; padding-bottom: 32px; color: var(--lf-950); container: lf-page / inline-size; }
.lf-loading, .lf-error { padding: 32px; text-align: center; color: var(--lf-muted); }
.lf-error { color: var(--lf-open); }
.lf-hero { background: var(--lf-950); border-radius: 16px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: #fff; }
.lf-hero-title { flex: 1; min-width: 200px; }
.lume-view #lume-content .lf-hero-title small, .lf-dh small { font-size: 10.5px; letter-spacing: .14em; color: var(--lf-200); font-weight: 800; }
.lf-hero h1 { margin: 0; font-family: Lora, Georgia, serif; font-weight: 600; font-size: 30px; color: #fff; }
.lf-tile { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; background: #ffffff1a; border: 1px solid #ffffff33; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.lf-tile svg { width: 22px; height: 22px; }
.lf-page button, .lf-panel button, .lf-tabs button, .lf-dialog button { font-family: inherit; cursor: pointer; }
.lf-btn-white, .lf-btn-ghost, .lf-btn, .lf-btn-light { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: 13px; line-height: 1.2; min-height: 38px; box-shadow: none; }
.lf-btn-white { background: #fff !important; color: var(--lf-950) !important; border: 1px solid #fff !important; }
.lf-btn-ghost { background: transparent !important; color: #fff !important; border: 1px solid #ffffff59 !important; }
.lf-btn { background: var(--lf-900) !important; color: #fff !important; border: 1px solid var(--lf-900) !important; }
.lf-btn-light { background: #fff !important; color: var(--lf-900) !important; border: 1px solid var(--lf-300) !important; }
.lf-btn svg, .lf-btn-white svg, .lf-btn-ghost svg { width: 16px; height: 16px; }
.lf-sm { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.lf-btn:disabled { opacity: .6; cursor: wait; }
.lf-panel { background: var(--lf-100); border: 1px solid var(--lf-300); border-radius: 16px; padding: 16px 18px; color: var(--lf-950); min-width: 0; }
.lf-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.lf-panel-head h2 { margin: 0; font-family: Lora, Georgia, serif; font-weight: 600; font-size: 19px; color: var(--lf-950); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lf-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--lf-950); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.lf-ic svg { width: 16px; height: 16px; }
.lf-ic.is-warm { background: var(--lf-open); }
.lf-periodbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; }
.lf-period-label { font-family: Lora, Georgia, serif; font-size: 20px; font-weight: 600; color: var(--lf-950); }
.lf-flex { flex: 1; }
.lf-sq { width: 34px; height: 34px; border-radius: 9px; background: #fff !important; border: 1px solid var(--lf-200) !important; color: var(--lf-950) !important; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.lf-sq svg { width: 16px; height: 16px; }
.lf-seg { display: inline-flex; background: #fff; border: 1px solid var(--lf-200); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.lf-seg button { border: 0 !important; background: transparent !important; border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 12.5px; color: var(--lf-700) !important; box-shadow: none !important; min-height: 0; }
.lf-seg button.is-on { background: var(--lf-900) !important; color: #fff !important; }
.lf-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--lf-900); color: #fff; border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 12.5px; font-weight: 700; }
.lf-chip button { background: #ffffff26 !important; color: #fff !important; border: 0 !important; border-radius: 50%; width: 22px; height: 22px; padding: 0; line-height: 1; }
.lf-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.lf-stat { background: var(--lf-950); border: 1px solid var(--lf-700); border-radius: 14px; padding: 15px 16px; color: #fff; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lume-view #lume-content .lf-stat small { font-size: 12px; color: var(--lf-200); }
.lf-stat b { font-size: 26px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.lf-stat span { font-size: 11.5px; color: var(--lf-300); }
.lf-stat.is-open { background: var(--lf-900); }
.lf-up { color: #9fe0b5; font-weight: 800; }
.lf-down { color: #f5b7a3; font-weight: 800; }
.lf-two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.lf-card { background: #fff; border: 1px solid var(--lf-200); border-radius: 12px; min-width: 0; }
.lf-pad { padding: 12px 16px; }
.lf-chart { padding: 16px 14px 10px; }
.lf-bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; border-bottom: 1px solid var(--lf-100); }
.lf-bar { flex: 1; min-width: 0; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--lf-500), var(--lf-900)); }
.lf-bar.is-zero { background: var(--lf-100); }
.lf-bar:focus-visible { outline: 3px solid var(--lf-500); outline-offset: 2px; }
.lf-ticks { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--lf-muted); padding-top: 8px; }
.lf-chips { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.lf-methods { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; height: calc(100% - 44px); box-sizing: border-box; }
.lf-row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.lf-rail { height: 10px; background: #fff; border: 1px solid var(--lf-200); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.lf-rail i { display: block; height: 100%; background: linear-gradient(90deg, var(--lf-500), var(--lf-900)); border-radius: 6px; }
.lf-muted { color: var(--lf-muted); font-size: 12px; }
.lf-strong { font-weight: 700; }
.lf-btn-danger { background: var(--lf-open) !important; border-color: var(--lf-open) !important; }
.lf-text { margin: 0; font-size: 13.5px; line-height: 1.5; }
.lf-dh small { display: block; }
.lf-tag { font-family: Manrope, system-ui, sans-serif; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.lf-big { font-size: 13.5px; padding: 5px 12px; }
.lf-t-open { background: var(--lf-open-bg); color: var(--lf-open); }
.lf-t-part { background: var(--lf-part-bg); color: var(--lf-part); }
.lf-t-paid { background: var(--lf-paid-bg); color: var(--lf-paid); }
.lf-t-free { background: var(--lf-200); color: var(--lf-950); }
.lf-t-navy { background: var(--lf-900); color: #fff; }
.lf-open-table { position: relative; width: 100%; border-collapse: collapse; font-size: 13px; }
.lf-open-table :is(th, td) { padding: 10px 14px; text-align: left; }
.lf-open-table th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--lf-700); font-weight: 800; }
.lf-open-table td { border-top: 1px solid var(--lf-100); overflow-wrap: anywhere; }
.lf-open-table .lf-open-action { text-align: right; }
.lf-open-label { display: none; }
.lf-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lume-view #lume-content .lf-open-row small { display: block; color: var(--lf-muted); font-size: 12px; }
.lf-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lf-who b { display: block; }
.lf-face { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: var(--lf-200); color: var(--lf-900); font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.lf-right { text-align: right; }
.lf-more { display: block; width: 100%; text-align: left; padding: 10px 14px !important; border: 0 !important; border-top: 1px solid var(--lf-100) !important; background: transparent !important; color: var(--lf-900) !important; font-weight: 700; font-size: 12.5px; box-shadow: none !important; }
.lf-empty { margin: 0; padding: 16px; color: var(--lf-muted); font-size: 13px; }
.lf-st-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 100px; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--lf-100); font-size: 13px; }
.lf-st-row:first-child { border-top: 0; }
.lf-pos { color: var(--lf-paid); }
.lf-neg { color: var(--lf-open); }
.lf-line { padding: 9px 0; border-bottom: 1px solid var(--lf-100); }
.lf-total { padding: 12px 0 6px; font-size: 15px; }
.lf-gap { margin-top: 10px; }
.lf-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.lf-error-inline { color: var(--lf-open); font-size: 13px; font-weight: 600; margin-right: auto; }
.lf-error-inline:empty { display: none; }
.lf-settings-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; }
.lf-settings h3 { margin: 4px 0 6px; font-family: Lora, Georgia, serif; font-size: 16px; color: var(--lf-950); }
.lf-price { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--lf-100); font-size: 13.5px; font-weight: 600; }
.lf-price input, .lf-dialog input, .lf-dialog select { box-sizing: border-box; width: 100%; height: 40px; border: 1px solid var(--lf-300); border-radius: 10px; padding: 0 12px; font: inherit; font-weight: 600; color: var(--lf-950); background: #fff; }
.lf-money-in { position: relative; display: block; }
.lf-money-in i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--lf-muted); font-size: 13px; pointer-events: none; }
.lf-money-in input { padding-left: 36px !important; }
.lf-switch { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--lf-100); font-size: 13.5px; font-weight: 600; }
.lf-switch input { width: 18px; height: 18px; accent-color: var(--lf-900); }
/* abas da ficha */
.lf-tabs { background: var(--lf-950); border-radius: 14px; padding: 6px; display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0; }
.lf-tabs button { border: 0 !important; background: transparent !important; color: var(--lf-200) !important; font-weight: 700; font-size: 13px; padding: 10px 18px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; box-shadow: none !important; min-height: 0; }
.lf-tabs button[aria-selected="true"] { background: #fff !important; color: var(--lf-950) !important; }
.lf-dot { width: 7px; height: 7px; border-radius: 50%; background: #e0a33a; display: inline-block; }
.lf-dot[hidden] { display: none; }
.lume-patient-page.lf-show-finance > :not(.lume-back):not(.lume-reading-header):not(.lume-profile):not(.lf-tabs):not(.lf-patient) { display: none !important; }
.lf-patient[hidden], .lf-consult[hidden] { display: none !important; }
.lf-patient, .lf-consult { margin-top: 4px; }
.lf-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.lf-kpi { background: var(--lf-50); border: 1px solid var(--lf-200); border-radius: 12px; padding: 12px 14px; }
.lf-kpi.lf-white { background: #fff; }
.lf-kpi small { display: block; font-size: 12px; font-weight: 700; color: var(--lf-700); }
.lf-kpi b { display: block; font-size: 24px; font-weight: 800; color: var(--lf-950); margin-top: 2px; }
.lf-kpi span { font-size: 12px; color: var(--lf-muted); }
.lf-kpi.is-warm { background: var(--lf-part-bg); border-color: #ead8ae; }
.lf-kpi.is-warm small, .lf-kpi.is-warm b, .lf-kpi.is-warm span { color: var(--lf-part); }
.lf-charge { padding: 14px 16px; border-top: 1px solid var(--lf-100); }
.lf-charge:first-child { border-top: 0; }
.lf-charge > .lf-row-between b { color: var(--lf-950); font-size: 14px; }
.lf-inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lf-pays { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; padding-left: 12px; border-left: 2px solid var(--lf-200); }
.lf-pays .is-muted { color: var(--lf-muted); }
.lf-link, .lf-link-strong, .lf-link-danger { border: 0 !important; background: transparent !important; padding: 0 !important; min-height: 0 !important; box-shadow: none !important; font: inherit; text-decoration: underline; }
.lf-link { color: var(--lf-muted) !important; font-size: 12px; margin-left: 6px; }
.lf-link-strong { color: var(--lf-900) !important; font-weight: 700; font-size: 13px; text-decoration: none; }
.lf-link-danger { color: var(--lf-open) !important; font-weight: 700; font-size: 13px; }
/* aba da consulta */
.lume-reading-nav .lf-sep { display: inline-block; width: 1px; align-self: stretch; margin: 6px 4px; background: currentColor; opacity: .25; }
.lume-reading-page.lf-show-finance .lume-reading-primary > :not(.lume-reading-nav):not(.lf-consult),
.lume-reading-page.lf-show-finance .lume-reading-sidebar { display: none !important; }
.lume-reading-page.lf-show-finance .lume-reading-layout { grid-template-columns: minmax(0, 1fr) !important; }
/* janelas */
.lf-dialog { width: min(600px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--lf-300); border-radius: 18px; background: #f7f6f2; color: var(--lf-950); font-family: Manrope, system-ui, sans-serif; }
.lf-dialog::backdrop { background: rgb(15 27 44 / 60%); }
.lf-dh { background: var(--lf-950); color: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 14px; }
.lf-dh > div { flex: 1; min-width: 0; }
.lf-dh h2 { margin: 0; font-family: Lora, Georgia, serif; font-weight: 600; font-size: 22px; color: #fff; }
.lf-x { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #ffffff40 !important; background: transparent !important; color: #fff !important; font-size: 20px; line-height: 1; padding: 0; }
.lf-db { padding: 18px 20px 0; display: flex; flex-direction: column; gap: 14px; }
.lf-summary { background: var(--lf-100); border: 1px solid var(--lf-300); border-radius: 14px; padding: 12px 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lf-summary small { display: block; font-size: 11.5px; color: var(--lf-700); font-weight: 700; }
.lf-summary b { display: block; font-size: 17px; font-weight: 800; margin-top: 2px; }
.lf-summary span { font-size: 12px; color: var(--lf-muted); }
.lf-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lf-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--lf-700); margin-bottom: 6px; }
.lf-label em { font-weight: 500; font-style: normal; color: var(--lf-muted); }
.lf-methods-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.lf-opt { min-height: 48px; border-radius: 12px; border: 1px solid var(--lf-300) !important; background: #fff !important; color: var(--lf-900) !important; font-weight: 700; font-size: 13px; box-shadow: none !important; }
.lf-opt.is-on { background: var(--lf-900) !important; border-color: var(--lf-900) !important; color: #fff !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lf-500) 35%, transparent) !important; }
.lf-hint:empty { display: none; }
.lf-hint { border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 700; background: var(--lf-50); color: var(--lf-700); border: 1px solid var(--lf-200); }
.lf-hint.is-ok { background: var(--lf-paid-bg); color: var(--lf-paid); border-color: #a9d4b7; }
.lf-hint.is-warn { background: var(--lf-part-bg); color: var(--lf-part); border-color: #ead8ae; }
.lf-df { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px -20px 0; padding: 14px 20px; border-top: 1px solid var(--lf-200); background: var(--lf-50); }
.lf-df > div { display: flex; gap: 10px; }
.lf-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; background: var(--lf-950); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 700; font-size: 13.5px; box-shadow: 0 6px 18px #0b1a2e40; }
@media (max-width: 1100px) {
  .lf-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lf-two, .lf-settings-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .lume-finance-on .lume-view .lume-side .lume-nav:has([data-lf-nav]) button {
    flex-basis: auto;
    padding-inline: 1px !important;
  }
  .lume-finance-on .lume-view .lume-side .lume-nav:has([data-lf-nav]) button span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .lf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lf-stat b { font-size: 22px; }
  .lf-kpis, .lf-summary, .lf-grid2 { grid-template-columns: minmax(0, 1fr); }
  .lf-hero h1 { font-size: 24px; }
  .lf-st-row { grid-template-columns: 48px minmax(0, 1fr) 90px; }
  .lf-st-row > span:nth-child(3) { display: none; }
}
@media (max-width: 360px) {
  .lume-finance-on .lume-view .lume-side .lume-nav:has([data-lf-nav]) button span {
    font-size: 9px !important;
  }
}
@container lf-page (max-width: 720px) {
  .lf-open-table, .lf-open-table tbody { display: block; }
  .lf-open-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .lf-open-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 6px;
    padding: 12px;
  }
  .lf-open-row + .lf-open-row { border-top: 1px solid var(--lf-200); }
  .lf-open-table .lf-open-row td { border: 0; padding: 0; min-width: 0; }
  .lf-open-patient, .lf-open-date, .lf-open-action { grid-column: 1 / -1; }
  .lf-open-label {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 700;
    color: var(--lf-700);
  }
  .lume-view #lume-content .lf-open-date small { display: inline; margin-inline-start: 6px; }
  .lf-open-row .lf-tag { padding-inline: 6px; white-space: normal; }
  .lf-open-row .lf-btn { min-height: 44px; }
}
