/* Calendário global para input[type="date"]. Mantém o campo nativo como fallback sem JS. */
input[type="date"].system-date-input{
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  padding-right:2.65rem;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232f7d37' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right .78rem center;
  background-size:18px 18px;
}
input[type="date"].system-date-input::-webkit-calendar-picker-indicator{
  opacity:0;
  width:2.4rem;
  height:100%;
  margin:0;
  cursor:pointer;
}
input[type="date"].system-date-input:disabled,
input[type="date"].system-date-input[readonly]{cursor:not-allowed}

.system-date-popover{
  position:fixed;
  z-index:10000;
  width:min(330px,calc(100vw - 24px));
  padding:.75rem;
  border:1px solid var(--line,#dce7de);
  border-radius:12px;
  background:var(--surface,#fff);
  box-shadow:0 18px 48px rgba(12,48,32,.18);
  color:var(--text,#373435);
}
.system-date-popover[hidden]{display:none!important}
.system-date-popover__head{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 38px;
  gap:.4rem;
  align-items:center;
  margin-bottom:.6rem;
}
.system-date-popover__title{
  margin:0;
  text-align:center;
  font-size:.9rem;
  font-weight:800;
  color:var(--brand-graphite,#373435);
  text-transform:capitalize;
}
.system-date-popover__nav{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  min-height:38px;
  padding:0;
  border:1px solid #d8e3da;
  border-radius:8px;
  background:#fff;
  color:var(--primary-dark,#1d6429);
  font-size:1.15rem;
  font-weight:800;
  line-height:1;
}
.system-date-popover__nav:hover{background:var(--brand-green-soft,#eef8ef);border-color:#c7dccb}
.system-date-popover__nav:focus-visible{outline:0;box-shadow:var(--focus,0 0 0 3px rgba(79,184,82,.2))}
.system-date-popover__weekdays,
.system-date-popover__days{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:.24rem;
}
.system-date-popover__weekdays{margin-bottom:.28rem}
.system-date-popover__weekdays span{
  display:grid;
  place-items:center;
  min-height:25px;
  font-size:.64rem;
  font-weight:800;
  color:var(--muted,#6f7c73);
  text-transform:uppercase;
}
.system-date-popover__day{
  display:grid;
  place-items:center;
  min-width:0;
  height:36px;
  min-height:36px;
  padding:0;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:var(--text,#373435);
  font-size:.78rem;
  font-weight:700;
}
.system-date-popover__day:hover:not(:disabled){background:var(--brand-green-soft,#eef8ef);border-color:#d6e8d9}
.system-date-popover__day.is-outside{color:#a2aca6;font-weight:600}
.system-date-popover__day.is-today{border-color:#b9d8bf;color:var(--primary-dark,#1d6429)}
.system-date-popover__day.is-selected{background:var(--primary,#2f7d37);border-color:var(--primary,#2f7d37);color:#fff}
.system-date-popover__day:disabled{opacity:.34;cursor:not-allowed}
.system-date-popover__day:focus-visible{outline:0;box-shadow:var(--focus,0 0 0 3px rgba(79,184,82,.2))}
.system-date-popover__footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.55rem;
  margin-top:.65rem;
  padding-top:.65rem;
  border-top:1px solid #e5ece7;
}
.system-date-popover__action{
  min-height:34px;
  padding:.42rem .65rem;
  border:1px solid #d5e0d8;
  border-radius:7px;
  background:#fff;
  color:var(--primary-dark,#1d6429);
  font-size:.72rem;
  font-weight:800;
}
.system-date-popover__action:hover{background:var(--brand-green-soft,#eef8ef)}
.system-date-popover__action--primary{background:var(--primary,#2f7d37);border-color:var(--primary,#2f7d37);color:#fff}
.system-date-popover__action--primary:hover{background:var(--primary-dark,#1d6429)}
@media(max-width:480px){
  .system-date-popover{width:calc(100vw - 20px);padding:.65rem}
  .system-date-popover__day{height:38px;min-height:38px}
}
