/* CENTRAL 5.4.1 — REFINAMENTO DESKTOP
   Equilíbrio do Feed, quadro Livre amplo, Agenda central e Finanças editoriais. */

@media(min-width:900px){
  /* Feed: adiar e concluir ocupam metades exatamente equivalentes. */
  .focus-card-bottom{box-sizing:border-box!important;width:100%!important}
  .focus-card-bottom .feed-actions{
    box-sizing:border-box!important;width:100%!important;max-width:none!important;margin:0!important;
    grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr)!important;gap:12px!important;
  }
  .focus-card-bottom .feed-actions button{
    box-sizing:border-box!important;width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;
    text-align:center!important;
  }
  .focus-card-bottom .feed-actions .feed-edit-button{width:52px!important;justify-self:center!important}

  /* Livre: o quadro deixa de ser espremido pela altura do monitor. */
  .app-shell[data-current-view="free"] .main-stage{
    overflow-y:auto!important;overscroll-behavior-y:contain;scrollbar-width:thin;
    scrollbar-color:rgba(91,98,55,.24) transparent;scrollbar-gutter:stable;
  }
  .app-shell[data-current-view="free"] .main-stage::-webkit-scrollbar{width:9px}
  .app-shell[data-current-view="free"] .main-stage::-webkit-scrollbar-thumb{background:rgba(91,98,55,.22);border-radius:999px}
  .free-view.active{
    box-sizing:border-box!important;height:auto!important;min-height:max(850px,calc(100dvh - 100px))!important;
    grid-template-rows:auto minmax(max(720px,calc(100dvh - 205px)),1fr)!important;padding-bottom:30px!important;
  }
  .free-board{box-sizing:border-box!important;height:auto!important;min-height:max(720px,calc(100dvh - 205px))!important}

  /* Agenda: o rótulo é central, mas a seta continua no extremo direito. */
  .agenda-complete-link{
    position:relative!important;box-sizing:border-box!important;width:100%!important;max-width:940px!important;
    min-height:54px!important;margin:12px auto 0!important;padding:13px 52px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;
  }
  .agenda-complete-link span{position:absolute!important;right:20px!important;top:50%!important;transform:translateY(-50%)!important}

  /* Finanças: resumo editorial à esquerda e livro-caixa tátil à direita. */
  .finance-view.active{
    box-sizing:border-box!important;height:100%!important;min-height:0!important;
    grid-template-columns:minmax(330px,.78fr) minmax(470px,1.32fr)!important;
    grid-template-areas:
      "fhead fhead"
      "balance ledger"
      "summary ledger"
      "insight ledger"!important;
    grid-template-rows:auto auto auto minmax(0,1fr)!important;
    column-gap:clamp(24px,3vw,42px)!important;row-gap:12px!important;align-items:start!important;
  }
  .finance-header{grid-area:fhead!important;border-bottom:1px solid rgba(111,100,78,.18)!important}
  .balance-card{
    grid-area:balance!important;box-sizing:border-box!important;min-height:188px!important;margin:0!important;padding:25px 24px!important;
    display:flex!important;flex-direction:column!important;justify-content:center!important;cursor:pointer;
    border:1px solid rgba(111,120,67,.22)!important;border-radius:27px!important;
    background:
      linear-gradient(90deg,rgba(248,249,231,.96),rgba(232,236,207,.74)),
      url("icons/botanical-branch.png") right -38px bottom -76px/210px auto no-repeat!important;
    box-shadow:0 16px 42px rgba(53,55,34,.08)!important;
    transition:transform .2s ease,box-shadow .2s ease!important;
  }
  .balance-card:hover{transform:translateY(-2px);box-shadow:0 20px 48px rgba(53,55,34,.12)!important}
  .balance-card>span{margin-bottom:11px!important;color:#727a4d!important;font-size:.64rem!important;letter-spacing:.15em!important}
  .balance-card strong{font-size:clamp(3rem,4.5vw,4.15rem)!important;line-height:.92!important;color:#343a24!important}
  .balance-card small{margin-top:15px!important;color:#747864!important;font-size:.68rem!important}
  .finance-summary{grid-area:summary!important;grid-template-columns:1fr 1fr!important;gap:10px!important;margin:0!important}
  .finance-summary article{
    box-sizing:border-box!important;min-height:94px!important;padding:16px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;
    border:1px solid rgba(116,105,83,.18)!important;border-radius:19px!important;background:rgba(251,248,240,.78)!important;
    box-shadow:0 8px 22px rgba(55,48,36,.045)!important;
  }
  .finance-summary span{font-size:.61rem!important;letter-spacing:.02em!important}.finance-summary strong{font-size:1.06rem!important}
  .finance-insight{grid-area:insight!important;align-self:start!important}
  .finance-insight:not(:empty){
    position:relative!important;margin:0!important;padding:14px 16px 14px 42px!important;border:1px solid rgba(111,116,69,.16)!important;
    border-left:0!important;border-radius:17px!important;background:rgba(241,239,219,.65)!important;color:#666655!important;line-height:1.5!important;
  }
  .finance-insight:not(:empty)::before{
    content:"↗";position:absolute;left:14px;top:50%;transform:translateY(-50%);width:20px;height:20px;display:grid;place-items:center;
    border-radius:50%;background:#777e50;color:#fbf8ef;font-size:.68rem;
  }
  .finance-ledger{
    grid-area:ledger;box-sizing:border-box;align-self:stretch;min-width:0;min-height:0;height:100%;
    display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;
    border:1px solid rgba(113,103,82,.19);border-radius:27px;background:rgba(250,247,239,.82);
    box-shadow:0 18px 50px rgba(54,47,35,.075);
  }
  .finance-list-head{
    box-sizing:border-box!important;min-height:76px!important;margin:0!important;padding:19px 21px!important;
    border-bottom:1px solid rgba(116,105,83,.17);background:rgba(247,243,232,.72);
  }
  .finance-list-head strong{
    color:#343727!important;font:400 1.35rem/1 "DM Serif Display",Georgia,serif!important;
    text-transform:none!important;letter-spacing:-.01em!important;
  }
  .finance-list-head button{
    min-height:38px;padding:9px 15px!important;border:1px solid rgba(94,104,57,.25)!important;border-radius:999px!important;
    background:#e8ead3!important;color:#555f33!important;font-size:.69rem!important;font-weight:650!important;
  }
  .finance-list{
    box-sizing:border-box!important;min-height:0!important;padding:12px 13px 18px!important;display:grid!important;align-content:start!important;
    gap:8px!important;overflow-y:auto!important;scrollbar-width:thin;scrollbar-color:rgba(90,97,55,.30) transparent;
  }
  .finance-row{
    box-sizing:border-box!important;position:relative!important;min-height:68px!important;padding:13px 15px 13px 31px!important;
    border:1px solid rgba(117,106,84,.16)!important;border-radius:15px!important;background:rgba(255,253,247,.86)!important;
    box-shadow:0 5px 15px rgba(57,50,38,.035)!important;transition:transform .17s ease,border-color .17s ease,box-shadow .17s ease!important;
  }
  .finance-row::before{content:"";position:absolute;left:14px;top:50%;width:7px;height:7px;border-radius:50%;transform:translateY(-50%);background:#b07a67}
  .finance-row.income::before{background:#788b48}.finance-row:hover{transform:translateY(-1px);border-color:rgba(100,108,64,.32)!important;box-shadow:0 9px 22px rgba(57,50,38,.07)!important}
  .finance-row strong{font-size:.82rem!important}.finance-row small{font-size:.62rem!important}.finance-row b{font-size:.78rem!important}
  .finance-empty{margin:4px!important;min-height:170px;display:grid;place-items:center;background:rgba(255,253,247,.55)}
  .app-shell[data-current-view="finance"]>.capture-button{display:none!important}
}

/* Notebooks compactos: o livro-caixa passa para baixo sem comprimir os dados. */
@media(min-width:900px) and (max-width:1120px){
  .app-shell[data-current-view="finance"] .main-stage{overflow-y:auto!important}
  .finance-view.active{
    height:auto!important;min-height:100%!important;overflow:visible!important;
    grid-template-columns:minmax(280px,1fr) minmax(280px,1fr)!important;
    grid-template-areas:"fhead fhead" "balance summary" "insight insight" "ledger ledger"!important;
    grid-template-rows:auto auto auto minmax(470px,1fr)!important;padding-bottom:24px!important;
  }
  .finance-ledger{min-height:470px}
}

@media(min-width:900px) and (max-height:760px){
  .balance-card{min-height:160px!important;padding-block:20px!important}.balance-card strong{font-size:3rem!important}
  .finance-summary article{min-height:82px!important}.finance-list-head{min-height:66px!important;padding-block:14px!important}
}

@media(prefers-reduced-motion:reduce){.balance-card,.finance-row{transition:none!important}}
