.td-recurrence-section {
    margin: 0 0 1rem;
    padding: .75rem .9rem;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    background: #f8fafc;
}

.td-recurrence-heading { display: flex; gap: .45rem; align-items: center; color: #475569; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.td-recurrence-heading i { color: #2563eb; font-size: 1rem; }
.td-recurrence-content { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .45rem; color: #64748b; font-size: .8rem; }
.td-recurrence-summary-copy { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.td-recurrence-summary-copy strong { color: #1e293b; font-size: .85rem; font-weight: 600; }
.td-recurrence-next { color: #64748b; }
.td-recurrence-actions { display: flex; gap: .55rem; flex: 0 0 auto; }
.td-recurrence-link { border: 0; padding: 0; background: transparent; color: #2563eb; cursor: pointer; font-size: .8rem; font-weight: 600; }
.td-recurrence-link:hover { color: #1d4ed8; text-decoration: underline; }
.td-recurrence-link-danger { color: #dc2626; }
.td-recurrence-empty { color: #64748b; }
.task-recurrence-indicator { display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; flex: 0 0 auto; border: 0; border-radius: .35rem; color: #2563eb; background: #eff6ff; cursor: pointer; }
.task-recurrence-indicator:hover, .task-recurrence-indicator:focus-visible { color: #1d4ed8; background: #dbeafe; outline: 2px solid #93c5fd; outline-offset: 1px; }

.td-recurrence-dialog { position: fixed; inset: 0; z-index: 10020; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(15, 23, 42, .35); }
.td-recurrence-dialog[hidden],
.td-recurrence-dialog.hidden { display: none !important; }
.td-recurrence-dialog-card { width: min(100%, 42rem); max-height: min(90vh, 46rem); overflow: auto; border-radius: 1rem; background: #fff; box-shadow: 0 1.5rem 4rem rgba(15, 23, 42, .25); }
.td-recurrence-dialog-card.td-recurrence-with-preview { width: min(100%, 68rem); }
.td-recurrence-dialog-body { display: flex; align-items: flex-start; }
.td-recurrence-dialog-body .td-recurrence-form { flex: 1 1 62%; min-width: 0; }
.td-recurrence-preview { flex: 1 1 45%; min-width: 0; position: sticky; top: 0; padding: 1rem 1.25rem; border-left: 1px solid #e2e8f0; }
.td-recurrence-preview-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.td-recurrence-preview-label { color: #1e293b; font-size: .85rem; font-weight: 700; }
.td-recurrence-preview-nav { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border: 1px solid #cbd5e1; border-radius: .4rem; color: #475569; background: #fff; cursor: pointer; }
.td-recurrence-preview-nav:hover { border-color: #94a3b8; color: #1e293b; }
.td-recurrence-preview-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.td-recurrence-preview-dow { padding: .15rem 0; color: #94a3b8; font-size: .65rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.td-recurrence-preview-day { padding: .34rem 0; border-radius: .35rem; color: #334155; font-size: .74rem; text-align: center; }
.td-recurrence-preview-day.is-outside { color: #cbd5e1; }
.td-recurrence-preview-day.is-today { box-shadow: inset 0 0 0 1px #94a3b8; }
.td-recurrence-preview-day.is-occurrence { background: #2563eb; color: #fff; font-weight: 600; }
.td-recurrence-preview-day.is-outside.is-occurrence { background: #93c5fd; }
.td-recurrence-preview-day.is-anchor { background: #1e293b; color: #fff; font-weight: 700; }
.td-recurrence-example-done { display: flex; flex-direction: column; gap: .4rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid #e2e8f0; }
.td-recurrence-example-done-label { color: #475569; font-size: .72rem; font-weight: 700; }
.td-recurrence-example-done input[type="date"] { display: block; width: 100%; min-height: 2.15rem; padding: .35rem .5rem; border: 1px solid #cbd5e1; border-radius: .45rem; color: #1e293b; background: #fff; font-size: .8rem; }
.td-recurrence-example-done-list { display: flex; flex-direction: column; gap: .2rem; margin-top: .15rem; }
.td-recurrence-example-done-row { display: flex; align-items: baseline; gap: .45rem; color: #1e293b; font-size: .78rem; font-variant-numeric: tabular-nums; line-height: 1.35; }
.td-recurrence-example-done-dow { flex: 0 0 2.1rem; color: #64748b; font-size: .72rem; font-weight: 700; }
.td-recurrence-example-done-empty { color: #94a3b8; font-size: .72rem; line-height: 1.35; }
.td-recurrence-preview-note { display: flex; flex-direction: column; gap: .25rem; margin-top: .7rem; color: #64748b; font-size: .72rem; }
.td-recurrence-dialog-header { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.25rem; border-bottom: 1px solid #e2e8f0; }
.td-recurrence-dialog-header h2 { margin: 0; flex: 1; color: #0f172a; font-size: 1rem; font-weight: 700; }
.td-recurrence-close { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; flex: 0 0 auto; border: 0; border-radius: .4rem; background: transparent; color: #64748b; cursor: pointer; font-size: 1.1rem; }
.td-recurrence-close:hover { color: #0f172a; background: #f1f5f9; }
.td-recurrence-close i { pointer-events: none; }
.td-recurrence-form { display: flex; flex-direction: column; gap: .75rem; padding: 1rem 1.25rem; }
.td-recurrence-form-row { display: grid; grid-template-columns: minmax(7rem, 9rem) minmax(11rem, 1fr) minmax(9rem, 1.15fr); gap: .45rem 1rem; align-items: start; }
.td-recurrence-form-label { padding-top: .55rem; color: #475569; font-size: .75rem; font-weight: 600; line-height: 1.3; }
.td-recurrence-form-control { min-width: 0; }
.td-recurrence-form-desc { margin: 0; padding-top: .55rem; color: #64748b; font-size: .72rem; line-height: 1.4; }
.td-recurrence-form input[type="number"], .td-recurrence-form input[type="date"], .td-recurrence-form select { display: block; width: 100%; min-height: 2.15rem; padding: .35rem .5rem; border: 1px solid #cbd5e1; border-radius: .45rem; color: #1e293b; background: #fff; font-size: .8rem; }
.td-recurrence-form input[type="checkbox"] { width: 1rem; height: 1rem; margin-top: .65rem; accent-color: #2563eb; }
.td-recurrence-check { display: flex; align-items: center; gap: .45rem; color: #475569; font-size: .75rem; font-weight: 500; }
.td-recurrence-check input { margin-top: 0; }
.td-recurrence-weekdays { display: flex; flex-wrap: wrap; gap: .55rem .7rem; padding-top: .35rem; }
.td-recurrence-weekdays label { display: flex; align-items: center; gap: .35rem; color: #475569; font-size: .75rem; font-weight: 500; }
.td-recurrence-weekdays input { margin-top: 0; }
.td-recurrence-inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.td-recurrence-inline-fields label { display: flex; flex-direction: column; gap: .3rem; color: #64748b; font-size: .7rem; font-weight: 600; }
.td-recurrence-copy-options { display: flex; flex-direction: column; gap: .4rem; padding-top: .35rem; }
.td-recurrence-error { margin: .8rem 1.25rem 0; padding: .55rem .7rem; border-radius: .45rem; color: #991b1b; background: #fef2f2; font-size: .78rem; }
.td-recurrence-dialog-actions { display: flex; align-items: center; gap: .6rem; }
.td-recurrence-primary, .td-recurrence-secondary { min-height: 2.25rem; padding: .4rem .8rem; border-radius: .45rem; cursor: pointer; font-size: .8rem; font-weight: 600; }
.td-recurrence-primary { border: 1px solid #2563eb; color: #fff; background: #2563eb; }
.td-recurrence-primary:disabled { border-color: #93c5fd; background: #93c5fd; cursor: not-allowed; }
.td-recurrence-secondary { border: 1px solid #cbd5e1; color: #475569; background: #fff; }

@media (max-width: 900px) {
    .td-recurrence-dialog-body { flex-direction: column; }
    .td-recurrence-preview { position: static; width: 100%; border-left: 0; border-top: 1px solid #e2e8f0; }
}

@media (max-width: 640px) {
    .td-recurrence-form-row { grid-template-columns: 1fr; }
    .td-recurrence-form-label, .td-recurrence-form-desc { padding-top: 0; }
    .td-recurrence-content { align-items: flex-start; flex-direction: column; }
}
