
.agenda-heading .button { white-space:nowrap; }
.agenda-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:18px; margin-bottom:20px; }
.agenda-navigation { display:flex; align-items:center; gap:5px; }
.agenda-chevron-left { transform:rotate(180deg); }
.agenda-toolbar h2 { font-size:20px; font-weight:650; letter-spacing:-.5px; }
.agenda-view-switch { display:flex; gap:3px; padding:4px; border:1px solid var(--border); border-radius:9px; margin-left:auto; background:var(--surface); }
.agenda-view-switch a { font-size:13px; padding:8px 16px; color:var(--muted); border-radius:6px; }
.agenda-view-switch a[aria-current] { background:var(--primary-soft); color:var(--primary); font-weight:600; }
.agenda-calendar { overflow:hidden; }
.agenda-month-weekdays,.agenda-month-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.agenda-month-weekdays { background:var(--surface-soft); border-bottom:1px solid var(--border); }
.agenda-month-weekdays span { padding:14px 6px; text-align:center; font-size:11px; color:var(--muted); font-weight:600; }
.agenda-month-grid { min-height:620px; grid-template-rows:repeat(var(--agenda-weeks),minmax(110px,auto)); }
.agenda-day { min-width:0; border-right:1px solid var(--border); border-bottom:1px solid var(--border); padding:7px; }
.agenda-day:nth-child(7n) { border-right:0; }
.agenda-day.is-outside { background:var(--surface-soft); }
.agenda-day.is-outside .agenda-day-heading { color:var(--muted); }
.agenda-day-heading { display:flex; align-items:center; justify-content:space-between; min-height:30px; margin-bottom:5px; font-size:12px; }
.agenda-day-heading>time { width:28px; height:28px; display:grid; place-items:center; border-radius:50%; }
.agenda-day.is-today .agenda-day-heading>time { background:var(--primary); color:#fff; font-weight:600; }
.agenda-add-day { display:grid; place-items:center; width:25px; height:25px; border:0; border-radius:50%; color:var(--muted); background:none; cursor:pointer; opacity:0; }
.agenda-add-day .icon { width:14px; height:14px; }
.agenda-day:hover .agenda-add-day,.agenda-add-day:focus-visible { opacity:1; }
.agenda-add-day:hover { background:var(--primary-soft); color:var(--primary); }
.agenda-day-events { display:flex; flex-direction:column; gap:5px; }
.agenda-event { display:flex; align-items:center; gap:5px; min-width:0; width:100%; text-align:left; padding:6px; background:var(--primary-soft); color:var(--primary); border:0; border-left:3px solid var(--primary); border-radius:5px; cursor:pointer; font-family:inherit; line-height:1.4; }
.agenda-event time { font-size:10px; flex-shrink:0; font-weight:500; }
.agenda-event strong { font-size:11px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.agenda-event>.icon { width:12px; height:12px; flex-shrink:0; margin-left:auto; }
.agenda-event:hover { filter:brightness(.95); }
.agenda-event:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.agenda-footnote { font-size:11px; color:var(--muted); margin:15px 0; }
.agenda-week-scroll { max-height:680px; overflow:auto; position:relative; }
.agenda-week { min-width:720px; }
.agenda-week-head,.agenda-week-body { display:grid; grid-template-columns:58px repeat(7,minmax(0,1fr)); }
.agenda-week-head { position:sticky; top:0; z-index:5; background:var(--surface); border-bottom:1px solid var(--border); }
.agenda-week-head>div { text-align:center; padding:12px 5px; border-left:1px solid var(--border); }
.agenda-week-head span { font-size:10px; color:var(--muted); }
.agenda-week-head strong { display:block; width:32px; height:32px; line-height:32px; margin:3px auto 0; border-radius:50%; font-size:17px; font-weight:500; }
.agenda-week-head .is-today strong { background:var(--primary); color:white; }
.agenda-zone { align-self:end; text-align:center; padding-bottom:12px; }
.agenda-week-body { height:1152px; position:relative; }
.agenda-week-hours { display:grid; grid-template-rows:repeat(24,48px); color:var(--muted); font-size:10px; text-align:right; background:var(--surface); }
.agenda-week-hours>span { padding:3px 8px 0 0; }
.agenda-week-day { position:relative; border-left:1px solid var(--border); background:repeating-linear-gradient(to bottom,transparent 0,transparent 47px,var(--border) 47px,var(--border) 48px); }
.agenda-week-day.is-today { background-color:var(--primary-soft); }
.agenda-week-slot { position:absolute; width:100%; height:48px; border:0; background:transparent; cursor:pointer; left:0; }
.agenda-week-slot:hover { background:var(--primary-soft); }
.agenda-week-slot:focus-visible { outline:2px solid var(--primary); outline-offset:-2px; }
.agenda-week-event { position:absolute; top:var(--event-top); left:var(--event-left); width:calc(var(--event-width) - 3px); height:var(--event-height); min-height:18px; z-index:2; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; overflow:hidden; padding:5px; background:var(--surface); box-shadow:inset 0 0 0 1000px var(--primary-soft); border:1px solid var(--primary); border-left-width:3px; }
.agenda-week-event strong { max-width:100%; font-size:11px; }
.agenda-week-event>.icon { position:absolute; right:4px; bottom:4px; }
.agenda-dialog { width:600px; }
.agenda-dialog [hidden] { display:none!important; }
.agenda-dialog-status { margin:0 0 12px; font-size:13px; color:var(--muted); }
.agenda-dialog-status:empty { display:none; }
.agenda-dialog-status.is-error { color:var(--danger); }
.agenda-view-date { font-size:15px; font-weight:600; line-height:1.6; }
.agenda-dialog .muted { font-size:11px; margin-top:4px; }
.agenda-view-client { font-size:13px; margin:20px 0; padding:12px 14px; border-radius:8px; background:var(--surface-soft); }
.agenda-description { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.8; margin:22px 0; }
.agenda-section-label { font-size:12px; margin:20px 0 10px; }
.agenda-view-people { display:flex; flex-wrap:wrap; gap:10px; }
.agenda-person { display:flex; align-items:center; gap:7px; font-size:12px; }
.agenda-avatar { width:28px; height:28px; border-radius:50%; background:var(--primary-soft); color:var(--primary); display:inline-flex; align-items:center; justify-content:center; object-fit:cover; font-size:10px; font-weight:600; flex-shrink:0; }
.agenda-reminder-label { color:var(--muted); font-size:12px; margin:22px 0 8px; }
.agenda-created-by { margin-top:12px; }
.agenda-view-actions .danger { margin-right:auto; }
.agenda-timezone { margin:-6px 0 18px; }
.agenda-participants { border:0; margin:0 0 20px; padding:0; min-width:0; }
.agenda-participants legend { font-size:13px; font-weight:600; margin-bottom:10px; }
[data-agenda-members] { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:8px; border-radius:8px; background:var(--surface-soft); max-height:180px; overflow:auto; }
.agenda-member-option { display:flex; align-items:center; gap:8px; font-size:12px!important; margin:0!important; padding:8px 5px; cursor:pointer; min-width:0; }
.agenda-member-option>input { flex:0 0 16px; width:16px; height:16px; }
.agenda-member-option>span:last-child { min-width:0; overflow-wrap:anywhere; }
.agenda-alert-stack { position:fixed; bottom:22px; right:22px; display:flex; flex-direction:column; gap:12px; width:min(370px,calc(100vw - 32px)); z-index:1000; pointer-events:none; }
.agenda-alert { pointer-events:auto; background:var(--surface); color:var(--text); border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:12px; box-shadow:0 10px 40px #001b4229; padding:15px 17px; }
.agenda-alert-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.agenda-alert-kicker { font-size:10px; color:var(--primary); font-weight:600; }
.agenda-alert-heading .icon-button { width:24px; height:24px; font-size:23px; }
.agenda-alert-title { display:block; font-size:14px; line-height:1.5; margin:6px 0; overflow-wrap:anywhere; }
.agenda-alert p { font-size:11px; color:var(--muted); margin:5px 0 12px; }
.agenda-alert .text-button { font-size:12px; color:var(--primary); }
@media(hover:none) { .agenda-add-day { opacity:1; } }
@media(max-width:760px) {
  .agenda-toolbar { gap:10px; }
  .agenda-toolbar h2 { font-size:17px; order:-1; flex-basis:100%; }
  .agenda-toolbar .button { min-height:36px; padding:6px 11px; }
  .agenda-view-switch a { padding:6px 10px; font-size:12px; }
  .agenda-calendar { overflow-x:auto; }
  .agenda-month-weekdays,.agenda-month-grid { min-width:650px; }
  .agenda-month-grid { min-height:560px; }
  .agenda-dialog { padding:22px 18px; }
  .agenda-dialog .form-grid { grid-template-columns:1fr; gap:0; }
  [data-agenda-members] { grid-template-columns:1fr; }
  .agenda-view-actions { flex-wrap:wrap; }
  .agenda-view-actions .button { font-size:12px; padding:9px 12px; }
  .agenda-alert-stack { bottom:16px; right:16px; }
}

.agenda-alert-stack { max-height:calc(100dvh - 32px); overflow-y:auto; overscroll-behavior:contain; }

.agenda-description { white-space:normal; }
.agenda-description p,.agenda-description div { margin:0 0 10px; }
.agenda-description a { color:var(--primary); text-decoration:underline; overflow-wrap:anywhere; }
.agenda-description-field { margin-bottom:20px; }
.agenda-field-label { display:block; margin-bottom:8px; font-size:13px; font-weight:600; }
.agenda-description-editor { border:1px solid var(--border); border-radius:9px; overflow:hidden; }
.agenda-format-tools { display:flex; align-items:center; gap:4px; padding:7px 10px; background:var(--surface-soft); border-bottom:1px solid var(--border); }
.agenda-format-tools>button { border:0; background:none; color:var(--text); border-radius:5px; width:32px; height:30px; cursor:pointer; }
.agenda-format-tools>button:hover { background:var(--primary-soft); color:var(--primary); }
.agenda-format-tools .icon { width:16px; height:16px; }
.agenda-description-input { min-height:115px; padding:14px; font-size:13px; line-height:1.8; outline:none; overflow-wrap:anywhere; }
.agenda-description-input:empty::before { content:attr(data-placeholder); color:var(--muted); pointer-events:none; }
.agenda-description-input a { color:var(--primary); text-decoration:underline; }
.agenda-reminder-control { display:flex; align-items:center; gap:10px; }
.agenda-reminder-control>.icon,.agenda-reminder-label>.icon { color:var(--muted); width:18px; height:18px; flex-shrink:0; }
.agenda-reminder-label { display:flex; align-items:center; gap:8px; }
.agenda-people-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 0 0; margin-top:22px; border-top:1px solid var(--border); font-size:12px; }
.agenda-people-actions { display:flex; align-items:center; gap:8px; min-width:0; }
.agenda-people-actions>.avatar-stack { flex-wrap:wrap; justify-content:flex-end; }
.agenda-people-actions .agenda-avatar { border:2px solid var(--surface); margin-left:-7px; width:31px; height:31px; }
.agenda-guest-picker { position:relative; flex-shrink:0; }
.agenda-guest-picker>summary { list-style:none; cursor:pointer; }
.agenda-guest-picker>summary::-webkit-details-marker { display:none; }
.agenda-guest-popover { position:absolute; right:0; bottom:calc(100% + 10px); width:300px; max-width:calc(100vw - 65px); background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:12px; box-shadow:0 10px 35px #001b4220; z-index:8; }
.agenda-guest-popover [data-agenda-members] { display:flex; flex-direction:column; max-height:220px; padding:0; background:transparent; }
.agenda-guest-popover .field-hint { margin:10px 0; }
.agenda-guest-popover>.button,.agenda-guest-popover>.text-button { width:100%; font-size:12px; }
.agenda-day { position:relative; }
.agenda-day-target { position:absolute; inset:0; width:100%; height:100%; background:none; border:0; cursor:pointer; }
.agenda-day-target:hover { background:var(--primary-soft); opacity:.35; }
.agenda-day-target:focus-visible { outline:2px solid var(--primary); outline-offset:-3px; }
.agenda-day-heading,.agenda-day-events { position:relative; pointer-events:none; }
.agenda-day-events>.agenda-event { pointer-events:auto; }
.agenda-alert[data-pending-dismiss] { opacity:.7; }
.agenda-alert-error { color:var(--danger)!important; font-size:11px; }


/* Mover e ajustar eventos sem alterar o calendário até o servidor confirmar. */
.agenda-event[data-agenda-editable="true"]{cursor:grab;touch-action:none}
body.is-agenda-dragging,body.is-agenda-dragging *{cursor:grabbing!important;user-select:none!important}
.agenda-event.is-drag-source{opacity:.3}
.agenda-resize-handle{position:absolute;left:5px;right:5px;height:6px;z-index:4;cursor:ns-resize;touch-action:none}
.agenda-resize-handle.is-start{top:0}
.agenda-resize-handle.is-end{bottom:0}
.agenda-resize-handle:after{content:"";position:absolute;width:20px;max-width:70%;height:2px;border-radius:3px;background:currentColor;opacity:.45;left:50%;top:2px;transform:translateX(-50%)}
.agenda-event:hover .agenda-resize-handle:after,.agenda-event:focus-visible .agenda-resize-handle:after{opacity:1}
.agenda-drag-ghost{position:absolute;pointer-events:none;z-index:3;left:3px;right:3px;padding:4px 6px;min-height:12px;border:1px solid var(--primary);border-radius:6px;background:var(--primary-soft);color:var(--text);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.agenda-day .agenda-drag-ghost{bottom:6px}
.agenda-day.is-drop-target{box-shadow:inset 0 0 0 2px var(--primary)}
.agenda-drag-feedback{position:fixed;pointer-events:none;z-index:1000;padding:8px 12px;max-width:calc(100vw - 16px);border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);box-shadow:0 8px 28px #001b3d26;font-size:12px}
.agenda-drag-feedback.is-invalid{color:var(--danger)}
[data-agenda-calendar][aria-busy="true"]{opacity:.65}

.agenda-day.is-weekend,.agenda-week-head>.is-weekend,.agenda-month-weekdays>span:first-child,.agenda-month-weekdays>span:last-child{background:var(--calendar-weekend)}
.agenda-week-day.is-weekend{background-color:var(--calendar-weekend)}
