
/* v18: compact labels, schedule editor, exact modifier glyphs, and side-by-side filter text. */
#filterModal .filter-advanced-body{display:block!important;max-height:none!important;overflow:visible!important}
#filterModal .filter-block{width:100%!important}
.filter-text-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
.filter-text-half{min-width:0}.filter-text-half .filter-block-title{margin-bottom:5px}.filter-text-half.filter-excludes{background:transparent!important}
@media(max-width:700px){.filter-text-pair{grid-template-columns:1fr}}

.recur-modal{padding:12px!important;overflow:hidden!important}
.recur-modal .modal-card{width:min(1120px,calc(100vw - 24px))!important;height:min(90vh,900px)!important;max-height:calc(100vh - 24px)!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
.recur-modal .modal-head,.recur-modal .recur-text-entry,.recur-modal .recur-divider,.recur-modal .recur-mode-toggle,.recur-modal .recur-manual-tools,.recur-modal .modal-actions{flex:0 0 auto}
.recur-text-entry{margin-bottom:0!important}.recur-text-input{min-height:66px!important;max-height:116px!important;resize:vertical}
.recur-text-tools{display:flex!important;justify-content:flex-end!important;gap:7px!important;align-items:center!important;flex-wrap:wrap}
.recur-gpt-btn{font-size:10px!important;text-decoration:none!important;display:inline-flex;align-items:center}
.recur-mode-toggle{display:grid;grid-template-columns:1fr 1fr;width:100%;margin:0 0 8px;border:1px solid var(--border-strong);border-radius:9px;overflow:hidden}
.recur-mode-btn{border:0;border-right:1px solid var(--border-strong);background:var(--surface-2);color:inherit;min-height:38px;font-weight:850;cursor:pointer}
.recur-mode-btn:last-child{border-right:0}.recur-mode-btn.active{background:rgba(68,130,226,.25);box-shadow:inset 0 0 0 1px rgba(68,130,226,.72)}
.recur-manual-scroll{flex:1 1 auto;min-height:130px;overflow-y:auto;overflow-x:hidden;padding-right:4px;overscroll-behavior:contain}
.recur-manual-rows{display:grid;gap:8px!important;align-content:start}
.v18-recur-row,.seq-stage-row{display:block!important;padding:9px!important;border:1px solid var(--border)!important;border-radius:10px!important;background:var(--surface-2)}
.recur-row-head,.seq-stage-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.recur-lane-number,.seq-stage-number{font-size:10px;font-weight:900;color:var(--muted);letter-spacing:.02em}
.recur-now-btn{font-size:9px!important;min-height:26px!important;padding:4px 8px!important;background:#d4af37!important;border-color:#e4c75c!important;color:#211900!important;font-weight:900!important}
.recur-row-grid{display:grid;grid-template-columns:minmax(120px,1.35fr) 76px 108px 112px minmax(112px,1fr) 92px 100px 98px minmax(112px,1fr) 92px 32px;gap:6px;align-items:end}
.recur-row-grid .modal-field{min-width:0}.recur-row-grid .modal-input{min-width:0}.recur-anchor-wrap{align-self:end;margin-bottom:5px;white-space:nowrap}
.recur-until-date-wrap,.recur-until-time-wrap{transition:opacity .12s}.v18-until-disabled{opacity:.38;pointer-events:none}
.recur-lane-label{min-width:0}
.seq-root-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 9px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);margin-bottom:8px}
.seq-end-toggle{display:flex;border:1px solid var(--border);border-radius:8px;overflow:hidden}.seq-end-choice{border:0;border-right:1px solid var(--border);background:transparent;color:inherit;padding:6px 10px;font-size:10px;font-weight:850;cursor:pointer}.seq-end-choice:last-child{border-right:0}.seq-end-choice.active{background:rgba(68,130,226,.25)}
.seq-tree{display:grid;gap:8px}.seq-items{display:grid;gap:7px}.seq-group{border:1px solid rgba(116,91,201,.46);border-radius:10px;padding:8px;background:rgba(116,91,201,.06);margin-left:min(28px,calc(var(--seq-depth,0) * 9px))}
.seq-group-head{display:flex;align-items:center;gap:8px;margin-bottom:7px}.seq-repeat-wrap{display:flex;align-items:center;gap:4px;font-size:10px;font-weight:850}.seq-repeat-input{width:74px!important;min-height:29px!important}.seq-group-title{font-size:10px;font-weight:900;color:#9586d7}.seq-group-head .icon-btn{margin-left:auto}
.seq-stage-grid{display:grid;grid-template-columns:minmax(140px,1.2fr) 90px 130px 32px;gap:7px;align-items:end}.seq-stage-grid .modal-field{min-width:0}
.seq-group-tools{display:flex;gap:6px;margin-top:7px;padding-left:4px}.seq-group-tools .text-btn{font-size:9px;min-height:28px}
.recur-add-tools{display:flex;gap:6px}.recur-manual-tools{margin-top:7px!important}
@media(max-width:1000px){.recur-row-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.seq-stage-grid{grid-template-columns:2fr 1fr 1fr 32px}}
@media(max-width:720px){.recur-row-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.seq-stage-grid{grid-template-columns:1fr 1fr}.seq-stage-grid .seq-remove-stage{grid-column:2}.recur-text-tools{justify-content:stretch!important}.recur-text-tools>*{flex:1}}

/* Recurrence status is attached to the title instead of consuming dead space above it. */
.recur-mini{display:none!important}.card-title{display:flex;align-items:center;flex-wrap:wrap;gap:4px}
.recur-status-sep{font-weight:700;color:var(--muted)}
.recur-status-box{display:inline-flex;align-items:center;max-width:100%;padding:2px 6px;border:1px solid var(--border);border-radius:7px;font-size:9px;line-height:1.25;font-weight:760;white-space:normal}
body.dark .recur-status-box{background:color-mix(in srgb,var(--task-card-bg,var(--surface)) 75%,white 25%)}
body:not(.dark) .recur-status-box{background:color-mix(in srgb,var(--task-card-bg,var(--surface)) 75%,black 25%);color:#fff}

/* Rebuild recurrence controls as an exclusive state machine: one icon, matching border/background. */
.refresh-action .refresh-normal-icon,.refresh-action .refresh-catchup-icon,.refresh-action .refresh-anchor-cyan,.refresh-action .refresh-anchor-green,.refresh-action .refresh-anchor-red,.refresh-action .refresh-edit-icon,.refresh-action .refresh-archive-icon{display:none!important}
body:not(.ctrl-held):not(.alt-held):not(.shift-held) .refresh-action .refresh-normal-icon{display:inline-flex!important}
.refresh-action{color:#1b9c55!important;border-color:rgba(27,156,85,.88)!important;background:rgba(27,156,85,.20)!important}
body.ctrl-held:not(.shift-held):not(.alt-held) .refresh-action{color:#39d978!important;border-color:rgba(57,217,120,.95)!important;background:rgba(57,217,120,.22)!important}
body.ctrl-held:not(.shift-held):not(.alt-held) .refresh-action .refresh-catchup-icon{display:inline-flex!important}
body.ctrl-held.shift-held:not(.alt-held) .refresh-action:not(.sequential-current){color:#49cbd7!important;border-color:rgba(73,203,215,.95)!important;background:rgba(73,203,215,.22)!important}
body.ctrl-held.shift-held:not(.alt-held) .refresh-action:not(.sequential-current) .refresh-anchor-cyan{display:inline-flex!important}
body.ctrl-held.alt-held:not(.shift-held) .refresh-action:not(.unanchored-current):not(.sequential-current){color:#d84a4a!important;border-color:rgba(216,74,74,.95)!important;background:rgba(216,74,74,.22)!important}
body.ctrl-held.alt-held:not(.shift-held) .refresh-action:not(.unanchored-current):not(.sequential-current) .refresh-anchor-red{display:inline-flex!important}
body.ctrl-held.alt-held:not(.shift-held) .refresh-action.unanchored-current:not(.sequential-current){color:#28b866!important;border-color:rgba(40,184,102,.95)!important;background:rgba(40,184,102,.22)!important}
body.ctrl-held.alt-held:not(.shift-held) .refresh-action.unanchored-current:not(.sequential-current) .refresh-anchor-green{display:inline-flex!important}
body.alt-held:not(.ctrl-held):not(.shift-held) .refresh-action{color:#d0a821!important;border-color:rgba(208,168,33,.95)!important;background:rgba(208,168,33,.22)!important}
body.alt-held:not(.ctrl-held):not(.shift-held) .refresh-action .refresh-edit-icon{display:inline-flex!important}
body.shift-held:not(.ctrl-held):not(.alt-held) .refresh-action,body.ctrl-held.alt-held.shift-held .refresh-action{color:#a87449!important;border-color:rgba(168,116,73,.95)!important;background:rgba(168,116,73,.24)!important}
body.shift-held:not(.ctrl-held):not(.alt-held) .refresh-action .refresh-archive-icon,body.ctrl-held.alt-held.shift-held .refresh-action .refresh-archive-icon{display:inline-flex!important}
/* Sequential chains have no anchor state. Undefined anchor modifier combinations stay completion-green. */
body.ctrl-held.shift-held:not(.alt-held) .refresh-action.sequential-current,body.ctrl-held.alt-held:not(.shift-held) .refresh-action.sequential-current,body.alt-held.shift-held:not(.ctrl-held) .refresh-action{color:#1b9c55!important;border-color:rgba(27,156,85,.88)!important;background:rgba(27,156,85,.20)!important}
body.ctrl-held.shift-held:not(.alt-held) .refresh-action.sequential-current .refresh-normal-icon,body.ctrl-held.alt-held:not(.shift-held) .refresh-action.sequential-current .refresh-normal-icon,body.alt-held.shift-held:not(.ctrl-held) .refresh-action .refresh-normal-icon{display:inline-flex!important}

/* Archive cards do not stretch when the result list is short. Open ghost structures may grow. */
.archive-list{align-content:start!important;grid-auto-rows:max-content!important}.archive-card{height:86px!important;min-height:86px!important;max-height:86px!important;overflow:hidden!important}.archive-card:has(.archive-structure-btn.structure-open){height:auto!important;max-height:none!important;overflow:visible!important}
