/* ==================== Additional Styles for Improvements ==================== */

/* Focus Visible Improvements */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.nav-item:focus-visible {
    outline: 2px solid white;
    outline-offset: -2px;
}

/* Improved Checkbox Focus */
.task-checkbox:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Toast Notifications */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast {
    animation: slideIn 0.3s ease;
}

/* Improved Modal Accessibility */
.modal {
    backdrop-filter: blur(4px);
}

.modal[aria-hidden="true"] {
    display: none;
}

/* Disabled State for Undo/Redo */
.sidebar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sidebar-btn:disabled:hover {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* Improved Task Item Keyboard Navigation */
.day-task-item[tabindex="0"]:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    background: var(--bg-hover);
}

.matrix-task-item[tabindex="0"]:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    background: var(--bg-hover);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1a1a1a;
        --bg-card: #2a2a2a;
        --text-primary: #ffffff;
        --border-color: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-add-btn,
    .modal,
    .toast {
        animation: none;
    }
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Improved Empty States */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
    font-size: 15px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 2px dashed var(--border-color);
}

/* Print Styles */
@media print {
    .sidebar,
    .floating-add-btn,
    .timer-widget {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .tab-content {
        display: block !important;
        page-break-after: always;
    }

    body {
        background: white;
        color: black;
    }
}

/* ==================== Bid Tracker Styles ==================== */

.bid-tracker-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Bid Input Section */
.bid-input-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.bid-input-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.bid-tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.bid-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.bid-tab-btn.active {
    color: var(--accent-primary);
    background: var(--bg-card);
}

.bid-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
}

.bid-input-form {
    display: none;
    padding: 24px;
}

.bid-input-form.active {
    display: block;
}

.bid-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Form Elements */
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    resize: vertical;
    min-height: 200px;
    transition: all 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-select-sm {
    padding: 8px 12px;
    font-size: 13px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 140px;
}

/* Bids List Section */
.bids-list-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.bids-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.bids-list-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.bid-filters {
    display: flex;
    gap: 12px;
}

.bids-table-container {
    overflow-x: auto;
}

.bids-table {
    width: 100%;
    border-collapse: collapse;
}

.bids-table th,
.bids-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.bids-table th {
    background: var(--bg-primary);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bids-table td {
    font-size: 14px;
    color: var(--text-primary);
}

.bids-table tbody tr {
    transition: background 0.2s ease;
}

.bids-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Bid Status Badges */
.bid-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bid-status-badge.researching {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

.bid-status-badge.preparing {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.bid-status-badge.submitted {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
}

.bid-status-badge.won {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.bid-status-badge.lost {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.bid-status-badge.no-bid {
    background: rgba(100, 116, 139, 0.2);
    color: #64748b;
}

/* Bid Actions */
.bid-actions {
    display: flex;
    gap: 8px;
}

.bid-action-btn {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bid-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.bid-action-btn.download-ics {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.bid-action-btn.download-ics:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}

/* Empty Bids State */
.empty-bids-state {
    display: none;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-bids-state.visible {
    display: block;
}

.empty-bids-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}

/* Bid Deadlines Section */
.bid-deadlines-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.bid-deadlines-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.deadlines-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deadline-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--accent-primary);
    transition: all 0.2s ease;
}

.deadline-item:hover {
    transform: translateX(4px);
    background: var(--bg-hover);
}

.deadline-item.urgent {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.deadline-item.warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.deadline-item.internal {
    border-left-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.deadline-date {
    min-width: 100px;
    text-align: center;
}

.deadline-date .day {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.deadline-date .month-year {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.deadline-date .time {
    font-size: 12px;
    color: var(--accent-primary);
    font-weight: 600;
    margin-top: 4px;
}

.deadline-info {
    flex: 1;
}

.deadline-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.deadline-project {
    font-size: 13px;
    color: var(--text-secondary);
}

.deadline-countdown {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.deadline-countdown.urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.deadline-countdown.soon {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

/* Empty Deadlines */
.empty-deadlines {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Bid Modal Specific */
.bid-modal-content {
    max-width: 700px;
}

/* Bid Date Display */
.bid-date {
    font-size: 13px;
}

.bid-date.overdue {
    color: #ef4444;
    font-weight: 600;
}

.bid-date.upcoming {
    color: #f59e0b;
}

/* Responsive Bid Tracker */
@media (max-width: 768px) {
    .bid-input-tabs {
        flex-direction: column;
    }

    .bid-tab-btn.active::after {
        display: none;
    }

    .bids-list-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .bids-table th,
    .bids-table td {
        padding: 10px 12px;
        font-size: 12px;
    }

    .bids-table th:nth-child(4),
    .bids-table td:nth-child(4) {
        display: none;
    }

    .bid-actions {
        flex-direction: column;
    }

    .deadline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .deadline-date {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: unset;
    }

    .deadline-date .day {
        font-size: 18px;
    }
}

/* ==================== File Drop Zone Styles ==================== */

.file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.file-drop-zone:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.file-drop-zone.drag-over {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.01);
}

.drop-zone-content {
    pointer-events: none;
}

.drop-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.7;
}

.file-drop-zone h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.file-drop-zone p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.drop-hint {
    margin-top: 12px !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
}

/* File Status */
.file-status {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 16px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.file-icon {
    font-size: 24px;
}

.file-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove-file {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
}

.btn-remove-file:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Extraction Progress */
.extraction-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 120px;
}

/* Extracted Preview */
.extracted-preview {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.extracted-preview h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.preview-item {
    padding: 12px;
    background: var(--bg-card);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
}

.preview-item.empty {
    border-left-color: var(--text-muted);
    opacity: 0.6;
}

.preview-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.preview-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.preview-value.not-found {
    color: var(--text-muted);
    font-style: italic;
}

/* Processing Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.processing .drop-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .file-drop-zone {
        padding: 32px 16px;
    }

    .drop-icon {
        font-size: 36px;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== Matrix-Calendar Connection Styles ==================== */

/* Time badge for matrix tasks */
.task-time-badge {
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(139, 92, 246, 0.15);
    padding: 3px 7px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Make date badge clickable */
.task-scheduled-link {
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.task-scheduled-link:hover {
    background: rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.task-scheduled-link:active {
    transform: translateY(0);
}

/* Calendar link button on matrix task items */
.matrix-cal-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
    color: var(--text-secondary);
}

.matrix-cal-link-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

/* Schedule button for unscheduled matrix tasks */
.matrix-schedule-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.matrix-schedule-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    border-style: solid;
}

/* Inline date picker in matrix */
.matrix-inline-date {
    font-size: 12px;
    padding: 3px 6px;
    border: 1px solid var(--accent-primary);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    max-width: 140px;
}

.matrix-inline-date:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* ==================== Duplicate Merge Modal ==================== */
/* Duplicate Merge Modal — constrain height & enable scrolling */
#duplicateMergeModal .modal-content {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

#duplicateMergeModal .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

#duplicateMergeModal .modal-footer {
    flex-shrink: 0;
}

.duplicate-intro {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.duplicate-group {
    background: var(--bg-tertiary, rgba(255,255,255,0.03));
    border: 1px solid var(--border-color, #333);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}

.duplicate-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color, #333);
}

.duplicate-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.duplicate-group-date {
    font-size: 0.8rem;
    color: var(--text-muted, #888);
    background: var(--bg-card, #1e1e2e);
    padding: 2px 8px;
    border-radius: 6px;
}

.duplicate-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    margin-bottom: 4px;
}

.duplicate-item:hover {
    background: rgba(99, 102, 241, 0.08);
}

.duplicate-item.selected {
    background: rgba(99, 102, 241, 0.14);
    border-color: var(--accent-primary, #6366f1);
}

.duplicate-item input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--accent-primary, #6366f1);
    cursor: pointer;
}

.duplicate-item-info {
    flex: 1;
    min-width: 0;
}

.duplicate-item-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    word-break: break-word;
}

.duplicate-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted, #888);
}

.duplicate-item-meta span {
    background: var(--bg-card, #1e1e2e);
    padding: 1px 6px;
    border-radius: 4px;
}

.duplicate-item-meta .dup-source-eisenhower {
    color: #6366f1;
}

.duplicate-item-meta .dup-source-daily {
    color: #22c55e;
}

.duplicate-item-meta .dup-source-google {
    color: #4285f4;
}

.duplicate-keep-badge {
    display: none;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: #22c55e;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.duplicate-item.selected .duplicate-keep-badge {
    display: inline-block;
}

.duplicate-remove-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted, #888);
    background: rgba(239, 68, 68, 0.15);
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.duplicate-item.selected .duplicate-remove-badge {
    display: none;
}

.duplicate-no-results {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted, #888);
}

.duplicate-no-results-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.duplicate-count-badge {
    display: inline-block;
    background: var(--accent-primary, #6366f1);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.duplicate-help-hint {
    font-size: 0.8rem;
    color: var(--text-muted, #888);
    background: var(--bg-tertiary, rgba(255,255,255,0.03));
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    text-align: center;
}

.duplicate-item-meta .dup-source-outlook {
    color: #0078d4;
}

/* ==================== Connected Accounts Overview ==================== */
.connected-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-accounts-hint {
    color: var(--text-muted, #888);
    font-size: 0.85rem;
    text-align: center;
    padding: 12px;
}

.connected-account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg-tertiary, rgba(255,255,255,0.03));
    border-left: 3px solid var(--acct-color, #6366f1);
}

.connected-account-item .acct-icon {
    font-size: 1.3rem;
}

.connected-account-item .acct-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.connected-account-item .acct-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.connected-account-item .acct-status {
    font-size: 0.75rem;
    color: #22c55e;
    font-weight: 500;
}

/* Edit task button */
.edit-task-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.edit-task-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

/* Task name editable cursor hint */
.task-name {
    cursor: pointer;
}
.task-name:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 2px;
}
.task-text:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 2px;
}

/* Undo toast */
.undo-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary, #1e1e2e);
    color: var(--text-primary, #fff);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    animation: slideUp 0.3s ease;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
}
.undo-toast button {
    background: var(--accent-primary, #6366f1);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}
.undo-toast button:hover {
    filter: brightness(1.15);
}
@keyframes slideUp {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Mobile modal improvements */
@media (max-width: 480px) {
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 100vh;
        border-radius: 0 !important;
        margin: 0;
    }
    .day-task-item-detail {
        padding: 10px 8px;
    }
    .task-actions button {
        min-width: 36px;
        min-height: 36px;
    }
    .gantt-bar {
        min-height: 30px;
    }
    .calendar-day {
        min-height: 50px;
    }
}

/* Editable note title input */
.note-editor-title-input {
    width: 100%;
    font-size: 1.3rem;
    font-weight: 700;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-primary);
    padding: 6px 2px;
    margin-bottom: 4px;
    outline: none;
    transition: border-color 0.2s;
}
.note-editor-title-input:focus {
    border-bottom-color: var(--accent-primary, #6366f1);
}
.note-editor-title-input::placeholder {
    color: var(--text-muted);
}
