/* v1.0.6 */
:root {
    --bg-dark: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-panel: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(30, 41, 59, 0.7);
    --danger: #ef4444;
    --success: #22c55e;
    --card-bg: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: grid;
    grid-template-columns: 260px 350px 1fr;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar-header {
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 25px;
    color: var(--accent);
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.nav-section {
    margin-bottom: 25px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding: 0 5px;
}

.add-icon {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.nav-item i {
    width: 18px;
    height: 18px;
}

/* Notes List Panel */
.notes-list-panel {
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.search-container {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-container i {
    width: 18px;
    color: var(--text-secondary);
}

.search-container input {
    background: none;
    border: none;
    color: var(--text-primary);
    width: 100%;
    outline: none;
}

.notes-grid {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.note-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.note-card:hover {
    border-color: var(--accent);
    transform: translateX(5px);
}

.note-card.active {
    border-color: var(--accent);
    background-color: rgba(99, 102, 241, 0.05);
}

.note-card h4 {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.note-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-card .card-footer {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Editor Panel */
.editor-panel {
    background-color: var(--bg-panel);
    display: flex;
    flex-direction: column;
    position: relative;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    gap: 15px;
}

.empty-state i {
    width: 48px;
    height: 48px;
    opacity: 0.2;
}

.editor-header {
    padding: 30px 40px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    width: 70%;
    outline: none;
}

.editor-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-icon.delete:hover {
    color: var(--danger);
}

.editor-meta {
    padding: 0 40px 20px;
    display: flex;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.meta-item i {
    width: 16px;
}

.meta-item select {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
}

/* Quill Customization */
#quill-editor {
    flex: 1;
    border: none !important;
    padding: 0 25px;
}

.ql-toolbar {
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 10px 40px !important;
}

.ql-container {
    font-size: 1.1rem !important;
    color: var(--text-primary) !important;
}

.ql-editor {
    padding: 20px 40px !important;
}

.ql-snow .ql-stroke {
    stroke: var(--text-secondary) !important;
}

.ql-snow .ql-fill {
    fill: var(--text-secondary) !important;
}

.ql-snow .ql-picker {
    color: var(--text-secondary) !important;
}

/* Helpers */
.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-sidebar);
    padding: 30px;
    border-radius: 20px;
    width: 400px;
    border: 1px solid var(--border);
}

.modal-content h3 {
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 10px;
    color: white;
    margin-bottom: 20px;
    outline: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
}

/* Star Icon */
.star-icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.star-icon.filled {
    color: #fbbf24;
    fill: #fbbf24;
}

#favorite-btn.active {
    color: #fbbf24;
    background-color: rgba(251, 191, 36, 0.1);
}

#favorite-btn.active svg {
    fill: #fbbf24;
}

/* Tag Badges */
.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-badge {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.folder-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
}