/* Notes System CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #22c55e 100%);
    min-height: 100vh;
    padding: 20px;
}

.notes-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.notes-header {
    text-align: center;
    margin-bottom: 30px;
}

.notes-header h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 10px;
}

.branding {
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.notes-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.tool-btn {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-btn:hover {
    background: #6f42c1;
    color: white;
    border-color: #6f42c1;
    transform: translateY(-2px);
}

.back-to-dashboard-btn {
    display: inline-block;
    background: #6f42c1;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #6f42c1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-to-dashboard-btn:hover {
    background: #5a32a3;
    border-color: #4c2a85;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.3);
}

.toolbar-right input,
.toolbar-right select {
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    min-width: 200px;
}

.notes-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.notes-sidebar {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h3 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.category-item:hover {
    background: #e9ecef;
}

.category-item i {
    margin-right: 10px;
    color: #6f42c1;
}

.note-count {
    background: #6f42c1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: #6f42c1;
    color: white;
}

.recent-notes {
    max-height: 200px;
    overflow-y: auto;
}

.recent-note-item {
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    border-left: 3px solid transparent;
}

.recent-note-item:hover {
    background: #e9ecef;
    border-left-color: #6f42c1;
}

.notes-main {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e9ecef;
    min-height: 600px;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.note-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.note-card:hover {
    border-color: #6f42c1;
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.1);
    transform: translateY(-2px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.note-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.note-category {
    background: #6f42c1;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.note-preview {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.note-date {
    color: #999;
    font-size: 12px;
}

.note-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.note-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.note-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.edit-note,
.delete-note {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.edit-note {
    background: #17a2b8;
    color: white;
}

.delete-note {
    background: #dc3545;
    color: white;
}

.edit-note:hover,
.delete-note:hover {
    transform: translateY(-1px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: #6f42c1;
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-title-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: 600;
    width: 100%;
    margin-right: 15px;
}

.note-title-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.modal-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.modal-actions select {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.note-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.format-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.format-btn:hover {
    background: #6f42c1;
    color: white;
    border-color: #6f42c1;
}

.note-content {
    min-height: 300px;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 16px;
}

.note-content:focus {
    outline: none;
    border-color: #6f42c1;
}

.note-content[placeholder]:empty:before {
    content: attr(placeholder);
    color: #999;
    font-style: italic;
}

.note-tags input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.save-btn,
.delete-btn,
.cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.save-btn {
    background: #28a745;
    color: white;
}

.save-btn:hover {
    background: #218838;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* Responsive */
@media (max-width: 1024px) {
    .notes-content {
        grid-template-columns: 1fr;
    }
    
    .notes-sidebar {
        order: 2;
    }
    
    .notes-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    .notes-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: center;
    }
    
    .back-to-dashboard-btn {
        width: 100%;
        justify-content: center;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}
