/* day-plan page styles (2026-10-23 redesign). Built on the shared ui- classes (assets/ui.css); everything here is scoped to the
   page's own root, .dp-page, so it never reaches another page. */
/* the page draws its own title and line, so the shell's page line is hidden while the Day plan is shown */
body:has(.dp-page) #pageDesc{display:none}
.dp-page{min-width:0;color:var(--ui-text);font-family:var(--ui-font)}
.dp-page .ui-page-head{margin-bottom:16px}
.dp-page .ui-card-title{font-size:16px}
.dp-page .ui-card-head{margin-bottom:12px}
.dp-page .muted{color:var(--ui-muted)}
.dp-page small{font-size:12px}

/* ---------- planning day + capacity */
.dp-plan{display:flex;align-items:flex-end;justify-content:space-between;gap:16px 24px;flex-wrap:wrap;padding:16px 20px}
.dp-plan label.ui-field{display:flex;flex-direction:column;gap:6px;font-size:12.5px;font-weight:600;color:var(--ui-text)}
.dp-plan-title{font-size:16px;font-weight:700;color:var(--ui-ink)}
.dp-plan-day{display:flex;flex-direction:column;gap:8px;min-width:0}
.dp-day-row{display:flex;align-items:center;gap:6px}
.dp-plan-cap{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}
.dp-plan-cap .ui-field{width:150px}
/* Save from this day on / Save for this day only (2026-11-13), and the line saying which capacity the day uses */
.dp-cap-save{display:flex;gap:8px;flex-wrap:wrap}
.dp-cap-note{flex:1 1 100%;margin:2px 0 0;font-size:12.5px;line-height:1.5;color:var(--ui-ink)}
.dp-cap-note.muted{color:var(--ui-muted,#6b7280)}
.dp-cap-note .ui-badge{margin-right:4px}
.dp-cap-note .dp-link{font-size:inherit}
.dp-in{position:relative;display:flex;align-items:center;min-width:0}
.dp-in>svg{position:absolute;left:11px;width:17px;height:17px;color:var(--ui-muted);pointer-events:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dp-page .dp-in .ui-input{padding-left:36px;width:100%;min-height:40px;border-radius:var(--ui-radius-sm);border:1px solid var(--ui-border-strong)}
.dp-page #planDate{width:210px}
.dp-page .dp-in .ui-input:focus{outline:none;border-color:var(--ui-accent);box-shadow:var(--ui-focus)}
.dp-page .ui-btn--icon{width:40px;min-height:40px}
.dp-page .ui-btn--icon svg{width:18px;height:18px}
.dp-page .ui-btn:disabled{opacity:.4;cursor:default}
.dp-page .ui-btn:focus-visible,.dp-page .dp-link:focus-visible,.dp-page .chip.more:focus-visible,.dp-page .ui-table-wrap:focus-visible,.dp-page .dp-share:focus-visible,.dp-page input[type=checkbox]:focus-visible,.dp-page details>summary:focus-visible{outline:none;box-shadow:var(--ui-focus)}

/* ---------- stat cards */
.dp-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.dp-stat{align-items:center;gap:14px;padding:16px 18px}
.dp-stat-body{min-width:0;flex:1}
.dp-stat .ui-stat-label{font-weight:600;color:var(--ui-ink);display:flex;align-items:center;gap:6px}
.dp-stat .ui-stat-value{font-size:26px;margin-top:2px}
.dp-stat .ui-stat-icon{width:44px;height:44px;border-radius:12px}
.dp-stat .ui-bar{height:6px;margin-top:8px}
.dp-stat:not(.dp-stat--over) .ui-bar>span{background:#12B76A}
.dp-stat--over .ui-stat-value,.dp-stat--over .ui-stat-sub{color:#D92D20}
@media(max-width:1100px){.dp-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:340px){.dp-stats{grid-template-columns:1fr}}

/* ---------- tables */
.dp-page .dp-card{padding:18px 20px}
.dp-page .ui-table th{font-size:12.5px;padding:10px 14px}
.dp-page .ui-table td{padding:10px 14px;white-space:nowrap}
.dp-page .ui-table tr.is-total td{background:var(--ui-surface-2)}
.dp-page .ui-table-wrap{-webkit-overflow-scrolling:touch;position:relative}
.dp-camp{font-weight:600;color:var(--ui-ink)}
.dp-link{font:inherit;font-weight:600;color:var(--ui-accent);background:none;border:0;padding:2px 0;border-radius:4px;cursor:pointer;min-height:0}
.dp-link:hover{background:none;text-decoration:underline;color:var(--ui-accent-strong)}
.dp-page tr.is-selected .dp-link{color:var(--ui-accent-strong)}
.dp-over{color:#D92D20;font-weight:700}
.dp-ok{color:var(--ui-ok);font-weight:700}
.dp-order{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:6px;background:var(--ui-neutral-soft);color:var(--ui-neutral);font-size:12px;font-weight:700}
.dp-col-no{width:44px}
.dp-col-act{width:48px}
.dp-page .ui-table th.dp-col-act,.dp-page .ui-table td.dp-col-act{text-align:right}
/* the tick box, the drag handle and the order */
.dp-page .plan-order{display:inline-flex;align-items:center;gap:8px}
.dp-page .plan-order input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:var(--ui-accent);border-radius:4px;cursor:pointer}
.dp-page .plan-order input[type=checkbox]:disabled{cursor:not-allowed}
.dp-page .drag-handle{width:16px;font-size:16px;color:var(--ui-faint)}
.dp-page .drag-handle:hover{color:var(--ui-ink)}
.dp-page tr.is-out td{color:var(--ui-muted)}
.dp-page tr.is-out .dp-camp{color:var(--ui-muted);font-weight:500}
.dp-page tr.dragging td{background:var(--ui-accent-soft)}
/* the session's tags (not dialed, estimate, moved, source) */
.dp-page .tag{display:inline-flex;align-items:center;margin-left:4px;border-radius:999px;padding:1px 8px;font-size:11px;font-weight:600;background:var(--ui-neutral-soft);color:var(--ui-neutral);border:1px solid var(--ui-neutral-line)}
.dp-page .tag.warn{background:var(--ui-warn-soft);color:var(--ui-warn);border-color:var(--ui-warn-line)}
.dp-page .tag.jc{background:var(--ui-info-soft);color:var(--ui-info);border-color:var(--ui-info-line)}
/* the split by agent: indigo chips, the "Names" chip and the source */
.dp-page .split-line{gap:6px}
.dp-page .chip{border:0;background:var(--ui-accent-soft);color:var(--ui-accent-strong);border-radius:6px;padding:2px 9px;font-size:12px;line-height:20px;font-weight:500}
.dp-page .chip b{font-weight:700}
.dp-page .chip.muted{background:#fff;color:var(--ui-muted);border:1px dashed var(--ui-border-strong)}
.dp-page button.chip.more{background:#fff;color:var(--ui-accent);border:1px solid var(--ui-accent-line);cursor:pointer;min-height:0;font-weight:600}
.dp-page button.chip.more:hover{background:var(--ui-accent-soft)}
.dp-page .src-tag{font-size:10px;border-radius:4px;padding:0 5px;color:var(--ui-muted);border-color:var(--ui-border)}
.dp-more{width:32px!important;min-height:32px!important;border-color:transparent;background:none;font-size:18px;line-height:1;color:var(--ui-muted)}
.dp-more:hover{border-color:var(--ui-border);color:var(--ui-ink)}
.dp-page .plan-btns{display:inline-flex;gap:6px}
.dp-page .ui-table-foot{padding-top:12px}

/* ---------- agent allocation */
.dp-agent{display:inline-flex;align-items:center;gap:10px;font-weight:600;color:var(--ui-ink)}
.dp-page .dp-share{min-height:34px;padding:5px 30px 5px 10px;font-size:13px;width:auto;min-width:118px;background-position:right 8px center}
.dp-page td .ui-badge{margin-left:4px}
.dp-page td .ui-badge:first-child{margin-left:0}
.dp-lists{display:inline-block;font-size:12.5px;line-height:1.5;white-space:normal;min-width:170px;max-width:280px}
.dp-use{display:inline-flex;align-items:center;gap:10px}
.dp-use b{min-width:40px;font-variant-numeric:tabular-nums}
.dp-use .ui-bar{width:84px;height:6px}
.dp-use--ok b{color:var(--ui-ok)}.dp-use--ok .ui-bar>span{background:#12B76A}
.dp-use--bad b{color:#D92D20}
.dp-use-warn{display:inline-grid;color:#DC6803}
.dp-use-warn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- capacity overview tabs */
.dp-tabs{margin-bottom:12px}

/* ---------- actual dialing (a fold) */
.dp-page details.report-detail{background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius);box-shadow:var(--ui-shadow);padding:16px 20px;margin:0 0 var(--ui-gap)}
.dp-page details.report-detail>summary{font-size:16px;font-weight:700;color:var(--ui-ink);border-radius:6px;padding:2px 0}
.dp-page details.report-detail[open]>summary{border-bottom:1px solid var(--ui-border);padding-bottom:12px}
.dp-page .report-detail-body{padding-top:12px}
.dp-sub-title{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;color:var(--ui-ink);margin:14px 0 10px}
.dp-page .daily-workload>.dp-sub-title:first-child{margin-top:0}
.dp-page .daily-workload .dp-table-wrap{max-height:440px;overflow:auto}
.dp-page details.dw-camps,.dp-page details.dw-camps-all{margin:10px 0 0}
.dp-page details.dw-camps>summary,.dp-page details.dw-camps-all>summary{cursor:pointer;font-size:13px;font-weight:600;padding:6px 0;color:var(--ui-ink)}
.dp-page .note-more{color:var(--ui-accent)}

/* ---------- tablet and phone */
@media(max-width:900px){
 .dp-plan{align-items:stretch}
 .dp-plan-cap{width:100%}
 .dp-plan-cap .ui-field{flex:1 1 130px;width:auto}
}
@media(max-width:640px){
 .dp-page .ui-page-head{flex-direction:column;align-items:stretch}
 .dp-page .ui-page-head .ui-actions{width:100%}
 .dp-page .ui-page-head .ui-actions .ui-btn{flex:1}
 .dp-page .dp-card,.dp-plan{padding:14px}
 .dp-plan-day{width:100%}
 .dp-day-row .dp-in{flex:1}
 .dp-page #planDate{width:100%}
 .dp-plan-cap .ui-btn--primary{flex:1 1 100%}
 .dp-cap-save{width:100%}
 .dp-cap-save .ui-btn{flex:1 1 100%}
 .dp-page .ui-card-head .ui-actions{width:100%}
 .dp-page .ui-card-head .ui-actions #addPlan{flex:1}
 .dp-stat{padding:12px 14px}
 .dp-stat .ui-stat-value{font-size:22px}
 .dp-stat .ui-stat-icon{width:36px;height:36px;border-radius:10px}
 .dp-page .ui-table td,.dp-page .ui-table th{padding:9px 10px}
 .dp-page .ui-table-foot{font-size:12.5px}
}
/* the campaign table: the session line wraps so the split stays in view */
.dp-page .dp-sel td:nth-child(5){white-space:normal;min-width:150px;max-width:200px}
.dp-page .dp-sel th,.dp-page .dp-sel td{padding-left:10px;padding-right:10px}
.dp-page .dp-sel td:nth-child(5) .tag{margin:2px 4px 0 0}
