/* CENTRAL 5.3 — PAPEL VIVO
   Correções ópticas, Agenda legível e captura impressionista editável. */

:root{
  --v53-ink:#303322;
  --v53-moss:#65713d;
  --v53-moss-dark:#4c572c;
  --v53-paper:#fbf7ed;
  --v53-line:rgba(101,91,69,.20);
}

/* Confirmações com centro geométrico e óptico. */
.feed-empty>div{
  width:min(100%,390px)!important;max-width:390px!important;display:flex!important;
  flex-direction:column!important;align-items:center!important;text-align:center!important;
}
.end-mark{
  box-sizing:border-box!important;width:52px!important;height:52px!important;min-width:52px!important;
  margin:0 auto 22px!important;padding:0!important;display:grid!important;place-items:center!important;
  border:1.5px solid #858b5c!important;border-radius:50%!important;line-height:0!important;
}
.end-mark svg{display:block;width:25px;height:25px;fill:none;stroke:#6d7547;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.feed-empty h2{margin-top:0!important;text-align:center!important}
.feed-empty p,.feed-empty button{text-align:center!important;align-self:center!important}
.capture-submit span{
  box-sizing:border-box!important;width:28px!important;height:28px!important;min-width:28px!important;
  padding:0!important;display:grid!important;place-items:center!important;border-radius:50%!important;line-height:0!important;
}
.capture-submit span svg{display:block;width:17px;height:17px;fill:none;stroke:#65713d;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.capture-actions .soft-button span{display:grid!important;place-items:center!important;line-height:0!important}
.capture-actions .soft-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* Agenda: um único marcador, longe do título, e cartões responsivos. */
.agenda-view.active{min-width:0!important}
.agenda-list{
  width:100%!important;display:grid!important;grid-template-columns:1fr!important;
  gap:10px!important;padding:4px 2px 8px!important;
}
.appointment-card{
  box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:112px!important;
  display:grid!important;grid-template-columns:104px minmax(0,1fr)!important;overflow:hidden!important;
  border:1px solid rgba(116,105,83,.18)!important;border-radius:18px!important;
  background:
    radial-gradient(circle at 86% 5%,rgba(125,133,77,.07),transparent 33%),
    linear-gradient(145deg,rgba(255,253,247,.92),rgba(242,235,222,.72))!important;
  box-shadow:0 8px 22px rgba(57,49,36,.055)!important;
  transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease!important;
}
.appointment-card:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(57,49,36,.09)!important}
.appointment-card::before{display:none!important;content:none!important}
.appointment-time{
  box-sizing:border-box!important;position:relative!important;min-width:0!important;
  display:flex!important;align-items:flex-start!important;justify-content:flex-start!important;
  padding:22px 20px 18px 16px!important;border:0!important;border-right:1px solid rgba(118,107,84,.18)!important;
  color:#59623a!important;font:650 1rem/1 Inter,ui-sans-serif,sans-serif!important;font-variant-numeric:tabular-nums;
  letter-spacing:-.025em;
}
.appointment-time::after{
  content:""!important;position:absolute!important;right:-5px!important;top:24px!important;
  box-sizing:border-box!important;width:10px!important;height:10px!important;margin:0!important;border-radius:50%!important;
  background:#7b8551!important;border:2px solid #f8f3e9!important;box-shadow:0 0 0 3px rgba(123,133,81,.10)!important;
}
.appointment-main{
  box-sizing:border-box!important;min-width:0!important;padding:19px 18px 17px 24px!important;
  display:flex!important;align-content:flex-start;align-items:flex-start;flex-wrap:wrap;gap:0 9px;
}
.appointment-main strong{
  flex:0 0 100%;min-width:0!important;margin:0 0 7px!important;color:#343727!important;
  font-size:clamp(1.08rem,2.1vw,1.3rem)!important;line-height:1.12!important;
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;
}
.appointment-main small{
  flex:0 0 100%;min-width:0!important;margin-bottom:7px;color:#827b70!important;font-size:.72rem!important;
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
}
.appointment-main .recurrence-chip,.appointment-main .reminder-chip{
  flex:0 0 auto!important;min-height:27px!important;margin:2px 0 0!important;padding:6px 9px!important;
  display:inline-flex!important;align-items:center!important;border-radius:999px!important;font-size:.64rem!important;line-height:1!important;
}
.appointment-main .recurrence-chip{background:rgba(231,234,207,.86)!important;color:#626a3d!important}
.appointment-main .reminder-chip{background:transparent!important;color:#777267!important;padding-left:0!important}
.agenda-complete-link{
  min-height:54px!important;margin-top:13px!important;border-radius:18px!important;
  background:rgba(251,247,238,.82)!important;box-shadow:0 6px 18px rgba(57,49,36,.04)!important;
}

/* Captação como caderno impressionista: manchas suaves e papéis reconhecidos. */
#captureDialog .capture-sheet{
  position:relative;isolation:isolate;
  background:
    radial-gradient(ellipse at 12% 16%,rgba(204,188,153,.20),transparent 31%),
    radial-gradient(ellipse at 88% 20%,rgba(151,163,103,.19),transparent 28%),
    radial-gradient(ellipse at 68% 88%,rgba(210,174,153,.13),transparent 30%),
    linear-gradient(148deg,#fcf8ee 0%,#f3ecdf 58%,#eee5d7 100%)!important;
}
#captureDialog .capture-sheet::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:.28;border-radius:inherit;
  background:
    repeating-linear-gradient(7deg,rgba(72,63,45,.035) 0 1px,transparent 1px 8px),
    radial-gradient(circle,rgba(83,73,54,.18) 0 .4px,transparent .65px);
  background-size:auto,9px 10px;
}
.capture-compose-panel{
  position:relative;overflow:hidden!important;border:1px solid rgba(121,108,82,.18)!important;
  background:
    radial-gradient(ellipse at 26% 22%,rgba(255,255,255,.72),transparent 43%),
    radial-gradient(ellipse at 90% 94%,rgba(168,176,114,.16),transparent 35%),
    rgba(250,247,238,.55)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.72),0 12px 32px rgba(68,57,41,.05)!important;
}
.capture-compose-panel::after{
  content:"";position:absolute;right:-34px;bottom:-72px;width:210px;height:210px;pointer-events:none;opacity:.16;
  background:url("icons/botanical-branch.png") center/contain no-repeat;
}
.capture-question{position:relative;z-index:1;color:var(--v53-ink)!important;text-wrap:balance}
.capture-field{position:relative;z-index:1}
.capture-field textarea{
  border:1px solid rgba(119,109,87,.25)!important;
  border-radius:46% 54% 48% 52% / 24% 28% 72% 76%!important;
  background:rgba(255,253,247,.73)!important;
  box-shadow:inset 0 1px 2px rgba(86,73,52,.04),0 7px 20px rgba(64,55,40,.035)!important;
}
.capture-field textarea:focus{border-color:rgba(103,116,62,.48)!important;box-shadow:0 0 0 4px rgba(116,128,69,.09),0 10px 25px rgba(64,55,40,.055)!important}
.capture-recognition{
  background:
    radial-gradient(ellipse at 100% 0,rgba(156,167,103,.19),transparent 36%),
    radial-gradient(ellipse at 8% 100%,rgba(205,178,146,.18),transparent 39%),
    rgba(245,239,226,.76)!important;
  border:1px solid rgba(111,101,78,.19)!important;box-shadow:inset 0 1px rgba(255,255,255,.68)!important;
}
.capture-recognition-head{position:relative;z-index:2}
.capture-recognition-head span{font-family:"DM Serif Display",Georgia,serif!important;font-size:1.02rem!important;font-weight:400!important;letter-spacing:.01em!important;text-transform:none!important}
.capture-recognition-head small{font-size:.62rem!important}
.capture-blocks{position:relative;z-index:2;gap:9px!important;padding:2px!important}
.capture-block{
  --block-tilt:0deg;box-sizing:border-box!important;position:relative!important;min-width:0!important;
  min-height:58px!important;padding:10px 44px 10px 12px!important;display:flex!important;align-items:center!important;gap:11px!important;
  border:1px solid rgba(117,106,83,.18)!important;border-radius:18px 9px 17px 11px!important;
  background:
    linear-gradient(100deg,rgba(255,255,255,.54),transparent 50%),
    rgba(249,245,232,.91)!important;
  box-shadow:0 8px 19px rgba(61,51,38,.065)!important;cursor:pointer!important;
  transform:rotate(var(--block-tilt));transform-origin:center!important;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important;
}
.capture-block:nth-child(2n){--block-tilt:.35deg;border-radius:10px 18px 12px 17px!important}
.capture-block:nth-child(3n){--block-tilt:-.28deg}
.capture-block[data-capture-key="date"]{background:linear-gradient(100deg,rgba(255,255,255,.52),transparent 52%),rgba(233,235,207,.88)!important}
.capture-block[data-capture-key="time"]{background:linear-gradient(100deg,rgba(255,255,255,.52),transparent 52%),rgba(226,232,218,.90)!important}
.capture-block[data-capture-key="amount"]{background:linear-gradient(100deg,rgba(255,255,255,.52),transparent 52%),rgba(229,235,208,.90)!important}
.capture-block[data-capture-key="category"]{background:linear-gradient(100deg,rgba(255,255,255,.52),transparent 52%),rgba(239,222,207,.88)!important}
.capture-block:hover,.capture-block:focus-visible{
  transform:rotate(0) translateY(-2px)!important;border-color:rgba(102,113,63,.38)!important;
  box-shadow:0 12px 25px rgba(61,51,38,.11)!important;outline:0!important;
}
.capture-block.is-new{animation:v53-block-in .4s cubic-bezier(.18,.82,.25,1) both!important;animation-delay:calc(var(--block-order) * 42ms)!important}
@keyframes v53-block-in{from{opacity:0;transform:translateY(13px) rotate(calc(var(--block-tilt) - 1deg)) scale(.96)}to{opacity:1;transform:translateY(0) rotate(var(--block-tilt)) scale(1)}}
.capture-block-icon{background:rgba(255,253,245,.67)!important;color:#65703d!important;box-shadow:inset 0 0 0 1px rgba(102,112,62,.09)}
.capture-block-copy{flex:1!important}
.capture-block-copy strong{font-size:.82rem!important;color:#373a27!important}
.capture-block-pencil{
  position:absolute;right:12px;top:50%;transform:translateY(-50%);width:26px;height:26px;
  display:grid;place-items:center;border-radius:50%;color:#777c58;background:rgba(255,253,246,.66);
}
.capture-block-pencil svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.capture-block.is-editing{
  cursor:default!important;transform:none!important;display:grid!important;grid-template-columns:32px minmax(0,1fr) 34px!important;
  gap:10px!important;padding:10px 11px!important;border-color:rgba(103,115,62,.38)!important;
}
.capture-block-editor{min-width:0;display:block}
.capture-block-editor small{display:block;margin-bottom:4px;color:#777661;font-size:.57rem;text-transform:uppercase;letter-spacing:.07em}
.capture-block-editor input,.capture-block-editor select{
  box-sizing:border-box;width:100%;height:36px;padding:7px 9px;border:1px solid rgba(109,104,76,.25);
  border-radius:9px;background:rgba(255,254,249,.88);color:#343728;font:600 .78rem/1 Inter,sans-serif;outline:0;
}
.capture-block-editor input:focus,.capture-block-editor select:focus{border-color:#7e8a50;box-shadow:0 0 0 3px rgba(113,126,68,.10)}
.capture-block-save{
  align-self:end;width:34px;height:34px;padding:0;border-radius:50%;display:grid;place-items:center;
  background:#65713d;color:white;box-shadow:0 5px 12px rgba(69,79,39,.18);
}
.capture-block-save svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.capture-destination{position:relative;z-index:2}
.capture-route{background:rgba(255,252,243,.72)!important}
.route-change{font-size:0!important;position:relative!important;width:52px!important;min-width:52px!important;padding:0!important}
.route-change::before{content:"editar";font-size:.58rem!important;text-transform:uppercase;letter-spacing:.04em}
.capture-flow-arrow{color:#777f51!important}
.capture-actions{position:relative;z-index:3}
.capture-submit{background:linear-gradient(135deg,#778548,#56632f)!important;box-shadow:0 12px 28px rgba(65,75,35,.22)!important}

@media(min-width:900px){
  .agenda-view.active{width:min(1120px,100%)!important;max-width:1120px!important}
  .agenda-list{max-width:960px!important;margin:0 auto!important;gap:11px!important;padding-right:4px!important}
  .appointment-card{grid-template-columns:122px minmax(0,1fr)!important;min-height:116px!important}
  .appointment-time{padding:23px 25px 18px 18px!important;font-size:1.04rem!important}
  .appointment-time::after{top:25px!important}
  .appointment-main{padding:20px 22px 18px 28px!important}
  .agenda-complete-link{max-width:960px!important}
  #captureDialog .capture-sheet{width:min(990px,calc(100vw - 72px))!important;max-width:990px!important}
}

@media(max-width:899px){
  .agenda-view.active{padding:8px 17px 18px!important;overflow-y:auto!important}
  .agenda-view .section-header{padding:8px 4px 18px!important;margin:0 0 10px!important}
  .agenda-view .section-header h1{font-size:clamp(2.7rem,12vw,3.45rem)!important;line-height:.95!important}
  .agenda-list{max-width:none!important}
  .capture-recognition-head{display:flex!important;margin:4px auto 12px!important;width:min(310px,100%)}
  .capture-recognition-head span{font-size:.96rem!important}
  .capture-recognition{padding:12px 0 5px!important}
}

@media(max-width:599px){
  #captureDialog .capture-sheet{background:radial-gradient(ellipse at 90% 10%,rgba(155,167,102,.16),transparent 28%),radial-gradient(ellipse at 8% 76%,rgba(209,178,150,.14),transparent 31%),#f8f2e7!important}
  .capture-head{margin-bottom:2px!important}
  .capture-compose-panel{padding:4px 0 8px!important;box-shadow:none!important}
  .capture-compose-panel::after{display:none}
  .capture-question{margin-top:0!important;margin-bottom:13px!important;font-size:1.45rem!important}
  .capture-field textarea{min-height:72px!important;max-height:106px!important;border-radius:38px 44px 40px 46px / 34px 38px 42px 36px!important}
  .capture-recognition{margin-top:5px!important;background:transparent!important;box-shadow:none!important}
  .capture-flow-arrow{height:20px!important}
  .capture-block,.capture-destination{width:min(330px,calc(100vw - 44px))!important}
  .capture-block{min-height:54px!important;padding-right:42px!important}
  .capture-actions{padding-top:6px!important}
  .capture-actions .soft-button{font-size:0!important}
  .capture-actions .soft-button span{font-size:1rem!important}
  .appointment-card{grid-template-columns:96px minmax(0,1fr)!important;min-height:108px!important}
  .appointment-time{padding:21px 19px 16px 12px!important;font-size:.96rem!important}
  .appointment-time::after{top:22px!important}
  .appointment-main{padding:18px 13px 16px 22px!important}
  .appointment-main strong{font-size:1.08rem!important}
}

@media(max-width:380px){
  .appointment-card{grid-template-columns:84px minmax(0,1fr)!important}
  .appointment-time{padding-left:9px!important;padding-right:16px!important;font-size:.87rem!important}
  .appointment-main{padding-left:18px!important;padding-right:10px!important}
  .capture-block,.capture-destination{width:100%!important}
}

@media(prefers-reduced-motion:reduce){
  .capture-block.is-new{animation:none!important}
  .capture-block,.appointment-card{transition:none!important}
}
