/* Collections Management UI Styles */

/* Collections Overlay */
.collections-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.collections-modal {
    background: white;
    border-radius: 1rem;
    width: 95%;
    max-width: 900px;
    max-height: 85vh;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

/* Modal Header */
.collections-modal .modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    flex-shrink: 0;
}

.collections-modal .modal-header h3 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
}

.collections-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 400;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

/* Collections Controls */
.collections-controls {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.collections-controls .primary-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collections-controls .primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.collections-controls .primary-btn:active {
    transform: translateY(0);
}

.pending-selection {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    animation: pulse 2s infinite;
}

/* Collections Body */
.collections-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem 2rem;
    background: #fafbfc;
}

/* Loading and Empty States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.loading-state::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-state p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.empty-state p:first-child {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.error-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #ef4444;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    margin: 1rem 0;
}

/* Collections List */
.collection-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
}

.collection-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.collection-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.collection-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.collection-item:hover::before {
    opacity: 1;
}

.collection-item > div:first-child {
    flex: 1;
    min-width: 0;
}

.collection-item h4 {
    margin: 0 0 0.75rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.collection-description {
    margin: 0 0 1rem 0;
    color: #64748b;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Collection Meta */
.collection-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.collection-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
}

.collection-meta span:first-child {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* Visibility Badges */
.visibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.visibility-badge.private {
    background: #f3f4f6;
    color: #374151;
}

.visibility-badge.shared {
    background: #dbeafe;
    color: #1e40af;
}

.visibility-badge.public {
    background: #dcfce7;
    color: #166534;
}

/* Collection Actions */
.collection-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.collection-actions button {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.collection-actions button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #f8fafc;
}

.collection-actions .primary-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.collection-actions .primary-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.collection-actions .secondary-btn {
    background: white;
    color: #64748b;
    border-color: #e2e8f0;
}

.collection-actions .secondary-btn:hover {
    background: #f8fafc;
    color: #374151;
    border-color: #cbd5e1;
}

.collection-actions .danger {
    color: #dc2626;
    border-color: #fecaca;
}

.collection-actions .danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

/* Collection Form Modal */
.collection-form-modal {
    max-width: 500px;
}

.collection-form {
    padding: 0;
}

.collection-form label {
    display: block;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #374151;
}

.collection-form label span {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.collection-form input,
.collection-form textarea,
.collection-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.collection-form input:focus,
.collection-form textarea:focus,
.collection-form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.collection-form textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn-secondary {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: #374151;
    border-color: #cbd5e1;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}   cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Dark Theme Support */
.theme-dark .collections-modal {
    background: #1e293b;
    color: #f1f5f9;
}

.theme-dark .collections-modal .modal-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #334155;
}

.theme-dark .collections-modal .modal-header h3 {
    color: #f1f5f9;
}

.theme-dark .collections-subtitle {
    color: #94a3b8;
}

.theme-dark .modal-close {
    color: #94a3b8;
}

.theme-dark .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.theme-dark .collections-controls {
    background: #1e293b;
    border-color: #334155;
}

.theme-dark .collections-body {
    background: #0f172a;
}

.theme-dark .collection-item {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

.theme-dark .collection-item:hover {
    border-color: #60a5fa;
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.15);
}

.theme-dark .collection-item h4 {
    color: #f1f5f9;
}

.theme-dark .collection-description {
    color: #94a3b8;
}

.theme-dark .collection-meta span {
    background: #334155;
    color: #94a3b8;
}

.theme-dark .collection-meta span:first-child {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    color: #dbeafe;
}

.theme-dark .visibility-badge.private {
    background: #374151;
    color: #d1d5db;
}

.theme-dark .visibility-badge.shared {
    background: #1e40af;
    color: #dbeafe;
}

.theme-dark .visibility-badge.public {
    background: #166534;
    color: #dcfce7;
}

.theme-dark .collection-actions {
    border-color: #334155;
}

.theme-dark .collection-actions button {
    background: #334155;
    color: #94a3b8;
    border-color: #475569;
}

.theme-dark .collection-actions button:hover {
    background: #475569;
    color: #f1f5f9;
    border-color: #60a5fa;
}

.theme-dark .collection-actions .secondary-btn {
    background: #334155;
    color: #94a3b8;
    border-color: #475569;
}

.theme-dark .collection-actions .secondary-btn:hover {
    background: #475569;
    color: #f1f5f9;
    border-color: #64748b;
}

.theme-dark .collection-actions .danger {
    color: #f87171;
    border-color: #7f1d1d;
}

.theme-dark .collection-actions .danger:hover {
    background: #7f1d1d;
    border-color: #991b1b;
    color: #fecaca;
}

.theme-dark .collection-form input,
.theme-dark .collection-form textarea,
.theme-dark .collection-form select {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.theme-dark .collection-form input:focus,
.theme-dark .collection-form textarea:focus,
.theme-dark .collection-form select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.theme-dark .modal-footer {
    border-color: #334155;
}

.theme-dark .btn-secondary {
    background: #334155;
    color: #94a3b8;
    border-color: #475569;
}

.theme-dark .btn-secondary:hover {
    background: #475569;
    color: #f1f5f9;
    border-color: #64748b;
}

.theme-dark .error-state {
    background: #7f1d1d;
    border-color: #991b1b;
    color: #fecaca;
}

.theme-dark .empty-state {
    color: #94a3b8;
}

.theme-dark .empty-state p:first-child {
    color: #f1f5f9;
}

.theme-dark .loading-state {
    color: #94a3b8;
}

/* Toast Notifications */
.collections-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.collections-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.collections-toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.collections-toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.collections-toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.collections-toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .collections-modal {
        width: 98%;
        max-height: 95vh;
        margin: 1rem;
        border-radius: 0.75rem;
    }

    .collections-modal .modal-header {
        padding: 1rem 1.5rem;
    }

    .collections-modal .modal-header h3 {
        font-size: 1.25rem;
    }

    .collections-controls {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .collections-controls .primary-btn {
        width: 100%;
        justify-content: center;
    }

    .collections-body {
        padding: 1rem 1.5rem 1.5rem;
    }

    .collection-item {
        padding: 1rem;
    }

    .collection-item h4 {
        font-size: 1.1rem;
    }

    .collection-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .collection-actions button {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .collections-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .collections-modal .modal-header {
        padding: 1rem;
    }

    .collections-controls {
        padding: 1rem;
    }

    .collections-body {
        padding: 1rem;
    }

    .collection-item {
        padding: 0.75rem;
    }

    .collection-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .collections-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Notes View Styles */
.notes-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    background: #fafbfc;
    min-height: 100vh;
}

.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.notes-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notes-header h2::before {
    content: '📝';
    font-size: 1.5rem;
}

.notes-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.notes-header .secondary-btn {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-header .secondary-btn:hover {
    background: #f1f5f9;
    color: #374151;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* Notes Filter */
.notes-filter {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 1.5rem;
    align-items: end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.filter-field select,
.filter-field input {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    background: white;
    transition: all 0.2s ease;
}

.filter-field select:focus,
.filter-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-field select:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Selection Toolbar */
.selection-toolbar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    animation: slideDown 0.3s ease-out;
}

.selection-toolbar span {
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selection-toolbar span::before {
    content: '✨';
}

.selection-toolbar .primary-btn {
    background: white;
    color: #2563eb;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selection-toolbar .primary-btn:hover:not(:disabled) {
    background: #f8fafc;
    transform: translateY(-1px);
}

.selection-toolbar .primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.selection-toolbar .secondary-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selection-toolbar .secondary-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Notes Content */
.notes-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

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

.notes-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notes-table tbody tr:hover {
    background: #f8fafc;
}

.notes-table tbody tr.select-mode {
    cursor: default;
}

.notes-table tbody tr:last-child {
    border-bottom: none;
}

.notes-table td {
    padding: 1.25rem 1.5rem;
    vertical-align: top;
}

.select-cell {
    width: 60px;
    padding-right: 1rem !important;
}

.select-cell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.note-reference {
    width: 200px;
    font-weight: 600;
    color: #2563eb;
    font-size: 0.875rem;
    white-space: nowrap;
}

.note-summary {
    color: #374151;
    line-height: 1.5;
    font-size: 0.875rem;
}

.note-actions {
    width: 180px;
    text-align: right;
}

.link-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    margin-left: 0.25rem;
}

.link-btn:hover {
    background: #f1f5f9;
    color: #374151;
}

.link-btn.danger {
    color: #dc2626;
}

.link-btn.danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* Empty State */
.notes-content .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.notes-content .empty-state::before {
    content: '📝';
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading State */
.notes-view.loading .notes-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #64748b;
    font-size: 0.875rem;
}

.loading-state::before {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark Theme Support for Notes */
.theme-dark .notes-view {
    background: #0f172a;
    color: #f1f5f9;
}

.theme-dark .notes-header {
    background: #1e293b;
    border-color: #334155;
}

.theme-dark .notes-header h2 {
    color: #f1f5f9;
}

.theme-dark .notes-header .secondary-btn {
    background: #334155;
    color: #94a3b8;
    border-color: #475569;
}

.theme-dark .notes-header .secondary-btn:hover {
    background: #475569;
    color: #f1f5f9;
    border-color: #64748b;
}

.theme-dark .notes-filter {
    background: #1e293b;
    border-color: #334155;
}

.theme-dark .filter-field label {
    color: #f1f5f9;
}

.theme-dark .filter-field select,
.theme-dark .filter-field input {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.theme-dark .filter-field select:focus,
.theme-dark .filter-field input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.theme-dark .filter-field select:disabled {
    background: #475569;
    color: #64748b;
}

.theme-dark .notes-content {
    background: #1e293b;
    border-color: #334155;
}

.theme-dark .notes-table tbody tr {
    border-color: #334155;
}

.theme-dark .notes-table tbody tr:hover {
    background: #334155;
}

.theme-dark .note-reference {
    color: #60a5fa;
}

.theme-dark .note-summary {
    color: #f1f5f9;
}

.theme-dark .link-btn {
    color: #94a3b8;
}

.theme-dark .link-btn:hover {
    background: #334155;
    color: #f1f5f9;
}

.theme-dark .link-btn.danger {
    color: #f87171;
}

.theme-dark .link-btn.danger:hover {
    background: #7f1d1d;
    color: #fecaca;
}

.theme-dark .notes-content .empty-state {
    color: #94a3b8;
}

.theme-dark .loading-state {
    color: #94a3b8;
}

/* Responsive Design for Notes */
@media (max-width: 768px) {
    .notes-view {
        padding: 0.5rem;
    }

    .notes-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }

    .notes-header-actions {
        width: 100%;
        justify-content: center;
    }

    .notes-filter {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .selection-toolbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }

    .notes-table {
        font-size: 0.8rem;
    }

    .notes-table td {
        padding: 0.75rem 0.5rem;
    }

    .note-reference {
        width: auto;
        min-width: 120px;
    }

    .note-actions {
        width: auto;
    }

    .link-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .notes-header h2 {
        font-size: 1.5rem;
    }

    .notes-header-actions {
        flex-direction: column;
        width: 100%;
    }

    .notes-header .secondary-btn {
        width: 100%;
        justify-content: center;
    }

    .notes-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .selection-toolbar {
        padding: 0.75rem;
    }
}