
/* v0.2.11: week view + flexible builder ordering + import activity review */
.week-scroll{overflow-x:auto;overscroll-behavior-inline:contain;padding-bottom:4px}
.week-calendar{min-width:1120px;display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));border-left:1px solid var(--border);border-top:1px solid var(--border);background:var(--panel)}
.week-day{min-height:480px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);padding:0 8px 12px;min-width:0;background:var(--panel)}
.week-day.today{background:color-mix(in srgb,var(--green) 5%,var(--panel))}
.week-day-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 -8px 8px;padding:9px 8px;border-bottom:1px solid var(--border);background:var(--panel)}
.week-day.today .week-day-head{background:color-mix(in srgb,var(--green) 10%,var(--panel))}
.week-day-head strong{font-size:13px}.week-day-head time{font-size:12px;color:var(--muted)}
.week-day-head .day-add{margin-left:auto}
.week-events{display:flex;flex-direction:column;gap:7px}
.week-event{width:100%;border:1px solid var(--border);border-left-width:4px;border-radius:8px;padding:8px;text-align:left;color:var(--text);background:var(--card);cursor:pointer;min-height:58px}
.week-event:hover{filter:brightness(1.08)}
.week-event .week-event-top{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);margin-bottom:3px;min-width:0}
.week-event .week-event-top time{font-weight:800;color:inherit;white-space:nowrap}
.week-event strong{display:block;font-size:13px;line-height:1.25;overflow-wrap:anywhere}
.week-event .week-focus{display:block;margin-top:3px;font-size:12px;line-height:1.25;color:var(--text)}
.week-event .event-check{margin-left:auto;color:#a9f5bb;font-weight:900}
.week-event.development{border-left-color:#ff9b54;background:rgba(132,72,37,.35)}
.week-event.juniors{border-left-color:#6bdb73;background:rgba(41,91,48,.42)}
.week-event.seniors{border-left-color:#5fd0e8;background:rgba(36,91,105,.42)}
.week-event.learn{border-left-color:#f4d35e;background:rgba(112,90,29,.38)}
.week-event.one{border-left-color:#ee8bb2;background:rgba(104,54,76,.38)}
.week-event.gala{border-left-color:#b69cff;background:rgba(78,60,127,.45)}
.week-event.other-event{border-left-color:#72a7ff;background:rgba(52,78,126,.45)}
.week-event.is-inactive{opacity:.58;text-decoration:line-through}
.week-view-label{font-size:13px;color:var(--muted);font-weight:600}

/* Builder ordering controls */
.builder-drag-handle{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid var(--border);border-radius:6px;color:var(--muted);cursor:grab;user-select:none;background:var(--panel);font-size:14px;line-height:1}
.builder-drag-handle:active{cursor:grabbing}
.item-order-controls{display:inline-flex;align-items:center;gap:3px;margin-right:3px}
.item-order-controls .mini-order{width:22px;height:22px;padding:0;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--muted);cursor:pointer;font-weight:800}
.item-order-controls .mini-order:hover{border-color:var(--border);color:var(--text);background:var(--panel)}
.section-drag-handle{margin-right:2px}
.section-insert-slot{height:20px;display:flex;align-items:center;justify-content:center;position:relative;margin:-4px 4px 4px}
.section-insert-slot::before{content:"";position:absolute;left:8px;right:8px;top:50%;height:1px;background:var(--border)}
.section-insert-button{position:relative;z-index:1;border:1px solid var(--border);background:var(--bg);color:var(--muted);border-radius:999px;padding:2px 10px;font-size:11px;font-weight:700;cursor:pointer;opacity:.72}
.section-insert-button:hover,.section-insert-button:focus-visible{opacity:1;color:var(--text);border-color:var(--green)}
.drag-drop-before{box-shadow:inset 0 3px 0 var(--yellow)!important}.drag-drop-after{box-shadow:inset 0 -3px 0 var(--yellow)!important}
.section-editor.drag-drop-before{outline:2px solid var(--yellow);outline-offset:3px}.section-editor.drag-drop-after{outline:2px solid var(--yellow);outline-offset:3px}
.builder-dragging{opacity:.6}
@media (max-width:800px){.item-order-controls .mini-order{width:28px;height:28px}.builder-drag-handle{width:30px;height:30px}.section-insert-slot{height:28px}.section-insert-button{font-size:12px;padding:4px 12px}}

/* Import activity normalisation review */
.activity-col.import-activity-unmatched{position:relative;background:rgba(255,177,66,.10)}
.activity-col.import-activity-unmatched .row-field{border-color:#f0a94a!important;box-shadow:0 0 0 1px rgba(240,169,74,.25)}
.activity-review-note{display:flex;align-items:center;gap:5px;margin-top:4px;flex-wrap:wrap;color:#ffd08a;font-size:10px;font-weight:750;line-height:1.2}
.activity-review-note button{border:1px solid #9e7438;background:#4b3a24;color:#ffe0a8;border-radius:5px;padding:2px 5px;font:inherit;cursor:pointer}
.activity-review-note button:hover{background:#5d472a}
.activity-custom-accepted{display:inline-flex;margin-top:4px;border:1px solid rgba(112,210,142,.5);background:rgba(55,126,77,.25);color:#aef1c2;border-radius:5px;padding:2px 5px;font-size:10px;font-weight:750}
.import-activity-alert{margin:10px 0;padding:9px 11px;border:1px solid #9e7438;border-radius:8px;background:rgba(88,62,25,.35);color:#ffdca2;font-size:12px}

.set-editor-table .actions-col{width:88px!important;min-width:88px!important;white-space:nowrap}
.set-editor-table .actions-col>.item-order-controls{vertical-align:middle;margin-right:2px}
.set-editor-table .actions-col>.row-delete{vertical-align:middle}
.instruction-flex>.item-order-controls{flex:0 0 auto}
