/* ============================================
   Стили для раздела Заметки (Notes)
   ============================================ */

/* Контейнер страницы заметок */
.notes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Заголовок с поиском */
.page-title-with-search {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.inline-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.inline-search i {
    color: #718096;
    font-size: 1.1rem;
}

.inline-search-input {
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
    min-width: 250px;
}

.inline-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Панель инструментов */
.notes-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.toolbar-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.toolbar-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    font-size: 1.1rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Кнопка создания заметки */
.btn-create-note {
    --gradient-from: #43e97b;
    --gradient-to: #38f9d7;
    --icon-color: #43e97b;
    min-width: 180px;
}

/* Сетка заметок */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Карточка заметки */
.note-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

.note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.note-title-wrapper {
    flex: 1;
}

.note-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.note-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge-public {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.badge-password {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.badge-shared {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.badge-attachments {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.note-visibility {
    font-size: 0.75rem;
    color: #718096;
    padding: 0.25rem 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
    white-space: nowrap;
}

.note-card-content {
    margin-bottom: 1rem;
}

.note-preview {
    color: #4a5568;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.note-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.note-date {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #718096;
}

.note-date i {
    font-size: 0.875rem;
}

.note-owner {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #4a5568;
    font-weight: 500;
}

.note-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #4a5568;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn-icon:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.btn-icon i {
    font-size: 1rem;
}

/* Общая заметка */
.shared-note-card {
    border-left: 3px solid #667eea;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #e8f4fd 0%, #f0e6ff 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.empty-icon i {
    font-size: 3rem;
    color: #667eea;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #718096;
    margin-bottom: 1.5rem;
}

/* Состояние загрузки */
.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

/* Секция общих заметок */
.shared-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.section-title-with-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.section-title-with-icon i {
    color: #667eea;
}

/* Страница редактора заметок */
.note-editor-container {
    max-width: 900px;
    margin: 0 auto;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.editor-title-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.editor-title-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.editor-content {
    margin: 1.5rem 0;
}

.editor-content.full-width {
    width: 100%;
}

.editor-content.full-width .textarea-wrapper {
    width: 100%;
}

.editor-content.full-width .modern-textarea {
    width: 100%;
    min-height: 300px;
    resize: vertical;
}

.editor-content.full-width .textarea-wrapper.full-width {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.editor-content.full-width .modern-textarea.full-width-textarea {
    width: 100%;
    min-height: 400px;
    resize: vertical;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    padding: 1rem;
    border: 2px solid #764ba2;
    border-radius: 12px;
    background: #fafbfc;
    box-shadow: 0 2px 8px rgba(118, 75, 162, 0.1);
    transition: all 0.3s ease;
}

.editor-content.full-width .modern-textarea.full-width-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

/* Панель форматирования текста */
.text-formatting-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    align-items: center;
}

/* Drag-and-Drop зона */
.dropzone-container {
    width: 100%;
}

.dropzone {
    border: 3px dashed #cbd5e0 !important;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.dropzone:hover {
    border-color: #667eea !important;
    background-color: #f0f4ff !important;
}

.dropzone.drag-over {
    border-color: #43e97b !important;
    background-color: rgba(67, 233, 123, 0.1) !important;
    transform: scale(1.02);
}

.dropzone i {
    transition: all 0.3s ease;
}

.dropzone:hover i {
    transform: scale(1.1);
}

.toolbar-group {
    display: flex;
    gap: 0.25rem;
    padding-right: 0.75rem;
    border-right: 2px solid #cbd5e0;
}

.toolbar-group:last-child {
    border-right: none;
}

.font-size-select {
    padding: 0.5rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #2d3748;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.font-size-select:hover {
    border-color: #667eea;
}

.font-size-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.toolbar-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.toolbar-btn:active {
    transform: translateY(0);
}

/* Кнопки работы с текстом (как в StringConversion) */
.text-conversion-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.convert-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: white;
}

.convert-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--gradient-from) 0%, var(--gradient-to) 100%);
    opacity: 0.1;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.convert-btn i,
.convert-btn span,
.convert-btn small {
    position: relative;
    z-index: 1;
}

.convert-btn i {
    font-size: 1.5rem;
    color: var(--icon-color);
}

.convert-btn span {
    color: #2d3748;
    font-size: 1rem;
}

.convert-btn small {
    font-size: 0.75rem;
    color: #a0aec0;
    font-weight: 400;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.convert-btn:hover:not(:disabled)::before {
    opacity: 0.2;
}

.convert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Варианты кнопок */
.btn-lower {
    --gradient-from: #4facfe;
    --gradient-to: #00f2fe;
    --icon-color: #4facfe;
}

.btn-upper {
    --gradient-from: #f093fb;
    --gradient-to: #f5576c;
    --icon-color: #f5576c;
}

.btn-title {
    --gradient-from: #43e97b;
    --gradient-to: #38f9d7;
    --icon-color: #43e97b;
}

.btn-sentence {
    --gradient-from: #fa709a;
    --gradient-to: #fee140;
    --icon-color: #fa709a;
}

.btn-alternate {
    --gradient-from: #a8edea;
    --gradient-to: #fed6e3;
    --icon-color: #a8edea;
}

.btn-inverse {
    --gradient-from: #667eea;
    --gradient-to: #764ba2;
    --icon-color: #667eea;
}

.btn-trim {
    --gradient-from: #4facfe;
    --gradient-to: #00f2fe;
    --icon-color: #4facfe;
}

.btn-remove-spaces {
    --gradient-from: #f093fb;
    --gradient-to: #f5576c;
    --icon-color: #f5576c;
}

.editor-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

/* Индикатор сохранения */
.save-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    width: fit-content;
}

.save-indicator.saving {
    color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.save-indicator.saved {
    color: #48bb78;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1) 0%, rgba(72, 187, 120, 0.05) 100%);
}

.save-indicator i {
    font-size: 0.875rem;
}

.save-indicator.saving i {
    animation: spin 1s linear infinite;
}

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

/* Настройки видимости */
.visibility-settings {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-radius: 12px;
}

.settings-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.settings-title i {
    color: #667eea;
}

.visibility-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.visibility-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.visibility-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.visibility-option.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.visibility-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.visibility-option.selected .visibility-option-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.visibility-option-icon i {
    font-size: 1.5rem;
    color: #667eea;
}

.visibility-option.selected .visibility-option-icon i {
    color: white;
}

.visibility-option-content {
    flex: 1;
    min-width: 0;
}

.visibility-option-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.visibility-option-description {
    font-size: 0.75rem;
    color: #718096;
    line-height: 1.4;
}

/* Опция шифрования */
.encryption-option {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1) 0%, rgba(56, 249, 215, 0.1) 100%);
    border: 2px solid #43e97b;
    border-radius: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    color: #2d3748;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #43e97b;
}

.checkbox-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-text i {
    color: #43e97b;
}

.checkbox-description {
    font-size: 0.875rem;
    color: #718096;
    margin: 0.5rem 0 0 2rem;
}

/* Секция установки пароля */
.password-setup-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.1) 0%, rgba(254, 225, 64, 0.1) 100%);
    border: 2px solid #fa709a;
    border-radius: 12px;
    text-align: center;
}

/* Модальное окно пароля */
.password-modal {
    max-width: 500px;
}

.share-modal {
    max-width: 500px;
}

.password-modal .form-group {
    margin-bottom: 1.5rem;
}

/* Список пользователей с общим доступом */
.shared-users-list {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid #e2e8f0;
}

.shared-users-list h4 {
    font-size: 0.95rem;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.shared-user-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.shared-user-item i {
    color: #667eea;
}

.shared-user-item span {
    flex: 1;
    font-size: 0.9rem;
    color: #2d3748;
}

.remove-user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #dc3545;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-user-btn:hover {
    background: rgba(220, 53, 69, 0.1);
}

.remove-user-btn i {
    font-size: 1rem;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    border: 2px solid #dc3545;
    border-radius: 8px;
    color: #dc3545;
    font-size: 0.875rem;
}

.error-message i {
    font-size: 1.25rem;
}

/* Панель вложений */
.attachments-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
}

.attachments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.attachments-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.attachment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8fafc;
    border-radius: 6px;
}

.attachment-icon i {
    font-size: 1.25rem;
    color: #667eea;
}

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

.attachment-name {
    font-size: 0.875rem;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-size {
    font-size: 0.75rem;
    color: #718096;
}

/* Модальное окно доступа */
.access-modal-content {
    padding: 2rem;
}

.access-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.access-option:hover {
    background: #edf2f7;
}

.access-option.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid #667eea;
}

.access-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.access-option-icon i {
    font-size: 1.5rem;
    color: #667eea;
}

.access-option-content {
    flex: 1;
}

.access-option-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.access-option-description {
    font-size: 0.875rem;
    color: #718096;
}

/* ============================================
   Стили для просмотра заметки (NoteViewer)
   ============================================ */

.note-view-mode {
    padding: 2.5rem;
    width: 100%;
    max-width: 100%;
}

/* Textarea на всю ширину в режиме редактирования */
.note-edit-mode {
    width: 100%;
}

.note-edit-mode .edit-form {
    width: 100%;
}

.note-edit-mode .edit-form .form-group .textarea-wrapper {
    width: 100%;
}

.note-edit-mode .edit-form .form-group .textarea-wrapper .modern-textarea.full-width-textarea {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
}

.note-header {
    margin-bottom: 1.5rem;
}

.note-view-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.note-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 1rem;
}

.note-divider {
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    margin: 1.5rem 0;
}

.note-content-display {
    line-height: 1.8;
    color: #2d3748;
    font-size: 1.05rem;
    margin: 1.5rem 0;
    min-height: 200px;
    padding: 1.5rem;
    background: #fafbfc;
    border: 2px solid #764ba2;
    border-radius: 12px;
    box-shadow: inset 0 2px 8px rgba(118, 75, 162, 0.1);
}

.note-content-display h1 {
    font-size: 2rem;
    color: #667eea;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #764ba2;
}

.note-content-display h2 {
    font-size: 1.75rem;
    color: #764ba2;
    margin: 1.25rem 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #a890d0;
}

.note-content-display p {
    margin-bottom: 1rem;
}

.note-content-display ul,
.note-content-display ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.note-content-display li {
    margin-bottom: 0.5rem;
}

.note-content-display strong {
    font-weight: 700;
    color: #2d3748;
}

.note-content-display em {
    font-style: italic;
    color: #4a5568;
}

.note-content-display u {
    text-decoration: underline;
}

/* Кнопки действий в ряд */
.note-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
    gap: 1rem;
    flex-wrap: wrap;
}

.note-actions-bar .convert-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.note-actions-bar .convert-btn i {
    font-size: 1.1rem;
}

.note-actions-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-back {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
    border: 3px solid #d946a6; /* Тёмно-розовый */
}

.btn-back:hover {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border-color: #ff69b4; /* Ярко-розовый при наведении */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 70, 166, 0.4);
}

.note-actions-group .convert-btn {
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.note-actions-group .convert-btn.btn-primary {
    border-color: #43e97b; /* Ярко-зелёный */
}

.note-actions-group .convert-btn.btn-primary:hover {
    border-color: #38f9d7;
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.4);
}

.note-actions-group .convert-btn.btn-warning {
    border-color: #9b59b6; /* Ярко-фиолетовый */
}

.note-actions-group .convert-btn.btn-warning:hover {
    border-color: #8e44ad;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

.note-actions-group .convert-btn.btn-success {
    border-color: #f1c40f; /* Тёплый жёлтый с оттенком зелёного */
}

.note-actions-group .convert-btn.btn-success:hover {
    border-color: #f39c12;
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.4);
}

.note-actions-group .convert-btn.btn-danger {
    border-color: #e91e63; /* Ярко-пурпурный */
}

.note-actions-group .convert-btn.btn-danger:hover {
    border-color: #c2185b;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

/* Секция вложений */
.note-attachments-section {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

.note-attachments-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.note-attachments-section .section-title i {
    color: #667eea;
}

/* Сетка вложений */
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.attachment-item {
    display: flex;
    flex-direction: column;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.attachment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

/* Превью вложения */
.attachment-preview {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-preview i {
    font-size: 3rem;
    color: #667eea;
}

.attachment-preview.image i {
    color: #4facfe;
}

.attachment-preview.document i {
    color: #f5576c;
}

.attachment-preview.archive i {
    color: #fa709a;
}

/* Информация о вложении */
.attachment-details {
    padding: 0.75rem;
    flex: 1;
}

.attachment-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.attachment-size {
    display: block;
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.attachment-date {
    display: block;
    font-size: 0.7rem;
    color: #a0aec0;
}

/* Действия с вложением */
.attachment-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.btn-icon-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn-icon-sm:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

/* Ссылка для скачивания */
.attachment-download-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.attachment-download-link:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.attachment-download-link i {
    font-size: 1.5rem;
    color: #667eea;
}

.attachment-download-info {
    flex: 1;
}

.attachment-download-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.attachment-download-meta {
    font-size: 0.75rem;
    color: #718096;
}

/* Кнопки действий по 2 в ряду */
.note-actions-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

.note-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.note-actions-bar .convert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    width: 100%;
}

.note-actions-bar .convert-btn i {
    font-size: 1.1rem;
}

.note-actions-group {
    display: none;
}

/* Dropzone в режиме редактирования */
.edit-attachments-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

.edit-attachments-section:first-child {
    border-top: none;
    padding-top: 0;
}

.edit-attachments-section .dropzone-container {
    margin-bottom: 1rem;
}

.edit-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.edit-attachment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100px;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.edit-attachment-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

/* Превью вложений в редактировании */
.edit-attachment-preview {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.edit-attachment-preview img,
.edit-attachment-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-attachment-item > i {
    font-size: 2.5rem;
    color: #667eea;
    flex-shrink: 0;
}

.edit-attachment-info {
    flex: 1;
    min-width: 0;
}

.edit-attachment-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.edit-attachment-meta {
    font-size: 0.8rem;
    color: #718096;
}

.edit-attachment-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #667eea;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.edit-attachment-download:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.edit-attachment-download i {
    font-size: 1.25rem;
}

.edit-attachment-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #dc3545;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.edit-attachment-remove:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: scale(1.1);
}

.edit-attachment-remove i {
    font-size: 1.25rem;
}

/* Адаптивность */
.attachments-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0 1rem 0;
    padding: 0.5rem 0;
}

.attachments-divider span {
    font-size: 1.25rem;
    color: #cbd5e0;
    letter-spacing: 0.25rem;
    user-select: none;
}

.editor-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.editor-attachment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100px;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.editor-attachment-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

/* Превью вложений в редакторе */
.editor-attachment-preview {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.editor-attachment-preview img,
.editor-attachment-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.editor-attachment-item > i {
    font-size: 2.5rem;
    color: #667eea;
    flex-shrink: 0;
}

.editor-attachment-info {
    flex: 1;
    min-width: 0;
}

.editor-attachment-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.editor-attachment-meta {
    font-size: 0.8rem;
    color: #718096;
}

.editor-attachment-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #667eea;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.editor-attachment-download:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.editor-attachment-download i {
    font-size: 1.25rem;
}

/* Вложения в просмотре (горизонтальная строка) */
.note-attachments-section .attachments-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.note-attachments-section .attachment-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 100px;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: visible;
}

.note-attachments-section .attachment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.note-attachments-section .attachment-preview {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.note-attachments-section .attachment-preview img,
.note-attachments-section .attachment-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.note-attachments-section .attachment-preview i {
    font-size: 2.5rem;
}

.note-attachments-section .attachment-details {
    flex: 1;
    padding: 0 1rem;
}

.note-attachments-section .attachment-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.35rem;
}

.note-attachments-section .attachment-size,
.note-attachments-section .attachment-date {
    font-size: 0.8rem;
    color: #718096;
}

.note-attachments-section .attachment-actions {
    padding: 0;
    border-top: none;
    background: transparent;
}

/* Адаптивность */
    .notes-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-search {
        max-width: 100%;
    }

    .btn-create-note {
        width: 100%;
    }

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

    .note-card-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .note-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ============================================
   Стили для модального окна доступа
   ============================================ */

/* Стили для модального окна доступа */
.access-modal {
    max-width: 550px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(102, 126, 234, 0.1);
    overflow: hidden;
}

.access-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.access-modal .modal-header h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.access-modal .modal-header .btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.access-modal .modal-header .btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.access-modal .modal-body {
    padding: 2rem;
}

.access-modal .modal-footer {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Секции в модальном окне */
.access-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.access-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.access-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.access-section-title i {
    color: #667eea;
    font-size: 1.1rem;
}

/* Список пользователей */
.shared-users-list {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.shared-users-list h4 {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shared-user-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.shared-user-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.shared-user-item i {
    color: #667eea;
    font-size: 1.1rem;
}

.shared-user-item span {
    flex: 1;
    font-size: 0.95rem;
    color: #2d3748;
    font-weight: 500;
}

.remove-user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #dc3545;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-user-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

.remove-user-btn i {
    font-size: 1.1rem;
}

/* ============================================
   Улучшенные стили для кнопок
   ============================================ */

.convert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.convert-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.convert-btn:hover:not(:disabled)::before {
    opacity: 1;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-3px);
}

.convert-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.convert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.convert-btn i {
    font-size: 1.1rem;
}

.convert-btn small {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Варианты кнопок */
.convert-btn.btn-primary {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border-color: #43e97b;
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.3);
}

.convert-btn.btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(67, 233, 123, 0.4);
    border-color: #38f9d7;
}

.convert-btn.btn-secondary {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
    border-color: #718096;
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.3);
}

.convert-btn.btn-secondary:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(113, 128, 150, 0.4);
    border-color: #4a5568;
}

.convert-btn.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: #f093fb;
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
}

.convert-btn.btn-warning:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.4);
    border-color: #f5576c;
}

.convert-btn.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: #4facfe;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.convert-btn.btn-success:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4);
    border-color: #00f2fe;
}

.convert-btn.btn-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    border-color: #fa709a;
    box-shadow: 0 4px 12px rgba(250, 112, 154, 0.3);
}

.convert-btn.btn-danger:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(250, 112, 154, 0.4);
    border-color: #fee140;
}

.convert-btn.btn-back {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
    border-color: #d946a6;
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.3);
}

.convert-btn.btn-back:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(217, 70, 166, 0.4);
    border-color: #ff69b4;
}

/* Кнопки в футере модального окна */
.modal-footer .convert-btn {
    min-width: 140px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.modal-footer .convert-btn.btn-primary {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border-color: #43e97b;
}

.modal-footer .convert-btn.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 233, 123, 0.4);
    border-color: #38f9d7;
}

.modal-footer .convert-btn.btn-secondary {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
    border-color: #718096;
}

.modal-footer .convert-btn.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(113, 128, 150, 0.4);
    border-color: #4a5568;
}
