/* Notes Module */

/* ---- Layout ---- */
.notes-layout {
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
}

/* ---- Note Form Panel ---- */
.note-form-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--sp-6);
    max-width: 600px;
}

.note-form-panel h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--sp-4);
    color: var(--text-primary);
}

/* ---- Color Picker ---- */
.color-picker-row {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--dur-fast);
    flex-shrink: 0;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.selected {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--accent);
    transform: scale(1.1);
}

/* ---- Notes Grid ---- */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sp-4);
}

/* ---- Note Card ---- */
.note-card {
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    transition: all var(--dur-fast);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-2);
}

.note-header strong {
    font-size: var(--text-base);
    font-weight: 600;
}

.note-private-badge {
    font-size: var(--text-xs);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: rgba(0,0,0,0.2);
}

.note-date-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: var(--text-xs); padding: 1px 6px;
    border-radius: var(--radius-full);
    background: rgba(59,130,246,0.2); color: inherit;
    font-weight: 500;
}

.form-label-hint {
    font-size: var(--text-xs); color: var(--text-muted);
    font-weight: 400; margin-left: var(--sp-1);
}

.note-body {
    font-size: var(--text-sm);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--sp-3);
    opacity: 0.85;
}

.note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-xs);
    opacity: 0.7;
    margin-top: auto;
}

.note-author {
    font-style: italic;
}

.note-actions {
    display: flex;
    gap: var(--sp-2);
}

.note-actions .btn-icon {
    background: rgba(0,0,0,0.15);
    border: none;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--text-xs);
    color: inherit;
    transition: background var(--dur-fast);
}

.note-actions .btn-icon:hover {
    background: rgba(0,0,0,0.3);
}

.note-actions .btn-icon.delete:hover {
    background: rgba(255,0,0,0.3);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .notes-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
}

