/* ── Auth pages (login / registo) ─────────────── */
.agr-auth-page .rsv-main{display:flex;align-items:center;justify-content:center;min-height:80vh;padding:1.5rem}

.agr-auth-card{
  background:#fff;
  border-radius:28px;
  border:1px solid var(--rsv-border);
  box-shadow:0 20px 60px rgba(4,46,22,.14);
  padding:36px 32px;
  width:100%;
  max-width:440px;
}

.agr-auth-logo{text-align:center;margin-bottom:24px;}

.agr-auth-card h1{
  font-size:1.7rem;
  line-height:1;
  letter-spacing:-.05em;
  font-weight:900;
  color:#075429;
  margin:0 0 24px;
  text-align:center;
}

.agr-auth-link{margin-top:20px;text-align:center;font-size:.88rem;color:var(--rsv-muted);font-weight:750;}

/* ── Alerts ─────────────────────────────────── */
.agr-alert{border-radius:14px;padding:12px 14px;margin-bottom:16px;font-size:.88rem;font-weight:750;}
.agr-alert-erro{background:#fef2f2;border:1px solid #fca5a5;color:#b91c1c;}
.agr-alert-ok{background:#f0fdf4;border:1px solid #86efac;color:#166534;}
.agr-alert-info{background:#eff6ff;border:1px solid #93c5fd;color:#1d4ed8;}

/* ── Form ────────────────────────────────────── */
.agr-form{display:flex;flex-direction:column;gap:14px;}
.agr-form label{display:flex;flex-direction:column;gap:5px;font-size:.86rem;font-weight:850;color:#374151;}
.agr-form label small{font-size:.78rem;font-weight:750;color:var(--rsv-muted);}
.agr-form input,
.agr-form select,
.agr-form textarea{
  border:1.5px solid var(--rsv-border,#e5e7eb);
  border-radius:10px;
  padding:10px 14px;
  font-size:.95rem;
  font-family:inherit;
  color:#111;
  background:#fafafa;
  transition:border-color .15s,box-shadow .15s;
}
.agr-form input:focus,
.agr-form select:focus,
.agr-form textarea:focus{
  outline:none;
  border-color:#075429;
  box-shadow:0 0 0 3px rgba(7,84,41,.10);
  background:#fff;
}

/* ── Buttons ─────────────────────────────────── */
.agr-btn-principal{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  background:#075429;
  color:#fff;
  border:none;
  border-radius:999px;
  padding:12px 20px;
  font-size:.92rem;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
  transition:opacity .15s;
}
.agr-btn-principal:hover{opacity:.88;}
.agr-btn-principal:active{opacity:.75;}
.agr-btn-principal.agr-btn-sm{padding:9px 16px;font-size:.82rem;}

.agr-btn-sec{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  background:transparent;
  color:#075429;
  border:1.5px solid #075429;
  border-radius:999px;
  padding:10px 18px;
  font-size:.88rem;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
  transition:background .15s;
}
.agr-btn-sec:hover{background:#f0fdf4;}
.agr-btn-sec:active{background:#dcfce7;}
.agr-btn-sec.agr-btn-sm{padding:9px 16px;font-size:.82rem;}

.agr-btn-perigo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#fee2e2;
  color:#b91c1c;
  border:1.5px solid #fca5a5;
  border-radius:999px;
  padding:10px 18px;
  font-size:.88rem;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
}

/* ── Dashboard header ────────────────────────── */
.agr-dash-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:20px;
  flex-wrap:wrap;
}
.agr-dash-header h1{
  font-size:2rem;
  line-height:1;
  letter-spacing:-.055em;
  font-weight:900;
  color:#111;
  margin:0;
}
.agr-dash-subtitle{color:var(--rsv-muted);font-size:.9rem;font-weight:750;margin:6px 0 0;}

/* ── Coverage alert ──────────────────────────── */
.agr-alerta-cobertura{
  background:#fffbeb;
  border:1px solid #fcd34d;
  border-radius:14px;
  padding:14px 16px;
  margin-bottom:16px;
  font-size:.88rem;
  font-weight:850;
}
.agr-alerta-item{
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid #fde68a;
}

/* ── Dashboard action cards ──────────────────── */
.agr-dash-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:20px;
}

.agr-card-acao{
  display:flex;
  flex-direction:column;
  gap:10px;
  background:#fff;
  border:1px solid var(--rsv-border);
  border-radius:14px;
  box-shadow:var(--rsv-shadow);
  padding:20px;
  text-decoration:none;
  color:#111;
  position:relative;
  overflow:hidden;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}

.agr-card-acao::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:4px;
  background:var(--acao-accent,#075429);
  border-radius:14px 14px 0 0;
}

.agr-card-acao:hover{
  transform:translateY(-3px);
  box-shadow:0 20px 48px rgba(6,63,32,.13);
  border-color:var(--acao-accent,#075429);
}

.agr-card-acao--parcelas{--acao-accent:#075429;}
.agr-card-acao--tratamentos{--acao-accent:#d97706;}
.agr-card-acao--risco{--acao-accent:#2563eb;}
.agr-card-acao--calendario{--acao-accent:#7c3aed;}

.agr-acao-icon{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:rgba(7,84,41,.10);
  color:#075429;
}
.agr-acao-icon svg{width:22px;height:22px;fill:currentColor;}
.agr-card-acao--tratamentos .agr-acao-icon{background:rgba(217,119,6,.10);color:#d97706;}
.agr-card-acao--risco .agr-acao-icon{background:rgba(37,99,235,.10);color:#2563eb;}
.agr-card-acao--calendario .agr-acao-icon{background:rgba(124,58,237,.10);color:#7c3aed;}

.agr-card-acao strong{font-size:.95rem;font-weight:900;letter-spacing:-.02em;}
.agr-card-acao small{font-size:.8rem;color:var(--rsv-muted);font-weight:750;}

/* ── Section header ──────────────────────────── */
.agr-sec-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
}
.agr-sec-header h2{
  font-size:1.3rem;
  letter-spacing:-.04em;
  font-weight:900;
  color:#111;
  margin:0;
}

/* ── Parcelas grid (dashboard) ───────────────── */
.agr-parcelas-lista{margin-top:8px;}

.agr-parcelas-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:14px;
}

.agr-parcela-card{
  display:block;
  background:#fff;
  border:1px solid var(--rsv-border);
  border-radius:14px;
  box-shadow:var(--rsv-shadow);
  padding:18px;
  position:relative;
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  transition:border-color .14s,box-shadow .14s;
  cursor:pointer;
}
.agr-parcela-card:hover{border-color:#86efac;box-shadow:0 4px 16px rgba(7,84,41,.10);}
.agr-parcela-card::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:4px;
  border-radius:14px 14px 0 0;
}
.agr-parcela-card.coberta{border-color:#bbf7d0;}
.agr-parcela-card.coberta::before{background:#22c55e;}
.agr-parcela-card.descoberta{border-color:#fecaca;}
.agr-parcela-card.descoberta::before{background:#ef4444;}

.agr-parcela-nome{font-weight:900;font-size:1.05rem;margin-bottom:4px;letter-spacing:-.03em;}
.agr-parcela-meta{font-size:.82rem;color:var(--rsv-muted);font-weight:750;}

.agr-cobertura-badge{
  display:inline-block;
  border-radius:999px;
  padding:4px 10px;
  font-size:.75rem;
  font-weight:900;
  margin:8px 0 6px;
}
.agr-cobertura-badge.ok{background:#dcfce7;color:#166534;}
.agr-cobertura-badge.exp{background:#fee2e2;color:#b91c1c;}

.agr-parcela-acoes{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;}
.agr-parcela-acoes a,.agr-parcela-acoes span{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 11px;
  font-size:.78rem;
  font-weight:900;
  text-decoration:none;
  background:#f0fdf4;
  color:#075429;
  border:1px solid #dfece0;
  transition:background .12s,border-color .12s;
  cursor:pointer;
}
.agr-parcela-acoes a:hover,.agr-parcela-acoes span.agr-link-detalhe:hover{background:#dcfce7;border-color:#86efac;}
.agr-link-tratamento{background:#fffbeb!important;color:#92400e!important;border-color:#fde68a!important;}
.agr-link-tratamento:hover{background:#fef3c7!important;border-color:#fcd34d!important;}

.agr-vazio{text-align:center;padding:3rem 1.5rem;color:var(--rsv-muted);background:#f8fbf6;border:1.5px dashed #c6dbc0;border-radius:14px;}
.agr-vazio-ico{font-size:2.2rem;line-height:1;margin-bottom:12px;}
.agr-vazio h3{font-size:1rem;font-weight:900;color:#374151;margin:0 0 8px;letter-spacing:-.02em;}
.agr-vazio p{font-size:.85rem;margin:0 0 18px;line-height:1.6;color:var(--rsv-muted);}
.agr-vazio-msg{color:var(--rsv-muted);font-size:.88rem;}
.agr-vazio-inline{background:none;border:none;padding:1.5rem 1rem;}

/* Cards de lista (recomendações, etc.) */
.rec-card{
  display:block;background:#fff;border:1.5px solid var(--rsv-border);
  border-radius:14px;padding:14px 16px;text-decoration:none;color:inherit;
  transition:border-color .13s,box-shadow .13s;
  -webkit-tap-highlight-color:transparent;
}
@media(hover:hover){
  .rec-card:hover{border-color:#86efac;box-shadow:0 4px 14px rgba(7,84,41,.08);}
}
.rec-card:active{border-color:#86efac;background:#f0fdf4;}
.rec-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.rec-card-title{font-weight:900;font-size:.92rem;color:#111;margin-bottom:3px;}
.rec-card-sub{font-size:.78rem;color:var(--rsv-muted);font-weight:750;}
.rec-card-tags{display:flex;gap:5px;flex-wrap:wrap;align-items:center;}
.rec-tag{font-size:.70rem;font-weight:800;padding:3px 9px;border-radius:999px;background:#dcfce7;color:#166534;border:1px solid #86efac;}
.rec-card-arrow{color:var(--rsv-muted);font-size:1.2rem;flex-shrink:0;}

/* ── Parcelas page (mapa) ────────────────────── */
.agr-parcelas-page .rsv-main{padding:0!important;}
.agr-parcelas-layout{display:flex;height:calc(100vh - 56px);overflow:hidden;}

.agr-parcelas-aside{
  width:320px;
  min-width:280px;
  overflow-y:auto;
  padding:16px;
  border-right:1px solid var(--rsv-border);
  background:#fff;
}

.agr-aside-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.agr-aside-header h1{font-size:1.15rem;letter-spacing:-.04em;font-weight:900;color:#111;margin:0;}

.agr-parcelas-nav{list-style:none;padding:0;margin:0 0 16px;display:grid;gap:6px;}
.agr-parcelas-nav li a{
  display:flex;
  flex-direction:column;
  padding:10px 12px;
  border-radius:14px;
  text-decoration:none;
  color:#111;
  font-size:.88rem;
  font-weight:850;
  border:1px solid transparent;
  transition:background .12s,border-color .12s;
}
.agr-parcelas-nav li a small{color:var(--rsv-muted);font-size:.78rem;font-weight:750;}
.agr-parcelas-nav li a:hover{background:#f0fdf4;border-color:#dfece0;}
.agr-parcelas-nav li.ativa a{background:#dcfce7;border-color:#86efac;font-weight:900;}

.agr-parcela-form h2{font-size:1rem;color:#075429;margin:0 0 12px;font-weight:900;}
.agr-form-acoes{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;}
.agr-area-info{font-size:.82rem;color:#374151;margin:0;font-weight:750;}
.agr-draw-hint{font-size:.8rem;color:var(--rsv-muted);margin:0;background:#fffbeb;border-radius:10px;padding:8px 10px;font-weight:750;}
.agr-mapa-container{flex:1;position:relative;}
#agr-mapa{width:100%;height:100%;}

/* ── Tratamentos ─────────────────────────────── */
.agr-trat-layout{display:grid;grid-template-columns:520px 1fr;gap:28px;align-items:start;}
.agr-trat-form-sec h1{font-size:1.5rem;letter-spacing:-.04em;font-weight:900;color:#111;margin:0 0 16px;}
.agr-periodo-info{font-size:.82rem;color:#374151;background:#f8fbf2;border:1px solid #dfece0;border-radius:10px;padding:8px 12px;margin:0;font-weight:750;}
.agr-filtro-aviso{font-size:.83rem;color:#1d4ed8;background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;padding:8px 12px;margin:0 0 12px;}

/* Cobertura de doenças */
.trat-cobertura-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#f8fbf2;border:1px solid #dfece0;border-radius:10px;padding:10px 14px;}
.trat-cob-label{font-size:.78rem;font-weight:900;color:var(--rsv-muted);margin-right:2px;}
.trat-cob-badge{font-size:.75rem;font-weight:900;padding:4px 10px;border-radius:999px;border:1.5px solid #d1d5db;color:#6b7280;background:#f9fafb;transition:all .2s;display:inline-flex;align-items:center;gap:5px;}
.trat-cob-badge.coberto{background:#dcfce7;color:#166534;border-color:#86efac;}
.trat-cob-date{font-size:.68rem;font-weight:700;opacity:.85;}

/* Cobertura por doença no histórico */
.trat-cov-pill{font-size:.72rem;font-weight:800;padding:3px 9px;border-radius:999px;display:inline-flex;align-items:center;gap:4px;}
.trat-cov-pill small{font-weight:700;font-size:.66rem;opacity:.8;}
.trat-cov-pill.ok{background:#dcfce7;color:#166534;border:1px solid #86efac;}
.trat-cov-pill.exp{background:#f3f4f6;color:#9ca3af;border:1px solid #e5e7eb;text-decoration:line-through;}

/* Bloco de produtos */
.trat-produtos-bloco{border:1.5px solid var(--rsv-border);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:8px;}
.trat-produtos-header{display:flex;justify-content:space-between;align-items:center;}
.trat-produtos-header strong{font-size:.9rem;color:#111;font-weight:900;}
/* Bloco de custos */
.trat-custos-bloco{border:1.5px solid #d1fae5;border-radius:14px;padding:14px;background:#f9fffe;}
.trat-custos-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;}
.trat-custos-header strong{font-size:.9rem;color:#111;font-weight:900;}
.trat-custos-header small{font-size:.72rem;color:var(--rsv-muted);margin-left:5px;font-weight:400;}
.trat-custos-total{font-size:1rem;font-weight:900;color:#075429;}
.trat-custos-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;}
.trat-custo-lbl{font-size:.78rem;font-weight:700;color:#374151;display:flex;flex-direction:column;gap:3px;min-width:0;}
.trat-custo-lbl input{font-size:.85rem;width:100%;box-sizing:border-box;}
@media(max-width:600px){.trat-custos-grid{grid-template-columns:1fr;}}
.trat-btn-add{background:#075429;color:#fff;border:none;border-radius:999px;padding:6px 16px;font-size:.82rem;font-weight:900;cursor:pointer;transition:background .15s;}
.trat-btn-add:hover{background:#053d1e;}
.trat-produtos-vazio{font-size:.83rem;color:var(--rsv-muted);text-align:center;padding:8px 0;margin:0;}

/* ── Linhas de produto ─────────────────────────────── */
.trat-row{border:1.5px solid var(--rsv-border);border-radius:14px;padding:10px 12px;background:#fff;display:grid;gap:8px;align-items:start;}

/* Modo pesquisa */
.trat-row-s{grid-template-columns:1fr 34px;}

/* Modo produto SIFITO selecionado */
.trat-row-f{grid-template-columns:1fr 148px 34px;background:#fafcf8;border-color:#b8d4a4;}

/* Modo produto manual */
.trat-row-m{grid-template-columns:1fr 34px;}

/* ── Pesquisa ─────────────────────────────────────── */
.trat-sw{position:relative;}
.trat-si{width:100%;box-sizing:border-box;border:1.5px solid var(--rsv-border);border-radius:10px;padding:9px 38px 9px 12px;font-size:.86rem;font-family:inherit;background:#fff;color:#111;}
.trat-si::placeholder{color:#9ca3af;}
.trat-si:focus{border-color:#075429;outline:none;box-shadow:0 0 0 3px rgba(7,84,41,.10);}
.trat-drop{position:absolute;top:calc(100% + 4px);left:0;right:0;background:#fff;border:1.5px solid #b8d4a4;border-radius:10px;box-shadow:0 10px 28px rgba(6,63,32,.14);z-index:300;overflow:hidden;max-height:300px;overflow-y:auto;}
.trat-di{display:flex;flex-wrap:wrap;align-items:center;gap:3px 8px;padding:10px 14px;cursor:pointer;border-bottom:1px solid #f0f5ee;}
.trat-di:last-child{border-bottom:none;}
.trat-di:hover,.trat-di.hi{background:#eef7e6;}
.tdi-n{font-weight:900;font-size:.87rem;color:#111;flex:1 1 100%;line-height:1.2;}
.tdi-sa{font-size:.74rem;color:var(--rsv-muted);font-style:italic;}
.tdi-d{font-size:.71rem;background:#eff6ff;color:#1e40af;border-radius:999px;padding:2px 8px;font-weight:800;}
.trat-hint{padding:5px 2px 0;}
.trat-hint-btn{background:none;border:none;color:#075429;font-weight:800;font-size:.78rem;cursor:pointer;padding:0;font-family:inherit;text-decoration:underline;text-align:left;}
.trat-hint-btn:hover{color:#053d1e;}

/* ── Card produto SIFITO ──────────────────────────── */
.trat-card{display:grid;gap:2px;min-width:0;}
.tc-n{font-weight:900;font-size:.9rem;color:#111;line-height:1.2;word-break:break-word;}
.tc-sa{font-size:.76rem;color:var(--rsv-muted);font-style:italic;}
.tc-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px;}
.tc-t{font-size:.70rem;padding:2px 8px;border-radius:999px;font-weight:800;white-space:nowrap;}
.tc-d{background:#eff6ff;color:#1e40af;}
.tc-f{background:#f0fdf4;color:#075429;border:1px solid #dfece0;}
.tc-a{background:#fefce8;color:#854d0e;}
.tc-p{background:#e0f2fe;color:#0369a1;}
.tc-is{background:#fef2f2;color:#b91c1c;}

/* ── Inputs de dose e manual ──────────────────────── */
.trat-dose-inp{border:1.5px solid var(--rsv-border);border-radius:10px;padding:9px 12px;font-size:.84rem;font-family:inherit;color:#111;background:#fff;width:100%;box-sizing:border-box;}
.trat-dose-inp:focus{border-color:#075429;outline:none;box-shadow:0 0 0 3px rgba(7,84,41,.10);}
.trat-man-wrap{display:grid;gap:6px;min-width:0;}
.trat-man-ctrl{display:grid;grid-template-columns:auto 1fr;gap:6px;}
.trat-man-inp{font-size:.86rem;}
.trat-cat-sel{border:1.5px solid var(--rsv-border);border-radius:10px;padding:9px 10px;font-size:.8rem;font-family:inherit;background:#fff;color:#111;white-space:nowrap;}
.trat-cat-sel:focus{border-color:#075429;outline:none;}

/* ── Botão remover ────────────────────────────────── */
.trat-btn-rem{width:34px;height:34px;min-width:34px;border:none;border-radius:8px;background:#fee2e2;color:#b91c1c;cursor:pointer;display:grid;place-items:center;align-self:start;}
.trat-btn-rem:hover{background:#fca5a5;}
.trat-btn-rem svg{width:16px;height:16px;display:block;}

/* Tabela histórico */
.agr-trat-hist h2{font-size:1.3rem;letter-spacing:-.04em;font-weight:900;color:#111;margin:0 0 14px;}
.agr-trat-table-wrap{overflow-x:auto;}
.agr-trat-table{width:100%;border-collapse:collapse;font-size:.84rem;}
.agr-trat-table th,
.agr-trat-table td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--rsv-border);vertical-align:top;}
.agr-trat-table th{background:#f8fbf2;font-weight:900;font-size:.75rem;letter-spacing:.03em;text-transform:uppercase;color:var(--rsv-muted);white-space:nowrap;}
.agr-trat-table tr.trat-exp td{color:var(--rsv-muted);}
.agr-trat-table tbody tr:hover td{background:#fafcf8;}
.trat-hist-prod{display:flex;flex-wrap:wrap;gap:3px;align-items:center;padding:2px 0;}
.trat-hist-prod+.trat-hist-prod{border-top:1px solid #f0f0f0;margin-top:3px;padding-top:5px;}
.trat-prod-cell{font-weight:750;font-size:.84rem;}
.trat-sa{color:var(--rsv-muted);font-size:.75rem;}
.trat-doenca-tag{font-size:.72rem;background:#eff6ff;color:#1e40af;border-radius:999px;padding:2px 7px;white-space:nowrap;}
.trat-frac-tag{font-size:.72rem;background:#f0fdf4;color:#075429;border:1px solid #dfece0;border-radius:999px;padding:2px 7px;white-space:nowrap;font-weight:900;}
.trat-cat-tag{font-size:.72rem;border-radius:999px;padding:2px 7px;}
.trat-cat-inseticida{background:#fef3c7;color:#92400e;}
.trat-cat-adubo{background:#ecfdf5;color:#065f46;}
.trat-cat-outro{background:#f3f4f6;color:#374151;}

/* ── Calendário de Tratamentos ───────────────── */
.cal-page{max-width:1400px;}
.cal-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:20px;flex-wrap:wrap;}
.cal-page-head h1{font-size:1.5rem;letter-spacing:-.04em;font-weight:900;color:#111;margin:0 0 3px;}
.cal-page-sub{font-size:.84rem;color:var(--rsv-muted);margin:0;font-weight:700;}

/* Cards semáforo */
.cal-overview{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:10px;margin-bottom:24px;}
.cal-card{display:grid;gap:5px;border-radius:14px;padding:14px 16px;text-decoration:none;border:1.5px solid var(--rsv-border);background:#fff;transition:box-shadow .15s;}
.cal-card:hover{box-shadow:0 6px 18px rgba(6,63,32,.10);}
.cal-card-v{border-color:#86efac;background:#f0fdf4;}
.cal-card-a{border-color:#fcd34d;background:#fffbeb;}
.cal-card-r{border-color:#fca5a5;background:#fef2f2;}
.cal-card-top{display:flex;align-items:center;gap:8px;min-width:0;}
.cal-card-nome{font-weight:900;font-size:.88rem;color:#111;line-height:1.2;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cal-badge{font-size:.68rem;font-weight:900;width:max-content;padding:2px 9px;border-radius:999px;}
.cal-badge-v{background:#dcfce7;color:#166534;}
.cal-badge-a{background:#fef3c7;color:#92400e;}
.cal-badge-r{background:#fee2e2;color:#991b1b;}
.cal-card-dias{font-size:.76rem;color:var(--rsv-muted);font-weight:750;}
.cal-card-casta{font-size:.72rem;color:var(--rsv-muted);font-style:italic;}
.cal-card-doencas{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px;}
.cal-d-pill{font-size:.66rem;font-weight:800;padding:2px 7px;border-radius:999px;border:1px solid;display:inline-flex;align-items:center;gap:3px;}
.cal-d-pill small{font-weight:700;opacity:.8;font-size:.62rem;}

/* Grid por doença */
.cal-row-parc-hdr .pd-cal-lbl{font-weight:900;background:#f8fbf6;}
.cal-row-parc-hdr{border-bottom:none!important;}
.pd-cal-days-hdr{display:grid;grid-template-columns:repeat(var(--pd-cols),1fr);}
.pd-cal-dhdr-empty{height:6px;}
.pd-cal-dhdr-empty.pd-today-hdr{background:#f0fdf4;}
.cal-row-doenca .pd-cal-lbl{padding-left:28px;}
.cal-lbl-doenca{display:flex;align-items:center;gap:5px;}
.cal-d-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;}
.cal-d-nome{font-size:.71rem;font-weight:800;color:#374151;}

/* Semáforos */
.cal-sem{display:inline-block;width:11px;height:11px;border-radius:50%;flex-shrink:0;}
.cal-sem-v{background:#22c55e;box-shadow:0 0 7px rgba(34,197,94,.5);}
.cal-sem-a{background:#f59e0b;box-shadow:0 0 7px rgba(245,158,11,.5);}
.cal-sem-r{background:#ef4444;box-shadow:0 0 7px rgba(239,68,68,.5);}

/* Timeline section */
.cal-timeline-sec{margin-bottom:20px;}
.cal-timeline-head{display:flex;align-items:baseline;gap:12px;margin-bottom:8px;flex-wrap:wrap;}
.cal-timeline-head h2{font-size:1.1rem;font-weight:900;color:#111;letter-spacing:-.03em;margin:0;}
.cal-range{font-size:.82rem;color:var(--rsv-muted);font-weight:700;}

/* Calendar navigation */
.cal-nav{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:10px;margin-bottom:12px;}
.cal-nav-btn{display:inline-flex;align-items:center;gap:5px;background:#f0f5ee;border:1.5px solid var(--rsv-border);border-radius:999px;padding:6px 14px;font-size:.80rem;font-weight:800;color:#374151;text-decoration:none;white-space:nowrap;transition:background .12s,border-color .12s;}
.cal-nav-btn:hover{background:#e0ede4;border-color:#a7d5b4;}
.cal-nav-today{background:#075429;color:#fff;border-color:#075429;justify-self:end;}
.cal-nav-today:hover{background:#054a1f;}
.cal-nav-range{font-size:.85rem;font-weight:800;color:#374151;text-align:center;}

/* Chart */
.cal-chart{border:1.5px solid var(--rsv-border);border-radius:14px;overflow:hidden;background:#fff;}
.cal-chart-row{display:grid;grid-template-columns:180px 1fr;border-bottom:1px solid #f0f5ee;}
.cal-chart-row:last-child{border-bottom:none;}
.cal-scale-row{background:#f8fbf2;}
.cal-row-lbl{display:flex;align-items:center;gap:8px;padding:10px 14px;border-right:1px solid #eef4ec;min-width:0;}
.cal-row-nome{color:#111;text-decoration:none;font-weight:800;font-size:.83rem;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
.cal-row-nome:hover{color:#075429;text-decoration:underline;}

/* Track */
.cal-row-track{position:relative;height:46px;overflow:hidden;}
.cal-scale-track{height:34px;}

/* Meses */
.cal-month-lbl{position:absolute;top:9px;font-size:.70rem;font-weight:900;color:var(--rsv-muted);letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;transform:translateX(-50%);pointer-events:none;}

/* Linha de hoje */
.cal-today-line{position:absolute;top:0;bottom:0;width:2px;background:#075429;opacity:.75;z-index:10;}
.cal-today-tag{position:absolute;top:3px;left:5px;font-size:.64rem;font-weight:900;color:#075429;white-space:nowrap;}

/* Blocos de tratamento */
.cal-blk{position:absolute;top:7px;bottom:7px;border-radius:8px;min-width:4px;cursor:default;overflow:hidden;display:flex;align-items:center;justify-content:space-between;padding:0 6px;}
.cal-blk:hover{filter:brightness(.92);}
.cal-blk-ok{background:linear-gradient(90deg,#4ade80,#16a34a);box-shadow:0 2px 8px rgba(22,163,74,.25);}
.cal-blk-warn{background:linear-gradient(90deg,#fbbf24,#d97706);box-shadow:0 2px 8px rgba(217,119,6,.25);}
.cal-blk-exp{background:#d1d5db;}
.cal-blk-lbl,.cal-blk-end{font-size:.65rem;font-weight:900;color:#fff;white-space:nowrap;text-shadow:0 1px 2px rgba(0,0,0,.3);flex-shrink:0;}
.cal-blk-exp .cal-blk-lbl,.cal-blk-exp .cal-blk-end{color:#6b7280;text-shadow:none;}
.cal-no-trat{position:absolute;top:50%;left:14px;transform:translateY(-50%);font-size:.74rem;color:var(--rsv-muted);font-style:italic;}

/* Legenda */
.cal-legenda{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid #f0f5ee;font-size:.74rem;color:var(--rsv-muted);font-weight:800;}
.cal-leg-item{display:flex;align-items:center;gap:6px;}
.cal-leg-sq{display:inline-block;width:22px;height:10px;border-radius:4px;}
.cal-leg-today-sq{display:inline-block;width:3px;height:14px;background:#075429;border-radius:2px;opacity:.75;}

/* ── OTP ─────────────────────────────────────── */
.agr-otp-info{font-size:.9rem;color:#374151;font-weight:750;background:#f0fdf4;border:1px solid #86efac;border-radius:14px;padding:12px 14px;margin-bottom:14px;}

/* ── Responsive ──────────────────────────────── */
@media(max-width:1200px){
  .agr-trat-layout{grid-template-columns:1fr;}
}
@media(max-width:860px){
  .agr-parcelas-layout{flex-direction:column;height:auto;}
  .agr-parcelas-aside{width:100%;border-right:none;border-bottom:1px solid var(--rsv-border);}
  .agr-mapa-container{height:50vh;}
  .agr-dash-actions{grid-template-columns:repeat(2,1fr);}
  .agr-parcelas-grid{grid-template-columns:repeat(2,1fr);}
  .cal-chart-row{grid-template-columns:130px 1fr;}
  .cal-overview{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));}
  .pd-page{padding-bottom:16px;}
}
@media(max-width:560px){
  .agr-dash-actions{grid-template-columns:repeat(2,1fr);}
  .agr-parcelas-grid{grid-template-columns:1fr;}
  .cal-chart-row{grid-template-columns:100px 1fr;}
  .agr-auth-card{padding:24px 18px;}
  /* produto SIFITO: dose fica por baixo do card em phones */
  .trat-row-f{grid-template-columns:1fr 34px;}
  .trat-row-f .trat-card{grid-column:1;grid-row:1;}
  .trat-row-f .trat-dose-inp{grid-column:1/3;grid-row:2;}
  .trat-row-f .trat-btn-rem{grid-column:2;grid-row:1;}
}
@media(max-width:430px){
  .agr-dash-actions{grid-template-columns:1fr;}
}

/* ── Mobile: touch targets e responsividade ──────────────────────── */
@media(max-width:860px){
  /* Botões de acção nas parcelas — mínimo 44px de altura para toque */
  .agr-parcela-acoes a,
  .agr-parcela-acoes span{
    min-height:44px;
    padding:10px 14px;
    font-size:.82rem;
    justify-content:center;
  }
  .agr-parcela-acoes{gap:8px;}

  /* Botões gerais */
  .agr-btn-sec.agr-btn-sm,
  .agr-btn-principal.agr-btn-sm{
    min-height:42px;
    padding:10px 16px;
  }

  /* Tabela de histórico de tratamentos — stack em mobile */
  .agr-trat-table-wrap{overflow-x:unset;}
  .agr-trat-table thead{display:none;}
  .agr-trat-table tr{
    display:block;
    border:1.5px solid var(--rsv-border);
    border-radius:14px;
    margin-bottom:10px;
    background:#fff;
    padding:10px 12px;
  }
  .agr-trat-table td{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:8px;
    padding:5px 0;
    border-bottom:1px solid #f5f5f5;
    font-size:.84rem;
  }
  .agr-trat-table td:last-child{border-bottom:none;}
  .agr-trat-table td::before{
    content:attr(data-label);
    font-size:.70rem;
    font-weight:900;
    color:var(--rsv-muted);
    text-transform:uppercase;
    letter-spacing:.03em;
    flex-shrink:0;
    padding-top:1px;
    min-width:80px;
  }
  .agr-trat-table td > *{flex:1 1 auto;min-width:0;}

  /* Formulário de tratamento — inputs maiores */
  .agr-form label input,
  .agr-form label select,
  .agr-form label textarea{
    min-height:48px;
    font-size:1rem;
  }

  /* Calendário — cards maiores */
  .cal-card{padding:12px 14px;}

  /* Previsão tabela — scroll com hint */
  .pd-fcast-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .pd-fcast-wrap::after{
    content:'← deslize →';
    display:block;
    text-align:center;
    font-size:.68rem;
    color:var(--rsv-muted);
    padding:4px 0;
  }
}

@media(max-width:560px){
  /* Acções de parcela em coluna em ecrãs muito pequenos */
  .agr-parcela-acoes{flex-direction:column;}
  .agr-parcela-acoes a,
  .agr-parcela-acoes span{width:100%;box-sizing:border-box;}
}

/* ── Parcela detalhe ─────────────────────────────────────────────── */
.agr-pd-page .rsv-main{padding:0;}
.pd-page{max-width:1160px;margin:0 auto;padding:20px 16px 56px;}

/* Header */
.pd-header{margin-bottom:20px;}
.pd-header-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;flex-wrap:wrap;}
.pd-header-actions{display:flex;gap:8px;flex-shrink:0;}
.pd-back{display:inline-flex;align-items:center;gap:5px;font-size:.78rem;font-weight:800;color:var(--rsv-muted);text-decoration:none;letter-spacing:.02em;}
.pd-back:hover{color:#075429;}
.pd-header-main{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.pd-header-info{min-width:0;}
.pd-header-info h1{font-size:1.55rem;font-weight:900;color:#111;letter-spacing:-.04em;margin:0 0 6px;}
.pd-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:4px;}
.pd-meta-tag{display:inline-flex;align-items:center;gap:4px;background:#f0f5ee;color:#374151;font-size:.78rem;font-weight:800;padding:3px 10px;border-radius:999px;}
.pd-meta-est{display:inline-flex;align-items:center;gap:4px;font-size:.78rem;color:var(--rsv-muted);font-weight:700;}

.pd-status-block{display:flex;align-items:center;gap:10px;padding:8px 16px;border-radius:14px;flex-shrink:0;}
.pd-status-block > div{display:flex;flex-direction:column;gap:1px;}
.pd-status-v{background:#f0fdf4;color:#166534;}
.pd-status-a{background:#fffbeb;color:#92400e;}
.pd-status-r{background:#fef2f2;color:#991b1b;}
.pd-status-dot{width:11px;height:11px;border-radius:50%;flex-shrink:0;}
.pd-status-v .pd-status-dot{background:#16a34a;}
.pd-status-a .pd-status-dot{background:#d97706;}
.pd-status-r .pd-status-dot{background:#dc2626;}
.pd-status-label{font-size:.85rem;font-weight:900;line-height:1.2;}
.pd-status-days{font-size:.74rem;font-weight:700;opacity:.75;}

/* Título da parcela */
.pd-title{font-size:1.5rem;font-weight:900;color:#111;letter-spacing:-.04em;margin:4px 0 14px;}

/* Topo: mapa (esq) + painel info (dir) */
.pd-top-grid{display:grid;grid-template-columns:260px 1fr;gap:16px;margin-bottom:20px;align-items:start;}
.pd-map-col{}
.pd-mapa{height:200px;border-radius:14px;overflow:hidden;border:1.5px solid var(--rsv-border);background:#f0f5ee;}
.pd-mapa-vazio{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--rsv-muted);font-size:.85rem;font-weight:800;}

/* Painel de informação */
.pd-info-col{display:flex;flex-direction:column;gap:10px;}
.pd-info-card{background:#fff;border:1.5px solid var(--rsv-border);border-radius:14px;padding:12px 14px;}
.pd-info-title{font-size:.62rem;font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:var(--rsv-muted);margin-bottom:8px;}
.pd-info-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:3px 0;border-bottom:1px solid #f5f5f5;font-size:.80rem;color:#374151;}
.pd-info-row:last-child{border-bottom:none;}
.pd-info-lbl{color:var(--rsv-muted);font-weight:700;flex-shrink:0;}
.pd-info-empty{font-size:.80rem;color:var(--rsv-muted);margin:0;font-style:italic;}

/* Semáforo de cobertura */
.pd-cov-status{display:flex;align-items:center;gap:10px;}
.pd-cov-dot{width:13px;height:13px;border-radius:50%;flex-shrink:0;}
.pd-cov-label{font-size:.83rem;font-weight:900;line-height:1.2;}
.pd-cov-days{font-size:.74rem;font-weight:700;opacity:.75;}
.pd-cov-status-v .pd-cov-dot{background:#16a34a;}
.pd-cov-status-v .pd-cov-label{color:#166534;}
.pd-cov-status-a .pd-cov-dot{background:#d97706;}
.pd-cov-status-a .pd-cov-label{color:#92400e;}
.pd-cov-status-r .pd-cov-dot{background:#dc2626;}
.pd-cov-status-r .pd-cov-label{color:#991b1b;}

/* Previsão de risco */
.pd-risk-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:1px solid #f5f5f5;}
.pd-risk-row:last-child{border-bottom:none;}
.pd-risk-lbl{font-size:.80rem;font-weight:800;color:#374151;}
.pd-risk-badge{font-size:.70rem;font-weight:900;padding:2px 9px;border-radius:999px;}
.pd-risk-e{background:#fee2e2;color:#991b1b;}
.pd-risk-m{background:#fef3c7;color:#92400e;}
.pd-risk-b{background:#dcfce7;color:#166534;}
.pd-risk-nd{background:#f3f4f6;color:#6b7280;}

/* ── Forecast strip (multi-day pips) ─────────────────────────────── */
.pd-pip{display:inline-block;width:10px;height:10px;border-radius:50%;}
.pd-pip-e{background:#ef4444;}
.pd-pip-m{background:#f59e0b;}
.pd-pip-b{background:#22c55e;}
.pd-pip-nd{background:#d1d5db;}
.pd-pip-ins-ok{background:#b45309;border-radius:2px;}
.pd-pip-ins-no{background:#e5e7eb;border-radius:2px;}
.pd-fcast-key{display:flex;gap:10px;flex-wrap:wrap;font-size:.62rem;color:var(--rsv-muted);}
.pd-fcast-key span{display:flex;align-items:center;gap:3px;}

/* Resumo de hoje */
.pd-risco-hoje{background:#f8fbf6;border-radius:10px;padding:10px 12px;margin-bottom:12px;}
.pd-risco-hoje-titulo{font-size:.7rem;font-weight:900;color:var(--rsv-muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px;}
.pd-risco-row{display:flex;align-items:center;gap:8px;margin-bottom:5px;}
.pd-risco-row:last-child{margin-bottom:0;}
.pd-risco-nome{font-size:.78rem;font-weight:800;color:#374151;min-width:90px;flex-shrink:0;}
.pd-risco-bar-wrap{flex:1;background:#e5e7eb;border-radius:999px;height:7px;overflow:hidden;}
.pd-risco-bar{height:100%;border-radius:999px;transition:width .4s ease;}
.pd-risco-val{font-size:.72rem;font-weight:900;min-width:65px;text-align:right;flex-shrink:0;}

/* Tabela 7 dias */
.pd-fcast-tbl{width:100%;border-collapse:collapse;font-size:.78rem;}
.pd-fcast-tbl th{text-align:center;padding:4px 6px;border-bottom:1.5px solid var(--rsv-border);}
.pd-fcast-tbl th .pd-fcast-lbl{display:block;font-size:.68rem;font-weight:900;color:#374151;}
.pd-fcast-tbl th .pd-fcast-date{display:block;font-size:.60rem;font-weight:700;color:var(--rsv-muted);}
.pd-fcast-dis-col{text-align:left;padding:5px 8px 5px 0;font-size:.76rem;font-weight:800;color:#374151;white-space:nowrap;}
.pd-fcast-cell{text-align:center;padding:5px 4px;}
.pd-fcast-hoje-col{background:#f0fdf4;}

/* Calendário — largura total */
.pd-chart-sec{margin-bottom:24px;}
.pd-vazio-inline{padding:24px;text-align:center;}
.pd-chart-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px;flex-wrap:wrap;}
.pd-chart-head h2{font-size:1rem;font-weight:900;color:#111;letter-spacing:-.03em;margin:0;}
.pd-chart-sub{font-size:.73rem;color:var(--rsv-muted);font-weight:700;}

/* ── Day-cell calendar chart ──────────────────────────────────────── */
.pd-cal{
  border:1.5px solid var(--rsv-border);
  border-radius:14px;
  overflow-x:auto;
  background:#fff;
}
.pd-cal-row{
  display:flex;
  border-bottom:1px solid #f0f5ee;
  min-width:calc(82px + var(--pd-cols,30) * 14px);
}
.pd-cal-row:last-child{border-bottom:none;}
.pd-cal-lbl{
  width:82px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  padding:0 10px;
  border-right:1px solid #eef4ec;
  font-size:.72rem;
  font-weight:900;
  color:#374151;
  line-height:1.2;
  position:sticky;
  left:0;
  z-index:2;
  background:#fff;
}
/* Calendar overview — wider label column */
.cal-day-grid .pd-cal-lbl{width:140px;font-size:.78rem;}
.cal-day-grid .pd-cal-row{min-width:calc(140px + var(--pd-cols,120) * 10px);}
.pd-lbl-dis{font-size:.68rem;color:var(--rsv-muted);}
.pd-lbl-cov{font-size:.72rem;color:#374151;}

/* Day header cells */
.pd-cal-days{
  flex:1;
  display:grid;
  grid-template-columns:repeat(var(--pd-cols),1fr);
  min-width:0;
}
.pd-cal-dhdr{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  padding:3px 0 4px;
  min-width:0;
  position:relative;
}
.pd-cal-dhdr.pd-today-hdr{background:#f0fdf4;}
.pd-mon{
  font-size:.56rem;
  font-weight:900;
  text-transform:uppercase;
  color:var(--rsv-muted);
  letter-spacing:.04em;
  line-height:1;
  white-space:nowrap;
}
.pd-dn{
  font-size:.66rem;
  font-weight:800;
  color:#374151;
  line-height:1.1;
}
.pd-today-hdr .pd-dn{
  color:#075429;
  font-weight:900;
}

/* Risk day cells */
.pd-cal-cell{
  height:26px;
  margin:2px 1.5px;
  border-radius:4px;
  cursor:default;
  transition:filter .1s;
}
.pd-cal-cell:hover{filter:brightness(.88);}
.pd-cell-e      {background:#ef4444;}
.pd-cell-m      {background:#f59e0b;}
.pd-cell-b      {background:#22c55e;}
.pd-cell-sd     {background:#e9ecef;} /* sem previsão — futuro */
.pd-cell-sd-past{background:#f3f4f6;} /* sem dados — passado */
.pd-cal-cell.pd-today-cell{
  outline:2px solid #075429;
  outline-offset:-2px;
  border-radius:5px;
}

/* Separator row */
.pd-cal-sep-row .pd-cal-lbl{padding:0;}
.pd-cal-sep-track{gap:0;}
.pd-cal-sep-cell{height:6px;}
.pd-cal-sep-cell.pd-today-sep{background:rgba(7,84,41,.08);}

/* Coverage bar row */
.pd-cal-cov-track{
  display:grid !important;
  grid-template-columns:repeat(var(--pd-cols),1fr);
  position:relative;
  height:38px;
  align-items:center;
  padding:0;
}
.pd-cov-bar{
  grid-row:1;
  height:26px;
  border-radius:7px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 6px;
  overflow:hidden;
  cursor:default;
  transition:filter .1s;
  margin:0 1px;
}
.pd-cov-bar:hover{filter:brightness(.92);}
.pd-cov-ok  {background:linear-gradient(90deg,#4ade80,#16a34a);box-shadow:0 2px 8px rgba(22,163,74,.2);}
.pd-cov-warn{background:linear-gradient(90deg,#fbbf24,#d97706);box-shadow:0 2px 8px rgba(217,119,6,.2);}
.pd-cov-exp {background:#d1d5db;}
.pd-cov-nc  {background:#e5e7eb;border:1.5px dashed #9ca3af;}
.pd-cov-ds,.pd-cov-de{font-size:.58rem;font-weight:900;color:#fff;white-space:nowrap;text-shadow:0 1px 2px rgba(0,0,0,.35);flex-shrink:0;}
.pd-cov-exp .pd-cov-ds,.pd-cov-exp .pd-cov-de{color:#6b7280;text-shadow:none;}
.pd-cov-nc .pd-cov-ds{color:#6b7280;text-shadow:none;}

/* Legend */
.pd-legenda{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:9px 12px;border-top:1px solid #f0f5ee;
  font-size:.71rem;color:var(--rsv-muted);font-weight:800;
}
.pd-leg-grp{color:#374151;font-weight:900;}
.pd-leg-sep{width:1px;height:14px;background:var(--rsv-border);margin:0 2px;}
.pd-leg-item{display:flex;align-items:center;gap:5px;}
.pd-leg-sq{display:inline-block;width:14px;height:14px;border-radius:3px;}
.pd-leg-bar{display:inline-block;width:22px;height:9px;border-radius:4px;}
.pd-leg-bar.pd-cov-ok{background:linear-gradient(90deg,#4ade80,#16a34a);}
.pd-leg-bar.pd-cov-warn{background:linear-gradient(90deg,#fbbf24,#d97706);}
.pd-leg-bar.pd-cov-exp{background:#d1d5db;}
.pd-leg-note{margin-left:auto;color:#6b7280;font-size:.69rem;font-style:italic;}

/* History */
.pd-hist-sec{margin-top:4px;}
.pd-hist-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;}
.pd-hist-head h2{font-size:1.05rem;font-weight:900;color:#111;letter-spacing:-.03em;margin:0;}

@media(max-width:720px){
  .pd-top-grid{grid-template-columns:1fr;}
  .pd-mapa{height:180px;}
}
@media(max-width:640px){
  .pd-cal-lbl{width:64px;font-size:.65rem;}
  .cal-nav{grid-template-columns:auto 1fr auto;}
  .cal-nav-today{display:none;}

  /* Calendário mobile — grid horizontal scrollável */
  .cal-day-grid .pd-cal-lbl{width:72px;font-size:.68rem;}
  .cal-day-grid .pd-cal-row{min-width:calc(72px + var(--pd-cols,30) * 8px);}
  .cal-day-grid .pd-cal-cell{height:22px;margin:2px 0.5px;}
  .cal-day-grid .pd-mon{display:none;}
  .cal-day-grid .pd-dn{font-size:.58rem;}
  .cal-day-grid .pd-cal-dhdr{padding:2px 0 3px;}

  /* Scroll hint — fade direita */
  .cal-grid-wrap{position:relative;}
  .cal-grid-wrap::after{
    content:'';position:absolute;top:0;right:0;bottom:0;width:28px;
    background:linear-gradient(to right,transparent,rgba(255,255,255,.85));
    pointer-events:none;border-radius:0 14px 14px 0;
  }
}

/* ── Botões legados (agr-parc-btn, agr-pc-btn) ───────────────────── */
.agr-parc-btn{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 14px;font-size:.78rem;font-weight:900;cursor:pointer;text-decoration:none;white-space:nowrap;font-family:inherit;line-height:1;}
.agr-parc-btn.sec{background:#fff;color:#075429;border:1.5px solid #d1fae5;}
.agr-parc-btn.sec:hover{background:#f0fdf4;}
.agr-parc-btn.del{background:#fee2e2;color:#b91c1c;border:1.5px solid #fca5a5;}
.agr-parc-btn.del:hover{background:#fef2f2;}
.agr-pc-btn{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 12px;font-size:.72rem;font-weight:900;cursor:pointer;text-decoration:none;white-space:nowrap;font-family:inherit;line-height:1;border:1.5px solid;}
.agr-pc-btn.op{background:#f0fdf4;color:#075429;border-color:#d1fae5;}
.agr-pc-btn.op:hover{background:#dcfce7;}
.agr-pc-btn.trat{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe;}
.agr-pc-btn.trat:hover{background:#dbeafe;}

/* ── FD strip compacto ───────────────────────────────────────────── */
.fd-strip{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#fff8f0;border:1.5px solid rgba(229,57,53,.22);border-radius:12px;padding:9px 14px;margin-bottom:12px;font-size:.78rem;}
.fd-strip-ico{color:#e8590c;flex-shrink:0;font-size:.9rem;}
.fd-strip strong{color:#c0392b;font-weight:900;}
.fd-strip-dates{color:#6b7280;font-size:.72rem;}
.fd-strip-link{margin-left:auto;font-size:.74rem;font-weight:900;color:#c0392b;text-decoration:none;white-space:nowrap;flex-shrink:0;}
.fd-strip-link:hover{text-decoration:underline;}

/* ── Parcela cards (dashboard hub) ──────────────────────────────── */
.agr-pc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin-top:4px;}
.agr-pc-card{display:flex;flex-direction:column;gap:6px;background:#fff;border:1.5px solid var(--rsv-border);border-radius:14px;padding:12px 14px;text-decoration:none;color:inherit;transition:box-shadow .15s,border-color .15s;cursor:pointer;}
.agr-pc-card:hover{box-shadow:0 4px 16px rgba(6,63,32,.10);border-color:#b8d4a4;}
.agr-pc-card.coberta{border-left:3px solid #16a34a;}
.agr-pc-card.exp{border-left:3px solid #f59e0b;}
.agr-pc-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:6px;}
.agr-pc-card-nome{font-size:.88rem;font-weight:900;color:#111;line-height:1.2;}
.agr-pc-card-sub{font-size:.73rem;color:#6b7280;display:flex;gap:6px;flex-wrap:wrap;align-items:center;}
.agr-pc-card-ha{font-weight:800;color:#374151;}
.agr-pc-card-foot{display:flex;gap:10px;font-size:.72rem;font-weight:800;color:#075429;padding-top:4px;border-top:1px solid #f3f4f6;margin-top:2px;}
.agr-pc-card-nova{border-style:dashed;align-items:center;justify-content:center;gap:4px;color:var(--rsv-muted);font-size:.82rem;font-weight:800;}
.agr-pc-card-nova:hover{color:#075429;border-color:#b8d4a4;background:#f8fbf6;}
.agr-pc-card-nova span:first-child{font-size:1.4rem;font-weight:300;line-height:1;}
