/* Calendar stays independent; the optional Manager overlay lives in the toolbar. */
.mc-manager-controls { display:flex; align-items:center; gap:8px; flex:none; }
.mc-manager-controls>.mgr-switch { position:relative; font-size:11.5px; font-weight:500; color:#667086; white-space:nowrap; }
.mc-manager-controls .mgr-switch-track { transform:scale(.88); transform-origin:center; }
.mc-channel-menu { position:relative; }
.mc-channel-menu>summary { display:flex; align-items:center; gap:5px; min-height:35px; padding:0 9px; list-style:none; border:1px solid #e1e5ee; border-radius:9px; background:#fff; color:#69738a; font-size:11px; cursor:pointer; white-space:nowrap; }
.mc-channel-menu>summary::-webkit-details-marker { display:none; }
.mc-channel-menu>summary svg { width:15px; height:15px; flex:none; }
.mc-channel-menu[open]>summary { border-color:#bba4df; color:#7544c5; }
.mc-source-filters { position:absolute; z-index:35; right:0; top:42px; width:190px; display:grid; gap:3px; padding:8px; border:1px solid #e1e5ee; border-radius:12px; background:white; box-shadow:0 10px 32px #26324622; }
.mc-source-filters button { --tone:#657087; --soft:#e3e7ef; display:flex; align-items:center; gap:8px; min-height:33px; padding:5px 9px; border:1px solid transparent; border-radius:8px; background:transparent; color:#6b768a; font-size:11.5px; white-space:nowrap; }
.mc-source-filters button::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--tone); }
.mc-source-filters button[data-calendar-source=whatsapp] { --tone:#1f9c65; --soft:#e1f3e9; }
.mc-source-filters button[data-calendar-source=calls] { --tone:#7052d3; --soft:#ece8f9; }
.mc-source-filters button[data-calendar-source=followapp] { --tone:#2189a9; --soft:#e1f1f5; }
.mc-source-filters button[data-calendar-source=meet] { --tone:#cc842c; --soft:#f7eddd; }
.mc-source-filters button.active { background:var(--soft); color:var(--tone); border-color:#ffffffaa; }
.mc-source-filters button:disabled { opacity:.4; cursor:default!important; }
.mc-source-filters small { margin-left:auto; color:var(--tone); min-width:17px; padding:2px 3px; text-align:center; border-radius:5px; background:#ffffffa8; font-size:10px; }
.mc-manager-refresh { border:0; border-radius:8px; width:27px; height:32px; background:transparent; color:#9174bf; font-size:21px; }
.mc-manager-note { display:inline-flex; gap:5px; color:#8b95a6; font-size:10.5px; }
.mc-manager-note:has(#cal-manager-status:empty) { display:none; }
#cal-manager-retry { font-size:11px; border:0; color:#8050ce; background:transparent; text-decoration:underline; }
#calendario-section .mc-options-panel .ag-toggle { margin:0 0 17px; }
#calendario-section .mc-options-panel .mc-legend { display:grid; gap:7px; margin-top:14px; font-size:10.5px; }
#calendario-section .mc-event.mc-manager { cursor:pointer; background:var(--tint); border-left-width:3px; }
.mc-source-whatsapp { --event:#1f9c65; --tint:#e1f3e9; --text:#196844; }
.mc-source-calls { --event:#7052d3; --tint:#ece8f9; --text:#5941a4; }
.mc-source-followapp { --event:#2189a9; --tint:#e1f1f5; --text:#196783; }
.mc-source-meet { --event:#cc842c; --tint:#f7eddd; --text:#946020; }
.mc-source-calls.mc-outbound { --event:#3787d4; --tint:#e3effb; --text:#23679e; }
.mgr-calendar-highlight { outline:2px solid #9f7bdf; outline-offset:3px; transition:outline .3s; }
@media(max-width:680px) {
 .mc-manager-controls { order:3; width:100%; justify-content:flex-end; gap:6px; }
 .mc-manager-controls>.mgr-switch { margin-right:auto; font-size:11px; }
 .mc-channel-menu>summary { min-height:29px; }
 .mc-source-filters { top:34px; }
 .mc-manager-note { font-size:9px; }
}
#dashboard-content.calendar-full {
    width:100%; max-width:none; margin:0; padding:22px 26px 12px; box-sizing:border-box;
}
#calendario-section { --mc-ink:#263246; --mc-muted:#728096; --mc-line:#e5eaf2; --mc-purple:#7444dc; min-width:0; color:var(--mc-ink); }
#calendario-section button, #calendario-section select { font-family:inherit; }
#calendario-section button { cursor:pointer; box-sizing:border-box; }
#calendario-section button:focus-visible, #calendario-section select:focus-visible, #calendario-section summary:focus-visible, #calendario-section .mc-slot:focus-visible { outline:2px solid #8852e6; outline-offset:-2px; }
.mc-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.mc-heading { display:flex; align-items:center; gap:10px; flex:none; }
.mc-heading h1 { font-size:21px; font-weight:650; letter-spacing:-.7px; margin:0; }
.mc-brand-icon { width:37px; height:37px; display:grid; place-items:center; border-radius:12px; color:#7740dc; background:#eee7fb; }
.mc-brand-icon svg { width:22px; height:22px; }
.mc-navigation { display:flex; gap:5px; align-items:center; flex:1; min-width:300px; }
#calendario-section .mc-button, #calendario-section .mc-view-select, #calendario-section .mc-options>summary {
    height:39px; border:1px solid #dce2ed; border-radius:10px; background:#fff; color:#3b4659; font-size:13px; padding:0 16px; font-weight:550; box-shadow:none;
}
#calendario-section .mc-button:hover, #calendario-section .mc-options>summary:hover { background:#f2eefb; }
#calendario-section .mc-icon-button { width:34px; height:36px; padding:0; display:grid; place-items:center; border:0; border-radius:50%; background:transparent; color:#627086; }
#calendario-section .mc-icon-button:hover { background:#ebe5f8; color:#6d36cc; }
.mc-icon-button svg { width:19px; height:19px; }
.mc-date-jump { position:relative; display:flex; align-items:center; gap:7px; padding:5px 8px; cursor:pointer; min-width:0; }
#cal-range-label { font-size:21px; font-weight:500; letter-spacing:-.4px; white-space:nowrap; }
.mc-date-jump svg { width:16px; height:16px; color:#8490a2; }
#cal-go-date { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.mc-date-jump:focus-within { outline:2px solid #8852e6; border-radius:8px; }
.mc-actions { display:flex; align-items:center; gap:9px; margin-left:auto; }
#calendario-section .mc-view-select { width:auto; min-width:105px; padding:0 27px 0 13px; cursor:pointer; }
#calendario-section .mc-create { display:flex; align-items:center; justify-content:center; gap:7px; border-color:#7540d6; background:#7540d6; color:#fff; box-shadow:0 2px 4px #6535b523; }
#calendario-section .mc-create:hover { background:#6634c4; }
.mc-create svg { width:18px; height:18px; }
.mc-options { position:relative; }
#calendario-section .mc-options>summary { display:grid; place-items:center; width:39px; padding:0; list-style:none; cursor:pointer; }
.mc-options>summary::-webkit-details-marker { display:none; }
.mc-options>summary svg { width:19px; height:19px; }
.mc-options-panel { position:absolute; right:0; top:46px; z-index:30; width:255px; padding:18px; border:1px solid #e3e5ed; border-radius:14px; background:#fff; box-shadow:0 10px 40px #26324620; }
.mc-options-panel strong { display:block; margin-bottom:10px; font-size:13px; }
.mc-options-panel p { font-size:12px; line-height:1.5; color:#728096; margin:12px 0 0; }
.mc-hour-setting { display:flex; gap:10px; align-items:center; justify-content:space-between; font-size:13px; margin-top:9px; }
.mc-hour-setting[hidden] { display:none; }
.mc-hour-setting select { width:94px; height:35px; border:1px solid #dce2ed; border-radius:8px; padding:5px 8px; background:#fff; }
.mc-subbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin:0 2px 14px; }
#calendario-section .mc-legend { display:flex; align-items:center; gap:18px; color:#748094; font-size:11.5px; }
.mc-legend>span { display:inline-flex; gap:6px; align-items:center; }
.mc-legend>span[hidden] { display:none; }
.mc-legend i { width:8px; height:8px; border-radius:3px; background:#8453df; }
.mc-legend i.mc-personal-dot { border:1.5px solid #a182d8; background:#f2edfa; }
.mc-legend i.mc-bookable-dot { background:#ede5fb; }
#calendario-section .ag-toggle { font-size:11.5px; font-weight:500; color:#748094; gap:8px; margin:0; }
#calendario-section .cal-wrap { width:100%; min-height:240px; max-height:none; margin:0; padding:0; border:1px solid var(--mc-line); border-radius:16px; background:#fff; box-shadow:none; overflow:auto; overscroll-behavior:contain; scroll-snap-type:none; scrollbar-width:thin; scrollbar-color:#d2d9e5 transparent; cursor:default; }
#calendario-section #cal-grid { min-width:0; width:100%; display:grid; align-items:start; }
#calendario-section .mc-view-week { min-width:630px!important; }
.mc-corner, .mc-day-head { position:sticky; top:0; height:85px; z-index:6; background:#fff; border:0; border-bottom:1px solid var(--mc-line); }
.mc-corner { left:0; z-index:8; display:flex; align-items:flex-end; justify-content:center; padding:0 0 12px; color:#8692a6; font-size:10px; }
.mc-day-head { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; color:#68758b; padding:8px; font-size:11px; text-transform:uppercase; letter-spacing:.8px; width:100%; }
.mc-day-head b { font-size:27px; font-weight:450; letter-spacing:-1px; width:42px; height:42px; display:grid; place-items:center; border-radius:50%; color:#3c485e; }
.mc-day-head.mc-today { color:#7341d0; }
.mc-day-head.mc-today b { background:#7946dc; color:#fff; }
.mc-day-head:hover b { box-shadow:0 0 0 4px #8852e614; }
.mc-hours { position:sticky; left:0; z-index:5; background:#fff; border-right:1px solid var(--mc-line); }
.mc-hour { height:64px; box-sizing:border-box; padding:7px 9px 0 0; text-align:right; color:#8b96a9; font-size:10.5px; font-variant-numeric:tabular-nums; }
.mc-day { position:relative; border-right:1px solid var(--mc-line); }
.mc-day:last-child { border-right:none; }
.mc-slot { height:32px; box-sizing:border-box; border-bottom:1px solid #f5f6f9; cursor:crosshair; }
.mc-slot:nth-child(even) { border-bottom:1px solid var(--mc-line); }
.mc-slot.mc-bookable { background:#faf8ff; }
.mc-slot:hover, .mc-slot.mc-drop { background:#eee8fb; }
.mc-event, .mc-chip { --event:#7950d5; --tint:#f0e9fc; --text:#593790; }
.mc-blue { --event:#168cc2; --tint:#e4f3fb; --text:#236180; }
.mc-green { --event:#28967c; --tint:#e4f4ee; --text:#206853; }
.mc-amber { --event:#bb7417; --tint:#fff2dc; --text:#805621; }
.mc-pink { --event:#cd5794; --tint:#fbeaf3; --text:#963d6c; }
.mc-gray { --event:#74839a; --tint:#eef1f6; --text:#596579; }
#calendario-section .mc-event { position:absolute; z-index:2; display:flex; flex-direction:column; text-align:left; gap:3px; border:1px solid #ffffffb0; border-left:3px solid var(--event); border-radius:7px; padding:7px 9px; background:var(--tint); color:var(--text); overflow:hidden; cursor:grab; box-sizing:border-box; min-width:0; transition:box-shadow .15s; }
.mc-event.managed { background:var(--event)!important; color:#fff!important; border-left-color:transparent!important; }
.mc-event b { font-size:12px; font-weight:650; line-height:1.25; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.mc-event>span { font-size:10.5px; line-height:1.3; opacity:.85; font-variant-numeric:tabular-nums; }
#calendario-section .mc-event.mc-short { padding:1px 6px; gap:0; flex-direction:row; align-items:center; }
.mc-event.mc-short b { -webkit-line-clamp:1; }
.mc-event.mc-short>span { display:none; }
.mc-event:hover { z-index:4!important; box-shadow:0 3px 12px #2a365124; }
.mc-event.mc-dragging { opacity:.4; }
.mc-event.cancelled, .mc-chip.cancelled { opacity:.55; text-decoration:line-through; }
.mc-now { position:absolute; left:0; right:0; height:2px; background:#e26268; z-index:4; pointer-events:none; }
.mc-now::before { content:''; position:absolute; width:8px; height:8px; top:-3px; left:-4px; background:#e26268; border-radius:50%; }
.mc-now[hidden] { display:none; }
.mc-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 2px 0; color:#8893a5; font-size:11px; }
.mc-month-head { position:sticky; top:0; z-index:6; background:#fff; padding:14px 0; text-align:center; font-size:11px; text-transform:uppercase; color:#7b879b; border-bottom:1px solid var(--mc-line); }
.mc-month-day { box-sizing:border-box; min-height:105px; height:calc(var(--mc-month-space,650px) / var(--mc-month-rows,5)); border-right:1px solid var(--mc-line); border-bottom:1px solid var(--mc-line); padding:6px; cursor:pointer; min-width:0; }
.mc-month-day.mc-out { background:#fafbfd; }
.mc-month-number { display:block; border:0; width:29px; height:29px; margin:0 auto 4px; background:transparent; border-radius:50%; font-size:12px; color:#5e6b7f; }
.mc-out .mc-month-number { color:#b1b9c7; }
.mc-today>.mc-month-number { background:#7946dc; color:#fff; }
.mc-chip { display:flex; width:100%; gap:5px; text-align:left; align-items:center; border:0; border-radius:4px; padding:4px 5px; margin:2px 0; color:var(--text); background:var(--tint); font-size:11px; }
.mc-chip.managed { background:var(--event); color:#fff; }
.mc-chip span { flex:none; opacity:.85; font-size:10px; }
.mc-chip b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:550; }
.mc-more { border:0; background:transparent; color:#7a54b6; font-size:10.5px; padding:4px; }
#ev-modal { background:#24324b40; backdrop-filter:blur(3px); }
#ev-modal .ws-modal { width:min(100%,520px); max-width:520px; padding:24px 28px; border:1px solid #e5e7ef; border-radius:20px; box-shadow:0 24px 80px #182c4930; max-height:90dvh; overflow:auto; }
.mc-editor-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
#ev-modal .ws-modal-title { margin:0; font-size:16px; color:#52617b; font-weight:600; }
.mc-editor-close { display:grid; place-items:center; width:32px; height:32px; border:0; border-radius:50%; background:#f3f4f8; color:#758097; font-size:22px; cursor:pointer; }
#ev-modal label { font-size:12px; font-weight:500; color:#718098; margin:16px 0 7px; }
#ev-modal input, #ev-modal select, #ev-modal textarea { border:1px solid #e2e7ef; border-radius:10px; background:#f8f9fc; padding:10px 12px; color:#354158; min-height:40px; font-family:inherit; }
#ev-modal #ev-title { font-size:23px; letter-spacing:-.5px; font-weight:550; padding:10px 0; border:0; border-bottom:2px solid #ede6f7; border-radius:0; background:transparent; }
#ev-modal input:focus, #ev-modal textarea:focus, #ev-modal select:focus { outline:2px solid #8954e040; border-color:#ad8bdc; }
#ev-modal .ws-colors { gap:9px; margin-top:9px; }
#ev-modal .ws-color { width:23px; height:23px; border-radius:50%; }
#ev-modal .ws-color.sel { outline:2px solid #9767e5; outline-offset:3px; }
#ev-modal .ws-modal-actions { margin-top:24px; padding-top:18px; border-top:1px solid #edf0f5; }
#ev-modal .ws-modal-actions .btn { border-radius:9px; font-size:13px; min-height:39px; }
@media (max-width:1200px) { .mc-toolbar { gap:12px; } .mc-heading h1 { font-size:20px; } #cal-range-label { font-size:18px; } .mc-navigation { min-width:270px; } }
@media (max-width:1000px) and (min-width:681px) { .mc-heading { width:auto; } .mc-toolbar { gap:10px; } #dashboard-content.calendar-full { padding:18px 16px 12px; } }
@media (max-width:680px) {
    #dashboard-content.calendar-full { padding:8px 10px 12px; width:100%; }
    .mc-toolbar { gap:10px 6px; margin-bottom:10px; }
    .mc-heading { flex:1; order:0; }
    .mc-heading h1 { font-size:19px; }
    .mc-brand-icon { display:none; }
    .mc-actions { order:1; gap:6px; }
    .mc-navigation { order:2; flex:1 0 100%; min-width:0; gap:3px; }
    #calendario-section .mc-button { padding:0 11px; height:35px; }
    #calendario-section .mc-view-select { width:112px; min-width:112px; height:35px; font-size:12px; font-weight:500; padding-left:9px; }
    #calendario-section .mc-options>summary { width:34px; height:35px; }
    #calendario-section .mc-create { width:35px; min-width:35px; padding:0; }
    .mc-create span { display:none; }
    #cal-range-label { font-size:18px; }
    .mc-date-jump { margin-left:auto; padding-right:0; }
    .mc-subbar { gap:9px; margin-bottom:10px; }
    #calendario-section .mc-legend { font-size:10px; gap:9px; }
    #cal-booking-legend { display:none!important; }
    #calendario-section .ag-toggle { font-size:10px; margin-left:auto; }
    #calendario-section .ag-toggle .mgr-switch-track { transform:scale(.85); transform-origin:right; }
    #calendario-section .cal-wrap { border-radius:12px; min-height:240px; }
    #calendario-section .mc-view-week { min-width:820px!important; }
    .mc-corner,.mc-day-head { height:67px; }
    .mc-day-head { gap:0; padding:4px; }
    .mc-day-head b { font-size:24px; height:35px; width:35px; }
    .mc-event b { font-size:13px; }
    .mc-event>span { font-size:11px; }
    .mc-footer { font-size:10px; padding-top:8px; }
    .mc-footer .mc-hint { display:none; }
    .mc-month-day { padding:3px 1px; min-height:100px; height:100px; }
    .mc-chip { padding:3px; font-size:10px; }
    .mc-chip span { display:none; }
    #ev-modal { padding:10px!important; align-items:center!important; }
    #ev-modal .ws-modal { padding:18px; border-radius:18px!important; max-height:85dvh!important; }
    #ev-modal .ws-modal::before { display:none; }
    #ev-modal label { margin:10px 0 4px; }
    #ev-modal textarea { min-height:72px; }
    #ev-modal .ws-modal-actions { display:flex; position:sticky; bottom:-18px; background:#fff; margin-top:15px; padding:12px 0; }
    #ev-modal .ws-modal-actions .btn { width:auto; padding:8px 12px; }
    #ev-modal .ws-modal-actions .ws-spacer { display:block; flex:1; }
    #ev-modal .ws-modal-row { grid-template-columns:1fr 1fr; }
    #ev-modal .ws-modal-row>div:first-child { grid-column:1/-1; }
}

/* Compact activity cards keep the contact name visible even for a short exchange. */
#calendario-section .mc-event.mc-manager { padding:4px 7px; gap:2px; }
#calendario-section .mc-event.mc-manager b { flex-shrink:0; -webkit-line-clamp:1; line-height:14px; font-size:11.5px; }
#calendario-section .mc-event.mc-manager>span { line-height:11px; font-size:9.5px; flex-shrink:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mc-manager-controls>.mgr-switch { position:relative; }
.mc-manager-controls #cal-show-manager { display:block; position:absolute; opacity:0; width:1px; height:1px; }
.mc-manager-controls #cal-show-manager:focus-visible+.mgr-switch-track { outline:2px solid #8852e6; outline-offset:3px; }
