.crm-calendar{max-width:760px;margin:12px 0}
.crm-calendar-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.crm-calendar-header strong{text-transform:capitalize}
.crm-calendar-header button,.crm-calendar-grid button{border:1px solid var(--line);background:var(--panel);color:inherit;border-radius:7px;padding:6px;cursor:pointer}
.crm-calendar-header button{min-width:38px;font-size:1.25rem}
.crm-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.crm-calendar-grid button{display:grid;justify-items:center;align-content:center;gap:1px;min-height:44px}
.crm-calendar-grid button[aria-pressed=true]{border-color:var(--gold);box-shadow:inset 0 0 0 1px var(--gold)}
.crm-calendar-grid button[aria-current=date]>span{color:var(--gold);font-weight:700}
.crm-calendar-grid small{font-size:.75rem;color:var(--muted)}
.crm-weekday{font-size:.75rem;text-align:center;color:var(--muted)}
.crm-month-agenda{margin:16px 0}
.crm-month-agenda h2{margin:0 0 8px}
.crm-month-agenda ul{list-style:none;padding:0;margin:0}
.crm-month-agenda li{border-top:1px solid var(--line)}
.crm-month-agenda button{background:transparent;border:0;color:inherit;font:inherit;text-align:left;min-height:44px;cursor:pointer}
.crm-month-agenda li button{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 10px;width:100%;padding:7px 4px}
.crm-month-agenda button[aria-pressed=true]{color:var(--gold)}
.crm-month-agenda li span{overflow-wrap:anywhere}
.crm-month-agenda small{color:var(--muted)}
.crm-unscheduled summary{padding:10px 0;cursor:pointer}

.crm-calendar-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; }
.crm-calendar-layout .crm-calendar { margin:0; }
@media(max-width:760px){ .crm-calendar-layout { grid-template-columns:minmax(0,1fr); gap:8px; } }

.crm-calendar { max-width:none; }
.crm-calendar-layout { grid-template-columns:minmax(0,2fr) minmax(0,1fr); }
.crm-calendar-grid button { justify-items:stretch; align-content:start; min-height:88px; min-width:0; text-align:left; }
.crm-day-heading { display:flex; align-items:center; justify-content:space-between; gap:2px; }
.crm-day-heading small { border-radius:10px; padding:1px 5px; color:#fff; background:#385e50; font-weight:700; }
.crm-day-event { display:grid; min-width:0; padding:3px 4px; border-left:3px solid #546170; border-radius:4px; background:#edf1f5; color:#1b2b37; font-size:.72rem; line-height:1.25; }
.crm-day-event[data-kind=meetings] { border-color:#743f99; background:#f2eafa; }
.crm-day-event[data-kind=visits] { border-color:#2b7250; background:#e4f4eb; }
.crm-day-event[data-kind=calls] { border-color:#2d628d; background:#e5f0f9; }
.crm-day-event[data-kind=followup] { border-color:#a05e0b; background:#fff1d8; }
.crm-event-meta,.crm-event-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.crm-event-title { font-weight:700; }
.crm-month-agenda li .crm-day-event { flex:1 1 130px; }
.crm-month-mobile-agenda { display:none; }
.crm-week-navigation { display:flex; justify-content:space-between; gap:8px; margin:0 0 12px; }
.crm-week-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; }
.crm-week-days>section { min-width:0; padding:8px; }
.crm-week-days h2 { font-size:.9rem; }
.crm-week-days .crm-event { display:block; overflow-wrap:anywhere; }
@media(max-width:1000px) {
  .crm-calendar-layout { grid-template-columns:minmax(0,1fr); }
  .crm-week-days { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:620px) {
  .crm-calendar-grid button { min-height:44px; padding:4px; }
  .crm-day-heading { flex-wrap:wrap; justify-content:center; }
  .crm-calendar-grid .crm-day-event,.crm-day-extra { display:none; }
  .crm-month-mobile-agenda { display:block; }
}
