/* ============================================
   Admin User Notes Viewer - 관리자 전체 노트 조회
   ============================================ */
#admin-notes-viewer-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
}

#admin-notes-viewer-modal .anv-panel {
    width: 92vw;
    max-width: 1300px;
    height: 88vh;
    max-height: 900px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
#admin-notes-viewer-modal .anv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(135deg, #e65100, #ff8f00);
    color: #fff;
    flex-shrink: 0;
}
#admin-notes-viewer-modal .anv-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
#admin-notes-viewer-modal .anv-header h2 .material-icons {
    font-size: 1.3rem;
}
#admin-notes-viewer-modal .anv-header .anv-stats {
    font-size: 0.82rem;
    opacity: 0.9;
}
#admin-notes-viewer-modal .anv-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
#admin-notes-viewer-modal .anv-close-btn:hover {
    background: rgba(255,255,255,0.35);
}

/* Filter Bar */
#admin-notes-viewer-modal .anv-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
    align-items: flex-end;
    flex-shrink: 0;
}
#admin-notes-viewer-modal .anv-filter-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
#admin-notes-viewer-modal .anv-filter-group label {
    font-size: 0.7rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
#admin-notes-viewer-modal .anv-filter-group input,
#admin-notes-viewer-modal .anv-filter-group select {
    padding: 7px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    min-width: 120px;
    transition: border-color 0.2s;
}
#admin-notes-viewer-modal .anv-filter-group input:focus,
#admin-notes-viewer-modal .anv-filter-group select:focus {
    outline: none;
    border-color: #e65100;
    box-shadow: 0 0 0 2px rgba(230,81,0,0.12);
}
#admin-notes-viewer-modal .anv-filter-actions {
    display: flex;
    gap: 6px;
    align-self: flex-end;
}
#admin-notes-viewer-modal .anv-btn {
    padding: 7px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.2s;
}
#admin-notes-viewer-modal .anv-btn:hover {
    opacity: 0.85;
}
#admin-notes-viewer-modal .anv-btn-primary {
    background: #e65100;
    color: #fff;
}
#admin-notes-viewer-modal .anv-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

/* Main content area */
#admin-notes-viewer-modal .anv-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Notes List (Left Panel) */
#admin-notes-viewer-modal .anv-list-pane {
    width: 380px;
    min-width: 280px;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    background: #fdfdfd;
}
#admin-notes-viewer-modal .anv-list-scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}
#admin-notes-viewer-modal .anv-note-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s;
}
#admin-notes-viewer-modal .anv-note-item:hover {
    background: #f5f0eb;
}
#admin-notes-viewer-modal .anv-note-item.active {
    background: #fff3e0;
    border-left: 3px solid #e65100;
}
#admin-notes-viewer-modal .anv-note-item .anv-note-user {
    font-weight: 600;
    font-size: 0.88rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}
#admin-notes-viewer-modal .anv-note-item .anv-note-user .anv-type-badge {
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
}
.anv-type-badge.private { background: #e8eaf6; color: #3949ab; }
.anv-type-badge.open { background: #e8f5e9; color: #2e7d32; }
.anv-type-badge.ahpi { background: #fff3e0; color: #e65100; }

#admin-notes-viewer-modal .anv-note-item .anv-note-email {
    font-size: 0.75rem;
    color: #999;
    margin-top: 1px;
}
#admin-notes-viewer-modal .anv-note-item .anv-note-ref {
    font-size: 0.82rem;
    color: #555;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
#admin-notes-viewer-modal .anv-note-item .anv-note-ref .material-icons {
    font-size: 0.9rem;
    color: #aaa;
}
#admin-notes-viewer-modal .anv-note-item .anv-note-preview {
    font-size: 0.78rem;
    color: #777;
    margin-top: 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#admin-notes-viewer-modal .anv-note-item .anv-note-date {
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 4px;
}

/* Content Pane (Right) */
#admin-notes-viewer-modal .anv-content-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}
#admin-notes-viewer-modal .anv-content-header {
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    flex-shrink: 0;
}
#admin-notes-viewer-modal .anv-content-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.05rem;
    color: #333;
}
#admin-notes-viewer-modal .anv-content-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.78rem;
    color: #888;
}
#admin-notes-viewer-modal .anv-content-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}
#admin-notes-viewer-modal .anv-content-meta .material-icons {
    font-size: 0.85rem;
}
#admin-notes-viewer-modal .anv-content-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #333;
}
#admin-notes-viewer-modal .anv-content-body img {
    max-width: 100%;
    height: auto;
}
#admin-notes-viewer-modal .anv-content-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.95rem;
    gap: 8px;
}
#admin-notes-viewer-modal .anv-content-placeholder .material-icons {
    font-size: 2.5rem;
    color: #ddd;
}

/* Footer / Pagination */
#admin-notes-viewer-modal .anv-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    flex-shrink: 0;
    font-size: 0.82rem;
    color: #666;
}
#admin-notes-viewer-modal .anv-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}
#admin-notes-viewer-modal .anv-pagination button {
    padding: 5px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    font-size: 0.82rem;
    transition: background 0.15s;
}
#admin-notes-viewer-modal .anv-pagination button:hover:not(:disabled) {
    background: #f0f0f0;
}
#admin-notes-viewer-modal .anv-pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Loading state */
#admin-notes-viewer-modal .anv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #999;
    gap: 12px;
}
#admin-notes-viewer-modal .anv-spinner {
    width: 32px; height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #e65100;
    border-radius: 50%;
    animation: anv-spin 0.8s linear infinite;
}
@keyframes anv-spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
#admin-notes-viewer-modal .anv-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #bbb;
    gap: 8px;
}
#admin-notes-viewer-modal .anv-empty .material-icons {
    font-size: 3rem;
    color: #ddd;
}

/* Suspended note indicator */
#admin-notes-viewer-modal .anv-note-item.suspended {
    opacity: 0.55;
    background: #fff5f5;
}

/* Sort controls */
#admin-notes-viewer-modal .anv-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    font-size: 0.78rem;
    color: #888;
    flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #admin-notes-viewer-modal .anv-panel {
        width: 98vw;
        height: 95vh;
        border-radius: 8px;
    }
    #admin-notes-viewer-modal .anv-body {
        flex-direction: column;
    }
    #admin-notes-viewer-modal .anv-list-pane {
        width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: 40%;
    }
    #admin-notes-viewer-modal .anv-filters {
        padding: 8px 12px;
    }
    #admin-notes-viewer-modal .anv-filter-group input,
    #admin-notes-viewer-modal .anv-filter-group select {
        min-width: 90px;
    }
}

/* Night mode compatibility */
body.night-mode #admin-notes-viewer-modal .anv-panel {
    background: #1e1e1e;
    color: #ddd;
}
body.night-mode #admin-notes-viewer-modal .anv-header {
    background: linear-gradient(135deg, #bf360c, #e65100);
}
body.night-mode #admin-notes-viewer-modal .anv-filters {
    background: #252525;
    border-color: #444;
}
body.night-mode #admin-notes-viewer-modal .anv-filter-group label {
    color: #aaa;
}
body.night-mode #admin-notes-viewer-modal .anv-filter-group input,
body.night-mode #admin-notes-viewer-modal .anv-filter-group select {
    background: #333;
    border-color: #555;
    color: #ddd;
}
body.night-mode #admin-notes-viewer-modal .anv-list-pane {
    background: #222;
    border-color: #444;
}
body.night-mode #admin-notes-viewer-modal .anv-note-item {
    border-color: #333;
}
body.night-mode #admin-notes-viewer-modal .anv-note-item:hover {
    background: #2a2520;
}
body.night-mode #admin-notes-viewer-modal .anv-note-item.active {
    background: #332a1e;
    border-left-color: #ff8f00;
}
body.night-mode #admin-notes-viewer-modal .anv-note-item .anv-note-user { color: #ddd; }
body.night-mode #admin-notes-viewer-modal .anv-note-item .anv-note-ref { color: #aaa; }
body.night-mode #admin-notes-viewer-modal .anv-note-item .anv-note-preview { color: #888; }
body.night-mode #admin-notes-viewer-modal .anv-content-header {
    background: #252525;
    border-color: #444;
}
body.night-mode #admin-notes-viewer-modal .anv-content-header h3 { color: #eee; }
body.night-mode #admin-notes-viewer-modal .anv-content-body { color: #ddd; }
body.night-mode #admin-notes-viewer-modal .anv-footer {
    background: #252525;
    border-color: #444;
}
body.night-mode #admin-notes-viewer-modal .anv-pagination button {
    background: #333;
    border-color: #555;
    color: #ddd;
}
body.night-mode #admin-notes-viewer-modal .anv-sort-bar {
    background: #282828;
    border-color: #444;
    color: #999;
}
body.night-mode #admin-notes-viewer-modal .anv-btn-secondary {
    background: #444;
    color: #ddd;
}