/* Notes Advanced Page Styles */
:root {
    --primary-color: #8b5cf6;
    --primary-color-alpha: rgba(139, 92, 246, 0.1);
    --accent-color: #ef4444;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --hover-bg: #f3f4f6;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --dropdown-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    --input-bg: #ffffff;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: #1f2937;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --border-color: #374151;
        --hover-bg: #374151;
        --input-bg: #374151;
        --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        --dropdown-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    }
}

html {
    scroll-behavior: smooth;
}

.notes-advanced-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

/* Top Search Bar */
.notes-top-bar {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0, 0, 0, 0.08));
    border: 1px solid var(--border-color, #e5e7eb);
}

.search-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.notes-search-input {
    width: 100%;
    padding: 16px 20px 16px 56px !important;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    font-size: 16px;
    background: var(--input-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.notes-search-input:focus {
    outline: none;
    border-color: var(--primary-color, #8b5cf6);
    box-shadow: 0 0 0 3px var(--primary-color-alpha, rgba(139, 92, 246, 0.1));
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary, #6b7280);
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    box-shadow: var(--dropdown-shadow, 0 10px 25px rgba(0, 0, 0, 0.15));
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background: var(--hover-bg, #f3f4f6);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.search-stats {
    color: var(--text-secondary, #6b7280);
    font-size: 14px;
    white-space: nowrap;
}

/* Quick Filter Chips */
.quick-filter-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 25px;
    background: var(--card-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.filter-chip:hover {
    border-color: var(--primary-color, #8b5cf6);
    background: var(--primary-color-alpha, rgba(139, 92, 246, 0.05));
}

.filter-chip.active {
    background: var(--primary-color, #8b5cf6);
    color: white;
    border-color: var(--primary-color, #8b5cf6);
}

.selected-count {
    background: var(--accent-color, #ef4444);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    margin-left: 4px;
}

/* Main Content Layout */
.notes-main-content {
    display: grid;
    grid-template-columns: 280px 1fr 80px;
    gap: 24px;
    margin-bottom: 24px;
}

/* Left Filters Sidebar */
.notes-filters-sidebar {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0, 0, 0, 0.08));
    border: 1px solid var(--border-color, #e5e7eb);
    height: fit-content;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color, #e5e7eb) transparent;
}

.notes-filters-sidebar::-webkit-scrollbar {
    width: 6px;
}

.notes-filters-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.notes-filters-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color, #e5e7eb);
    border-radius: 3px;
}

.notes-filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary, #6b7280);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.filters-header h3 {
    margin: 0;
    color: var(--text-primary, #1f2937);
    font-size: 18px;
    font-weight: 600;
}

.reset-filters-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    font-size: 14px;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.reset-filters-btn:hover {
    background: var(--hover-bg, #f3f4f6);
    color: var(--text-primary, #1f2937);
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group-title {
    margin: 0 0 16px 0;
    color: var(--text-primary, #1f2937);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.filter-checkbox:hover {
    background: var(--hover-bg, #f3f4f6);
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color, #8b5cf6);
    border-color: var(--primary-color, #8b5cf6);
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

 .filter-checkbox span:last-child {
     color: var(--text-primary, #1f2937);
     font-size: 14px;
 }
 
 .role-icon {
     font-size: 16px;
     font-weight: bold;
     color: var(--primary-color, #8b5cf6);
     width: 20px;
     text-align: center;
     display: inline-block;
 }

/* A-Z Filter Grid */
.az-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.az-filter-btn {
    width: 100%;
    padding: 8px 4px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    background: var(--card-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.az-filter-btn:hover {
    background: var(--primary-color-alpha, rgba(139, 92, 246, 0.1));
    border-color: var(--primary-color, #8b5cf6);
}

.az-filter-btn.active {
    background: var(--primary-color, #8b5cf6);
    color: white;
    border-color: var(--primary-color, #8b5cf6);
}

/* Main Content Area */
.notes-content-main {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0, 0, 0, 0.08));
    border: 1px solid var(--border-color, #e5e7eb);
    min-height: calc(100vh - 200px);
}

.section-title {
    margin: 0 0 20px 0;
    color: var(--text-primary, #1f2937);
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Popular Notes Section */
.popular-notes-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.popular-notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Notes Grid Header */
.notes-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.view-controls {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--card-bg, #ffffff);
    color: var(--text-secondary, #6b7280);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: var(--hover-bg, #f3f4f6);
}

.view-btn.active {
    background: var(--primary-color, #8b5cf6);
    color: white;
    border-color: var(--primary-color, #8b5cf6);
}

/* Notes Grid Container */
.notes-grid-container {
    min-height: 400px;
    position: relative;
}

/* Letter Groups */
.notes-letter-group {
    margin-bottom: 32px;
}

@keyframes highlightLetter {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
}

.letter-header {
    margin: 0 0 20px 0;
    color: var(--text-primary, #1f2937);
    font-size: 24px;
    font-weight: 700;
    padding: 16px 20px;
    background: var(--primary-color-alpha, rgba(139, 92, 246, 0.05));
    border-radius: 12px;
    border-left: 4px solid var(--primary-color, #8b5cf6);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Letter Groups */
.notes-letter-group {
    margin-bottom: 32px;
}

@keyframes highlightLetter {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
}

.letter-header {
    margin: 0 0 20px 0;
    color: var(--text-primary, #1f2937);
    font-size: 24px;
    font-weight: 700;
    padding: 16px 20px;
    background: var(--primary-color-alpha, rgba(139, 92, 246, 0.05));
    border-radius: 12px;
    border-left: 4px solid var(--primary-color, #8b5cf6);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Note List Item Styles */
.note-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.note-list-item:hover {
    transform: translateX(4px);
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0, 0, 0, 0.12));
    border-color: var(--primary-color, #8b5cf6);
}

.note-list-item.selected {
    border-color: var(--primary-color, #8b5cf6);
    background: var(--primary-color-alpha, rgba(139, 92, 246, 0.05));
}

.note-list-item__icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color-alpha, rgba(139, 92, 246, 0.1));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color, #8b5cf6);
    font-size: 16px;
    flex-shrink: 0;
}

.note-list-item__content {
    flex: 1;
}

.note-list-item__title {
    margin: 0 0 4px 0;
    color: var(--text-primary, #1f2937);
    font-size: 16px;
    font-weight: 600;
}

.note-list-item__description {
    margin: 0;
    color: var(--text-secondary, #6b7280);
    font-size: 14px;
    line-height: 1.4;
}

/* Note Card Styles */
.note-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow, 0 8px 25px rgba(0, 0, 0, 0.12));
    border-color: var(--primary-color, #8b5cf6);
}

.note-card.selected {
    border-color: var(--primary-color, #8b5cf6);
    background: var(--primary-color-alpha, rgba(139, 92, 246, 0.05));
}

.note-card__icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color-alpha, rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary-color, #8b5cf6);
    font-size: 20px;
}

.note-card__title {
    margin: 0 0 8px 0;
    color: var(--text-primary, #1f2937);
    font-size: 16px;
    font-weight: 600;
}

.note-card__description {
    margin: 0 0 16px 0;
    color: var(--text-secondary, #6b7280);
    font-size: 14px;
    line-height: 1.5;
}

.note-card__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.note-tag {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: var(--tag-bg, #f3f4f6);
    color: var(--text-secondary, #6b7280);
}

.note-tag--longevity {
    background: var(--success-color-alpha, rgba(34, 197, 94, 0.1));
    color: var(--success-color, #16a34a);
}

.note-tag--time {
    background: var(--warning-color-alpha, rgba(245, 158, 11, 0.1));
    color: var(--warning-color, #d97706);
}

.note-tag--season {
    background: var(--info-color-alpha, rgba(59, 130, 246, 0.1));
    color: var(--info-color, #2563eb);
}

/* Right A-Z Index */
.notes-az-index {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0, 0, 0, 0.08));
    border: 1px solid var(--border-color, #e5e7eb);
    height: fit-content;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color, #e5e7eb) transparent;
}

.notes-az-index::-webkit-scrollbar {
    width: 6px;
}

.notes-az-index::-webkit-scrollbar-track {
    background: transparent;
}

.notes-az-index::-webkit-scrollbar-thumb {
    background: var(--border-color, #e5e7eb);
    border-radius: 3px;
}

.notes-az-index::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary, #6b7280);
}

.az-index-header h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary, #1f2937);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    width: 100%;
}

.az-index-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.az-index-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    transition: all 0.2s ease;
}

.az-index-item:hover {
    background: var(--hover-bg, #f3f4f6);
    color: var(--text-primary, #1f2937);
}

.az-index-item.active {
    background: var(--primary-color, #8b5cf6);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Bottom Selected Notes Tray */
.selected-notes-tray {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg, #ffffff);
    border-top: 1px solid var(--border-color, #e5e7eb);
    box-shadow: var(--card-shadow, 0 -4px 20px rgba(0, 0, 0, 0.1));
    z-index: 1000;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.selected-notes-tray.active {
    transform: translateY(0);
}

.tray-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tray-header h3 {
    margin: 0;
    color: var(--text-primary, #1f2937);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tray-actions {
    display: flex;
    gap: 12px;
}

.tray-btn {
    padding: 10px 16px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--card-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tray-btn:hover {
    background: var(--hover-bg, #f3f4f6);
}

.tray-btn.primary {
    background: var(--primary-color, #8b5cf6);
    color: white;
    border-color: var(--primary-color, #8b5cf6);
}

.tray-btn.primary:hover {
    background: var(--primary-color-dark, #7c3aed);
}

.selected-notes-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.selected-note-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--primary-color-alpha, rgba(139, 92, 246, 0.1));
    border: 1px solid var(--primary-color, #8b5cf6);
    border-radius: 20px;
    color: var(--primary-color, #8b5cf6);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.remove-note-btn {
    background: none;
    border: none;
    color: var(--primary-color, #8b5cf6);
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.remove-note-btn:hover {
    background: var(--primary-color, #8b5cf6);
    color: white;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-secondary, #6b7280);
    font-size: 16px;
}

/* Modal Styles */
.mobile-filters-modal,
.note-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary, #1f2937);
    font-size: 20px;
    font-weight: 600;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    background: var(--hover-bg, #f3f4f6);
    color: var(--text-primary, #1f2937);
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 20px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--card-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: var(--hover-bg, #f3f4f6);
}

.modal-btn.primary {
    background: var(--primary-color, #8b5cf6);
    color: white;
    border-color: var(--primary-color, #8b5cf6);
}

.modal-btn.primary:hover {
    background: var(--primary-color-dark, #7c3aed);
}

.modal-btn.secondary {
    background: var(--secondary-bg, #f9fafb);
    color: var(--text-secondary, #6b7280);
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: #1f2937;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --border-color: #374151;
        --hover-bg: #374151;
        --input-bg: #111827;
        --primary-color: #a78bfa;
        --primary-color-dark: #8b5cf6;
        --primary-color-alpha: rgba(167, 139, 250, 0.1);
        --accent-color: #f87171;
        --success-color: #4ade80;
        --success-color-alpha: rgba(74, 222, 128, 0.1);
        --warning-color: #fbbf24;
        --warning-color-alpha: rgba(251, 191, 36, 0.1);
        --info-color: #60a5fa;
        --info-color-alpha: rgba(96, 165, 250, 0.1);
        --tag-bg: #374151;
        --secondary-bg: #374151;
        --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        --dropdown-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .notes-main-content {
        grid-template-columns: 250px 1fr 60px;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .notes-main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .notes-filters-sidebar {
        position: static;
        order: 2;
    }
    
    .notes-az-index {
        display: none;
    }
    
    .notes-top-bar {
        padding: 20px;
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .search-stats {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .notes-advanced-page {
        padding: 16px;
    }
    
    .notes-top-bar {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .quick-filter-chips {
        gap: 8px;
    }
    
    .filter-chip {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .notes-content-main {
        padding: 16px;
    }
    
    .popular-notes-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .tray-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .tray-actions {
        justify-content: center;
    }
    
    .modal-content {
        margin: 20px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
    }
}

@media (max-width: 480px) {
    .notes-advanced-page {
        padding: 12px;
    }
    
    .notes-top-bar {
        padding: 16px 12px;
    }
    
    .notes-content-main {
        padding: 16px 12px;
    }
    
    .popular-notes-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-chip {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .tray-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .tray-btn {
        width: 100%;
        justify-content: center;
    }
}
