/*
 * Financial surfaces use the same visual scale as the supplied Lizy capture
 * at desktop widths.  The legacy shell is deliberately left untouched for
 * every other route: these rules only activate while one of the financial
 * hosts is present in #content.
 */

@media (min-width: 1500px) {
  body:has(#content.fp-host),
  body:has(#content.lanc-v2-host),
  body:has(#content.ftlz-host),
  body:has(#content.conc-lizy-host) {
    font-size: 16px;
  }

  body:has(#content.fp-host) .sidebar,
  body:has(#content.lanc-v2-host) .sidebar,
  body:has(#content.ftlz-host) .sidebar,
  body:has(#content.conc-lizy-host) .sidebar { width: 331px; }

  body:has(#content.fp-host) .sidebar.collapsed,
  body:has(#content.lanc-v2-host) .sidebar.collapsed,
  body:has(#content.ftlz-host) .sidebar.collapsed,
  body:has(#content.conc-lizy-host) .sidebar.collapsed { width: 94px; }

  body:has(#content.fp-host) .sidebar-logo,
  body:has(#content.lanc-v2-host) .sidebar-logo,
  body:has(#content.ftlz-host) .sidebar-logo,
  body:has(#content.conc-lizy-host) .sidebar-logo {
    height: 88px;
    min-height: 88px;
    padding: 0 31px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  body:has(#content.fp-host) .sidebar-brand-full,
  body:has(#content.lanc-v2-host) .sidebar-brand-full,
  body:has(#content.ftlz-host) .sidebar-brand-full,
  body:has(#content.conc-lizy-host) .sidebar-brand-full { height: 44px; }

  body:has(#content.fp-host) .sidebar-nav,
  body:has(#content.lanc-v2-host) .sidebar-nav,
  body:has(#content.ftlz-host) .sidebar-nav,
  body:has(#content.conc-lizy-host) .sidebar-nav { padding: 25px 0 10px; }

  body:has(#content.fp-host) .nav-section-label,
  body:has(#content.lanc-v2-host) .nav-section-label,
  body:has(#content.ftlz-host) .nav-section-label,
  body:has(#content.conc-lizy-host) .nav-section-label {
    height: 50px;
    padding: 12px 0 12px 31px;
    font-size: 16px;
  }

  body:has(#content.fp-host) .nav-item,
  body:has(#content.fp-host) .nav-accordion,
  body:has(#content.lanc-v2-host) .nav-item,
  body:has(#content.lanc-v2-host) .nav-accordion,
  body:has(#content.ftlz-host) .nav-item,
  body:has(#content.ftlz-host) .nav-accordion,
  body:has(#content.conc-lizy-host) .nav-item,
  body:has(#content.conc-lizy-host) .nav-accordion {
    width: calc(100% - 32px);
    min-height: 50px;
    margin: 10px 16px;
    padding: 12px;
    gap: 12px;
    border-radius: 12px;
    font-size: 16px;
  }

  body:has(#content.fp-host) .nav-sub .nav-item,
  body:has(#content.lanc-v2-host) .nav-sub .nav-item,
  body:has(#content.ftlz-host) .nav-sub .nav-item,
  body:has(#content.conc-lizy-host) .nav-sub .nav-item {
    width: calc(100% - 32px);
    margin: 10px 16px;
    padding: 12px 12px 12px 43px;
    font-size: 16px;
  }

  body:has(#content.fp-host) .nav-item i,
  body:has(#content.fp-host) .nav-accordion i.menu-icon,
  body:has(#content.lanc-v2-host) .nav-item i,
  body:has(#content.lanc-v2-host) .nav-accordion i.menu-icon,
  body:has(#content.ftlz-host) .nav-item i,
  body:has(#content.ftlz-host) .nav-accordion i.menu-icon,
  body:has(#content.conc-lizy-host) .nav-item i,
  body:has(#content.conc-lizy-host) .nav-accordion i.menu-icon {
    width: 25px;
    font-size: 20px;
  }

  body:has(#content.fp-host) .topbar,
  body:has(#content.lanc-v2-host) .topbar,
  body:has(#content.ftlz-host) .topbar,
  body:has(#content.conc-lizy-host) .topbar {
    min-height: 88px;
    height: 88px;
    padding: 0 38px;
  }

  body:has(#content.fp-host) .topbar-company,
  body:has(#content.lanc-v2-host) .topbar-company,
  body:has(#content.ftlz-host) .topbar-company,
  body:has(#content.conc-lizy-host) .topbar-company {
    width: 304px;
    max-width: 304px;
    min-height: 43px;
    padding: 9px 48px 9px 13px;
    font-size: 15px;
  }

  body:has(#content.fp-host) .topbar-notif,
  body:has(#content.lanc-v2-host) .topbar-notif,
  body:has(#content.ftlz-host) .topbar-notif,
  body:has(#content.conc-lizy-host) .topbar-notif { width: 44px; height: 44px; font-size: 20px; }

  body:has(#content.fp-host) .topbar-avatar,
  body:has(#content.lanc-v2-host) .topbar-avatar,
  body:has(#content.ftlz-host) .topbar-avatar,
  body:has(#content.conc-lizy-host) .topbar-avatar {
    width: 44px;
    min-width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 15px;
  }

  body:has(#content.fp-host) .content,
  body:has(#content.lanc-v2-host) .content,
  body:has(#content.ftlz-host) .content,
  body:has(#content.conc-lizy-host) .content { padding: 38px; }

  body:has(#content.fp-host) .breadcrumb,
  body:has(#content.lanc-v2-host) .breadcrumb,
  body:has(#content.ftlz-host) .breadcrumb,
  body:has(#content.conc-lizy-host) .breadcrumb { font-size: 17px; }

  #content.fp-host { padding: 38px !important; }
  #content.fp-host .fp-dashboard { width: min(100%, 1775px); padding: 0 30px 80px; }
  #content.lanc-v2-host { padding: 38px 77px 80px !important; }
  #content.lanc-v2-host .lanc-v2-title { font-size: 24px; }
  #content.lanc-v2-host .lanc-v2-head-actions { grid-template-columns: minmax(260px, 1fr) 188px 188px auto auto !important; }
  #content.lanc-v2-host .lanc-v2-head-actions > .lanc-v2-search,
  #content.lanc-v2-host .lanc-v2-head-actions > .lanc-datas,
  #content.lanc-v2-host .lanc-v2-head-actions > .lanc-export-menu,
  #content.lanc-v2-host .lanc-v2-head-actions > .lanc-novo { height: 60px !important; }
  #content.lanc-v2-host .lanc-v2-head-actions > .lanc-datas .lanc-data { height: 60px !important; }
  #content.lanc-v2-host .lanc-v2-head-actions > .lanc-export-menu > button,
  #content.lanc-v2-host .lanc-v2-head-actions > .lanc-novo { height: 60px !important; font-size: 15px; }
  #content.lanc-v2-host .lanc-v2-filters { grid-template-rows: repeat(2, 62px) !important; gap: 15px !important; }
  #content.lanc-v2-host .lanc-v2-filters > select { height: 62px !important; font-size: 15px; }
  #content.lanc-v2-host .lanc-v2-table { min-width: 1575px !important; font-size: 16px; }
  #content.lanc-v2-host .lanc-v2-table thead th { height: 72px; padding: 0 20px; font-size: 14px; }
  #content.lanc-v2-host .lanc-v2-table tbody tr:not(.lanc-day-row) { height: 146px; }
  #content.lanc-v2-host .lanc-v2-table tbody td { min-height: 146px; padding: 28px 20px; font-size: 16px; line-height: 1.45; }
  #content.lanc-v2-host .lanc-ref-original { min-width: 116px; padding-left: 15px; border-left-width: 5px; gap: 5px; }
  #content.lanc-v2-host .lanc-ref-type { font-size: 14px; }
  #content.lanc-v2-host .lanc-ref-num { font-size: 18px; }
  #content.lanc-v2-host .lanc-sub { margin-top: 8px; font-size: 14px; }
  #content.lanc-v2-host .lanc-conta-nome { gap: 9px; font-size: 15px; }
  #content.lanc-v2-host .lanc-banco-logo { width: 22px; height: 22px; }
  #content.lanc-v2-host .lanc-v2-status { padding: 8px 14px; font-size: 14px; }
  #content.lanc-v2-host .lanc-acum { margin-top: 6px; font-size: 13px; }

  #content.ftlz-host { padding: 0 !important; }
  #content.ftlz-host .ftlz-page { max-width: none; padding: 24px 77px 80px; }
  #content.ftlz-host .ftlz-tabs { margin-bottom: 20px; }
  #content.ftlz-host .ftlz-tabs button { padding: 15px 35px; font-size: 17px; }
  #content.ftlz-host .ftlz-metrics { margin-bottom: 0; }
  #content.ftlz-host .ftlz-metric { min-height: 134px; padding: 24px 25px; }
  #content.ftlz-host .ftlz-metric span { font-size: 15px; margin-bottom: 12px; }
  #content.ftlz-host .ftlz-metric strong { font-size: 26px; }
  #content.ftlz-host .ftlz-metric small { margin-top: 8px; font-size: 14px; }
  #content.ftlz-host.ftlz-done .ftlz-toolbar,
  #content.ftlz-host.ftlz-done .ftlz-pillbar,
  #content.ftlz-host.ftlz-done .ftlz-table-shell,
  #content.ftlz-host.ftlz-done .ftlz-footer { background: #fff; border-left: 1px solid #e4e6ef; border-right: 1px solid #e4e6ef; }
  #content.ftlz-host.ftlz-done .ftlz-toolbar { grid-template-columns: minmax(360px, 1.5fr) 220px 220px 220px 305px; gap: 14px; margin: 0; padding: 28px 26px 0; border-top: 0; border-radius: 0; }
  #content.ftlz-host.ftlz-done .ftlz-toolbar > .ftlz-search,
  #content.ftlz-host.ftlz-done .ftlz-toolbar > select,
  #content.ftlz-host.ftlz-done .ftlz-toolbar > .ftlz-date,
  #content.ftlz-host.ftlz-done .ftlz-toolbar > .ftlz-action { height: 58px; min-height: 58px; }
  #content.ftlz-host.ftlz-done .ftlz-toolbar > .ftlz-search input,
  #content.ftlz-host.ftlz-done .ftlz-toolbar > select,
  #content.ftlz-host.ftlz-done .ftlz-toolbar > .ftlz-date input { font-size: 15px; }
  #content.ftlz-host.ftlz-done .ftlz-toolbar > [data-ftlz-xml] { grid-column: 1; grid-row: 2; width: 264px; height: 58px; background: #009ef7; border-color: #009ef7; color: #fff; font-size: 16px; }
  #content.ftlz-host.ftlz-done .ftlz-pillbar { gap: 12px; margin: 0; padding: 20px 26px 24px; border-top: 0; border-radius: 0; }
  #content.ftlz-host.ftlz-done .ftlz-pillbar button { padding: 11px 20px; font-size: 15px; }
  #content.ftlz-host.ftlz-done .ftlz-table-shell { border-top: 1px solid #e4e6ef; border-radius: 0; }
  #content.ftlz-host .ftlz-table { min-width: 1375px; font-size: 15px; }
  #content.ftlz-host .ftlz-table th { height: 68px; padding: 0 20px; font-size: 12px; }
  #content.ftlz-host .ftlz-table tbody tr { height: 145px; }
  #content.ftlz-host .ftlz-table td { padding: 25px 20px; font-size: 15px; }
  #content.ftlz-host .ftlz-table td strong { max-width: 350px; font-size: 18px; line-height: 1.35; }
  #content.ftlz-host .ftlz-table td small { margin-top: 7px; font-size: 14px; }
  #content.ftlz-host.ftlz-done .ftlz-footer { border-top: 0; border-bottom: 1px solid #e4e6ef; border-radius: 0 0 10px 10px; padding: 16px 26px; font-size: 14px; }

  #content.conc-lizy-host .clizy-shell { width: min(1850px, 100%); padding: 40px 48px 75px; }
  #content.conc-lizy-host .clizy-shell { font-size: 16px; }
  #content.conc-lizy-host .clizy-header h1 { font-size: 30px; }
  #content.conc-lizy-host .clizy-empty-head h2 { font-size: 29px; }
  #content.conc-lizy-host .clizy-empty-head p,
  #content.conc-lizy-host .clizy-steps p { font-size: 16px; }
  #content.conc-lizy-host .clizy-steps b { font-size: 16px; }
  #content.conc-lizy-host .clizy-dropzone strong { font-size: 17px; }
  #content.conc-lizy-host .clizy-dropzone small { font-size: 14px; }

  /* The help button has four children (icon, title, description, arrow).
   * Without explicit placement the description is put in the third grid
   * column and collapses into a narrow vertical strip. */
  #content.conc-lizy-host .clizy-help {
    grid-template-columns: 35px minmax(0, 1fr) 25px;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 4px 13px;
    min-height: 80px;
    padding: 18px 20px;
  }
  #content.conc-lizy-host .clizy-help > i:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 35px;
    height: 35px;
  }
  #content.conc-lizy-host .clizy-help > span {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    font-size: 16px;
    line-height: 1.35;
  }
  #content.conc-lizy-host .clizy-help > small {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    font-size: 14px;
    line-height: 1.4;
  }
  #content.conc-lizy-host .clizy-help-arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: end;
  }
}

@media (max-width: 1499px) {
  #content.conc-lizy-host .clizy-help {
    grid-template-columns: 32px minmax(0, 1fr) 22px;
    grid-template-rows: auto auto;
  }
  #content.conc-lizy-host .clizy-help > i:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  #content.conc-lizy-host .clizy-help > span {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
  #content.conc-lizy-host .clizy-help > small {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }
  #content.conc-lizy-host .clizy-help-arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: end;
  }
}

/* The compact desktop width must keep the controls reachable.  Let the
 * section links wrap before the action buttons are clipped by overflow. */
@media (min-width: 901px) and (max-width: 1499px) {
  #content.fp-host .fp-anchor-nav { overflow: visible; flex-wrap: wrap; }
  #content.fp-host .fp-anchor-nav a { flex: 0 0 auto; }
  #content.fp-host .fp-anchor-nav button { flex: 0 0 auto; }
  #content.fp-host .fp-anchor-nav button:first-of-type { margin-left: auto; }
  #content.fp-host .fp-faturamento-card > .fp-panel-header h3 { white-space: nowrap; flex: 0 1 auto; }
  #content.fp-host .fp-faturamento-card > .fp-panel-header { flex-wrap: wrap; }
  #content.fp-host .fp-faturamento-card > .fp-panel-header .fp-inline-dates { flex: 1 1 auto; }
  #content.fp-host .fp-local-action { white-space: nowrap; }
  #content.lanc-v2-host .lanc-v2-head { grid-template-columns: 180px minmax(0, 1fr) !important; }
  #content.lanc-v2-host .lanc-v2-head-actions { grid-template-columns: minmax(160px, 1fr) 120px 120px auto auto !important; }
  #content.lanc-v2-host .lanc-v2-head-actions > .lanc-export-menu,
  #content.lanc-v2-host .lanc-v2-head-actions > .lanc-novo { min-width: 0 !important; }
}

@media (max-width: 900px) {
  #content.fp-host .fp-anchor-nav { overflow-x: auto; flex-wrap: nowrap; }
  #content.fp-host .fp-anchor-nav button { display: none; }
}

/* Keep chart comparisons side by side, with the month on its own baseline. */
.fd-bars>div {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;justify-items:center;grid-template-rows:1fr auto;gap:0 4px}
.fd-bars>div>span:only-of-type {grid-column:1 / -1}
.fd-bars small {grid-column:1 / -1}
@media(min-width:1500px){
 #content.lanc-v2-host{padding-top:18px!important}
 #content.lanc-v2-host .lanc-aba-emp{min-height:56px;font-size:18px;font-weight:400}
 #content.lanc-v2-host .lanc-v2-tabs button,#content.lanc-v2-host .lanc-v2-modes button{font-size:16px;min-height:50px}
 #content.lanc-v2-host .lanc-tot-box{min-height:104px!important;padding:24px 16px!important}
 #content.lanc-v2-host .lanc-v2-table tbody td strong{font-size:18px;font-weight:600}
 #content.lanc-v2-host .lanc-v2-head-actions>.lanc-export-menu>button{border:1px solid #e3e7ef;background:white;border-radius:14px;padding:0 22px}
 #content.fp-host .fp-anchor-nav{flex-wrap:wrap;overflow:visible}
 #content.fp-host .fp-panel-header h3,#content.fp-host .fp-local-action{white-space:nowrap}
 #content.fp-host .fp-panel-header{flex-wrap:wrap}
}
@media(max-width:1499px) and (min-width:901px){
 #content.lanc-v2-host .lanc-v2-head{display:flex!important;flex-direction:column;align-items:stretch!important}
 #content.lanc-v2-host .lanc-v2-head-actions{grid-template-columns:minmax(180px,1fr) 130px 130px auto auto!important}
 #content.lanc-v2-host .lanc-novo{white-space:nowrap}
}
@media(max-width:900px){#content.fp-host .fp-anchor-nav{flex-wrap:wrap;overflow:visible}#content.fp-host .fp-anchor-nav button{display:inline-flex;align-items:center}}

#content.fp-host .fd-ledger .fp-cap-metrics{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
#content.fp-host .fd-ledger .fp-panel>label:has([data-fd-compare]){display:flex;gap:12px;align-items:center;justify-content:flex-end;margin:12px 0;font-size:12px}
#content.fp-host [data-fd-compare]{width:180px}
@media(min-width:1500px){
 #content.conc-lizy-host .clizy-shell{padding-top:10px}
 #content.conc-lizy-host .clizy-header h1{font-size:24px}
 #content.conc-lizy-host .clizy-empty-head{padding:58px 24px 44px;max-width:850px}
 #content.conc-lizy-host .clizy-empty-head h2{font-size:26px}
 #content.conc-lizy-host .clizy-empty-head p{font-size:18px}
 #content.conc-lizy-host .clizy-bank strong{font-size:18px}
}
@media(max-width:600px){#content.fp-host .fd-ledger .fp-cap-metrics{grid-template-columns:1fr}}

#content.lanc-v2-host .lanc-v2-title{flex:none!important;height:auto!important;min-height:0!important}
@media(max-width:1499px) and (min-width:901px){#content.lanc-v2-host .lanc-v2-head{gap:16px!important;justify-content:flex-start!important}}
