/* The production calendar is a quiet rail: dates above, today's call sheet below. */
.crm-agenda-sidebar{display:flex;flex-direction:column;gap:14px;width:100%;max-width:420px;min-width:0;color:var(--txt);font-family:var(--font-ui)}
.crm-agenda-mini-calendar{padding:12px;background:var(--bg2);border:1px solid var(--steel);border-radius:14px;min-width:0;flex:none}
.crm-agenda-month-header,.crm-agenda-daily-header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.crm-agenda-month-header h2{font-size:15px;line-height:1.5;font-weight:700;text-transform:capitalize;color:var(--txt-hi);margin:0;overflow-wrap:anywhere}
.crm-agenda-month-controls{display:flex;align-items:center;gap:4px;flex:none}
.crm-agenda-month-controls button,.crm-agenda-refresh{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--txt-lo);font:inherit;font-size:22px;cursor:pointer}
.crm-agenda-month-controls button:hover,.crm-agenda-refresh:hover{background:var(--surface-raised);color:var(--txt-hi)}
.crm-agenda-mini-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px 1px;margin-top:10px}
.crm-agenda-mini-weekday{padding:0;color:var(--txt-lo);text-align:center;font-size:9px;line-height:14px;font-weight:500}
.crm-agenda-mini-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;height:28px;min-width:0;padding:2px 1px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--txt);font:inherit;cursor:pointer;font-variant-numeric:tabular-nums}
.crm-agenda-mini-day:hover{background:var(--surface-raised)}.crm-agenda-mini-day.is-selected{border-color:var(--gold-lo);background:var(--accent-soft)}
.crm-agenda-mini-number{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;border-radius:50%;font-size:11px;line-height:1}
.crm-agenda-mini-day.is-today .crm-agenda-mini-number{background:var(--gold);color:var(--on-accent);font-weight:700}
.crm-agenda-mini-signals{height:5px;display:flex;align-items:center;gap:3px;max-width:100%}
.crm-agenda-mini-signals small{font-size:8px;line-height:1;color:var(--txt-lo)}
.crm-agenda-mini-dot{display:inline-block;flex:none;width:4px;height:4px;border-radius:50%;background:var(--gold)}
.crm-agenda-mini-dot.shoot{background:var(--orange)}.crm-agenda-mini-dot.delivery{background:var(--green)}
.crm-agenda-calendar-key{display:flex;align-items:center;gap:14px;padding-top:7px;font-size:9px;color:var(--txt-lo)}
.crm-agenda-calendar-key span{display:inline-flex;align-items:center;gap:6px}
.crm-agenda-data-status{font-size:11px;line-height:1.6;margin:10px 0 0;color:var(--txt-lo)}
.crm-agenda-sidebar .po-error{font-size:12px;line-height:1.6;margin-top:12px;overflow-wrap:anywhere}
.crm-agenda-sidebar .po-error .po-button{margin:8px 0 0;min-height:34px}
.crm-agenda-daily{min-width:0;padding:0 4px;flex:none}
.crm-agenda-daily-header{margin-bottom:8px}.crm-agenda-daily-header h2{font-size:16px;color:var(--txt-hi);font-weight:700;margin:0;line-height:1.5}
.crm-agenda-daily-header p{font-size:11px;line-height:1.5;color:var(--txt-lo);margin:3px 0 0}
.crm-agenda-overdue{font-size:11px;line-height:1.5;color:var(--red);margin:0 0 8px}
.crm-agenda-empty{font-size:12px;line-height:1.7;color:var(--txt-lo);margin:0;padding:12px 0}
.crm-agenda-daily-list{list-style:none;padding:0;margin:0}.crm-agenda-daily-list li{margin:0;padding:0}
.crm-agenda-daily-item{display:grid;grid-template-columns:6px minmax(0,1fr) minmax(46px,70px);gap:10px;align-items:start;width:100%;min-height:54px;padding:10px 0;border:0;border-bottom:1px solid var(--steel);background:transparent;color:var(--txt);font:inherit;text-align:left;cursor:pointer}
.crm-agenda-daily-item:hover .crm-agenda-item-copy strong{color:var(--gold-hi)}
.crm-agenda-item-dot{width:5px;height:5px;border-radius:50%;margin-top:5px;background:var(--gold)}
.crm-agenda-daily-item.shoot .crm-agenda-item-dot{background:var(--orange)}.crm-agenda-daily-item.task .crm-agenda-item-dot{background:var(--blue)}.crm-agenda-daily-item.reminder .crm-agenda-item-dot{background:var(--teal)}.crm-agenda-daily-item.delivery .crm-agenda-item-dot{background:var(--green)}
.crm-agenda-item-copy{min-width:0}.crm-agenda-item-copy strong{display:block;font-size:12px;line-height:1.5;font-weight:600;color:var(--txt-hi);overflow-wrap:anywhere}
.crm-agenda-item-copy small{display:block;font-size:10px;line-height:1.5;color:var(--txt-lo);margin-top:4px;overflow-wrap:anywhere}
.crm-agenda-item-time{font-size:10px;line-height:1.5;color:var(--txt-lo);text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.crm-agenda-daily-item.is-overdue .crm-agenda-item-time{color:var(--red)}
.crm-agenda-sidebar button:focus-visible,.crm-calendar-dialog button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.crm-agenda-sidebar button:disabled{cursor:default;opacity:.55}
.tp-modal.crm-calendar-dialog{display:flex;flex-direction:column;width:min(1080px,calc(100vw - 32px));height:auto;max-height:calc(var(--app-height,100dvh) - 32px);padding:0;overflow:hidden;background:var(--bg2);border:1px solid var(--steel-hi);border-radius:16px;color:var(--txt)}
.crm-calendar-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;border-bottom:1px solid var(--steel);flex:none}
.crm-calendar-dialog-header h2{margin:0;color:var(--txt-hi);font-size:18px;line-height:1.4;overflow-wrap:anywhere}
.crm-calendar-dialog-header .po-button{display:flex;align-items:center;justify-content:center;min-width:36px;min-height:36px;padding:4px;font-size:22px}
.crm-calendar-dialog .crm-calendar{min-height:0;padding:18px 22px 24px;overflow:auto;overscroll-behavior:contain}
.crm-calendar-dialog .crm-section-heading{margin-bottom:16px}.crm-calendar-dialog .crm-section-heading p{margin-top:0;line-height:1.6}
.crm-calendar-dialog :is(.crm-day,.crm-day-blank){height:92px}.crm-calendar-dialog .crm-calendar-layout{grid-template-columns:minmax(0,1.8fr) minmax(210px,1fr);gap:20px}
.crm-calendar-dialog .crm-day-detail{padding:4px 0 0}.crm-calendar-dialog .crm-day-detail .crm-agenda-row{min-height:58px}
@media(max-width:900px){.crm-agenda-sidebar{max-width:none}.crm-calendar-dialog .crm-calendar-layout{grid-template-columns:minmax(0,1fr)}.crm-calendar-dialog :is(.crm-day,.crm-day-blank){height:76px}.crm-calendar-dialog .crm-section-heading{align-items:stretch}.crm-calendar-dialog .crm-section-heading>.pc-actions{display:flex;align-items:center;flex-wrap:wrap}}
@media(max-width:620px){.crm-agenda-mini-calendar{padding:15px}.crm-agenda-daily{padding:0 2px}.tp-modal.crm-calendar-dialog{width:calc(100vw - 16px);max-height:calc(var(--app-height,100dvh) - 16px);border-radius:12px}.crm-calendar-dialog-header{padding:14px}.crm-calendar-dialog-header h2{font-size:16px}.crm-calendar-dialog .crm-calendar{padding:12px}.crm-calendar-dialog :is(.crm-day,.crm-day-blank){height:64px}.crm-calendar-dialog .crm-day-detail .crm-agenda-row{flex-direction:column}.crm-calendar-dialog .crm-section-heading>.pc-actions{gap:7px}.crm-calendar-dialog .crm-section-heading>.pc-actions strong{font-size:12px}.crm-calendar-dialog .po-button{min-height:38px}.crm-agenda-mini-day{height:44px;padding:4px 1px;gap:3px}.crm-agenda-mini-number{min-width:24px;height:24px}.crm-agenda-mini-weekday{padding:3px 0 7px}.crm-agenda-mini-grid{margin-top:14px}}
@media(pointer:coarse){.crm-agenda-mini-day{height:44px;padding:4px 1px;gap:3px}.crm-agenda-mini-number{min-width:24px;height:24px}.crm-agenda-month-controls button,.crm-agenda-refresh{min-width:40px;min-height:40px}}

/* Calendar controls keep comfortable touch targets at phone and tablet sizes. */
@media (pointer:coarse), (max-width:1100px) {
 .crm-agenda-month-controls button,.crm-agenda-refresh{width:44px;height:44px;min-width:44px;min-height:44px}
 .crm-agenda-mini-day{height:44px;min-height:44px}
 .crm-calendar-dialog-header .po-button{min-width:44px;min-height:44px}
 .crm-calendar-dialog .crm-section-heading .po-button{min-width:44px;min-height:44px}
}
@media(max-width:360px){
 .crm-dashboard>.crm-agenda-sidebar{width:calc(100% + 20px);margin-inline:-10px;padding-inline:0}
 .crm-agenda-mini-calendar{padding-inline:8px}
 .crm-agenda-mini-grid{margin-inline:-7px;column-gap:0}
 .crm-agenda-daily{padding-inline:10px}
 .tp-modal.crm-calendar-dialog{width:100vw;max-width:none;flex-shrink:0;border-inline:0;border-radius:0}
 .crm-calendar-dialog .crm-calendar{padding-inline:1px}
}
