/* Economia desktop: page composition only. Financial state, editors and mobile
   components stay in app.js, styles.css and finance-workspace.css. */
@media (min-width:1100px) {
  :where(:root[data-app-layout="desktop"]) #app #financeScreen.active {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    align-content:start;align-items:start;gap:18px!important;
    width:100%!important;max-width:none!important;min-width:0;margin:0!important;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen > * {
    grid-column:1!important;min-width:0;max-width:none!important;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeProfileMini {
    position:relative!important;inset:auto!important;margin:0!important;
    padding:16px 20px!important;border:1px solid var(--line)!important;border-radius:20px!important;
    box-shadow:none!important;overflow:visible!important;
    background:var(--card)!important;width:100%!important;min-height:112px!important;height:auto!important;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeProfileMini::before,
  :where(:root[data-app-layout="desktop"]) #app #financeProfileMini::after {content:none!important;pointer-events:none}
  :where(:root[data-app-layout="desktop"]) #app #financeProfileMini .screen-profile-mini-inner {
    display:grid!important;grid-template-columns:128px minmax(0,1fr)!important;
    gap:20px!important;align-items:center;min-height:80px;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeProfileMini .screen-profile-mini-avatar {
    width:120px!important;min-width:120px!important;height:80px!important;margin:0!important;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeProfileMini .hero-avatar {
    width:64px!important;height:64px!important;min-width:64px!important;font-size:1.1rem!important;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeProfileMini .screen-profile-mini-copy {
    width:auto!important;min-width:0!important;margin:0!important;padding:0!important;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeProfileMini .finance-profile-title {font-size:1.25rem!important}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-tabs {
    display:inline-grid!important;grid-template-columns:repeat(2,minmax(140px,max-content));
    justify-self:start;width:max-content!important;max-width:100%!important;
    margin:0!important;padding:4px!important;gap:4px;border-radius:14px;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-tabs button {
    min-height:40px;height:auto;padding:8px 18px;border-radius:10px;font-size:.82rem;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeDashboardPanel:not([hidden]) {
    display:grid!important;gap:18px;margin:0;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .fw-grid {
    grid-template-columns:minmax(0,1fr);gap:18px;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .fw-grid > .fw-column:first-child {
    display:grid;grid-template-columns:minmax(260px,.75fr) minmax(0,2fr);
    align-items:start;gap:18px;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .fw-budget-card {grid-column:1}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .fw-chart-card {grid-column:2;grid-row:1}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .fw-disclosure > summary {
    min-height:48px;padding:12px 16px;font-size:.85rem;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-oryon-action {
    display:flex!important;align-items:center;gap:8px;font-size:.78rem;min-height:40px;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeBudgetOryonLabel {flex:1;min-width:0}
  /* Stable contrast across the shared themes, including the peach Osyra accent. */
  :where(:root[data-app-layout="desktop"]) #app #financeScreen :is(.finance-edit-oryon-action,#financePriceEditor > summary) {
    background:#263852!important;color:#fff!important;border:1px solid #61758f!important;
    min-height:44px;font-size:.82rem;line-height:1.4;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen :is(.finance-edit-oryon-action,#financePriceEditor > summary):hover {background:#344c6b!important}
  :where(:root[data-app-layout="desktop"]) #app #financePriceEditor > summary :is(span,b) {color:inherit!important}
  :where(:root[data-app-layout="desktop"]) #app #financePriceEditor > summary::after {border-color:currentColor}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .fw-budget .finance-edit-price-input {
    display:flex;align-items:center;gap:8px;min-width:0;min-height:50px;
    padding:8px 12px;border:1px solid var(--muted);border-radius:10px;background:var(--field);
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .fw-budget .finance-edit-price-input:focus-within {outline:2px solid var(--blue);outline-offset:3px}
  :where(:root[data-app-layout="desktop"]) #app #financeWorkspaceBudget {
    flex:1;width:100%!important;max-width:none!important;min-width:0;min-height:30px!important;
    margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;outline:none!important;
    color:var(--ink)!important;font-size:1.3rem!important;line-height:1.4;font-variant-numeric:tabular-nums;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeBudgetCurrency {flex:none;padding:0;background:transparent;color:var(--muted);font-size:.85rem}
  :where(:root[data-app-layout="desktop"]) #app #financeHistoryPanel {width:100%;margin:0;align-self:start}
  :where(:root[data-app-layout="desktop"]) #app #financeWorkspaceHistory {
    display:grid;grid-template-columns:minmax(0,1.4fr) minmax(240px,.8fr);gap:16px 24px;padding:0 16px 16px;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeWorkspaceHistory .fw-section-heading {grid-column:1 / -1;margin:0}
  :where(:root[data-app-layout="desktop"]) #app #financeWorkspaceHistory .fw-section-heading h3 {display:none}
  :where(:root[data-app-layout="desktop"]) #app #financeWorkspaceHistory .fw-section-heading p {margin:0;max-width:75ch;font-size:.8rem;line-height:1.6}
  :where(:root[data-app-layout="desktop"]) #app #financeWorkspaceHistory .fw-history-bars {grid-column:1;align-content:start}
  :where(:root[data-app-layout="desktop"]) #app #financeWorkspaceHistory .fw-history-bars button {grid-template-columns:110px minmax(0,1fr) 100px;min-height:48px;font-size:.8rem}
  :where(:root[data-app-layout="desktop"]) #app #financeWorkspaceHistory .fw-history-bars button[aria-pressed=true] {border-color:var(--blue);background:var(--surface-2)}
  :where(:root[data-app-layout="desktop"]) #app #financeWorkspaceHistory .fw-history-detail {
    grid-column:2;grid-row:2;align-self:start;margin:0;padding:16px;
    border:1px solid var(--line);border-radius:12px;background:var(--surface-2);
  }
  :where(:root[data-app-layout="desktop"]) #app #financeWorkspaceHistory .fw-empty {
    grid-column:1 / -1;margin:0;padding:16px;border:1px solid var(--line);border-radius:12px;
    background:var(--surface-2);font-size:.82rem;line-height:1.6;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeShoppingPanel:not([hidden]) {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:none!important;gap:16px;width:100%!important;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeShoppingPanel > * {
    grid-area:auto!important;grid-column:1!important;min-width:0;max-width:none!important;margin-block:0;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-market-header {
    display:flex;align-items:center;justify-content:space-between;gap:16px;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-market-search {
    width:min(100%,480px)!important;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeList {
    display:grid!important;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr))!important;
    gap:14px!important;align-items:start;width:100%!important;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeList > button {grid-column:1 / -1;justify-self:center;width:auto;min-width:220px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-market-checkout {
    width:min(100%,640px);justify-self:end;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .market-list-finish {
    width:auto;justify-self:end;min-width:180px;min-height:40px;padding:9px 18px;
  }
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeInlineWorkspace:not([hidden]) {
    width:min(100%,960px);justify-self:center;
  }
  /* Size editors against their actual card, not the desktop viewport. */
  :where(:root[data-app-layout="desktop"]) #app #financeScreen :is(#financePriceEditor,#financeMarketDetails,#financeMarketAddEditor) .finance-edit-money-panel {container-type:inline-size;min-width:0;max-width:100%}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen :is(#financePriceEditor,#financeMarketDetails,#financeMarketAddEditor) .finance-edit-price-fields {grid-template-columns:minmax(0,1fr)!important;gap:14px;min-width:0}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-price-fields > * {min-width:0;max-width:100%}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-price-fields .finance-edit-purchase-measure {grid-column:1 / -1}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-price-fields > label {min-width:0;display:grid;gap:7px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-price-fields .finance-edit-field-caption {height:auto;min-height:24px;line-height:1.4;align-items:center;white-space:normal}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-price-fields .finance-edit-price-input {display:flex;min-width:0;width:100%;gap:8px;padding:9px 11px;background:var(--field);border:1px solid var(--muted);border-radius:10px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-price-fields .finance-edit-price-input input {flex:1;width:0!important;min-width:0!important;max-width:100%;min-height:28px;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:1.05rem}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-price-fields .finance-edit-price-affix {flex:none;padding:0;font-size:.8rem;white-space:nowrap}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-price-input:focus-within {outline:2px solid var(--blue);outline-offset:2px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-price-actions {display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-price-actions button {width:auto!important;min-height:42px;padding:9px 16px;font-size:.82rem}
  @container (min-width:380px) {
    :where(:root[data-app-layout="desktop"]) #app #financeScreen :is(#financePriceEditor,#financeMarketDetails,#financeMarketAddEditor) .finance-edit-price-fields {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  }
  /* One title row, then a single toolbar in the existing DOM order. */
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeShoppingPanel:not([hidden]) {grid-template-columns:minmax(120px,1fr) auto 44px minmax(240px,480px)!important;column-gap:16px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeShoppingPanel > * {grid-column:1 / -1!important}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-market-header, :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeMarketSummary:not([hidden]), :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-market-list-summary {display:contents!important}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-market-header > div {grid-column:1 / -1;grid-row:1}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-market-header > button {grid-column:3;grid-row:2;align-self:center}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-market-list-count {grid-column:1;grid-row:2;align-self:center;font-size:.86rem}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-market-list-summary > strong {grid-column:2;grid-row:2;align-self:center;font-size:1rem;white-space:nowrap}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeShoppingPanel > .finance-market-search {grid-column:4!important;grid-row:2!important;width:100%!important;align-self:center;padding:0!important}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-market-checkout {width:100%;justify-self:stretch;gap:12px;padding-top:18px;border-top:1px solid var(--line)}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeMarketCheckout {grid-template-columns:minmax(180px,.7fr) minmax(240px,1.3fr);gap:16px;padding:18px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeMarketCheckout > :is(p,.finance-market-checkout-actions) {grid-column:1 / -1}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeMarketCheckout .finance-market-checkout-actions {display:flex;justify-content:flex-end;gap:10px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeMarketCheckout .finance-market-checkout-actions button {min-width:140px;width:auto;padding-inline:18px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen :is(.finance-edit-price-actions button.primary,.market-list-finish,#financeMarketCheckout button.primary) {color:#fff!important;background:#263852!important;border:1px solid #61758f!important}

  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-purchase-measure {background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen .finance-edit-purchase-measure legend {float:none;width:auto;margin:0 0 7px;padding:0;background:transparent!important;color:var(--ink);font-size:.82rem;font-weight:700;line-height:1.4;letter-spacing:normal;text-transform:none}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeMarketAddEditor {width:min(100%,880px);justify-self:start}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeMarketAddEditor .finance-edit-money-panel {padding:20px;gap:18px;border-radius:16px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeMarketAddEditor .finance-edit-market-name {font-size:.82rem;font-weight:700;color:var(--ink)}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeMarketAddEditor .finance-edit-unit-options {max-width:420px}
  :where(:root[data-app-layout="desktop"]) #app #financeScreen #financeMarketAddEditor .finance-edit-unit-options label {min-height:42px}

}
@media (min-width:1100px) and (pointer:coarse) {
  :where(:root[data-app-layout="desktop"]) #app #financeScreen :is(.finance-tabs button,.market-list-finish) {min-height:44px}
}
