/* Grade do profissional: refinamento visual isolado, sem alterar regras ou eventos. */
.ag-grade-tools{
  position:sticky;
  top:0;
  z-index:44;
  grid-template-columns:minmax(240px,1.45fr) minmax(210px,1fr) auto auto;
  gap:10px;
  align-items:end;
  margin:0 0 12px;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:rgba(248,250,252,.97);
  box-shadow:0 6px 18px rgba(15,23,42,.07);
  backdrop-filter:blur(8px);
}
.ag-grade-tools select{min-height:42px;background:#fff;border-color:#d7e0ea}
.ag-grade-tools .ag-mini{min-height:42px;padding:8px 13px}

#ag-print-grade .ag-room-card{
  overflow:visible;
  border:1px solid #dce5ef;
  border-radius:14px;
  box-shadow:0 4px 14px rgba(15,23,42,.055);
  background:#fff;
}
#ag-print-grade .ag-room-title{
  border-radius:13px 13px 0 0;
  padding:10px 14px;
  background:#7a1f45;
  font-size:13px;
  letter-spacing:.01em;
}
#ag-print-grade .ag-grid-wrap{
  max-height:calc(100vh - 265px);
  min-height:280px;
  overflow:auto;
  border-radius:0 0 13px 13px;
  background:#fff;
}
#ag-print-grade .ag-week-grid{border-collapse:separate;border-spacing:0;table-layout:fixed}
#ag-print-grade .ag-week-grid th,
#ag-print-grade .ag-week-grid td{border:0;border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0}
#ag-print-grade .ag-week-grid tr>*:last-child{border-right:0}
#ag-print-grade .ag-week-grid tbody tr:last-child>*{border-bottom:0}
#ag-print-grade .ag-week-grid thead th{
  position:sticky;
  top:0;
  z-index:8;
  padding:10px 8px;
  background:#f3f6fa;
  color:#334155;
  border-bottom:1px solid #d7e0ea;
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.045em;
  box-shadow:0 1px 0 rgba(15,23,42,.04);
}
#ag-print-grade .ag-week-grid thead th.hour{
  left:0;
  z-index:10;
  width:72px;
  background:#eef2f7;
  color:#64748b;
}
#ag-print-grade .ag-hour{
  position:sticky;
  left:0;
  z-index:6;
  width:72px;
  min-width:72px;
  padding:0 7px!important;
  vertical-align:middle!important;
  background:#f8fafc!important;
  color:#334155!important;
  border-right:1px solid #d7e0ea!important;
  font-size:11.5px!important;
  font-variant-numeric:tabular-nums;
}
#ag-print-grade .ag-cell{
  min-height:54px;
  padding:6px;
  background:#fff;
  transition:background .15s ease,box-shadow .15s ease;
}
#ag-print-grade .ag-cell:hover:not(:disabled){background:#f2f7ff;box-shadow:inset 0 0 0 2px #9bb9e8}
#ag-print-grade .ag-cell.occupied{background:#fff}
#ag-print-grade .ag-cell.outside{display:grid;place-items:center;background:#f8fafc;color:#c2cad5;box-shadow:none}
#ag-print-grade .ag-plus{display:grid;place-items:center;min-height:40px;color:#73a08a;font-size:20px;font-weight:600}
#ag-print-grade .ag-cell-patient{
  padding:7px 8px;
  border:1px solid #eadde4;
  border-radius:8px;
  background:#fff8fb;
  line-height:1.25;
}
#ag-print-grade .ag-cell-patient b{display:block;color:#1e293b;font-size:11.5px;line-height:1.25}
#ag-print-grade .ag-cell-patient small{margin-top:3px;color:#64748b;font-size:10px}
#ag-print-grade .ag-cell-patient+.ag-cell-patient{margin-top:5px;padding-top:7px;border-top:1px solid #eadde4}
#ag-print-grade+.ag-info{
  margin:10px 2px 0;
  padding:9px 12px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#fff;
}

@media(max-width:1000px){
  .ag-grade-tools{position:static;grid-template-columns:1fr 1fr}
  #ag-print-grade .ag-grid-wrap{max-height:none}
  #ag-print-grade .ag-week-grid{min-width:780px}
}
@media(max-width:650px){
  .ag-grade-tools{grid-template-columns:1fr;padding:10px}
  .ag-grade-tools .ag-mini{width:100%}
  #ag-print-grade .ag-hour{width:64px;min-width:64px}
  #ag-print-grade .ag-week-grid thead th.hour{width:64px}
}
