/* Agenda: calendário, visão diária/semanal */

  /* ================= AGENDA VIEW ================= */
  .content-agenda{ padding: 24px 36px 48px 36px; }

  .agenda-actions{ display:flex; gap:12px; margin-bottom:22px; }
  .btn-pill-outline{
    display:flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--border);
    border-radius: 999px; padding: 11px 18px; font-size:14px; font-weight:700; color: var(--text-dark);
    cursor:pointer; white-space:nowrap;
  }
  .btn-pill-outline:hover{ background:#f7f8f9; }

  .agenda-grid{
    display:grid; grid-template-columns: 260px 1fr; gap:22px; align-items:start;
  }

  .calendar-card{ padding: 16px; }
  .agenda-lateral{ display:flex; flex-direction:column; gap:14px; min-width:0; }
  .btn-bloquear-lateral{ width:100%; justify-content:center; }
  .calendar-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 10px; }
  .calendar-month-label{ font-size:14px; font-weight:700; }
  .calendar-nav{ display:flex; gap:4px; }
  .calendar-nav button{
    width:22px; height:22px; border-radius:7px; border:1px solid var(--border); background:#fff;
    cursor:pointer; display:flex; align-items:center; justify-content:center; color: var(--text-dark);
  }
  .calendar-nav button:hover{ background:#f7f8f9; }

  .calendar-weekdays{
    display:grid; grid-template-columns: repeat(7, 1fr); text-align:center;
    font-size:10.5px; font-weight:600; color: var(--text-muted); margin-bottom:4px;
  }

  .calendar-days{ display:grid; grid-template-columns: repeat(7, 1fr); row-gap:2px; }
  .cal-day{
    position:relative; aspect-ratio: 1/1; display:flex; align-items:center; justify-content:center;
    font-size:12px; font-weight:600; color: var(--text-dark); border-radius:50%; cursor:pointer;
    justify-self:center; width:27px; height:27px;
  }
  .cal-day:hover{ background: var(--bg); }
  .cal-day.empty{ cursor:default; }
  .cal-day.empty:hover{ background:none; }
  .cal-day.today{ box-shadow: inset 0 0 0 1.5px var(--pink); color: var(--pink); }
  .cal-day.selected{ background: var(--pink); color:#fff; box-shadow:none; }
  .cal-day .day-dots{ position:absolute; bottom:2px; display:flex; gap:2px; }
  .cal-day .day-dot{ width:4px; height:4px; border-radius:50%; }

  .calendar-legend{ margin-top:12px; display:flex; flex-direction:column; gap:5px; font-size:11.5px; color: var(--text-dark); }
  .calendar-legend div{ display:flex; align-items:center; gap:8px; }
  .legend-dot{ width:7px; height:7px; border-radius:50%; flex-shrink:0; }
  .legend-today{ background: var(--pink); }
  .legend-appt{ background: var(--yellow); }
  .legend-block{ background: var(--block-red); }

  .schedule-card{ padding: 22px; }
  .schedule-header{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom: 16px; }
  @media (max-width: 560px){
    .schedule-header{ flex-direction:column; align-items:stretch; }
    .schedule-header .btn-agenda-primary{ justify-content:center; }
    .schedule-toolbar{ flex-wrap:wrap; gap:10px; }
  }
  .schedule-date{ font-family:'Playfair Display', serif; font-size:19px; font-weight:700; }
  .schedule-count{ font-size:13.5px; color: var(--text-muted); margin-top:3px; }

  .schedule-toolbar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; flex-wrap:wrap; gap:10px; }
  .view-mode-toggle{ display:flex; background: var(--gray-pill-bg); border-radius:9px; padding:3px; gap:2px; }
  .view-mode-toggle button{
    border:none; background:transparent; padding:7px 14px; border-radius:7px; font-size:12.5px; font-weight:700;
    color: var(--text-muted); cursor:pointer;
  }
  .view-mode-toggle button.active{ background:#fff; color: var(--text-dark); box-shadow:0 1px 3px rgba(0,0,0,.08); }
  .schedule-nav{ display:flex; align-items:center; gap:6px; }
  .schedule-nav button{
    width:28px; height:28px; border-radius:8px; border:1px solid var(--border); background:#fff; cursor:pointer;
    display:flex; align-items:center; justify-content:center; color: var(--text-dark); flex-shrink:0;
  }
  .schedule-nav button:hover{ background:#f7f8f9; }
  .schedule-nav-today{ width:auto !important; padding:0 12px; font-size:12.5px; font-weight:700; }

  .week-scroll{ overflow-x:hidden; }
  .week-grid{ display:flex; width:100%; }
  .week-time-gutter{ width:44px; flex-shrink:0; position:sticky; left:0; background:#fff; z-index:2; }
  .week-time-gutter .time-row{ padding-right:0; }
  .week-time-gutter .time-label{ width:44px; padding:4px 0 0 6px; font-size:11px; box-sizing:border-box; }
  .week-day-col{ flex:1; min-width:0; border-left:1px solid var(--border); position:relative; }
  .week-day-header{
    position:sticky; top:0; background:#fff; z-index:1; text-align:center; padding:10px 4px; border-bottom:1px solid var(--border);
    font-size:11.5px; font-weight:700; color: var(--text-muted);
  }
  .week-day-header .wdh-date{ display:block; font-size:13px; color: var(--text-dark); margin-top:2px; }
  /* Todos os cabeçalhos (inclusive o canto da coluna de horas) com a mesma altura,
     para a grade de horários ficar alinhada entre a coluna das horas e os dias. */
  .week-day-header{ height:52px; box-sizing:border-box; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:0 4px; }
  .week-time-gutter .week-day-header{ border-bottom:1px solid var(--border); }
  .week-time-gutter .week-day-header + .time-row{ border-top:none; }
  .week-day-header.is-today{ color: var(--pink); }
  .week-day-header.is-today .wdh-date{ color: var(--pink); }
  .week-day-rows{ position:relative; }
  .week-day-rows .time-row{ border-top:1px solid var(--border); }
  .week-day-rows .time-row:first-child{ border-top:none; }
  .week-block{
    position:absolute; left:3px; right:3px; border-radius:6px; padding:4px 6px; font-size:10.5px; overflow:hidden; line-height:1.3;
  }
  .week-block.appt{ background: var(--pink-light); border-left:2.5px solid var(--pink); color: var(--sidebar-bg); }
  .week-block.block{ background:#fbe9e4; border-left:2.5px solid var(--block-red); color:#9c3a20; }
  .week-block .wb-title{ font-weight:700; }

  .btn-agenda-primary{
    display:flex; align-items:center; gap:7px; background: var(--pink); color:#fff; border:none;
    padding: 11px 18px; border-radius: 999px; font-size:14px; font-weight:700; cursor:pointer; white-space:nowrap;
  }
  .btn-agenda-primary:hover{ background: var(--sidebar-bg); }

  .schedule-scroll{ max-height: 560px; overflow-y:auto; border:1px solid var(--border); border-radius:10px; }
  .schedule-rows{ position:relative; }
  .time-row{ display:flex; height:44px; border-top:1px solid var(--border); }
  .time-row:first-child{ border-top:none; }
  .time-label{ width:64px; flex-shrink:0; font-size:12px; color: var(--text-muted); padding: 4px 0 0 14px; }
  .time-row.hour .time-label{ color: var(--text-dark); font-weight:600; font-size:13px; }
  .time-line{ flex:1; }

  .schedule-block{
    position:absolute; left:74px; right:10px; border-radius:8px; padding: 6px 10px;
    font-size:12.5px; overflow:hidden; cursor:default;
  }
  .schedule-block.appt{ background: var(--pink-light); border-left: 3px solid var(--pink); color: var(--sidebar-bg); }
  .schedule-block.block{ background:#fbe9e4; border-left:3px solid var(--block-red); color:#9c3a20; }
  .schedule-block .sb-title{ font-weight:700; }
  .schedule-block .sb-time{ opacity:.8; }
