﻿/* Weekly todo board override extracted from backup-20260421-200520 */

.ai-todo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.ai-todo-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ai-todo-action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ai-todo-compose {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 18px;
    margin-top: 18px;
}

.ai-todo-compose-main {
    display: grid;
    gap: 10px;
    position: relative;
}

.ai-todo-detail .field {
    position: relative;
}

.ai-todo-input {
    min-height: 112px;
}

.ai-todo-compose-controls {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(241,245,249,0.92) 100%);
    border: 1px solid rgba(226, 232, 240, 0.96);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.field-label {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ai-todo-date-input {
    min-height: 42px;
}

.ai-todo-week-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
}

.ai-todo-week-toolbar-main {
    display: grid;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.ai-todo-week-heading-left,
.ai-todo-week-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-todo-week-heading-left {
    min-width: 0;
}

.ai-todo-week-heading-left h4 {
    margin: 0;
}

.ai-todo-week-toolbar-actions {
    justify-content: flex-end;
}

.ai-todo-week-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-todo-week-anchor-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-todo-week-anchor-controls .ai-todo-date-input {
    width: 168px;
    min-width: 168px;
}

.ai-todo-search-wrap {
    position: relative;
    width: min(220px, 24vw);
    min-width: 170px;
}

.ai-todo-search-field {
    background: rgba(255,255,255,0.94);
}

.ai-todo-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 35;
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.94);
    background: rgba(255,255,255,0.98);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.ai-todo-search-result-btn {
    display: grid;
    justify-items: start;
    gap: 4px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    text-align: left;
    background: rgba(248,250,252,0.96);
    color: #0f172a;
    box-shadow: none;
}

.ai-todo-search-result-btn:hover {
    background: rgba(239,246,255,0.98);
}

.ai-todo-search-result-meta,
.ai-todo-search-empty {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.ai-todo-search-empty {
    padding: 12px 14px;
}

.ai-todo-week-board,
.ai-notion-sync-card {
    display: grid;
    gap: 16px;
}

.ai-todo-week-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.ai-todo-week-board.is-focus-mode {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    align-items: stretch;
}

.ai-todo-week-board.is-focus-mode .ai-todo-week-section {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.ai-todo-week-board.is-focus-mode .ai-todo-week-section-header {
    width: 100%;
    box-sizing: border-box;
}

.ai-todo-week-section,
.ai-notion-sync-card {
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.96) 100%);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        0 14px 24px rgba(15, 23, 42, 0.05);
}

.ai-todo-week-section-span {
    grid-column: 1 / -1;
}

.ai-todo-week-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 12px;
    color: #eff6ff;
    font-weight: 800;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 34%),
        linear-gradient(135deg, #193955 0%, #2d5d84 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        0 16px 26px rgba(29, 78, 216, 0.12);
    overflow: hidden;
}

.ai-todo-week-section-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ai-todo-week-section-header.is-note {
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 34%),
        linear-gradient(135deg, #27493f 0%, #3f765f 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        0 16px 26px rgba(22, 101, 52, 0.12);
}

.ai-todo-week-section-header.is-done {
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 34%),
        linear-gradient(135deg, #475569 0%, #64748b 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        0 16px 26px rgba(71, 85, 105, 0.12);
}

.ai-todo-week-section.is-done-section {
    background: linear-gradient(180deg, rgba(248,250,252,0.98) 0%, rgba(241,245,249,0.94) 100%);
}

.ai-todo-week-section-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.ai-todo-week-section-day {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.ai-todo-week-section-date {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.88);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-todo-week-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.ai-todo-section-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.24);
    background: rgba(255,255,255,0.16);
    color: #f8fafc;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    animation: ai-todo-add-float 1.9s ease-in-out infinite;
}

.ai-todo-week-board.is-focus-mode .ai-todo-section-add-btn {
    width: 22px;
    min-width: 22px;
    height: 22px;
    font-size: 15px;
}

.ai-todo-section-add-btn:hover {
    background: rgba(255,255,255,0.24);
    color: #ffffff;
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.16);
}

.ai-todo-section-add-btn:active {
    transform: scale(0.96);
}

@keyframes ai-todo-add-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

.ai-todo-week-list {
    display: grid;
    gap: 6px;
    min-height: 220px;
    align-content: start;
    transition: box-shadow 0.18s ease, background-color 0.18s ease;
}

.ai-todo-week-list.is-drop-target {
    border-radius: 18px;
    background: rgba(239, 246, 255, 0.72);
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.16);
}

@media (max-width: 1180px) {
    .ai-todo-week-board.is-focus-mode {
        grid-template-columns: 1fr;
    }
}

.ai-todo-item {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
    cursor: grab;
}

.ai-todo-item:hover,
.ai-todo-item:focus-within {
    border-color: rgba(203, 213, 225, 0.9);
    background: rgba(255,255,255,0.86);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.ai-todo-item.is-selected {
    border-color: rgba(37, 99, 235, 0.36);
    background: rgba(239, 246, 255, 0.72);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.ai-todo-item.is-done {
    opacity: 0.72;
}

.ai-todo-item.is-note {
    background: transparent;
}

.ai-todo-item.is-high-priority {
    border-color: transparent;
    background: rgba(254,242,242,0.36);
    box-shadow: none;
}

.ai-todo-item.is-high-priority:hover,
.ai-todo-item.is-high-priority:focus-within {
    border-color: rgba(248, 113, 113, 0.38);
    background: rgba(255,245,245,0.88);
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.06);
}

.ai-todo-item.is-dragging {
    opacity: 0.68;
    transform: scale(0.985);
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.14);
}

.ai-todo-item.is-drop-before {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.4);
}

.ai-todo-item-header,
.ai-todo-item-footer,
.ai-todo-detail-actions,
.ai-todo-side-header,
.ai-notion-actions,
.ai-todo-history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-todo-item-header {
    margin-bottom: 0;
    flex-wrap: nowrap;
    align-items: center;
}

.ai-todo-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.ai-todo-item-title-wrap {
    min-width: 0;
    flex: 1;
}

.ai-todo-item-side-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.ai-todo-item-date-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.92);
    border: 1px solid rgba(191, 219, 254, 0.9);
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.ai-todo-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: rgba(248, 250, 252, 0.96);
    color: #64748b;
    line-height: 1;
    cursor: grab;
    box-shadow: none;
}

.ai-todo-drag-grip {
    display: block;
    width: 10px;
    height: 14px;
    opacity: 0.88;
    background-image:
        radial-gradient(circle, currentColor 1.2px, transparent 1.3px),
        radial-gradient(circle, currentColor 1.2px, transparent 1.3px);
    background-size: 4px 4px, 4px 4px;
    background-position: 0 0, 6px 0;
    background-repeat: repeat-y;
}

.ai-todo-drag-handle:hover {
    background: rgba(239, 246, 255, 0.98);
    color: #2563eb;
}

.ai-todo-checkbox {
    width: 15px;
    height: 15px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.ai-todo-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(100, 116, 139, 0);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.ai-todo-item:hover .ai-todo-delete-btn,
.ai-todo-item:focus-within .ai-todo-delete-btn {
    color: rgba(100, 116, 139, 0.45);
}

.ai-todo-delete-btn:hover {
    background: rgba(254, 242, 242, 0.94);
    color: #dc2626;
    transform: scale(1.04);
}

.ai-todo-item-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.ai-todo-inline-mention {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 1px 7px;
    margin: 0 2px 1px 0;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    background: rgba(241, 245, 249, 0.9);
    color: #94a3b8;
    font-size: inherit;
    font-weight: 500;
    line-height: 1.25;
    vertical-align: baseline;
    box-shadow: none;
}

.ai-todo-card .search-hint {
    display: none;
}

.ai-todo-item.is-done .ai-todo-item-title {
    text-decoration: line-through;
    color: #64748b;
}

.ai-todo-item-actions,
.ai-todo-mention-row,
.ai-notion-status-pills,
.ai-notion-field-grid,
.ai-todo-detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-todo-badge,
.ai-todo-mention,
.ai-notion-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.ai-todo-badge.is-high {
    background: rgba(254, 226, 226, 0.92);
    color: #b91c1c;
}

.ai-todo-badge.is-medium {
    background: rgba(219, 234, 254, 0.94);
    color: #1d4ed8;
}

.ai-todo-badge.is-low {
    background: rgba(220, 252, 231, 0.92);
    color: #166534;
}

.ai-todo-badge.is-status {
    background: rgba(241, 245, 249, 0.96);
    color: #475569;
}

.ai-todo-badge.is-archived {
    background: rgba(226, 232, 240, 0.96);
    color: #334155;
}

.ai-todo-mention {
    border: 1px solid rgba(203, 213, 225, 0.8);
    background: rgba(241, 245, 249, 0.9);
    color: #94a3b8;
    font-size: inherit;
    font-weight: 500;
    text-decoration: none;
}

.ai-todo-mention.is-unmatched {
    background: rgba(254, 242, 242, 0.96);
    border-color: rgba(252, 165, 165, 0.9);
    color: #b91c1c;
}

.ai-todo-mention.is-ambiguous {
    background: rgba(254, 249, 195, 0.96);
    border-color: rgba(253, 224, 71, 0.88);
    color: #92400e;
}

.ai-todo-mention:hover {
    filter: brightness(0.97);
}

.ai-todo-item-desc,
.ai-todo-detail-empty,
.ai-todo-history-empty {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.ai-todo-item-footer {
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.ai-todo-item-meta,
.ai-notion-sync-status,
.ai-todo-history-time {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.ai-todo-detail {
    display: grid;
    gap: 14px;
}

.ai-todo-detail textarea,
.ai-todo-detail input,
.ai-notion-sync-card textarea,
.ai-notion-sync-card input {
    width: 100%;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 16px;
    background: rgba(255,255,255,0.94);
    padding: 12px 14px;
    font: inherit;
    color: #0f172a;
}

.ai-todo-detail textarea,
.ai-notion-sync-card textarea {
    resize: vertical;
    min-height: 112px;
}

.ai-todo-detail textarea:focus,
.ai-todo-detail input:focus,
.ai-notion-sync-card textarea:focus,
.ai-notion-sync-card input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.48);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.10);
}

.ai-todo-history-list,
.ai-todo-mention-candidate-list {
    display: grid;
    gap: 10px;
}

.ai-todo-history-export,
.ai-todo-history-export-grid,
.ai-todo-history-summary-grid {
    display: grid;
    gap: 14px;
}

.ai-todo-history-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.ai-todo-history-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ai-todo-history-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-todo-history-summary-card {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255,255,255,0.94);
    display: grid;
    gap: 4px;
}

.ai-todo-history-summary-card span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.ai-todo-history-summary-card strong {
    color: #0f172a;
    font-size: 22px;
    font-weight: 800;
}

.ai-todo-export-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-todo-history-export-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-todo-history-item,
.ai-todo-mention-candidate {
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255,255,255,0.92);
}

.ai-todo-history-item.is-selected {
    border-color: rgba(37, 99, 235, 0.36);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.ai-todo-history-item strong,
.ai-todo-mention-candidate strong {
    color: #0f172a;
}

.ai-todo-history-desc,
.ai-todo-mention-candidate p {
    margin: 6px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.ai-notion-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ai-notion-status-pill.is-idle {
    background: rgba(241, 245, 249, 0.96);
    color: #475569;
}

.ai-notion-status-pill.is-synced {
    background: rgba(220, 252, 231, 0.92);
    color: #166534;
}

.ai-notion-status-pill.is-conflict,
.ai-notion-status-pill.is-error {
    background: rgba(254, 226, 226, 0.92);
    color: #b91c1c;
}

.ai-recommendation-action-btn {
    margin-top: 12px;
}

/* ── Compose Modal ─────────────────────────────────── */

.ai-todo-compose-modal-content {
    width: min(560px, 96vw);
}

.ai-todo-compose-modal-body {
    display: grid;
    gap: 16px;
    padding: 20px 24px 4px;
}

.ai-todo-compose-textarea {
    min-height: 120px;
    resize: vertical;
}

.ai-todo-compose-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

/* ── Detail Modal Improvements ─────────────────────── */

.ai-todo-detail-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ai-todo-placement-hint {
    margin: -4px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(239, 246, 255, 0.72);
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

@media (max-width: 680px) {
    .ai-todo-detail-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ai-todo-compose-fields {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

.ai-todo-detail-section {
    display: grid;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid rgba(226, 232, 240, 0.86);
}

.ai-todo-detail-actions {
    justify-content: flex-start;
}

.ai-todo-detail-textarea {
    min-height: 100px;
    resize: vertical;
}

.ai-todo-modal-content {
    width: min(980px, 96vw);
    max-height: 92vh;
}

.ai-todo-modal-body {
    display: grid;
    gap: 14px;
}

.ai-todo-export-modal-content {
    width: min(760px, 94vw);
}

.ai-todo-mention-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(226, 232, 240, 0.96);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.ai-todo-mention-suggestion-btn {
    display: grid;
    justify-items: start;
    gap: 3px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    color: #0f172a;
    background: rgba(248,250,252,0.96);
    box-shadow: none;
    text-align: left;
}

.ai-todo-mention-suggestion-btn:hover {
    background: rgba(239,246,255,0.98);
}

.ai-todo-mention-suggestion-meta {
